Skip to content
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

Chiropteran Mutation Line #70797

Merged
merged 214 commits into from
Feb 20, 2024
Merged

Chiropteran Mutation Line #70797

merged 214 commits into from
Feb 20, 2024

Conversation

worm-girl
Copy link
Contributor

@worm-girl worm-girl commented Jan 9, 2024

Summary

Features "Adds Chiropteran (bat) mutation line, and the subaquatic navigation system CBM"

Purpose of change

I put #70479 together initially because I wanted to work on this mutation line, but it was such a big feature I thought I'd do it for birds first. Bats are fascinating animals, they're frequently studied by scientists (especially in the age of covid), and some of them drink blood, which is a feature we don't really explore much in mainline despite having the tools for it all in place.

The Chiropteran line is a gliding, wall-clinging, echolocating, heat-smelling, blood-drinking stealth attacker that trades durability and manual dexterity for powerful fangs and extreme mobility. It is also a very social mutant and will get sad if it's alone too long, but its grotesque appearance will make it difficult to find friends.

Echolocation and Leaf Nose may seem redundant, but they rely on different body parts (ears and mouth, respectively) and are both at the end of a fairly long set of mutations, meaning players may get one or the other and decide that's good enough. This also provides some room to fall back on another sense if one of the mutations is blocked by a CBM or another mutation. Echolocation also detects certain traps and helps with navigation, while Leaf Nose does neither.

Describe the solution

Adds the Chiropteran mutation line, all associated samples, mutations, mutagen, and primer
Adds a Subaquatic Navigation System CBM that makes use of the new echolocation system
Fixes some issues with quadrupedal movement, including line of sight and buggy conditions
Removes attack penalties for quadrupeds who are crouching and unarmed
Reduces attack (but not defense) penalties for arm tentacle-havers and Slime mutants who are crouching or prone

  • Hemovore: You can still eat other food, but you crave the taste of blood over everything else. Without a steady supply or some kind of iron supplement, you're prone to developing anemia.
  • Bloodfeeder: Your craving for blood borders on obsession. You can drink mutant blood without getting sick (though the meat may still bother you), and you don't really care if the stuff comes from a human or not.
  • Vampire Fangs: Your teeth are so sharp, you can use them to shave the fur from your victims before you feed. What's more, anticoagulants in your saliva will keep the blood flowing long after it should have stopped. ( data source for anticoag effect: https://www.depts.ttu.edu/nsrl/get-involved/downloads/vampire-bat-exhibit.pdf - note that this effect is delayed until a followup PR )
  • Bat Ears: Your broad, pointed ears are like radar dishes. You can hear even the slightest sounds at great distance, and most loud sounds don't bother you. (source: https://www.brown.edu/news/2016-03-30/batsound )
  • Echolocation: You've learned how to hunt without sight. Activate to emit an ultrasonic chirp that will echo off of solid objects, including creatures and some traps, that will help with navigation. Echo sounds and volume will vary by creature size. Larger creatures get longer strings and louder echoes, but if a creature has the PLASTIC or HARDTOSHOOT flag, it will ping as smaller than it actually is. Note that these sounds aren't super descriptive - it's up to what's left of your human brain to try to puzzle out what all the echoing clicks mean.
  • Leaf Nose: Your nose is upturned, ridged, and flared out into a leaf shape that humans will likely find unsightly. On the plus side, thermoreceptors in your nostrils allow you to smell heat as long as your face is uncovered.
  • Bat Wings: Most of your fingers have grown to tremendous length, becoming a broad pair of leathery wings. This allows you to arrest a fall or glide from a ledge if you aren't too weighed down, but naturally impedes your fine motor skills. They even keep you warm when you sleep.
  • Bow-legged: Your lower limbs have shortened and grown bow-legged, slowing your bipedal movement. But as long as you're not holding anything in your fingers, you're able to crawl quickly and quietly.
  • Hooked Toes: Walking on two legs is pretty awkward, but you can climb just about anything thanks to your powerful toe claws. You can even cling to walls you glide into!
  • Shriek: Out of scope for now as its effects would require some C++ and balancing.
  • Mesopic: You see poorly in bright light.

Existing mutations to assign to bats:

  • Light Bones
  • Infection Resistant
  • Disease Resistant
  • Mammal Pheromones
  • Lightly Furred
  • Extremely Dexterous
  • Light Eater
  • Flimsy
  • Grain Intolerance
  • Junkfood Intolerance
  • Badly Deformed
  • Indefatigable
  • Light Step

