[Ohrrpgce] Global NPCs

Ralph Versteegen teeemcee at gmail.com
Tue Nov 17 16:51:51 PST 2020


Speaking of hróðvitnir blockers, I found the following draft email which I
should have sent. I don't think I've since fixed any of the problems
mentioned in it.

~~~old email follows~~~

I found that there's very little checking whether an NPC has an invalid
pool number (due to data corruption or loading a future .rpg). There are a
lot of places that will crash. For simplicity I think we should require
that the pool number is always valid (get LoadNPCL to clamp it), but the
problem will reappear if we ever allow adding and deleting npc pools.

I also found more places that will crash on an invalid NPC ID, will try to
fix those.

I found some problems in the map editor too:
-if you delete global npc definitions and then go to a map that used them,
it will crash
-the map editor doesn't reload any global npc definitions after you edit
them, [...]

BTW, can you please line-break text in plotdict so the diffs are readable?
Some of these lines wrap the screen a dozen times!

On Mon, 31 Aug 2020 at 13:36, James Paige <Bob at hamsterrepublic.com> wrote:

> Yeah, it was a bit bigger than I expected too. I am really happy to have
> it. I hope to use it a lot
>
> I think multiple global NPC pools might still be nice, I just didn't see
> it as a priority. I figured it was better to get pool 1 well-tested first.
>
> If you wish to shorten the constants, please do, I have no objection.
>
> On Sun., Aug. 30, 2020, 9:24 p.m. Ralph Versteegen, <teeemcee at gmail.com>
> wrote:
>
>> Wow, this feature is bigger and gnarlier than I expected. And there's
>> still a few unfinished items like updating live-previewing. I've got much
>> more code to review and found more bugs to fix.
>> What about the plan to let people create multiple global NPC pools? Or is
>> that put off for the indefinite future?
>>
>> I think that "npc pool: local" and "npc pool: global" are way too
>> verbose. I suggest "local npc" and "pool 1", or "pool: local" and "pool:
>> <poolname>", assuming you can name pools once you can have multiple of
>> them, eg "pool: enemies". Also, I think we should make it clear that the
>> local pool is 0 and the global pool is 1 so people can write that if they
>> prefer. That's how I assumed it would be used.
>>
>> On Wed, 26 Aug 2020 at 15:24, Ralph Versteegen <teeemcee at gmail.com>
>> wrote:
>>
>>> Cool!
>>> In the L documentation it says pool 0 is local and 1 is global, but in N
>>> it says the filename is globalnpcs0.n. Is that intentional?
>>> Did you update NPC debug mode too?
>>>
>>> Once NPC names are added, people can also use them to refer to NPCs
>>> without any pool argument. And I think I'll allow naming NPC instances,
>>> overriding the definition name, to refer to a particular copy, since the
>>> renumbering of copies as you add/delete NPCs is also a complaint.
>>>
>>> On Wed, 26 Aug 2020 at 13:10, James Paige <Bob at hamsterrepublic.com>
>>> wrote:
>>>
>>>> I finished the base implementation of global NPCs today, and it passes
>>>> basic tests.
>>>>
>>>> I'm not going to check it in just yet, because I haven't finished the
>>>> plotscripting changes yet, or written any tests
>>>>
>>>> I decided that I am going to go with adding a pool argument to a bunch
>>>> of scripting commands, not using ID 5000+ syntax.
>>>>
>>>> Commands like "walk npc" that expect NPC reference or ID will default
>>>> to using local id. You will need to use NPC reference to work with global
>>>> NPCs.
>>>>
>>>>
>>>> _______________________________________________
>>>> Ohrrpgce mailing list
>>>> ohrrpgce at lists.motherhamster.org
>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>>
>>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20201118/62bf7a90/attachment.html>


More information about the Ohrrpgce mailing list