Page 1 of 1
random reinforcements?
Posted: Wed Dec 11, 2019 3:07 am
by Ubberdorc
Is it possible to set up random reinforcements?
So instead of reinforcements showing up on turn 5 they would show up between turn 4 and turn 10?
Re: random reinforcements?
Posted: Wed Dec 11, 2019 9:13 am
by Paul59
Ubberdorc wrote: ↑Wed Dec 11, 2019 3:07 am
Is it possible to set up random reinforcements?
So instead of reinforcements showing up on turn 5 they would show up between turn 4 and turn 10?
I am sure it would be possible, but not by using the Editor method of reinforcement. You would have to use the scripted method, and then add a script to add a random element to the reinforcement. I wrote a guide to using the scripted method in the Field of Glory 2 forum, FOG2 uses similar mechanics to Pike and Shot, but there maybe some differences;
viewtopic.php?f=491&t=81096
I have never had random reinforcements in any of my scenarios, so I don't know what the actual random element script would look like.
Re: random reinforcements?
Posted: Wed Dec 11, 2019 11:01 am
by Athos1660
Re: random reinforcements?
Posted: Sun Dec 15, 2019 1:09 pm
by Cronos09
Ubberdorc wrote: ↑Wed Dec 11, 2019 3:07 am
Is it possible to set up random reinforcements?
So instead of reinforcements showing up on turn 5 they would show up between turn 4 and turn 10?
Your question seemed interesting to me. I thought about it. And here's the script:
1) export your reinforcement to
(ScenarioName).BSF with the editor;
2) open the
(ScenarioName).BSF and add the next blocks - to
FUNCTION PreBattleSetup()
Code: Select all
int b
b = SkewedRandom(8, 20, 0);
SetGlobal("B", b);
then to
FUNCTION StartTurn(side)
Code: Select all
int a;
int c;
a = GetTurn();
c = GetGlobal("B");
// Autogenerated script for reinforcement group 0 on side 0 - Paste this code into your StartTurn function:
if (a == c)
{...
}
The disadvantage of this script is that reinforcements for side 0 can appear during the turn of player 0 and the turn of player 1
Re: random reinforcements?
Posted: Sat Dec 28, 2019 1:42 pm
by Odenathus
Richard wrote a script for me to use in my Waterloo scenario so that the Prussian unit arrive over a range of 2-3 turns. If you look at the Waterloo BSF you should find the relevant code.
Good luck.
Re: random reinforcements?
Posted: Sat Dec 28, 2019 10:33 pm
by Ubberdorc
Thank you for the help, I will give them A try!