Other stuff:

  • Adds the natural_stance effect, which gives quadrupeds a number of benefits when they are on all fours:
    • This effect is gained by having RABBIT_FEET or DIGITIGRADE_LEGS and some variety of PAWS, or by having WINGS_BAT and LEGS_BAT, as well as being a post-threshold Feline, Lupine, Beast, Rabbit, or Bat, and either running or crouching while not holding anything. This is sort of confusing, but I've simplified an existing system w/digitigrade legs and paws to implement it, so we're doing better than we were!
    • If you have this effect, you will ignore all combat penalties for crouching, making the stance identical to running except for move speed and sound generated
    • In the next PR (The code is done, I just had to split it for size) this effect will cause you to favor using your mutation attacks.
    • It is by design that some mutation lines aren't quadrupedal, despite the animal they're based on having that quality. This keeps the differing mutant lines distinct by offering alternative play styles, encourages players to consider mixing lines, helps stress that you're turning into a weird hybrid and not a 1:1 copy of the animal in question, and allows us to give some buffs to lines like Rabbit and Beast which are otherwise lacking compared to Mouse and Chimera
  • Adds the PSEUDOPOD_GRASP flag for slimes and cephalopods. This reduces attack penalties for being prone and removes them for crouching, as these mutants do not rely on using their entire skeleton (if they even have one anymore) for leverage. This does not help with defensive penalties. It's mostly unrelated to this PR, but it was handy to drop it in here while I did the natural_stance stuff
  • Fixes a bug that was preventing cephalopods from getting both BEAK and MOUTH_TENTACLES
  • Fixes some awkward language in Frog's wide mouth mutation
  • Adds the Subaquatic Navigation System CBM, a CBM which uses the same system I wrote for echolocation, but instead works underwater, pulsing every 4 seconds rather than on-demand. If the player has the Targeting System CBM installed, it will convert the boops the player hears into useful data. Otherwise they're left to guess at what they mean. The Targeting System does not do this for mutation echolocation, as its developers could not have foreseen echolocating bat-men

Bugfixes:

  • Fixes a bunch of missed logic for running quadrupeds. They can now hide behind cover as if crouching, and are harder to shoot than if they stand upright
  • Cleans up the conditions attached to many of the PAWS mutations. This also corrects some bugs that had been left in the system, such as most of them not working at all
  • Unhardcodes the solution for line-of-sight checks when mutants run on all fours. This was previously only applied to the mutant's sight radius and not their visibility behind cover or shootability. Quadrupedal runners are now treated as crouching for these purposes
  • Fixes a minor issue with the sneezing effect's description
  • Footstep markers are now placed with a random rather than fixed scatter. The scatter still scales with distance and volume

Total Mutation List
Positive: Lightly Furred, Mammal Pheromones*, Hooked Toes*, Dextrous, Very Dextrous, Extremely Dextrous*, Webbed Hands, Good Hearing, Bat Ears, Echolocation, Leaf Nose, Indefatigable, Quick, Light Eater, Disease Resistant, Extrovert, Light Step, Bloodletter, Fangs, Vampire Fangs*
Negative: Slit Nostrils, Ugly, Deformed, Light Sensitive, Mesopic, Hemovore, Junkfood Intolerance, Grain Intolerance, Flimsy,
Mixed/Neutral: Light Bones, Bow-legged*, Bat Wings*, Bloodfeeder*, Hirsute, Chiropteran (threshold)

Sound Marker Update
Sound markers were being drawn deterministically, and in cases where the player misheard the sound, they would always mishear it at the same distance from its actual source. This update adds a small amount of variance (1-3 tiles, based on how well the player heard). The result is that sometimes misheard sounds will be closer to their actual origin, and sometimes they will not.

Design plans for the bite PR that will follow this one
Fang changes and anticoagulant saliva - this stuff is done but will be submitted in a followup PR

Social/asocial mutations - also done, also in a followup PR

Readds gliding for Bird Wings
The changes from #70443 were partly reverted by #70721 . This PR restores the functionality of the gliding without the limb stuff. Bird wings, like bat wings, are currently represented by very high encumbrance on the hands and some on the arms - not a perfect solution, but good enough for people to playtest the glide mechanics while we wait on the limb stuff.

