Custom scripts in scenario folder

Post Reply
CharlesdeBatz
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Sun Jul 11, 2021 5:41 pm

Custom scripts in scenario folder

Post by CharlesdeBatz »

When creating a scenario that modifies base game scripts (e.g., StartTurn.bsf), should those modified scripts be placed in the scenario folder under campaigns in the corresponding directory? That is, for StartTurn, the modified file should be in My Games\FieldofGlory2\Campaigns\*SCENARIO NAME*\Data\Battle\Scripts?

I am getting a duplicate function error when I use this method, so I am unsure how this would be accomplished properly.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28273
Joined: Sun Dec 04, 2005 6:25 pm

Re: Custom scripts in scenario folder

Post by rbodleyscott »

CharlesdeBatz wrote: Sat Feb 25, 2023 6:50 pm When creating a scenario that modifies base game scripts (e.g., StartTurn.bsf), should those modified scripts be placed in the scenario folder under campaigns in the corresponding directory? That is, for StartTurn, the modified file should be in My Games\FieldofGlory2\Campaigns\*SCENARIO NAME*\Data\Battle\Scripts?

I am getting a duplicate function error when I use this method, so I am unsure how this would be accomplished properly.
You appear to be using the correct method.

See the chart at the end of this document:

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

Assuming that the script files have the exactly the same name, the modded one will replace the vanilla one completely. (Or not at all, in the case of Core.bsf and Core/UI items)

So, somewhere you have two functions with the same name. Is the duplicate function name used in another main game script?
Richard Bodley Scott

Image
Post Reply

Return to “Field of Glory II: Scenario Design”