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

Wokky

Corporal
56 Badges
Feb 7, 2015
38
46
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Rome Gold
  • Stellaris: Leviathans Story Pack
  • Crusader Kings III
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Tyranny: Gold Edition
  • Hearts of Iron IV: By Blood Alone
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Stellaris: Necroids
  • Victoria 2
  • Battle for Bosporus
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • King Arthur II
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
Simpler would be finding where the modifier is applied (probably the relevant CB) and changing the duration.

I thought the same but I can find no mention of launched_prepared_invasion in cb_types (I assume thats where it would be). In fact the only mention of that modifier I could find anywhere was in misc_old_gods_events regarding "Special event for Bagsecg of Jylland to invade Mercia with "the Great Summer Army". I've assumed that that has nothing to do with what im trying to do..

EDIT: Theres another mention of it in 00_event_modifiers:

launched_prepared_invasion = { icon = 1 } # Used in the code - do NOT remove!
launched_subjugation = { icon = 1 }

Whatever that means..
 
Last edited:

Tintiam

Captain
9 Badges
Jul 14, 2015
339
114
  • 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 IV
I'm having some trouble with a reformed religious title for a religion with reformed_head_of_religion = yes

Once the faith reforms, the title is not granted to the reformer, but to some random lowborn. Only the title is granted, and so the character is essentially landless. Once one day passes, he loses the title (because he is landless), and the title is destroyed. I can then create the title normally, and hold it normally.

But the title should be going to the reformer, not to some random character and immediately destroyed. Any ideas what it could be?



I can post the code but it's pretty much identical to existing religions and titles. And everything works, it's just on reformation that the title is handed out incorrectly for some reason
 
Last edited:

trias10

First Lieutenant
28 Badges
Mar 15, 2012
235
24
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Reapers Due
  • Stellaris - Path to Destruction bundle
  • Steel Division: Normandy 44
  • Steel Division: Normand 44 - Second Wave
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Magicka
  • The Kings Crusade
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings III
  • Steel Division: Normandy 44 -  Back to Hell
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings III: Royal Edition
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • 500k Club
  • Cities: Skylines
Does anyone know if there is a way to return the number of buildings in a settlement as an int to be used in a calculation? For example, here is an excerpt from the pillage_settlement decision:

