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 · 20 comments

Comments

Projects
None yet
5 participants
@Blamo27

Blamo27 commented Sep 7, 2017

Hello,

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

Thanks.

@Blamo27

This comment has been minimized.

Show comment
Hide comment
@Blamo27

Blamo27 commented Oct 27, 2017

@mcmonkey4eva Any news ? :/

@Midnight9746

This comment has been minimized.

Show comment
Hide comment
@Midnight9746

Midnight9746 Jan 23, 2018

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

Midnight9746 commented Jan 23, 2018

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

This comment has been minimized.

Show comment
Hide comment
@Blamo27

Blamo27 Jan 24, 2018

@Midnight9746 What's your Citizens version ?

Blamo27 commented Jan 24, 2018

@Midnight9746 What's your Citizens version ?

@Midnight9746

This comment has been minimized.

Show comment
Hide comment
@Midnight9746

Midnight9746 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)

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

This comment has been minimized.

Show comment
Hide comment
@Blamo27

Blamo27 Jan 24, 2018

/ver Citizens

Blamo27 commented Jan 24, 2018

/ver Citizens

@Midnight9746

This comment has been minimized.

Show comment
Hide comment
@Midnight9746

Midnight9746 Jan 24, 2018

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

Midnight9746 commented Jan 24, 2018

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

@Blamo27

This comment has been minimized.

Show comment
Hide comment
@Blamo27

Blamo27 commented Mar 6, 2018

@fullwall

This comment has been minimized.

Show comment
Hide comment
@fullwall

fullwall Mar 9, 2018

Member

Latest build includes a fix for the Citizens pathfinder.

Member

fullwall commented Mar 9, 2018

Latest build includes a fix for the Citizens pathfinder.

@Blamo27

This comment has been minimized.

Show comment
Hide comment
@Blamo27

Blamo27 Mar 9, 2018

@fullwall thanks ! 😄

Blamo27 commented Mar 9, 2018

@fullwall thanks ! 😄

@fullwall fullwall closed this Mar 15, 2018

@Blamo27

This comment has been minimized.

Show comment
Hide comment
@Blamo27

Blamo27 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

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

This comment has been minimized.

Show comment
Hide comment
@fullwall

fullwall Mar 17, 2018

Member

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

Member

fullwall commented Mar 17, 2018

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

@Blamo27

This comment has been minimized.

Show comment
Hide comment
@Blamo27

Blamo27 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).

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

This comment has been minimized.

Show comment
Hide comment
@Ferocimo

Ferocimo Mar 17, 2018

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 ?

Ferocimo commented Mar 17, 2018

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

This comment has been minimized.

Show comment
Hide comment
@Midnight9746

Midnight9746 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.

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

This comment has been minimized.

Show comment
Hide comment
@Blamo27

Blamo27 Mar 17, 2018

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

Blamo27 commented Mar 17, 2018

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

@Midnight9746

This comment has been minimized.

Show comment
Hide comment
@Midnight9746

Midnight9746 Mar 18, 2018

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.

Midnight9746 commented Mar 18, 2018

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

This comment has been minimized.

Show comment
Hide comment
@Ferocimo

Ferocimo Mar 18, 2018

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).

Ferocimo commented Mar 18, 2018

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

This comment has been minimized.

Show comment
Hide comment
@Midnight9746

Midnight9746 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).

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

This comment has been minimized.

Show comment
Hide comment
@Ferocimo

Ferocimo Mar 18, 2018

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 !

Ferocimo commented Mar 18, 2018

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

This comment has been minimized.

Show comment
Hide comment
@mcmonkey4eva

mcmonkey4eva Sep 2, 2018

Member

Update: per mcmonkey4eva/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.)

Member

mcmonkey4eva commented Sep 2, 2018

Update: per mcmonkey4eva/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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment