-
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
Leash and lead tamed animals #50890
Leash and lead tamed animals #50890
Conversation
Most of the functions don't need to be exposed, they're just implementation details.
- introduce leashed and led_by_leash effects - add corresponding actions to the monexamine pet menu - consume rope on leash, return it on unleash - rework tie action to require leashing first
bb5b0c8
to
61c083e
Compare
Incredible! I was just thinking about this over the past couple days, this game needs leashes for pulling animals through the woods without losing them instantly. |
Does the leash length depend on whether a short rope or long rope is used? |
No, it's just arbitrarily set to 2 tiles. You lose hold of the leash when the distance gets to 3. |
Summary
Features "Leash and lead tamed animals"
Purpose of change
Add the ability to attach a leash to any tamed animal, then use the leash in order to make them follow you. Fixes #10256
Make animals with PET_WONT_FOLLOW not follow the player unless being led by a leash. Fixes #50532
Note: this PR looks large, but it's mostly code refactoring from the first two commits. Actual diff-LOC is around 150.
Describe the solution
Describe alternatives you've considered
Requiring survival 1 to put a leash on. You have to tie a knot that won't strangle the animal. Not sure if necessary so didn't do it.
Animals tripping on their leash or getting their leash stuck on something. This invites more micro-management (you have to remove the leash) and adds more code.
Strength check required to move an animal via leash. Since the animal is tame, I assume they just need a gentle tug in order to follow. If in the future we allow leashing untamed animals then this would be required.
Testing
Tame a cow, verify that it doesn't follow the player (cows have PET_WONT_FOLLOW ).
You can leash it and make it follow you.
leash_and_lead.mp4
Lead two animals at the same time
leash_and_lead2.mp4
Dogs will follow without using a leash, but only if they can see you. When you go through a door or down some stairs they can get left behind. Leashing solves that.
To test losing hold of a leash you have to get the animal stuck on something, like an NPC (end of the video).
leash_and_lead3.mp4
Additional context