What's wrong with this string of scripts? (Full Version)

All Forums >> [New Releases from Matrix Games] >> Strategic Command Series >> Strategic Command WWII War in Europe >> Scenario Design and Modding



Message


Kossatx -> What's wrong with this string of scripts? (12/22/2018 1:09:23 PM)

Hi, I've made this string of two scripts. The first one (#DECISION= 106) works perfectly, but the second one (#DECISION= 107) don't. I have done a lot of testings, but I can't find any error [&:] The coordinates are ok, and the #TRIGGER value is changed to 100% for testings. Anyone has suggestions about?

quote:


;Once Germany is without oil reserves (105) starts oil shortage.
{
#NAME= DE 106 1/2 - Germany oil shortage (Trigger 30%) 1/2
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 105[1]
#COUNTRY_ID= 45
#TRIGGER= 100
#DISPLAY_ORDER= 0
#DECISION= 106
#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=
#AI_RESPONSE= 100
#AI_RESPONSE_POPUP=
#DATE= 1939/09/02
#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0
#ALIGNMENT_POSITION= 141,28 [1]
#ALIGNMENT_POSITION= 1,24 [2]
#ALIGNMENT_POSITION= 191,44 [2]
#NATIONAL_MORALE_TRIGGER= 0 [0]
#VARIABLE_CONDITION= 45 [1] [100] [0]
#CONDITION_POSITION= 185,51 [0,0] [0,0] [2] [0]
#CONDITION_POSITION= 185,51 [0,0] [0,0] [0] [0]
}

;Once Germany is without oil reserves (105) starts oil shortage.
{
#NAME= DE 106 2/2 - Germany oil shortage (100%) 2/2
#POPUP=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 106[1]
#COUNTRY_ID= 45
#TRIGGER= 100
#DISPLAY_ORDER= 0
#DECISION= 107
#MPP_UPDOWN= -90
#MPP_TURNS= 1
#MPP_TEXT= Oil shortage
#NOTES=
#NOTES_POSITION=
#AI_RESPONSE= 100
#AI_RESPONSE_POPUP=
#DATE= 1939/09/02
#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0
#ALIGNMENT_POSITION= 141,28 [1]
#ALIGNMENT_POSITION= 1,24 [2]
#ALIGNMENT_POSITION= 191,44 [2]
#NATIONAL_MORALE_TRIGGER= 0 [0]
#VARIABLE_CONDITION= 45 [1] [100] [0]
#CONDITION_POSITION= 191,58 [0,0] [0,0] [2] [0]
#CONDITION_POSITION= 191,58 [0,0] [0,0] [0] [0]
}




BillRunacre -> RE: What's wrong with this string of scripts? (12/22/2018 6:27:20 PM)

Hi Kossatx

The #CONDITION_POSITION= in the second script are different to those in the first one.

Does DE 106 work if it has the same #CONDITION_POSITION= as DE 105?

If so then it must be that.




Kossatx -> RE: What's wrong with this string of scripts? (12/22/2018 6:50:12 PM)

Thanks BillRunacre, but the decision 107 even don't work with a dummy "#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]". The #CONDITION_POSITION are different between 106 and 107 because (if I'm not wrong) is not possible to include the four condition position in the same script and obtain the effect I want. If are all together, if one coordinate is true the other three don't have to be. I want at least one option of each pair to be true.




Kossatx -> RE: What's wrong with this string of scripts? (1/23/2019 6:33:44 PM)

I can't solve this string of two scripts [&:] While the first one (#DECISION= 106) triggers ok, the second one (#DECISION= 107) never triggers even though "#CONDITION_POSITION= 191,58 [0,0] [0,0] [2] [0]" or "#CONDITION_POSITION= 191,58 [0,0] [0,0] [0] [0]" are true. Anyone has any idea about this?




BillRunacre -> RE: What's wrong with this string of scripts? (1/24/2019 2:24:27 PM)

If you remove DE 107's link to DE 106, does it then fire?




Kossatx -> RE: What's wrong with this string of scripts? (1/24/2019 4:10:29 PM)

Yes, it works if there is no "DE 106" link, but then the string sequence disappears [:(] I don't understand why the "DE 106" link breaks the string [&:]




Kossatx -> RE: What's wrong with this string of scripts? (1/26/2019 1:11:42 PM)

I've found why "DE 107" didn't fire. If I change "#TYPE= 2" to "#TYPE= 1" in "DE 106", then "DE 107" fires. I guess there is any incompatibility with "#TYPE= 2" events when included in a string of scripts. If what I say is ok, then I'm not sure if is possible to mod the "Oil shortage" event as I want. How can I write is necessary to fire an event these two conditions must be true every turn?

Condition A. One of these options must be true:
#CONDITION_POSITION= 185,51 [0,0] [0,0] [2] [0]
#CONDITION_POSITION= 185,51 [0,0] [0,0] [0] [0]

Condition B. And one of these two options must also be true:
#CONDITION_POSITION= 191,58 [0,0] [0,0] [2] [0]
#CONDITION_POSITION= 191,58 [0,0] [0,0] [0] [0]




BillRunacre -> RE: What's wrong with this string of scripts? (1/26/2019 1:37:30 PM)

Hi Kossatx

What is the relevance of there being no Allied units at these locations?

Could this be done instead by adding them to the #ALIGNMENT_POSITION= as being in Axis hands?




Kossatx -> RE: What's wrong with this string of scripts? (1/26/2019 2:35:38 PM)

I don't know how to fire the event saying "if positions A and B aren't in Axis hands", so I've used the "CONDITION_POSITION" command to say "if positions A and B are in neutral or allied hands". If I'm not wrong, only one of the "CONDITION_POSITION" commands included in an script must be true to fire, that's the reason I divided them in two pairs:

For DE 106:
#CONDITION_POSITION= 185,51 [0,0] [0,0] [2] [0]
#CONDITION_POSITION= 185,51 [0,0] [0,0] [0] [0]

For DE 107:
#CONDITION_POSITION= 191,58 [0,0] [0,0] [2] [0]
#CONDITION_POSITION= 191,58 [0,0] [0,0] [0] [0]

Maybe there is a better way to do it, but I don't know [&:]




BillRunacre -> RE: What's wrong with this string of scripts? (1/28/2019 2:40:33 PM)

If you add more #ALIGNMENT_POSITION= to the first Decision then you can do that, as there can be more than one of those in the script.

Then you won't need the second Decision, at least that's what I'm thinking from looking at this.




Kossatx -> RE: What's wrong with this string of scripts? (1/28/2019 7:20:11 PM)

But if I write more than one "ALIGNMENT_POSITION" they will be read with AND logic, so if I write this it has no sense... not? Is not possible a place to be occupied by Allies and neutrals [&:]

#ALIGNMENT_POSITION= 191,58 [2]
#ALIGNMENT_POSITION= 191,58 [0]




BillRunacre -> RE: What's wrong with this string of scripts? (1/30/2019 2:08:47 PM)

If the neutral is pro-Allied then it should still work with a setting of 2

It may be that you could use two different scripts, one for when place X is Allied but Y is Axis, another for when both are Allied, etc.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.453125