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

Chatoustikmou

Major
146 Badges
May 21, 2016
749
1.351
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - After Dark
  • Tyranny: Archon Edition
  • Europa Universalis IV: Mandate of Heaven
  • Magicka 2
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Warlock 2: The Exiled
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Hearts of Iron III: Their Finest Hour
  • The Kings Crusade
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Impire
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Hearts of Iron IV: No Step Back
  • Divine Wind
  • Cities in Motion 2
  • Arsenal of Democracy
I'm occasionally having issues where I'm trying to override a specific ingame event (and only that event) in a mod being overridden by the event in the base game files. There doesn't seem to be any rhyme nor reason to this (I have other events overriden using files with the same naming convention, same date/time stamps,etc that work fine). Is there a known way to work around this ?

(I'm sure I saw this issue mentioned in discussions earlier but I can't remember the keywords to get it to pop up again)

The game currently does not support single event replacement, not like it does for most database objects in the common folder. That's why you get errors on game start about duplicate events. It sometimes work, but sometimes not, and at some point it might make your game crash on load seemingly at random.

The only supported way of doing things, is to replace the whole event file.
 

Chatoustikmou

Major
146 Badges
May 21, 2016
749
1.351
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - After Dark
  • Tyranny: Archon Edition
  • Europa Universalis IV: Mandate of Heaven
  • Magicka 2
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Warlock 2: The Exiled
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Hearts of Iron III: Their Finest Hour
  • The Kings Crusade
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Impire
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Hearts of Iron IV: No Step Back
  • Divine Wind
  • Cities in Motion 2
  • Arsenal of Democracy
Currently, I am able to have an event track down killer of parents or grand parents by specifically scoping to them then set the killer (if alive) as rival with a set_relation_rival = scope:murdered_relative.killer.

However, I find this limiting and have no luck with using any/random house member. Any advice on how I can improve this code? The goal is to make this character avenge the relative's death.

I think X_house_member iterates through living house members only. But you can combine it with X_ancestor.

Code:
random_house_member = {
   limit = {
      any_ancestor = {
         is_alive = no
         exists = killer
         killer = { is_alive = yes }
      }
   }
   random_ancestor = {
      limit = {
         is_alive = no
         exists = killer
         killer = { is_alive = yes }
      }
      save_scope_as = murdered_relative
   }
}
 
  • 1
Reactions:

Beyond Disbelief

Creator of House Traditions Mod
97 Badges
Jun 29, 2015
1.163
1.250
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Hearts of Iron IV: No Step Back
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Victoria 2
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • BATTLETECH - Digital Deluxe Edition
I think X_house_member iterates through living house members only. But you can combine it with X_ancestor.

Code:
random_house_member = {
   limit = {
      any_ancestor = {
         is_alive = no
         exists = killer
         killer = { is_alive = yes }
      }
   }
   random_ancestor = {
      limit = {
         is_alive = no
         exists = killer
         killer = { is_alive = yes }
      }
      save_scope_as = murdered_relative
   }
}
Thanks. Is there a way to at least iterate to dead siblings and ideally cousins?
 

Beyond Disbelief

Creator of House Traditions Mod
97 Badges
Jun 29, 2015
1.163
1.250
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Hearts of Iron IV: No Step Back
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Victoria 2
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • BATTLETECH - Digital Deluxe Edition
A scripted_effect does not return a value, it executes an effect.



You're using malformed script to explain what your intent is, but since the script is malformed, it's complicated to understand that intent.
Neither opposite_trait.brave doesn't make any sense, because as far as I can tell, opposite_trait isn't a thing. Well it's a define, but that does nothing in this context.

It might be simpler if you explain what you're trying to do in normal english, and then we can help you translate that in script with the proper syntax.
I don't suppose there's any tool to do this thing? Script Value doesn't seem to be what I'd hope it'd be.


IIRC in CK2 you can simply tell the game to add a trait and if the opposite trait exists, it'll get replaced. Not so in CK3, so in order to replace the trait the specific opposite trait needs to be removed first. This can be very arduous to code through every occurrance, especially as my mod is dynamically adjusting personality traits.

