# Indonesia independence effect. Called by on action ID 1 & ID 2 since they do the same thing. indonesia_free_effect = { set_country_flag = INS_freed_from_dutch ROOT = { drop_cosmetic_tag = yes if = { limit = { NOT = { has_completed_focus = INSHOL_volksraad_compromises } } every_unit_leader = { limit = { has_trait = INS_loyalty_to_netherlands } set_nationality = HOL } } #retire_character = INS_bonifacius_cornelis_de_jonge #retire_character = INS_a_t_van_starkenborgh_stachouwer } } indonesia_free_effect_2 = { set_country_flag = INS_freed_from_dutch ROOT = { drop_cosmetic_tag = yes #every_unit_leader = { # limit = { # has_trait = INS_loyalty_to_netherlands # } # set_nationality = HOL #} #retire_character = INS_bonifacius_cornelis_de_jonge #retire_character = INS_a_t_van_starkenborgh_stachouwer } } indonesia_transfer_POK = { if = { limit = { country_exists = POK } POK = { INS_syarif_muhammad_alkadrie = { set_nationality = INS remove_country_leader_role = { #we just want the advisor. if we want them as a leader, we can do that manually after ideology = despotism } save_global_event_target_as = INS_syarif_muhammad_alkadrie } } } else = { every_possible_country = { limit = { has_character = INS_syarif_muhammad_alkadrie } random_character = { limit = { is_character = INS_syarif_muhammad_alkadrie } set_nationality = INS save_global_event_target_as = INS_syarif_muhammad_alkadrie } } } } indonesia_transfer_TNE = { if = { limit = { country_exists = TNE } TNE = { INS_iskandar_sjah = { set_nationality = INS remove_country_leader_role = { #we just want the advisor. if we want them as a leader, we can do that manually after ideology = despotism } save_global_event_target_as = INS_iskandar_sjah } } } else = { every_possible_country = { limit = { has_character = INS_iskandar_sjah } random_character = { limit = { is_character = INS_iskandar_sjah } set_nationality = INS save_global_event_target_as = INS_iskandar_sjah } } } } indonesia_transfer_GOW = { if = { limit = { country_exists = GOW } GOW = { INS_sultan_muhibuddin = { set_nationality = INS remove_country_leader_role = { #we just want the advisor. if we want them as a leader, we can do that manually after ideology = despotism } save_global_event_target_as = INS_sultan_muhibuddin } } } else = { every_possible_country = { limit = { has_character = INS_sultan_muhibuddin } random_character = { limit = { is_character = INS_sultan_muhibuddin } set_nationality = INS save_global_event_target_as = INS_sultan_muhibuddin } } } } indonesia_transfer_SSI = { if = { limit = { country_exists = SSI } SSI = { INS_syarif_kasim = { set_nationality = INS remove_country_leader_role = { #we just want the advisor. if we want them as a leader, we can do that manually after ideology = despotism } save_global_event_target_as = INS_syarif_kasim } } } else = { every_possible_country = { limit = { has_character = INS_syarif_kasim } random_character = { limit = { is_character = INS_syarif_kasim } set_nationality = INS save_global_event_target_as = INS_syarif_kasim } } } } indonesia_transfer_BLI = { if = { limit = { country_exists = BLI } BLI = { INS_dewa_geg = { set_nationality = INS remove_country_leader_role = { #we just want the advisor. if we want them as a leader, we can do that manually after ideology = despotism } save_global_event_target_as = INS_dewa_geg } } } else = { every_possible_country = { limit = { has_character = INS_dewa_geg } random_character = { limit = { is_character = INS_dewa_geg } set_nationality = INS save_global_event_target_as = INS_dewa_geg } } } } indonesia_transfer_ATJ = { if = { limit = { country_exists = ATJ } ATJ = { INS_alauddin_syah = { set_nationality = INS remove_country_leader_role = { #we just want the advisor. if we want them as a leader, we can do that manually after ideology = despotism } save_global_event_target_as = INS_alauddin_syah } } } else = { every_possible_country = { limit = { has_character = INS_alauddin_syah } random_character = { limit = { is_character = INS_alauddin_syah } set_nationality = INS save_global_event_target_as = INS_alauddin_syah } } } } indonesia_princely_advisors_effect = { #WARNING: DO NOT USE THIS FOR TOOLTIPS!! Only ever use this effect when necessary, and do not just make an effect_tooltip to show its effects. This one can get quite laggy as it may need to search through every country many times indonesia_transfer_POK = yes indonesia_transfer_TNE = yes indonesia_transfer_GOW = yes indonesia_transfer_SSI = yes indonesia_transfer_BLI = yes indonesia_transfer_ATJ = yes } indonesia_princely_advisors_effect_no_atjeh = { #WARNING: DO NOT USE THIS FOR TOOLTIPS!! Only ever use this effect when necessary, and do not just make an effect_tooltip to show its effects. This one can get quite laggy as it may need to search through every country many times indonesia_transfer_POK = yes indonesia_transfer_TNE = yes indonesia_transfer_GOW = yes indonesia_transfer_SSI = yes indonesia_transfer_BLI = yes } rename_batavia_to_jakarta_if_not_already_effect = { if = { limit = { NOT = { has_country_flag = INS_has_renamed_jakarta } } set_province_name = { id = 7381 name = VICTORY_POINTS_7381_indonesian } set_province_name = { id = 12371 name = VICTORY_POINTS_12371_indonesian } hidden_effect = { #to avoid a double tooltip 1058 = { set_state_name = STATE_1058_indonesian } } set_country_flag = INS_has_renamed_jakarta } } indonesia_renville_war_effect = { # USA will kick HOL from faction if they're the same, USA will invite INS to faction if possible, otherwise guarantee, USA AI will become very friendly with INS # and of course, USA will declare war on HOL if = { limit = { USA = { is_in_faction_with = HOL } } HOL = { leave_faction = yes } } USA = { declare_war_on = { target = HOL type = topple_government } } if = { limit = { USA = { is_in_faction_with = INS } } # do nothing } else = { if = { limit = { USA = { is_in_faction = yes } INS = { is_in_faction = no } } USA = { add_to_faction = INS } } if = { limit = { USA = { is_in_faction = no } INS = { is_in_faction = no } } USA = { give_guarantee = INS } } } if = { limit = { USA = { is_ai = yes } } USA = { add_ai_strategy = { type = protect id = INS value = 100 } add_ai_strategy = { type = support id = INS value = 100 } add_ai_strategy = { type = send_lend_lease_desire id = INS value = 100 } add_ai_strategy = { type = send_volunteers_desire id = INS value = 100 } } } } indonesia_remove_dutch_generals_effect = { every_army_leader = { limit = { has_trait = INS_loyalty_to_netherlands } set_nationality = HOL } } indonesia_industrial_1_effect = { add_resource = { type = oil amount = 8 } } indonesia_industrial_2_effect = { add_resource = { type = aluminium amount = 3 } add_resource = { type = steel amount = 3 } } indonesia_industrial_3_effect = { add_resource = { type = tungsten amount = 3 } add_resource = { type = chromium amount = 3 } } indonesia_industrial_4_effect = { add_resource = { type = coal amount = 4 } } indonesia_industrial_rubber_effect = { add_resource = { type = rubber amount = -16 } } indonesia_form_republic_effect = { set_country_flag = INS_republic_founded #custom_effect_tooltip = INS_republic_add_generals_tt hidden_effect = { if = { limit = { INS_sudirman = { is_unit_leader = no } } INS_sudirman = { add_corps_commander_role = { traits = { INS_loyalty_to_indonesia career_officer politically_connected trait_SOV_determined } skill = 2 attack_skill = 2 defense_skill = 2 planning_skill = 1 logistics_skill = 2 } } } INS_soengkono = { add_corps_commander_role = { traits = { INS_loyalty_to_indonesia } skill = 1 attack_skill = 1 defense_skill = 1 planning_skill = 1 logistics_skill = 1 } } INS_djatikoesoemo = { add_corps_commander_role = { traits = { INS_loyalty_to_indonesia } skill = 1 attack_skill = 1 defense_skill = 1 planning_skill = 1 logistics_skill = 1 } } } set_party_name = { ideology = neutrality long_name = INS_republic_national_party_long name = INS_republic_national_party } hidden_effect = { set_popularities = { democratic= 26 # 0.0-100 neutrality = 57 # 0.0-100 fascism = 0 # 0.0-100 communism = 17 # 0.0-100 } set_party_name = { ideology = democratic long_name = INS_republic_socialist_party_long name = INS_republic_socialist_party } set_party_name = { ideology = fascism long_name = INS_peta_party_long name = INS_peta_party } set_politics = { ruling_party = neutrality elections_allowed = no } INS_sutan_sjahrir = { add_country_leader_role = { promote_leader = yes country_leader = { ideology = socialism expire = "1965.1.1.1" traits = { idealist_revolutionary } } } } } INS_sukarno = { add_country_leader_role = { promote_leader = yes country_leader = { ideology = oligarchism expire = "1965.1.1.1" traits = { INS_leader_of_the_people } } } } } # Volksraad effects indonesia_volksraad_allow_language_in_schools_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_1 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 100 localization = INS_autonomy_indonesian_in_schools } } indonesia_volksraad_allow_language_in_government_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_2 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 100 localization = INS_autonomy_indonesian_in_govenment } } indonesia_volksraad_remove_education_quotas_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_3 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 100 localization = INS_autonomy_no_education_quotas } custom_effect_tooltip = INS_volksraad_tt add_to_variable = { var = INS_dutch_east_indies_research_speed_factor value = 0.025 tooltip = research_speed_factor_tt } } indonesia_volksraad_reduce_rubber_export_tax_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_4 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 125 localization = INS_autonomy_reduced_rubber_tax } custom_effect_tooltip = INS_volksraad_tt add_to_variable = { var = INS_dutch_east_indies_stability_factor value = 0.05 tooltip = stability_factor_tt } add_to_variable = { var = INS_dutch_east_indies_production_speed_buildings_factor value = 0.05 tooltip = production_speed_buildings_factor_tt } } indonesia_volksraad_equal_education_effect = { # set_country_flag = indonesia_volksraad_passed_5 # add_to_variable = { INS_volksraad_counter = 1 } # add_autonomy_score = { # value = 100 # localization = INS_autonomy_equal_education # } # # custom_effect_tooltip = INS_volksraad_tt # add_to_variable = { # var = INS_dutch_east_indies_stability_factor # value = 0.05 # tooltip = stability_factor_tt # } # add_to_variable = { # var = INS_dutch_east_indies_research_speed_factor # value = 0.05 # tooltip = production_speed_buildings_factor_tt # } } indonesia_volksraad_knil_rank_limit_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_6 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 125 localization = INS_autonomy_knil_rank_limit } custom_effect_tooltip = available_chief_of_army show_ideas_tooltip = INS_oerip_soemohardjo } indonesia_volksraad_legalize_displaying_flag_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_7 add_to_variable = { INS_volksraad_counter = 1 } set_country_flag = { flag = INS_flag_legalized value = 1 } custom_effect_tooltip = INS_flag_legalized add_autonomy_score = { value = 200 localization = INS_autonomy_flag_legalized } custom_effect_tooltip = INS_volksraad_tt add_to_variable = { var = INS_dutch_east_indies_stability_factor value = 0.05 tooltip = stability_factor_tt } } indonesia_volksraad_legalize_nationalist_movements_effect = { # set_country_flag = indonesia_volksraad_passed_8 # add_to_variable = { INS_volksraad_counter = 1 } # add_autonomy_score = { # value = 200 # localization = INS_autonomy_nationalism_allowed # } # # add_popularity = { # ideology = democratic # popularity = 0.075 # } } indonesia_volksraad_democratic_volksraad_effect = { # set_country_flag = indonesia_volksraad_passed_9 # add_to_variable = { INS_volksraad_counter = 1 } # add_autonomy_score = { # value = 200 # localization = INS_autonomy_democratic_volksraad # } # # add_popularity = { # ideology = democratic # popularity = 0.10 # } # # custom_effect_tooltip = INS_volksraad_tt # add_to_variable = { # var = INS_dutch_east_indies_stability_factor # value = 0.05 # tooltip = stability_factor_tt # } # add_to_variable = { # var = INS_dutch_east_indies_war_support_factor # value = 0.05 # tooltip = war_support_factor_tt # } } indonesia_volksraad_education_subsidies_for_indonesians_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_10 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 150 localization = INS_autonomy_education_subsidies } custom_effect_tooltip = INS_volksraad_tt add_to_variable = { var = INS_dutch_east_indies_political_power_gain value = 0.15 tooltip = political_power_gain_tt } } indonesia_volksraad_indonesian_national_language_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_11 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 150 localization = INS_autonomy_national_language } custom_effect_tooltip = INS_volksraad_tt add_to_variable = { var = INS_dutch_east_indies_stability_factor value = 0.075 tooltip = stability_factor_tt } } indonesia_volksraad_official_flag_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_12 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 200 localization = INS_autonomy_official_flag } custom_effect_tooltip = INS_volksraad_tt add_to_variable = { var = INS_dutch_east_indies_stability_factor value = 0.075 tooltip = stability_factor_tt } add_to_variable = { var = INS_dutch_east_indies_war_support_factor value = 0.075 tooltip = war_support_factor_tt } add_to_variable = { var = INS_dutch_east_indies_political_power_gain value = 0.10 tooltip = political_power_gain_tt } hidden_effect = { set_cosmetic_tag = INS_HOL_FLAG } custom_effect_tooltip = indonesia_volksraad_official_flag_effect_tt } indonesia_volksraad_abolish_veto_right_effect = { clr_country_flag = INS_is_taking_volksraad set_country_flag = indonesia_volksraad_passed_13 add_to_variable = { INS_volksraad_counter = 1 } add_autonomy_score = { value = 250 localization = INS_autonomy_no_veto } set_country_flag = { flag = INS_governor_veto_available value = 0 } } indonesia_volksraad_reject_25_effect = { HOL = { add_political_power = -25 } INS = { add_political_power = 12 clr_country_flag = INS_is_taking_volksraad } } indonesia_volksraad_reject_50_effect = { HOL = { add_political_power = -50 } INS = { add_political_power = 25 clr_country_flag = INS_is_taking_volksraad } } indonesia_volksraad_reject_75_effect = { HOL = { add_political_power = -75 } INS = { add_political_power = 37 clr_country_flag = INS_is_taking_volksraad } } indonesia_form_other_indies_effect = { create_dynamic_country = { original_tag = INS reserve_dynamic_country = yes transfer_state = 1051 set_cosmetic_tag = INS_HOL save_global_event_target_as = INS_dutch_indonesia } HOL = { if = { limit = { INS = { has_autonomy_state = autonomy_integrated_puppet } } set_autonomy = { target=event_target:INS_dutch_indonesia autonomy_state = autonomy_integrated_puppet freedom_level = var:INS.autonomy_ratio } } else_if = { limit = { INS = { has_autonomy_state = autonomy_puppet } } set_autonomy = { target=event_target:INS_dutch_indonesia autonomy_state = autonomy_puppet freedom_level = var:INS.autonomy_ratio } } else_if = { limit = { INS = { has_autonomy_state = autonomy_colony } } set_autonomy = { target=event_target:INS_dutch_indonesia autonomy_state = autonomy_colony freedom_level = var:INS.autonomy_ratio } } else_if = { limit = { INS = { has_autonomy_state = autonomy_dominion } } set_autonomy = { target=event_target:INS_dutch_indonesia autonomy_state = autonomy_dominion freedom_level = var:INS.autonomy_ratio } } else = { # i have no idea how this could even happen but juuust in case lets have a fallback set_autonomy = { target=event_target:INS_dutch_indonesia autonomy_state = autonomy_integrated_puppet freedom_level = 0.5 } } end_puppet = INS } event_target:INS_dutch_indonesia = { add_dynamic_modifier = { modifier = INS_dutch_east_indies } add_dynamic_modifier = { modifier = INS_royal_netherlands_east_indies_army } add_dynamic_modifier = { modifier = INS_great_depression } set_variable = { INS_dutch_east_indies_stability_factor = INS.INS_dutch_east_indies_stability_factor } set_variable = { INS_dutch_east_indies_war_support_factor = INS.INS_dutch_east_indies_war_support_factor } set_variable = { INS_dutch_east_indies_consumer_goods_factor = INS.INS_dutch_east_indies_consumer_goods_factor } set_variable = { INS_dutch_east_indies_political_power_gain = INS.INS_dutch_east_indies_political_power_gain } set_variable = { INS_dutch_east_indies_research_speed_factor = INS.INS_dutch_east_indies_research_speed_factor } set_variable = { INS_dutch_east_indies_production_speed_buildings_factor = INS.INS_dutch_east_indies_production_speed_buildings_factor } # Royal Netherlands East Indies Army set_variable = { INS_royal_netherlands_east_indies_army_experience_gain_army_factor = INS.INS_royal_netherlands_east_indies_army_experience_gain_army_factor } set_variable = { INS_royal_netherlands_east_indies_army_training_time_factor = INS.INS_royal_netherlands_east_indies_army_training_time_factor } set_variable = { INS_royal_netherlands_east_indies_army_offence = INS.INS_royal_netherlands_east_indies_army_offence } set_variable = { INS_royal_netherlands_east_indies_army_defence = INS.INS_royal_netherlands_east_indies_army_defence } # Great Depression set_variable = { INS_great_depression_min_export = INS.INS_great_depression_min_export } # Dutch East Indies set_variable = { var = INS_dutch_east_indies_stability_factor value = INS.INS_dutch_east_indies_stability_factor } set_variable = { var = INS_dutch_east_indies_research_speed_factor value = INS.INS_dutch_east_indies_research_speed_factor } set_variable = { var = INS_dutch_east_indies_consumer_goods_factor value = INS.INS_dutch_east_indies_consumer_goods_factor } set_variable = { var = INS_dutch_east_indies_overlord_trade_cost_factor value = INS.INS_dutch_east_indies_overlord_trade_cost_factor } set_variable = { var = INS_dutch_east_indies_extra_trade_to_overlord_factor value = INS.INS_dutch_east_indies_extra_trade_to_overlord_factor } set_variable = { var = INS_dutch_east_indies_resources_to_overlord_factor value = INS.INS_dutch_east_indies_resources_to_overlord_factor } set_variable = { var = INS_dutch_east_indies_mic_to_overlord_factor value = INS.INS_dutch_east_indies_mic_to_overlord_factor } set_politics = { ruling_party = neutrality elections_allowed = no last_election = "1935.1.1.1" election_frequency = 48 } set_popularities = { democratic= 15 neutrality = 80 fascism = 0 communism = 5 } } INS = { every_owned_state = { if = { limit = { check_variable = { influence_point_count = 0 } } transfer_state_to = event_target:INS_dutch_indonesia } #else_if = { # limit = { # check_variable = { # influence_point_count = 1 # } # } # random = { # chance = 80 # transfer_state_to = event_target:INS_dutch_indonesia # add_dynamic_modifier = { # modifier = INS_state_militia_activity_1 # } # } #} #else_if = { # limit = { # check_variable = { # influence_point_count = 2 # } # } # random = { # chance = 40 # transfer_state_to = event_target:INS_dutch_indonesia # add_dynamic_modifier = { # modifier = INS_state_militia_activity_2 # } # } #} else_if = { limit = { check_variable = { influence_point_count = 3 } } add_dynamic_modifier = { modifier = INS_state_militia_activity_3 } if = { limit = { NOT = { is_core_of = INS } } add_core_of = INS } } } every_owned_state = { #now that states have been transfered limit = { NOT = { OR = { has_dynamic_modifier = { modifier = INS_state_militia_activity_1 } has_dynamic_modifier = { modifier = INS_state_militia_activity_2 } has_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } } } add_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } delete_unit_template_and_units = { division_template = "KNIL Field Division" disband = no } delete_unit_template_and_units = { division_template = "KNIL Garrison Division" disband = no } set_nationality = { target_country = event_target:INS_dutch_indonesia character = INS_a_t_van_starkenborgh_stachouwer } set_nationality = { target_country = event_target:INS_dutch_indonesia character = INS_bonifacius_cornelis_de_jonge } every_unit_leader = { limit = { has_trait = INS_loyalty_to_netherlands } set_nationality = event_target:INS_dutch_indonesia } # if = { # limit = { # has_country_flag = INS_leader_is_tjarda # } # event_target:INS_dutch_indonesia = { # promote_character = { # character = INS_a_t_van_starkenborgh_stachouwer # ideology = despotism # } # # } # } # else = { # event_target:INS_dutch_indonesia = { # promote_character = { # character = INS_bonifacius_cornelis_de_jonge # ideology = despotism # } # # } # } event_target:INS_dutch_indonesia = { retire_country_leader = yes } indonesia_free_effect_2 = yes } # Create Republican Divs INS = { division_template = { name="TKR Revolutionary Division" division_names_group = INS_revolutionary_division priority=2 allow_new_equipment=yes allow_foreign_equipment=yes regiments={ infantry={ x=0 y=0 } infantry={ x=0 y=1 } infantry={ x=0 y=2 } infantry={ x=0 y=3 } infantry={ x=1 y=0 } infantry={ x=1 y=1 } infantry={ x=1 y=2 } infantry={ x=1 y=3 } } template_counter=100 ingame_set_template_counter=yes support={ recon={ x=0 y=0 } } } division_template = { name = "Freedom Fighter Militia" division_names_group = INS_revolutionary_militia_division is_locked = yes force_allow_recruiting = yes regiments = { militia = { x = 0 y = 0 } militia = { x = 0 y = 1 } militia = { x = 1 y = 0 } militia = { x = 1 y = 1 } } template_counter=60 ingame_set_template_counter=yes override_model = INS_militia_alt_0_entity } set_variable = { INS_militia_cap = 3 } set_division_template_cap = { division_template = "Freedom Fighter Militia" division_cap = INS_militia_cap } random_owned_state = { create_unit = { division = "division_template = \"Freedom Fighter Militia\" start_experience_factor = 0.1 start_equipment_factor = 1.0 start_manpower_factor = 1.0" owner = INS allow_spawning_on_enemy_provs = no count = 1 } } random_owned_state = { create_unit = { division = "division_template = \"Freedom Fighter Militia\" start_experience_factor = 0.1 start_equipment_factor = 1.0 start_manpower_factor = 1.0" owner = INS allow_spawning_on_enemy_provs = no count = 1 } } random_owned_state = { create_unit = { division = "division_template = \"Freedom Fighter Militia\" start_experience_factor = 0.1 start_equipment_factor = 1.0 start_manpower_factor = 1.0" owner = INS allow_spawning_on_enemy_provs = no count = 1 } } every_owned_state = { limit = { has_dynamic_modifier = { modifier = INS_state_revolution_hq } } create_unit = { division = "division_template = \"TKR Revolutionary Division\" start_experience_factor = 0.5 start_equipment_factor = 1.0 start_manpower_factor = 1.0" owner = INS allow_spawning_on_enemy_provs = no count = 4 } } } # Create Dutch Indonesian Dvis event_target:INS_dutch_indonesia = { every_owned_state = { limit = { NOT = { state = 1058 state = 1051 state = 335 } impassable = no } create_unit = { division = "division_template = \"KNIL Garrison Division\" start_experience_factor = 0.05 start_equipment_factor = 0.8 start_manpower_factor = 1.0" owner = event_target:INS_dutch_indonesia allow_spawning_on_enemy_provs = no count = 1 } } every_owned_state = { limit = { is_core_of = PREV NOT = { state = 1058 state = 1051 state = 335 } impassable = no } create_unit = { division = "division_template = \"KNIL Garrison Division\" start_experience_factor = 0.05 start_equipment_factor = 0.8 start_manpower_factor = 1.0" owner = event_target:INS_dutch_indonesia allow_spawning_on_enemy_provs = no count = 1 } } capital_scope = { create_unit = { division = "division_template = \"KNIL Field Division\" start_experience_factor = 0.3 start_equipment_factor = 1.0 start_manpower_factor = 1.0" owner = event_target:INS_dutch_indonesia allow_spawning_on_enemy_provs = no count = 6 } } } } indonesia_hol_exile_effect = { INS = { # add_popularity = { # ideology = democratic # popularity = 0.3 # } # set_politics = { # ruling_party = democratic # elections_allowed = mo # last_election = "1935.12.12" # } add_war_support = 0.1 } HOL = { # HOL_wilhelmina = { # set_nationality = INS # } add_war_support = 0.1 } custom_effect_tooltip = INS_exile_tt } indonesia_union_HOL_START_effect = { INS = { transfer_navy = { target = HOL } every_core_state = { add_core_of = HOL } every_character = { set_nationality = HOL } } HOL = { add_popularity = { ideology = neutrality popularity = 0.5 } set_politics = { ruling_party = neutrality elections_allowed = no last_election = "1935.1.1" } HOL_wilhelmina = { promote_character = yes } end_puppet = INS annex_country = { target = INS transfer_troops = yes } custom_effect_tooltip = newline_tt set_cosmetic_tag = INS_UNION } } indonesia_union_INS_START_effect = { HOL = { every_character = { set_nationality = INS } end_puppet = INS transfer_navy = { target = INS } every_core_state = { add_core_of = INS } } INS = { add_popularity = { ideology = neutrality popularity = 0.5 } set_politics = { ruling_party = neutrality elections_allowed = no last_election = "1935.1.1" } if = { limit = { has_character = HOL_wilhelmina } HOL_wilhelmina = { promote_character = yes } } annex_country = { target = HOL transfer_troops = yes } custom_effect_tooltip = newline_tt set_cosmetic_tag = INS_UNION } } indonesia_revolutionary_strength_tt_effect = { if = { limit = { check_variable = { FROM.influence_point_count = 0 } } custom_effect_tooltip = INS_current_revolution_strength_0_tt } else_if = { limit = { check_variable = { FROM.influence_point_count = 1 } } custom_effect_tooltip = INS_current_revolution_strength_1_tt } else_if = { limit = { check_variable = { FROM.influence_point_count = 2 } } custom_effect_tooltip = INS_current_revolution_strength_2_tt } else_if = { limit = { check_variable = { FROM.influence_point_count = 3 } } custom_effect_tooltip = INS_current_revolution_strength_3_tt } } indonesia_increase_militia_activity_effect = { if = { limit = { THIS = { has_dynamic_modifier = { modifier = INS_state_militia_activity_1 } } } remove_dynamic_modifier = { modifier = INS_state_militia_activity_1 } add_dynamic_modifier = { modifier = INS_state_militia_activity_2 } } else_if = { limit = { THIS = { has_dynamic_modifier = { modifier = INS_state_militia_activity_2 } } } remove_dynamic_modifier = { modifier = INS_state_militia_activity_2 } add_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } else_if = { limit = { THIS = { has_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } } # do nothing } else = { #has no militia activity at all add_dynamic_modifier = { modifier = INS_state_militia_activity_1 } } } indonesia_reduce_militia_activity_effect = { if = { limit = { THIS = { has_dynamic_modifier = { modifier = INS_state_militia_activity_1 } } } remove_dynamic_modifier = { modifier = INS_state_militia_activity_1 } } else_if = { limit = { THIS = { has_dynamic_modifier = { modifier = INS_state_militia_activity_2 } } } remove_dynamic_modifier = { modifier = INS_state_militia_activity_2 } add_dynamic_modifier = { modifier = INS_state_militia_activity_1 } } else_if = { limit = { THIS = { has_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } } remove_dynamic_modifier = { modifier = INS_state_militia_activity_3 } add_dynamic_modifier = { modifier = INS_state_militia_activity_2 } } } indonesia_laskar_funding_effect = { } indonesia_increase_escalation_1_effect = { hidden_effect = { INS = { add_to_variable = { var = INS_war_escalation_level value = 1 tooltip = INS_increase_escalation_1_tt } } } hidden_effect = { INS = { clamp_variable = { var = INS_war_escalation_level max = 10 } } } custom_effect_tooltip = INS_increase_escalation_1_tt indonesia_evaluate_escalation_effect = yes } indonesia_increase_escalation_2_effect = { hidden_effect = { INS = { add_to_variable = { var = INS_war_escalation_level value = 2 tooltip = INS_increase_escalation_2_tt } } } hidden_effect = { INS = { clamp_variable = { var = INS_war_escalation_level max = 10 } } } custom_effect_tooltip = INS_increase_escalation_2_tt indonesia_evaluate_escalation_effect = yes } indonesia_increase_escalation_3_effect = { hidden_effect = { INS = { add_to_variable = { var = INS_war_escalation_level value = 3 tooltip = INS_increase_escalation_3_tt } } } hidden_effect = { INS = { clamp_variable = { var = INS_war_escalation_level max = 10 } } } custom_effect_tooltip = INS_increase_escalation_3_tt indonesia_evaluate_escalation_effect = yes } indonesia_reduce_escalation_1_effect = { hidden_effect = { INS = { subtract_from_variable = { var = INS_war_escalation_level value = 1 tooltip = INS_reduce_escalation_1_tt } } } hidden_effect = { INS = { clamp_variable = { var = INS_war_escalation_level min = 1 } } } custom_effect_tooltip = INS_reduce_escalation_1_tt } indonesia_reduce_escalation_2_effect = { hidden_effect = { INS = { subtract_from_variable = { var = INS_war_escalation_level value = 2 tooltip = INS_reduce_escalation_2_tt } } } hidden_effect = { INS = { clamp_variable = { var = INS_war_escalation_level min = 1 } } } custom_effect_tooltip = INS_reduce_escalation_2_tt } indonesia_reduce_escalation_3_effect = { hidden_effect = { INS = { subtract_from_variable = { var = INS_war_escalation_level value = 3 tooltip = INS_reduce_escalation_3_tt } } } hidden_effect = { INS = { clamp_variable = { var = INS_war_escalation_level min = 1 } } } custom_effect_tooltip = INS_reduce_escalation_3_tt } indonesia_declare_war_is_over_effect = { #always use this instead of directly clearing the flag, as this way some effects can be triggered INS_war_half_over_effect = yes #Do the basic war-end effects; legacy mechanic required me to have this be callable without everything else here, but I'll keep it in case thats needed again hidden_effect = { every_country = { limit = { is_in_array = { array = INS.INS_dutch_ally_tracker value = THIS } } INS_remove_hol_ally_strategy_effect = yes } } set_rule = { can_join_factions = yes } rename_batavia_to_jakarta_if_not_already_effect = yes 669 = { set_state_name = STATE_669_indonesian } 1057 = { set_state_name = STATE_1057_indonesian } 1054 = { set_state_name = STATE_1054_indonesian } HOL = { if = { limit = { has_completed_focus = INSHOL_flag_will_fly_again } remove_ideas = HOL_flag_will_fly if = { limit = { has_country_flag = HOL_can_join_factions_before_remove } set_rule = { can_join_factions = yes } } if = { limit = { has_country_flag = HOL_can_create_factions_before_remove } set_rule = { can_create_factions = yes } } } } hidden_effect = { INS = { set_division_template_lock = { division_template = "Freedom Fighter Militia" is_locked = no } } } # Removing the rather OP command power buff that was needed by Indonesia for all their raids add_to_variable = { INS_peoples_security_army_max_command_power_mult_factor = -0.5 tooltip = max_command_power_mult_tt } if = { limit = { #war ended in a way where territory actually can be distributed has_event_target = INS_dutch_indonesia event_target:INS_dutch_indonesia = { num_of_controlled_states > 3 } } hidden_effect = { if = { #If HOL signed the london-batavia accord, they are entitled to all of borneo, alternatively two random indonesian states limit = { has_global_flag = { flag = INSHOL_london_batavia_accord_signed } } if = { limit = { 334 = { #Kalimantan Barat OR = { is_owned_by = event_target:INS_dutch_indonesia is_owned_by = HOL } } 1055 = { #East Kalimantan OR = { is_owned_by = event_target:INS_dutch_indonesia is_owned_by = HOL } } 1022 = { #Interior Borneo OR = { is_owned_by = event_target:INS_dutch_indonesia is_owned_by = HOL } } } if = { limit = { #give to malaya if it exists & is a british subject MAL = { exists = yes is_subject_of = ENG } } 334 = { transfer_state_to = MAL } 1055 = { transfer_state_to = MAL } 1022 = { transfer_state_to = MAL } } else = { #otherwise give to ENG directly 334 = { transfer_state_to = ENG } 1055 = { transfer_state_to = ENG } 1022 = { transfer_state_to = ENG } } } else = { #if HOL/dutch indonesia does not fully control south borneo, give two random states instead -- these ALWAYS go to ENG directly instead of MAL since that was just for borneo event_target:INS_dutch_indonesia = { random_owned_state = { transfer_state_to = ENG } random_owned_state = { transfer_state_to = ENG } } } } if = { limit = { #Exact same thing as above but for franco dutch accord -- gives away three random states, prioritizing Northeastern Sumatra has_global_flag = { flag = INSHOL_franco_dutch_accord_signed } } event_target:INS_dutch_indonesia = { random_owned_state = { limit = { NOT = { #dont give away the capital or a landlocked impassable wasteland state = 1058 #Batavia state = 1022 #Interior Borneo } } prioritize = { 1047 1050 1049 } #1047: Bangka-Belitung, 1049: Medan And Riouw, 1050: Atjeh transfer_state_to = FRA } random_owned_state = { limit = { NOT = { #dont give away the capital or a landlocked impassable wasteland state = 1058 #Batavia state = 1022 #Interior Borneo } } prioritize = { 1047 1050 1049 } #1047: Bangka-Belitung, 1049: Medan And Riouw, 1050: Atjeh transfer_state_to = FRA } random_owned_state = { limit = { NOT = { #dont give away the capital or a landlocked impassable wasteland state = 1058 #Batavia state = 1022 #Interior Borneo } } prioritize = { 1047 1050 1049 } #1047: Bangka-Belitung, 1049: Medan And Riouw, 1050: Atjeh transfer_state_to = FRA } } } } } #Now that the above has been handled, give out events based on the way the war ended if = { limit = { INS = { exists = no } has_event_target = INS_dutch_indonesia } if = { limit = { has_global_flag = { flag = INSHOL_london_batavia_accord_signed } } ENG = { country_event = { id = INS_revolution_events.25 hours = 8 } } #Netherlands won completely, let ENG know they are getting territory } if = { limit = { has_global_flag = { flag = INSHOL_franco_dutch_accord_signed } } FRA = { country_event = { id = INS_revolution_events.25 hours = 8 } } #Netherlands won completely, let FRA know they are getting territory } } else_if = { limit = { INS = { exists = yes } has_event_target = INS_dutch_indonesia event_target:INS_dutch_indonesia = { num_of_controlled_states < 4 } } if = { limit = { has_global_flag = { flag = INSHOL_london_batavia_accord_signed } } ENG = { country_event = { id = INS_revolution_events.26 hours = 8 } } #Peace negotiation ended in Republican favor; dutch indonesia exists but has 3 or less states. Let ENG know they are not getting any states } if = { limit = { has_global_flag = { flag = INSHOL_franco_dutch_accord_signed } } FRA = { country_event = { id = INS_revolution_events.26 hours = 8 } } #Peace negotiation ended in Republican favor; dutch indonesia exists but has 3 or less states. Let FRA know they are not getting any states } } else_if = { limit = { INS = { exists = yes } has_event_target = INS_dutch_indonesia event_target:INS_dutch_indonesia = { num_of_controlled_states > 3 } } if = { limit = { has_global_flag = { flag = INSHOL_london_batavia_accord_signed } } ENG = { country_event = { id = INS_revolution_events.27 hours = 8 } } #Peace negotiation ended in neutral or dutch favor; Let ENG know they are getting territory } if = { limit = { has_global_flag = { flag = INSHOL_franco_dutch_accord_signed } } FRA = { country_event = { id = INS_revolution_events.27 hours = 8 } } #Peace negotiation ended in neutral or dutch favor; Let ENG know they are getting territory } } else_if = { limit = { INS = { exists = yes } NOT = { has_event_target = INS_dutch_indonesia } } if = { limit = { has_global_flag = { flag = INSHOL_london_batavia_accord_signed } } ENG = { country_event = { id = INS_revolution_events.28 hours = 8 } } #Republic won completely, let ENG know they are not getting anything } if = { limit = { has_global_flag = { flag = INSHOL_franco_dutch_accord_signed } } FRA = { country_event = { id = INS_revolution_events.28 hours = 8 } } #Republic won completely, let ENG know they are not getting anything } } else = { log = "INS_scripted_effects.txt: Something unexpected happened" #this shouldnt be possible to fire unless console commands were used } } INS_war_half_over_effect = { hidden_effect = { INS = { clr_country_flag = INS_revolution_has_started clr_country_flag = INS_java_mission_ongoing } } } indonesia_white_peace_HOL_effect = { INS = { if = { limit = { has_war_with = HOL } if = { limit = { is_in_faction = no } every_country = { limit = { has_war_with = INS # NOT = { # INS = { # any_owned_state = { # is_controlled_by = PREV.PREV # } # } # } # this causes so many edge case bugs. if there are bug reports that pop up because of this being commented out then re-add it } white_peace = INS } } else = { HOL = { white_peace = INS } } } } } indonesia_save_borders_effect = { # Start variables based on exactly who owns states currently for_each_scope_loop = { array = INS.owned_states_at_game_start if = { limit = { is_controlled_by = INS } set_state_flag = INS_state_is_indonesian } else = { #set_state_flag = INS_state_is_dutch update: for the sake of not having to remove and add flags, not having the above flag is defacto deifned as it being dutch } } indonesia_white_peace_HOL_effect = yes ## Determine controller of Java (the side that controls 2 or 3 of the 3 states gets all 3 states) set_temp_variable = { var = java_states_owned_by_INS value = 0 } 335 = { #West Java if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { tempjava_states_owned_by_INS = 1 } } } 1051 = { #East Java if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { tempjava_states_owned_by_INS = 1 } } } 1058 = { #Batavia if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { tempjava_states_owned_by_INS = 1 } } } if = { # If INS controls 2 or more Javanese states, give them all of them limit = { check_variable = { var = tempjava_states_owned_by_INS value = 2 compare = greater_than_or_equals } } 335 = { set_state_flag = INS_state_is_indonesian } 1051 = { set_state_flag = INS_state_is_indonesian } 1058 = { set_state_flag = INS_state_is_indonesian } } else = { #If INS does NOT control 2+ javanese states, give netherlands all of them 335 = { clr_state_flag = INS_state_is_indonesian } 1051 = { clr_state_flag = INS_state_is_indonesian } 1058 = { clr_state_flag = INS_state_is_indonesian } } ## Determine controller of Sumatra (the side that controls 3, 4, or 5 of the 5 states gets all 5 states) set_temp_variable = { var = sumatra_states_owned_by_INS value = 0 } 672 = { #South Sumatra if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { sumatra_states_owned_by_INS = 1 } } } 1047 = { #Medan and Riouw if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { sumatra_states_owned_by_INS = 1 } } } 1049 = { #Medan and Riouw if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { sumatra_states_owned_by_INS = 1 } } } 1048 = { #Padang if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { sumatra_states_owned_by_INS = 1 } } } 1050 = { #Atjeh if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { sumatra_states_owned_by_INS = 1 } } } if = { # If INS controls 3 or more Sumatran states, give them all of them limit = { check_variable = { var = sumatra_states_owned_by_INS value = 3 compare = greater_than_or_equals } } 672 = { set_state_flag = INS_state_is_indonesian } 1047 = { set_state_flag = INS_state_is_indonesian } 1049 = { set_state_flag = INS_state_is_indonesian } 1048 = { set_state_flag = INS_state_is_indonesian } 1050 = { set_state_flag = INS_state_is_indonesian } } else = { #If INS does NOT control 2+ javanese states, give netherlands all of them 672 = { clr_state_flag = INS_state_is_indonesian } 1047 = { clr_state_flag = INS_state_is_indonesian } 1049 = { clr_state_flag = INS_state_is_indonesian } 1048 = { clr_state_flag = INS_state_is_indonesian } 1050 = { clr_state_flag = INS_state_is_indonesian } } ## Determine controller of Borneo (the side that controls 2 or 3 of the 3 states gets all 3 states) set_temp_variable = { var = borneo_states_owned_by_INS value = 0 } 334 = { #Kalimantan Barat if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { borneo_states_owned_by_INS = 1 } } } 1055 = { #East Kalimantan if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { borneo_states_owned_by_INS = 1 } } } 1022 = { #Interior Borneo if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } add_to_temp_variable = { borneo_states_owned_by_INS = 1 } } } if = { # If INS controls 2 or more of Borneos states, give them all of them limit = { check_variable = { var = borneo_states_owned_by_INS value = 2 compare = greater_than_or_equals } } 334 = { set_state_flag = INS_state_is_indonesian } 1055 = { set_state_flag = INS_state_is_indonesian } 1022 = { set_state_flag = INS_state_is_indonesian } } else = { #If INS does NOT control 2+ javanese states, give netherlands all of them 334 = { clr_state_flag = INS_state_is_indonesian } 1055 = { clr_state_flag = INS_state_is_indonesian } 1022 = { clr_state_flag = INS_state_is_indonesian } } ## Set state owners according to variables for_each_scope_loop = { array = INS.owned_states_at_game_start if = { limit = { has_state_flag = { flag = INS_state_is_indonesian } } transfer_state_to = INS } else = { transfer_state_to = event_target:INS_dutch_indonesia } } indonesia_declare_war_is_over_effect = yes } indonesia_HOL_sign_accord_effect = { ENG = { add_manpower = -100000 if = { limit = { is_in_faction = yes is_faction_leader = yes NOT = { is_in_faction_with = HOL } } add_to_faction = HOL } else_if = { # HOL is already* in a faction with ENG # this means the removal of AI strategy wont be caught, needs to be done manually limit = { is_in_faction_with = HOL #*we do have to check since it could just be due to lack of any faction at all is_in_array = { array = INS.INS_dutch_ally_tracker value = THIS } } INS_remove_hol_ally_strategy_effect = yes } random_unit_leader = { limit = { is_field_marshal = no skill < 4 } set_nationality = HOL } } HOL = { division_template={ name="British Division" division_names_group="ENG_INF_01" foreign_template_tag="ENG" allow_new_equipment=yes allow_foreign_equipment=yes is_locked = yes support={ engineer={ x=0 y=0 } artillery={ x=0 y=1 } } regiments={ infantry={ x=0 y=0 } infantry={ x=0 y=1 } infantry={ x=0 y=2 } infantry={ x=1 y=0 } infantry={ x=1 y=1 } infantry={ x=1 y=2 } infantry={ x=2 y=0 } infantry={ x=2 y=1 } infantry={ x=2 y=2 } } } if = { limit = { has_event_target = INS_dutch_indonesia } event_target:INS_dutch_indonesia = { random_owned_controlled_state = { limit = { impassable = no } prioritize = { 1058 } create_unit = { division = "name = \"British Division\" division_template = \"British Division\" start_experience_factor = 0.3 start_equipment_factor = 1 start_manpower_factor = 1" owner = HOL allow_spawning_on_enemy_provs = no count = 8 } } } } else = { random_owned_controlled_state = { limit = { is_in_array = { array = INS.owned_states_at_game_start value = THIS } } create_unit = { division = "name = \"British Division\" division_template = \"British Division\" start_experience_factor = 0.3 start_equipment_factor = 1 start_manpower_factor = 1" owner = HOL allow_spawning_on_enemy_provs = no count = 8 } } } } } indonesia_HOL_sign_accord_FRA_effect = { FRA = { add_manpower = -150000 if = { limit = { is_in_faction = yes is_faction_leader = yes NOT = { is_in_faction_with = HOL } } add_to_faction = HOL } else_if = { # HOL is already* in a faction with FRA # this means the removal of AI strategy wont be caught, needs to be done manually limit = { is_in_faction_with = HOL #*we do have to check since it could just be due to lack of any faction at all is_in_array = { array = INS.INS_dutch_ally_tracker value = THIS } } INS_remove_hol_ally_strategy_effect = yes } random_unit_leader = { limit = { is_field_marshal = no skill < 4 } set_nationality = HOL } } HOL = { division_template={ name="French Division" division_names_group="FRA_INF_01" foreign_template_tag="FRA" allow_new_equipment=yes allow_foreign_equipment=yes is_locked = yes support={ engineer={ x=0 y=0 } artillery={ x=0 y=1 } } regiments={ infantry={ x=0 y=0 } infantry={ x=0 y=1 } infantry={ x=0 y=2 } infantry={ x=1 y=0 } infantry={ x=1 y=1 } infantry={ x=1 y=2 } infantry={ x=2 y=0 } infantry={ x=2 y=1 } infantry={ x=2 y=2 } } } if = { limit = { has_event_target = INS_dutch_indonesia } event_target:INS_dutch_indonesia = { random_owned_controlled_state = { limit = { impassable = no } prioritize = { 1058 } create_unit = { division = "name = \"French Division\" division_template = \"French Division\" start_experience_factor = 0.5 start_equipment_factor = 1 start_manpower_factor = 1" owner = HOL allow_spawning_on_enemy_provs = no count = 14 } } } } else = { random_owned_controlled_state = { limit = { is_in_array = { array = INS.owned_states_at_game_start value = THIS } } create_unit = { division = "name = \"French Division\" division_template = \"French Division\" start_experience_factor = 0.5 start_equipment_factor = 1 start_manpower_factor = 1" owner = HOL allow_spawning_on_enemy_provs = no count = 14 } } } } } indonesia_two_state_solution_effect = { custom_effect_tooltip = INS_end_to_bloodshed_tt } indonesia_HOL_british_support_effect = { ENG = { add_manpower = -25000 } HOL = { add_offsite_building = { type = arms_factory level = 1 } add_manpower = 25000 } } indonesia_give_jap_resource_rights_effect = { INS = { give_resource_rights = { receiver = JAP state = 672 #South Sumatra } give_resource_rights = { receiver = JAP state = 1049 #Medan and Riouw } } JAP = { add_timed_idea = { idea = INS_JAP_repaying_industrialists days = 240 } } INS = { add_offsite_building = { type = industrial_complex level = 5 } add_offsite_building = { type = arms_factory level = 2 } add_offsite_building = { type = dockyard level = 2 } } } indonesia_evaluate_escalation_effect = { if = { limit = { NOT = { has_country_flag = INS_war_escalation_2_flag } check_variable = { INS.INS_war_escalation_level > 1 } } INS = { set_country_flag = INS_war_escalation_2_flag } HOL = { set_country_flag = INS_war_escalation_2_flag } } if = { limit = { NOT = { has_country_flag = INS_war_escalation_3_flag } check_variable = { INS.INS_war_escalation_level > 2 } } INS = { set_country_flag = INS_war_escalation_3_flag } HOL = { set_country_flag = INS_war_escalation_3_flag } HOL = { custom_effect_tooltip = available_focus_tt custom_effect_tooltip = INSHOL_franco_dutch_accord custom_effect_tooltip = INSHOL_london_batavia_accord } } if = { limit = { NOT = { has_country_flag = INS_war_escalation_4_flag } check_variable = { INS.INS_war_escalation_level > 3 } } INS = { set_country_flag = INS_war_escalation_4_flag } HOL = { set_country_flag = INS_war_escalation_4_flag } HOL = { unlock_decision_tooltip = INS_revolution_war_HOL } } if = { limit = { NOT = { has_country_flag = INS_war_escalation_5_flag } check_variable = { INS.INS_war_escalation_level > 4 } } INS = { set_country_flag = INS_war_escalation_5_flag } HOL = { set_country_flag = INS_war_escalation_5_flag } INS = { country_event = { id = INS_chaos_events.1 #Battle in Surabaya hours = 1 } } } if = { limit = { NOT = { has_country_flag = INS_war_escalation_6_flag } check_variable = { INS.INS_war_escalation_level > 5 } } INS = { set_country_flag = INS_war_escalation_6_flag } HOL = { set_country_flag = INS_war_escalation_6_flag } } if = { limit = { NOT = { has_country_flag = INS_war_escalation_7_flag } check_variable = { INS.INS_war_escalation_level > 6 } } INS = { set_country_flag = INS_war_escalation_7_flag } HOL = { set_country_flag = INS_war_escalation_7_flag } HOL = { custom_effect_tooltip = no_penalties_war_tt } INS = { custom_effect_tooltip = available_focus_tt custom_effect_tooltip = INSHOL_rapid_escalation } } if = { limit = { NOT = { has_country_flag = INS_war_escalation_8_flag } check_variable = { INS.INS_war_escalation_level > 7 } } INS = { set_country_flag = INS_war_escalation_8_flag } HOL = { set_country_flag = INS_war_escalation_8_flag } HOL = { custom_effect_tooltip = INS_war_escalation_8_tt } INS = { country_event = { id = INS_chaos_events.3 #Failed attempt on Sukarno's Life hours = 4 } } } if = { limit = { NOT = { has_country_flag = INS_war_escalation_9_flag } check_variable = { INS.INS_war_escalation_level > 8 } } INS = { set_country_flag = INS_war_escalation_9_flag } HOL = { set_country_flag = INS_war_escalation_9_flag } INS = { country_event = { id = INS_chaos_events.2 #Socialist Parties Merge hours = 4 } } } if = { limit = { NOT = { has_country_flag = INS_war_escalation_10_flag } check_variable = { INS.INS_war_escalation_level > 9 } } INS = { set_country_flag = INS_war_escalation_10_flag } HOL = { set_country_flag = INS_war_escalation_10_flag } INS = { custom_effect_tooltip = available_focus_tt custom_effect_tooltip = INSHOL_renville_agreement } } } indonesia_sjahrir_focus_effect = { INS_sutan_sjahrir = { add_country_leader_trait = INS_trusted_leader } } indonesia_sjarifuddin_focus_effect = { INS_amir_sjarifuddin_harahap = { add_country_leader_role = { promote_leader = yes country_leader = { ideology = socialism expire = "1965.1.1.1" traits = { INS_compromising_centrist } } } } add_popularity = { ideology = communism popularity = 0.05 } } indonesia_hatta_focus_effect = { INS_mohammad_hatta = { add_country_leader_role = { promote_leader = yes country_leader = { ideology = conservatism expire = "1965.1.1.1" traits = { INS_the_proclamator } } } } add_popularity = { ideology = neutrality popularity = 0.1 } add_popularity = { ideology = democratic popularity = 0.1 } } indonesia_direct_democracy_focus_effect = { INS_national_committee = { add_country_leader_role = { promote_leader = yes country_leader = { ideology = populism expire = "1965.1.1.1" traits = { INS_inefficient_government } } } } add_popularity = { ideology = democratic popularity = 0.2 } custom_effect_tooltip = newline_tt custom_effect_tooltip = available_political_advisor set_country_flag = INS_socialist_loyalty show_ideas_tooltip = INS_surachman_tjokoadisurjo } indonesia_seize_oppurtunity_reconquest_effect = { 1058 = { hidden_effect = { add_dynamic_modifier = { modifier = INS_state_revolution_hq } save_global_event_target_as = INS_revolution_hq add_to_variable = { influence_point_count = 3 } } custom_effect_tooltip = INS_big_militia_presence_tt } 335 = { #West Java hidden_effect = { add_to_variable = { influence_point_count = 3 } add_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } custom_effect_tooltip = INS_big_militia_presence_tt } 672 = { #South Sumatra hidden_effect = { add_to_variable = { influence_point_count = 3 } add_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } custom_effect_tooltip = INS_big_militia_presence_tt } 1047 = { #Bangka-Belitung hidden_effect = { add_to_variable = { influence_point_count = 3 } add_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } custom_effect_tooltip = INS_big_militia_presence_tt } 673 = { #Sulawesi hidden_effect = { add_to_variable = { influence_point_count = 3 } add_dynamic_modifier = { modifier = INS_state_militia_activity_3 } } custom_effect_tooltip = INS_big_militia_presence_tt } complete_national_focus = INS_the_declaration_of_independence if = { limit = { is_subject = yes #just in case } OVERLORD = { end_puppet = INS } } } indonesia_seize_oppurtunity_independent_effect = { unlock_national_focus = INS_the_declaration_of_independence unlock_national_focus = INS_laskar_rakjat unlock_national_focus = INS_political_stabilization if = { limit = { is_subject = yes #just in case } OVERLORD = { end_puppet = INS } } } indonesia_phillipines_unite_effect = { INS = { annex_country = { target = PHI transfer_troops = yes } set_cosmetic_tag = INS_maphilindo } 623 = { add_core_of = INS } 327 = { add_core_of = INS } 624 = { add_core_of = INS } 626 = { add_core_of = INS } 628 = { add_core_of = INS } 625 = { add_core_of = INS } 627 = { add_core_of = INS } 1025 = { add_core_of = INS } 1026 = { add_core_of = INS } 1027 = { add_core_of = INS } } INS_refresh_malaya_controllers = { clear_array = INS.malaya_controllers for_each_scope_loop = { array = INS.malaya_states if = { limit = { NOT = { controller = { is_in_array = { array = INS.malaya_controllers value = THIS } } } } controller = { add_to_array = { array = INS.malaya_controllers value = THIS } } } } } #Reset all variables related to limited wars INS_clear_limited_war_variables = { hidden_effect = { clear_variable = INS.limited_war_lost_state_concession clear_array = INS.limited_war_states clear_array = INS.limited_war_target_allies clear_variable = INS.pre_limited_war_faction_leader clear_variable = INS.limited_war_target INS_refresh_malaya_controllers = yes set_rule = { can_join_factions = yes } } } #Re-Ads Indonesia to the old faction it was in pre-limited war if it was in one INS_re_add_to_old_faction = { if = { limit = { has_variable = pre_limited_war_faction_leader NOT = { has_war_with = var:pre_limited_war_faction_leader } var:pre_limited_war_faction_leader = { exists = yes is_subject = no has_capitulated = no is_faction_leader = yes } } set_rule = { can_join_factions = yes } var:pre_limited_war_faction_leader = { add_to_faction = ROOT } } } INS_peace_out = { for_each_scope_loop = { array = INS.limited_war_target_allies if = { limit = { has_war_with = INS } white_peace = { tag = INS } every_subject_country = { limit = { has_war_with = INS } white_peace = { tag = INS } } } } if = { limit = { has_variable = INS.limited_war_target } white_peace = { tag = var:INS.limited_war_target } } } INS_set_hol_ally_strategy_effect = { if = { # Confirm the country is actually meant to have this, to avoid a double remove limit = { NOT = { AND = { has_global_flag = INSHOL_london_batavia_accord_signed original_tag = ENG } AND = { has_global_flag = INSHOL_franco_dutch_accord_signed original_tag = FRA } has_global_flag = INS_should_be_defended } } event_target:INS_dutch_indonesia = { PREV = { add_ai_strategy = { type = dont_defend_ally_borders id = PREV value = 100 } add_ai_strategy = { type = ignore id = PREV value = 100 } add_to_array = { array = INS.INS_dutch_ally_tracker value = THIS } } } } } INS_remove_hol_ally_strategy_effect = { event_target:INS_dutch_indonesia = { PREV = { add_ai_strategy = { type = dont_defend_ally_borders id = PREV value = -100 } add_ai_strategy = { type = ignore id = PREV value = -100 } remove_from_array = { array = INS.INS_dutch_ally_tracker value = THIS } } } } INS_cancel_hol_ally_strategy_entirely_effect = { if = { limit = { has_dlc = "Thunder at Our Gates" } set_global_flag = INS_should_be_defended every_country = { limit = { is_in_array = { array = INS.INS_dutch_ally_tracker value = THIS } } INS_remove_hol_ally_strategy_effect = yes } } }