Plan for global NPC definitions

From OHRRPGCE-Wiki
Jump to navigation Jump to search

Global NPCs would be an additional list of NPC definitions that could be used on any map. You frequently want to reuse NPCs across maps. Note it is already possible to copy-paste NPC definitions, including across maps, but even if you do, if the ID varies between maps it breaks scripts.

This is related to Plan for letting NPCs move between maps. While they could be combined into single feature, it seems reasonable for them to be separate. Having a single list of global NPC definitions would allow better and simpler UI than letting pick through all NPC definitions from all other maps.

NPC IDs 0-999 or 0-9999 could be for local NPCS, 1000+ for global NPCs. This avoids needing to add any new script commands, replace the .L file format, or make many changes to code.

Global NPCs could be shown at the bottom of the NPC editor, beneath "Add new NPC", with an "Add new global NPC" at the very bottom, so it's even plausible not to add any separate menu.

There could be a convenience feature of the NPC editor which converts an existing local definition to the global list and updates all NPC instances to use the global ID.