How to edit strength multipliers for sandbox campaign and skirmish battles?

Post Reply
kvnrthr
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 83
Joined: Sun Sep 20, 2015 8:37 pm

How to edit strength multipliers for sandbox campaign and skirmish battles?

Post by kvnrthr » Sun Mar 17, 2019 7:05 am

I know in custom campaigns you can set strength multipliers for units, which just changes what number of men is displayed.

Is there some way to make this happen for sandbox campaigns and skirmish battles?

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 22316
Joined: Sun Dec 04, 2005 6:25 pm

Re: How to edit strength multipliers for sandbox campaign and skirmish battles?

Post by rbodleyscott » Sun Mar 17, 2019 8:37 am

kvnrthr wrote:
Sun Mar 17, 2019 7:05 am
I know in custom campaigns you can set strength multipliers for units, which just changes what number of men is displayed.

Is there some way to make this happen for sandbox campaigns and skirmish battles?
Only by modding scripts, which we don't recommend you do in your main build.

So you would need to clone the relevant campaigns (in the editor) and then add the modded script.

You would not be able to play MP unless your opponent had the same mod. You certainly would not be able to play multiplayer (without messing things up) if you modded your main build.
Richard Bodley Scott

Image

Radames
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Wed Jul 15, 2015 3:12 am

Re: How to edit strength multipliers for sandbox campaign and skirmish battles?

Post by Radames » Sat Jun 22, 2019 4:20 pm

rbodleyscott wrote:
Sun Mar 17, 2019 8:37 am
kvnrthr wrote:
Sun Mar 17, 2019 7:05 am
I know in custom campaigns you can set strength multipliers for units, which just changes what number of men is displayed.

Is there some way to make this happen for sandbox campaigns and skirmish battles?
Only by modding scripts, which we don't recommend you do in your main build.

So you would need to clone the relevant campaigns (in the editor) and then add the modded script.
When you say, "add the modded script," are you referring to modifications to the Campaign.BSF? What function is called before Quick Battles and Custom Battles that would then make the call to SetUniversalVar? The equivalent of PreBattleSetup(), but for Quick and Custom Battles?

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 22316
Joined: Sun Dec 04, 2005 6:25 pm

Re: How to edit strength multipliers for sandbox campaign and skirmish battles?

Post by rbodleyscott » Sat Jun 22, 2019 5:05 pm

Radames wrote:
Sat Jun 22, 2019 4:20 pm
rbodleyscott wrote:
Sun Mar 17, 2019 8:37 am
kvnrthr wrote:
Sun Mar 17, 2019 7:05 am
I know in custom campaigns you can set strength multipliers for units, which just changes what number of men is displayed.

Is there some way to make this happen for sandbox campaigns and skirmish battles?
Only by modding scripts, which we don't recommend you do in your main build.

So you would need to clone the relevant campaigns (in the editor) and then add the modded script.
When you say, "add the modded script," are you referring to modifications to the Campaign.BSF?
No
What function is called before Quick Battles and Custom Battles that would then make the call to SetUniversalVar? The equivalent of PreBattleSetup(), but for Quick and Custom Battles?
The line that needs to be modded is line 355 in Slith_RandomMap2.BSF:

SetUniversalVar("StrengthMultiplier", 100);

If you wanted to double the number of men displayed, you would changed this to

SetUniversalVar("StrengthMultiplier", 200);

It is strongly recommended, however, that you don't do this in your main build. (And you absolutely must not do so if you intend to ever play MP).

For Custom Battles, do the following:

1) Select <Editor> from the main menu.

2) Select <New>

3) Type MyCustomBattles into the top box, and My Custom Battles into the second box. Click <Proceed>.

4) Put a copy of Slith_RandomMap2.BSF (which you will find in /Data/Battles/Scripts in the main build)

in /Documents/My Games/FieldOfGlory2/CAMPAIGNS/MYCUSTOMBATTLES/Data/Battle/Scripts, and mod it as above.

When you go into Custom Battles and click on "Select another module", you should find "My Custom Battles", which is your modded version of the default Custom Battles module.

--------------------------------

For the Quick Battle modules you can use the Editor to create copies of each of them:

0Hypothetical (which is the base game quick battles module)
1QuickBattlesImmortalFire
3QuickBattlesLegionsTriumphant
4QuickBattlesAgeOfBelisarius
5QuickBattlesRiseOfPersia
6QuickBattlesWolvesAtTheGate

The copies will be in /Documents/My Games/FieldOfGlory2/CAMPAIGNS, and you can add a copy of your modded Slith_RandomMap2.BSF file to each of them in a /Data/Battle/Scripts subdirectory.

Note that the Campaign Name you type into the second box will not be displayed by the game unless you delete the existing IDS_CAMPAIGN_NAME line from Text1.txt in the cloned folder.

If you don't do that they will appear as duplicates in the Quick Battles module listbox - in each case the modded version is the second one listed.
Richard Bodley Scott

Image

Radames
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Wed Jul 15, 2015 3:12 am

Re: How to edit strength multipliers for sandbox campaign and skirmish battles?

Post by Radames » Sat Jun 22, 2019 5:37 pm

Beautiful. Thanks for the quick response.

Post Reply

Return to “Field of Glory II: Modding”