What generates the savadata txt name?

Discuss modding questions and implementation details.
Post Reply
User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

What generates the savadata txt name?

Post by Ralzar »

I recently ran into a small problem with my Realistic Wagon mod that is very likely caused by me but I can't figure out how so I can avoid it in the future.

The txt file generated by the mod was named "mod_realistic wagon.txt"

Then after an update, the mod changed to generating files names "mod_realisticwagon.txt". Which leads to any older saves with wagon or horse placed not generating those objects when loading the save. Causing players to lose the items.

I probably changed some value in the code from "realistic wagon" to "realisticwagon", but I just can't see where I could have made that change. If anything, I would have added the space if it was missing, not removed it.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: What generates the savadata txt name?

Post by TheLacus »

Save file is named after mod filename, which you probably changed with the update. We can't use the title because it can contain invalid path characters.

I think at the time we didn't have mod GUIDs; we could use them instead now, but it would be harder to manually find files.

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: What generates the savadata txt name?

Post by Ralzar »

Oh wow, the actual file name of the dfmod file?
Huh.

Oh well, at least I now know to look out for that.

Thanks for the answer :)

Post Reply