All,
Reposting this from the Modder's Corner to reach a wider audience.
I have card settings I am utilizing as a baseline in a Campaign. How do I specifically use support at a predtermined point in the scenario. Lets say naval support arrives on turn 10 or air support is available on turn 10. How do I script that without altering the cards?
Nav
How Do You Delay Support in a Scenario
Moderators: Slitherine Core, BA Moderators
-
Navaronegun
- Captain - Heavy Cruiser

- Posts: 946
- Joined: Sun Sep 22, 2013 5:39 pm
- Location: Arizona, USA -7 GMT
How Do You Delay Support in a Scenario
I think the best way to describe our operations to date is that they have violated every recognized principle of war.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.
-
pipfromslitherine
- Site Admin

- Posts: 9934
- Joined: Wed Mar 23, 2005 10:35 pm
Re: How Do You Delay Support in a Scenario
I was sure that someone would respond
. Do you mean you want to delay the ability for the user to use a bonus, or that you want to cause a bonus to happen at a given point in the game?
Cheers
Pip
Cheers
Pip
follow me on Twitter here
-
Navaronegun
- Captain - Heavy Cruiser

- Posts: 946
- Joined: Sun Sep 22, 2013 5:39 pm
- Location: Arizona, USA -7 GMT
Re: How Do You Delay Support in a Scenario
Delay the ability for use until a specific point in the scenario. Dawn, essentially in this case, but allow use from that point forward.pipfromslitherine wrote:I was sure that someone would respond. Do you mean you want to delay the ability for the user to use a bonus, or that you want to cause a bonus to happen at a given point in the game?
Cheers
Pip
Nav
I think the best way to describe our operations to date is that they have violated every recognized principle of war.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.
-
pipfromslitherine
- Site Admin

- Posts: 9934
- Joined: Wed Mar 23, 2005 10:35 pm
Re: How Do You Delay Support in a Scenario
You would need to look at the specific bonus you want to affect, but you can just reset the cooldown each turn using SetScriptGlobal I would think.
Cheers
Pip
Cheers
Pip
follow me on Twitter here
-
Navaronegun
- Captain - Heavy Cruiser

- Posts: 946
- Joined: Sun Sep 22, 2013 5:39 pm
- Location: Arizona, USA -7 GMT
Re: How Do You Delay Support in a Scenario
Well, I tried that, but that just reset the cooldown rate. It was still available on turn 1.pipfromslitherine wrote:You would need to look at the specific bonus you want to affect, but you can just reset the cooldown each turn using SetScriptGlobal I would think.
Cheers
Pip
Nav
I think the best way to describe our operations to date is that they have violated every recognized principle of war.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.
-
AndrewGardner
- Slitherine

- Posts: 535
- Joined: Tue Nov 13, 2012 6:24 pm
Re: How Do You Delay Support in a Scenario
You can call SetScriptGlobal("25pdrBattery", "gCounter", -6) for example on turn 0 to delay availability of an artillery bonus or air strike.
To figure out the number to set, subtract the number of turns you want to delay from the DELAY stat for that bonus in cards.txt.
Note this technique wouldn't work on a bonus assigned to both sides (ex Revive), you could add a function to the bonus in that case and call it using CallBonusFunction.
To figure out the number to set, subtract the number of turns you want to delay from the DELAY stat for that bonus in cards.txt.
Note this technique wouldn't work on a bonus assigned to both sides (ex Revive), you could add a function to the bonus in that case and call it using CallBonusFunction.
-
Navaronegun
- Captain - Heavy Cruiser

- Posts: 946
- Joined: Sun Sep 22, 2013 5:39 pm
- Location: Arizona, USA -7 GMT
Re: How Do You Delay Support in a Scenario
Thanks, Andrew. So in the example above, if the card was set at delay 6, and I gave it the above value, it would be available on turn 12?
I think the best way to describe our operations to date is that they have violated every recognized principle of war.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.
General Eisenhower, Supreme Commander Allied Expeditionary Force, on the Tunisian Campaign, 27 DEC 1942.