Why did you guys do these Mobilization 2 scripts this way?

Post bug reports and ask for help with other issues here.
Post Reply
User avatar
Elessar2
Posts: 1440
Joined: Wed Nov 30, 2016 12:35 am

Why did you guys do these Mobilization 2 scripts this way?

Post by Elessar2 »

Hope I can catch one of you before the weekend. From the vanilla scripts:

;
; This Event will apply if the triggers for the Event beneath it aren't met
{
#NAME= 2 Axis Units Near Warsaw From January 1940 (USSR->Allies)
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#GV= 1[1,100]
#LINK= 0[0]
#LEVEL= 0
#COUNTRY_ID= 116
#TRIGGER= 100
#DATE= 1940/01/01
; 2-2% mobilization increase towards Allies
#MOBILIZATION= [2,2] [2]
; Set variable conditions:
; 1st Line - Germany politically aligned with Axis and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
; 2nd Line - Poland politically aligned with Allies and surrendered
#VARIABLE_CONDITION= 85 [2] [100] [1]
; Dummy condition position (always satisfied)
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}

;
; This event is to counteract the one above
{
#NAME= 2 Axis Units Near Warsaw From January 1940 (USSR->Axis)
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#GV= 1[1,100]
#LINK= 0[0]
#LEVEL= 0
#COUNTRY_ID= 116
#TRIGGER= 100
#DATE= 1940/01/01
; 2% mobilization increase towards Axis
#MOBILIZATION= [2,2] [1]
; Set variable conditions:
; 1st Line - Germany politically aligned with Axis and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
; 2nd Line - Poland politically aligned with Allies and surrendered
#VARIABLE_CONDITION= 85 [2] [100] [1]
; 2 Axis units are within 10 hexes of Warsaw
#CONDITION_POSITION= 188,76 [10,10] [2,2] [1] [0]
}

Why is the 1st script even needed? Just make one script for +2% towards the Allies by

; 2-2% mobilization increase towards Allies
#MOBILIZATION= [2,2] [2]

[old fashioned way]

#CONDITION_POSITION= 188,76 [10,10] [0,1] [1] [0]

[new fashioned way]

#CONDITION_POSITION= 188,76 [10,10] [2,2] [1] [0] [<]

The reason I ask is because welp if I try it either of the two latter ways (without the dummy script), they don't work. This is for the Russians note, where I have required them to have their own garrisons along the border, avoiding the autospawns upon the DoW (tho for now I am autospawning their planes in a separate set of Unit scripts):

{
#NAME= Fewer than 4 Russian Units Near Warsaw From January 1940 (USSR->Axis)
#POPUP=
#IMAGE=
#SOUND= report.ogg
#FLAG= 1
#TYPE= 2
#AI= 0
#GV= 1[1,100]
#LINK= 0[0]
#LEVEL= 0
#COUNTRY_ID= 116
#TRIGGER= 100
#DATE= 1940/01/01
; 2-4% mobilization increase towards Axis
#MOBILIZATION= [2,4] [1]
; Set variable conditions:
; 1st Line - Germany politically aligned with Axis and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
; 2nd Line - Poland politically aligned with Allies and surrendered
#VARIABLE_CONDITION= 85 [2] [100] [1]
; 3rd Line - France politically aligned with Allies and surrendered
#VARIABLE_CONDITION= 40 [2] [100] [1]
; Fewer than 4 Russian units within 7 hexes of Warsaw
#CONDITION_POSITION= 188,76 [7,7] [0,3] [2] [0]

***OR***

#CONDITION_POSITION= 188,76 [7,7] [4,4] [2] [0] [<]
}

[Corresponding Popup scripts for the on-map symbol warnings]

{
#NAME= Soviet Front Garrison Report Warsaw 1940-1942 Yes to Pact
#POPUP=
#MESSAGE= <<TAG_191>>
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 1[1,100]
; Set link value to always trigger (dummy value)
#LINK= 0[0]
#COUNTRY_ID= 116
#TRIGGER= 100
#PRIVATE= 1
#DISPLAY_ORDER= 1
#DISPLAY_TURN= 2
#DISPLAY_STYLE= 2.13
#MESSAGE_STYLE= 0
#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0
#MAP_POSITION= 192,71
#MAP_POSITION= 195,72
#MAP_POSITION= 195,79
#DATE= 1940/01/01
; Berlin is in Axis hands
#ALIGNMENT_POSITION= 173,74 [1]
#VARIABLE_CONDITION= 116 [2] [0] [0]
#VARIABLE_CONDITION= 45 [1] [100] [0]
#VARIABLE_CONDITION= 40 [2] [100] [1]
; Dummy Condition Position
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}

{
#NAME= Soviet Front Garrison Report Warsaw 1940-1942 Yes to Pact
#POPUP=
#MESSAGE= <<TAG_191>>
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 1[1,100]
; Set link value to always trigger (dummy value)
#LINK= 0[0]
#COUNTRY_ID= 116
#TRIGGER= 100
#PRIVATE= 1
#DISPLAY_ORDER= 1
#DISPLAY_TURN= 2
#DISPLAY_STYLE= 2.12
#MESSAGE_STYLE= 0
#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0
#MAP_POSITION= 192,71
#MAP_POSITION= 195,72
#MAP_POSITION= 195,79
#DATE= 1940/01/01
; Berlin is in Axis hands
#ALIGNMENT_POSITION= 173,74 [1]
#VARIABLE_CONDITION= 116 [2] [0] [0]
#VARIABLE_CONDITION= 45 [1] [100] [0]
#VARIABLE_CONDITION= 40 [2] [100] [1]
; Fewer than 4 Russian units within 7 hexes of Warsaw
#CONDITION_POSITION= 188,76 [7,7] [4,4] [2] [0] [<]
}

So, I move at least one unit out of a given zone, the symbols dutifully and instantly flip to the warning ones, click end turn-and Russian mobilization stubbornly remains @ 28%. 2 of them depend on DEs note (Baltic States and Bessarabia), but the other two (one of which is the one above) do not.

What am I missing?
User avatar
BillRunacre
Posts: 6512
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why did you guys do these Mobilization 2 scripts this way?

Post by BillRunacre »

The original pairs of scripts were written maybe a decade ago, whereas the script functionality has improved since then, but as the originals work, and updating/removing them requires more work, they remain in place. It may mean the game has more scripts than are now necessary, but there is no reason to amend them.

So there may be better/simpler ways of doing this than those now, particularly as you can now add extra fields at the end of the condition position that weren't possible before.

That said, as you are having difficulties perhaps it is best to follow the old method - as we know it works!
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
User avatar
Elessar2
Posts: 1440
Joined: Wed Nov 30, 2016 12:35 am

Re: Why did you guys do these Mobilization 2 scripts this way?

Post by Elessar2 »

I guess I can try the old-fashioned way. Any idea why the 2 newer alternatives aren't working at all? Yes, France and Poland are surrendered, and I was testing these on your (vanilla) map. Maybe a country's own Mobilization cannot be changed by the positions of its own units?
User avatar
BillRunacre
Posts: 6512
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: Why did you guys do these Mobilization 2 scripts this way?

Post by BillRunacre »

I think you are almost correct there - in the sense that I doubt a neutral country's units can trigger scripts.
Follow us on Twitter: https://twitter.com/FurySoftware

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

Return to “Tech Support”