random reinforcements?

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
Ubberdorc
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 31
Joined: Thu Aug 07, 2014 11:03 pm

random reinforcements?

Post 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?
Paul59
General - King Tiger
General - King Tiger
Posts: 3808
Joined: Tue Jul 21, 2015 11:26 pm

Re: random reinforcements?

Post 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.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Athos1660
Major-General - Elite Tiger I
Major-General - Elite Tiger I
Posts: 2564
Joined: Wed May 29, 2019 3:23 pm

Re: random reinforcements?

Post by Athos1660 »

Image

Image
Cronos09
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 304
Joined: Thu Feb 22, 2018 4:28 pm

Re: random reinforcements?

Post 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
Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 287
Joined: Sat Jun 27, 2009 10:02 pm

Re: random reinforcements?

Post 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.
Ubberdorc
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 31
Joined: Thu Aug 07, 2014 11:03 pm

Re: random reinforcements?

Post by Ubberdorc »

Thank you for the help, I will give them A try!
Post Reply

Return to “Scenario Design”