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

Kevkev100

Private
21 Badges
Dec 26, 2012
23
21
  • Crusader Kings II
  • Europa Universalis IV
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • 500k Club
  • Tyranny - Tales from the Tiers
I'm trying to write a targeted decision that allows me to grant vice-royalties to republics. I've been able to tweak existing files in the "governments" and "laws" folder that allow republics to grant vice-royalties, but only to feudal rulers. I think I have all the scopes and conditions down, but I don't know what to put as the effect.

Code:
targetted_decisions = {
    
    Grant_Viceroyalty = {   
      filter = sub_realm
      ai_target_filter = sub_realm
      from_potential = {           
            OR = {
                has_law = vice_royalty_2
                has_law = vice_royalty_1
            }                   
     }
      potential = {
        is_vassal_or_below = FROM
      }
      allow = {
        any_demesne_title = {
                can_be_given_away = yes
                higher_tier_than = COUNT
                is_titular = no
                is_landless_type_title = no
      }
      effect = {
        
      }
      revoke_allowed = {
        always = no
      }
      ai_will_do = {
                factor = 0
      }
}

This is my first time trying to write a targeted decision, so if you notice any mistakes I would appreciate if you could point them out, thanks!
 

RuMark

Corporal
20 Badges
Feb 15, 2016
26
0
  • 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
  • Crusader Kings II
  • Cities: Skylines Deluxe Edition
  • Crusader Kings III
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Way of Life
  • Cities: Skylines
  • Europa Universalis IV
How do I localise a minor title "HRH" so that the "real" reflects the parents highest title realm forever:

Dad: Duke of York
Son: HRH Prince Henry of York (This displays correctly while Henry is at his father's court; however, when he moves, his title changes.)
e.g. Henry goes to Kent, now his name is displayed as HRH Prince Henry of Kent.

How do I stop this from happening?
 

Thezezeal

Captain
3 Badges
Dec 28, 2014
375
3
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Charlemagne
Is it possible to make an Sea Province "Bigger" than it "really" is? My TC divides the map into four sections, with an impassable barrier between all four, and then in the centre there is a 'transition sea' that they have to move through in order to enter one of the other three sections. What I'd like to do is make this sea take several months to a year to actually cross in-game. Is that possible? I was thinking maybe using "local_movement_speed = 0.10", but do sea-provinces count as Provinces for Province Modifiers?
 
  • 1
Reactions:

starwarsfan541

CIA Director of Cold War Iron Curtain
59 Badges
Apr 9, 2010
3.720
1.056
  • Heir to the Throne
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • 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
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Europa Universalis III Complete
  • Divine Wind
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines - Parklife
  • Battle for Bosporus
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
Did the code work for you?
Yes, I believe its working or at least it was working when i tested it and havent received a bug report on it being non functional
 

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
Is it possible to make an Sea Province "Bigger" than it "really" is? My TC divides the map into four sections, with an impassable barrier between all four, and then in the centre there is a 'transition sea' that they have to move through in order to enter one of the other three sections. What I'd like to do is make this sea take several months to a year to actually cross in-game. Is that possible? I was thinking maybe using "local_movement_speed = 0.10", but do sea-provinces count as Provinces for Province Modifiers?

I don't have the answer for local_movement_speed.
But another idea that is more in line with vanilla would be to use the movement_cost of map/terrain.txt, by creating a specific category of water terrain. I know some mods add new terrain (not water ones though), so this should be possible.
 

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
I'm trying to write a targeted decision that allows me to grant vice-royalties to republics. I've been able to tweak existing files in the "governments" and "laws" folder that allow republics to grant vice-royalties, but only to feudal rulers. I think I have all the scopes and conditions down, but I don't know what to put as the effect.

Code:
targetted_decisions = {
   
    Grant_Viceroyalty = {  
      filter = sub_realm
      ai_target_filter = sub_realm
      from_potential = {          
            OR = {
                has_law = vice_royalty_2
                has_law = vice_royalty_1
            }                  
     }
      potential = {
        is_vassal_or_below = FROM
      }
      allow = {
        any_demesne_title = {
                can_be_given_away = yes
                higher_tier_than = COUNT
                is_titular = no
                is_landless_type_title = no
      }
      effect = {
       
      }
      revoke_allowed = {
        always = no
      }
      ai_will_do = {
                factor = 0
      }
}

This is my first time trying to write a targeted decision, so if you notice any mistakes I would appreciate if you could point them out, thanks!

I don't know if that "grant as vice royalty" effect actually exist... The vanilla diplomatic action using it is not scripted but hardcoded, and the feature was restricted to a DLC.

Also I'm not exactly sure what's the difference between vice royalty and succ_appointment succession law, and if something equivalent can be achieved that way.
 

Kevkev100

Private
21 Badges
Dec 26, 2012
23
21
  • Crusader Kings II
  • Europa Universalis IV
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • 500k Club
  • Tyranny - Tales from the Tiers
I don't know if that "grant as vice royalty" effect actually exist... The vanilla diplomatic action using it is not scripted but hardcoded, and the feature was restricted to a DLC.

Also I'm not exactly sure what's the difference between vice royalty and succ_appointment succession law, and if something equivalent can be achieved that way.

Thanks for trying anyways! I decided in the end to just take away the opinion malus from having feudal vassals.
 

Sir-Drink-A-Lot

Recruit
13 Badges
Oct 15, 2016
1
0
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Reapers Due
  • Shadowrun Returns
I'd like to mod faction restriction. Specifically, I want to make it so that factions for Feudal Elective Succession can be started at Low Crown Authority instead of only at Minimum Crown Authority/Autonomous Vassals. However, I can not find that specific restriction in the "00_factions" file in the "objectives" folder.
I've copied the respective part from the file, in regards to plotter cope and target scope:

Code:
# Institute Succession by Feudal Elective
faction_succ_feudal_elective = {
    type = liege_titles
 
    warning_level = 0.7 # At this level of faction power we give player an alert. Set to 0 for no alerts.
 
    # Plotter scope
    potential = {
        prisoner = no
        is_ruler = yes
        independent = no
        is_landed = yes
        is_adult = yes
        primary_title = { holy_order = no }
        OR = {
            NOT = { has_dlc = "Zeus" }
            is_voter = no
            liege = {
                primary_title = {
                    has_law = war_voting_power_1
                    has_law = law_voting_power_1
                }
                OR = {
                    is_council_content = no
                    NOT = { primary_title = { has_law = war_voting_power_1 } }
                    #has_council = no
                }
            }
            is_nomadic = yes
        }
        NOT = { trait = incapable }
        liege = {
            is_vice_royalty = no
            is_feudal = yes
            OR = {
                year = 1350
                primary_title = { is_tribal_type_title = no }
                NOT = { culture = ROOT }
                NOT = { religion = ROOT }
            }
            NOT = {
                any_demesne_title = {
                    temporary = yes
                }
            }       
        }
        NOT = { religion_group = muslim }
        primary_title = { higher_tier_than = BARON }
  
        NOT = { in_faction = faction_succ_seniority }
        NOT = { in_faction = faction_succ_primogeniture }
        NOT = { in_faction = faction_succ_gavelkind }
  
        OR = {
            # Is not affected by a Crown Law title
            NOT = {
                crownlaw_title = {
                    always = yes
                }
            }
      
            # The Crown Law title holder is my liege
            crownlaw_title = {
                holder_scope = {
                    ROOT = {
                        liege = {
                            character = PREVPREV
                        }
                    }
                }
            }
      
            # The Crown Law title allows vassal infighting
            crownlaw_title = {
                NOT = {
                    OR = {
                        has_law = crown_authority_2
                        has_law = crown_authority_3
                        has_law = crown_authority_4
                    }
                }
            }
        }
  
        NOT = { has_character_modifier = faction_succ_feudal_elective_ultimatum_timer }
    }
 
    # Target scope
    allow = {
        is_law_potential = succ_feudal_elective
        is_law_allowed = succ_feudal_elective
        NOR = {
            has_law = succ_feudal_elective
            AND = {
                has_law = succession_voting_power_1
                has_law = succ_feudal_elective
            }
        }
  
        OR = {
            is_primary_holder_title = yes
            higher_tier_than = DUKE
        }
  
        holder_scope = {
            NOT = {
                any_war = {
                    war_title = ROOT
                    using_cb = change_feudal_elective_succession_law
                }
            }
      
            NOT = {
                reverse_has_opinion_modifier = {
                    who = FROM
                    modifier = opinion_coerced_into_leaving_faction
                }
            }
        }
  
    }


Now I just need someone to tell me where the restriction is that makes it so you can only start an elective succession faction at the lowest crown authority level. I tried searching for this but couldn't find anything helpful. Thank you very much to anyone who can spare the time and help.
 

LordPeter

Marjoram
49 Badges
Mar 5, 2012
2.249
382
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Conclave
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Prison Architect
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • 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: Sunset Invasion
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Stellaris
  • Europa Universalis IV: Third Rome
  • Cities: Skylines
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cradle of Civilization
How can I display a vsriable in a trait description?
From staring at the wiki, I'd say [Root.test_var.GetName]?
But there is a big question mark there, I am not sure if this would work.
Is something this dynamic even possible, I mean, can the description change with the variable?
Maybe someone more experienced can answer that. If so, I would be pretty intrigued to know as well, because that is rather a good idea ^^
 
  • 1
Reactions:

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
From staring at the wiki, I'd say [Root.test_var.GetName]?
But there is a big question mark there, I am not sure if this would work.
Is something this dynamic even possible, I mean, can the description change with the variable?
Maybe someone more experienced can answer that. If so, I would be pretty intrigued to know as well, because that is rather a good idea ^^

Indeed localization commands are not always processed everywhere. For instance support in nicknames and character modifier descriptions was added in patch 2.3. I don't think it's the case for trait descriptions.
 
  • 2
Reactions:

ngppgn

Field Marshal
19 Badges
Jan 29, 2011
3.508
657
  • Crusader Kings III
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
Is it possible to make an Sea Province "Bigger" than it "really" is? My TC divides the map into four sections, with an impassable barrier between all four, and then in the centre there is a 'transition sea' that they have to move through in order to enter one of the other three sections. What I'd like to do is make this sea take several months to a year to actually cross in-game. Is that possible? I was thinking maybe using "local_movement_speed = 0.10", but do sea-provinces count as Provinces for Province Modifiers?

Wasteland provinces can be given province modifiers -probably sea provinces too

From staring at the wiki, I'd say [Root.test_var.GetName]?
But there is a big question mark there, I am not sure if this would work.
Is something this dynamic even possible, I mean, can the description change with the variable?
Maybe someone more experienced can answer that. If so, I would be pretty intrigued to know as well, because that is rather a good idea ^^

It doesn't work, (it shows nothing, as opposed to the literal command string). However, it seems to work if instead of Root I use a global event target, (which is weird).
 

Babarigo

Corporal
24 Badges
Mar 17, 2015
40
15
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Magicka
  • Lead and Gold
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • 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 III: Royal Edition
  • Crusader Kings III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Cities: Skylines
Hello, as you know when you are the guardian or the educator of a child you get events to intervene and make a childhood trait like indolent becoming gregarious instead of slothful. In the game it's not 100% sure it will work (it's 50% iirc) and I would like it to be 100%, basically I want that the child always choose the trait chosen by the educator, at least for the human player, thank you.
 

IratePirate-

First Lieutenant
29 Badges
Feb 17, 2015
219
118
  • Crusader Kings II
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris Sign-up
  • Victoria 2
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Crusader Kings III
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Cities: Skylines
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • 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
Hello. Is there a condition for assessing whether a character is a commander in the same army as ROOT? I'm making an event where one commander in a victorious battle is envious of the leader, but i'm drawing a blank at the minute.
 

Aerkhanite

Great Batavian
70 Badges
Jan 22, 2013
176
51
  • Divine Wind
  • Europa Universalis IV: Mare Nostrum
  • Sengoku
  • Magicka
  • Heir to the Throne
  • Hearts of Iron III
  • Cities in Motion 2
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: Rajas of India
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Darkest Hour
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Surviving Mars
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • PDXCon 2017 Awards Winner
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Crusader Kings III
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
This decision is not showing up if I add "NOT = { is_title_active = k_goths }" under potential.
Basically, it needs to check if that title is already in use.

decisions = {
declare_gothic_homeland = {
is_high_prio = yes

potential = {
culture = old_gothic
real_tier = DUKE
}

allow = {
independent = yes
is_adult = yes
war = no
has_regent = no
wealth = 500
prestige = 1500
culture = old_gothic
}

effect = {
wealth = -500
prestige = -1500
activate_title = { title = k_goths status = yes }
k_goths = { gain_title = ROOT }
capital_scope = { culture = old_gothic }
#any_demesne_province = { add_province_modifier = { name = gothic_migrate_here duration = 365 } }
}

ai_will_do = {
factor = 1
}
}
}

Can anyone help?
Another question that seems simple but I could find the condition/scope for, how do I check that ROOT has X amount of duchies?
Also, is it possible to have a +% chance to convert a province's culture by modifier? It's what I want the gothic_migrate_here to be.