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

TheDungen

Field Marshal
80 Badges
Jan 31, 2015
12.131
7.922
  • 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
  • Cities: Skylines
  • Europa Universalis 4: Emperor
  • 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
  • Stellaris: Nemesis
  • War of the Roses
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Stellaris: Necroids
  • 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
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • 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
  • Europa Universalis IV
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Age of Wonders
  • Age of Wonders II
  • Teleglitch: Die More Edition
  • Victoria 2
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
Does anyone know if it's possible to make a scripted trigger or smt similar, where you get to choose a scope as an argument? Take, for example, vanilla's is_married condition (i'm interested in the version that returns a character, not true/false).
is_married = ROOT - is it possible to make a similar scripted effect?
Because I'm working on revamping the seduction event, and I want to shove both is_married and is_consort (and some more stuff) under the same scripted trigger to save time, and while I could rely on event targets, it doesn't seem like the most graceful of solutions.

Also repeating the question about the syntax of show_trait. Is it show_trait = { trait_1 trait_2... trait_n } or something? If so, is it possible to have certain traits show under certain conditions?
A any or random character scope limited to those that fulfill the criteria of either being consort or wife to the character.
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
A any or random character scope limited to those that fulfill the criteria of either being consort or wife to the character.
no, i know what the condition does. I'm asking if it's possible to make a scripted effect that can take a character scope input, like the is_married one, for example. Because I don't want to duplicate scripted effects so that i have one for from-root, and one for root-from. And yeah, event targets kinda work, so long as you only use the scripted effect for two characters only; it's useable in my mod, but it just isn't a very graceful solution.

*Edit: Also, are the torture/mutilation targeted decisions moddable? I want to add a quick fear system, and couldn't find any on_actions for torture
 
Last edited:

TheDungen

Field Marshal
80 Badges
Jan 31, 2015
12.131
7.922
  • 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
  • Cities: Skylines
  • Europa Universalis 4: Emperor
  • 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
  • Stellaris: Nemesis
  • War of the Roses
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Stellaris: Necroids
  • 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
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • 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
  • Europa Universalis IV
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Age of Wonders
  • Age of Wonders II
  • Teleglitch: Die More Edition
  • Victoria 2
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Pre-order
  • Stellaris: Synthetic Dawn
no, i know what the condition does. I'm asking if it's possible to make a scripted effect that can take a character scope input, like the is_married one, for example. Because I don't want to duplicate scripted effects so that i have one for from-root, and one for root-from. And yeah, event targets kinda work, so long as you only use the scripted effect for two characters only; it's useable in my mod, but it just isn't a very graceful solution.

*Edit: Also, are the torture/mutilation targeted decisions moddable? I want to add a quick fear system, and couldn't find any on_actions for torture
I'm really not understanding what you want to do.
I could be wrong but is_married is a condition not a scope, and I don't get how it relates to scripted effects.
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
I'm really not understanding what you want to do.
I could be wrong but is_married is a condition not a scope, and I don't get how it relates to scripted effects.
no, is_married is just an example (and yes, it's a condition, not a scope). I'm asking if it's possible to create scripted effects along the lines of scripted_effect1 = character_scope, insttead of just character_scope = yes
 

CFH1985

Second Lieutenant
26 Badges
Mar 6, 2018
113
7
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • 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: 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 II: Charlemagne
no, is_married is just an example (and yes, it's a condition, not a scope). I'm asking if it's possible to create scripted effects along the lines of scripted_effect1 = character_scope, insttead of just character_scope = yes
I believe you said you have a work around? Might be easier to advise if you post the code for that. Scripted triggers and effects are pretty straight forward, if people know what you want to do, which is not entirely clear
 

jursamaj

General
125 Badges
Aug 20, 2012
2.360
216
  • Victoria 2: Heart of Darkness
  • Hearts of Iron III
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Leviathan: Warships
  • Rome: Vae Victis
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Magicka 2 - Signup Campaign
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Europa Universalis III Complete
  • Europa Universalis IV: Common Sense
  • Europa Universalis III Complete
  • Pillars of Eternity
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: No Step Back
Oh thank you - could you possibly elaborate? currently the file is provinces.csv and the confusing part is that that works for the first lot.
OK, I looked at the specific localizations you are changing. PROV986 is defined in text1.csv in vanilla, while PROV1686 is defined in HolyFury.csv. You are redefining them in provinces.csv. The filenames sorted thus: HolyFury.csv, provinces.csv, text1.csv. 1st file wins ties, so PROV 1686 in HolyFury beats PROV1686 in provinces.csv. Tack a 0 (zero) on "0provinces.csv", and anything in that file will override any same vanilla localization, because 0 comes before letters in the sort.

Just so you know, some modding things, 1st file wins, others, last file wins. Some are even more peculiar. Most are summarized here: https://ck2.paradoxwikis.com/Modding#Game_structure
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
I believe you said you have a work around? Might be easier to advise if you post the code for that. Scripted triggers and effects are pretty straight forward, if people know what you want to do, which is not entirely clear
Code:
scripted_effect1.1 = {
    FROM = { random_effect_1 = yes }
    ROOT { random_effect_2 = yes }
}
---------------------------------
scripted_effect1.2 = {
    ROOT =  { random_effect_1 = yes }
    FROM = { random_effect_2 = yes }
}
---------------------------------
scripted_effect1.3 = {
    event_target:p1 = { random_effect_1 = yes }
    event_target:p2 = { random_effect_2 = yes }
}
---------------------------------

This is just a quick example I threw up. I don't want to have to effectively duplicate the same scripted effect (1.1 and 1.2), and 1.3 is useable, but if you use in an event chain, then you basically lock down two characters as event targets - thus, you can only use the scripted effect for those characters.
None of these things are a major problem, really -- I just wanted to know if there's a different solution. Like, say, the ability to specify which character it applies to (to take an analogue from programming, i want to know if it's possible to make a function that has a character object/scope as a parametre).

Oh, and while I'm at it, is there some equivalent to scripted effects that can be used for ai_chance or ai_will_do? I have several event chains that all have that one event that has the more-or-less same modifiers in the ai_chance for that one option, and given how long that section is, I want a better way than to have to copy it over 3-6 times.
 

pkent

Corporal
31 Badges
Jan 21, 2016
45
1
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • 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: 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 II: Charlemagne
Does anyone know how to create an event chain that retains the original root. I have an event chain of 5 events. When i command console it on myself it retains me as the root and i can scroll through the 5 events. When i command console it on someone else it only retains that ai character as the root on the first event and when i click the option for event 2 it ends.
 

pkent

Corporal
31 Badges
Jan 21, 2016
45
1
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • 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: 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 II: Charlemagne
I have custom a pregnancy event that impregnates all concubines of characters with specific traits. When I use it it achieves that goal. Soehow it impregnates the men too. I dont understand how to keep this from happening.

This is an event that i run via command console currently and scope on all characters with a list of traits and their respective concubines. I think it has to do with the PREV scope at the bottom but using ROOT or FROM impregnates from the rule not the other guys. Any ideas?

long_character_event = {
id = 555544
desc = EVTDESCBM3jarb
picture = GFX_evt_torture

is_triggered_only = yes

option = {
name = "Do the thing"
any_character = {

limit = {
OR = {trait = fidelitas1
trait = fidelitas2
trait = fidelitas3
trait = fidelitas4
trait = fidelitas5
trait = fidelitas6
trait = fidelitas7
trait = fidelitas8
trait = fidelitas9
trait = fidelitas10
trait = fidelitas11
trait = fidelitas12
trait = fidelitas13
trait = fidelitas14
trait = fidelitas15
trait = fidelitas16
trait = fidelitas17
trait = fidelitas18
trait = fidelitas19
trait = fidelitas20
trait = fidelitas21
trait = fidelitas22
trait = fidelitas23
trait = fidelitas24
trait = fidelitas25
trait = fidelitas26
trait = fidelitas27
trait = fidelitas28
trait = fidelitas29
trait = fidelitas30
trait = knight
trait = ecclesiarch
trait = merchant}
}


hidden_tooltip = {
any_consort = {
AND = {
is_female = yes
is_marriage_adult = yes
is_pregnant = no
}
impregnate = PREV
}
#any_spouse = {
# is_female = yes
# is_marriage_adult = yes
# is_pregnant = no
# impregnate = PREV
#}



}
FROM = { wealth = -5 }
}

}

}
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
I have custom a pregnancy event that impregnates all concubines of characters with specific traits. When I use it it achieves that goal. Soehow it impregnates the men too. I dont understand how to keep this from happening.

This is an event that i run via command console currently and scope on all characters with a list of traits and their respective concubines. I think it has to do with the PREV scope at the bottom but using ROOT or FROM impregnates from the rule not the other guys. Any ideas?

long_character_event = {
id = 555544
desc = EVTDESCBM3jarb
picture = GFX_evt_torture

is_triggered_only = yes

option = {
name = "Do the thing"
any_character = {

limit = {
OR = {trait = fidelitas1
trait = fidelitas2
trait = fidelitas3
trait = fidelitas4
trait = fidelitas5
trait = fidelitas6
trait = fidelitas7
trait = fidelitas8
trait = fidelitas9
trait = fidelitas10
trait = fidelitas11
trait = fidelitas12
trait = fidelitas13
trait = fidelitas14
trait = fidelitas15
trait = fidelitas16
trait = fidelitas17
trait = fidelitas18
trait = fidelitas19
trait = fidelitas20
trait = fidelitas21
trait = fidelitas22
trait = fidelitas23
trait = fidelitas24
trait = fidelitas25
trait = fidelitas26
trait = fidelitas27
trait = fidelitas28
trait = fidelitas29
trait = fidelitas30
trait = knight
trait = ecclesiarch
trait = merchant}
}


hidden_tooltip = {
any_consort = {
AND = {
is_female = yes
is_marriage_adult = yes
is_pregnant = no
}
impregnate = PREV
}
#any_spouse = {
# is_female = yes
# is_marriage_adult = yes
# is_pregnant = no
# impregnate = PREV
#}



}
FROM = { wealth = -5 }
}

}

}

Firstly, pds forum has 'insert code'. Please use that for posting your code in the future.
Secondly, your issue has nothing to do with wrong use of root/from/prev, and everything with wrong syntax. If you have a condition in a scope, put it into a limit block, unless you're using the scope in conditions (basically inside trigger or other limit blocks). Like this:
Code:
any_consort = {
    limit = {       
        is_female = yes
        is_marriage_adult = yes
        is_pregnant = no
    }
    impregnate = ROOT
}

Thirdly. You do know that cached events are a thing, right? It's not a good idea to have too many characters running around with cached traits, but so long as there are but a few of them, it's a fine and convenient scope to use. (just remember to clear them out on death -- pretty sure you can still scope to dead cached trait holders).
*also, quick tip. instead of writing fidelitas1-30, just make a hidden fidelitas trait to use in condition blocks instead.
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
Does anyone know how to create an event chain that retains the original root. I have an event chain of 5 events. When i command console it on myself it retains me as the root and i can scroll through the 5 events. When i command console it on someone else it only retains that ai character as the root on the first event and when i click the option for event 2 it ends.
Mate, when it comes to events, ROOT is always the receiver of the event, and FROM is always the one who sent it. Use event_targets if you want a single event to work on both characters in an event chain
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
Hey, does anyone know if the condition is_consort = yes count only for junior consorts (concubines in base game) or does it also count for the senior consort (the male vikings in base game, for example)?
 

pkent

Corporal
31 Badges
Jan 21, 2016
45
1
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • 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: 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 II: Charlemagne
Firstly, pds forum has 'insert code'. Please use that for posting your code in the future.
Secondly, your issue has nothing to do with wrong use of root/from/prev, and everything with wrong syntax. If you have a condition in a scope, put it into a limit block, unless you're using the scope in conditions (basically inside trigger or other limit blocks). Like this:
Code:
any_consort = {
    limit = {      
        is_female = yes
        is_marriage_adult = yes
        is_pregnant = no
    }
    impregnate = ROOT
}

Thirdly. You do know that cached events are a thing, right? It's not a good idea to have too many characters running around with cached traits, but so long as there are but a few of them, it's a fine and convenient scope to use. (just remember to clear them out on death -- pretty sure you can still scope to dead cached trait holders).
*also, quick tip. instead of writing fidelitas1-30, just make a hidden fidelitas trait to use in condition blocks instead.

Thank you for the response. I will do better with the code next time. So the Limit did it. Still needed to use PREV rather than ROOT. ROOT impregnates the concubine with me rather than the consorts "husbands" I am aware of cached traits. I didnt think that was necessary to use in this instance. I need the 30 different traits. They are lineage trackers that I want to be unique and to display on character. I dont mind copy and pasting the list.
 

pkent

Corporal
31 Badges
Jan 21, 2016
45
1
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • 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: 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 II: Charlemagne
Does anyone know how to pass the root of and event on to the next event in an event chain?

I have a chain of 5 events. I can select a character and fire the event and can select options for them on the first even. When I click the more option on event one event 2 disappears but I can tell that the character is picking one of the options on event 2.

long_character_event = {
id = 999999
desc = "Powers!"
picture = "GFX_evt_family"
is_triggered_only = yes
option = {
name = "Power"
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = green
add_trait = xa
add_trait = ya
add_trait = xx
remove_trait = ugly
remove_trait = dwarf
remove_trait = slow
remove_trait = imbecile
remove_trait = inbred
remove_trait = weak
remove_trait = clubfooted
remove_trait = harelip
remove_trait = hunchback
remove_trait = lisp
remove_trait = stutter
}

option = {
name = "Cure_Desease_Traits"
remove_trait = stressed
remove_trait = depressed
remove_trait = lunatic
remove_trait = possessed
remove_trait = ill
remove_trait = pneumonic
remove_trait = syphilitic
remove_trait = leper
remove_trait = wounded
remove_trait = maimed
remove_trait = infirm
remove_trait = incapable
remove_trait = drunkard
remove_trait = has_tuberculosis
remove_trait = has_typhoid_fever
remove_trait = has_typhus
remove_trait = has_bubonic_plague
remove_trait = has_measles
remove_trait = has_small_pox
}
option = {
name = "Ennoble Them"
add_trait = fidelitas1
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = norse_tattoo_6
}
option = { ###MORE
name = "EVTOPTMORE"
ROOT = {character_event = { id = 999998}}
}

}

character_event = {
id = 999998
desc = "Favor 2!"
picture = "GFX_evt_family"
is_triggered_only = yes
option = {
name = "Ennoble Them"
add_trait = fidelitas2
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = norse_tattoo_6

}
option = {
name = "Ennoble Them"
add_trait = fidelitas3
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = norse_tattoo_6

}
option = {
name = "Ennoble Them"
add_trait = fidelitas4
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = norse_tattoo_6
}
option = { ###MORE
name = "EVTOPTMORE"
PREV = character_event = { id = 999997}
}

}
 

pkent

Corporal
31 Badges
Jan 21, 2016
45
1
  • Europa Universalis IV
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • 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: 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 II: Charlemagne
aa
Hi. Getting back into modding after dabbling a bit last year. Did anyone ever do an in-depth list of all the files that need updating to to take into account the adding of a new religion? The wiki guide isn't very in depth and only covers the bare minimum and i always feel that i am missing out some important area. E.g. for a while i missed out on the fact that the secretly convert to holy site's religion decision needed to be individually done per religion.

I really want to turn some of my ideas into reality but i could never face releasing them unless i was sure i covered everything.
Dissect a custom religion mod.
 

swampy111

Second Lieutenant
10 Badges
Apr 3, 2019
146
13
  • Cities: Skylines
  • Magicka 2
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Magicka
Does anyone know how to pass the root of and event on to the next event in an event chain?

I have a chain of 5 events. I can select a character and fire the event and can select options for them on the first even. When I click the more option on event one event 2 disappears but I can tell that the character is picking one of the options on event 2.

long_character_event = {
id = 999999
desc = "Powers!"
picture = "GFX_evt_family"
is_triggered_only = yes
option = {
name = "Power"
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = green
add_trait = xa
add_trait = ya
add_trait = xx
remove_trait = ugly
remove_trait = dwarf
remove_trait = slow
remove_trait = imbecile
remove_trait = inbred
remove_trait = weak
remove_trait = clubfooted
remove_trait = harelip
remove_trait = hunchback
remove_trait = lisp
remove_trait = stutter
}

option = {
name = "Cure_Desease_Traits"
remove_trait = stressed
remove_trait = depressed
remove_trait = lunatic
remove_trait = possessed
remove_trait = ill
remove_trait = pneumonic
remove_trait = syphilitic
remove_trait = leper
remove_trait = wounded
remove_trait = maimed
remove_trait = infirm
remove_trait = incapable
remove_trait = drunkard
remove_trait = has_tuberculosis
remove_trait = has_typhoid_fever
remove_trait = has_typhus
remove_trait = has_bubonic_plague
remove_trait = has_measles
remove_trait = has_small_pox
}
option = {
name = "Ennoble Them"
add_trait = fidelitas1
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = norse_tattoo_6
}
option = { ###MORE
name = "EVTOPTMORE"
ROOT = {character_event = { id = 999998}}
}

}

character_event = {
id = 999998
desc = "Favor 2!"
picture = "GFX_evt_family"
is_triggered_only = yes
option = {
name = "Ennoble Them"
add_trait = fidelitas2
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = norse_tattoo_6

}
option = {
name = "Ennoble Them"
add_trait = fidelitas3
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = norse_tattoo_6

}
option = {
name = "Ennoble Them"
add_trait = fidelitas4
add_trait = genius
add_trait = fair
add_trait = strong
add_trait = tall
add_trait = norse_tattoo_6
}
option = { ###MORE
name = "EVTOPTMORE"
PREV = character_event = { id = 999997}
}

}

You don't 'pass on' ROOT from one event to another. ROOT in character events is always, ALWAYS the receiver. Thus, if you have a character send an event to themselves, they are the ROOT; if you send it to someone/something else, the target is the ROOT. If you simply don't get FROMs and ROOTs, go use event targets; certainly I prefer using event targets for localisation so I can recycle a single loc.key for several events/decisions. Take a look at this section of the wiki: https://ck2.paradoxwikis.com/Scripting#Scope_chain.

Also, please, please put your code inside the code feature. Otherwise, it ends up looking overly clunky.
 

Silversweeeper

Ichi no Hito
58 Badges
Aug 24, 2012
3.948
2.848
  • Stellaris - Path to Destruction bundle
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Charlemagne
  • Stellaris Sign-up
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III Complete
  • Magicka
I want to make more off-map powers. Can I do this by just copying China and make new cultures for it?

You'd need to copy quite a few things to create a working Offmap China clone with the same features (the definition, various offmap decisions, status/policy events, diplomacy events, etc.), do some graphical edits (the button to open the equivalent of the "China Screen" needs to show up, for one thing), and possibly adjust various thing (e.g. events where the Protector-General interacts with other realms might need to be blocked against tributaries of another offmap power in both directions). Additionally, if you want something historically accurate for some other historical power you're going to need to tear out (and possibly replace) a bunch of things that'd not be remotely historically accurate or appropriate if you're not dealing with China, so copy-pasting everything might not be what you want to do.
 

Rockphed

Uncultured Barbarian
19 Badges
Jan 31, 2017
1.085
93
  • Crusader Kings II
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Holy Fury
  • Shadowrun Returns
  • Surviving Mars: Digital Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Surviving Mars
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • 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 II: Charlemagne
Is there any way to have buildings only be populated at start for people who can build them, but not be destroyed when other people take over? I am trying to mod the arsenal to not be destroyed when the city stops being the capital (so the roman emperor who conquers venice and sets up a merchant republic there has some benefits over just taking the county for himself), but every city ends up with an arsenal. I could put the extra tech trigger to 10, but then venice and other merchant republics wouldn't start with arsenals.