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

fanoI

General
2 Badges
Aug 26, 2012
1.870
106
  • Crusader Kings II
  • Europa Universalis IV
In reality they are not unlanded they have a titular title too! The problem is that when game start they are patricians and so they have a capital (the same of the Republic as all Patricians) so their court and council is in some place but I need to avoid a Game Over bug (Patrician holding is destroyed if the liege is not a Merchant Republic!) to transform their title in a county level title using "create_title" and in doing this I need to make them nomads too so the dynasty COA remains their title COA. Doing this they lose their capital and are in ANY / ALL. I could try to use these commands in the event that give them the "Senatorial title": province_capital, capital, make_capital_holding but I fear nothing will change...
 

jursamaj

General
125 Badges
Aug 20, 2012
2.360
216
  • Victoria 2: Heart of Darkness
  • Hearts of Iron III
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Leviathan: Warships
  • Rome: Vae Victis
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Magicka 2 - Signup Campaign
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Pillars of Eternity
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: No Step Back
In reality they are not unlanded they have a titular title too! The problem is that when game start they are patricians and so they have a capital (the same of the Republic as all Patricians) so their court and council is in some place but I need to avoid a Game Over bug (Patrician holding is destroyed if the liege is not a Merchant Republic!) to transform their title in a county level title using "create_title" and in doing this I need to make them nomads too so the dynasty COA remains their title COA. Doing this they lose their capital and are in ANY / ALL. I could try to use these commands in the event that give them the "Senatorial title": province_capital, capital, make_capital_holding but I fear nothing will change...
I thought create_title with base_title = <whatever> copied the COA & capital…

Oh, and he meant unlanded in that they own no land.
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
Have you tried using a titular barony or an external province (a province with a single point somewhere in wasteland, defined as external in default.map, such as is used as silk road start points) to land the Senators?
 

fanoI

General
2 Badges
Aug 26, 2012
1.870
106
  • Crusader Kings II
  • Europa Universalis IV
Sadly create_title does not copy the capital at least in the case of Patricians that as usual are bugged as hell! I'm using the trick of Patricians because is the only to create playable characters dynamically without create a landed title for any of them.

@richvh what do you mean with titular barony? I could create a only one titular barony with capital Rome in the landed title file and then how I land them? I could use "create_title" with rank baron to effectively make a copy of a title? So my Senators would have a county titular title with the name of their dynasty and this barony to give them a capital?
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
I don't think you can use create_title in quite that way, but you could have a small set of titular baronies defined in landed_titles, and when one family is removed from the Senate you could recycle it for the replacement. Unfortunately, while I believe you can change the title, you can't change the coat of arms.
 

fanoI

General
2 Badges
Aug 26, 2012
1.870
106
  • Crusader Kings II
  • Europa Universalis IV
In your opinion there is no chance that the various province_capital, capital, make_capital_holding take effect when I change their title from Patricians to Count / Senators?

