• Hearts of Iron IV Survey

    Help us make HoI IV better by sharing your experiences in this 5 minute survey


  • 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

Auirus

First Lieutenant
75 Badges
Dec 10, 2016
217
1
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Republic
  • Stellaris: Federations
  • Stellaris: Apocalypse
  • Crusader Kings II: Conclave
  • BATTLETECH: Season pass
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome Deluxe Edition
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Holy Fury
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • BATTLETECH - Digital Deluxe Edition
  • Cities: Skylines - Green Cities
  • BATTLETECH: Heavy Metal
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Horse Lords
  • Stellaris: Ancient Relics
  • Europa Universalis IV: Dharma
  • Crusader Kings III: Royal Edition
  • Cities: Skylines - Parklife
  • Prison Architect
  • BATTLETECH: Flashpoint
  • Europa Universalis IV
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Distant Stars
  • Victoria 2
  • Europa Universalis IV: Golden Century
  • Cities: Skylines - Parklife Pre-Order
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Pre-order
That's what I was worried about. I was mainly wondering if those special attributes normally tied to religion, culture, or government type like max_consorts, allow_looting, or can_build_hospitals could be applied under other circumstances, like a scripted effect or flags. But from what I'm understanding, it's really not possible.

Would I be correct in assuming the only way I could modify such things (so they don't apply to everyone, but only when my desired condition or flag is met) would be to create custom governments, religions, or cultures which replaces the existing ones when conditions are met? Might not even be worth trying to do, considering I'd have to go over all the events and scripted effects to make sure they also apply to the new custom government/religion...
Yep, thats probably the only way you could do it
 

LordPeter

Marjoram
47 Badges
Mar 5, 2012
2.249
381
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Conclave
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Horse Lords
  • 500k Club
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Stellaris
  • Europa Universalis IV: Third Rome
  • Cities: Skylines
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
That's what I was worried about. I was mainly wondering if those special attributes normally tied to religion, culture, or government type like max_consorts, allow_looting, or can_build_hospitals could be applied under other circumstances, like a scripted effect or flags. But from what I'm understanding, it's really not possible.

Would I be correct in assuming the only way I could modify such things (so they don't apply to everyone, but only when my desired condition or flag is met) would be to create custom governments, religions, or cultures which replaces the existing ones when conditions are met? Might not even be worth trying to do, considering I'd have to go over all the events and scripted effects to make sure they also apply to the new custom government/religion...
It depends on which if these things you want to enable "dynamically", as certain things are easier than others.
For example, as @Omniscient already pointed out, you can dynamically enable crusades by setting a global flag that is checked in the "crusade" casus belli.
Similarly, since patch 2.8 we should be able to define additional restrictions for building holdings, and thus also for hospitals. (At some point that seemed broken though, so I am not sure if it has been fixed already.)
The main idea behind this approach is that you enable something in general, and in the next step forbid it unless a certain flag has been set.
This should work for can_build_hospitals, can_call_crusades and certain other things which can be influenced through dynamic scripting not directly at this point, but further down the road, e.g. in the CB or /common/00_holding_types.txt.
On the other hand, for max_consorts, allow_looting and also e.g. allow_rivermovement this would not work, because these things are only defined in hidden "hardcoded" code, and can only be dis- or enabled before gamestart. The only option here would indeed be a forced conversion, which for various reasons I would not recommend.
 

Abominus

French Maid
77 Badges
Sep 18, 2003
988
37
www.abominus.de.vu
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Sword of the Stars
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Lithoids
  • Crusader Kings II: Sword of Islam
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • 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: Sunset Invasion
  • Darkest Hour
  • Deus Vult
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III Collection
  • Heir to the Throne
Hello again,

I wanted to create a character, that has a random religion:

Code:
            10 = { # Schlächter zufällige Kultur und Religion
                create_character = {
                    age = 16
                    religion = random
                    culture = random
                    race = random
                    dynasty = NONE
                    random_traits = yes
                    martial = 15
                    #trait = hunter
                    trait = robust
                    trait = stubborn
                    trait = strong
                    flag = is_court_executioner
                    flag = executioner_robust
                }
                new_character = {
                    set_character_flag = no_court_invites
                    save_event_target_as = recruited_executioner_target
                    character_event = { id = anus_executioner.1002 }
                }

Culture at random, no problem, but religion, always the same as my character... what can I do?
 

Rydelfox

Lt. General
82 Badges
Oct 30, 2016
1.472
11
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Sword of the Stars
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris - Path to Destruction bundle
  • 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
  • Hearts of Iron III
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Stellaris: Necroids
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
Culture accepts random as an option, but religion does not.

If the new_character section, you could add something like this:
Code:
random_list = {
   1 = {
      religion = catholic
   }
   1 = {
      religion = cathar
   }
   1 = {
      religion = fraticelli
   }
   # ... Repeat for everything
}

For pagan religions, you'll want to check the flag to pick the right version depending on whether or not they've reformed
If you're going to do this a lot, I'd make it a scripted effect to save typing and make it easier to modify if a new religion is added
 

TheDungen

Field Marshal
77 Badges
Jan 31, 2015
11.885
7.505
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Humble Paradox Bundle
  • Crusader Kings II: Horse Lords
  • War of the Roses
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Victoria 2
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Europa Universalis IV
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Age of Wonders
  • Europa Universalis IV: Cradle of Civilization
  • Teleglitch: Die More Edition
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Reapers Due
For some reason these replacements do not happen
Code:
e_scandinavia;Nordic Empire;;;;;;;;;;;;;
e_scandinavia_adj;Nordic;;;;;;;;;;;;;
d_sjaelland;Denmark;;;;;;;;;;;;;
d_sjaelland_adj;Danish;;;;;;;;;;;;;
k_sapmi;Sápmi;;;;;;;;;;;;;
k_sapmi_adj;Samish;;;;;;;;;;;;;
k_mesopotamia;Assyria;;;;;;;;;;;;;
k_mesopotamia_adj;Assyrian;;;;;;;;;;;;;
d_norrland;Medelpad;;;;;;;;;;;;;
d_norrland_adj;Medelpadian;;;;;;;;;;;;;
c_lepiel;Lepel;Lepel;Lepel;;Lepel;;;;;;;;;
c_lepiel_adj;Lepelian;lepelienne;Lepel-;;Lepelian;;;;;;;;;

while the others do happen there seem to be no reason to which one works and which ones do not. They're from different files.

Please help me I have had this problem forever and it can't seem to fix it.
 

Attachments

  • aa_replacentfile.csv
    1,6 KB · Views: 6
Last edited:

MFineberg

Second Lieutenant
61 Badges
Jul 11, 2017
129
1
  • Crusader Kings II
  • Semper Fi
  • Sengoku
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock 2: The Exiled
  • Shadowrun: Hong Kong
  • Age of Wonders
  • Europa Universalis IV: Cradle of Civilization
  • The Showdown Effect
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Europa Universalis IV
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Mare Nostrum
  • Victoria: Revolutions
  • Magicka
  • Heir to the Throne
  • 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: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis IV: Art of War
you can enforce it through its history file under "misc" section :
Code:
# Misc
culture = arpitan
religion = catholic
terrain = hills
thanks a lot for providing an example, and sorry for such late reply, I've been having issues with my computer.
 

ShamanMcLamie

Pure Bred American Mutt
61 Badges
Apr 3, 2014
161
38
  • Crusader Kings II
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Lithoids
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Ancient Relics
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome Sign Up
  • Crusader Kings III
  • Imperator: Rome Deluxe Edition
  • Hearts of Iron IV: La Resistance
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Battle for Bosporus
  • Victoria 2
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Federations
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Pre-order
  • Victoria 2: A House Divided
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Legacy of Rome
So I have two issues I'm trying to figure out. I'm trying to have it so a character has a certain capital at the start of the game.

The second thing is I'm trying to have it so a hospital and fort are already built in a province at the start of the game.
 

Rydelfox

Lt. General
82 Badges
Oct 30, 2016
1.472
11
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Sword of the Stars
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris - Path to Destruction bundle
  • 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
  • Hearts of Iron III
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Conclave
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Stellaris: Necroids
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
For the first one, in their history, add a date, then set the capital. For example:
Code:
1225.1.1 = {
   capital=c_marienburg
}
If you're trying to set the capital holding of a single province, you can so the same thing in the province history, but specifying the barony

Not sure about extra holding though, since the I don't think it's done in vanilla, so I don't have a reference.
 

JumpIT

Corporal
6 Badges
Apr 8, 2013
25
27
  • Crusader Kings II
  • Europa Universalis III: Chronicles
  • March of the Eagles
  • Victoria 2
  • Imperator: Rome Sign Up
Is there a way to stop the deserts changing colour? So as I conquer around them, they stay the same sand colour?
 

TheDungen

Field Marshal
77 Badges
Jan 31, 2015
11.885
7.505
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Humble Paradox Bundle
  • Crusader Kings II: Horse Lords
  • War of the Roses
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Victoria 2
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Europa Universalis IV
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Age of Wonders
  • Europa Universalis IV: Cradle of Civilization
  • Teleglitch: Die More Edition
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Reapers Due
For the first one, in their history, add a date, then set the capital. For example:
Code:
1225.1.1 = {
   capital=c_marienburg
}
If you're trying to set the capital holding of a single province, you can so the same thing in the province history, but specifying the barony

Not sure about extra holding though, since the I don't think it's done in vanilla, so I don't have a reference.
Pretty sure the capital of a title needs to be a province, unless the title is a country then I guess a barony would do.
 

OwerIsTheWay

Recruit
54 Badges
Sep 20, 2016
7
6
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II
  • Steel Division: Normandy 44
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mandate of Heaven
  • BATTLETECH
  • Surviving Mars
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Shadowrun: Hong Kong
  • Imperator: Rome
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Victoria 2
  • Europa Universalis IV: Cossacks
  • Prison Architect
  • Europa Universalis IV: Third Rome
  • 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: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Europa Universalis IV: Res Publica
Hello i'm making a small excommunicate attacker script but it isn't working as intended:

Code:
decisions = {
    excommunicate_war = {
        only_playable = yes
        only_independent = yes
        is_high_prio = yes
        potential = {
#            controls_religion = yes
            religion = catholic
        }
        allow = {
            religion_authority = 0.4
            war = yes
            ROOT = { is_primary_war_defender = yes }
            any_war = {
                attacker = {
                    religion = catholic
                    NOT = { trait = excommunicated }
                }
            }
        }
        effect = {
            ROOT = {
                any_war = {
                    attacker = {
                        add_trait = excommunicated
                        piety = -250
                    }
                }
            }
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 1
        }
    }
}

The allow part works fine (i cannot use the decision if the attacking ruler isn't christian or is already excommunicated)
Unfortunately the effect part is applied to all existing rulers currently involved in a war :(
 

Auirus

First Lieutenant
75 Badges
Dec 10, 2016
217
1
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Republic
  • Stellaris: Federations
  • Stellaris: Apocalypse
  • Crusader Kings II: Conclave
  • BATTLETECH: Season pass
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome Deluxe Edition
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Holy Fury
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • BATTLETECH - Digital Deluxe Edition
  • Cities: Skylines - Green Cities
  • BATTLETECH: Heavy Metal
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Horse Lords
  • Stellaris: Ancient Relics
  • Europa Universalis IV: Dharma
  • Crusader Kings III: Royal Edition
  • Cities: Skylines - Parklife
  • Prison Architect
  • BATTLETECH: Flashpoint
  • Europa Universalis IV
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Distant Stars
  • Victoria 2
  • Europa Universalis IV: Golden Century
  • Cities: Skylines - Parklife Pre-Order
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Pre-order
Hello i'm making a small excommunicate attacker script but it isn't working as intended:

Code:
decisions = {
    excommunicate_war = {
        only_playable = yes
        only_independent = yes
        is_high_prio = yes
        potential = {
#            controls_religion = yes
            religion = catholic
        }
        allow = {
            religion_authority = 0.4
            war = yes
            ROOT = { is_primary_war_defender = yes }
            any_war = {
                attacker = {
                    religion = catholic
                    NOT = { trait = excommunicated }
                }
            }
        }
        effect = {
            ROOT = {
                any_war = {
                    attacker = {
                        add_trait = excommunicated
                        piety = -250
                    }
                }
            }
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 1
        }
    }
}

The allow part works fine (i cannot use the decision if the attacking ruler isn't christian or is already excommunicated)
Unfortunately the effect part is applied to all existing rulers currently involved in a war :(

Try this for the effect, sorry for wonky indents im using my phone :confused:.

Code:
effect = {
    any_current_enemy = {
          limit = {is_primary_war_attacker = yes}
          excommunicate = yes
          piety = -250
       }
}
 
Last edited:

Gladiated

Private
51 Badges
May 26, 2012
20
0
  • Crusader Kings II
  • Knights of Honor
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Rise of Prussia
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings III
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Supreme Ruler 2020
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Heir to the Throne
  • Rome Gold
  • Victoria: Revolutions
  • Majesty 2
  • The Kings Crusade
  • For The Glory
  • Lead and Gold
  • Arsenal of Democracy
  • Mount & Blade: Warband
  • Sword of the Stars
  • Penumbra - Black Plague
  • Semper Fi
  • Cities: Skylines
Anyone know how to start differentiating between characters descended from a character? Using "targeted_decisions" to do it?

Let me get a screenshot.

CK2 Patrilineal and Maternal Mod Example1.png


Whenever I try to make Yuanyu or Changtu/whoever is higher up the tree as the founder of a new dynasty, Ruoxian or Cadet 1's three bastard children always make a fuss. I'm not that keen on modding/coding, but I still can't figure out how to make those three part of the new dynasty. Well, I could make all of them part of the new dynasty, but I want to differentiate between the three as they have three different bastard statuses.

The firstborn, Hanyue (female Han child), has the same father as the other two bastards, but she wasn't acknowledged. Her dynasty was made solely for her (by the game's mechanics).She has no descendants.

The secondborn, Wei (male Han adult), was acknowledged as Ruoxian's child. Let me clarify that the father of the three bastards is some lowborn (no dynasty) mayor and that they all held "bastard", not "legit_bastard". So I think it automatically forces them three to be part of House de Cantabria if acknowledged? Anyway, Wei had some children and he became the founder of a new dynasty.

The thirdborn and namesake of his maternal grandfather, Yuanyu (male Han adult, bald and with eyepatch), is as shown in the screenshot: a bastard of de Cantabria. He has no descendants.

For Hanyue, I want her to remain in her own dynasty. For Wei, I want him and his descendants to remain in his particular dynasty. And for Yuanyu, I want him to become a bastard of what would be Ruoxian's new dynasty by virtue of descent from Yuanyu/Changtu/whoever's the new founder.

I think those are what the game should do if I set somebody higher than Ruoxian as the new dynasty founder. Whenever I tried to mod it, those three always end up as still part of de Cantabria. Or if I include them in the new dynasty, they are all part (bastards) of that new dynasty instead of just Yuanyu.

Also, the father of the two legitimate children of Ruoxian is Ruoxian's paternal fourth cousin (their common ancestor is five generations away), meaning he's also from de Cantabria. The problem is, I've only made Ruoxian's grandfather or great grandfather as the founder of the new dynasty, meaning her paternal fourth cousin isn't included in the new dynasty. But those two legitimate children both end up in the new dynasty even though I want them to stay in de Cantabria. Like if they stay in the de Cantabria, will that make the dynasty tree unusable due to incorrect parentages?

That's my whole problem, the dynasty tree becomes muddle (unusable) cuz I've incorrect scopes and such. Or forcing scopes that go against the dynasty tree's way.

For the second cadet line, we have the matrilineal situation.

Changtu, Chujun, Lin, or Jifu should be the founder of a new dynasty.

Jifu has three children. The first (Lin) is from his first (fruitful) marriage and is not matrilineal. The second (Sansi) and third (Zhuozhen) are from his marriage after the previous one, with the marriage being matrilineal.

Lin, namesake of his paternal grandfather, works well with his three kids. They all become part of the new dynasty.

Sansi and Zhuozhen also become part of the new dynasty. But I want them to remain in their mother's dynasty. I think I actually got these two to work right, but I've been so stumped with the handling of Ruoxian's bastards that I've just completely lost all rational thoughts.

I want children that are the product of a matrilineal marriage to stay in their mother's dynasty when their father's paternal ancestors are made founders of a new dynasty.

For (bastard) children, if the father is de Cantabria and is directly (patrilineally) under the new (male) dynasty founder's tree, I want them to follow into the new dynasty.

If the bastard children's mother is the daughter of a male that's been selected for a new dynasty, I want them to remind in their previous dynasty unless their father is a male that's been selected for the previously said new dynasty.

Sigh, I feel really lost. Like, if there was only a scope that's like:

Code:
ROOT = {
            dynasty = father_bastard/mother_bastard/new_dynasty
            any_direct_patrilineal_descendant = {
                limit = {
                    NOT = {
                        was_conceived_a_bastard = yes/trait = bastard/is_bastard
                        insertmaybe"is_married_matrilineally = yes"here
                    }
                }
                dynasty = ROOT
            }
}

It'd be really great. Like I don't know if I'm missing stuff since it's not in the ck2paradoxwiki site. My scripting/syntax is so horrid since I'm frustated/lost. Sigh.

I know there are cadet mods out there, but they don't really do what I want.

Here's why I want this type of cadet tool:

1. I like to install my dynasty into different thrones.
2. They breed too fast for manual culling (haven't tried autoculling).
3. My dynasty tree becomes very slow, sometimes to the point where it crashes. This has been a bug (limitation) with huge dynasties since launch day, I think.
4. I want to name them by descent. Exempli gratia: if it is through direct paternal descent, "Direct Paternal Descent OriginalDynastyName DistinctivePlaceName" would do fine.
5. Easier tracking of (descendants of) characters who weave in and out of senior, junior, et cetera lines. Using (congenital) traits for this takes too long, I'd rather right-click then form new dynasty to mark the character.

Since dead characters can't be right-clicked on, I have to open up the save file and form the new dynasty while paused/character is immortal. That's the top-down approach. I tried ROOT and any_character/whatever = { is_ancestor_of = ROOT } and then I have to scope to the legitimate and illegitimate siblings and so on for like several generations to make sure the dynasty tree isn't messed up.

Like if somebody could help me out here, it'd be really great. I don't know if it's cuz my mind got overloaded from whatever bug/missing feature. I just don't see a non-recursive way of doing this for version 2.8.1. Like I tried father_even_if_dead nested within father_even_if_dead nested within father_even_if_dead and so on. Like any_dynasty_member_even_if_dead doesn't work or something. I don't even know, man. I'm just lost.

Maybe if I had more background in programming. Sigh.
 

Undecided

First Lieutenant
77 Badges
Apr 27, 2008
290
3
  • Semper Fi
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Leviathan: Warships
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • A Game of Dwarves
  • Sword of the Stars II
  • Supreme Ruler: Cold War
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Jade Dragon
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Art of War
  • Hearts of Iron II: Armageddon
  • 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
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Reapers Due
  • Europa Universalis III Complete
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Europa Universalis III Complete
So there's an event causing a blank event window to show up in my game. So I saved the game with the window still open, and opened the save in a text editor.

I read that CK2 saves used to use a player_event section to list open event windows. But I guess they no longer use them, because my save doesn't have one.

How can I tell what event windows are open for the player from a save?
 

ShamanMcLamie

Pure Bred American Mutt
61 Badges
Apr 3, 2014
161
38
  • Crusader Kings II
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Lithoids
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Ancient Relics
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome Sign Up
  • Crusader Kings III
  • Imperator: Rome Deluxe Edition
  • Hearts of Iron IV: La Resistance
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Battle for Bosporus
  • Victoria 2
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Federations
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Pre-order
  • Victoria 2: A House Divided
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Legacy of Rome
For the first one, in their history, add a date, then set the capital. For example:
Code:
1225.1.1 = {
   capital=c_marienburg
}
If you're trying to set the capital holding of a single province, you can so the same thing in the province history, but specifying the barony

Not sure about extra holding though, since the I don't think it's done in vanilla, so I don't have a reference.

Thanks I was thinking this was an edit in the character files. I don't know why I didn't think to try the titles I knew how to change the capital barony of a province.

For the hospitals I've tried a ton of different things mostly in provinces, but I've also tried code in characters and titles. I've even looked at the save files to see if I've missed anything. You would think it would work similar to trade posts.
 

Auirus

First Lieutenant
75 Badges
Dec 10, 2016
217
1
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Republic
  • Stellaris: Federations
  • Stellaris: Apocalypse
  • Crusader Kings II: Conclave
  • BATTLETECH: Season pass
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome Deluxe Edition
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Holy Fury
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • BATTLETECH - Digital Deluxe Edition
  • Cities: Skylines - Green Cities
  • BATTLETECH: Heavy Metal
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Horse Lords
  • Stellaris: Ancient Relics
  • Europa Universalis IV: Dharma
  • Crusader Kings III: Royal Edition
  • Cities: Skylines - Parklife
  • Prison Architect
  • BATTLETECH: Flashpoint
  • Europa Universalis IV
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Distant Stars
  • Victoria 2
  • Europa Universalis IV: Golden Century
  • Cities: Skylines - Parklife Pre-Order
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Pre-order
So there's an event causing a blank event window to show up in my game. So I saved the game with the window still open, and opened the save in a text editor.

I read that CK2 saves used to use a player_event section to list open event windows. But I guess they no longer use them, because my save doesn't have one.

How can I tell what event windows are open for the player from a save?

Find your character ID either in the save, or ingame using the "charinfo" console command and hovering over your portrait. Then search the save using the ID till you get to the events part.

Alternatively you can also use "charinfo" and hover over the event ingame and it will give you the event ID, this was just recently added.