<div dir="auto">I feel like adding a new pool argument to all those commands is the easier way to go.<div dir="auto"><br></div><div dir="auto">It doesn't break any scripts, it just means the scripts need to be updated to start working with global NPCs. For local NPCs the scripts will still work exactly the same.</div><div dir="auto"><br></div><div dir="auto">But with pool id encoded into NPC id, doing that math becomes a permanent burden of NPC scripting. I feel like I would inevitably have to write wrapper scripts to get/set the dissected the NPC pool anyway.</div><div dir="auto"><br></div><div dir="auto">It would also mean that we would be adding a hard cap on NPC definitions per map, which we don't currently have. (Though I have no idea what the max number of NPC definitions is in a single map that someone has actually used in a real game)</div><div dir="auto"><br></div><div dir="auto">But I am still open to having my mind changed :)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat., Aug. 22, 2020, 10:42 p.m. Ralph Versteegen, <<a href="mailto:teeemcee@gmail.com">teeemcee@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank" rel="noreferrer">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" rel="noreferrer">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank" rel="noreferrer">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer noreferrer" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote></div>