I could have b_roman_senate_1, b_roman_senate_2, ... but how I can change its name (for example to <Senatorial Seat of House xxx>") and how to found the not assigned one? A long series of if? An event that happens on_death of a Senator in which the senatorial title is in some way flagged?
If it is not possible to change COA I could accept a generic "Senate" COA but have a different name will make seem the thing less "kludgy"...

Please note that "The Commune of Rome" is only a test field I intend to extend this government system to all the other Italian Communes (Florence, Milan, Padua, Bologna, Ancona...) so I'd like to not have to create too much titles it is annoying for me and I fear the engine would not support this... have 24 families for any of them could be already stressful probably.
 

Azzarrel

Sergeant
63 Badges
Jul 20, 2015
52
13
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Cossacks
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Magicka
  • 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
  • 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
  • Stellaris: Megacorp
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Cities: Skylines Industries
  • Crusader Kings II: Conclave
  • Victoria 2
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Snowfall
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
Instead of using the standard reform mechanic, you'd probably be better off with custom decisions. Design multiple religions within 1 religion_group. They can be heresies of each other or not, as you wish. Then your decisions would let you switch yourself, vassals, and/or the rest of the world between them.
guess I have to stick with that.
I was just woundering, if it is possible to change your religion by laws.
So lets say I have a bunch of laws, appearing only if i have said religion (like crown laws just appear if i have a crown) if that is possilbe, and a religion with a lot of if-conditions for each of this laws.
Lets take max_wives for example. Lets say I've made 5 laws reaguarding the ammount of wives you can have. law0 is 1, law1 is 2, law2 is 4, law3 is 8 and law4 is 16.
For each law I set up, I design a pre-set condition in my religion (I'll write most of it in java, because I'm not that good with the ck2-code yet - i hope you can undersand me anyway.)
Code:
myownreligion()
{
       if( has_law == law0)
       {
         max_wives = 1;
       }
       if( has_law == law1)
       {
         max_wives = 2;
       }
[...]
       if( has_law == law5)
       {
         max_wives = 16;
       }
}
I've seen similar to this in the mod "Status of Women - A Law Mod" for council positions for women.
 
Last edited:

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
I don't believe the max_wives parameter is settable outside of the religions file, which doesn't allow for conditionals.

What you would have to do is have that law available only for titles whose holders have specific religions, and actually change the religion of the holder to one with the appropriate max_wives value as an effect of the law change.
 

jursamaj

General
125 Badges
Aug 20, 2012
2.360
216
  • Victoria 2: Heart of Darkness
  • Hearts of Iron III
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Leviathan: Warships
  • Rome: Vae Victis
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Magicka 2 - Signup Campaign
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Pillars of Eternity
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: No Step Back
I don't think you can use create_title in quite that way, but you could have a small set of titular baronies defined in landed_titles, and when one family is removed from the Senate you could recycle it for the replacement. Unfortunately, while I believe you can change the title, you can't change the coat of arms.
Could try set_coa = <other title>. That's what I was thinking of above.

I wonder if set_coa would take a dynasty. If not, that would be a useful suggestion for the Captain.
 

jursamaj

General
125 Badges
Aug 20, 2012
2.360
216
  • Victoria 2: Heart of Darkness
  • Hearts of Iron III
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Leviathan: Warships
  • Rome: Vae Victis
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Magicka 2 - Signup Campaign
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Pillars of Eternity
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: No Step Back
In your opinion there is no chance that the various province_capital, capital, make_capital_holding take effect when I change their title from Patricians to Count / Senators?

I could have b_roman_senate_1, b_roman_senate_2, ... but how I can change its name (for example to <Senatorial Seat of House xxx>") and how to found the not assigned one? A long series of if? An event that happens on_death of a Senator in which the senatorial title is in some way flagged?
If it is not possible to change COA I could accept a generic "Senate" COA but have a different name will make seem the thing less "kludgy"...

Please note that "The Commune of Rome" is only a test field I intend to extend this government system to all the other Italian Communes (Florence, Milan, Padua, Bologna, Ancona...) so I'd like to not have to create too much titles it is annoying for me and I fear the engine would not support this... have 24 families for any of them could be already stressful probably.
Titles can have set_name = "<some name here>" applied to them. I don't know if the string could have a dynasty localization embedded in it.

As for finding the unused one, what exactly is going to happen to the title when the Senator dies? Isn't it generally going to get inherited by somebody, and thus not actually be unassigned? Perhaps an on_death event that checks if the dying person holds a senate title, and sends an event to his liege to assign a new Senator (saving the title as an event target)?
 

Jorlem

Field Marshal
118 Badges
May 9, 2012
4.562
4.049
  • Victoria 3 Sign Up
  • Crusader Kings III: Royal Edition
  • Imperator: Rome Deluxe Edition
  • Stellaris: Galaxy Edition
  • Europa Universalis IV
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Victoria 2
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • 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
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • The Showdown Effect
  • War of the Roses
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Humble Paradox Bundle
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Tyranny - Bastards Wound
Is there a way to alter the base cost of building new holdings? I found the multiplier in defines.lua that controls the increase in price for each new holding, but can't seem to find a way to change the baseline.


Edit:
Also, can someone spot what I'm doing wrong here? This is meant to be a decision that lets a feudal character get a cheap castle on empty nomadic land, accessed through the title diplomacy menu, but it isn't showing up.

Code:
title_decisions = {

    feudal_settle_nomad_province = {
        filter = owned
        ai_target_filter = owned
        is_high_prio = yes
       
       
        from_potential = {
            is_feudal = yes
        }
       
        potential = {
            tier = count
            holder_scope = {
                character = FROM
            }
            any_realm_province = {
                NOT = {
                    num_of_settlements = 1
                }
            }
        }
       
        allow = {
            FROM = {
                wealth = 200
            }
        }
       
        effect = {
            FROM = {
                wealth = -200
            }
            build_holding = CASTLE
            refill_holding_levy = yes
           
            revoke_allowed = {
                always = no
            }
       
            ai_will_do = {
                factor = 1
            }
       
        }
       
       
    }
}
 
Last edited:

fanoI

General
2 Badges
Aug 26, 2012
1.870
106
  • Crusader Kings II
  • Europa Universalis IV
Titles can have set_name = "<some name here>" applied to them. I don't know if the string could have a dynasty localization embedded in it.

Yes this the problem how to dinamically change the localization based on dynasty?

As for finding the unused one, what exactly is going to happen to the title when the Senator dies? Isn't it generally going to get inherited by somebody, and thus not actually be unassigned? Perhaps an on_death event that checks if the dying person holds a senate title, and sends an event to his liege to assign a new Senator (saving the title as an event target)?

Usually the Senatorial Seat is hereditary (for now Seniority is used maybe I could try to change to designated heir but I fear that this will glitch all in the buggy Merchant Republic government) so a seat on the Senate would become empty when a dynasty dies without any heir. Obviusly a Senator could have higher level title for example the Senator of House Orsini could be Count of Orvieto. I have already in place a way to create a new Senator when they are less than 24 (but now it counts how many they are probably will be more efficient to use an on_death on action event but how to check that the dying character is the last of his dynasty?) again how to give the title to the new senator and change its name as "Senatorial seat of xxx"?

Thank for your help.
 

nicowaves

Corporal
37 Badges
May 16, 2015
25
0
  • Knights of Pen and Paper +1 Edition
  • Stellaris
  • Crusader Kings II
  • Ship Simulator Extremes
  • Sengoku
  • Magicka
  • Impire
  • Hearts of Iron III
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sword of Islam
  • 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
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Humble Paradox Bundle
  • Crusader Kings II: Way of Life
  • Cities: Skylines
  • War of the Roses
  • Victoria 2
  • Teleglitch: Die More Edition
Guys, how do I scope to my characters home province when spawning a unit through a decision?
Code:
spawn_doomstack = {
    ...
    effect = {
        spawn_unit = {
            owner = ROOT
            province = ???
            home = ROOT
            troops = {
                knights = { 1000 1000 }
            }
        }
    }
}
I do not know what to put for province, as everything I tried has given me an error like "... is not a province" in the Validator.
Apparently it was possible to set it to ROOT, but it seems like this was changed in an update not long ago.
I really do not want to hardcode a province ID here. Can you help me out?
 

Silversweeeper

Ichi no Hito
58 Badges
Aug 24, 2012
3.943
2.840
  • Stellaris - Path to Destruction bundle
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Charlemagne
  • Stellaris Sign-up
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • 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
  • Europa Universalis III Complete
  • Magicka
Guys, how do I scope to my characters home province when spawning a unit through a decision?
Code:
spawn_doomstack = {
    ...
    effect = {
        spawn_unit = {
            owner = ROOT
            province = ???
            home = ROOT
            troops = {
                knights = { 1000 1000 }
            }
        }
    }
}
I do not know what to put for province, as everything I tried has given me an error like "... is not a province" in the Validator.
Apparently it was possible to set it to ROOT, but it seems like this was changed in an update not long ago.
I really do not want to hardcode a province ID here. Can you help me out?

Assuming you are in a ROOT scope and want it to happen in the capital province, try using:
Code:
capital_scope = {
         spawn_unit = {
           province = PREV
           [otherstuff]
         }
}
 

nicowaves

Corporal
37 Badges
May 16, 2015
25
0
  • Knights of Pen and Paper +1 Edition
  • Stellaris
  • Crusader Kings II
  • Ship Simulator Extremes
  • Sengoku
  • Magicka
  • Impire
  • Hearts of Iron III
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sword of Islam
  • 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
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Humble Paradox Bundle
  • Crusader Kings II: Way of Life
  • Cities: Skylines
  • War of the Roses
  • Victoria 2
  • Teleglitch: Die More Edition
Assuming you are in a ROOT scope and want it to happen in the capital province, try using:
Code:
capital_scope = {
         spawn_unit = {
           province = PREV
           [otherstuff]
         }
}

Sadly it seems like this does not work. Apparently you cannot execute spawn_unit from a province scope, only from a character (?). I hope what I am writing here makes sense, I am kinda new to modding CK2.
Here is the complete decision, maybe I have done something different wrong?
Code:
decisions = {
    add_doomstack = {
        potential = {
            trait = chosen # A trait I made
        }
        allow = {
            scaled_wealth = 0.1
        }
        effect = {
            scaled_wealth = -0.1
            capital_scope = {
                spawn_unit = {
                    province = PREV
                    owner = ROOT
                    home = ROOT
                    troops = {
                        archers = { 250 250 }
                        heavy_infantry = { 1000 1000 }
                        knights = { 500 500 }
                        horse_archers = { 250 250 }
                    }
                }
            }
        }
        ai_will_do = { factor = 0 }
    }
}

Here is the error the Validator throws:
Code:
Invalid node "spawn_unit" in scope ProvCommand (value is: <a complex type>)

EDIT:
Here is the original code before your suggestion and its error:
Code:
decisions = {
    add_doomstack = {
        potential = {
            trait = chosen
        }
        allow = {
            scaled_wealth = 0.1
        }
        effect = {
            scaled_wealth = -0.1
            spawn_unit = {
                province = ROOT
                owner = ROOT
                home = ROOT
                troops = {
                    archers = { 250 250 }
                    heavy_infantry = { 1000 1000 }
                    knights = { 500 500 }
                    horse_archers = { 250 250 }
                }
            }
        }
        ai_will_do = { factor = 0 }
    }
}

Code:
"ROOT" is not a valid MaybeEventTargetProv or Province.
MaybeEventTargetProv: cannot be because ROOT points to <CharCommand>, not Prov.
 

Silversweeeper

Ichi no Hito
58 Badges
Aug 24, 2012
3.943
2.840
  • Stellaris - Path to Destruction bundle
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Charlemagne
  • Stellaris Sign-up
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • 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
  • Europa Universalis III Complete
  • Magicka
On further thought, try this:
Code:
FROM = {
capital_scope = {
       FROM = {
         spawn_unit = {
           province = PREV
           owner = FROM
 
troops = {
archers = { 250 250 }
heavy_infantry = { 1000 1000 }
knights = { 500 500 }
horse_archers = { 250 250 }
}
         }
}
}
}
 

nicowaves

Corporal
37 Badges
May 16, 2015
25
0
  • Knights of Pen and Paper +1 Edition
  • Stellaris
  • Crusader Kings II
  • Ship Simulator Extremes
  • Sengoku
  • Magicka
  • Impire
  • Hearts of Iron III
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sword of Islam
  • 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
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Humble Paradox Bundle
  • Crusader Kings II: Way of Life
  • Cities: Skylines
  • War of the Roses
  • Victoria 2
  • Teleglitch: Die More Edition
On further thought, try this:
Code:
FROM = {
capital_scope = {
       FROM = {
         spawn_unit = {
           province = PREV
           owner = FROM

troops = {
archers = { 250 250 }
heavy_infantry = { 1000 1000 }
knights = { 500 500 }
horse_archers = { 250 250 }
}
         }
}
}
}
Thanks, now it works! This is how the decision looks now:
Code:
decisions = {
    add_doomstack = {
        potential = {
            trait = chosen
        }
        allow = {
            scaled_wealth = 0.1
        }
        effect = {
            scaled_wealth = -0.1
            FROM = {
                capital_scope = {
                    FROM = {
                        spawn_unit = {
                            province = PREV
                            owner = FROM
                            troops = {
                                archers = { 250 250 }
                                heavy_infantry = { 1000 1000 }
                                knights = { 500 500 }
                                horse_archers = { 250 250 }
                            }
                        }
                    }
                }
            }
        }
        ai_will_do = { factor = 0 }
    }
}
 

jursamaj

General
125 Badges
Aug 20, 2012
2.360
216
  • Victoria 2: Heart of Darkness
  • Hearts of Iron III
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Leviathan: Warships
  • Rome: Vae Victis
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Magicka 2 - Signup Campaign
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Pillars of Eternity
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: No Step Back
Yes this the problem how to dinamically change the localization based on dynasty?

Usually the Senatorial Seat is hereditary (for now Seniority is used maybe I could try to change to designated heir but I fear that this will glitch all in the buggy Merchant Republic government) so a seat on the Senate would become empty when a dynasty dies without any heir. Obviusly a Senator could have higher level title for example the Senator of House Orsini could be Count of Orvieto. I have already in place a way to create a new Senator when they are less than 24 (but now it counts how many they are probably will be more efficient to use an on_death on action event but how to check that the dying character is the last of his dynasty?) again how to give the title to the new senator and change its name as "Senatorial seat of xxx"?

Thank for your help.
I have no idea if this will work, but maybe try this within the title scope (assuming the new titleholder is ROOT):
set_name = "House of [Root.GetOnlyDynastyName]"
 

Vulgaris

Second Lieutenant
32 Badges
Sep 21, 2010
135
20
  • Crusader Kings II
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Humble Paradox Bundle
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Jade Dragon
  • Mount & Blade: Warband
  • Crusader Kings II: Holy Fury
  • Crusader Kings III
  • 500k Club
  • War of the Roses
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 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
I have a small modding question.
I made my own mod, with own cultures and names.
At a certain moment, the German Alberich is succeeded by the Frisian Alberik.
In the respective culture files, I put Alberich_Alberic and Alberik_Alberic respectively.
Yet Alberik simply stays Alberik and not Alberik II.

What am I doing wrong?