Page 1 of 1
NPC Attack Behavior
Posted: Sat Nov 26, 2011 1:01 am
by LeoX9
I've noticed that on my server, If I kite a few mobs, than when they get to me to attack, they line up , instead of going around each other to get to the various positions around my character to attack.... Thus, seeming as if they are lining up to die haha. Any idea's on how to fix this?
Posted: Sun Nov 27, 2011 9:25 am
by Xuri
A problem with the pathfinding code in UOX3, unfortunately. While it can (when advancedpathfinding is turned on) pathfind through the most complex of labyrinths, it currently does not seem to take into account any characters blocking its path - just retries the same path over and over and over because it _seems_ valid.
I'm not sure how to fix this. I _have_ found a few funky workarounds, one of which makes the NPCs circle-strafe you and never stand still (lol), and one that throws in a few random changes of direction every now and then, but they are kinda hacky and can lead to some weird-looking NPC movement. :/
Posted: Sun Nov 27, 2011 11:13 pm
by LeoX9
Something interesting that I just found out:
I went into the 'uox.ini' file and changed the NPC movement speed a tiny bit... by .1 or .2.. This seems to have made them smarter in a way... Haha... Probably didn't really do that but their behavior for attacking seems to be more how it used to be back in the day...
Just something interesting.
Posted: Sun Nov 27, 2011 11:44 pm
by Xuri
Yep. And you can also adjust the speeds at which they walk, run (in combat) and flee, either globally or individually per NPC.
From
https://www.uox3.org/docs/server-settings.html:
CHECKNPCAI=1 - How often (in seconds) NPCs can execute an AI routine.
NPCMOVEMENTSPEED=0.4 - Allows customization of NPC movement speed. Can be overridden by WALKINGSPEED tag in NPC-DFNs
NPCRUNNINGSPEED=0.2 - Allows customization of NPC running speed. Can be overridden by RUNNINGSPEED tag in NPC-DFNs
NPCFLEEINGSPEED=0.4 - Allows customization of NPC fleeing speed. Can be overridden by FLEEINGSPEED tag in NPC-DFNs
Posted: Mon Nov 28, 2011 12:35 am
by LeoX9
That's good to know because I have a few 'main boss mobs' that I'd like to give an edge over all other aggressive NPC's....
Re: NPC Attack Behavior
Posted: Mon Mar 19, 2012 9:30 pm
by Xuri
Fixed on CVS and in UOX3 0.99.