The Twilight Forest

The Twilight Forest

143M Downloads

Naga AI broken

Matti-Koopa opened this issue ยท 19 comments

commented

The Naga is completely stuck. Does nothing, can't be hurt with any weapon.
I can push him and I do take damage.

This is a world that is 2 days old by now. I passed the Naga area a couple of times but never fought him.
2017-06-22_15 12 07

Save file (I'm standing right by him) here: https://mega.nz/#!VBJGSIwa!Q95wOG7jD7fzy31EXMTGC2bz7H0ghbtVSv6u1kV57LM

TW Forest Build 42.

commented

I think I can finally close this old-ass issue.
I had to toy with the naga a bit to fix an issue opened recently, and I have deemed the naga as fully functional, even when outside of its home radius. Its AI will work fine when it leaves, and it will try to actively pathfind its way home instead of just sitting there (like it used to apparently?) or continuing to fight the player that can't deal damage to it.
As for the naga not being able to take damage outside the courtyard... well, its code that beni himself wrote, and I'm not willing to change it. You shouldn't ever encounter the issue of not being able to hurt it now because it will always find its way back home.

commented

Have you experienced this problem in later builds?

commented

1.11, Tama.

commented

Bugs for unsupported versions are silly

commented

I'm aware it's 1.11 however it's the same code, nothing has changed for the Naga between versions. I wasn't able to reproduce this back then either so if there's a way to reliably cause it then I'd like to know.

commented

is it because in that screenshot he doesn't have an arena/home position?

commented

He enclosed the world with the issue, find out.

commented

Not having a home is actually very possible to be the cause. Seems we even have some weird check for the Naga to not take damage if it's out of range of its home.

commented

Just spawned a Naga in an enclosed environment (a room dug out underground), and it doesn't move. However, above ground, it moves around as normal.

commented

I'm experiencing this on the latest commit to branch 1.11.2

commented

Is there a way to reliably cause this? I've yet to see it happen myself.

commented

The naga had escaped its enclosure when it froze for me

commented

Does the Naga only freeze when you're a certain distance away from it or when it freezes for you guys is it frozen even when you're up close to it?

commented

It remained frozen and immune. I had to use /kill to kill it.

commented

Haven't experienced this since moving to 1.12

commented

It did happen for me in 1.11.2 also i remembered there was an error thrown to the console. i cannot find the log at this moment but maybe when I'm home i can find the log file.
also when i updated to 1.12 i wanted to do a Naga boss fight last time i could not attack it (it did move and attacked me). but that's maybe i didn't unlock the arena perhaps.

commented

It happened to me too. When Naga went beyond the arena it stopped receiving damage but kept moving. After I was ableto return Naga back it is back to normal.
Version 3.1.1, 136

commented

Yea the Naga is meant to not take damage when its outside of its home range. I'm not quite sure if this is really needed or not.

commented

Seems to me that if it's capable of breaking out on its own, it shouldn't become invincible