-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
"PET_WONT_FOLLOW" is bugged #50532
Comments
The only place that PET_WONT_FOLLOW is checked is in monmove.cpp in monster::plan():
Note that, in this instance, the check for |
Cows, horses, and sheep sometimes follow and sometimes won't, in my experience (both 0.E2 stable and 0.F stable). They seem to sometimes hit some kind of invisible lines they won't cross, for whatever reason. |
Probably when they see other monsters. |
No, unless those monsters are non hostile ones (such as squirrels, although I've gotten a safe mode warning about a squirrel once...). I know they won't follow when predators or hostile creatures are seen. |
They won't follow when non-tamed cows are seen - go to a dairy farm, and you'll see none of the cows follow you until all the cows are tame. |
That correlates. Since they can't target the player directly while friendly, if there's something else, they'll target that instead. |
I have a simple fix for this, which is moving the PET_WONT_FOLLOW check in So the plan is to fix this while adding a new feature to the game: leashing animals. Examine a friendly animal with a short rope in inventory, select option to leash (animal gains effect "leashed"), replacing the option to tie down. Examine a friendly leashed animal and you can:
The last option gives them a new effect ("led" or "led_by_leash") which makes them follow the player regardless of PET_WONT_FOLLOW, even if they can't see you. If you go too far they lose the effect. Or you can interact with them again to stop leading them. You can leave the leash on when done or if you're short on ropes you can unleash them. |
I really like eltank's approach. I assume "go too far" means too far away from the animal, such as when running or passing over obstacles the animal can't navigate, as opposed to traveling further than some arbitrary distance. I don't really think it's needed, but just in case I'll point out that the functionality needs to be tested up and down stairs (regardless of whether if the animals are supposed to follow or fail to navigate stairs), including the unaligned weirdo ones in e.g. subway stations, and ramps, as well as when the leading character climbs obstacles the animals can't pass over/on top of. |
Describe the bug
Monsters with PET_WONT_FOLLOW flag follow exactly like they don't
Steps To Reproduce
Expected behavior
cow does not follow
Screenshots
happy cow
cow follows
Versions and configuration
Additional context
Thanks to @actual-nh for letting me know I'm not crazy. Refreshing!
The text was updated successfully, but these errors were encountered: