Europa Universalis IV

Europa Universalis IV

Reformable Nations
How to add nations not already in the mod.
This is the code for adding Hisn Kaifa. What I ended up doing was copy Adal (which is the first nation in the mod txt file) and changed everything where you see a "*" next it with a small explanation.

# Ayyubids "*" Just changed the name
rn_HSN = { ("*" Changed the name of the decision trigger.)
major = yes
potential = {
culture_group = iranian ("*"ensur it is the proper culture group of cust nation.)
normal_or_historical_nations = yes
was_never_end_game_tag_trigger = yes
NOT = { tag = HSN } ("*" ensure it doesn't already exist.)
}
provinces_to_highlight = {
OR = {
province_id = 4295 ("*" Capital provice ID.)
}
OR = {
NOT = { owned_by = ROOT }
NOT = { is_core = ROOT }
}
}
allow = {
is_at_war = no
is_free_or_tributary_trigger = yes
NOT = { exists = HSN } ("*" ensure it doesn't already exist.)
owns_core_province = 4295 ("*" Capital provice ID.)
}
effect = {
change_tag = HSN ("*"Ensure this is the tag of the nation u wnt to switch to.)
swap_non_generic_missions = yes
add_country_modifier = {
name = "centralization_modifier"
duration = 7300
}
add_prestige = 25
country_event = { id = ideagroups.1 }
set_country_flag = formed_ayyubids_flag ("*"Ensure actual full name is here.)
}
ai_will_do = {
factor = 0
}
}