<div dir="ltr"><div>(I could have sworn we discussed this previously, but I can't find anything on the mailinglist or SS)</div><div><br></div><div>That would be great!</div><div><br></div><div>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.</div><div><br></div><div>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.<br></div><div>(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?)<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 23 Aug 2020 at 06:21, James Paige <<a href="mailto:Bob@hamsterrepublic.com">Bob@hamsterrepublic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I was thinking of starting work on global NPC definitions soon.<div dir="auto"><br></div><div dir="auto">I believe I will add an "NPC pool" number to each NPC instance which tells which pool of NPC definitions it uses.</div><div dir="auto"><br></div><div dir="auto">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)</div><div dir="auto"><br></div><div dir="auto">NPC references and ids will still work the same, but there will be new get/set NPC pool commands for full control.</div><div dir="auto"><br></div><div dir="auto">I am cautiously optimistic for an easy implementation<br><div dir="auto"><br></div><div dir="auto"><br></div></div></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>