Where is the code in HOI4 that defines how an AI decides on events (e.g. "Split Czechoslovakia")?

Where is the code in HOI4 that defines how an AI decides on events (e.g. "Split Czechoslovakia")? - Turned-on Computer Monitor Displaying Text

I cannot find the code, that defines how an AI decides on an event that is triggered by another countries focus. In particular I cannot find how Germany decides whether or not to "Split Czechoslovakia", after Romania finished this focus?

In the file "Hearts of Iron IV/common/national_focus/romania.txt" I found the following code:

focus = {
    id = ROM_split_czechoslovakia

    [... some other code ...]

    completion_reward = {
        GER = { country_event = DOD_romania.110 }
    }
}

But I could not find where "DOD_romania.110" is defined. Can anybody help me out?

I ran several different games and Germany always denied the Split - even if I Increased Relations to 100. This is really annoying because shortly afterwards Germany will Demand Sudentenland and in non-historic might have to attack Czechoslovakia - and now I am asked to honor my Guarantee of Czechoslovakia to fight Germany and Italy in 1938 with Czechoslovakia as my only ally and being the only major on my side (good luck). So I would really like to know how the AI decides this.



Best Answer

The event in question is in "Hearts of Iron IV\events\DOD_Romania.txt". That event has 2 options. 90% to agree to split, 10% to disagree. Also, there's 0 chance for split if Germany and Czechs are in a faction together.

Are you sure it's the Germany who denies the split and not the Czechs? If Germany denies, you're given the option to get claims or back off, if Czechs refuse after Germany agrees, Germany, Hungary and you all get a war goal




Pictures about "Where is the code in HOI4 that defines how an AI decides on events (e.g. "Split Czechoslovakia")?"

Where is the code in HOI4 that defines how an AI decides on events (e.g. "Split Czechoslovakia")? - Computer C++ Code
Where is the code in HOI4 that defines how an AI decides on events (e.g. "Split Czechoslovakia")? - Black Background With Text Overlay Screengrab
Where is the code in HOI4 that defines how an AI decides on events (e.g. "Split Czechoslovakia")? - Coding Script



Where is event ID in hoi4?

There you find all events, ids and what they do, great if you want to mod too. You can also go hoi4 properties -> local files -> browse local files..., by right clicking in you steam library on hoi4. There you find all events, ids and what they do, great if you want to mod too.

How do I create an event in hoi4?

Hearts of Iron IV's AI is so good, the devs sometimes need to handicap it via code. Hearts of Iron IV is a grand strategy game that attempts to offer the ultimate World War 2 sandbox.

Is the hoi4 AI good?

15 Pro Tips For Hearts Of Iron IV
  • 15 Guard The Coasts. ...
  • 14 Build A Variety Of Ships. ...
  • 13 Train Special Forces According To Your Needs. ...
  • 12 Occupation & Collaboration. ...
  • 11 Invest In The Intelligence Agency. ...
  • 10 Unlock Those Extra Research Slots. ...
  • 9 Always Prioritize Production Technology. ...
  • 8 Save That Fuel.




  • Top CONSOLE COMMANDS You NEVER Knew Existed! - Hearts of Iron 4 hoi4 CHEATS! / Console commands




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Pixabay, Pixabay, Pixabay, Markus Spiske