Basically, I need to be able to dynmically feed a $trait$ value to (something) so that it would identify the opposite trait to $trait$ automatically and execute the follow-up actions accordingly.
 

Elaugaufein

Corporal
87 Badges
Aug 7, 2021
38
31
  • Victoria 3 Sign Up
  • Hearts of Iron IV: No Step Back
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: By Blood Alone
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Galaxy Edition
  • Shadowrun: Dragonfall
  • Empire of Sin
  • Battle for Bosporus
  • Crusader Kings III
  • Hearts of Iron IV: La Resistance
  • Cities: Skylines - Campus
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Holy Fury
  • Cities: Skylines Industries
  • Cities: Skylines - Snowfall
  • Shadowrun Returns
  • Europa Universalis IV: Dharma
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cradle of Civilization
  • King Arthur II
  • Europa Universalis III Complete
  • Heir to the Throne
  • For The Glory
  • 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
The game currently does not support single event replacement, not like it does for most database objects in the common folder. That's why you get errors on game start about duplicate events. It sometimes work, but sometimes not, and at some point it might make your game crash on load seemingly at random.

The only supported way of doing things, is to replace the whole event file.
Thanks. Bleah. That makes it super hard to do properly modular mods or to have mods that integrate well. Hopefully they fix that at some point.
 

Beyond Disbelief

Creator of House Traditions Mod
97 Badges
Jun 29, 2015
1.163
1.250
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Hearts of Iron IV: No Step Back
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Victoria 2
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • BATTLETECH - Digital Deluxe Edition
So I'm in the final stretches to finishing my Cadet House/ House traditions mod but I am having trouble with on_actions / automatic triggers.

The gist of how the mod works is this:

1) Player decide on House traditions (for example, for GoT fans, House Stark embodies Honor which are associated with Honest, Just, and Stubborness)

once the traditions is set, they would immediately get a house modifier which serves both as a "flag" for the rest of the mod to track and to grant immediate bonuses to the player's Dynasty/House.

2) At ages 5 and 14, event house_trad.1001 and house_trad_2001 accordingly will pop up respective to each age.

Both the 1###-series and the 2### series are child-driven events where only the child is making decisions.

1001 is an organizer event that identifies which House tradition the child belongs to and fires the appropriate 1### event for the 5th year old

Likewise, 2001 is an organizer event that identifies which House tradition the child belongs to and fires the appropriate 2### event for the 14 year old.

All events in this block function flawlessly when manually fired via DEBUG and chains correctly.

2001 is ALSO working on its own in LIVE testing (no console) for sure since it has a 100% guaranteed result that is observable and 100% reproducible. I am not as sure about 1001 since it has a failure chance but I *do* believe it is working correctly, though the failure rate appears to be higher in my current test run. I am still observing this.

However, the 1### series after the child makes a decision it is supposed to send a feedback event to the Guardian to let them know what the child did. This event works when manually typing "event house_trad.1001 <character_ID>" and resolves the AI child's decision from 1### THEN bounce tot he 3rd event in the chain which the guardian sees. HOWEVER, I have not received a single feedback event when just simply running the game w/o manually initiating 1001.

3) At ages 9 and 12, event house_trad.5001 is expected to pop up.

Event 5### series works is that 5001 is an organizer event initiated from the child when they hit 9 and 12 years old, it checks for the appropraite tradition, then pass it on to the guardian who would then fire the appropriate 5### event.

The intention for 5### series is for the educator to give a lesson on house traditions to the child, so the educator/guardian is the one making the decision, even though the triggering conditions are sourced from the child.

This sequence works flawlessly in DEBUG and chains from the child to the guardian correctly.

However, NOT ONCE in live testing over several children did the event pop up.

I suspect I am misunderstanding/misconfiguring something about how on_actions and event triggers work.


Here's some relevant code:

Code:
on_specific_birthday = {
    first_valid_on_action = {
        on_3rd_birthday
        on_6th_birthday
        on_10th_birthday
        on_15th_birthday
        on_16th_birthday

        # House Tradition events
        on_5th_birthday
        on_9th_birthday
        on_12th_birthday
        on_14th_birthday
    }
}

