• Crusader Kings II Expansion Subscription

    Subscribe to the CK II Expansion and enjoy unlimited access to 13 major expansions and more!


  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

Silversweeeper

Ichi no Hito
57 Badges
Aug 24, 2012
3.516
2.155
  • Crusader Kings II: Monks and Mystics
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Common Sense
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis III Complete
  • Stellaris: Necroids
  • 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
  • Europa Universalis III
Actually, only christian group can apply investiture by this method.
I was trying to make a doctrine that add investiture for reformed pagan, but it seems not possible.
Other religion lacks the appointment button in their UI entry, which is hard-coded and is required to open a window for nomination.
I tried manually add the button but I won't work, much as expected.

Unless it's been changed (I've not played as the relevant religions, but some dev diaries and the game files indicate it's still a thing) AtEFF uses cardinal equivalents (and I believe investiture) for a couple of religions outside christian_group (as well as two religions in that group), one of them a reformed pagan religion if they pick Hierocratic (Druidic, a.k.a. celtic_pagan_reformed; not to be confused with Cetic), so it should be possible to make it work in some other way if the approach above doesn't work.
 
Last edited:

Aerotinge

Gouverneur van Torkia
34 Badges
Aug 1, 2018
509
148
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings III Referal
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Pre-order
one of them a reformed pagan religion if they pick Hierocratic (Druidic, a.k.a. celtic_pagan_reformed; not to be confused with Cetic), so it should be possible to make it work in some other way if the approach above doesn't work.
Wow that sounds intrigue. Thanks for sharing and I'll have a look into AtEFF. I can always benefit from senior modder!
 

havenost

Captain
48 Badges
Dec 9, 2013
386
72
  • Crusader Kings II
  • Pillars of Eternity
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III: Collection
  • Cities: Skylines - Campus
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • War of the Roses
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV
  • Cities: Skylines
  • 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
  • Hearts of Iron III
  • Cities in Motion 2
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Art of War
  • For the Motherland
  • Stellaris
  • Cities: Skylines - Snowfall
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Magicka 2
  • Majesty 2 Collection
  • Semper Fi
  • Europa Universalis IV: El Dorado
What does "has_religion_feature = religion_equal" check for? How do I give a religion the religion_equal feature? Is it the "feminist = yes" command in the religion file?
 

Whizzer

CKPlus Triumvirate
75 Badges
Jun 17, 2014
1.007
219
  • Semper Fi
  • Hearts of Iron III Collection
  • Heir to the Throne
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Victoria: Revolutions
  • Rome Gold
  • Cities in Motion
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron III
  • A Game of Dwarves
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • War of the Roses
  • Crusader Kings III
  • Europa Universalis IV
What does "has_religion_feature = religion_equal" check for? How do I give a religion the religion_equal feature? Is it the "feminist = yes" command in the religion file?
Religion features are applied on reformation only.
 

Silversweeeper

Ichi no Hito
57 Badges
Aug 24, 2012
3.516
2.155
  • Crusader Kings II: Monks and Mystics
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Common Sense
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis III Complete
  • Stellaris: Necroids
  • 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
  • Europa Universalis III
What does "has_religion_feature = religion_equal" check for? How do I give a religion the religion_equal feature? Is it the "feminist = yes" command in the religion file?

It checks for an identically named religion feature (Nature, Doctrine, or Leadership) having been applied to the religion, which can only be applied during a HF reformation or when setting up a religion using Random World. You can give a religion some or all of the things related a certain feature in other ways (e.g. adding women_can_take_consorts = yes to the religion definition if you want women to have consorts), though it is sometimes a bit messy (some things are scattered over several files, for one thing), and has_religion_feature won't understand what you've done, meaning you might have to put it in an OR block alongside an explicit check for your religion or the like wherever it shows up (which sometimes can be a lot of files).
 

jursamaj

General
120 Badges
Aug 20, 2012
2.324
199
  • 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
  • Stellaris: Necroids
It checks for an identically named religion feature (Nature, Doctrine, or Leadership) having been applied to the religion, which can only be applied during a HF reformation or when setting up a religion using Random World. You can give a religion some or all of the things related a certain feature in other ways (e.g. adding women_can_take_consorts = yes to the religion definition if you want women to have consorts), though it is sometimes a bit messy (some things are scattered over several files, for one thing), and has_religion_feature won't understand what you've done, meaning you might have to put it in an OR block alongside an explicit check for your religion or the like wherever it shows up (which sometimes can be a lot of files).
I really don't understand why PDX didn't integrate religion features into the vanilla religions. It would have made modding religions far simpler.
 
  • 1
