Married for life to bad savegame reference data.

Started by Rafe009, January 23, 2017, 07:58:44 PM

Previous topic - Next topic

Rafe009

So i have been adding a few of guns to the game and i realized i violated a RW convention in def editing too late.
<ThingDef ParentName="BaseHumanMakeableGun">
    <defName>Shotgun2</defName>


Putting a numerical value after a Defname causes the game to panic, particularly when you smelt or delete the item from your game, the graphic of the item simply lingers, undetectable until you reboot RW. It took me a few weeks to even know this was the case but when i realized what the problem was and tried to solve it i encountered an intractable save game problem.

I can enter my game and using developer tools delete all items that reference Shotgun2. Close the game, restart and survey the game map where no single incidence of shotgun 2 remains, not even a ghost. Then when i go into the defs to change Shotgun2 to something without a number behind it and start up RW again, RW panics and demands help finding shotgun 2 even though i irradiated it from the map and i would also assume the save file. It seems once i defined "Shotgun2" as a def name i was bound to it for life.

Is there anyway i can get rid of this bad defname and introduce a proper one that won't cause ghosting? Why is RW demanding def data in reference to something that doesn't exist in the gameworld or save file anymore?

Here's my error log if that helps, ignore the yellow stuff as that's other issues i still need to resolve but not as pressing as this one.

sulusdacor

#1
if the game searches for it, then that means you have not deleted all.

QuoteI can enter my game and using developer tools delete all items that reference Shotgun2.
not sure if that means starting up the game and deleting stuff in dev mode. if yes then you might end up with some "relics". the cleaner way would probably be to open your save game and edit/delete there.

edit: i forgot to mention here you can use numbers, just not at the end. so something like "Shotgun2n" as a defname will be fine.

Rafe009

Quote from: sulusdacor on January 24, 2017, 03:03:45 AM
if the game searches for it, then that means you have not deleted all.

QuoteI can enter my game and using developer tools delete all items that reference Shotgun2.
not sure if that means starting up the game and deleting stuff in dev mode. if yes then you might end up with some "relics". the cleaner way would probably be to open your save game and edit/delete there.

edit: i forgot to mention here you can use numbers, just not at the end. so something like "Shotgun2n" as a defname will be fine.

Yes, i used dev mode and the destroy tool to delete the item in question, it's visual representation from the map. However upon realization i forgot about the fabrication bench and all my numerous stockpiles. Deleted all those, still got the error and realized i had set my smelter to smelt guns that were significantly damaged. Still i got the error and took your advice and went into teh save file.

I didn't realize it was so easy and though i would need a savegame editor but with a simple Alt+F i fond every incidence of shotgun 2 and changed it.

After studying the save file format for a while i realized that i would NEVER have been able to resolve my problem by trying to eradicate all incidences of shotgun2 with the developer Destroy tool because some of them had left my map in the form of raiders who i had shot and and injured and who fled the map with fresh woulds caused by shotgun2, the save file remembers this. Also raiders who entered my map with shotguns and presumably left with them, each of which had its' own unique ID number.

Thanks for the help, game runs good now.