Could anyone show me the event template to make a country's flag (and name, too) change automatically if they change government types? I'm aware the flag mod does the same thing, but I'd like to do my own flags.
Last edited:
event = {
id = 999999
random = no
persistent = yes
country = TAG
decision = {
OR = {
AND = {
NOT = { ispuppet = yes }
NOT = { local_flag = TAG_COM }
OR = {
ideology = leninist
ideology = stalinist
}
}
AND = {
NOT = { ispuppet = yes }
NOT = { local_flag = TAG_DEM }
OR = {
ideology = social_democrat
ideology = social_liberal
ideology = market_liberal
ideology = social_conservative
}
}
AND = {
NOT = { ispuppet = yes }
NOT = { local_flag = TAG_AUT }
ideology = paternal_autocrat
}
AND = {
NOT = { ispuppet = yes }
NOT = { local_flag = TAG_LWR }
ideology = left_wing_radical
}
AND = {
NOT = { ispuppet = yes }
NOT = { local_flag = TAG_FAS }
OR = {
ideology = nazi
ideology = fascist
}
}
AND = {
NOT = { local_flag = TAG_USA }
puppet = {country = TAG country = USA }
}
AND = {
NOT = { local_flag = TAG_GER }
puppet = {country = TAG country = GER }
}
AND = {
NOT = { local_flag = TAG_SOV }
puppet = {country = TAG country = SOV }
}
}
}
name = "Wind of Changes"
desc = "The political reality in our country has changed, and is time to show the rest of the world proudly!"
style = 2
date = { day = 2 month = july year = 1914 }
offset = 30
deathdate = { day = 30 month = december year = 1963 }
action = {
trigger = {
OR = {
ideology = leninist
ideology = stalinist
}
NOT = { local_flag = TAG_COM }
NOT = { ispuppet = yes }
}
name = "Adopt a Leninist Flag"
command = { type = flag_ext where = TAG which = "_len" }
command = { type = name where = TAG which = "PR of TAG"}
command = { type = local_setflag which = TAG_COM }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = leninist
ideology = stalinist
}
NOT = { local_flag = TAG_COM }
NOT = { ispuppet = yes }
}
name = "Adopt a Syndicalist Flag"
command = { type = flag_ext where = TAG which = "_syn" }
command = { type = name where = TAG which = "Commune of TAG"}
command = { type = local_setflag which = TAG_COM }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = leninist
ideology = stalinist
}
NOT = { local_flag = TAG_COM }
NOT = { ispuppet = yes }
}
name = "Adopt a Stalinist Flag"
command = { type = flag_ext where = TAG which = "_sta" }
command = { type = name where = TAG which = "SR of TAG"}
command = { type = local_setflag which = TAG_COM }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = leninist
ideology = stalinist
}
NOT = { local_flag = TAG_COM }
NOT = { ispuppet = yes }
}
name = "Go historically"
ai_chance = 55
command = { type = flag_ext where = TAG which = "" }
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_COM }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = nazi
ideology = fascist
}
NOT = { local_flag = TAG_FAS }
NOT = { ispuppet = yes }
}
name = "Adopt a Nazi Flag"
command = { type = flag_ext where = TAG which = "_naz" }
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = nazi
ideology = fascist
}
NOT = { local_flag = TAG_FAS }
NOT = { ispuppet = yes }
}
name = "Adopt a Fascist Flag"
ai_chance = 55
command = { type = flag_ext where = TAG which = "_fas" }
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
ideology = paternal_autocrat
NOT = { local_flag = TAG_AUT }
NOT = { ispuppet = yes }
}
name = "Adopt a Monarchist Flag"
command = { type = flag_ext where = TAG which = "_aut"}
command = { type = name where = TAG which = "TAG Empire"}
command = { type = local_setflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
ideology = paternal_autocrat
NOT = { local_flag = TAG_AUT }
NOT = { ispuppet = yes }
}
name = "Adopt a New Monarchist Flag"
command = { type = flag_ext where = TAG which = "_aut2"}
command = { type = name where = TAG which = "TAG Neo-Empire"}
command = { type = local_setflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
ideology = paternal_autocrat
NOT = { local_flag = TAG_AUT }
NOT = { ispuppet = yes }
}
name = "Go Historically"
ai_chance = 55
command = { type = flag_ext where = TAG which = ""}
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
ideology = left_wing_radical
NOT = { local_flag = TAG_LWR }
NOT = { ispuppet = yes }
}
name = "Adopt a Left-Wing-Radical Flag"
command = { type = flag_ext where = TAG which = "_lwr"}
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = social_democrat
ideology = social_liberal
ideology = market_liberal
ideology = social_conservative
}
NOT = { local_flag = TAG_DEM }
NOT = { ispuppet = yes }
}
name = "Adopt a Social Conservative Flag"
command = { type = flag_ext where = TAG which = "_sco"}
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = social_democrat
ideology = social_liberal
ideology = market_liberal
ideology = social_conservative
}
NOT = { local_flag = TAG_DEM }
NOT = { ispuppet = yes }
}
name = "Adopt a Social Liberal Flag"
command = { type = flag_ext where = TAG which = "_sli"}
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = social_democrat
ideology = social_liberal
ideology = market_liberal
ideology = social_conservative
}
NOT = { local_flag = TAG_DEM }
NOT = { ispuppet = yes }
}
name = "Adopt a Market Liberal Flag"
command = { type = flag_ext where = TAG which = "_mli"}
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = social_democrat
ideology = social_liberal
ideology = market_liberal
ideology = social_conservative
}
NOT = { local_flag = TAG_DEM }
NOT = { ispuppet = yes }
}
name = "Adopt a Social Democratic Flag"
command = { type = flag_ext where = TAG which = "_sdm" }
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = social_democrat
ideology = social_liberal
ideology = market_liberal
ideology = social_conservative
}
NOT = { local_flag = TAG_DEM }
NOT = { ispuppet = yes }
}
name = "Adopt an Awesome Flag"
command = { type = flag_ext where = TAG which = "_awe"}
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
OR = {
ideology = social_democrat
ideology = social_liberal
ideology = market_liberal
ideology = social_conservative
}
NOT = { local_flag = TAG_DEM }
NOT = { ispuppet = yes }
}
name = "Go Historically"
ai_chance = 55
command = { type = flag_ext where = TAG which = ""}
command = { type = name where = TAG which = ""}
command = { type = local_setflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
puppet = {country = TAG country = USA }
NOT = { local_flag = TAG_USA }
}
name = "Adopt the Flag Suggested by Our Masters"
command = { type = flag_ext where = TAG which = "_usa"}
command = { type = name where = TAG which = "US of TAG"}
command = { type = local_setflag which = TAG_USA }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_GER }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
puppet = {country = TAG country = GER }
NOT = { local_flag = TAG_GER }
}
name = "Adopt the Flag Suggested by Our Masters"
command = { type = flag_ext where = TAG which = "_ger"}
command = { type = name where = TAG which = "Reichkom. TAG"}
command = { type = local_setflag which = TAG_GER }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_SOV }
}
action = {
trigger = {
puppet = {country = TAG country = SOV }
NOT = { local_flag = TAG_SOV }
}
name = "Adopt the Flag Suggested by Our Masters"
command = { type = flag_ext where = TAG which = "_sov"}
command = { type = name where = TAG which = "Soviet Rep. of TAG"}
command = { type = local_setflag which = TAG_SOV }
command = { type = local_clrflag which = TAG_DEM }
command = { type = local_clrflag which = TAG_AUT }
command = { type = local_clrflag which = TAG_LWR }
command = { type = local_clrflag which = TAG_COM }
command = { type = local_clrflag which = TAG_FAS }
command = { type = local_clrflag which = TAG_USA }
command = { type = local_clrflag which = TAG_GER }
}
}
Okay, now how would I change the name of a country?