Not exactly a bug, but a general design problem: if I understood correctly, cultural union tags that don't have any existing country with their national culture (Hungary, for example) cannot achieve freedom by rebelling. This is because they can't have nationalist rebels, but their pan-nationalist rebels will have no effect, as there's no nation to give the crown to. Did I interpret the code correctly?
If so, would it be pertinent to create another type of rebel the "pan-nationalist without a motherland", in order to allow their independence? This rebel type would have exactly the same pan-nationalist characteristics, except that its trigger and effect would be the same of the Nationalist Rebel. The tricky part, however, would be to identify if there's any country with their main culture - if there is, the standard pan-nationalist should be used.
I found a new trigger, "someone_can_form_union_tag = <tag>", which was added in 1.2 and seems to be useful to the "tricky" part, but I'm not sure how it works (it could be looking only for great powers, for example).
I tried to codefy this new kind of rebel, but I'm not sure how sucessful it is - could you help me?
Here's the code:
Code:
###################################
# Pan-Nationalist Rebels
###################################
pan_nationalist_rebels = {
icon = 6
area = culture_group
break_alliance_on_win = no
# <this is the governement in the country> = <this is what the rebels want>
government = {
proletarian_dictatorship = proletarian_dictatorship
presidential_dictatorship = presidential_dictatorship
bourgeois_dictatorship = bourgeois_dictatorship
fascist_dictatorship = fascist_dictatorship
absolute_monarchy = absolute_monarchy
prussian_constitutionalism = prussian_constitutionalism
hms_government = hms_government
democracy = democracy
}
defection = pan_nationalist # If the country seeks independence, defection specifies what type of provinces it wants.
independence = none
defect_delay = 6 # Can spontaneously declare independence after 12 months (earliest)
ideology = liberal
allow_all_cultures = yes
allow_all_culture_groups = no
allow_all_religions = yes
allow_all_ideologies = yes
resilient = yes # Disbands on retreat
reinforcing = yes # Does not receive reinforcements
general = yes # Does not use generals
smart = yes # Does not assault forts, tactically withdraw from battle, etc.
unit_transfer = no # Units remain after enforcing demands.
# triggers a general rising, modifier will be multiplied with the countrys army strength and compared to the factions strenght
will_rise =
{
factor = 1
modifier = {
war = yes
factor = 0.8
}
modifier = {
war_exhaustion = 4
factor = 0.95
}
modifier = {
war_exhaustion = 6
factor = 0.95
}
modifier = {
war_exhaustion = 8
factor = 0.95
}
modifier = {
factor = 0.4
country = {
has_country_modifier = springtime_of_nations
}
}
modifier = {
factor = 0.75 #1.5
country = {
has_country_modifier = global_liberal_agitation
}
}
}
# The rebel type with the highest modifier for this pop gets picked
spawn_chance = {
factor = 10
modifier = {
factor = 0
OR = {
culture_has_union_tag = no
is_cultural_union = THIS
NOT = { is_culture_group = THIS }
}
}
modifier = {
factor = 0
cultural_union = {
exists = yes
}
}
modifier = { ##################### HERE IS THE NEW MODIFIER ##################
factor = 0
NOT = { someone_can_form_union_tag = cultural_union }
}
modifier = {
factor = 1
war = yes
}
modifier = {
factor = 0
country = {
is_greater_power = yes
}
}
modifier = {
factor = 0
OR = {
culture = north_italian
culture = south_italian
}
}
modifier = {
factor = 50
OR = {
country = {
has_country_modifier = global_liberal_agitation
has_country_modifier = springtime_of_nations
}
}
}
modifier = {
factor = 30
pop_majority_ideology = liberal
}
modifier = {
factor = 20
pop_majority_ideology = anarcho_liberal
}
modifier = {
factor = 1.5
political_reform_want = 0.05
}
modifier = {
factor = 1.5
political_reform_want = 0.1
}
modifier = {
factor = 1.5
political_reform_want = 0.15
}
}
#This is checked for EACH province in the Area of Operations
movement_evaluation = {
factor = 1
modifier = {
factor = 0.1
units_in_province = 1
}
modifier = {
factor = 0.001
controlled_by = REB
}
modifier = {
factor = 1.5
average_militancy = 4
}
modifier = {
factor = 1.5
average_militancy = 6
}
modifier = {
factor = 1.5
average_militancy = 8
}
modifier = {
factor = 2.0
is_capital = yes
}
}
# Province Scope
#siege_won_trigger = {
#}
#siege_won_effect = {
#}
# Country scope
demands_enforced_trigger = {
capital_scope = {
controlled_by = REB
province_control_days = 180 #365
}
}
demands_enforced_effect = {
political_reform = wealth_voting
political_reform = population_equal_weight
political_reform = yes_meeting
political_reform = free_press
political_reform = non_socialist
political_reform = secret_ballots
random_country = {
limit = {
is_culture_group = THIS
OR = {
is_greater_power = yes
tag = WAL
tag = MOL
}
NOT = {
tag = AUS
tag = KUK
is_cultural_union = yes
}
}
country_event = 11100
}
}
}
###################################
# Pan-Nationalist Rebels without a home
###################################
pan_nationalist_rebels2 = {
icon = 6
area = culture_group
break_alliance_on_win = no
# <this is the governement in the country> = <this is what the rebels want>
government = {
proletarian_dictatorship = proletarian_dictatorship
presidential_dictatorship = presidential_dictatorship
bourgeois_dictatorship = bourgeois_dictatorship
fascist_dictatorship = fascist_dictatorship
absolute_monarchy = absolute_monarchy
prussian_constitutionalism = prussian_constitutionalism
hms_government = hms_government
democracy = democracy
}
defection = pan_nationalist # If the country seeks independence, defection specifies what type of provinces it wants.
independence = culture
defect_delay = 6 # Can spontaneously declare independence after 12 months (earliest)
ideology = liberal
allow_all_cultures = yes
allow_all_culture_groups = no
allow_all_religions = yes
allow_all_ideologies = yes
resilient = yes # Disbands on retreat
reinforcing = yes # Does not receive reinforcements
general = yes # Does not use generals
smart = yes # Does not assault forts, tactically withdraw from battle, etc.
unit_transfer = no # Units remain after enforcing demands.
# triggers a general rising, modifier will be multiplied with the countrys army strength and compared to the factions strenght
will_rise =
{
factor = 1
modifier = {
war = yes
factor = 0.8
}
modifier = {
war_exhaustion = 4
factor = 0.95
}
modifier = {
war_exhaustion = 6
factor = 0.95
}
modifier = {
war_exhaustion = 8
factor = 0.95
}
modifier = {
factor = 0.4
country = {
has_country_modifier = springtime_of_nations
}
}
modifier = {
factor = 0.75 #1.5
country = {
has_country_modifier = global_liberal_agitation
}
}
}
# The rebel type with the highest modifier for this pop gets picked
spawn_chance = {
factor = 10
modifier = {
factor = 0
OR = {
culture_has_union_tag = no
is_cultural_union = THIS
NOT = { is_culture_group = THIS }
}
}
modifier = {
factor = 0
cultural_union = {
exists = yes
}
}
modifier = { ##################### HERE IS THE NEW MODIFIER ##################
factor = 0
someone_can_form_union_tag = cultural_union
}
modifier = {
factor = 1
war = yes
}
modifier = {
factor = 0
country = {
is_greater_power = yes
}
}
modifier = {
factor = 0
OR = {
culture = north_italian
culture = south_italian
}
}
modifier = {
factor = 50
OR = {
country = {
has_country_modifier = global_liberal_agitation
has_country_modifier = springtime_of_nations
}
}
}
modifier = {
factor = 30
pop_majority_ideology = liberal
}
modifier = {
factor = 20
pop_majority_ideology = anarcho_liberal
}
modifier = {
factor = 1.5
political_reform_want = 0.05
}
modifier = {
factor = 1.5
political_reform_want = 0.1
}
modifier = {
factor = 1.5
political_reform_want = 0.15
}
}
#This is checked for EACH province in the Area of Operations
movement_evaluation = {
factor = 1
modifier = {
factor = 0.1
units_in_province = 1
}
modifier = {
factor = 0.001
controlled_by = REB
}
modifier = {
factor = 1.5
average_militancy = 4
}
modifier = {
factor = 1.5
average_militancy = 6
}
modifier = {
factor = 1.5
average_militancy = 8
}
modifier = {
factor = 2.0
is_capital = yes
}
}
# Province Scope
#siege_won_trigger = {
#}
#siege_won_effect = {
#}
# Country scope
demands_enforced_trigger = { # it will be enforced like the nationalist one
independence = {
all_core = {
OR = {
controlled_by_rebels = yes
NOT = { owned_by = THIS }
}
province_control_days = 60
}
}
}
demands_enforced_effect = {
# political_reform = wealth_voting
# political_reform = state_equal_weight
# political_reform = yes_meeting
# political_reform = free_press
# political_reform = non_socialist
# political_reform = secret_ballots
release_vassal = REB
}
}