Describe alternatives you've considered

Not having a blood drinking stealth glider glass cannon build in the game.

Testing

TODO:

  • Ensure that most invertebrates and aliens are excluded from HEMOVORE_FUN and the draculin effect. I think logically giant bugs would have to have some kind of clotting factor, as they have lungs and stuff unlike real bugs, but it's probably safe to assume it's different enough to be excluded from this effect
  • Figure out arm/hand encumbrance for wings
  • Find a journal, see that the recipe's in it
  • Check labs to see that samples, mutagen, and primer are spawning properly
  • Collect ingredients and craft the mutagen
  • Craft the primer
  • Manually go through the mutation process to confirm dreams and check for weirdness
  • Make sure Fangs still works on the mutation lines that already got it
  • See if Rubik sells the new CBM

Further testing 2/18 following some updates:

  • Got all the mutations
  • Saw that IR vision and echolocation were playing nice with each other
  • Installed the subaquatic navigation system CBM, saw that it also worked as intended
  • Drank human blood as a normal person, as a hemovore, as a bloodfeeder.
  • Tried the above with Uncaring. Saw that it all worked as intended

Additional context

image
Venera pointed out that this guy's sorta like Man-bat, from DC Comics. I imagine no two mutants look alike, even in the same line, but that's about right.

image
Using echolocation and IR scent to track enemies. Echolocation isn't 100%, echo volume is based on creature size, and you have to actually hear it. Even if you do, there's a 1/4 chance of the sound wobbling to another tile.

image
All pre-threshold mutations. Note that bloodletter and sociable are delayed until a followup PR

image
All mutations, including post-threshold

Bat's main weakness is that on flat ground it is slower than a human and has no extra stamina. It's also very restricted in what armor it can wear and is vulnerable to damage due to LIGHT_BONES, so bat mutants will want to utilize verticality and stealth to fight effectively.

https://www.youtube.com/watch?v=7RostZvdoLM (Warning: Nature video shows a small amount of animal blood. The animal being bitten is not seriously harmed by this)

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies <Enhancement / Feature> New features, or enhancements on existing astyled astyled PR, label is assigned by github actions labels Jan 9, 2024
@Karol1223
Copy link
Contributor

Karol1223 commented Jan 9, 2024

I'm usually not a fan of mutations but the idea of a line that hampers social skills with its looks but absolutely requires to be social is awesome and I like it.

My only concern here is reusing the aquatic lines' webbed fingers for a half-point to mutating bat wings. I am not sure if the half-point for membraneous wings should really help with swimming?

I am kinda meh that out of choosing all actually interesting bats you went with vampires, but it's as valid choice as any and I don't have any constructive complaints here. Just wish we had subcategories already so we could have all the fun bats, really.

@worm-girl
Copy link
Contributor Author

worm-girl commented Jan 9, 2024

I'm usually not a fan of mutations but the idea of a line that hampers social skills with its looks but absolutely requires to be social is awesome and I like it.

My only concern here is reusing the aquatic lines' webbed fingers for a half-point to mutating bat wings. I am not sure if the half-point for membraneous wings should really help with swimming?

I am kinda meh that out of choosing all actually interesting bats you went with vampires, but it's as valid choice as any and I don't have any constructive complaints here. Just wish we had subcategories already so we could have all the fun bats, really.

We have plenty of things that eat fruit and bugs, we don't have anything that drinks blood. Vampire bats also have some of the sharpest teeth in the animal kingdom, thermoreceptors, and gameplay-relevant compounds in their saliva, so they're the natural choice.

Subcategories are on my short list. I'm not sure microbat or fruit bat would get abilities that make them worth playing though. Or at least I can't think of any, and nothing should be subdivided without a solid gameplan for each. So we'd want to think of some before splitting.

As an example, lizard very neatly splits into snake, crocodilian, and chameleon. All three of those immediately suggest useful abilities and distinct play styles. Similarly, splitting insect into cockroach, wasp, bee, etc will only help the mutation line because those are all animals with differences that go beyond their diet, and insect is currently weighed down with some mutations that work at cross purposes.

I don't see why webbed hands wouldn't help with swimming. It's literally just a human-ish hand with webbed fingers, the same form factor as swimming gloves. The full wing is going to be a lot worse at it.

Also in the meantime you can just get an expanded digestive system installed and roleplay as a bat that eats whatever it wants. Or mix mutagens with mouse or something.

