Im making a mod where the HRE doesnt exist in the start dates and the dukes and lords get subjugation cbs on each other to reform the hre possibly.
I just can't figure out how cb modding works and why my cb doesnt work. i tried reading forum posts, read countless wiki entries and asked other modders but i dont get it.
i want the subjugation to only be able to be used by people in the de jure HRE/italia on others in those areas.
I do not understand how the naming works or why i cant get the cb to work at all.
it says it should merge with the other cb types on the wiki but i dont get how so i just tested it by pasting it in the existing files.
Heres my code:
hre_subjugation = {
name = CB_NAME_IMPERIAL_SUBJUGATION
war_name = WAR_NAME_IMPERIAL_SUBJUGATION
sprite = 17
truce_days = 365
hostile_against_others = yes
is_permanent = yes
can_ask_to_join_war = yes
check_de_jure_tier = KING # this scans all de jure kingdoms for the counties which are held by or vassals(or below) of selected character. Only valid if is_permanent = yes
allowed_to_target_tributaries = no
sort_priority = 2000
can_use_gui = {
ROOT = {
piety = 200
prestige = 1000
}
}
on_add = {
ROOT = { piety = -200 }
ROOT = { prestige = -500 }
if = {
limit = { defender = { is_offmap_governor = offmap_china } }
attacker = {
sound_effect = china_angered_emperor
detract_grace_super_huge_effect = yes
}
}
}
can_use = {
ROOT = {
independent = yes
religion_group = christian
OR = {
de_jure_liege_or_above = k_italy
de_jure_liege_or_above = k_bavaria
de_jure_liege_or_above = k_frisia
de_jure_liege_or_above = k_lotharingia
de_jure_liege_or_above = k_sardinia
de_jure_liege_or_above = k_switzerland
de_jure_liege_or_above = k_romagna
de_jure_liege_or_above = k_carinthia
de_jure_liege_or_above = k_bohemia
de_jure_liege_or_above = k_germany
de_jure_liege_or_above = k_saxony
de_jure_liege_or_above = k_hansa
}
is_nomadic = no
NOT = { has_character_modifier = launched_subjugation }
mercenary = no
}
FROM = {
religion = ROOT
NOT = { is_offmap_governor = yes }
}
}
can_use_title = {
FROM = {
any_realm_title = {
OR = {
de_jure_liege_or_above = k_italy
de_jure_liege_or_above = k_bavaria
de_jure_liege_or_above = k_frisia
de_jure_liege_or_above = k_lotharingia
de_jure_liege_or_above = k_sardinia
de_jure_liege_or_above = k_switzerland
de_jure_liege_or_above = k_romagna
de_jure_liege_or_above = k_carinthia
de_jure_liege_or_above = k_bohemia
de_jure_liege_or_above = k_germany
de_jure_liege_or_above = k_saxony
de_jure_liege_or_above = k_hansa
}
}
}
}
is_valid_title = {
FROM = {
any_realm_province = {
OR = {
de_jure_liege_or_above = k_italy
de_jure_liege_or_above = k_bavaria
de_jure_liege_or_above = k_frisia
de_jure_liege_or_above = k_lotharingia
de_jure_liege_or_above = k_sardinia
de_jure_liege_or_above = k_switzerland
de_jure_liege_or_above = k_romagna
de_jure_liege_or_above = k_carinthia
de_jure_liege_or_above = k_bohemia
de_jure_liege_or_above = k_germany
de_jure_liege_or_above = k_saxony
de_jure_liege_or_above = k_hansa
}
}
}
}
on_add_title = {
ROOT = {
add_character_modifier = {
name = launched_subjugation
days = 36500
hidden = yes
}
}
}
on_success = {
ROOT = {
prestige = 500
}
any_attacker = {
limit = { NOT = { character = ROOT } }
hidden_tooltip = { participation_scaled_prestige = 100 }
}
FROM = {
prestige = -500
}
}
on_success_title = {
custom_tooltip = {
text = pagan_subjugation_tip
hidden_tooltip = {
ROOT = {
subjugate_or_take_under_title = { # If the target only has territory within the kingdom, he is simply vassalized
title = PREV
enemy = FROM
}
}
}
}
}
on_fail = {
FROM = {
prestige = 50
participation_scaled_prestige = 50
}
any_defender = {
limit = { NOT = { character = FROM } }
hidden_tooltip = { participation_scaled_prestige = 50 }
}
ROOT = {
prestige = -100
}
}
on_reverse_demand = {
ROOT = {
prestige = -500
transfer_scaled_wealth = {
to = FROM
value = 2.0
}
}
FROM = {
prestige = 100
if = {
limit = {
has_dlc = "Legacy of Rome"
OR = {
has_landed_title = e_byzantium
has_landed_title = e_roman_empire
}
OR = {
religion_group = christian
religion = hellenic_pagan
religion = hellenic_pagan_reformed
}
}
hidden_tooltip = { character_event = { id = LoR.30 days = 12 } }
}
participation_scaled_prestige = 100
}
any_defender = {
limit = { NOT = { character = FROM } }
hidden_tooltip = { participation_scaled_prestige = 100 }
}
}
attacker_ai_victory_worth = {
factor = -1 # always accept
}
attacker_ai_defeat_worth = {
factor = 100
}
defender_ai_victory_worth = {
factor = -1 # always accept
}
defender_ai_defeat_worth = {
factor = 100
}
ai_will_do = {
factor = 1
modifier = {
factor = 0.9 # Prefer using CB's without on_add costs
}
}
}
I just can't figure out how cb modding works and why my cb doesnt work. i tried reading forum posts, read countless wiki entries and asked other modders but i dont get it.
i want the subjugation to only be able to be used by people in the de jure HRE/italia on others in those areas.
I do not understand how the naming works or why i cant get the cb to work at all.
it says it should merge with the other cb types on the wiki but i dont get how so i just tested it by pasting it in the existing files.
Heres my code:
hre_subjugation = {
name = CB_NAME_IMPERIAL_SUBJUGATION
war_name = WAR_NAME_IMPERIAL_SUBJUGATION
sprite = 17
truce_days = 365
hostile_against_others = yes
is_permanent = yes
can_ask_to_join_war = yes
check_de_jure_tier = KING # this scans all de jure kingdoms for the counties which are held by or vassals(or below) of selected character. Only valid if is_permanent = yes
allowed_to_target_tributaries = no
sort_priority = 2000
can_use_gui = {
ROOT = {
piety = 200
prestige = 1000
}
}
on_add = {
ROOT = { piety = -200 }
ROOT = { prestige = -500 }
if = {
limit = { defender = { is_offmap_governor = offmap_china } }
attacker = {
sound_effect = china_angered_emperor
detract_grace_super_huge_effect = yes
}
}
}
can_use = {
ROOT = {
independent = yes
religion_group = christian
OR = {
de_jure_liege_or_above = k_italy
de_jure_liege_or_above = k_bavaria
de_jure_liege_or_above = k_frisia
de_jure_liege_or_above = k_lotharingia
de_jure_liege_or_above = k_sardinia
de_jure_liege_or_above = k_switzerland
de_jure_liege_or_above = k_romagna
de_jure_liege_or_above = k_carinthia
de_jure_liege_or_above = k_bohemia
de_jure_liege_or_above = k_germany
de_jure_liege_or_above = k_saxony
de_jure_liege_or_above = k_hansa
}
is_nomadic = no
NOT = { has_character_modifier = launched_subjugation }
mercenary = no
}
FROM = {
religion = ROOT
NOT = { is_offmap_governor = yes }
}
}
can_use_title = {
FROM = {
any_realm_title = {
OR = {
de_jure_liege_or_above = k_italy
de_jure_liege_or_above = k_bavaria
de_jure_liege_or_above = k_frisia
de_jure_liege_or_above = k_lotharingia
de_jure_liege_or_above = k_sardinia
de_jure_liege_or_above = k_switzerland
de_jure_liege_or_above = k_romagna
de_jure_liege_or_above = k_carinthia
de_jure_liege_or_above = k_bohemia
de_jure_liege_or_above = k_germany
de_jure_liege_or_above = k_saxony
de_jure_liege_or_above = k_hansa
}
}
}
}
is_valid_title = {
FROM = {
any_realm_province = {
OR = {
de_jure_liege_or_above = k_italy
de_jure_liege_or_above = k_bavaria
de_jure_liege_or_above = k_frisia
de_jure_liege_or_above = k_lotharingia
de_jure_liege_or_above = k_sardinia
de_jure_liege_or_above = k_switzerland
de_jure_liege_or_above = k_romagna
de_jure_liege_or_above = k_carinthia
de_jure_liege_or_above = k_bohemia
de_jure_liege_or_above = k_germany
de_jure_liege_or_above = k_saxony
de_jure_liege_or_above = k_hansa
}
}
}
}
on_add_title = {
ROOT = {
add_character_modifier = {
name = launched_subjugation
days = 36500
hidden = yes
}
}
}
on_success = {
ROOT = {
prestige = 500
}
any_attacker = {
limit = { NOT = { character = ROOT } }
hidden_tooltip = { participation_scaled_prestige = 100 }
}
FROM = {
prestige = -500
}
}
on_success_title = {
custom_tooltip = {
text = pagan_subjugation_tip
hidden_tooltip = {
ROOT = {
subjugate_or_take_under_title = { # If the target only has territory within the kingdom, he is simply vassalized
title = PREV
enemy = FROM
}
}
}
}
}
on_fail = {
FROM = {
prestige = 50
participation_scaled_prestige = 50
}
any_defender = {
limit = { NOT = { character = FROM } }
hidden_tooltip = { participation_scaled_prestige = 50 }
}
ROOT = {
prestige = -100
}
}
on_reverse_demand = {
ROOT = {
prestige = -500
transfer_scaled_wealth = {
to = FROM
value = 2.0
}
}
FROM = {
prestige = 100
if = {
limit = {
has_dlc = "Legacy of Rome"
OR = {
has_landed_title = e_byzantium
has_landed_title = e_roman_empire
}
OR = {
religion_group = christian
religion = hellenic_pagan
religion = hellenic_pagan_reformed
}
}
hidden_tooltip = { character_event = { id = LoR.30 days = 12 } }
}
participation_scaled_prestige = 100
}
any_defender = {
limit = { NOT = { character = FROM } }
hidden_tooltip = { participation_scaled_prestige = 100 }
}
}
attacker_ai_victory_worth = {
factor = -1 # always accept
}
attacker_ai_defeat_worth = {
factor = 100
}
defender_ai_victory_worth = {
factor = -1 # always accept
}
defender_ai_defeat_worth = {
factor = 100
}
ai_will_do = {
factor = 1
modifier = {
factor = 0.9 # Prefer using CB's without on_add costs
}
}
}