Code:
location = {
    owner = {
            if = {
            limit = {
                character = FROM
            }
            FROM = {
                wealth = 50
            }
        }

But I would like to scale the wealth based on the number of buildings in the settlement, so something like this:

Code:
location = {
    owner = {
        if = {
            limit = {
                character = FROM
            }
            FROM = {
                wealth = PREV = { 50 * num_of_buildings }
            }
        }

Something like that, where the num_of_buildings gives back an integer, and we can multiply it by some other value. Not sure if this is something that can even be done, but would appreciate any help if someone knows.
 

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 there is any script to check the number of buildings in a holding, let alone return its value.
 

omega20056

Basileus Basileon
94 Badges
Dec 27, 2012
4.463
2.009
  • Crusader Kings III: Royal Edition
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Battle for Bosporus
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Victoria 3 Sign Up
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • March of the Eagles
  • Europa Universalis IV
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Green Cities
  • Stellaris: Federations
  • Europa Universalis IV: Res Publica
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mare Nostrum
  • Imperator: Rome Deluxe Edition
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Third Rome
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: El Dorado
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • 500k Club
  • Stellaris: Ancient Relics
  • Victoria 2
  • Imperator: Rome
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Synthetic Dawn
  • Stellaris: Lithoids
Can the obligations screen be disabled or replaced with a demense laws screen? I'd settle with having the old demense laws under the obligation laws if they weren't bunched together and blacked out. With this in mind, would it be possible to remove the two smaller scrolls from the obligations screen?
 

mjohnson85

Keeper of Western Europe
29 Badges
Apr 12, 2012
2.165
2.329
  • Crusader Kings II: Charlemagne
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • 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: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings III
  • Imperator: Rome
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
I don't believe there is any script to check the number of buildings in a holding, let alone return its value.

Could you maybe add events to check a flag on the b_title (one added for each building) then use a calc_true_if clause for a count of the flags?
 

blackninja9939

Experienced Programmer - Crusader Kings 3
Paradox Staff
78 Badges
Aug 28, 2013
2.401
7.847
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
Can the obligations screen be disabled or replaced with a demense laws screen? I'd settle with having the old demense laws under the obligation laws if they weren't bunched together and blacked out. With this in mind, would it be possible to remove the two smaller scrolls from the obligations screen?
They will appear in the obligations screen but in the definition for the law have law_type = realm not law_type = obligations. I had that issue with updating AGOT, I set it to be obligations and they were kinda blacked out but changing that made it work ok for non-conclave issues
 

omega20056

Basileus Basileon
94 Badges
Dec 27, 2012
4.463
2.009
  • Crusader Kings III: Royal Edition
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Battle for Bosporus
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Victoria 3 Sign Up
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • March of the Eagles
  • Europa Universalis IV
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Green Cities
  • Stellaris: Federations
  • Europa Universalis IV: Res Publica
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mare Nostrum
  • Imperator: Rome Deluxe Edition
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Third Rome
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: El Dorado
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • 500k Club
  • Stellaris: Ancient Relics
  • Victoria 2
  • Imperator: Rome
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Synthetic Dawn
  • Stellaris: Lithoids
They will appear in the obligations screen but in the definition for the law have law_type = realm not law_type = obligations. I had that issue with updating AGOT, I set it to be obligations and they were kinda blacked out but changing that made it work ok for non-conclave issues
Won't the obligations screen appear blank then? Or does that not happen if you place them in the obligations file but label them as realm laws?
 

blackninja9939

Experienced Programmer - Crusader Kings 3
Paradox Staff
78 Badges
Aug 28, 2013
2.401
7.847
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
Won't the obligations screen appear blank then? Or does that not happen if you place them in the obligations file but label them as realm laws?
If you put it in a law = { clause then they will go in obligations and put the law_groups it will be in the obligations tab, it is for me so try it
 
  • 1
  • 1
Reactions:

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 thought the same but I can find no mention of launched_prepared_invasion in cb_types (I assume thats where it would be). In fact the only mention of that modifier I could find anywhere was in misc_old_gods_events regarding "Special event for Bagsecg of Jylland to invade Mercia with "the Great Summer Army". I've assumed that that has nothing to do with what im trying to do..

EDIT: Theres another mention of it in 00_event_modifiers:

launched_prepared_invasion = { icon = 1 } # Used in the code - do NOT remove!
launched_subjugation = { icon = 1 }

Whatever that means..
Indeed, the hard-coded diplomatic action to launch a prepared invasion is where the modifier is applied, so we can't change it's duration directly. You *could* do as richvh mentioned, and completely replace the hard-coded action with a decision. Or you could have an event with short MTTH, triggered by having that modifier but *not* having some other flag. When the event fires, remove the existing permanent modifier, add the modifier with the duration you want, and add the flag mentioned in the trigger. Sadly, there is no had_character_modifier which would let you test how long a character has had one, because that would make it even easier.
 
  • 1
Reactions:

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'm having some trouble with a reformed religious title for a religion with reformed_head_of_religion = yes

Once the faith reforms, the title is not granted to the reformer, but to some random lowborn. Only the title is granted, and so the character is essentially landless. Once one day passes, he loses the title (because he is landless), and the title is destroyed. I can then create the title normally, and hold it normally.

But the title should be going to the reformer, not to some random character and immediately destroyed. Any ideas what it could be?

I can post the code but it's pretty much identical to existing religions and titles. And everything works, it's just on reformation that the title is handed out incorrectly for some reason
The religion she have 'reformer_head_of_religion = yes', as norse_pagan does.
The title should have 'controls_religion = norse_pagan_reformed' and 'religion = norse_pagan_reformed', as d_norse_pagan_reformed does.
 
  • 1
Reactions:

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 believe there is any script to check the number of buildings in a holding, let alone return its value.
Actually, 'num_of_buildings = N' is a valid trigger, used 10 times in vanilla.

Something like that, where the num_of_buildings gives back an integer, and we can multiply it by some other value. Not sure if this is something that can even be done, but would appreciate any help if someone knows.
Sadly, Paradox's scripting language simply doesn't do that, returning a value that you can then do math on. It's one of the greatest shortcomings of the game. :confused:

If you really wanted to go to the effort, you could write a section that would test 'num_of_buildings = N against every reasonable value of N, and set a variable equal to the N that succeeds, multiplied by 50. The problem then is that their scripting won't *take* a variable where it expects a number either, as you would want 'wealth = amount'.
 
Last edited:

Keizer Harm

Swamp German
40 Badges
Jan 28, 2013
2.737
4.097
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Sunset Invasion
  • Victoria 2
I'm making this event that passes a noble blood trait if the "dominant" parent has it, i.e. usually the father but the mother in a matri-marriage. But it seems like with some children this event does work, and with others it doesn't and nothing gets passed on.
Here's the on_actions file:
Code:
on_post_birth = {
    events = {
        NOBLE.01
    }
}
And the event itself:
Code:
namespace = NOBLE

character_event = {
    id = NOBLE.01

    hide_window = yes
   
    is_triggered_only = yes

    option = {
        name = EVTOPTA_NOBLE_01
        trigger = {
            OR = {
                father_even_if_dead = {
                    AND = {
                        dynasty = ROOT
                        trait = noble_blood
                    }
                }
                mother_even_if_dead = {
                    AND = {
                        dynasty = ROOT
                        trait = noble_blood
                    }
                }
            }
        }
        add_trait = noble_blood
    }
    option = {
        name = EVTOPTB_NOBLE_01
    }
}
 

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
Put a trigger in option B, restricting it to the cases where the first option can't trigger.
 
  • 1
Reactions:

Tintiam

Captain
9 Badges
Jul 14, 2015
339
114
  • 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 IV
Anyone know how to match alert icons? alerts.gfx and alerts.gui don't tell me much

I have reformable religions but when the reformation is possible the alert icon is all black. I want it to be the same the image the vanilla reformable religions gets.
 

Wokky

Corporal
56 Badges
Feb 7, 2015
38
46
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Rome Gold
  • Stellaris: Leviathans Story Pack
  • Crusader Kings III
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Tyranny: Gold Edition
  • Hearts of Iron IV: By Blood Alone
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Stellaris: Necroids
  • Victoria 2
  • Battle for Bosporus
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • King Arthur II
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
Indeed, the hard-coded diplomatic action to launch a prepared invasion is where the modifier is applied, so we can't change it's duration directly. You *could* do as richvh mentioned, and completely replace the hard-coded action with a decision. Or you could have an event with short MTTH, triggered by having that modifier but *not* having some other flag. When the event fires, remove the existing permanent modifier, add the modifier with the duration you want, and add the flag mentioned in the trigger. Sadly, there is no had_character_modifier which would let you test how long a character has had one, because that would make it even easier.

Thanks. It is possible to remove the launched_prepared_invasion modifier in 00_event_modifiers without any (immediate) ill effects despite what the note says, that allows you to prepare invasions as many times as you want. With that in mind I wonder if it would be simpler to add a new modifier to the viking_invasion (prepared invasion) cb? Once you actually declare war the new modifier would activate preventing you from preparing an invasion again for X amount of years.
 
Last edited:

elvain

Africa & MidEast cartographer
35 Badges
Jan 20, 2004
4.918
3.700
www.rome.webz.cz
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • Cities: Skylines - Campus
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Way of Life
Did you ever find out what the problem was?
not yet. I've still got number of other issues to do, so I am putting it up for now
 

Tintiam

Captain
9 Badges
Jul 14, 2015
339
114
  • 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 IV
Thanks. It is possible to remove the launched_prepared_invasion modifier in 00_event_modifiers without any (immediate) ill effects despite what the note says, that allows you to prepare invasions as many times as you want. With that in mind I wonder if it would be simpler to add a new modifier to the viking_invasion (prepared invasion) cb? Once you actually declare war the new modifier would activate preventing you from preparing an invasion again for X amount of years.
I doubt it, considering the CB is fired by the diplomatic action. You'd have started your planning, waited a year, and then suddenly find out you can't wage this war
 

omega20056

Basileus Basileon
94 Badges
Dec 27, 2012
4.463
2.009
  • Crusader Kings III: Royal Edition
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Battle for Bosporus
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Victoria 3 Sign Up
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • March of the Eagles
  • Europa Universalis IV
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Green Cities
  • Stellaris: Federations
  • Europa Universalis IV: Res Publica
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mare Nostrum
  • Imperator: Rome Deluxe Edition
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Third Rome
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: El Dorado
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • 500k Club
  • Stellaris: Ancient Relics
  • Victoria 2
  • Imperator: Rome
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Synthetic Dawn
  • Stellaris: Lithoids
If you put it in a law = { clause then they will go in obligations and put the law_groups it will be in the obligations tab, it is for me so try it
Could you show me a screencap of this working for you? I can't seem to be able to get it working myself. The laws are appearing for me in the realm laws screen, and the obligations screen is empty.