clintbellanger/flare — Issue #206: Handle data not found due to disabled mods
Author: clintbellanger
Created: 2011-11-30 18:50:04+00:00
State: open

There are a few game-breaking experiences that can happen when:

- Player uses a mod
- Saves a game
- Disables a mod

Any data referenced in a save-game file could be affected. The situations that come to mind:

Problem: player location is no longer valid because that map file can't be found
Solution: Warn the player that the location no longer exists, and they will be teleported. Are they sure they want to load? If so, revert to the spawn.txt map

Problem: player has items/powers slotted in the Action Bar that are no longer in the game data
Solution: remove these from the Action Bar

Problem: player has carried items that are no longer in the game data
Solution: replace with an "Unknown Item" placeholder (actually, the Item struct should default to this on every ID). So if a player re-enables the correct mod, the item will be there again.

Problem: player has an equipped item that is no longer in the game data
Solution: same as above, but also unequip the item. If there's no room in the inventory, drop it to the ground.

Problem: a new mod overwrites an ID for an item, changing what the player has
Solution: welcome to modding! The player could disable the new mod. The modders could resolve the conflicting IDs. Sometimes this is desired behavior though (imagine a mod that rebalances weapon damage).