EVENT写法 [Inkit wiki]

用户工具

站点工具


g:hoi:eventmod

EVENT写法

基本格式

<html><pre>


# oil aluminium  rubber tungsten  steel chromium

add_namespace = Easybuff    #必须声明命名空间。

country_event = {
    id = Easybuff.10        # id = 命名空间.数字
    title = Easybuff.10.t   # 事件标题
    desc = Easybuff.10.d    # 事件描述
    picture = GFX_report_event_german_inspect_troops    # 事件图片
    is_triggered_only = yes    # 必须有激活才会触发 默认no
    fire_only_once = yes    # 只激活一次 默认no

    trigger = {             # 触发条件
        country_exists = COUNTRY

        any_country = {}
        any_allied_country = {}
        any_neighbor_country = {}
        __COUNTRY = {
            exists = yes
            tag = PRC
            original_tag = CHI
            is_ai = no
            is_major = yes
            is_puppet = yes
            has_idea = cheat_politics_buildinfra
            has_completed_focus = POL_artillery_modernisation
            has_government = neutrality   # communism  democratic
            has_country_flag = SPR_communist_civil_war
            has_global_flag = scw_over
            has_defensive_war = no
            has_offensive_war = no
            has_capitulated = yes
            has_guaranteed = COUNTRY
            is_in_faction = no
            is_faction_leader = yes
            is_in_faction_with = COUNTRY
            has_war_with = COUNTRY
            has_war_together_with = ROOT
            has_opinion_modifier = some_opinion_mod
            owns_state = STATE_NUM
            controls_state = STATE_NUM
            has_wargoal_against = SOV
			is_justifying_wargoal_against = SOV
            has_guaranteed = GRE
            is_historical_focus_on = yes
            has_idea_with_trait = communist_revolutionary
            has_tech = tech
            has_claimed_state_in_peace_conference = ROOT
            is_owner_neighbor_of = FROM
            has_annex_war_goal = FROM
            has_template_containing_unit = paratrooper

            has_army_size = { size > 39 }
            
            has_equipment = {
			    infantry_equipment > 500
			}
            has_opinion = {
                target = SOV
                value < -10
            }
        }

        capital_scope = {
			is_on_continent = europe  # asia
		}

        divisions_in_state = {
            state = 162
            size > 0
        }

        date > 1936.2.16
        democratic > 0.5
        surrender_progress > 0.5
        num_of_factories > 30
        
        num_of_controlled_states > 3
        any_war_score < 39
        has_national_unity < 60
        has_army_manpower = { size < 1199999 }

        # TO test
        num_of_military_factories > 69
        threat > 0.5
        enemies_strength_ratio > 0.5
        dockyard > 0
        air_base > 3
        arms_factory > 0
        has_war_with_amount > 1
        has_added_tension_amount  > 20
        original_research_slots > 2

        has_army_manpower = { size > 849999 }

        has_navy_size = {
			size > 1000
			type = convoy
		}

        free_building_slots = {
            building = air_base
            size > 1
        }
    }

    mean_time_to_happen = { days = 0 }   # 触发间隔

    immediate = {           # 立即效果
        hidden_effect = {   # 不显示的处理
            
        }
    }

    option = {              # 事件选项 界面设计可以弄4个。注意 .d 不要与desc重合,一般用 .e 来命名第4个事件。
        name = Easybuff.10.a    # 选项名称
        custom_effect_tooltip = republicans_chosen

        ai_chance = { 
            factor = 0 
            modifier = {
                factor = 100
                is_in_faction = yes
            }
        }   # ai选择的可能性

        effect_tooltip = {
			custom_effect_tooltip = china.6.tt
			random_list = {
                30 = {

                }
                70 = {

                }
            }
        }


        # __STATE = {}
        random_owned_controlled_state = {}
        random_owned_state = {}
        every_state = {   ( if = {limit = {....} } )
            limit = {
                is_controlled_by = COUNTRY (event_target:xxxxxxx)
                is_core_of = COUNTRY (event_target:xxxxxxx)
                is_owned_by = COUNTRY (event_target:xxxxxxx)

                any_state = {}
                any_owned_state = {}
                any_neighbor_state = {
                    owner = { tag = ROOT }
                }
            }
            save_event_target_as = xxxxxxx

            remove_building = {}
            add_building_construction = {
                type = infrastructure   # bunker  naval_base  industrial_complex  arms_factory  coastal_bunker
                                        # synthetic_refinery  air_base  dockyard  anti_air_building  radar_station
                                        # rocket_site  nuclear_reactor
                province = 5291  # ?????
                level = 1
                instant_build = yes
            }
            add_extra_state_shared_building_slots = 3

            add_core_of = COUNTRY (event_target:xxxxxxx)
            remove_core_of = COUNTRY (event_target:xxxxxxx)
        }


        # __COUNTRY = { }
        ROOT = {}
        random_country = {}
        every_country = {
            limit = {
                has_country_flag = 
                has_global_flag = 
                owns_state = STATE_NUM (event_target:xxxxxxx)
                original_tag = SPR
				has_government = fascism
            }
            
            transfer_state = STATE_NUM (event_target:xxxxxxx)
            add_state_core = STATE_NUM (event_target:xxxxxxx)
            remove_state_core = STATE_NUM (event_target:xxxxxxx)
            add_state_claim = STATE_NUM (event_target:xxxxxxx)
            remove_state_claim = STATE_NUM (event_target:xxxxxxx)
            set_state_controller = STATE_NUM (event_target:xxxxxxx)

            add_national_unity = 0.05
            set_national_unity = 0.8

            add_ideas = new_deal
            remove_ideas = cheat_politics_buildinfra

            add_political_power = 150
            add_manpower = -10000

            country_event = hungary.3

            set_capital = 41

            add_to_faction = COUNTRY (event_target:xxxxxxx)
            remove_from_faction = COUNTRY (event_target:xxxxxxx)
            dismantle_faction = yes
            create_faction = "french_alliance"

            add_named_threat = { threat = 5 name = germany.89.t }

			set_rule = { 
                can_declare_war_on_same_ideology = no                
                can_create_factions = yes 
                can_force_government = no
                can_send_volunteers = yes
                can_puppet = yes
                can_occupy_non_war = yes
                can_lower_tension = yes
                can_only_justify_war_on_threat_country = yes
                can_guarantee_other_ideologies = yes

                can_generate_female_aces = yes
                can_use_kamikaze_pilots = yes
                can_boost_other_ideologies = yes
                 
                # modifiers = {
                #     generate_wargoal_tension = 1.00
                #     join_faction_tension = 0.80
                #     lend_lease_tension = 0.50
                #     send_volunteers_tension = 0.50
                #     guarantee_tension = 0.25
                #     take_states_cost_factor = 0.25
                #     annex_cost_factor = 0.5
                #     justify_war_goal_when_in_major_war_time = -0.80
                #     puppet_cost_factor = -0.3
                #     drift_defence_factor = -0.3	
                # }
            }   #set_rule ????

            white_peace = COUNTRY (event_target:xxxxxxx)

            load_oob = SLO_1939 # ????

            clr_country_flag =
            set_country_flag =

            create_wargoal = {
                type = puppet_wargoal_focus  # take_state  annex_everything  take_state_focus  liberate_wargoal
                target = COUNTRY (event_target:xxxxxxx)
                generator = { 102 69 74}
            }
            declare_war_on = { 
                target = CHI 
                type = annex_everything 
            }

            set_equipment_fraction = 0.7
            add_popularity = {
				ideology = democratic
				popularity = 0.35
			}

            set_politics = {
				ruling_party = fascism
				elections_allowed = no
				parties = {
					democratic = { 
						popularity = 22
					}

					fascism = {
						popularity = 76
					}
					
					communism = {
						popularity = 2
					}
				}
			}

            add_opinion_modifier = {
				target = COUNTRY (event_target:xxxxxxx)
				modifier = destroyers_for_bases_opinion
			}
            create_country_leader = {
                name = "Thomas E. Dewey"
                desc = "POLITICS_THOMAS_DEWEY_DESC"
                picture = "Portrait_USA_Generic_2.dds"
                expire = "1965.1.1"
                ideology = conservatism
                traits = { }
		    }

            annex_country = { 
                target = COUNTRY (event_target:xxxxxxx)
                transfer_troops = yes 
            }
            puppet = CRO

            add_to_war = {
			    targeted_alliance = CHI
			    enemy = JAP
		    }
            send_equipment = {
                target = FIN
                type = infantry_equipment  # artillery_equipment
                amount = 500
			}
            add_tech_bonus = {
                name = armor_bonus
                bonus = 0.5
                uses = 2
                category = armor
            }
            add_timed_idea = { 
                idea = SOV_scientist_defect 
                days = 365 
            }
        }
    }
}

</pre></html>

Other

g/hoi/eventmod.txt · 最后更改: 2023/04/04 18:02 由 127.0.0.1