Modding:Developer Mode

From Cosmoteer Wiki
Jump to: navigation, search

Modding Main Page

As of version 0.13.2, Cosmoteer comes with a "Developer Mode" that enables a variety of extra features that may be useful to mod developers. These features are not nearly as user-friendly or as well-tested as non-developer features, and many of them will even crash the game if used incorrectly.

How to enable Developer Mode

Enabling Developer Mode is easy: Simply run the Cosmoteer (Developer Mode) shortcut in your start menu.

Alternatively, you can also launch Cosmoteer using the --devmode command-line parameter.

Using the developer menu

Most Developer Mode features can be accessed using the "developer menu". When running the game in Developer Mode, press Ctrl+~ to open the developer menu.

There are many features available in the developer menu:

Changing the initial screen

By default, Cosmoteer shows the title screen upon starting. However, when working on a game feature, it can often save time to have the game show something else. To change what screen Cosmoteer shows when it starts up, open the developer menu, click Cosmoteer, then Initial State, and then select one of these options:

MainMenu - Displays the title screen upon loading. This is the default.

NewGameBountyMode - Immediately starts a new Bounty Hunter game using the previous game options.

NewGameCreativeMode - Immediately starts a new Creative Mode game using the previous game options.

LoadTestGame - Immediately loads the saved game called "test". If there is no saved game called "test", it will show the title screen instead.

MultiplayerLobby - Immediately shows the multiplayer lobby screen.

PlanetGeneratorEditor - Immediately displays the planet editor (see below).

ParticleEffectEditor - Immediately displays the particle editor (see below).

Generating bounty data

Cosmoteer can automatically generate enemy ship data for Bounty Hunter. From the developer menu, click Cosmoteer and then click Generate Bounties. This will scan all of the ships in the Data/Build-In Ships folder and add them to the list of bounties in Bounty Mode/bounty mode.txt.

Planet Editor

Developer Mode includes a Planet Editor user interface for editing the different types of procedurally-generated planets. To use it, click Editor in the developer menu and then click Planet Generator.

Particle Editor

Developer Mode also includes a Particle Editor user interface for editing particle effects. To use it, click Editor in the developer menu and then click Particle Effect.

Reload language file

If you are working on a translation for Cosmoteer, you will likely want to make changes to your language file and then preview them in game. You can save a lot of time by simply asking Cosmoteer to reload the language file instead of restarting the game every time you want to test a change. To do that, open the developer menu, click Language, and then click Reload Current. You should see the text in the game instantly update with your latest changes.

Setting ship state

When you are testing features, it can often be useful to change the health of a ship, add or remove ammo/power, or make the ship invulnerable. You can do any of those things by selecting a ship, opening the developer menu, and then selecting Ship.

Cheating

If you're testing a feature in Bounty Hunter, but you don't want to worry about not having enough money or fuel, you can open the developer menu and select Cheat to give yourself any amount of money or fuel.

Modifying Bounties

If there is a particular bounty you want to test, you can add it to the game by opening the developer menu, clicking Bounties, and then Add Bounty. You can also remove or "complete" (remove + get paid) any existing bounties.

Viewing the game log

Open on the developer menu and drag down on the bottom of it to expand the game log. This is a live view of everything that's being printed to the game's log file.

It also has a Python-based command line, which you can explore by typing dir(). However, in its current state, it's not very useful, as almost all options are available via the menus above.

Other Developer Mode Features

These are features that are also enable by running the game in Developer Mode, but are not accessed via the developer menu.

Destroy Parts

To instantly destroy any ship part, hover your mouse cursor over it and press Shift+~+D.

Start Fires

To start a fire on any ship part, hover your mouse cursor over it and press Shift+~+F.

Switch sectors without FTL

In Bounty Hunter, if you want to view a sector without traveling their using an FTL drive, hold the Shift key while clicking on the sector.

Procedural ship editor

Creative Mode has a handful of procedurally-generated ship types. In Developer Mode, you can access a user interface for editing these procedural ships. To access the Procedural Ship Editor, simply right-click on the type of procedural ship you want to edit.