• 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.

GodModder

First Lieutenant
39 Badges
May 10, 2021
281
41
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Majesty 2 Collection
  • Crusader Kings II
  • Pillars of Eternity
  • Magicka 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
I created a custom religion, and a landed_title to be its religious head. I set creation conditions for the religious head title, and when starting up the game on alternate start (with the custom religion allowed to seed) as a member of that religion, I checked the title and it listed the creation conditions as prerequisites, as expected.

I just happened to check it again, 39 years into the game, and for some reason it's now saying "This title cannot be created normally" for some reason. Any ideas why? It was properly listing the prerequisites originally to allow creation, what changed and why?
 

jonjowett

Field Marshal
83 Badges
Aug 31, 2012
3.334
1.950
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Europa Universalis IV: Golden Century
  • Surviving Mars
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Stellaris: Megacorp
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rule Britannia
  • BATTLETECH - Digital Deluxe Edition
  • Shadowrun: Dragonfall
  • Victoria 2
  • 500k Club
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Imperator: Rome Deluxe Edition
Is there way to reduce or remove the cooldown for assigning councilors to a job action? I didn't see anything in defines.lua or 00_job_actions.txt that stood out to me.
Do you need a real solution? Because there's a workaround: use the right-click interaction to swap the councillor to a different council position, then swap him back again. It doesn't always work (eg. for the court chaplain, if everyone else in your court is landed feudal), but it works most of the time.

If that doesn't work for you, and there isn't a relevant define, maybe you can write a targeted decision which: fires the person, then removes the "fired from council" opinion modifier, then rehires them in the same position.
 
  • 1Like
Reactions:

Aardvark Bellay

Lord Wuffington of Grumpytown by the barks
21 Badges
Apr 5, 2001
15.440
2.857
  • Divine Wind
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Heir to the Throne
  • Crusader Kings II
  • Europa Universalis III
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
Is there way to reduce or remove the cooldown for assigning councilors to a job action? I didn't see anything in defines.lua or 00_job_actions.txt that stood out to me.

It's this line in defines

ASSIGN_ACTION_DAYS = 183, -- Days before a Councillor can be assigned a new job in a county

