[mod Idea] Save cleaner, fixer.

Started by caiowb, February 14, 2017, 09:18:51 PM

Previous topic - Next topic

caiowb

So, rimworld modded (or vanilla) can be a bit messy sometimes, giving out lots of errors or things that stack and end corrupting your save forever, for example, errors like, could not load reference and others..

The idea is, make a program who based on the debug log or other internal mean, locate and fix those problems, thus fixing the save game.
Is it possible?  I've no idea how to code, so I may be just giving an idea and discussing if it is possible.

RawCode

all suggestions related to magical tool that will fix human errors are invalid and not possible with current level of technology.

humans cannot be replaced and errors made by humans can only be fixed by humans.

caiowb

fallout new vegas had something simillar, it is sad that it can't be implemented in rimworld

Fluffy (l2032)

#3
Some simple errors resulting from uninstalling a mod that contains the defs for some items or animals could possibly be fixed by reading all defs of active mods and then removing references to unknown things. That would still be a fairly mammoth task, and only apply to references made by the vanilla game, not other mods.

More complex mods do things in the code itself, so you can't really know what the save game is supposed to look like anymore, and therefore can't fix it.

A feasible solution is to have the vanilla game provide hooks for installing/uninstalling mods. E.g. a modder would have to define a procedure on what to do when his mod is enabled/disabled in an ongoing save game. That would make mod authors (who presumably know what the save is supposed to look like with or without their mod) responsible for these operations. I believe Factorio has a system that is similar to what I've just described.

It's worth mentioning though that factorio mods are written in lua, which is a totally different ballpark than the C# and xml we use. We are able to mod the game's actual core, instead of 'just' some parts that are opened up to modding. That means there's no clear separation of mod and vanilla content in save games (or indeed in the game itself), and that's why RimWorld mods can do awesome things, but also create awesome problems.

RawCode

Quote from: caiowb on February 15, 2017, 12:27:28 AM
fallout new vegas had something simillar, it is sad that it can't be implemented in rimworld

kay, lets ban custom code mods (not injections\unsafe, just custom code), just like new vegas did, it will be fine, trust me, i know better.

caiowb

Quote from: Fluffy (l2032) on February 15, 2017, 03:45:00 AM
Some simple errors resulting from uninstalling a mod that contains the defs for some items or animals could possibly be fixed by reading all defs of active mods and then removing references to unknown things. That would still be a fairly mammoth task, and only apply to references made by the vanilla game, not other mods.

More complex mods do things in the code itself, so you can't really know what the save game is supposed to look like anymore, and therefore can't fix it.

A feasible solution is to have the vanilla game provide hooks for installing/uninstalling mods. E.g. a modder would have to define a procedure on what to do when his mod is enabled/disabled in an ongoing save game. That would make mod authors (who presumably know what the save is supposed to look like with or without their mod) responsible for these operations. I believe Factorio has a system that is similar to what I've just described.

It's worth mentioning though that factorio mods are written in lua, which is a totally different ballpark than the C# and xml we use. We are able to mod the game's actual core, instead of 'just' some parts that are opened up to modding. That means there's no clear separation of mod and vanilla content in save games (or indeed in the game itself), and that's why RimWorld mods can do awesome things, but also create awesome problems.

Oh, I see, thanks for explaining why it is not possible in rimworld =3