#LINK=

Please post here for questions and discussion about modding for Strategic Command.
Post Reply
User avatar
Gilber
Posts: 253
Joined: Wed Jun 13, 2018 10:16 am
Location: Luxembourg

#LINK=

Post by Gilber »

HI,

I can't understand how the #LINK= parameter works in a Script Decision.
To test it I made 4 elementary scripts.
In the first script the Decision events 901 takes the value 1
This script is followed by 3 Decision events 902 scripts, each with different trigger conditions #LINK= 901[0], #LINK= 901[1], #LINK= 0[0].
But only the script #LINK= 0[0] is triggered.

Someone understands how the #LINK= parameter works ?

here is the code :

{
#NAME= Décision AI 901[1]
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=

#FLAG= 1

#TYPE= 2
; 2 = Sera tenté à chaque tour

#AI= 2
#LEVEL= 0

#COUNTRY_ID= 45

#TRIGGER= 100

#DISPLAY_ORDER= 1
#GV= 1[1,100]

#LINK= 0[0]
; 0[0] = Script toujours Activé

#DECISION= 901

#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=


#AI_RESPONSE= 100
; % de réponse favorable

#AI_RESPONSE_POPUP= LINK= 0[0] -----> 901[1] = True


#DATE= 1939/09/01


#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0

#ALIGNMENT_POSITION= 147,77 [2]
; 147,77 = Londres

#NATIONAL_MORALE_TRIGGER= 0 [0]

#VARIABLE_CONDITION= 112 [2] [100] [0]

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
; Script Toujours Activé
}






{
#NAME= Décision AI 902[1] +
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=

#FLAG= 1

#TYPE= 2
; 2 = Sera tenté à chaque tour

#AI= 2
#LEVEL= 0

#COUNTRY_ID= 45

#TRIGGER= 100

#DISPLAY_ORDER= 1
#GV= 1[1,100]

#LINK= 901[1]


#DECISION= 902

#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=


#AI_RESPONSE= 100
; % de réponse favorable

#AI_RESPONSE_POPUP= LINK= 901[1] -----> 902[1] = True


#DATE= 1939/09/01


#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0

#ALIGNMENT_POSITION= 147,77 [2]
; 147,77 = Londres

#NATIONAL_MORALE_TRIGGER= 0 [0]

#VARIABLE_CONDITION= 112 [2] [100] [0]

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
; Script Toujours Activé
}






{
#NAME= Décision AI 902[1] ++
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=

#FLAG= 1

#TYPE= 2
; 2 = Sera tenté à chaque tour

#AI= 2
#LEVEL= 0

#COUNTRY_ID= 45

#TRIGGER= 100

#DISPLAY_ORDER= 1

#GV= 1[1,100]

#LINK= 901[0]


#DECISION= 902

#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=


#AI_RESPONSE= 100
; % de réponse favorable

#AI_RESPONSE_POPUP= LINK= 901[0] -----> 902[1] = True


#DATE= 1939/09/01


#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0

#ALIGNMENT_POSITION= 147,77 [2]
; 147,77 = Londres

#NATIONAL_MORALE_TRIGGER= 0 [0]

#VARIABLE_CONDITION= 112 [2] [100] [0]

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
; Script Toujours Activé
}






{
#NAME= Décision AI 902[1] +++
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=

#FLAG= 1

#TYPE= 2
; 2 = Sera tenté à chaque tour

#AI= 2
#LEVEL= 0

#COUNTRY_ID= 45

#TRIGGER= 100

#DISPLAY_ORDER= 1
#GV= 1[1,100]

#LINK= 0[0]


#DECISION= 902

#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=


#AI_RESPONSE= 100
; % de réponse favorable

#AI_RESPONSE_POPUP= LINK= 0[0] -----> 902[1] = True


#DATE= 1939/09/01


#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0

#ALIGNMENT_POSITION= 147,77 [2]
; 147,77 = Londres

#NATIONAL_MORALE_TRIGGER= 0 [0]

#VARIABLE_CONDITION= 112 [2] [100] [0]

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
; Script Toujours Activé
}



Image
Attachments
LINK.jpg
LINK.jpg (1005.38 KiB) Viewed 364 times
Gilles
User avatar
Gilber
Posts: 253
Joined: Wed Jun 13, 2018 10:16 am
Location: Luxembourg

RE: #LINK=

Post by Gilber »

The Previous image wasn't the good one
this one is correct

Image
Attachments
LINK.jpg
LINK.jpg (1.01 MiB) Viewed 362 times
Gilles
El Condoro
Posts: 208
Joined: Wed Apr 02, 2008 12:44 pm

RE: #LINK=

Post by El Condoro »

It is one of the conditions that needs to be met for a script to fire, along with any others set.

So if Decision 901 is the decision script:

If DE 902 has #LINK= 901[1] then the response to DE 901 has to be YES for it to fire.
If it has #LINK= 901[0] then the response has to be NO for DE 902 to fire, if all other conditions are met.

Is that what you mean?
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
User avatar
Gilber
Posts: 253
Joined: Wed Jun 13, 2018 10:16 am
Location: Luxembourg

RE: #LINK=

Post by Gilber »

HI,

yes you are right.

All options except the #LINK= parameter are dummy conditions.
The first script sets decision 901 to 1 (true)
As confirmed by the message LINK= 0[0] -----> 901[1] = True
From the line #AI_RESPONSE_POPUP= LINK= 0[0] -----> 901[1] = True
But if in the following script we test the value 901 by the line #LINK= 901[1] (the other conditions are dummy conditions) The script does not trigger.
It also does not trigger with condition #LINK= 901[0] (the other conditions are dummy conditions)
So with dummy conditions we have a script that does not trigger with #LINK= 901[0] or #LINK= 901[1].

I don't see how to explain this result.

Gilles
Gilles
El Condoro
Posts: 208
Joined: Wed Apr 02, 2008 12:44 pm

RE: #LINK=

Post by El Condoro »

You have #COUNTRY_ID= 45 (Axis, Germany) and #AI= 2 (AI games and only on Allied turn). I suspect it might work on #AI= 1 (AI games on Axis turn) but I haven't checked it.
ORB & CROWN Fantasy Warfare Mod for Strategic Command
Download for War in Europe or World at War - YouTube - Discord
User avatar
Gilber
Posts: 253
Joined: Wed Jun 13, 2018 10:16 am
Location: Luxembourg

RE: #LINK=

Post by Gilber »

Hello El Condor,

there are two scripts that work with #AI= 2 and #COUNTRY_ID= 45 so I don't think the problem comes from those conditions.

Gilles
Gilles
Post Reply

Return to “Scenario Design and Modding”