Saving previous equipped items for bound item spells

Everything about development and the OpenMW source code.
Post Reply
phillipedison1891
Posts: 10
Joined: 13 Nov 2016, 22:13

Saving previous equipped items for bound item spells

Post by phillipedison1891 »

Hi, I'm trying to start work on #2326, and I think I know what needs to be done. A new field will need to be added to ActiveSpellParams for the name of the previously equipped item that the bound item replaced, along with a corresponding data field in the savegame file (similar to what vanilla Morrowind seems to do in the SPLM/INAM subrecord).

I'm just checking in to see if there are any conventions that I need to keep in mind when working in the critical ESM stuff - I'm not quite sure how we handle backwards compatibility of savegame files. Should I start by adding the needed stuff to the C++ data structures, and worry about serialization later?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Saving previous equipped items for bound item spells

Post by Zini »

Hm, this sounds somewhat difficult. Using the name (the mRefID field, I presume) won't do it: There could be more than one item in the player's inventory with the same ID and that doesn't mean they are identical. I am not quite sure what persistent form of identifying items we have these days (been a while since I worked on this part of OpenMW). @scrawl: Any ideas?
Post Reply