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

A lowborn Emperor

Second Lieutenant
26 Badges
Sep 29, 2022
106
595
  • Cities: Skylines - After Dark
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Cities: Skylines - Campus
  • Crusader Kings II: Holy Fury
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Conclave
  • Crusader Kings II
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • 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

Information​

I have verifed my game files (Steam only)​

Yes

I have disabled all mods​

Yes

I am running the latest game update​

Yes

Required​

Summary​

Dead characters saved with corrupt dead_data field causing huge save game files > 1.5 GB

Description​

A character saved with custom text using the following code
widget = {
gui = "event_window_widget_TRXXX_custom_reason"
container = "custom_widgets_container"
setup_scope = { scope:TRXXX_controller = { save_scope_as = text_target } }
controller = {
type = text
data = { key = TRXXX_custom_desc_key default = TRXXX_scheduled_TODO_reminder_event.0160.custom_default }
}
}
The dead_data field on the saved character is corrupt, being set to "{" which is somehow causing every subsequent save to duplicate the traits leading to traits field as large as 167KB and probably larger, but that's the largest I have seen.

This is a character extracted from the save file when first saved
71555={
first_name="Benedicta"
birth=1047.2.19
female=yes
nickname_text=""
culture=38
faith=12
skill={ 6 14 0 0 1 9 }
mass=-18
traits={ 61 78 56 22 88 214 }
localized_custom_text={
"TRXXX_custom_desc_key"="this is a test message!"
"date"="1066.9.15"
"dead_data"="{"
"reason"="death_vanished"
}

dead_data={
date=1066.9.15
reason="death_vanished"
}

}

I have set the platform to linux because I use that mostly, however this is also happening on windows, but you don't have an option to specify multiple platforms.

Eventually the massive bloated size of the save games is causing the game to grind to a halt, and load times to be way too long. I assume if I carry on going through the cycle eventually the save game will be too large to load into ck3
This is the same character after loading the save file, then exiting the game straight away without taking the game off pause. Notice the traits field has been repeatedly duplicated
71555={
first_name="Benedicta"
birth=1047.2.19
female=yes
nickname_text=""
culture=38
faith=12
skill={ 6 14 0 0 1 9 }
mass=-18
traits={ 61 78 56 22 88 214 61 78 56 22 88 214 61 78 56 22 88 214 61 78 56 22 88 214 }
localized_custom_text={
"TRXXX_custom_desc_key"="this is a test message!"
"date"="1066.9.15"
"dead_data"="{"

This is the same character again after doing the same procedure, i.e. load the save file, then exiting straight away without taking the game off pause, again notice the repeated duplication of the traits field
71555={
first_name="Benedicta"
birth=1047.2.19
female=yes
nickname_text=""
culture=38
faith=12
skill={ 6 14 0 0 1 9 }
mass=-18
traits={ 61 78 56 22 88 214 61 78 56 22 88 214 61 78 56 22 88 214 61 78 56 22 88 214 61 78 56 22 88 214 61 78 56 22 88 214 61 78 56 22 88 214 61 78 56 22 88 214 }
localized_custom_text={
"TRXXX_custom_desc_key"="this is a test message!"

This continuing repeated duplication of traits every time the game is exited is causing huge save files to be written.

The only thing I can see wrong with the original saved character is the seemingly corrupt dead_data field, the content seems wrong
"dead_data"="{"

The code I used to create the characters is based off the vanilla code for saving pet names.

Steps to reproduce​

Create a character event that uses the same code I posted to save custom text to the character, then kill the character and make them unprunable.

Game Version​

1.10.2

Platform​

Linux

Additional Information​

Affected Feature​

  • Gameplay

Save Game​



Other Attachments​



 
I have further tested this problem and can now confirm that the corruption occurs when saving a previously loaded game.

Steps to reproduce are
  1. Start a fresh game
  2. Add localized_custom_text to a character
  3. Kill the character
  4. Make the character unprunable
  5. Optionally repeat steps 2 through 4 as many times as you want
  6. Save the game
  7. Unpack the save game
  8. Check the dead characters with localized_custom_text are not corrupted in gamestate
  9. Delete unpacked gamestate
  10. Load the save game
  11. Save the game without doing anything
  12. Unpack the save game
  13. Confirm the dead characters with localized_custom_text are now corrupt in gamestate