ParadoxGameConverters / Vic2ToHoI4

Converts Victoria 2 saves into Hearts of Iron 4 mods.
MIT License
28 stars 21 forks source link

Crisis conversion #280

Open IohannesIohannium opened 6 years ago

IohannesIohannium commented 6 years ago

Although I don't know yet where are ongoing crisis stored in a Vic2 savefile, I still propose here a way to convert them to HoI4.

There are two types of crisis.

Conquest of state crisis

There are the owner of the state ("TAG1") and the one asking for it ("TAG2"). As well, there are several major powers siding with either of the two.

"TAG1" would have nothing different from a basic conversion.

"TAG2" would get an entry in its history file being so:

create_wargoal = {
    target = ["TAG1"]
    type = take_core_state
    generator = { [HoI state corresponding to the Vic2 one] }
}

The majors siding would be converted to guaranteers, having thus the entry in their history files give_guarantee = ["TAG1"] or give_guarantee = ["TAG2"], according with whom are they siding.

Liberation of country crisis

There is the owner of the land ("TAG1") and the country that needs to be liberated ("TAG2"), along with the siding majors.

"TAG1" would have nothing different from a basic conversion and all the majors siding with it would have in their history files the entry give_guarantee = ["TAG1"].

"TAG2" doesn't exist. All the majors siding with "TAG2" would, however, be converted to countries with a casus belli on "TAG1" in their history files being so:

create_wargoal = {
    target = ["TAG1"]
    type = liberate_wargoal
}
Idhrendur commented 2 years ago

Could probably do an event chain simulating the increasing tensions, the possibility for interested nations to join one side or another, and the possibility of one side just giving in.

And the code from a save looks like this:

crisis_manager=
{
    crisis=
    {
        temperature=9.300
        state=824
        attacker="GRE"
        defender="TUR"
        attacker_backer="ENG"
        defender_backer="FRA"
        interested="PRU"
        interested="AUS"
        war_goal_attack=
        {
            state_province_id=824
            casus_belli="acquire_core_state"
            actor="GRE"
            receiver="TUR"
        }
        war_goal_defender=
        {
            casus_belli="cut_down_to_size"
            actor="TUR"
            receiver="ENG"
        }
        invite=yes
    }
}