Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Citizens pathfinding bug in water #1298

Open
Blamo27 opened this issue Sep 7, 2017 · 22 comments
Open

Citizens pathfinding bug in water #1298

Blamo27 opened this issue Sep 7, 2017 · 22 comments
Labels
Confirmed Bug A bug was reported and confirmed by experienced users. Research To Do The development team needs to research the issue.

Comments

@Blamo27
Copy link

Blamo27 commented Sep 7, 2017

Hello,

I'm just posting that : mcmonkeyprojects/Sentinel#201
Sentinel's author just replied that this is a Citizens bug.

Thanks.

@mcmonkey4eva mcmonkey4eva added the Bug Report A bug was reported. label Sep 7, 2017
@Blamo27
Copy link
Author

Blamo27 commented Oct 27, 2017

@mcmonkey4eva Any news ? :/

@Midnight9746
Copy link

For me, citizens don't go anywhere in water, they just float there until the target comes back to land.

It could be a citizens bug, Try using /npc path and make an npc go through water, if it makes it. Then it's just the plugin's communication with each other.

You could try setting the sentinel npc to avoid water all together, so when it's target is in the water, it act like an enderman and walk around. Or maybe it's the range at which the npc chases you at. Try setting it higher to see if the npc would still try to go after you.

The close / range combat might be an issue, then again they could just be guarding you or walk on their own into this mess. So idk

@Blamo27
Copy link
Author

Blamo27 commented Jan 24, 2018

@Midnight9746 What's your Citizens version ?

@Midnight9746
Copy link

Midnight9746 commented Jan 24, 2018

Well my server is 1.12.2 and my Citizens version worked on 1.12.1, so it has to be the 1.12 version.

How are your npcs bugging out in the water? (I'm not adev but I could probably still help)

@Blamo27
Copy link
Author

Blamo27 commented Jan 24, 2018

/ver Citizens

@Midnight9746
Copy link

It just says "2.0.22-snapshot (build 1487)"

@Blamo27
Copy link
Author

Blamo27 commented Mar 6, 2018

@mcmonkey4eva @fullwall Any news ?

@fullwall
Copy link
Member

fullwall commented Mar 9, 2018

Latest build includes a fix for the Citizens pathfinder.

@Blamo27
Copy link
Author

Blamo27 commented Mar 9, 2018

@fullwall thanks ! 😄

@Blamo27
Copy link
Author

Blamo27 commented Mar 16, 2018

@fullwall I'm affraid it's still not working properly. NPCs still don't know how to move in water. Here is a video demonstrating how a NPC tries to move from point A to point B (both red wools) when there is water involved.

https://cf-e2.streamablevideo.com/video/mp4/106zp.mp4?token=1521239930-RSJF%2BX6mEihpkOgTRQCcdRWWIBOUi09ObIxU%2BXWPvGY%3D

@mcmonkey4eva mcmonkey4eva reopened this Mar 16, 2018
@fullwall
Copy link
Member

fullwall commented Mar 17, 2018

Can you try with debug-pathfinding turned on? Also you are using the new finder correct?

@Blamo27
Copy link
Author

Blamo27 commented Mar 17, 2018

@fullwall It does work with newfinder. However, we can't seem to use that config option with our save.yml, because it considerably destroys our server performance, causing this :

https://cf-e2.streamablevideo.com/video/mp4/rky95.mp4?token=1521294301-lHecoEkz1O4PlCDtL14PQujgS7srfeVuZ1K0LbdVsRc%3D

Do you know why does it do that ? It seems like newfinder is making a ton of calculations... Note : we have a very heavy save.yml, if this can have an effect on that (over a thousand NPCs).

@Ferocimo
Copy link

We did numerous testing, and it IS caused by the size of our save.yml. The more NPCs we have, the more time the server takes to make this kind of calculations after a restart : that means that, if we have less NPCs but still a lot, after let's say 20 seconds, the server will stop lagging and the NPCs will normally walk again.
That isn't the case without new finder. This means we can't use new finder with too much NPCs. Do you know why ?

@Midnight9746
Copy link

Midnight9746 commented Mar 17, 2018

Sounds like it's telling all of them to pathfind. But it should only tell the ones in loaded chunks.

Edited: Please tell me that you did not edit the margin value that was originally set to 2. (It's under the new pathing) That causes NPCs to fail their pathfinding.

@Blamo27
Copy link
Author

Blamo27 commented Mar 17, 2018

@Midnight9746 We tried different configurations, and with the default configuration.

@Midnight9746
Copy link

Ah, understood. Are you forcing chunks to be active anywhere? (Just trying to figure out if you're NPCs are facing lag more than anything. If they are calculating new paths when no one is near them.)

I have the new paths, but under about 500 NPCS, and they don't lag like that.

@Ferocimo
Copy link

I don't think we have anything specific forcing chunks to be active.
I suspect the size itself of the save.yml file to be related to that issue (ours weighs over 9 mo).

@Midnight9746
Copy link

Midnight9746 commented Mar 18, 2018

My NPCs did the same walking movement, but it was being ran on my pc, with tons of plugins. Once I've removed those, and made sure to solve lag. They fixed themselves.

If you want, I could try loading your citizens save on my server (not on my pc) and figure out from there. Assuming they run as intended with like 76+ plugins, it might just be the spigot build or citizens build. In any case, I want to help you! :D (and I don't care for what citizens you have, just didn't want to run around a world spamming the create button lol).

@Ferocimo
Copy link

We actually managed to make it work in water without new-finder. In other terms, they now move normally in water, even without new-finder (which we don't want since it's lagging the server).

So, there's still that issue with new-finder, but it's not really a problem for us anymore. Thank you anyway for the help provided !

@mcmonkey4eva
Copy link
Member

Update: per mcmonkeyprojects/Sentinel#262 it apparently works now with new-finder, but not with following an entity specifically (as in: setTarget(Entity) fails, but setTarget(Location) works.)

@mcmonkey4eva mcmonkey4eva added the Research To Do The development team needs to research the issue. label Oct 12, 2018
@mcmonkey4eva mcmonkey4eva added Confirmed Bug A bug was reported and confirmed by experienced users. and removed Bug Report A bug was reported. labels May 2, 2020
@fullwall
Copy link
Member

Is this still an issue?

@mcmonkey4eva
Copy link
Member

NPCs still are very bad at navigation in water. They seem to sometimes be able to get through, but very slowly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed Bug A bug was reported and confirmed by experienced users. Research To Do The development team needs to research the issue.
Projects
None yet
Development

No branches or pull requests

5 participants