Page 1 of 1
Scripting under 1.10 - question
Posted: Sun Sep 30, 2012 5:54 pm
by bebro
Most of the new options seem easy to figure out, but what do "run count" and "skip count" mean?
Is "run count" how often script X is executed during a scenario? Still, I dunno what "skip" is for...
Also, is it possible to have a msg via script getting displayed at the start of turn 1, but *after* the deployment stage? I'm giving free units in some cases at turn 1, and the game places them only after deployment is over (which is per se no prob). But it means these units also are not visible before on-map, so not *during* the deployment.
I want to display a "unit x has been put under your command" text msg right when these units are present. But when I set the trigger to turn 1,1, I get the msg during deployment (when they're actually not placed by the game yet). I tried to edit the trigger to fire ("instantly" setting) when the correct unit, name, type, number is present on map, but either my trigger has errors, or it somehow doesn't work. Does anybody have an idea how to solve this?
Re: Scripting under 1.10 - question
Posted: Sun Sep 30, 2012 6:24 pm
by nikivdd
bebro wrote:Most of the new options seem easy to figure out, but what do "run count" and "skip count" mean?
Is "run count" how often script X is executed during a scenario? Still, I dunno what "skip" is for...
Also, is it possible to have a msg via script getting displayed at the start of turn 1, but *after* the deployment stage? I'm giving free units in some cases at turn 1, and the game places them only after deployment is over (which is per se no prob). But it means these units also are not visible before on-map, so not *during* the deployment.
I want to display a "unit x has been put under your command" text msg right when these units are present. But when I set the trigger to turn 1,1, I get the msg during deployment (when they're actually not placed by the game yet). I tried to edit the trigger to fire ("instantly" setting) when the correct unit, name, type, number is present on map, but either my trigger has errors, or it somehow doesn't work. Does anybody have an idea how to solve this?
Just an idea...not tested

The number 30 is just an example. It could be 28 core units that the player can deploy and an extra 2 preplaced on the map. And since the two extra are only seen after the deployment phase...
Then you need to add the action "show msg", eventually a center action too.
Re: Scripting under 1.10 - question
Posted: Sun Sep 30, 2012 7:00 pm
by Chris10
bebro wrote:Most of the new options seem easy to figure out, but what do "run count" and "skip count" mean?
Is "run count" how often script X is executed during a scenario? Still, I dunno what "skip" is for...
I would assume the following:
Example
Trigger = Turn 3
Run Count = 5 < means script to be executed 5 times
Skip Count = 2 < skipped two turns times from last execution
Now the script runs 5 times on the following turns
3,6,9,12,15
just wild guessing of course
bebro wrote:
Also, is it possible to have a msg via script getting displayed at the start of turn 1, but *after* the deployment stage?
I think messages only work at start turn as they caused problems during AK beta when displayed middle turn or during AI turn
Re: Scripting under 1.10 - question
Posted: Mon Oct 01, 2012 12:58 pm
by Chris10
Chris10 wrote:bebro wrote:Most of the new options seem easy to figure out, but what do "run count" and "skip count" mean?
Is "run count" how often script X is executed during a scenario? Still, I dunno what "skip" is for...
I would assume the following:
Example
Trigger = Turn 3
Run Count = 5 < means script to be executed 5 times
Skip Count = 2 < skipped two turns times from last execution
Now the script runs 5 times on the following turns
3,6,9,12,15
just wild guessing of course
Trash what I said...
I just checked in depth
The run count is the times the script gets executed..the skip count starts ONE time from the moment the script is triggered...so its a one time action
Example
I set: give axis prestige 1000 on turn 2 ..Run count 2 and Skip count 2
Now on turn 2 the script is triggered but the skip count kick in and the script is ignored for 2 turns (turn 2 and 3)
It starts adding a 1000 at turn 4 and since the run count is 2 it will add a 1000 on turn 4 and turn 5...
The usefulness of this is quite debatable and personally I think there could have been a better implementation of script run times,skip times,repeatedly running scripts with ignoring times in between but hey...thats what we got

Re: Scripting under 1.10 - question
Posted: Mon Oct 01, 2012 4:44 pm
by bebro
Thx a bunch both of you, now it's more clear
Though I didn't get the msg to appear in turn one, but after deployment. In the end I just changed the text somewhat so that it says the unit will arrive at the beginning of the ops...
Re: Scripting under 1.10 - question
Posted: Sun Oct 14, 2012 4:51 pm
by bebro
A couple of more questions: does it help the AI when you set a zone in unit params for orders others than "move to"? I mean does the zone specified also work when the unit has set "disembark" or "attack", so that for example the unit will try to get to zone x with "attacker" role switched on?
Or do I have to use "move to" for getting them to a zone, then script it again to set it to attacker once it's there?
I tested a bit with disembark but wasn't that satisfied with the results, because the AI still traveled around back and forth before landing. Though might have been that my landing zone was too spread out, while nearby beach hexes were still occupied...probably need to test again...
Apart from this the new scripting options are cool, esp. in combi with giving messages out for major developments or changes during an scn

Re: Scripting under 1.10 - question
Posted: Mon Oct 15, 2012 6:50 pm
by Rudankort
AI zone is mandatory for the following 5 AI orders:
Move To. The unit will move to the nearest hex in AI zone, then next nearest and until the zone is exhausted. Then its behavior will reset to Default.
Random Move To. The unit will select random hex from AI zone and move there. Then its behavior will reset to Default.
Patrol. The unit will move to the nearest hex in AI zone, then next nearest etc. untis the zone is exhausted, then it will start from the first hex again etc. in a loop.
Random Patrol. On every turn the unit will choose a random hex from AI zone and move there.
Disembark. The unit will choose a random hex from AI zone and will move and then disembark there. Then its behavior will reset to Default. This behavior is similar to "Random Move To", only disembark action is added in the end.
All the other AI behaviors do not use AI zone setting.
Re: Scripting under 1.10 - question
Posted: Tue Oct 16, 2012 8:46 am
by bebro
Thank you for the clarification.
Re: Scripting under 1.10 - question
Posted: Sun Oct 28, 2012 5:11 pm
by bebro
Here's another question that came to me recently: if you change the objectives in the midst of a scenario, is there any way that those changes affect the PZLOC file so that you get the updated goals displayed between the turns?
Re: Scripting under 1.10 - question
Posted: Sun Oct 28, 2012 5:50 pm
by Rudankort
bebro wrote:Here's another question that came to me recently: if you change the objectives in the midst of a scenario, is there any way that those changes affect the PZLOC file so that you get the updated goals displayed between the turns?
No, at the moment there is no way to change objective description text "on the fly".
Re: Scripting under 1.10 - question
Posted: Sun Oct 28, 2012 5:56 pm
by bebro
I see, thanks. Well, people can always access older messages in the meantime to read about changes again...
Re: Scripting under 1.10 - question
Posted: Thu Mar 13, 2025 11:24 pm
by Elpatriarche
Chris10 wrote: ↑Mon Oct 01, 2012 12:58 pm
Chris10 wrote:bebro wrote:Most of the new options seem easy to figure out, but what do "run count" and "skip count" mean?
Is "run count" how often script X is executed during a scenario? Still, I dunno what "skip" is for...
I would assume the following:
Example
Trigger = Turn 3
Run Count = 5 < means script to be executed 5 times
Skip Count = 2 < skipped two turns times from last execution
Now the script runs 5 times on the following turns
3,6,9,12,15
just wild guessing of course
Trash what I said...
I just checked in depth
The run count is the times the script gets executed..the skip count starts ONE time from the moment the script is triggered...so its a one time action
Example
I set: give axis prestige 1000 on turn 2 ..Run count 2 and Skip count 2
Now on turn 2 the script is triggered but the skip count kick in and the script is ignored for 2 turns (turn 2 and 3)
It starts adding a 1000 at turn 4 and since the run count is 2 it will add a 1000 on turn 4 and turn 5...
The usefulness of this is quite debatable and personally I think there could have been a better implementation of script run times,skip times,repeatedly running scripts with ignoring times in between but hey...thats what we got
Thx a lot for the explanation!
