Toma400 / The_Isle_of_Ansur

Python-based text RPG game, successor of Between Shadows and Light.
Other
9 stars 0 forks source link

Migration file & system #23

Open Toma400 opened 2 years ago

Toma400 commented 2 years ago

Not sure if this is good idea, but considering some people could want to change IDs of their items/races/classes, this may be good way to avoid breaking saves - as long as modder doesn't change mod's ID, it would have analysis system that checks migration file for changed IIDs/CIDs/RIDs/etc.

migration.json file structure:

{   CID: {     "previous_id": "new_id"   } }

This, of course, puts a lot of stress on ID recognising system, so it's suggestion to brainstorm if it's worth it. After all, IDs should not be changed, as you can always use descript field which is mutable element.

Toma400 commented 2 years ago

This could also work nicely for removing elements, though this can be also handled by system removing all unrecognised values too (this solution could break mods, though).