Question. I'm looking around at the events files. I've tinkered with mods on this game in only the most basic ways (largely via winmerge to hack mods together).
I'm considering, for my own amusement, trying to add in a simple event to zun_pagan_reformed religion, so that it could take some inspiration from the Indian religions it will surely reign over at that point, and have reincarnation. At this point, I'm mostly looking at the VIET Immersion code for this, and the actual RoI code, and trying to figure out what they did. I am not trying to get it to -work- right now (too ambitious, hah!) - I'm just looking for feedback from You People Who Do This Stuff to see if everything below LOOKS ok, then I might start thinking about how to get it in the game.
My notes:
1. I think I am using the concept of 'namespace' correctly, but I don't really understand it. Let me know if I've fubard it up.
2. I'm only trying to make this work for reformed zunism, as I think it'd draw quite a bit on the religions of India, at least as much as stealing from the Abrahamic faiths, which is primarily only what reformed Norse pagans do.
3. I can't tell...but it looks as if the RoI code was only designed to let men reincarnate from other men. I removed the 'only men' bit, but I'm not sure how to tell if, indeed, only men are 'reincarnateable' and if thats the case, how to fix it. Its not that I'm not used to logical statements, or have not seen psuedocode, I have a math degree...but its been a decade since I've used it or done any coding. Sorry.

Ideally, I'd want males or females to be valid subjects and targets for reincarnation.
4. Once the below looks good, I'm going to have to figure out how to make descriptions for the below, I guess, and what other files I'd have to modify. I'd want to do this the 'right' way, which I'd define as 'whatever is the easiest for other modders to work with so I form good habbits, and whatever has the most compatability'
5. This is just for my personal use, I'm just trying to tinker. Though if I get it to work, I'll let anyone steal it. (only fair, right?)
Thanks! Sorry if any of this is stupid.
Code:
# [on_birth] Child might be a reincarnation
# Duplicate event RoI.10000 for the religion check and to have Celtic specific text on chained event
namespace = RoZ
character_event = {
id = RoZ.1
hide_window = yes
is_triggered_only = yes
trigger = {
has_dlc = "Rajas of India"
OR = {
religion = zun_pagan_reformed
}
OR = {
father = {
ai = no
is_reincarnated = no
father_even_if_dead = {
OR = {
is_alive = no
father_even_if_dead = {
is_alive = no
}
}
}
NOT = {
any_sibling = {
is_reincarnated = yes
}
}
}
mother = {
ai = no
is_reincarnated = no
father_even_if_dead = {
OR = {
is_alive = no
father_even_if_dead = {
is_alive = no
}
}
}
NOT = {
any_sibling = {
is_reincarnated = yes
}
}
}
}
NOT = {
any_sibling = {
is_reincarnated = yes
}
}
}
option = {
name = OK
if = {
limit = {
father = {
ai = no
}
}
if = {
limit = {
father = {
father_even_if_dead = {
father_even_if_dead = {
is_alive = no
}
}
}
}
father = {
father_even_if_dead = {
father_even_if_dead = {
ROOT = {
set_reincarnation = THIS
}
}
}
}
}
if = {
limit = {
is_reincarnated = no
}
father = {
father_even_if_dead = {
ROOT = {
set_reincarnation = THIS
}
}
}
}
father = {
character_event = {
id = RoZ.2
days = 3
}
}
}
if = {
limit = {
mother = { ai = no }
is_reincarnated = no
}
if = {
limit = {
mother = {
father_even_if_dead = {
father_even_if_dead = {
is_alive = no
}
}
}
}
mother = {
father_even_if_dead = {
father_even_if_dead = {
ROOT = {
set_reincarnation = THIS
}
}
}
}
}
if = {
limit = {
is_reincarnated = no
}
mother = {
father_even_if_dead = {
ROOT = {
set_reincarnation = THIS
}
}
}
}
mother = {
character_event = {
id = RoZ.2
days = 3
}
}
}
}
}
# Reincarnation: Player notices the similarities
character_event = {
id = RoZ.2
desc =*EVTDESCRoZ.2
picture = GFX_evt_sun_temple
border = GFX_event_narrative_frame_religion
is_triggered_only = yes
option = {
name = EVTOPTARoZ.2 # Yes, clearly
hidden_tooltip = {
FROM = {
add_trait = reincarnation
character_event = {
id = RoI.10002 # Back to RoI event chain, which is not Indian specific.
days = 912
}
}
}
}
option = {
name = EVTOPTBRoZ.2 # Nonsense!
hidden_tooltip = {
FROM = {
set_reincarnation = 0
}
}
}
}
# [on_yearly_childhood_pulse] Reincarnation: Youth picks up a personality trait from the previous life
# Duplicate event RoI.10010 for the religion check
character_event = {
id = RoZ.3
desc =*EVTDESC_RoI_10010
picture = GFX_evt_sun_temple
border = GFX_event_narrative_frame_religion
is_triggered_only = yes
trigger = {
OR = {
religion = zun_pagan_reformed
}
has_dlc = "Rajas of India"
has_character_flag = reincarnation_education
NOT = { personality_traits = 5 }
reincarnation_scope = {
ROOT = {
can_copy_personality_trait_from = PREV
}
}
}
option = {
name = EVTOPTA_RoI_10010
reincarnation_scope = {
ROOT = {
copy_random_personality_trait = PREV
}
}
hidden_tooltip = {
if = {
limit = {
father = {
ai = no
}
}
father = {
character_event = {
id = RoI.10011
days = 2
}
}
}
if = {
limit = {
mother = {
ai = no
}
}
mother = {
character_event = {
id = RoI.10011
days = 2
}
}
}
if = {
limit = {
guardian = {
ai = no
}
}
guardian = {
character_event = {
id = RoI.10011
days = 2
}
}
}
}
}