Page 1 of 1

Event Chaing not firing (BillRunacre aslo looked at it)

Posted: Fri Sep 22, 2023 3:28 pm
by Lothos
BillRunacre suggested I post this in here since he was able to see what I see

The Decision.txt chain to Supply.txt works perfectly in single player game with AI=4. The goal is for all the cities in North Africa to take damage if the Allies have both Malta and Gibraltar.

When playing Multiplayer Games the chain is NOT firing.

BillRunacre was able to duplicate the issue and he tracked it down to the decision.txt event with a TYPE=2. For some reason have type=2 is not allowing the chain of events to fire in Multiplayer games. NOTE: It works just fine in single player.

Here is the event from the decision.txt file

{
#NAME= DE 846 - DE 711[1] - UK - Controls - (Malta, Gibraltar)
#POPUP=
#MESSAGE=
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 0
#LEVEL= 0
#GV= 1[1,100]
#LINK= 711[1]
#COUNTRY_ID= 112
#TRIGGER= 100
#DISPLAY_ORDER= 0
#DECISION= 846
#MPP_UPDOWN= 0
#MPP_TURNS= 0
#MPP_TEXT=
#NOTES=
#NOTES_POSITION=
#AI_RESPONSE= 100
#AI_RESPONSE_POPUP=
#DATE= 1939/09/01
#TEXT_RGB= 0,0,0
#SHADOW_RGB= 0,0,0
; - Gibraltar - Malta - Allied Controlled
#ALIGNMENT_POSITION= 136,114 [2]
#ALIGNMENT_POSITION= 175,114 [2]
#NATIONAL_MORALE_TRIGGER= 0 [0]
; - UK - Allies - War - Not Surrender
#VARIABLE_CONDITION= 112 [2] [100] [0]
#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]
}


Here is the event from the supply.txt file

{
#NAME= DE 846[1] Malta Effect - North Africa Supply issues
#POPUP= <<TAG_supply_33>>
#IMAGE=
#SOUND=
#FLAG= 1
#TYPE= 2
#AI= 4
#LEVEL= 0
#GV= 1[1,100]
#LINK= 846[1]
#COUNTRY_ID= 112
#ALIGNMENT_ID= 0
#FLAG_ID= 112
#TRIGGER= 15
#SEASON_FLAG= 0
#DATE= 1939/09/01
#SOURCE_POSITION= 175,114 [-1]
; - Set to 3, by the time it gets back to Axis Turn its a 2
#DESTINATION_RESOURCE= 172,121 [3,3]
#DESTINATION_RESOURCE= 172,120 [3,3]
#DESTINATION_RESOURCE= 179,124 [3,3]
#DESTINATION_RESOURCE= 184,126 [3,3]
#DESTINATION_RESOURCE= 185,122 [3,3]
#DESTINATION_RESOURCE= 186,122 [3,3]
#DESTINATION_RESOURCE= 188,124 [3,3]
#DESTINATION_RESOURCE= 190,122 [3,3]
#DESTINATION_RESOURCE= 191,120 [3,3]
#DESTINATION_RESOURCE= 192,122 [3,3]
#DESTINATION_RESOURCE= 194,122 [3,3]
#DESTINATION_RESOURCE= 195,121 [3,3]
#DESTINATION_RESOURCE= 196,123 [4,4]
#DESTINATION_RESOURCE= 198,123 [4,4]
#DESTINATION_RESOURCE= 200,124 [4,4]
#DESTINATION_RESOURCE= 204,125 [4,4]
#DESTINATION_RESOURCE= 205,123 [3,3]
#DESTINATION_RESOURCE= 206,123 [3,3]
#DESTINATION_RESOURCE= 206,124 [3,3]
#DESTINATION_RESOURCE= 208,123 [3,3]
#DESTINATION_RESOURCE= 209,122 [3,3]
#DESTINATION_RESOURCE= 209,123 [3,3]
#DESTINATION_RESOURCE= 210,123 [3,3]
; - UK - Allies - War - Not Surrendered
#VARIABLE_CONDITION= 112 [2] [100] [0]
; - Egypt - Allies - War - Not Surrendered
#VARIABLE_CONDITION= 36 [2] [100] [0]
}

