Plan for raising NPC-per-map limits
From OHRRPGCE-Wiki
[edit] NPC definitions
- Store NPC pictures in an array of memory buffers, rather than an allmodex screen page
- Optimize NPC picture array to behave as a cache, only storing each set once, and automatically adding new entries when alter NPC changes an NPC's picture
- Update the N lump.
- remove bsave header
- store record size in BINSIZE.BIN
- get rid of 1920 wasted bytes in each record
- store N lump record count to MAP lump
- Update all code that assumes that exactly 36 NPCs exist
- take special care that accessing non-existent NPC IDs <= 35 from a plotscript fails gracefully
- Increase the NPC limit
[edit] NPC locations
...and while we are at it...
- update the L lump.
- remove BSAVE header.
- store record size in BINSIZE.BIN
- get rid of (or re-purpose) 2 wasted bytes in each record
- store L lump record count to MAP lump
- Update all code that assumes that exactly 300 NPC instances exist
Note that just because you will be able to use lots of NPCs on a single map, don't go hog-wild, because too many extra NPCs will have a performance impact, both on display and tag-checking.
