SOE:Various issues with AI\Diplomacy.txt

Post bug reports and ask for help with other issues here.
Post Reply
DarkHorse2
Posts: 1070
Joined: Fri Feb 04, 2022 12:08 pm

SOE:Various issues with AI\Diplomacy.txt

Post by DarkHorse2 »

BACKGROUND:
Diplomacy Plan identity is determined by #COUNTRY_ID and #DIPLOMATIC_ID. A country can only have a single plan based on this criteria and will be assigned the first valid plan regardless of duplicate script entries (even if the remaining control '#' values are different).

control '#' parameters where the first 'event' satisfied will be the fist plan assigned (for added variability).
Each Diplomacy event corresponds with a single diplomatic chit purchase by #COUNTRY_ID towards #DIPLOMATIC_ID. For mulitple diplomatic chit purchases you could choose an event #TYPE=2 or set up multiple events of either #TYPE=1 or #TYPE=0. In any event repetitive events will only be successful if the maximum applicable chit level has not been reached and there are sufficient funds for diplomatic purchase.

Note: Maximum chit levels as well as diplomatic costs can be adjusted via the Editor.
:?: :?: :?:

(not entirely sure how this all works, but here goes....)

So, given the previous, Diplomacy.txt maps out as:

[COUNTRY_ID, DIPLOMATIC_ID]

#112,#120
#112,#78
#112,#103
#112,#111
#112,#111
#112,#99

#115,#111
#115,#111
#115,#78
#115,#103
#115,#99
#115,#95
#115,#95
#115,#111
#115,#111

#45,#39
#45,#99
#45,#99
#45,#52
#45,#52 Germany Presses Hungary (1939 - FORCED)
#45,#93
#45,#93 Germany Presses Romania (1939 - FORCED)
#45,#118
#45,#4
#45,#110 Germany Presses Vichy Tunisia (1940 - FORCED)
#45,#111
#45,#103

#59,#99

note - UK(112), Yugoslavia(120), Norway(78), Sweden(103), Turkey(111), USA(115), USSR(116), Germany(45), Italy(59), Algeria(4), Tunisa(110), Vichy France(118), Saudi Arabia(95), Finland(39), Spain(99), Hungary(52), Romania(93)
I am not 100% certain, but the underlined events above look suspect to me....

Specifically:
#VARIABLE_CONDITION= 99 [2] [0] [0]

note - Spain(99), Hungary(52), Romania(93)

Should these not be:
#VARIABLE_CONDITION= 52 [2] [0] [0]
and
#VARIABLE_CONDITION= 93 [2] [0] [0]

accordingly?

Code: Select all

{
#NAME= Germany Presses Hungary (1939 - FORCED)
#POPUP=
#FLAG= 1
#TYPE= 2
#COUNTRY_ID= 45
#TRIGGER= 25
#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]
#SKIP_FUNDS_CHECK= 1
#DIPLOMATIC_ID= 52
#DATE= 1939/01/01
; Set friendly positions:
; 1st Line - Berlin
#FRIENDLY_POSITION= 173,74
; Set variable conditions:
; 1st Line - Germany politically aligned with Allies and not surrendered
; 2nd Line - Spain is leaning towards the Allies
#VARIABLE_CONDITION= 45 [1] [100] [0]
#VARIABLE_CONDITION= 99 [2] [0] [0]
; Set tactical conditions:
; 1st Line - Berlin not tactically threatened (dummy condition)
#TACTICAL_CONDITION= 173,74 [3]
; Set dummy activate position (no units at position 0,0)
#ACTIVATE_POSITION= 0,0 [0,0] [0,0] [0]
; Set dummy cancel position (single neutral unit at position 0,0). This is not possible as no
; unit can occupy tile 0,0 so event will not be cancelled due to #CONDITION_POSITION
#CANCEL_POSITION= 0,0 [0,0] [1,1] [0]
}

Code: Select all

