• 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.
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:
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 :/)
 
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.
 
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?
 
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 = {  } }
 
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.
 
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
 
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.
 
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?
 
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
 
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.
 
I want to make something like this.

Mod castles/temples/cities so as to get their title history (list of everyone that ruled that certain barony), exactly how the counties/duchies/kingdoms do it.

Can it be done?
 
I want to make something like this.

Mod castles/temples/cities so as to get their title history (list of everyone that ruled that certain barony), exactly how the counties/duchies/kingdoms do it.

Can it be done?
Have you tried just adding a history file for b_whatever in the title history folder? That's how merchant houses are set up, and I seem to recall it works for regular baronies too. I've used it in a couple of places in the mods I've worked on.

nd
 
Have you tried just adding a history file for b_whatever in the title history folder? That's how merchant houses are set up, and I seem to recall it works for regular baronies too. I've used it in a couple of places in the mods I've worked on.

nd
That does indeed work, but history for barony titles won't be visible in-game.
 
That does indeed work, but history for barony titles won't be visible in-game.
Yeah, the history button is missing, despite all of my attempts...

Oh well, I guess I'll lose my favorite courtiers forever :( I was hoping to see their grand-grand-children still ruling that sole barony I gifted their ancestor at the start of my reign...