Reactions:

Andrew0Red

Corporal
Mar 10, 2021
34
3
I really don't understand why PDX didn't integrate religion features into the vanilla religions. It would have made modding religions far simpler.
Part 1: Probably because vanilla religions were already working as intended - if it ain't broke, don't fix it. (We've all seen too many bugs introduced by "improving" something...)

Part 2: Much as we would like to think otherwise, [any company] is out to sell their own products, not someone else's. If it's modable, that's a free bonus or an unfortunate consequence, depending on the company. (Even though we don't charge for mods, they're still our products, not PDX')

(I don't like it either, I'm just slightly more cynical and realistic :/)
 

jursamaj

General
120 Badges
Aug 20, 2012
2.324
199
  • 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
  • Stellaris: Necroids
Part 1: Probably because vanilla religions were already working as intended - if it ain't broke, don't fix it. (We've all seen too many bugs introduced by "improving" something...)

Part 2: Much as we would like to think otherwise, [any company] is out to sell their own products, not someone else's. If it's modable, that's a free bonus or an unfortunate consequence, depending on the company. (Even though we don't charge for mods, they're still our products, not PDX')

(I don't like it either, I'm just slightly more cynical and realistic :/)
In my view, adding a kludge *is* breaking it. This doesn't just affect modding, it affects the efficiency of the code and further development of the vanilla game. Them developing their own game is mostly the same work as modding.

Also, it largely works the other way around: the modding helps sell the game, making all modders unpaid developers. Granted, with many of them "you get what you pay for", but for a set of hardcore modders, there are whole sub-communities that play a particular mod, and drag many of their friends into the game because of it.
 

Aerotinge

