_POSITION

Please post here for questions and discussion about modding for Strategic Command.
Post Reply
rmelvin
Posts: 213
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

_POSITION

Post by rmelvin »

Does [<] check for no unit present :?:
131,119 [3,3] [2,2] [1] [<] = true if no axis units are present, and hex is Axis aligned.
Also, the unit count parameter [3,12] is this a random like below or are these fix count. :?:

Thanks :D

Re: Casablanca
Post by El_Condoro » Fri Feb 07, 2025 9:57 am

What I do when I want multiple AI scripts to fire at the same time is to use #LINK= x[1] in each one. The linked DE can be set to fire however you like and then the AI scripts will all fire at the same time as long as #BUILD_LENGTH and other conditions are met.

The difference between [0,3] and [3,3] is that the latter is consistent.
For example, in your
#CANCEL_POSITION= 131,119 [3,3] [2,2] [1]
the scipt will end when there are at least 2 Allied units within 3 hexes of 131,119.
If you have [0,3] the range becomes random each turn between 0 and 3 hexes. One turn it might be 131,119 itself (range = 0), another turn, within 2 hexes, and another within 3 hexes, as is desired. If you want the range to be consistent, which usual, make it [3,3]
El_Condoro
Posts: 599
Joined: Sat Aug 03, 2019 4:35 am

Re: _POSITION

Post by El_Condoro »

The devs will correct me if I am wrong, but my understanding is this:

131,119 [3,3] [2,2] [1] means there must be 2 or more Allied units within 3 hexes of 131,119 for the script to fire.

131,119 [3,3] [2,2] [1] < means there must be less than 2 units for the script to fire.

This is a great addition to the scripter's arsenal that was lacking before the update.
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
rmelvin
Posts: 213
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: _POSITION

Post by rmelvin »

I understand the less than sign and agree, Question is does the less than sign goes to zero units in the hex.
Also did not answer about the 131,119 [3,3] [2,12] [1] does this check for greater than 1 and less than 13.
I use this so a single stray unit or two does not trigger the script and greater 13 so script does not trigger.

""If you have [0,3] the range becomes random each turn between 0 and 3 hexes.""
is this the same situation with unit parameters.
El_Condoro
Posts: 599
Joined: Sat Aug 03, 2019 4:35 am

Re: _POSITION

Post by El_Condoro »

Yes, the < will include zero units.

The [2,12] is random, so if is a #TYPE= 2 script, it will fire if there are less units than the randomly generated number between 2 and 12 within the range (3) of the hex on a turn (other conditions being met). If the random number generated was 7 and 8 units were within the range, the script would fire because 8 is greater than 7. If the < sign was appended to the script, it would not fire because 8 is not less than 7, even though it is between 2 and 12.

That's my understanding and I would be very appreciative to learn if it is right!
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
User avatar
BillRunacre
Posts: 6547
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: _POSITION

Post by BillRunacre »

El_Condoro wrote: Sun Feb 09, 2025 11:21 am Yes, the < will include zero units.

The [2,12] is random, so if is a #TYPE= 2 script, it will fire if there are less units than the randomly generated number between 2 and 12 within the range (3) of the hex on a turn (other conditions being met). If the random number generated was 7 and 8 units were within the range, the script would fire because 8 is greater than 7. If the < sign was appended to the script, it would not fire because 8 is not less than 7, even though it is between 2 and 12.

That's my understanding and I would be very appreciative to learn if it is right!
The first is correct, but with the second point, it can be a TYPE= 1 script. These keep attempting to fire until their conditions are met, and then they will fire and be gone.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
rmelvin
Posts: 213
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: _POSITION

Post by rmelvin »

Ouch. so let me be clear please, but need to ask 131,119 [0,3] [2,12] [1]

TYPE=1 these are fix conditions parameters, correct?
TYPE=2 these are random conditions within the parameters, correct?

Three axis units are with two hexes of 131,119;
TYPE=1 TRIGGER= 100 will always fire.
TYPE=2 TRIGGER= 100 random change of firing.
Random pick [0,1] [4,5] will not fire.
Random pick [1,3] [2,6] will fire.

What here the parameters conditions for TYPE=0 and TYPE=3 fix or random.
User avatar
BillRunacre
Posts: 6547
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: _POSITION

Post by BillRunacre »

Hi

These are how the different TYPE= work, it's a bit different to your understanding.

#TYPE= Values range [0, 3];
; With all other fields satisfied will this be:
; 0 = Single check regardless if #TRIGGER is satisfied
; 1 = Multiple check until #TRIGGER is satisfied
; 2 = Reoccurring check until end of game
; OR
; Once the #DATE field is satisfied:
; 3 = Event fires once if all other fields are satisfied, else it will not fire. Either way, event will be removed never to be looked at again

