Skip to content

For mod authors Scenario ​

This page is for authors of total conversions and map mods who write map/setup_scenarios/*.txt by hand. Open your mod's scenario in Galaxy Forge to move, add and delete systems, rework hyperlanes and assign initializers on the map. Write initializers in your text editor as before.

Your comments and formatting stay ​

Galaxy Forge rewrites only the lines your edits touch. Every other byte of the file is copied as it was.

  • Comments, blank lines, key order and formatting stay as you wrote them.
  • Keys Galaxy Forge doesn't know stay too.
  • Opening and saving with no edits writes the same bytes. A test checks this on a set of real scenarios.
  • A new line copies the indentation of the lines around it.
  • Undo and redo put back the exact bytes.

After a save, git diff shows only the lines your edits touched.

A diff after moving two systems in Galaxy Forge: only their two position lines changed, and the comments around them are as written

Edit a plain scenario without Paint a Galaxy ​

If you open a scenario that isn't written for Paint a Galaxy, Galaxy Forge asks whether to edit it for the Paint a Galaxy mod. For your own mod, answer no:

The Open dialog for a plain scenario with For the Paint a Galaxy mod unticked, and the warning that shows under it

  1. On the Open screen, click "Browse…" and pick the scenario in your mod's folder or git checkout.
  2. Untick "For the Paint a Galaxy mod". The warning under the box says to go on only for a mod of your own that handles homeworlds, marauders and fallen empires.
  3. Tick "Don't warn me again" if you don't want the question next time.
  4. Click Continue.

Galaxy Forge remembers the box on this computer, for new scenarios too. With the box unticked, your edits are written as a plain scenario that doesn't need Paint a Galaxy.

With the box ticked, opening and saving still write nothing on their own. Your edits are written for Paint a Galaxy instead. For example, a new system with a spawn weight gets the mod's spawn script.

A bar under the top bar suggests saving the map into Paint a Galaxy. Click "Not for me" to hide it for good.

A file that Galaxy Forge or Paint a Galaxy didn't make gets no # created by line from a save.

Work beside your text editor ​

You can have the scenario open in Galaxy Forge and in your text editor at the same time. Save, back up and restore has the details.

  • After you save in your text editor, a scenario with no unsaved edits in Galaxy Forge reloads by itself.

  • With unsaved edits, a bar offers "Reload" and "Keep my changes".

    The bar that says the scenario changed on disk, with Reload and Keep my changes

  • Save asks before it writes over a file that changed on disk. "Overwrite" backs up the other version first.

  • Rows on the Scripts tab and spawn rows open the scenario in your text editor at their line. While you have unsaved edits, it opens at the top. Open a script in your editor says how to pick the editor.

Each save leaves a backup beside the file, named <name>.txt.bak-<date>-<time>, and up to eight are kept. In a git checkout they land in map/setup_scenarios. Add *.bak-* to your .gitignore. Galaxy Forge's own Open list skips them.

Rework a big map ​

A pending circle of 23 gold systems joined by lanes in the empty core of a scenario

Initializers from your mod ​

Galaxy Forge reads initializers from the game and from the mods enabled in your launcher playset. It doesn't read the mod your scenario is in unless that mod is enabled. Enable it, start Stellaris once with the playset, then click Reload in the Game data panel.

  • A mod whose descriptor's path points at a git checkout outside the mod folder is read from there.
  • A file of the same name, or replace_path, replaces the game's file.
  • An initializer defined twice resolves to the first one read, as in the game.
  • An initializer Galaxy Forge hasn't read shows "(not in your game data)" beside its name in the Inspector's Initializer section.

Check the map before you commit ​

The Issues tab lists lanes to missing systems, lanes written at one end only, duplicate lanes, isolated systems, a split galaxy, systems far outside the galaxy edge and more.

The command line tool works on scenarios too. sgf validate my_map.txt prints every issue and exits with 1 if one is an error. apply, prepare, nebula, new-scenario and export-scenario also take scenarios. inspect, shape and roundtrip read saves only.

Limits ​

Galaxy Forge doesn't edit initializers yet. You still write them in your text editor, and Galaxy Forge can open each one at the right line.

A few things in a scenario file aren't fully understood yet:

  • If the file uses coordinate_transform, the map shows each system where the file puts it, before the transform. Moving a system writes a plain position.
  • If a position uses an @variable, Galaxy Forge reads it as 0.
  • If a position is a min/max range, the system shows halfway between the two. Moving it replaces the range with a single position.
  • remove_hyperlane lines are ignored.

The Issues tab warns you about broken lanes and similar mistakes. It doesn't check for two systems with the same id, or for initializer names that don't exist. CWTools or the game's error log catches those.

A few other things to know:

  • You can't jump from a system on the map to its line in the file.
  • New scenarios, and files made by Galaxy Forge or Paint a Galaxy, start with a # created by comment. There's no way to turn it off.
  • Galaxy Forge lets you save into a Steam Workshop folder, but Steam overwrites those files whenever the mod updates. Work on your own copy instead.

What's planned ​

The Roadmap has the next scenario work, such as initializer editing and galaxies that don't need Paint a Galaxy.

Report a problem ​

If a save changes lines you didn't edit, that's a bug. Report it with the scenario, or the smallest part of it that shows the problem.

Stellaris is a Paradox Interactive title. Galaxy Forge is not affiliated with or endorsed by Paradox.