(I could have sworn we discussed this previously, but I can't find anything on the mailinglist or SS)
That would be great! However I'm concerned about the addition of a pool number to the script commands. At least readnpc, alternpc, createnpc, npccopycount, changenpcid and npcreference would need to gain a 'pool' argument, and many scripts using those or getnpcid would potentially need to be updated if you start using global npcs in a game, which is a problem for reusable scripts like pixel-walker, dwimmerplatformy and SS101 which would need updating. The alternative, which is to encode the pool number in the NPC ID (at least as seen by scripts, not necessarily internally) would avoid all of that work, complexity, and breakage, and I don't see much downside. For example pool_id = pool * 1000 + id. The map editor and NPC debug mode would need to show the combined ID too. (I feel like 1000 is too low a limit but 10000 is too many digits to squeeze into tight spaces (npc placement mode). Maybe * 2000, etc?) On Sun, 23 Aug 2020 at 06:21, James Paige <[email protected]> wrote: > I was thinking of starting work on global NPC definitions soon. > > I believe I will add an "NPC pool" number to each NPC instance which tells > which pool of NPC definitions it uses. > > The per-map NPC definitions will be pool 0 and the global ones will be > pool 1 (with the option of adding more global pools for organization) > > NPC references and ids will still work the same, but there will be new > get/set NPC pool commands for full control. > > I am cautiously optimistic for an easy implementation > > > _______________________________________________ > Ohrrpgce mailing list > [email protected] > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org >
_______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