{
#NAME= Germany Presses Romania (1939 - FORCED)
#POPUP=
#FLAG= 1
#TYPE= 2
#COUNTRY_ID= 45
#TRIGGER= 25
#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]
#SKIP_FUNDS_CHECK= 1
#DIPLOMATIC_ID= 93
#DATE= 1939/01/01
; Set friendly positions:
; 1st Line - Berlin
#FRIENDLY_POSITION= 173,74
; Set variable conditions:
; 1st Line - Germany politically aligned with Allies and not surrendered
; 2nd Line - Spain is leaning towards the Allies
#VARIABLE_CONDITION= 45 [1] [100] [0]
#VARIABLE_CONDITION= 99 [2] [0] [0]
; Set tactical conditions:
; 1st Line - Berlin not tactically threatened (dummy condition)
#TACTICAL_CONDITION= 173,74 [3]
; Set dummy activate position (no units at position 0,0)
#ACTIVATE_POSITION= 0,0 [0,0] [0,0] [0]
; Set dummy cancel position (single neutral unit at position 0,0). This is not possible as no
; unit can occupy tile 0,0 so event will not be cancelled due to #CONDITION_POSITION
#CANCEL_POSITION= 0,0 [0,0] [1,1] [0]
}
Regarding the following, you have these conditions:
1. Germany Axis, Mobilized
2. France Allied, Surrendered
3. Vichy France Axis, Mobilized
4. Algeria Axis, Mobilized

