Sphereserver / Source

http://spherecommunity.net
Apache License 2.0
108 stars 59 forks source link

@NPCSeeNewPlayer trigger #237

Open Khaldor48 opened 4 years ago

Khaldor48 commented 4 years ago

Hello, it seems, that mentioned trigger (same for NPCLookAtChar but I guess this is coming hand in hand) is firing too late. I would expect to trigger this immediately when I get near NPC. So now I cannot force NPC to attack at this newly approaching player. Another issues is NPC stop considering casting spell when close fight (although I can imagine to do this via some custom script, but it wasn't necessary before a few build (cannot say when this happened, sorry)). Next thing is NPC pathfinding as I mentioned in other issue (long story short -> NPC cannot find any path). There is video as a proof.. I hope there is something we can do about it. Thank you in advance for any participation on fixing this. Thanks a lot!

https://www.youtube.com/watch?v=dFsOPOgaFmQ

coruja747 commented 4 years ago

Some NPC AI actions are based on char INT, so chars with low INT can have higher delay to start AI actions. So you can try set their to INT >= 300 or enable NPC_AI_ALWAYSINT on sphere.ini to automatically consider higher INT on all NPC actions. You can also enable NPC_AI_PERSISTENTPATH to make NPCs keep trying to find a pathfind route persistently instead give up when target is out of LOS

Khaldor48 commented 4 years ago
NPCAI=0001|0004|0008|0400

and those orange skeletons have 500 INT

Khaldor48 commented 4 years ago

Hello, any update on this, please?:)

terrikate commented 4 years ago

Any news here? I have the same problem with my server

Khaldor48 commented 4 years ago

I don't know, this was so crucial for me, hence I stopped developing my shard furthermore and I'll wait till this is somehow resolved :)

coruja747 commented 4 years ago

Does this still occur on latest build? I remember that some time ago I reduced the idle timer delay of NPCs AI from 5-15 sec to 5-10 sec

terrikate commented 4 years ago

@coruja747 in my case I had a small configuration problem after a code update of several years. Now the npcs are going a little better but looking at this commit (https://github.com/Sphereserver/Source/commit/9f99ae520ec6dc79db157337e09e00a8f047f9f9#diff-3693d3c5680c7f7806ce46be2263a092R2263) I see that the maximum was reduced but the minimum was raised 1-20 to 5-15 although now it is true that it is at 5-10 sec

coruja747 commented 4 years ago

Maybe that's the problem, this timer works using tenths of second precision so probably I did some typo when changing this value

The old value was 10 + rand(20) (which is the same of 1.0 - 3.0), later it got changed to rand(1, 20) * 10 (which is the same of 1.0 - 20.0) and then rand(5, 15) * 10 (which is the same of 5.0 - 15.0)

But today I reverted it to old value, so try update to latest build to check if it's working fine

Khaldor48 commented 3 years ago

Hello, sorry for delay.

seems like the issue wasn't resolved. NPC still behaves like on the video in my first post from this issue.

It also looks like NPCAI doesn't have any influence over NPC behaviour, it still can't find the path to the player and is stucked behind two wall pieces and just standing. Also the casters cast only one spell and if it FIZZ, then NPC just give up and continues to idling.

I will try to figure out among old commits when this behaviour have changed. Because I remember clearly, that NPC was running around a block find right path among 20 other NPCS just fine. And I also tried set ARGN in NPCActFight to raise NPC's motivation to fight.

Also takes a lot of time to trigger NPCSeeNewPlayer

Khaldor48 commented 3 years ago

Hello, I just want to ask if there is any update for this issue, nicely please? :)