Re: Event Chaing not firing (BillRunacre aslo looked at it)

Posted: Tue Sep 26, 2023 4:17 pm
by Hubert Cater
Hi Lothos,

I think you just need to change the #AI= value to 0, from 4, in your SUPPLY event and that should solve the issue for you.

e.g. the DE fires on the Allied turn, and subsequently the supply event related to that DE will fire right after that.

with the #AI= 4 value set in the SUPPLY event, it fires on the Allied turn when the AI is Allied, but in a multiplayer game it wants to fire on the Axis turn, because that is what the setting is set to with it being equal to 4. So it won't fire on the Allied multiplayer turn, and then there is no association with the previous DE by the time the Axis turn rolls around because the DE is set to #TYPE=2, e.g. it will only be associated on the Allied turn when the DE fires.

So best to just remove the #AI= 4 and change it to #AI= 0.

Then it will fire whenever the conditions are satisfied, and they are only satisfied on the Allied turn after the DE runs, and this will be for both single player and multiplayer games.

Hopefully this makes sense,
Hubert

Re: Event Chaing not firing (BillRunacre aslo looked at it)

Posted: Tue Sep 26, 2023 5:08 pm
by Lothos
Hubert Cater wrote: Tue Sep 26, 2023 4:17 pm Hi Lothos,

I think you just need to change the #AI= value to 0, from 4, in your SUPPLY event and that should solve the issue for you.

e.g. the DE fires on the Allied turn, and subsequently the supply event related to that DE will fire right after that.

with the #AI= 4 value set in the SUPPLY event, it fires on the Allied turn when the AI is Allied, but in a multiplayer game it wants to fire on the Axis turn, because that is what the setting is set to with it being equal to 4. So it won't fire on the Allied multiplayer turn, and then there is no association with the previous DE by the time the Axis turn rolls around because the DE is set to #TYPE=2, e.g. it will only be associated on the Allied turn when the DE fires.

So best to just remove the #AI= 4 and change it to #AI= 0.

Then it will fire whenever the conditions are satisfied, and they are only satisfied on the Allied turn after the DE runs, and this will be for both single player and multiplayer games.

Hopefully this makes sense,
Hubert
Thanks Hubert

But the issue is I need AI=4 as the event should only fire in multiplayer games and when the AI is Allied controlled. If I set it to 0 then an Allied AI would have the event fire for it.

Re: Event Chaing not firing (BillRunacre aslo looked at it)

Posted: Tue Sep 26, 2023 7:43 pm
by Hubert Cater
Thanks Lothos, we are thinking/discussing on our end to see if there might be a solution here for you.

Re: Event Chaing not firing (BillRunacre aslo looked at it)

Posted: Tue Sep 26, 2023 8:07 pm
by Lothos
Hubert Cater wrote: Tue Sep 26, 2023 7:43 pm Thanks Lothos, we are thinking/discussing on our end to see if there might be a solution here for you.
Hubert would it make sense to provide new options above 4 with the AI but simplify its checks something like

5 - Axis is AI controlled or Multiplayer
6 - Allies is AI controlled or Multiplayer
7 - Multiplayer Only
8 - Axis AI controlled but NOT Multiplayer
9 - Allies AI controlled but NOT Multiplayer

I think some of these are sorta covered by the 1 -4 options already available, but it seems like there is some serious code behind it instead of a simple game type and who is controlled by the AI check.

Re: Event Chaing not firing (BillRunacre aslo looked at it)

Posted: Tue Sep 26, 2023 11:52 pm
by Hubert Cater
Good ideas, we'll think of something and these are good suggestions, not likely for this game unfortunately, but something to make it more robust in the future for sure.