We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Use the any_demesne_province scope on the root character and either check the province for the flag or scope again to the individual holding in the provance and check the building, this will only work if you personally hold the province so you may want to use any_realm_province instead.
Use the any_demesne_province scope on the root character and either check the province for the flag or scope again to the individual holding in the provance and check the building, this will only work if you personally hold the province so you may want to use any_realm_province instead.
Sorry, I should have been clearer. My mod randomly adds flags to random provinces that allow either gold or silver mines to be built, which provide a large income.
What I want to do is have it so that other realms can declare war on people who have built a gold/silver mine - a greed CB
I tried some code, which is aimed at the province flags, not the actual buildings, but it doesn't seem to work
Code:
cfh_highvalue_gold_greed = {
name = CFH_HIGHVALUE_CB_NAME_GOLD_GREED_CONQUEST
war_name = CFH_HIGHVALUE_WAR_NAME_GOLD_GREED_CONQUEST
sprite = 27
truce_days = 3650
hostile_against_others = yes
full_hostility = yes
is_permanent = yes
check_all_titles = yes # if permanent, setting this to true will check against all of someones titles, including vassal held titles
can_ask_to_join_war = no
allowed_to_target_tributaries = no
infamy_modifier = 2
sort_priority = 795
can_use = {
NOT = {
has_game_rule = {
name = cfh_rule_highvalue
value = off
}
}
ROOT = {
NOT = { is_liege_or_above = FROM }
mercenary = no
clan = no
tier = count
}
}
can_use_title = {
OR = {
if = {
limit = { has_global_flag = cfh_gold_mine_1_flag }
distance = { who = event_target:cfh_gold_mine_1_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_2_flag }
distance = { who = event_target:cfh_gold_mine_2_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_3_flag }
distance = { who = event_target:cfh_gold_mine_3_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_4_flag }
distance = { who = event_target:cfh_gold_mine_4_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_5_flag }
distance = { who = event_target:cfh_gold_mine_5_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_6_flag }
distance = { who = event_target:cfh_gold_mine_6_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_7_flag }
distance = { who = event_target:cfh_gold_mine_7_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_8_flag }
distance = { who = event_target:cfh_gold_mine_8_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_9_flag }
distance = { who = event_target:cfh_gold_mine_9_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_10_flag }
distance = { who = event_target:cfh_gold_mine_10_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_11_flag }
distance = { who = event_target:cfh_gold_mine_11_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_12_flag }
distance = { who = event_target:cfh_gold_mine_12_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_13_flag }
distance = { who = event_target:cfh_gold_mine_13_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_14_flag }
distance = { who = event_target:cfh_gold_mine_14_target value = 1000 }
}
if = {
limit = { has_global_flag = cfh_gold_mine_15_flag }
distance = { who = event_target:cfh_gold_mine_15_target value = 1000 }
}
{
}
is_valid_title = {
OR = {
FROM = {
has_landed_title = PREV
}
holder_scope = {
is_liege_or_above = FROM
}
}
}
on_success_title = {
usurp_title_plus_barony_if_unlanded = { target = ROOT type = invasion }
any_de_jure_vassal_title = { # take all baronies under the one we're fighting for
}
on_fail_title = {
ROOT = {
prestige = -100
}
FROM = {
participation_scaled_prestige = 50
}
any_defender = {
limit = { NOT = { character = FROM } }
hidden_tooltip = { participation_scaled_prestige = 50 }
}
}
on_reverse_demand = {
ROOT = {
prestige = -100
transfer_scaled_wealth = {
to = FROM
value = 2.0
}
}
FROM = {
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.1
ROOT = {
independent = no
same_liege = FROM
}
}
}
}
CB modding is admittedly much less straight forward than the other areas I've tried my hand at, and I'm unaware of any similar cb's I could reference
In make_eunuch and remove_eunuch, the options are only available if the character taking the decision is a eunuch. Is this intentional?
Also, both decisions would be available regardless of whether the target is a eunuch. This won't stop it from displaying, but could be confusing
For make_eunuch, you want to include "NOT = { trait = eunuch }" in the potential, and for remove_eunuch, you want "trait = eunuch" in the potential. Neither should have "trait = eunuch" in the from_potential. For a targetted decision, FROM is the character making the decision and ROOT (default for potential and allow) is the target of the decision
EDIT: I just tested the .dds files with an event, and they didnt appear, so it seems the issue is with the images or the gfx files... but i still have no clue
EDIT: I just tested the .dds files with an event, and they didnt appear, so it seems the issue is with the images or the gfx files... but i still have no clue
Since it is a unique wonder, don't bother with the dynamic background, just include it into your wonder graphics.
"all" is definetly not a correct trigger for backgrounds, iirc it should be something terrain related.
The background graphic file should be a strip of pictures, not individuals.
Taking someone as a concubine is hardcoded. You could mod in your own decision to let you do it in different ways (within some limits), but that wouldn't affect how the original decision works, and though you could disable that in the defines if you want to do so that would mean the AI would have to use something else, meaning you'd need to add your own AI logic and likely some loss of performance, so it isn't really recommended.
Thanks a lot ... I wanted to restrict the "get a concubine"-decision for several women (e.g. women who already has children) ... but well, not as easy as I thought.
For make_eunuch, you want to include "NOT = { trait = eunuch }" in the potential, and for remove_eunuch, you want "trait = eunuch" in the potential. Neither should have "trait = eunuch" in the from_potential. For a targetted decision, FROM is the character making the decision and ROOT (default for potential and allow) is the target of the decision
succ_papal_succession = {
potential = {
OR = {
title = k_papal_state
title = d_baltic_pagan_reformed
title = d_tengri_pagan_reformed
title = d_finnish_pagan_reformed
title = d_aztec_reformed
title = d_slavic_pagan_reformed
title = d_west_african_pagan_reformed
title = d_zun_pagan_reformed
title = d_zoroastrian
title = d_jewish
title = d_fraticelli
}
}
effect = {
succession = papal_succession
}
revoke_allowed = {
always = no
}
Code:
succ_open_elective = {
potential = {
NOR = {
title = k_papal_state
title = d_baltic_pagan_reformed
title = d_tengri_pagan_reformed
title = d_finnish_pagan_reformed
title = d_aztec_reformed
title = d_slavic_pagan_reformed
title = d_west_african_pagan_reformed
title = d_zun_pagan_reformed
title = d_zoroastrian
title = d_jewish
title = d_fraticelli
title = e_byzantium
title = e_roman_empire
}
NOT = { title = k_papal_state }
temporary = no
OR = {
is_primary_type_title = yes
holy_order = yes
AND = {
tier = baron
OR = {
is_republic = yes
AND = {
is_theocracy = yes
NOT = { holder_scope = { religion_group = muslim } }
}
}
}
holder_scope = {
OR = {
is_republic = yes
AND = {
is_theocracy = yes
NOT = { religion_group = muslim }
}
}
}
}
OR = {
is_landless_type_title = yes
holder_scope = { is_theocracy = no }
holder_scope = {
NOT = { religion = catholic }
NOT = { religion = fraticelli }
}
}
holder_scope = {
is_patrician = no
is_merchant_republic = no
OR = {
independent = yes
is_feudal = no
NOT = {
any_liege = {
holy_order = yes
}
}
}
}
NAND = {
has_law = succession_voting_power_1
OR = {
has_law = succ_feudal_elective
has_law = succ_hre_elective
}
}
NOT = { holder_scope = { government = confucian_bureaucracy } }
NOT = { holder_scope = { government = chinese_imperial_government } }
}
effect = {
succession = open_elective
}
revoke_allowed = {
always = no
}
}
Well I tried my best to reimplement the "pagan papal" mod to new version of ck2 but something is going wrong here and I can't figure out why. It says no elector for finnish pagan one, and stays open elective for the tengri one
I haven't successfully gotten papal succession to work outside of Catholicism (though if you can bring up the college of cardinals without crashing, you did better than my attempt).
If you do get it, it would probably be best to attach the functionality to a new leadership reformation option for pagans, which will create a heirocratic head using this succession. This will avoid issues if the player reforms with temporal or autocephalus, which I suspect will cause problems, while also giving reformers a choice on if they want to use it. Related, you can add d_norse_pagan_reformed to the list, since they aren't always playable now.
I haven't successfully gotten papal succession to work outside of Catholicism (though if you can bring up the college of cardinals without crashing, you did better than my attempt).
If you do get it, it would probably be best to attach the functionality to a new leadership reformation option for pagans, which will create a heirocratic head using this succession. This will avoid issues if the player reforms with temporal or autocephalus, which I suspect will cause problems, while also giving reformers a choice on if they want to use it. Related, you can add d_norse_pagan_reformed to the list, since they aren't always playable now.
I believe you can get the college of cardinals to not crash if you edit the GUI files - there's actually a wiki page on GUI modding that tells you exactly how to do that. I know you can get anyone to have papal succession if you make enough of the other succession laws unavailable, but I have no idea what happens when multiple people of the same religion have papal succession.
Since it is a unique wonder, don't bother with the dynamic background, just include it into your wonder graphics.
"all" is definetly not a correct trigger for backgrounds, iirc it should be something terrain related.
The background graphic file should be a strip of pictures, not individuals.
Well then, I guess the wiki is wrong . Thanks for the help, I'll just assign it to every terrrain type or just include it in the gfx. I just want that nice highlight behind the wonder.
I haven't successfully gotten papal succession to work outside of Catholicism (though if you can bring up the college of cardinals without crashing, you did better than my attempt).
If you do get it, it would probably be best to attach the functionality to a new leadership reformation option for pagans, which will create a heirocratic head using this succession. This will avoid issues if the player reforms with temporal or autocephalus, which I suspect will cause problems, while also giving reformers a choice on if they want to use it. Related, you can add d_norse_pagan_reformed to the list, since they aren't always playable now.
Well I do use heirocratic in this case. And so far I don't get college of cardinals. In that mod there is .gui files but that's not something I know. By the way I know I'm asking much, but would you check that mod file when you have spare time?
Edit: I don't know how to tie heirocratic to papal succession. I just happened to reform my religion as heirocratic in the game.
Edit2: As for temporals any way to make theocratic titles revert back to liege?