But no checks for Tunisia? (this doesn't seem correct)

Code: Select all

{
#NAME= Germany Presses Vichy Tunisia (1940 - FORCED)
#POPUP=
#FLAG= 1
#TYPE= 2
#COUNTRY_ID= 45
#TRIGGER= 25
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 7[1,25]
; Set link value to always trigger (dummy value)
#LINK= 0[0]
#SKIP_FUNDS_CHECK= 1
#DIPLOMATIC_ID= 110
#DATE= 1940/01/01
; Set friendly positions:
; 1st Line - Berlin
#FRIENDLY_POSITION= 173,74
; Set variable conditions:
; 1st Line - Germany politically aligned with Axis and not surrendered
; 2nd Line - France politically aligned with Allies and surrendered
; 3rd Line - Vichy France politically aligned with Axis and not surrendered
; 3rd Line - Vichy Algeria politically aligned with Axis and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
#VARIABLE_CONDITION= 40 [2] [100] [1]
#VARIABLE_CONDITION= 118 [1] [100] [0]
#VARIABLE_CONDITION= 4 [1] [100] [0]
; Set tactical conditions:
; 1st Line - Berlin not tactically threatened (dummy condition)
#TACTICAL_CONDITION= 173,74 [3]
; Set dummy activate position (no units at position 0,0)
#ACTIVATE_POSITION= 0,0 [0,0] [0,0] [0]
; Set dummy cancel position (single neutral unit at position 0,0). This is not possible as no
; unit can occupy tile 0,0 so event will not be cancelled due to #CONDITION_POSITION
#CANCEL_POSITION= 0,0 [0,0] [1,1] [0]
}
DarkHorse2
Posts: 1070
Joined: Fri Feb 04, 2022 12:08 pm

Re: SOE:Various issues with AI\Diplomacy.txt

Post by DarkHorse2 »

You also have multiple cases like the following:

Code: Select all

#TRIGGER= 25
#LEVEL= 0
#GV= 7[1,25]
Which results in a 25% chance of a 25% chance for the event to occur.
(6.25% chance)

This looks strange as well....
DarkHorse2
Posts: 1070
Joined: Fri Feb 04, 2022 12:08 pm

Re: SOE:Various issues with AI\Diplomacy.txt

Post by DarkHorse2 »

Should the following not be checking that Italy is Axis, Mobilized and not surrendered?

i.e.
#VARIABLE_CONDITION= 59 [1] [100] [0]

Only fully mobilized countries should be spending MPPs on diplomacy chits, right?

Code: Select all

{
#NAME= Italy Presses Spain (1940 - )
#POPUP=
#FLAG= 1
#TYPE= 2
#COUNTRY_ID= 59
#TRIGGER= 100
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 5[1,50]
; Set link value to always trigger (dummy value)
#LINK= 0[0]
#SKIP_FUNDS_CHECK= 0
#DIPLOMATIC_ID= 99
#DATE= 1940/09/01
; Set friendly positions:
; 1st Line - Berlin
#FRIENDLY_POSITION= 173,74
; Set variable conditions:
; 1st Line - Germany politically aligned with Allies and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
; Set tactical conditions:
; 1st Line - Berlin not tactically threatened (dummy condition)
#TACTICAL_CONDITION= 173,74 [3]
; Set dummy activate position (no units at position 0,0)
#ACTIVATE_POSITION= 0,0 [0,0] [0,0] [0]
; Set dummy cancel position (single neutral unit at position 0,0). This is not possible as no
; unit can occupy tile 0,0 so event will not be cancelled due to #CONDITION_POSITION
#CANCEL_POSITION= 0,0 [0,0] [1,1] [0]
}
User avatar
BillRunacre
Posts: 6948
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: SOE:Various issues with AI\Diplomacy.txt

Post by BillRunacre »

DarkHorse2 wrote: Thu Aug 01, 2024 6:10 pm Should the following not be checking that Italy is Axis, Mobilized and not surrendered?

i.e.
#VARIABLE_CONDITION= 59 [1] [100] [0]

Only fully mobilized countries should be spending MPPs on diplomacy chits, right?

Code: Select all

{
#NAME= Italy Presses Spain (1940 - )
#POPUP=
#FLAG= 1
#TYPE= 2
#COUNTRY_ID= 59
#TRIGGER= 100
#LEVEL= 0
; Set global variable condition to always trigger (dummy value)
#GV= 5[1,50]
; Set link value to always trigger (dummy value)
#LINK= 0[0]
#SKIP_FUNDS_CHECK= 0
#DIPLOMATIC_ID= 99
#DATE= 1940/09/01
; Set friendly positions:
; 1st Line - Berlin
#FRIENDLY_POSITION= 173,74
; Set variable conditions:
; 1st Line - Germany politically aligned with Allies and not surrendered
#VARIABLE_CONDITION= 45 [1] [100] [0]
; Set tactical conditions:
; 1st Line - Berlin not tactically threatened (dummy condition)
#TACTICAL_CONDITION= 173,74 [3]
; Set dummy activate position (no units at position 0,0)
#ACTIVATE_POSITION= 0,0 [0,0] [0,0] [0]
; Set dummy cancel position (single neutral unit at position 0,0). This is not possible as no
; unit can occupy tile 0,0 so event will not be cancelled due to #CONDITION_POSITION
#CANCEL_POSITION= 0,0 [0,0] [1,1] [0]
}
Only fully mobilized can, so a check for Italy's status isn't necessary.

However, someone's status has to be in there, and choosing someone who will be in the war (Germany is not likely to have surrendered by September 1940) is as valid as changing it to Italy. It doesn't really matter here with this script.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
User avatar
BillRunacre
Posts: 6948
Joined: Mon Jul 22, 2013 2:57 pm
Contact:

Re: SOE:Various issues with AI\Diplomacy.txt

Post by BillRunacre »

Likewise with Tunisia, if Tunisia either doesn't exist as a separate entity, has surrendered, or is fully mobilized, no diplomacy can be carried out against it, so the script will be ignored.
Follow us on Twitter: https://twitter.com/FurySoftware

We're also on Facebook! https://www.facebook.com/FurySoftware/
DarkHorse2
Posts: 1070
Joined: Fri Feb 04, 2022 12:08 pm

Re: SOE:Various issues with AI\Diplomacy.txt

Post by DarkHorse2 »

Ok, fair enough for the last event.
Post Reply

Return to “Tech Support”