Campaign/Scenario creation

Posted on Wednesday, May 31, 2017

Scenario creation is not documented very well. Hard to debug as well. Though through hacks I have been able create scenarios.

There is the Game.bin for each scenario which is created with CampaignCompiler.bat within Tools. It does NOT create Game.bin file for Mod Campaigns. That is what CampaignCompilerMod.bat is 'supposedly' there for, though GalCiv3 never seems to run it on its own.

@Stardock, CampaignCompilerMod.bat has a typo for a variable (docsdir vs DOCS_DIR), due to which it can't find Campaigns within Mods.

  1. FOR /F "tokens=2*" %%F IN ('%windir%/System32/reg.exe QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal"') DO (SET docsdir=%%G)
  2. ...
  3. SET MOD_DIR=%DOCS_DIR%\My Games\GalCiv3\Mods

Also, the line that compiles the Game.bin does not include Game directory of mods themselves. Might have been on purpose as scenarios have their own tech trees in case of incompatibility with a future version? So I added it like so:

  1. DataCompiler.exe -l %INCLUDE_PATH% -x "../Data/Game;%%C\Game;%%D\Game;%%E\Game" -b "%%E\Game.bin" %1 %2

But even that is not enough.

Firstly you already have to have a map(Scenario) ready for the Scenario Data to show up within Map Editor. Scenarios can be created when GalCiv3 is started with ScenarioEditor launch option.

Secondly scenarios within Mods don't get compiled into the main Core.bin of GalCiv 3. I checked that by having the cloned campaign be beside the original within DLC folder.

Uploaded an example scenario to GitHub -