Changes between Version 2 and Version 3 of SavefileHowTo


Ignore:
Timestamp:
09/12/11 12:28:18 (8 years ago)
Author:
magnate
Comment:

Added note on note.

Legend:

Unmodified
Added
Removed
Modified
  • SavefileHowTo

    v2 v3  
    6666 
    6767The functions wr_item and rd_item_X are special cases, as they are not savefile blocks in themselves but are called by three blocks (inventory, dungeon and stores - the three blocks containing carried, floor and store objects respectively). If you make changes to the data saved and loaded about objects you need to add the new version of rd_item to the function pointer definitions in load.c so that the correct version is used by each of the three blocks. This is in addition to incrementing the versions of the inventory, dungeon and stores blocks, but you do ''not'' need to write new loader functions, because the function pointers take care of this. (You do need to write a new rd_item_X function though.) 
     68 
     69A note on this note: items carried by monsters are actually part of the "floor" item list saved in the "dungeon" block. Each item has a field called o_ptr->held_m_idx which records which monster (if any) is carrying it. So although you might think that items need saving in four places, it's actually only three. Who knows, one day we might come down to fewer than that ...