Plan for saving NPC locations in savegames

From OHRRPGCE-Wiki
Jump to navigation Jump to search

Restoring NPC locations on the current map[edit]

  • Implement the proposed npcloc-#.reld format. See L article for details.
  • Add data to each NPC instance that indicates whether or not it's location should be saved/loaded from the RSAV file.
  • Add an edit counter to each npc instance slot
  • Add the ability to mark an NPC instance to be saved in the NPC location editor.
  • Add data to the NPC definition for a default unsaved/saved setting
  • Use the default from the NPC definition when placing an NPC on the map.
  • Write the NPC location's edit count into the RSAV file.
  • Make NPCs on the current map restorable from the RSAV file
  • Add a plotscripting command that can retrieve an NPC's starting state as defined in the map editor (in cause game authors want to use NPC location saving normally, but override it sometimes)

Restoring NPC locations on other maps[edit]

  • Update the current implementation of NPC off-map saving to use a RELOAD format similar to the saved NPC locations in RSAV
  • Add an option to the choices for NPC state saving that allows them to be stored in the RSAV file.
    • This will only apply to individual NPC instances that allow saving, just like in the current-map saving.
  • At load-time, re-create the saved NPC location files using behavior consistent with the curent-map saving.