Code:
# Shifted to avoid interfering with education setting event at 6th
on_5th_birthday = {
    trigger = {
        age = 5
        exists = dynasty
    }
    events = {
        house_trad.1001
    }
}

# Shifted to avoid interfering with witch event at 15th
on_14th_birthday = {
    trigger = {
        age = 14
        exists = dynasty
    }
    events = {
        house_trad.2001
    }
}

on_9th_birthday = {
    trigger = {
        age = 9
    }
    events = {
        house_trad.5001
    }
}

on_12th_birthday = {
    trigger = {
        age = 12
    }
    events = {
        house_trad.5001
    }
}

Code:
house_trad.5001 = {
    hidden = yes

    trigger = {
#        age >= 9
        #age = 12    # If enforced, should be triggered by on_birthday action
        any_relation = {
            type = guardian
            has_relation_flag = {
                target = root
                relation = ward
            }
            exists = dynasty
            # OR = {
            #     house = { has_house_modifier = trad_valor }
            #     house = { has_house_modifier = trad_honor }
            #     house = { has_house_modifier = trad_duty }
            #     house = { has_house_modifier = trad_justice }
            #     house = { has_house_modifier = trad_vengeance }
            #     house = { has_house_modifier = trad_pride }
            #     house = { has_house_modifier = trad_respect }    #authority
            #     house = { has_house_modifier = trad_power }
            #     house = { has_house_modifier = trad_influence }
            #     house = { has_house_modifier = trad_guile }
            #     house = { has_house_modifier = trad_survival }    #perseverance
            #     house = { has_house_modifier = trad_vigilance }
            #     house = { has_house_modifier = trad_peace }
            #     house = { has_house_modifier = trad_fortune }
            #     house = { has_house_modifier = trad_knowledge }
            #     house = { has_house_modifier = trad_truth }
            #     house = { has_house_modifier = trad_wisdom }
            #     house = { has_house_modifier = trad_devotion }
            #     house = { has_house_modifier = trad_family }
            #     house = { has_house_modifier = trad_compassion }
            #     house = { has_house_modifier = trad_joy }
            # }
        }
    }

    immediate = {
        save_scope_as = personality_child
        random_relation = {
            type = guardian
            save_scope_as = guardian
        }
        scope:guardian = {
            if = {
                limit = { house = { has_house_modifier = trad_valor } }
                trigger_event = house_trad.5010
            }
            if = {
                limit = { house = { has_house_modifier = trad_honor } }
                trigger_event = house_trad.5020
            }
            if = {
                limit = { house = { has_house_modifier = trad_duty } }
                trigger_event = house_trad.5030
            }
            if = {
                limit = { house = { has_house_modifier = trad_justice } }
                trigger_event = house_trad.5040
            }
            if = {
                limit = { house = { has_house_modifier = trad_vengeance } }
                trigger_event = house_trad.5050
            }
            if = {
                limit = { house = { has_house_modifier = trad_pride } }
                trigger_event = house_trad.5060
            }
            if = {
                limit = { house = { has_house_modifier = trad_respect } }
                trigger_event = house_trad.5070
            }
            if = {
                limit = { house = { has_house_modifier = trad_power } }
                trigger_event = house_trad.5080
            }
            if = {
                limit = { house = { has_house_modifier = trad_influence } }
                trigger_event = house_trad.5090
            }
            if = {
                limit = { house = { has_house_modifier = trad_guile } }
                trigger_event = house_trad.5100
            }
            if = {
                limit = { house = { has_house_modifier = trad_survival } }
                trigger_event = house_trad.5110
            }
            if = {
                limit = { house = { has_house_modifier = trad_vigilance } }
                trigger_event = house_trad.5120
            }
            if = {
                limit = { house = { has_house_modifier = trad_peace } }
                trigger_event = house_trad.5130
            }
            if = {
                limit = { house = { has_house_modifier = trad_fortune } }
                trigger_event = house_trad.5140
            }
            if = {
                limit = { house = { has_house_modifier = trad_knowledge } }
                trigger_event = house_trad.5150
            }
            if = {
                limit = { house = { has_house_modifier = trad_truth } }
                trigger_event = house_trad.5160
            }
            if = {
                limit = { house = { has_house_modifier = trad_wisdom } }
                trigger_event = house_trad.5170
            }
            if = {
                limit = { house = { has_house_modifier = trad_devotion } }
                trigger_event = house_trad.5180
            }
            if = {
                limit = { house = { has_house_modifier = trad_family } }
                trigger_event = house_trad.5190
            }
            if = {
                limit = { house = { has_house_modifier = trad_compassion } }
                trigger_event = house_trad.5200
            }
            if = {
                limit = { house = { has_house_modifier = trad_joy } }
                trigger_event = house_trad.5210
            }
        }
    }
}
 
