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

Murdim

Private
26 Badges
Oct 27, 2012
15
4
  • Crusader Kings II
  • Crusader Kings II: Horse Lords
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Age of Wonders III
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Way of Life
  • 500k Club
  • Europa Universalis IV
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
One line summary of your issue
Persistent targets on religions and societies break on load

Game Version
3.2.1 (AZCE)

What expansions do you have installed?
Jade Dragon,
Monks & Mystics,
The Reapers Due,
Conclave,
Way of Life,
Charlemagne,
Rajas of India,
Sons of Abraham,
The Old Gods,
The Republic,
Legacy of Rome,
Sword of Islam,
Holy Fury

Do you have mods enabled?
Yes

Please explain your issue is in as much detail as possible.
Scripting-related issue, so this actually requires a simple mod to test.

Persistent event targets can be set (with save_persistent_event_target) and accessed on religions and societies, but only for the current session.

While this behavior makes sense for entities that are not saved at all (like inactive dynamic titles), religions and societies do have persistent flags and variables. The event targets can actually be found in the save file, even after saving and loading the game multiple times.

In other words, I can use and save persistent event targets on religions and societies, but they are not correctly loaded. I suspect this may also be the case for cultures, artifacts, wonders and offmap powers, but I have only tested for these two.

Steps to reproduce the issue.
1) Start the game modded with the attached file in the events directory.

2) Use the console to run events DEBUG.4, 5 and 6. Since the flags, variables and event targets have not been set, only the "OK" option is available.

3) Run event DEBUG.1, then 4 to 6 again. Three more options appear for each event: "Title", "Religion" and "Society".

4) Save and reload the game.

5) Run events DEBUG.4 to 6. The first two work just as well as before, but for DEBUG.6, only the "Title" and "OK" options are available. Running DEBUG.1 again fixes this, as expected.

6) Looking for debug_pet in the save file, we see that the persistent event target was saved for all three entities, even though it was only loaded for the title.

Upload Attachment
 

Attachments

  • debug_events.txt
    2,3 KB · Views: 2
Upvote 0