Gouverneur van Torkia
34 Badges
Aug 1, 2018
509
148
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings III Referal
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 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
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Pre-order
Possibly a hard-coded restriction(bug) in AI, but I want to know if my misunderstanding is wrong
common/governments/republic_governments.txt
Code:
confucian_bureaucracy = {
...
        aggression = 0 # AI only attacks by script
My understanding is, a character with this kind of government has his AI aggression multiply with zero.
Even calculate with aggression value in the religion, it should be zero since it's a coefficient.

But today I have a character with such government, who own 70k troop, still doing declaration of war randomly by non-script.
Is it my misunderstanding with comment above, or is the troops works like an "additive_modifier" for AI aggression calculation?
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
117
7
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
How do you scope with individual flanks in the enemy (or your own) army if they don't have a leader? The closest thing I could find are
Code:
combat = { }
and
Code:
combat = { enemy = {  } }
 

kiannameiou

Private
1 Badges
Apr 27, 2021
12
1
  • Crusader Kings II
Code:
character_event = {
    id = immortality.66
    desc = build_hospital_port
    picture = GFX_evt_throne_room
    border = GFX_event_normal_frame_economy
    
    only_playable = yes
    ai = no
    
    
    mean_time_to_happen  = {
        months = 1
    }
    
    trigger = {
        any_demesne_province = {
            
                has_hospital = no
                
            
            
        }
        
        
        
    }
    
    option = {
        name = build_hospital_port_name
        scaled_wealth = -0.1
        
            any_demesne_province = {
                limit = {
                    AND = {
                        has_hospital = no
                        port = yes
                    }
                }
                holder_scope = {
                    create_hospital = PREV
                }
            }
        
    }
}

This will cause every of my coastal province that has no hospital to get a hospital. Now its all fine and dandy, but how to reduce the effect to just a single province for each event run?? random_ does not work.
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
117
7
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
Code:
character_event = {
    id = immortality.66
    desc = build_hospital_port
    picture = GFX_evt_throne_room
    border = GFX_event_normal_frame_economy
  
    only_playable = yes
    ai = no
  
  
    mean_time_to_happen  = {
        months = 1
    }
  
    trigger = {
        any_demesne_province = {
          
                has_hospital = no
              
          
          
        }
      
      
      
    }
  
    option = {
        name = build_hospital_port_name
        scaled_wealth = -0.1
      
            any_demesne_province = {
                limit = {
                    AND = {
                        has_hospital = no
                        port = yes
                    }
                }
                holder_scope = {
                    create_hospital = PREV
                }
            }
      
    }
}

This will cause every of my coastal province that has no hospital to get a hospital. Now its all fine and dandy, but how to reduce the effect to just a single province for each event run?? random_ does not work.
its random_ equivalent is random_demesne_title
 

Silversweeeper

Ichi no Hito
57 Badges
Aug 24, 2012
3.516
2.155
  • Crusader Kings II: Monks and Mystics
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Common Sense
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis III Complete
  • Stellaris: Necroids
  • 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
  • Europa Universalis III
why not random_demesne_province? its so hard to understand stimes. And thank you will try it out

It probably seemed like a good idea to use _title when it was added (which potentially was before release) and changing it could have been a low priority (that never was gotten around to) and/or could have been deemed a bad idea (as it'd both force a rewrite of any vanilla script using _title and have broken any mods using it if they got rid of _title). It's hardly the only quirky thing about the scripting language.
 

kiannameiou

Private
1 Badges
Apr 27, 2021
12
1
  • Crusader Kings II
thank you. wish there was more examples of all the possible scripts in vanilla.
Code:
character_event = {
    id = immortality.44
    desc = "EVTDESC75071"
    picture = GFX_evt_throne_room
    border = GFX_event_normal_frame_economy
    
    only_playable = yes
    ai = no
    
    
    mean_time_to_happen  = {
        months = 1
    }
    
    trigger = {
        any_demesne_province = {
            has_disease = yes
        }
        OR = {
            trait = enhanced_immortal
            trait = hero_immortal
        }
        
        
    }
    
    option = {
        name = "EVTOPTA75071"
        scaled_wealth = -0.1
        
            random_demesne_title = {
                limit = {
                    has_disease = yes
                }
                reduce_disease = -0.9
            }
        
    }
}

so this should drastically reduce disease in a random province that has disease, right?
 

kiannameiou

Private
1 Badges
Apr 27, 2021
12
1
  • Crusader Kings II
Code:
province_event = {
    id = immortality.67
    desc = upgrade_hospital_mod
    picture = GFX_evt_throne_room
    border = GFX_event_normal_frame_economy

    only_playable = yes
    ai = no


    mean_time_to_happen  = {
        months = 1
    }

    trigger = {
        owner = {
            ai = no
        }
        has_hospital = yes
                NAND = {
                    hospital_has_building = hospital_building_1
                    hospital_has_building = hospital_building_2
                    hospital_has_building = hospital_building_3
                    hospital_has_building = hospital_building_4
                    hospital_has_building = hospital_building_5
                    hospital_has_building = leper_colony_1
                    hospital_has_building = soup_kitchen_1
                    hospital_has_building = chapel_1
                    hospital_has_building = translation_house_1
                    hospital_has_building = pilgrims_inn_1
                    hospital_has_building = library_1
                    hospital_has_building = pharmacology_laboratory_1
                    hospital_has_building = medical_academy_1
                    hospital_has_building = observatory_1
                }



    }

    option = {
        name = upgrade_hospital_name
        scaled_wealth = -0.1

        hidden_tooltip = {
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = hospital_building_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = hospital_building_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = hospital_building_2
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = hospital_building_2
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = hospital_building_3
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = hospital_building_3
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = hospital_building_4
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = hospital_building_4
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = hospital_building_5
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = hospital_building_5
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = leper_colony_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = leper_colony_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = soup_kitchen_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = soup_kitchen_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = chapel_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = chapel_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = translation_house_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = translation_house_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = pilgrims_inn_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = pilgrims_inn_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = library_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = library_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = pharmacology_laboratory_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = pharmacology_laboratory_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = medical_academy_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = medical_academy_1
                }
            }
            if = {
                limit = {
                    NOT = {
                        hospital_has_building = observatory_1
                    }
                }
                add_to_extra_holding = {
                    type = hospital
                    building = observatory_1
                }
            }
        }

    }
}

How to change this, to target a random hospital and fully upgrade it. Right now it upgrades every single hospital not in ai province
 

kiannameiou

Private
1 Badges
Apr 27, 2021
12
1
  • Crusader Kings II
Is it possible to add to a CB;

imprison losing rulers on attacker victory. if the attacker beats the defender, imprison the ruler.
 

Silversweeeper

Ichi no Hito
57 Badges
Aug 24, 2012
3.516
2.155
  • Crusader Kings II: Monks and Mystics
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Common Sense
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis III Complete
  • Stellaris: Necroids
  • 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
  • Europa Universalis III
Is it possible to add to a CB;

imprison losing rulers on attacker victory. if the attacker beats the defender, imprison the ruler.

It's possible; check vanilla's Rivalry CB for an example.