@Venera3
Copy link
Member

Venera3 commented Jan 9, 2024

Obligatory "we can have subcategories right now". Having half a dozen mammalbut mutcats is an old bugbear of mine, but that's not a blocker of adding another - adding the same level of fracturing to existing categories would be a harder sell. Mutations working at cross purposes is the intention, bionics are the straightforward predictable upgrades.

Grouching aside,

  • What gets bat samples?
  • Blindfighting will depend on the implementation heavily, though I'm not convinced "glomp smol thing into mouth" transfers to pike combat.
  • Shriek will need heavy filtering on the targets, daze is pretty jank amd heavy-handed.

@worm-girl
Copy link
Contributor Author

worm-girl commented Jan 9, 2024

Obligatory "we can have subcategories right now". Having half a dozen mammalbut mutcats is an old bugbear of mine, but that's not a blocker of adding another - adding the same level of fracturing to existing categories would be a harder sell. Mutations working at cross purposes is the intention, bionics are the straightforward predictable upgrades.

Grouching aside,

  • What gets bat samples?
  • Blindfighting will depend on the implementation heavily, though I'm not convinced "glomp smol thing into mouth" transfers to pike combat.
  • Shriek will need heavy filtering on the targets, daze is pretty jank amd heavy-handed.
  1. Bats, which exist already. Could also use winged zombies, I'm not sure if we get samples from zombies though.
  2. Bats are able to avoid obstacles and predators by sound alone, in addition to hunting down bugs.
  3. I will probably just end up fixing Dazed. Seems like it's worth the effort.

As for subcategories: I thought they were your idea? I would prefer the game not have them because I think they'll just dilute a lot of mutation lines, but I was pretty sure you had basically mandated them.

Also, per our lore, mutations combine human tissue with another organism. It's hard to really do anything but various sorts of furries with that as your framework. Medical is just "guy who took medicine" and alpha is just "guy 2, the sequel to guy". Both great lines, but what else would we even do?

@Venera3
Copy link
Member

Venera3 commented Jan 9, 2024

I should do more design wishlist issues, I suppose - I'll see if I get around to it sometime in the near future. In any case, subcats are a tangent to mammalbutflappy Man-Bat.

I wouldn't add samples to zombies, that opens up a lot of weird design space we don't want to fill with mutagen.

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Melee Melee weapons, tactics, techniques, reach attack Martial Arts Arts, Techniques, weapons and anything touching martial arts. Items: Armor / Clothing Armor and clothing labels Jan 12, 2024
@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Jan 13, 2024
@worm-girl worm-girl marked this pull request as ready for review February 18, 2024 21:03
@worm-girl
Copy link
Contributor Author

Alright, looks like it's all working.

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions and removed astyled astyled PR, label is assigned by github actions labels Feb 18, 2024
@Maleclypse
Copy link
Member

 /home/runner/work/Cataclysm-DDA/Cataclysm-DDA/src/character.cpp:10765:87: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
 10765 |             if( has_bionic( bio_targeting ) && has_effect( effect_subaquatic_sonar ) )
       |                                                                                       ^
       |                                                                        

Is this your clang tidy error?

@worm-girl
Copy link
Contributor Author

Should be fixed. Lighting incense at the test altar and praying.

src/melee.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Feb 19, 2024
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Feb 19, 2024
@Maleclypse Maleclypse dismissed kevingranade’s stale review February 20, 2024 04:33

PR Split into smaller chunks. Good call.

@Maleclypse
Copy link
Member

LGTM. Would you mind adding chiropteran samples to the bats added in Xedra Evolved? Or make an issue for me to do so. I'm merging this as it's already quite large but don't want to forget they should be dropping samples.

@Maleclypse Maleclypse merged commit 0030fb6 into CleverRaven:master Feb 20, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. <Enhancement / Feature> New features, or enhancements on existing EOC: Effects On Condition Anything concerning Effects On Condition Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Items: Armor / Clothing Armor and clothing [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Martial Arts Arts, Techniques, weapons and anything touching martial arts. Mechanics: Enchantments / Spells Enchantments and spells Melee Melee weapons, tactics, techniques, reach attack Mods: Aftershock Anything to do with the Aftershock mod Mods Issues related to mods or modding Monsters Monsters both friendly and unfriendly. Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies NPC / Factions NPCs, AI, Speech, Factions, Ownership Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants