• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unmerged(1142)

Sergeant
Feb 24, 2001
76
0
Visit site
I apologize if this is in the wrong forum, but I figured that the people with the most experience with event scripts would be found here. I don't have a real good grasp of the event script just yet, but I think I may have found a small bug. Just bare with me.

I am playing an isolationist USA, version 1.3b. In September, 1945 AI Germany forced the Bitter Peace with the Soviet Union, but only after I tweaked the event to make it fire. Anyway, after the Bitter Peace Germany just sat there. After several months I loaded up as Germany to see what it was doing. It was still moving troops to the Russian front and not preparing for an invasion of Great Britain like I was expecting.

I decided to look at the save game file and noticed the flag "GERInvadeEngland = 0". I looked closer at Germany's AI file. Event 20020 "Germany goes after England when Russia is gone" looks like it should have fired, but it apparently didn't. Here's the event:

event = {
id = 20020
random = no
country = GER

trigger = {
ai = yes
event = 20010
NOT = { war = { country = GER country = SOV } }
control = { province = 56 data = GER } # Paris
war = { country = GER country = ENG }
}

name = "AI_EVENT"
style = 0

date = { day = 1 month = january year = 1936 }
offset = 1
deathdate = { day = 29 month = december year = 1948 }

action_a = {
command = { type = local_setflag which = GERInvadeSpain }
}
}

The only trigger that would have prevented this event from firing is "event = 20010". Logically, I assume Event 20010 "German vs Russia war setup" never fired. I also notice that event 20010 sleeps event 20007 "Germany invades Russia", which sleeps event 20010. Events 20007 and 20010 both load the GER_Russia.ai file, and they cancel each other out.

Okay, follow my logic here. Germany did invade Russia in my game, so I figure that one of these two events must have fired. Since event 20020 did not fire, that means event 20007 fired and slept 20010. Which means that Germany won't invade Great Britain under these circumstances.

I changed event 20020's trigger to:

trigger = {
ai = yes
OR = {event = 20010 event = 20007}
NOT = { war = { country = GER country = SOV } }
control = { province = 56 data = GER } # Paris
war = { country = GER country = ENG }
}

I loaded up the game and let it run for a few days then checked the save game. Sure enough the flag was changed to "GERInvadeEngland = 1". I'm happy to report that Germany is massing its troops on the French coast.

However, I don't fully understand what the event chains are trying to achieve and why those two events cancel each other out, so someone please point out if I broke something that was working as intended.

Thanks for reading this far. :)
 
Last edited:

unmerged(43424)

First Lieutenant
Apr 22, 2005
206
0
I might be wrong as the event chain is quite complicated.

I think one the event is for starting Russian War AI in a very precise condition, the other event being a more generic one, whether USSR goes at war with Germany.

In any case, it seems like your correction is the right one, Lothos is the only one who can tell about it, being the writer of those events
 

AzJeff

Captain
27 Badges
Dec 16, 2002
487
0
  • Victoria 2: A House Divided
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Steel Division: Normandy 44 -  Back to Hell
  • Surviving Mars: Digital Deluxe Edition
  • Steel Division: Normand 44 - Second Wave
  • Surviving Mars
  • Steel Division: Normandy 44
  • Hearts of Iron IV: Cadet
  • Rise of Prussia
  • Cities: Skylines
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Arsenal of Democracy
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • Iron Cross
  • Europa Universalis III Complete
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Deus Vult
  • Darkest Hour
wrong flag or event?

Um, well according to what you've written, that event sets a flag "GerInvadeSpain" - NOT "GerInvadeEngland".

- j
 

unmerged(1142)

Sergeant
Feb 24, 2001
76
0
Visit site
fabmp said:
I might be wrong as the event chain is quite complicated.

I think one the event is for starting Russian War AI in a very precise condition, the other event being a more generic one, whether USSR goes at war with Germany.

In any case, it seems like your correction is the right one, Lothos is the only one who can tell about it, being the writer of those events

Thanks. I had a feeling that's what the differences were in the event chain, but I wasn't sure.
 

unmerged(1142)

Sergeant
Feb 24, 2001
76
0
Visit site
jrb001 said:
Um, well according to what you've written, that event sets a flag "GerInvadeSpain" - NOT "GerInvadeEngland".

- j

I know. It's for the next event in the chain called "Spain invasion setup and Sea Lion". Under certain circumstances the German AI will invade Spain before invading Great Britain. If those conditions are not met the flag GerInvadeEngand is set, and the GerInvadeSpain flag is removed.

At least I think that's what's happening. All those ANDs, ORs, and NOTs hurt my brain after a while. :rofl:
 

AzJeff

Captain
27 Badges
Dec 16, 2002
487
0
  • Victoria 2: A House Divided
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Steel Division: Normandy 44 -  Back to Hell
  • Surviving Mars: Digital Deluxe Edition
  • Steel Division: Normand 44 - Second Wave
  • Surviving Mars
  • Steel Division: Normandy 44
  • Hearts of Iron IV: Cadet
  • Rise of Prussia
  • Cities: Skylines
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Arsenal of Democracy
  • Victoria 2
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • Iron Cross
  • Europa Universalis III Complete
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Deus Vult
  • Darkest Hour
Hmm...
I've looked at the events at it seems to me that what you did was OK.
Event 20007 appears to facilitate a war between German AI and Soviet AI (if a BUNCH of other conditions have been met).
Event 20010 - I think - will take care of any instances where a player-controlled USSR DOWs an AI Germany before a German DOW on USSR (or any war between them that did not get triggered by 20007).

Both have the same effect - that of switching the German AI.
So, 20020 should have that OR statement that you put in there.

Good catch! :cool:

- j
 

unmerged(1142)

Sergeant
Feb 24, 2001
76
0
Visit site
jrb001 said:
Hmm...
I've looked at the events at it seems to me that what you did was OK.
Event 20007 appears to facilitate a war between German AI and Soviet AI (if a BUNCH of other conditions have been met).
Event 20010 - I think - will take care of any instances where a player-controlled USSR DOWs an AI Germany before a German DOW on USSR (or any war between them that did not get triggered by 20007).

Both have the same effect - that of switching the German AI.
So, 20020 should have that OR statement that you put in there.

Good catch! :cool:

- j

Thanks. I only caught it because I really wanted the German AI to invade the British Isles. I was roleplaying that as the U.S. I would only intervene in the war if that happened. In the end, the invasion never happened but it was pretty cool to see the AI building lots of transports and patrolling the English Channel with U-boats in preparation for a landing. I love these AI-switching events - when they work properly :D .