Kaiserreich / Kaiserreich-4-Bug-Reports

Issue tracker for Kaiserreich for Hearts of Iron 4
110 stars 40 forks source link

AUS - As long as Russia defeats Ukraine until it surrenders, Austria will join the war. #12048

Closed rzcxbsxxjxxy closed 3 years ago

rzcxbsxxjxxy commented 3 years ago

Quick questions OS:win 10 HOI4 version:1.10.2 Kaiserreich version:0.15.1

Explanation of the issue: The first eastern European country that Russia defeated was usually Ukraine.As long as Russia defeats Ukraine until it surrenders, Austria will join the war. But Austria’s performance in the war was very poor, often failing to defend the Alps, which accelerated the end of the war. Austria’s early participation in the war would accelerate Germany’s defeat. Steps to reproduce: No.

Possible cause:

    AUS_russian_threat = {
        icon = generic_prepare_civil_war

        allowed = { tag = AUS }

        available = {
            OR = {
                is_neighbor_of = RUS
                if = {
                    limit = { has_subject = GAL }
                    GAL = { is_neighbor_of = RUS }
                }
                POL = { is_in_faction_with = RUS }
                custom_trigger_tooltip = {
                    tooltip = AUS_poland_fallen_to_russia
                    POL = {
                        is_in_faction_with = GER
                        has_capitulated = yes
                    }
                    10 = {
                        is_owned_by = POL
                        controller = { is_ally_with = RUS }
                    }
                }
                custom_trigger_tooltip = {
                    tooltip = AUS_russia_penetrated_germany
                    5 = {
                        is_owned_by = GER
                        controller = { is_ally_with = RUS }
                    }
                }
            }
            OR = {
                has_completed_focus = AUS_status_quo
                has_completed_focus = AUS_embrace_pluralism
                has_completed_focus = AUS_military_occupation
            }
        }

        visible = {
            is_faction_leader = yes
            is_subject = no
            has_socialist_government = no
            can_declare_war_on = FROM
            FROM = {
                has_war_with = GER
                NOT = { is_in_faction_with = INT }
            }
        }

        cost = 0
        fire_only_once = yes

        targets = { RUS }
        target_root_trigger = { has_completed_focus = AUS_protector_of_the_balkans }
        target_trigger = {
            FROM = {
                has_war_with = GER
                NOT = { is_in_faction_with = INT }
            }
        }

        ai_will_do = {
            factor = 100
            modifier = {
                factor = 0
                GER = {
                    NOT = {
                        has_war_with = INT
                        surrender_progress > 0.30
                    }
                }
            }
            modifier = {
                factor = 0
                NOT = {
                    any_neighbor_country = { is_ally_with = RUS }
                    any_allied_country = {
                        any_neighbor_country = { is_ally_with = RUS }
                    }
                }
            }
            modifier = {
                factor = 0
                has_war = yes
                OR = {
                    has_war_with = HUN
                    has_war_with = SER
                    has_war_with = ROM
                    surrender_progress > 0.01
                    HUN = {
                        is_subject_of = AUS
                        surrender_progress > 0.05
                    }
                    CZE = {
                        is_subject_of = AUS
                        surrender_progress > 0.15
                    }
                    CRO = {
                        is_subject_of = AUS
                        surrender_progress > 0.15
                    }
                }
            }
            modifier = {
                factor = 0
                has_war_with = INT
                count_triggers = {
                    amount = 2
                    POL = {
                        surrender_progress < 0.20
                        is_in_faction_with = RUS
                    }
                    SER = {
                        surrender_progress < 0.20
                        is_in_faction_with = RUS
                    }
                    ROM = {
                        surrender_progress < 0.20
                        is_in_faction_with = RUS
                    }
                    UKR = {
                        surrender_progress < 0.20
                        is_in_faction_with = RUS
                    }
                }
            }
        }

        complete_effect = {
            log = "[GetDateText]: [Root.GetName]: Decision AUS_russian_threat target: [From.GetName]"
            FROM = { save_event_target_as = threat_country }
            GER = { country_event = aus.tree.4011 }
        }
    }

It seems that the first modifier will not work in time. I suggest that Austria can send more volunteers to Germany until before joining the war. Screenshots:

Alpinia commented 3 years ago

I'm not sure what you mean here - do you want Austria to... not join the war?

Rylock commented 3 years ago

I think maybe he's saying that the first modifier on the ai_will_do makes it so that Austria waits until Germany's at 30% surrender to use this decision - meaning that, despite the other conditions, Germany is already too far gone for Austria's participation to help. I'll drop it to 10%.