So spell things out a bit differently,

1 = this will disappear once it has fired
2 = this can fire as many times as its conditions are met during the game
3 = this only fires if its conditions are met on a specific date

I hope that helps.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
rmelvin
Posts: 213
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: _POSITION

Post by rmelvin »

""Re: Casablanca
Post by El_Condoro » Fri Feb 07, 2025 9:57 am
The difference between [0,3] and [3,3] is that the latter is consistent.
For example,
#CANCEL_POSITION= 131,119 [3,3] [2,2] [1]
the script will end when there are at least 2 Allied units within 3 hexes of 131,119.""

My script was #CANCEL_POSITION= 131,119 [0,3] [2,2] [1]
If you have [0,3] the range becomes random each turn between 0 and 3 hexes. One turn it might be 131,119 itself (range = 0), another turn, within 2 hexes, and another within 3 hexes, as is desired. If you want the range to be consistent, which usual, make it [3,3]""
Here is my understanding about the hex and unit parameters for TYPE=2
_POSITION= 151,84 [0,3] [2,6] [1] (Paris)
I thought if between 2 to 6 axis units are inside of 3 hexes from Paris this is a true script. I thought [min,max] was a fix condition. From here to here condition (=>,<=).
""another turn, within 2 hexes"" so 3 axis units within 3 hexes of Paris but not 2 units within 2 hexes of Paris the script does not fire. is now my understanding:?
Your answer does state my understanding does hold true for the other three types, or is [x,>x] is always random. :?:
El_Condoro
Posts: 599
Joined: Sat Aug 03, 2019 4:35 am

Re: _POSITION

Post by El_Condoro »

I'm going to allow Bill to explain because I find if more than one person explains something, it gets confusing. The only thing I will say is that the TYPE is separate to any POSITION condition. Bill has explained about TYPE.
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
rmelvin
Posts: 213
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: _POSITION

Post by rmelvin »

Thank you I really appreciate the help.
So here lays my confusion. _POSITION= 151,84 [1,3] [2,6] [1] (Paris)
I thought this read as check for 2 to 6 units within 1 to 3 hexes from Paris.
But what I read below confused me. Random pick a distance number.
So, random pick 1 with 3 units 2 hexes from Paris will not fire.
But random pick 3 with 3 units 2 hexes from Paris will fire.
Same script, same condition but different outcome. I am confused :oops:
So how does one write 2 to 6 units within 1 to 3 hexes from Paris. :?:
Please help anyone. I appreciate all help. Someone away has something someone does not know.
User avatar
BillRunacre
Posts: 6547
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: _POSITION

Post by BillRunacre »

This does pick between 2 to 6 units within 1 to 3 hexes of Paris:

CONDITION_POSITION= 151,84 [1,3] [2,6] [1] (Paris)

But what that means is each turn, the engine will be looking for a variable amount - both in terms of hex range and unit numbers.

So if the engine is looking for say 4 units within 2 hexes, and there are 6 units but most are 3 hexes away, then the event won't fire that turn.

Essentially this randomness is meant to keep players guessing as to when an event will fire, so they cannot game the system to either trigger it, or avoid triggering it.

Hopefully that helps.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
rmelvin
Posts: 213
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: _POSITION

Post by rmelvin »

Thank you, thank you, thank you.
That explains a whole lot. I going to surmise a whole group of people been banging their head against the wall trying to figure out what is going on. :o
Good now I not facing major write, just a few tweets and then finish.
Could an explanation about the random activities be place in the template descriptions in the next upgrade. :idea:
Thank all of you for your support/ :D
rmelvin
Posts: 213
Joined: Wed Apr 06, 2022 1:41 am
Location: Tucson, Arizona

Re: _POSITION

Post by rmelvin »

Help with brain flog.

; German unit near Brussel
#ACTIVATE_POSITION= 155,80 [6,6] [9,9] [1]

Hex parameter 6,6 means anything between 0 to 6 hexes.
Unit parameters 9,9 means equal to or greater than 9 units within 0 to 6 hexes.
Unit parameters 9,12 means random number between 9 thru 12 equal to or greater than units within 0 to 6 hexes.
Unit parameters 9,9 < means less than 9 units within 0 to 6 hexes.

I am sure I am missing some understanding here. :oops:
User avatar
BillRunacre
Posts: 6547
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: _POSITION

Post by BillRunacre »

That all reads correctly to me. What's been the problem?
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
Post Reply

Return to “Scenario Design and Modding”