-
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
Allow bird wings to glide (redux) #70479
Conversation
i hate github i hate github i hate github i hate github i hate github
You can add an encumbrance_threshold to the wing, turn the flag conditional and require the check to have two wing flags to work - that means you can filter out encumbered wings and one disabled wing better while allowing for multiwings later. The scores feel a bit generous but that's always tweakable down the line - a lot of things need limbing yet so the gulf between normal bits and weird new ones will only get larger. |
I'll give that a shot, thanks, and yeah the scores now are only a sketch really, so anyone who works on them will know what I was going for. |
I gave this a try and was dismayed to discover that mutation limbs don't properly get encumbered. This includes gastropod foot, so I can't really test it as you have described. I recommend we leave it as-is until that's in place. The current check for two unbroken "arms" works, at least. I did put the conditional flags on the limbs, but damaging them to 0 wasn't preventing me from flying, even with one has_conditional_flag for each side in can_fly(). |
That's a concern. I haven't gotten around to testing the current state of armor/limb interactions but if the new flexibilits only comes from not throwing an error but without actually doing the armor bits that will be a problem. I'll finish up the mod and then I can look into what broke with conditionals, that is a bit I know used to work. |
Sorry, I mixed things up - you want encumbrance and health limit not threshold to limit flags/scores. Who came up with these names.... |
No, I mean, limbs do not become encumbered at all. I can put on an XL heavy survivor suit and my gastropod foot and bird wings stay at 0 encumbrance. |
What is the expected behavior when a player is in a vehicle that drives off of a tall cliff? |
Forgive me if I missed it in here. Going forward I'd like to see athletics play a role here, where gliding is an athletic activity (grants xp) and higher athletics improves your ability to glide, especially encumbered. Unfortunately that will probably mean nerfing "base level" gliding a bit, so that best level isn't too good; what you've described here sounds to me like a fairly athletic glider but there's room for improvement in a top tier athlete. |
Good thinking. I don't think that'll be too hard to implement either, as glide_distance is determined in iexamine where it'll be easy to check skills. |
Death probably. |
I feel like someone with the ability to glide riding a skateboard off a cliff should glide rather than stick to the skateboard. Something with a roof should be different, but differentiating convertible cars from enclosed ones seems hard. |
Sounds reasonable but I really don't want to be the one to have to try and code that. Vehicles are hell. |
* i hate github i hate github i hate github i hate github i hate github i hate github i hate github i hate github * fixes, limb stuff * better limbs * improve limb stuff * limb balance * fix checks for broken parts * seat fixes * fix stuff * stuff * Update seats.json * Update vehicle_parts.json * fix insect wings * more stuff * tailwind and circular distance * stumble * mut cleanup * lint etc * veh_boost * astyle * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update mutation_limbs.json * prosthetic stuff * Update prosthetics_eocs.json * make tests happy * improve combat interactions * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/character.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * make tests quiet * Update character.cpp * finishing touches * Update data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json Co-authored-by: Anton Simakov <[email protected]> * Update mutation_effect_eocs.json * Update mutation_effect_eocs.json * Update iexamine.cpp * Update player_activities.json * Update mutations.json * Update mutations.json * Update iexamine.cpp * Update mutations.json * Update iexamine.cpp * Update character.cpp * grab * Update character.cpp * fixes * test fix * add conditional flag --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Anton Simakov <[email protected]>
* i hate github i hate github i hate github i hate github i hate github i hate github i hate github i hate github * fixes, limb stuff * better limbs * improve limb stuff * limb balance * fix checks for broken parts * seat fixes * fix stuff * stuff * Update seats.json * Update vehicle_parts.json * fix insect wings * more stuff * tailwind and circular distance * stumble * mut cleanup * lint etc * veh_boost * astyle * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update mutation_limbs.json * prosthetic stuff * Update prosthetics_eocs.json * make tests happy * improve combat interactions * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/character.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * make tests quiet * Update character.cpp * finishing touches * Update data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json Co-authored-by: Anton Simakov <[email protected]> * Update mutation_effect_eocs.json * Update mutation_effect_eocs.json * Update iexamine.cpp * Update player_activities.json * Update mutations.json * Update mutations.json * Update iexamine.cpp * Update mutations.json * Update iexamine.cpp * Update character.cpp * grab * Update character.cpp * fixes * test fix * add conditional flag --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Anton Simakov <[email protected]>
* i hate github i hate github i hate github i hate github i hate github i hate github i hate github i hate github * fixes, limb stuff * better limbs * improve limb stuff * limb balance * fix checks for broken parts * seat fixes * fix stuff * stuff * Update seats.json * Update vehicle_parts.json * fix insect wings * more stuff * tailwind and circular distance * stumble * mut cleanup * lint etc * veh_boost * astyle * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update mutation_limbs.json * prosthetic stuff * Update prosthetics_eocs.json * make tests happy * improve combat interactions * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/character.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * make tests quiet * Update character.cpp * finishing touches * Update data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json Co-authored-by: Anton Simakov <[email protected]> * Update mutation_effect_eocs.json * Update mutation_effect_eocs.json * Update iexamine.cpp * Update player_activities.json * Update mutations.json * Update mutations.json * Update iexamine.cpp * Update mutations.json * Update iexamine.cpp * Update character.cpp * grab * Update character.cpp * fixes * test fix * add conditional flag --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Anton Simakov <[email protected]>
* i hate github i hate github i hate github i hate github i hate github i hate github i hate github i hate github * fixes, limb stuff * better limbs * improve limb stuff * limb balance * fix checks for broken parts * seat fixes * fix stuff * stuff * Update seats.json * Update vehicle_parts.json * fix insect wings * more stuff * tailwind and circular distance * stumble * mut cleanup * lint etc * veh_boost * astyle * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update data/json/mutations/mutation_limbs.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update mutation_limbs.json * prosthetic stuff * Update prosthetics_eocs.json * make tests happy * improve combat interactions * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/character.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/activity_actor.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * make tests quiet * Update character.cpp * finishing touches * Update data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json Co-authored-by: Anton Simakov <[email protected]> * Update mutation_effect_eocs.json * Update mutation_effect_eocs.json * Update iexamine.cpp * Update player_activities.json * Update mutations.json * Update mutations.json * Update iexamine.cpp * Update mutations.json * Update iexamine.cpp * Update character.cpp * grab * Update character.cpp * fixes * test fix * add conditional flag --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Anton Simakov <[email protected]>
Summary
Features "Allow bird wings to glide"
Purpose of change
Continued from #70443 - github desktop decided to flip out on me
We have bird mutants. The bird mutants have wings. We have Z levels. The wings should, logically, have some interesting interaction with this feature.
There are a number of factors standing in the way of self-powered flight for a mutant survivor, the main one being that keeping a human body in the air would require something like a seven meter wingspan, to say nothing of other physiological changes involved, and at the very least would completely cost you the use of your arms. Playing a survivor with no arms would at present lock you out of most of the content in the game, so it doesn't seem worth implementing. On top of that it would be pretty difficult (for me) to code realistic flight as opposed to just walking around in the sky.
Bird wings already allowed players to negate all fall damage, but they were doing so by falling down in a straight line. This is not how wings work. This PR addresses both issues by instead making wings into a tool for gliding, which will allow unburdened survivors with free hands to glide forward a short distance as they fall.
Describe the solution
THE BIRD WINGS MUTATION
THE BIRD WING LIMB
GLIDING
THE INSECT WINGS MUTATION
THE FEATHERED ARMS MUTATION
STAGGER
MISC
Describe alternatives you've considered
I have plans for bat and butterfly wings which are beyond the scope of this PR. That being the case, they'll be left as-is for now.
I'm wondering if we can apply this code to implement parachutes. My thinking is that a parachute would require a very high altitude to work, maybe our maximum z level and one or two below that, and you'd move forward a lot less and get blown around by the wind quite a bit more.
Testing
Additional context
MOD AND FUTURE DEV SUPPORT
Here's a brief demo of glide being run on a custom mutant type. Pretend this dude is a bird:
https://www.youtube.com/watch?v=3_5ygmuel9A
I'm interested in hearing from modders about anything you might want out of the core gliding framework. I'd like it to be something that could easily be carried over to MoM or Magiclysm so you can have levitation and flight spells, and I'll try to make sure that functionality is available to you in the most open-ended way I can manage.