<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 22 March 2017 at 08:19, Ralph Versteegen <span dir="ltr"><<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><br><br></div><br><div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On 22 March 2017 at 06:44, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div>Here is some thinking-out-loud:<br><br></div>What if there was an NPC option to change the target of Chase/Avoid ?<br><br></div>Possible values:<br><br></div>* leader (current default)<br></div>* hero slot 1,2,3<br></div>* last hero in caterpillar<br></div>* other NPC<br><br></div>What would be the best way to implement NPC following?<br><br></div>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.<br><br></div><div>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.<br></div></div></blockquote><div><br></div></span><div>Being able to set the target is intereseting, not something I'd thought of!<br><br></div><div>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)<br><br></div><div>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.<br><br></div><div>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.<br></div><div><br></div><div>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<br></div><div><br>Also, since you're adding XYPair utility functions, I'd like to point out that you could have written in npcmove_direct_chase:<br>DIM dist as XYPair = t2 - t1<br>or even:<br>dist = (XY(catx(0), caty(0)) - XY(npci.x, npci.y)) / 20<br>(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.<br></div></div></div></div></div></div></div></blockquote><div><br></div><div>Actually, this isn't equivalent to what you have, since you divide by 20 first to get tiles.<br></div><div>Also, looking at the functions again, I see they don't handle wrapping maps!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div class="gmail_extra"><div class="gmail_quote"><div><br><br></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="m_5828737637703734615gmail-m_-4437376246951929583HOEnZb"><div class="m_5828737637703734615gmail-m_-4437376246951929583h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 21, 2017 at 10:27 AM,  <span dir="ltr"><<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.co<wbr>m</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">james<br>
2017-03-21 10:27:31 -0700 (Tue, 21 Mar 2017)<br>
185<br>
Add two new NPC movement types, "Chase You (Direct)" and "Avoid You (Direct)"<br>
The existing Chase/Avoid types have been recaptioned "Chase You (Meandering)" and "Avoid You (Meandering)"<br>
---<br>
U   wip/customsubs.rbas<br>
U   wip/game.bas<br>
U   wip/<a href="http://game.bi" rel="noreferrer" target="_blank">game.bi</a><br>
U   wip/testgame/npcwalktest.rpg<br>
U   wip/<a href="http://udts.bi" rel="noreferrer" target="_blank">udts.bi</a><br>
U   wip/whatsnew.txt<br>
U   wip/yetmore2.bas<br>
______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
<br></blockquote></span></div><br></div></div></div></div></div>
</blockquote></div><br></div></div>