under
NCharacter = {

set it to 0 for instant change.
 
  • 1Like
Reactions:

skull42

Recruit
74 Badges
Sep 23, 2011
3
0
  • Rome Gold
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Cities in Motion
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Victoria 2: A House Divided
  • Europa Universalis IV: Third Rome
  • Knights of Honor
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Wealth of Nations
  • Arsenal of Democracy
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Crusader Kings II: Sunset Invasion
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • For The Glory
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
Hello I have a quick question:
I'm trying to reduce the propability of siege building destruction with HIP.
So I did a sub-mod like this:
events\emf_siege.txt=>
Code:
# Siege event: destroy random building in holding
character_event = {
    id = emf_siege.200

    is_triggered_only = yes
  
    hide_window = yes
  
    trigger = {
        siege = {
            is_attacker = no
        }
        NOT = {
            has_game_rule = {
                name = siege_events
                value = off
            }
        }
    }

    weight_multiplier = {
        months = 1
        modifier = {
            factor = 0.2
            always = yes
        }
        modifier = {  ...

(I added modifier = { factor = 0.2 always = yes } )
and later the same thing with emf_siege.201

but it doesn't seem to work, it still happen too often, what am i doing wrong? Is always = yes correct ?
Thank you for your help
 

jonjowett

Field Marshal
83 Badges
Aug 31, 2012
3.334
1.950
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Europa Universalis IV: Golden Century
  • Surviving Mars
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Stellaris: Megacorp
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rule Britannia
  • BATTLETECH - Digital Deluxe Edition
  • Shadowrun: Dragonfall
  • Victoria 2
  • 500k Club
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Imperator: Rome Deluxe Edition
Hello I have a quick question:
I'm trying to reduce the propability of siege building destruction with HIP.
So I did a sub-mod like this:
events\emf_siege.txt=>
Code:
# Siege event: destroy random building in holding
character_event = {
    id = emf_siege.200

    is_triggered_only = yes
 
    hide_window = yes
 
    trigger = {
        siege = {
            is_attacker = no
        }
        NOT = {
            has_game_rule = {
                name = siege_events
                value = off
            }
        }
    }

    weight_multiplier = {
        months = 1
        modifier = {
            factor = 0.2
            always = yes
        }
        modifier = {  ...

(I added modifier = { factor = 0.2 always = yes } )
and later the same thing with emf_siege.201

but it doesn't seem to work, it still happen too often, what am i doing wrong? Is always = yes correct ?
Thank you for your help
My interpretation of the description on the wiki is that modifier clauses inside weight_multiplier affect the chance that this particular event will be chosen from the list in on_actions. If my interpretation is correct, and if there are very few items in that list, then adding these modifiers will have little or no effect.

---

One potential option is to increase the months value, in the hope that this somehow increases the MTTH before the event can trigger.
Code:
    weight_multiplier = {
        months = 12
        modifier = {  ...
However, I'm unsure whether this approach will work in practice, because I can't imagine how a timer could be made to impact the normal on_actions coding.

---

A more certain option (which is unfortunately also much more complicated) would be to change this event into a pass-through event with a random or random_list clause which only occasionally triggers the follow-up event, and that follow-up event is what causes the building destruction. In this structure, emf_siege.200 would be called the usual number of times, but it would only have a 10% chance (or whatever) to cause building destruction.
 

skull42

Recruit
74 Badges
Sep 23, 2011
3
0
  • Rome Gold
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Cities in Motion
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Victoria 2: A House Divided
  • Europa Universalis IV: Third Rome
  • Knights of Honor
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Wealth of Nations
  • Arsenal of Democracy
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Crusader Kings II: Sunset Invasion
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • For The Glory
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
Thank you for your answer.
One potential option is to increase the months value, in the hope that this somehow increases the MTTH before the event can trigger.
Code:
    weight_multiplier = {
        months = 12
        modifier = {  ...
However, I'm unsure whether this approach will work in practice, because I can't imagine how a timer could be made to impact the normal on_actions coding.
I made the changes and tried:

Jorvik 867 - Snotingaham siege outcomes =>
Castle - 3 buildings destroyed
Church - 2 ...
Town - 2 ...

So I reversed the changes and tried again:
Castle - 2 buildings destroyed
Church - 0 ...
Town - 0 ...

so no my first approach seems the right one. I try factor = 0.1 and get back to you. EDIT: 10 holdings sieged, 0 destruction, i'm gonna try 0.15

Also i would like to reduce the number of buildings destroyed as result of these events,
do someone know where destroy_random_building is define ?
EDIT: nevermind, there is a random_list in the same file that set the number of buildings to destroy.
 
Last edited:

jonjowett

Field Marshal
83 Badges
Aug 31, 2012
3.334
1.950
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Europa Universalis IV: Golden Century
  • Surviving Mars
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Stellaris: Megacorp
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rule Britannia
  • BATTLETECH - Digital Deluxe Edition
  • Shadowrun: Dragonfall
  • Victoria 2
  • 500k Club
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Imperator: Rome Deluxe Edition
so no my first approach seems the right one. I try factor = 0.1 and get back to you. EDIT: 10 holdings sieged, 0 destruction, i'm gonna try 0.15
Yeah, I did say that I was very uncertain that increasing the months would work ;-)

Also i would like to reduce the number of buildings destroyed as result of these events,
do someone know where destroy_random_building is define ?
EDIT: nevermind, there is a random_list in the same file that set the number of buildings to destroy.
Yep, overall, I think it's probably better and more transparent to edit the random_list inside the event instead of editing the chance that the event fires.
 

Abdallah10

Private
Jan 1, 2021
13
8
i have some strange issue , i am tring to increase the warrior lodges society rank monthly_character_prestige modifier in 00_societies file
but it just doesnt work , mod path is correct the folder name is correct , i tried modding it in hip but still it doesnt work ,,,,,,
 

GodModder

First Lieutenant
39 Badges
May 10, 2021
281
41
  • Shadowrun Returns
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Digital Anniversary Edition
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Majesty 2 Collection
  • Crusader Kings II
  • Pillars of Eternity
  • Magicka 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
i have some strange issue , i am tring to increase the warrior lodges society rank monthly_character_prestige modifier in 00_societies file
but it just doesnt work , mod path is correct the folder name is correct , i tried modding it in hip but still it doesnt work ,,,,,,
I assume you've created the appropriate .mod file and activated the mod, right? (Sorry, just have to check.)

Did you change the modifier for all the warrior lodges? If you didn't, you might just be seeing the warrior lodges in-game that you didn't change.
 
  • 1Like
Reactions:

Abdallah10

Private
Jan 1, 2021
13
8
I assume you've created the appropriate .mod file and activated the mod, right? (Sorry, just have to check.)

Did you change the modifier for all the warrior lodges? If you didn't, you might just be seeing the warrior lodges in-game that you didn't change.
thanks for the replay

i just moved the 00_societies to other fine working mod and started to modify it
yeah i changed all the warrior lodges monthly_character_prestige values , i even put hashtage signs '' #'' and still the monthly_character_prestige show up in the game

just hours age, i made an on_action event to add character modifiers that increases monthly_character_prestige to the lodge members,
i dont know if its just me or that file is really odd
 

jonjowett

Field Marshal
83 Badges
Aug 31, 2012
3.334
1.950
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Europa Universalis IV: Golden Century
  • Surviving Mars
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Stellaris: Megacorp
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rule Britannia
  • BATTLETECH - Digital Deluxe Edition
  • Shadowrun: Dragonfall
  • Victoria 2
  • 500k Club
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Imperator: Rome Deluxe Edition
I'm trying to create a coastal county conquest CB, which is only visible in the interface if the normal pagan county conquest is not available for some reason.

Ideally, I would like to do this via something like the can_use_cb condition (instead of copy/pasting then negating all of the vanilla conditions). However, in practice, it doesn't seem to be working properly. (Because, as a Norse Germanic ruler, I get all the normal coastal county conquest CBs followed by all of the new CBs.)

Can anyone spot my mistake?

Code:
    can_use_title = {
...
        # Block the CB if the normal coastal county conquest CB is available
        NOT = {
            ROOT = {
                can_use_cb = {
                    target = PREV
                    casus_belli = pagan_county_conquest
                }
            }
        }
    }

I took pagan_county_conquest and edited: can_use, can_use_title, is_valid, is_valid_title, and ai_will_do.

Code:
# Coastal county conquests for sea kings/queens, from ultimate raider bloodline
# Target any port in a different realm owned (directly or indirectly) by an independent ruler of different religion
# Based on pagan_county_conquest in 00_cb_types.txt

emb_raider_coastal_county_conquest = {
    name = CB_NAME_COUNTY_CONQUEST
    war_name = WAR_NAME_COUNTY_CONQUEST
    sprite = 22
    truce_days = 1825
    hostile_against_others = 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
    
    allow_distant = yes
    allowed_to_target_tributaries = no
    
    sort_priority = 700
    
    can_use = {
        ROOT = {
            mercenary = no
            NOT = { same_realm = FROM }
            NOT = { religion = FROM }
            any_owned_bloodline = { has_bloodline_flag = emb_effect_seaking_coastal_county_conquest }
            OR = {
                trait = seaking
                trait = sea_queen
            }
        }
        FROM = {
            independent = yes
        }
    }

    can_use_title = {
        tier = count
        
        # Only target rulers who own or control this title
        holder_scope = {
            OR = {
                character = FROM
                is_vassal_or_below_of = FROM
            }
        }
        
        # Only target ports
        location = { port = yes }
        
        # Block the CB if the normal coastal county conquest CB is available
        NOT = {
            ROOT = {
                can_use_cb = {
                    target = PREV
                    casus_belli = pagan_county_conquest
                }
            }
        }
    }
    
    is_valid = {
        ROOT = {
            NOT = { same_realm = FROM }
            NOT = { religion = FROM }
        }
        FROM = {
            independent = yes
        }
    }

    is_valid_title = {
        holder_scope = {
            OR = {
                character = FROM
                is_vassal_or_below_of = FROM
            }
        }
    }

    on_add = {
        hidden_tooltip = { fire_haruspicy_event_effect = yes }
        if = {
            limit = { defender = { is_offmap_governor = offmap_china } }
            attacker = {  
                sound_effect = china_angered_emperor
                detract_grace_super_huge_effect = yes 
            }
        }
    }

    on_success_title = { #winning the war
        usurp_title_plus_barony_if_unlanded = { target = ROOT type = invasion }
        
        any_de_jure_vassal_title = { # take all baronies too
            limit = {
                has_holder = yes
                holder_scope = {
                    OR = {
                        character = FROM
                        is_liege_or_above = FROM
                        AND = {
                            is_liege_or_above = ROOT
                            NOT = { culture = ROOT }
                            NOT = { religion = ROOT }
                        }
                    }
                }
            }
            show_scope_change = no
            usurp_title = ROOT
        }
        
        ROOT = {
            show_scope_change = no
            participation_scaled_prestige = 100
            participation_scaled_piety = 50
        }
        any_attacker = {
            limit = { NOT = { character = ROOT } }
            hidden_tooltip = { 
                participation_scaled_prestige = 100 
                participation_scaled_piety = 50
            }
        }
        
        if = {
            limit = {
                NOT = { FROM = { religion = ROOT } }
            }
            ROOT = {
                show_scope_change = no
                religion_authority = {
                    modifier = won_county_conquest
                }
            }
        }

        #To handle Warrior Lodge mission "Wage War" completion...
        attacker = { save_event_target_as = attacker_target }
        defender = { save_event_target_as = defender_target }

        if = { 
            limit = {
                event_target:attacker_target = { has_quest = quest_warrior_lodge_war }
                is_quest_target_of = event_target:attacker_target
            }
            event_target:attacker_target = {
                show_scope_change = no
                tooltip = { clr_quest = quest_warrior_lodge_war }
                set_character_flag = won_war@event_target:defender_target
                #character_event = { id = HF.10514 days = 3 } #Sent from on_action instead
            }
        }
    }

    on_fail_title = { #white peace
        ROOT = {
            show_scope_change = no
            prestige = -100
        }
        
        if = {
            limit = {
                NOT = { FROM = { religion = ROOT } }
            }
            ROOT = {
                show_scope_change = no
                religion_authority = {
                    modifier = lost_county_conquest
                }
            }
        }
    
        FROM = {
            show_scope_change = no
            participation_scaled_prestige = 50
        }
        any_defender = {
            limit = { NOT = { character = FROM } }
            hidden_tooltip = { participation_scaled_prestige = 50 }
        }

        #To handle Warrior Lodge mission "Wage War" completion...
        attacker = { save_event_target_as = attacker_target }
        defender = { save_event_target_as = defender_target }

        if = { 
            limit = {
                event_target:attacker_target = { has_quest = quest_warrior_lodge_war }
                is_quest_target_of = event_target:attacker_target
            }
            event_target:attacker_target = {
                show_scope_change = no
                tooltip = { clr_quest = quest_warrior_lodge_war }
                set_character_flag = white_peace@event_target:defender_target
                #character_event = { id = HF.10514 days = 3 } #Sent from on_action instead
            }
        }
    }

    on_reverse_demand = { #losing the war
        ROOT = {
            show_scope_change = no
            prestige = -200
            transfer_scaled_wealth = {
                to = FROM
                value = 4.0
            }
        }
        
        if = {
            limit = {
                NOT = { FROM = { religion = ROOT } }
            }
            ROOT = {
                show_scope_change = no
                religion_authority = {
                    modifier = lost_county_conquest
                }
            }
        }
        
        FROM = {
            show_scope_change = no
            participation_scaled_prestige = 100
            participation_scaled_piety = 50
        }
        any_defender = {
            limit = { NOT = { character = FROM } }
            hidden_tooltip = {
                participation_scaled_prestige = 100 
                participation_scaled_piety = 50
            }
        }
    }
    on_reverse_demand_title = {
        #To handle Warrior Lodge mission "Wage War" completion...
        attacker = { save_event_target_as = attacker_target }
        defender = { save_event_target_as = defender_target }

        if = { 
            limit = {
                event_target:attacker_target = { has_quest = quest_warrior_lodge_war }
                is_quest_target_of = event_target:attacker_target
            }
            event_target:attacker_target = {
                show_scope_change = no
                tooltip = { clr_quest = quest_warrior_lodge_war }
                set_character_flag = lost_war@event_target:defender_target
                #character_event = { id = HF.10514 days = 3 } #Sent from on_action instead
            }
        }
    }

    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
            FROM = {
                is_nomadic = yes
            }
            ROOT = {
                is_nomadic = no
                NOT = {
                    is_tribal = yes
                }
            }
            NOT = {
                any_direct_de_jure_vassal_title = {
                    any_direct_de_jure_vassal_title = {
                        OR = {
                            holding_type = castle
                            holding_type = city
                        }
                    }
                }
            }
        }
        modifier = {
            factor = 0
            FROM = {
                is_nomadic = yes
            }
            ROOT = {
                is_tribal = yes
            }
            NOT = {
                any_direct_de_jure_vassal_title = {
                    any_direct_de_jure_vassal_title = {
                        OR = {
                            holding_type = castle
                            holding_type = city
                            holding_type = tribal
                        }
                    }
                }
            }
        }
    }
}
 

Whizzer

CKPlus Triumvirate
77 Badges
Jun 17, 2014
1.617
789
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
I'm trying to create a coastal county conquest CB, which is only visible in the interface if the normal pagan county conquest is not available for some reason.

Ideally, I would like to do this via something like the can_use_cb condition (instead of copy/pasting then negating all of the vanilla conditions). However, in practice, it doesn't seem to be working properly. (Because, as a Norse Germanic ruler, I get all the normal coastal county conquest CBs followed by all of the new CBs.)

Can anyone spot my mistake?

Code:
    can_use_title = {
...
        # Block the CB if the normal coastal county conquest CB is available
        NOT = {
            ROOT = {
                can_use_cb = {
                    target = PREV
                    casus_belli = pagan_county_conquest
                }
            }
        }
    }

Try this:

Code:
    can_use_title = {
...
        # Block the CB if the normal coastal county conquest CB is available
        NOT = {
            ROOT = {
                can_use_cb = {
                    target = FROM
                    casus_belli = pagan_county_conquest
                    thirdparty_title = PREV
                    only_check_triggers = yes
                }
            }
        }
    }
 
  • 1
Reactions:

Darth_Mouse69

Corporal
3 Badges
Jun 30, 2021
47
3
  • Crusader Kings II
  • Hearts of Iron IV: Cadet
  • Imperator: Rome
Does he own at least one county?
yes he does
1671050888112.png
 

jonjowett

Field Marshal
83 Badges
Aug 31, 2012
3.334
1.950
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Europa Universalis IV: Golden Century
  • Surviving Mars
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Tyranny - Bastards Wound
  • Cities: Skylines - Green Cities
  • Stellaris: Megacorp
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rule Britannia
  • BATTLETECH - Digital Deluxe Edition
  • Shadowrun: Dragonfall
  • Victoria 2
  • 500k Club
  • Stellaris: Ancient Relics
  • Europa Universalis IV: El Dorado
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Imperator: Rome Deluxe Edition
If I make a modded trait with immortal = yes, will it work even though I don't have Reaper's Due?
Not a moderator or in any way official, but that seems like it's either against the rules (specifically #7) or skirting pretty close. (Thou shalt not bypass the requirement to own DLC.)

However, it is just about possible that being immortal is not considered a DLC-locked feature. If you want to pursue this further, I suggest you ask a mod for guidance, here.
 
Last edited: