How Do You Delay Support in a Scenario

PC : Battle Academy is a turn based tactical WWII game with almost limitless modding opportnuities.

Moderators: Slitherine Core, BA Moderators

Post Reply
Navaronegun
Captain - Heavy Cruiser
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

Post by Navaronegun »

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
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.
pipfromslitherine
Site Admin
Site Admin
Posts: 9934
Joined: Wed Mar 23, 2005 10:35 pm

Re: How Do You Delay Support in a Scenario

Post by pipfromslitherine »

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
follow me on Twitter here
Navaronegun
Captain - Heavy Cruiser
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

Post by Navaronegun »

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
Delay the ability for use until a specific point in the scenario. Dawn, essentially in this case, but allow use from that point forward.

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.
pipfromslitherine
Site Admin
Site Admin
Posts: 9934
Joined: Wed Mar 23, 2005 10:35 pm

Re: How Do You Delay Support in a Scenario

Post by pipfromslitherine »

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
follow me on Twitter here
Navaronegun
Captain - Heavy Cruiser
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

Post by Navaronegun »

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
Well, I tried that, but that just reset the cooldown rate. It was still available on turn 1.

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.
AndrewGardner
Slitherine
Slitherine
Posts: 535
Joined: Tue Nov 13, 2012 6:24 pm

Re: How Do You Delay Support in a Scenario

Post by AndrewGardner »

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.
Navaronegun
Captain - Heavy Cruiser
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

Post by Navaronegun »

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.
Post Reply

Return to “Battle Academy”