[Ohrrpgce] SVN: james/8566 Add two new NPC movement types, "Chase You (Direct)" and "Avoid You (Dir

James Paige Bob at hamsterrepublic.com
Tue Mar 21 13:23:44 PDT 2017


On Tue, Mar 21, 2017 at 12:19 PM, Ralph Versteegen <teeemcee at gmail.com>
wrote:

>
>
> On 22 March 2017 at 06:44, James Paige <Bob at hamsterrepublic.com> wrote:
>
>> Here is some thinking-out-loud:
>>
>> What if there was an NPC option to change the target of Chase/Avoid ?
>>
>> Possible values:
>>
>> * leader (current default)
>> * hero slot 1,2,3
>> * last hero in caterpillar
>> * other NPC
>>
>> What would be the best way to implement NPC following?
>>
>> The easiest way would be to add a couple values to the NPC definition,
>> one for NPC ID, and another for copy count. That would also leave open the
>> option later on to add a convenient target-picker in the map editor in NPC
>> placement mode... but all copies of an NPC ID would all need to have the
>> same target.
>>
>> Perhaps a better option would be to make Chase/Avoid target an NPC
>> instance property. That would require me to create a convenient
>> target-picker in the map editor right now... but then I will need to
>> implement npcloc-#.reld map lumps before I can implement it.... so not
>> really any downside, just more upfront work I need to do to make it happen
>> this way.
>>
>
> Being able to set the target is intereseting, not something I'd thought of!
>
> Making it per-instance instead of per-definition definitely sounds like a
> good idea, because in-game, it would definitely be better if it were
> per-instance. (That's true for several other things that are currently
> per-definition)
>
> There's no reason you can't just extend the existing .L lump and replace
> it with a .reld later; you wouldn't even need to resize any records. It
> sure will be great to have that lump replaced though.
>

> I was thinking about putting all data for a single map into a single
> reload doc. And if part of it is missing (eg zonemaps, tilemaps) a separate
> lump is loaded, so we can move over to the combined file very gradually, or
> even keep maps 'unpacked' while editing them, for convenience of saving
> only part. It would allow exporting a map as a single file.
>

Ooh, dang. I like that :)

When I do convert .L to reload I will make sure to do it as a sub-node of a
single per-map reload document (probably map#.reld)


>
> I don't see why we shouldn't just use NPC references instead of ID and
> copy count. Either way, if the NPC is deleted in the editor, it'll be
> broken. And the only difference occurs when it's broken and then a new NPC
> with that ref/copy count is created
>

Yes, I agree. ID+copycount would make sense if I was doing this in NPC
definitions, but if done in NPC instances, references make way more sense.



> Also, since you're adding XYPair utility functions, I'd like to point out
> that you could have written in npcmove_direct_chase:
> DIM dist as XYPair = t2 - t1
> or even:
> dist = (XY(catx(0), caty(0)) - XY(npci.x, npci.y)) / 20
> (OK, operator/ was missing, so I just added it). In future I would prefer
> to have a XYPair .pos instead of loose .x and .y members in UDTs.
>
>
>
>> On Tue, Mar 21, 2017 at 10:27 AM, <subversion at hamsterrepublic.com> wrote:
>>
>>> james
>>> 2017-03-21 10:27:31 -0700 (Tue, 21 Mar 2017)
>>> 185
>>> Add two new NPC movement types, "Chase You (Direct)" and "Avoid You
>>> (Direct)"
>>> The existing Chase/Avoid types have been recaptioned "Chase You
>>> (Meandering)" and "Avoid You (Meandering)"
>>> ---
>>> U   wip/customsubs.rbas
>>> U   wip/game.bas
>>> U   wip/game.bi
>>> U   wip/testgame/npcwalktest.rpg
>>> U   wip/udts.bi
>>> U   wip/whatsnew.txt
>>> U   wip/yetmore2.bas
>>> _______________________________________________
>>> 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/20170321/f92d5be9/attachment-0001.htm>


More information about the Ohrrpgce mailing list