CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.54k stars 4.16k forks source link

Things that need to be done for bionic limbs #66182

Closed anoobindisguise closed 1 year ago

anoobindisguise commented 1 year ago

Is your feature request related to a problem? Please describe.

I'm trying to brainstorm the things needed to be done to allow limbs that act as bionics and figured I'd make it an issue to help track those things and see if I'm missing anything.

Solution you would like.

Describe alternatives you have considered.

No response

Additional context

No response

GuardianDll commented 1 year ago

Limbs need to be able to give bionic slots of the type...

Could be solved by copying bionic_slot_bonuses from mutations

"bionic_slot_bonuses": { "torso": 20 },
anoobindisguise commented 1 year ago

Technically for bionics it also works to give a limb negative bionic slots on a limb, janky but it works. I think that would probably allow installation if you had 0 of those slots and then give you say, 20 of them for use by other bionics (assuming you have 0 slots for a limb if you don't have that limb anymore)

estebandellasilva commented 1 year ago

If a limb is bionic, it needs to drain bionic energy in place of calories/stamina and (not) set activity level accordingly. This could be done by moving stamina drain into a boolean function in character.cpp that finds limbs and then either tries to drain stamina or bionic energy depending on what's appropriate (dodging and walking/running would use the legs, while attacking/throwing would use arms, and swimming would use both) then the relevant function could short circuit if the stamina/energy check doesn't have enough of its resource. If the player has only one bionic limb, and one human limb, then the usage needs to be half and half, and presumably would allow the player to keep doing those actions without bionic power but with half the total limb score.

then should limb also provide additional battery capacity which helps you excced the current 2000kj limit? because if you have 4 bionic limbs this can get ugly very fast Also about how much energy are we talking?

anoobindisguise commented 1 year ago

then should limb also provide additional battery capacity which helps you excced the current 2000kj limit? because if you have 4 bionic limbs this can get ugly very fast Also about how much energy are we talking?

Well how many kcal does it take a human to walk 30 feet (9-10 tiles)? And then 1 kcal has 4.1 kJ of energy, and the human uses their energy at something like 30% efficiency. So if it takes about 25 steps to burn one kcal, you're looking at about 160-200 joules per step if the bionic body has a similar efficiency of a human body. Or a hypothetical maximum efficiency of like 50 J per step. Maybe you install wheels for legs which are more efficient and faster, but suck at traversing obstacles.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.