Last edited:

Myrkull

Second Lieutenant
16 Badges
Nov 25, 2012
143
457
  • 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
  • 500k Club
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
I want to replace reformed and unreformed pagan names for faiths, so the old, unreformed pagan faith will keep it's names and reformed faith will use new ones, so it will be opposite of how it is now. For example unreformed faith will stay with Asatru name and reformed one will use new name. Is it possible?
 

Chatoustikmou

Major
146 Badges
May 21, 2016
749
1.351
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - After Dark
  • Tyranny: Archon Edition
  • Europa Universalis IV: Mandate of Heaven
  • Magicka 2
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Warlock 2: The Exiled
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Hearts of Iron III: Their Finest Hour
  • The Kings Crusade
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Impire
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Hearts of Iron IV: No Step Back
  • Divine Wind
  • Cities in Motion 2
  • Arsenal of Democracy
Thanks. Bleah. That makes it super hard to do properly modular mods or to have mods that integrate well. Hopefully they fix that at some point.

It's not something to fix exactly, rather something to add support for :)
We filed a support request for it, hopefully it'll make it in someday!
 

Chatoustikmou

Major
146 Badges
May 21, 2016
749
1.351
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - After Dark
  • Tyranny: Archon Edition
  • Europa Universalis IV: Mandate of Heaven
  • Magicka 2
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Warlock 2: The Exiled
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Hearts of Iron III: Their Finest Hour
  • The Kings Crusade
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Impire
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Hearts of Iron IV: No Step Back
  • Divine Wind
  • Cities in Motion 2
  • Arsenal of Democracy
I don't suppose there's any tool to do this thing? Script Value doesn't seem to be what I'd hope it'd be.

IIRC in CK2 you can simply tell the game to add a trait and if the opposite trait exists, it'll get replaced. Not so in CK3, so in order to replace the trait the specific opposite trait needs to be removed first. This can be very arduous to code through every occurrance, especially as my mod is dynamically adjusting personality traits.

Basically, I need to be able to dynmically feed a $trait$ value to (something) so that it would identify the opposite trait to $trait$ automatically and execute the follow-up actions accordingly.

You can use a switch statement in a scripted_effect. A switch is basically a simplified if/else_if, useful for this kind of things.

Code:
add_trait_and_remove_oppposite = {
   switch = {
      trigger = $TRAIT$
      generous = { remove_trait = greedy }
      greedy = { remove_trait = generous }
      <...>
   }
   add_trait = $TRAIT$
}

and then when you call add_trait_and_remove_opposite = { TRAIT = greedy }, it will remove the generous trait if the scoped character has it, and add the greedy trait.

You'll still have to curate your switch statement, whenever new traits are added, but that shouldn't happen too often :)
 
Last edited:
  • 1
Reactions:

Chatoustikmou

Major
146 Badges
May 21, 2016
749
1.351
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - After Dark
  • Tyranny: Archon Edition
  • Europa Universalis IV: Mandate of Heaven
  • Magicka 2
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Warlock 2: The Exiled
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Hearts of Iron III: Their Finest Hour
  • The Kings Crusade
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Impire
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Hearts of Iron IV: No Step Back
  • Divine Wind
  • Cities in Motion 2
  • Arsenal of Democracy
So I'm in the final stretches to finishing my Cadet House/ House traditions mod but I am having trouble with on_actions / automatic triggers.

Where do you fire the on_action on_specific_birthday?


Also, to help with debug, you can use the debug.log.
In script, when you use debug_log = "insert text here", whenever that line of script is executed, it will print insert text here in the debug.log. So you can, for example, put one at the start of the immediate effect of your events, with the name of the event, and let the game run on observer for a while, and then check the debug log to see whether the events have fired, and how many times.

You can also use debug_log_scopes = no which will print the current scope in the debug.log (so if it's a character scope, you'll get its name an ID for example[/icode].

This makes it much easier to check whether something works, especially things that are kinda random.
 

Chatoustikmou

Major
146 Badges
May 21, 2016
749
1.351
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - After Dark
  • Tyranny: Archon Edition
  • Europa Universalis IV: Mandate of Heaven
  • Magicka 2
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Warlock 2: The Exiled
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Hearts of Iron III: Their Finest Hour
  • The Kings Crusade
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Impire
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Hearts of Iron IV: No Step Back
  • Divine Wind
  • Cities in Motion 2
  • Arsenal of Democracy
Thanks. Is there a way to at least iterate to dead siblings and ideally cousins?

Well, I made a mistake. X_ancestor also only iterates through living ancestors. Sorry about that.

What you can do, is store killed characters in a variable list on the house itself, using the on_death on_action.

Code:
on_death = { on_actions = { on_killed }} # Fire a custom on_action, to avoid using the effect block of vanilla on_actions, which would override the vanilla version and cause problems

on_killed = {
   trigger = { exists = scope:killer }
   effect = {
      house = {
         add_to_variable_list = {
            name = killed_house_members
            target = ROOT
         }
         every_in_list = {
            variable = killed_house_members
            limit = { killer = { is_alive = no }}
            PREV = {
               remove_list_variable = {
                  name = killed_house_members
                  target = PREV
            }
         }
      }
   }
}

The 2nd part, with every_in_list, cleans up the variable list by taking away characters from it if their killer isn't alive anymore, to avoid savegame bloat as time goes on.

Then whenever you want to pick a random house member that's been killed, and whose killer is still alive, you just scope to the house, and use random_in_list.
 
  • 1
Reactions:

Beyond Disbelief

Creator of House Traditions Mod
97 Badges
Jun 29, 2015
1.163
1.250
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Hearts of Iron IV: No Step Back
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Victoria 2
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • BATTLETECH - Digital Deluxe Edition
Where do you fire the on_action on_specific_birthday?
So perhaps this is related to how I'm misunderstanding how on_actions are used; I don't understand the question. The code I pasted is just the modified portion of the vanilla \common\on_action\birthday.txt I replace the entire file in my mod, but all original text are there (I only posted the additions).

on_specific_birthday = { } is an original bloc which is directly triggered by the beginning of the vanilla file:

Code:
# character having its birthday in root scope
# tested after age has increased
on_birthday = {
    on_actions = {
        on_specific_birthday
        on_birthday_childhood
        on_graceful_aging_birthday
    }
}

on_specific_birthday = {
    first_valid_on_action = {
        on_3rd_birthday
        on_6th_birthday
        on_10th_birthday
        on_15th_birthday
        on_16th_birthday
    }
}

on_birthday_childhood = {
    trigger = {
        is_adult = no
        age >= childhood_education_start_age
    }
    on_actions = {
        on_birthday_education_events
        on_action_add_sexuality
    }
}

on_graceful_aging_birthday = {
    trigger = {
        exists = dynasty
        dynasty = { has_dynasty_perk = kin_legacy_5 }
        age >= kin_legacy_5_start_age # Start at 40 - This trigger is here to prevent the calculation running for everyone
        save_temporary_scope_value_as = {
            name = age_check
            value = kin_legacy_5_age_modulo
        }
        scope:age_check = 0
    }
    events = {
        dynasty_legacy.0001 # Gain a random skill point
    }
}

Since I recognize most existing events in there and *thought* i knew how they worked (3rd birthday no longer sickly event, 6th birthday assigning a default education, 15th birthday being introduced to witchcraft, etc.) so I just hijacked that bloc and inserted my own. What am I misunderstanding and how do I force 100% firing upon hitting ages 5/9/12/14?

I may eventually want to know MTTH/random events but for now I just want these events to always fire before the child reaches adulthood as a way to shape their personalities according to their house tradition.

EDIT: Ok, so debug log shows that all the on_action events are firing correctly, so there must be something else I need to log and check. Thanks.


Also, to help with debug, you can use the debug.log.
In script, when you use debug_log = "insert text here", whenever that line of script is executed, it will print insert text here in the debug.log. So you can, for example, put one at the start of the immediate effect of your events, with the name of the event, and let the game run on observer for a while, and then check the debug log to see whether the events have fired, and how many times.

You can also use debug_log_scopes = no which will print the current scope in the debug.log (so if it's a character scope, you'll get its name an ID for example[/icode].

This makes it much easier to check whether something works, especially things that are kinda random.
Thanks, i never bothered with debug.log in the past because i never had to do anything complex enough to require it so it slipped my mind.
 
Last edited:

Beyond Disbelief

Creator of House Traditions Mod
97 Badges
Jun 29, 2015
1.163
1.250
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Hearts of Iron IV: No Step Back
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Victoria 2
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • BATTLETECH - Digital Deluxe Edition
Well, I made a mistake. X_ancestor also only iterates through living ancestors. Sorry about that.

What you can do, is store killed characters in a variable list on the house itself, using the on_death on_action.

Code:
on_death = { on_actions = { on_killed }} # Fire a custom on_action, to avoid using the effect block of vanilla on_actions, which would override the vanilla version and cause problems

on_killed = {
   trigger = { exists = scope:killer }
   effect = {
      house = {
         add_to_variable_list = {
            name = killed_house_members
            target = ROOT
         }
         every_in_list = {
            variable = killed_house_members
            limit = { killer = { is_alive = no }}
            PREV = {
               remove_list_variable = {
                  name = killed_house_members
                  target = PREV
            }
         }
      }
   }
}

The 2nd part, with every_in_list, cleans up the variable list by taking away characters from it if their killer isn't alive anymore, to avoid savegame bloat as time goes on.

Then whenever you want to pick a random house member that's been killed, and whose killer is still alive, you just scope to the house, and use random_in_list.
This is really helpful and I really like this idea/approach! I haven't incorporated it into my mod yet but once I can resolve the on_action issue and make sure the core features are fully functional in a live game I want to expand this further by adding a dedicated UI button to the house/dynasty page for houses with the Vengeance tradition that show's a list of vendettas and let them automatically go down the list each time they find themselves without a rival.

I never modded UI in CK3 before so hopefully its not too daunting a task to just add one button.
 

GottJammern

Corporal
32 Badges
Oct 23, 2016
29
2
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Stellaris: Ancient Relics
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Teleglitch: Die More Edition
Question!

For faith_doctrine_cost_, i see there is a low, mid, high and massive which determines the reformation cost.

Is there a free option? Trying to set one doctrine stance to be completely free to select upon reformation, so it doesn't contribute to the reformation cost.
 

Beyond Disbelief

Creator of House Traditions Mod
97 Badges
Jun 29, 2015
1.163
1.250
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Hearts of Iron IV: No Step Back
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Victoria 2
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • BATTLETECH - Digital Deluxe Edition
Ok so my mod is fairly flexible and have AI_chance weights where I'd like them at - HOWEVER, some specific families, such as Sons of Ragnar and Karlings seems jarring if they dont use a much more restricted list of options from my mod.

In CK2 i could hardcode a mod to interact specific character/dynasties with a simpel character = <char_ID> or dynasty = <dynasty_ID>. This method does not appear to work in CK3, any suggestions or would this not be possible?
 

Chatoustikmou

Major
146 Badges
May 21, 2016
749
1.351
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - After Dark
  • Tyranny: Archon Edition
  • Europa Universalis IV: Mandate of Heaven
  • Magicka 2
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Warlock 2: The Exiled
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Hearts of Iron III: Their Finest Hour
  • The Kings Crusade
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Impire
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Hearts of Iron IV: No Step Back
  • Divine Wind
  • Cities in Motion 2
  • Arsenal of Democracy
In CK2 i could hardcode a mod to interact specific character/dynasties with a simpel character = <char_ID> or dynasty = <dynasty_ID>. This method does not appear to work in CK3, any suggestions or would this not be possible?

Not sure if it's what you need, but you can refer to specific scopes with the following syntax: scope_type:scope_key

has_culture = culture:croatian
primary_title = title:k_england
are legitimate triggers

character:73598 = { add_gold = 100 }
is a legitimate effect (using historical IDs)
 

Beyond Disbelief

Creator of House Traditions Mod
97 Badges
Jun 29, 2015
1.163
1.250
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Hearts of Iron IV: No Step Back
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Victoria 2
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • BATTLETECH - Digital Deluxe Edition
Not sure if it's what you need, but you can refer to specific scopes with the following syntax: scope_type:scope_key

has_culture = culture:croatian
primary_title = title:k_england
are legitimate triggers

Ah, i didn't realize some things in CK3 require the culture: / character: / title: prefix.

character:73598 = { add_gold = 100 }
is a legitimate effect (using historical IDs)

THIS = character:90107 worked perfectly for mapping to Ludwig II the German

Since I can't map to dynasty/house directly, what I ended up doing was house = character:90107.house and it worked perfectly to hard code a specific branch of the Karling dynasty to take a specific option in my mod.
 

Elaugaufein

Corporal
87 Badges
Aug 7, 2021
38
31
  • Victoria 3 Sign Up
  • Hearts of Iron IV: No Step Back
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: By Blood Alone
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Galaxy Edition
  • Shadowrun: Dragonfall
  • Empire of Sin
  • Battle for Bosporus
  • Crusader Kings III
  • Hearts of Iron IV: La Resistance
  • Cities: Skylines - Campus
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Holy Fury
  • Cities: Skylines Industries
  • Cities: Skylines - Snowfall
  • Shadowrun Returns
  • Europa Universalis IV: Dharma
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cradle of Civilization
  • King Arthur II
  • Europa Universalis III Complete
  • Heir to the Throne
  • For The Glory
  • 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
Ah, i didn't realize some things in CK3 require the culture: / character: / title: prefix.



THIS = character:90107 worked perfectly for mapping to Ludwig II the German

Since I can't map to dynasty/house directly, what I ended up doing was house = character:90107.house and it worked perfectly to hard code a specific branch of the Karling dynasty to take a specific option in my mod.
Dynasty/house is actually an acceptable scope for a static dynasty/house

eg from the Restore Dumnonia decision (British Isles Major Decision)

dynasty = dynasty:1029001

and

from not being able to allow House motto in single combat events

house = house:house_british_isles_wessex

you'd probably have to bounce off a character for a dynamic dynasty / house though.
 

Beyond Disbelief

Creator of House Traditions Mod
97 Badges
Jun 29, 2015
1.163
1.250
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Hearts of Iron IV: No Step Back
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Victoria 2
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Tyranny - Bastards Wound
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • BATTLETECH - Digital Deluxe Edition
Dynasty/house is actually an acceptable scope for a static dynasty/house

eg from the Restore Dumnonia decision (British Isles Major Decision)

dynasty = dynasty:1029001

and

from not being able to allow House motto in single combat events

house = house:house_british_isles_wessex

you'd probably have to bounce off a character for a dynamic dynasty / house though.
Maybe I'm not looking up the right places, how do I find the static historical ID for dynasty / house? In my case, I'm more concerned with the house specifically, not dynasty. (individual cadet branches can set their own traditions)
 

Chatoustikmou

Major
146 Badges
May 21, 2016
749
1.351
  • Europa Universalis IV: Conquest of Paradise
  • Cities: Skylines - After Dark
  • Tyranny: Archon Edition
  • Europa Universalis IV: Mandate of Heaven
  • Magicka 2
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Jade Dragon
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Warlock 2: The Exiled
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Hearts of Iron III: Their Finest Hour
  • The Kings Crusade
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Impire
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Hearts of Iron IV: No Step Back
  • Divine Wind
  • Cities in Motion 2
  • Arsenal of Democracy
Maybe I'm not looking up the right places, how do I find the static historical ID for dynasty / house? In my case, I'm more concerned with the house specifically, not dynasty. (individual cadet branches can set their own traditions)

Probably anything that's in the history files is fair game. Same reason you can scope to a specific character with its historical ID.