Page 1 of 1

Modding - start here

Posted: Thu Oct 26, 2017 8:42 am
by rbodleyscott
Firstly, you are strongly advised not to mod your base build. The game has a robust system for modding without doing this. If you mod your main build, the modded files may be over-written when the game is updated.

Basic information on Modding is here:

http://archonwiki.slitherine.com/index.php/Modding

Note that the global mods feature was added to the engine very recently, and is not currently working in FOG2.

Mods should therefore be created in custom "campaign" folders. (The engine calls all type of modules "campaigns" whether preset scenarios, custom battles, quick battle modules, sandbox campaigns or scripted campaigns).

Custom folders can be created by going into the editor and selecting "New". You can make a copy of a similar module as a head start. These will be saved in /Documents/My Games/FieldofGlory2/CAMPAIGNS if single player, /Documents/My Games/FieldofGlory2/MULTIPLAYER if multiplayer.

e.g.
1) if you want to make a preset scenario or set of preset scenarios, start with a copy of /CAMPAIGNS/2Rise_Of_Rome
2) if you want to make a sandbox campaign module, start with a copy of 2MPSRiseOfRome
3) if you want to make a scripted campaign, start with a copy of CaesarCampaign
4) If you want to make a modded quick battles module, start with a copy of 0Hypothetical

NOTE: If you want to make a Custom Battles module, just create a "campaign" that isn't a copy of any of the existing "campaigns".

Once you have created a custom "campaign" it should automatically appear in the list of options for its module type. Note that if you copy an existing "campaign" the system will not automatically replace the displayed campaign name with the name you typed in, you will need to alter the IDS_CAMPAIGN_NAME string in text1.txt in the main directory of the custom folder. Until you do that, the game will show a duplicate of the original name of the module in the appropriate list. The vanilla one is the top one.

Files in a custom "campaign" folder will automatically replace the vanilla versions when that module is run, provided that you use the file tree shown at the end of the linked document. Note that this is not identical to the file tree in the main build.