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

More structure for bionic bodyparts #70828

Merged

Conversation

anoobindisguise
Copy link
Contributor

@anoobindisguise anoobindisguise commented Jan 10, 2024

Summary

Features "additional capabilities and limitations for bionic bodyparts"

Purpose of change

Uhh I stopped working on this over four months ago and always wanted to go back to it but never did. So I really really need to post this so that I can force myself to update it and get it ready for current (assuming it's still even needed)
Bionic limbs are still a myth lacking many critical functions necessary to be implemented realistically. Although we're making progress there's a lot left to do.

Describe the solution

Things this PR will do:

  • When the player gets the "winded" status effect it is applied per limb, with JSON entries in limbs to determine what winded status effect you get. Currently you get Winded (Torso), (Arm_L/R), (Leg_L/R). So if you run out of stamina while you have bionic legs you can still probably run away even though your arms are noodles and your chest hurts from overexerting yourself.
  • Status effects will check if the limb they're applying to is organic or not (so wasp venom shouldn't enter the bloodstream if they sting a bionic limb). Also applied this to a few hardcoded c++ things like fungus. They also don't bleed.
  • Burning stamina has been replaced in most instances with "use_energy_arms/legs/all". For example running uses legs energy, attacking uses arms energy, and swimming uses all energy. The stamina drain is multiplied by (the number of organic limbs/the number of bionic limbs) and the inverse is true for bionic power drain. Bionic limbs can specify how much energy in joules to substitute for each point of stamina that would be spent. Thus you could have a set of tank tread legs that are bad at parkour but use a lot less energy for general travel than a pair of bionic legs. Or you could have tetrapod legs that excel at difficult terrain but use more energy to get around.
  • Bionic limbs don't feel pain, temperature, etc. Also the player doesn't make a "pain yelp" sound if one is struck.
  • The player's healthy kcal values and base bodyweight (BMI from base and strength stat) are multiplied by the % of their body that is organic. I used hit_size to calculate this. So after installing bionic arms you now have a lower base body weight and thus a lower metabolism, and your stored kcal is lower. Installing a bionic also reduces your stored kcal by an equivalent amount (so say you have 100k stored and you install a bionics which replace limbs with a combined hit size of 20, you now have only 80k stored). Bionic weight (in kg) is used to replace these things so that you still weigh the same or more for the purposes of say, a boat sinking, but the player acts as though they were their actual organic mass. As a side effect gaining a total hit size of >100 (say from a tail mutation) means your tail now weighs something too.
  • You can't use the first aid menu on bionic limbs. Magical/scifi healing sources still work.
  • added simple "test" bionic limbs not available via Rubik etc. debug only.
  • Removing a bionic limb leaves you with no limb. I made some mutations like tentacle arms regrow your arm, as a new mutant limb, but no way currently to legally get your human limbs back.
  • I wrote some tests for sanity checking my system too.

Describe alternatives you've considered

Things this PR does NOT do because I burnt out and stopped:

  • I wanted to make bionic slots an array instead of an integer per limb. This way you could have a "arm_r_bionic" which gives you "arm_r" slots or tank tread legs would provide bionic slots for both left/right legs and feet. Right now you'll take away the necessary limb and then not have any more bionic slots for that limb so you'd be prevented from installing bionics there.
  • Bionic Torsos/Heads. Right now I think our design space of "adam jensen styled" cyborgs is sufficient since the content required for a full body robo shell would require a lot of additional writing and faction progression.
  • There is no way to repair bionic limbs whatsoever. I wanted either Rubik to be able to do it in dialogue or have a dedicated repair interface.
  • There is no way to equip new armors to the existing bionic limbs unless those armors are specifically for the new limbs. You can't have a jacket which covers "arm_r and anything bionic/mutation equivalent" so currently these limbs are using bespoke armor pieces that are given on installation.
  • Bionic limbs cannot replace sublimbs, so you can't replace just below the knee or whatever. This would be an absurdly complicated task so I decided it was best for the limbs to be all or nothing.
  • Bionics still use your strength score. While they don't get bonus hp from strength and have their own powered up limb scores they're still dependent on your base 12 etc strength stat to determine melee effectiveness etc. No easy solution to this.

Testing

I tested this and had it functional... four months ago. Now it's full of conflicts and i need to sort those out. So it'll be a little while.
Edit 2/3/24: Things seem to be functional and stuff is shoved into Venera's limb mod for the time being - doesn't seem like it's breaking any tests now either. I know I have a lot more to do with this system but as far as the absolute bare minimum functionality that this PR adds goes I think it's all good to go.

Additional context

@github-actions github-actions bot removed the json-styled JSON lint passed, label assigned by github actions label Jan 31, 2024
@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Jan 31, 2024
anoobindisguise and others added 4 commits January 31, 2024 14:42
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Feb 1, 2024
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Feb 1, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 2, 2024
@anoobindisguise anoobindisguise marked this pull request as ready for review February 2, 2024 16:15
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-requesting reviews from non-collaborators: @Venera3

@Maleclypse
Copy link
Member

Compiled, created character, got bionic legs, installed them, tried to see how they worked, run down by zombies immediately, looked at @, saw that legs were unpowered so they were a disability, teleported away, got power storage and generation, teleported back into city, and could outrun the day 1 hordes, noticed power slowly went down as I sprinted out of town, tried walking in the wilderness and saw that power dropped more slowly.

@Maleclypse Maleclypse merged commit 542103e into CleverRaven:master Feb 4, 2024
24 of 28 checks passed
@anoobindisguise anoobindisguise deleted the anoobindisguise-bionic-bodyparts branch July 31, 2024 04:16
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` Code: Tests Measurement, self-control, statistics, balancing. <Enhancement / Feature> New features, or enhancements on existing Items: Armor / Clothing Armor and clothing [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Limbs Limbs, mutable limbs, and code related to them. Mechanics: Enchantments / Spells Enchantments and spells Melee Melee weapons, tactics, techniques, reach attack Mods Issues related to mods or modding Monsters Monsters both friendly and unfriendly. Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants