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

[CR] Joint torsion ratchet CBM increases stamina drain (toggleable) #27882

Merged
merged 8 commits into from Feb 4, 2019
Merged

[CR] Joint torsion ratchet CBM increases stamina drain (toggleable) #27882

merged 8 commits into from Feb 4, 2019

Conversation

ghost
Copy link

@ghost ghost commented Jan 25, 2019

Summary

SUMMARY: Features "Joint Torsion increases stamina usage when moving."

Purpose of change

It was a throwaway suggestion that I saw mentioned, and I liked it, it's one step towards less silly magical CBMs.
The energy has to come from somewhere, and it comes from slightly increased friction when moving legs.
The name of the CBM - joint torsion ratchet - implies this very idea.

Describe the solution

// Regain 10 stamina / turn
    // 7/turn walking
    // 20/turn running
    int burn_ratio = 7;
    if( g->u.has_active_bionic( bionic_id( "bio_torsionratchet" ) ) ) {
        burn_ratio = ( burn_ratio * 2 ) - 3;

Just this really, walking with it activated will decrease stamina very slowly.
De-activate to return to normal.

Describe alternatives you've considered

A reduction in speed, or leg encumbrance.
The slightly increased stamina drain seemed slightly less onerous.

Additional context

I don't think this will be a popular change. I welcome feedback. I think it is sensible, but nerfing CBMs I know seems to be a very contentious area !

@ghost ghost changed the title [CR] Joint torsion ratchet CBM power increases stamina drain (toggleable) [CR] Joint torsion ratchet CBM increases stamina drain (toggleable) Jan 25, 2019
@anothersimulacrum
Copy link
Contributor

I think the reduction in speed/increase in move cost would be a better way to do this, because as it is it just forces you to constantly toggle for it to be useful, which is annoying.

@ghost
Copy link
Author

ghost commented Jan 25, 2019

I think having a reduction in speed or increased leg encumbrance would force a toggle-off before combat and back on afterwards.
Same situation really.

@nsklaus
Copy link
Contributor

nsklaus commented Jan 25, 2019

should be default, and non related to cbm. moving around (yes even when walking), fighting, all those actions should consume more stamina than it does at the moment in the game.
character feels like is fueled on infinite energy reactor. it would make it nice for immersion to have to calculate when moving from point A to point B, places to stop a bit and catch breath.
same when fighting.. in the game i can fight 5 zombies and walk out like nothing happened, without having to catch breath for a minute.

@KITbutler
Copy link

What is the actual power output of this thing in physical units? A very small amount of power could in fact be salvaged "for free" as our bodies have to decelerate our limbs as well, dumping that into power gen might even relieve some strain on our muscles. Not sure on the biomechanics of that second part but electricity-reclaiming electromagnetic brakes are a thing on vehicles.

So until we get some quantitative calculations the more important question is: does this CBM need a dedicated nerf, or do we merely need an overall system rework?

@ghost
Copy link
Author

ghost commented Jan 25, 2019

My understanding of the physics is limited, but I can't see how energy could be got for "free"
Even with regenerative braking systems it's the friction that generates the electricity that would otherwise go to heat, this causes a reduction in effective braking - hence why hybrid cars have backup pure friction brakes for emergency stops and so on.
In terms of the human body whether you are decelerating your limbs or accelerating them, you are using muscle power to achieve that, any of that kinetic energy that is converted to electricity, would reduce the action itself, therefore requiring more muscle effort to achieve same effect.

But I'm not an expert so could very well be wrong!

As for needing a nerf - yes I think so, endless power from nowhere is a bit silly.

@KITbutler
Copy link

KITbutler commented Jan 25, 2019

The work our muscles expend to decelerate our limbs is "wasted" in the sense that we are trying to take kinetic energy out of the system. Just like regenerative braking really, instead of wasting it all into friction->heat the joint ratchets could pick it up saving our muscles the effort in the process. If they are "smart" they'll disengage during limb acceleration to avoid the penalties you are trying to add.

Of course this kind of "waste energy" harvesting has some pretty stringent limits as far as total power output is concerned so my proposed explanation might be pretty easy to debunk.

@kevingranade
Copy link
Member

Studies indicate there's something in the vicinity of ~250 uW (walking) to ~800 uW (running) of energy to harvest "for free", which is many orders of magnitude lower than anything we track.

@KITbutler
Copy link

Are they factoring in present-day ethically acceptable harvesting technologies though? Because all I've seen in that regard are wearable gadgets not invasive skeletal surgery.

@mlangsdorf
Copy link
Contributor

So if there's a super efficient harvester that turns kinetic energy into electrical energy at the maximum theoretical efficiency, you might be generating 1 mW while running. A battery charge is 1 kJ, or 1,000,000 seconds of energy accumulation at 1 mW. So no fatigue cost, but a JTR produces 1 unit of bionic every 277 hours of running.

Or more realistically, a JTR puts an actual resistance load on the body on the order of ~ 10W, and a JTR produces 1 bionic charge every 15 turns of movement. But 10W of extra effort is something you're going to feel, though it'd be like going for a walk with a heavy backpack.

To produce 1 kJ every 12 seconds, a JTR needs to produce ~80 W. It's entirely reasonable for a person to produce 80W, but that's a moderately physically taxing physical activity like riding a bike on a mild upslope. It's something you're going to feel, and if you're doing anything else that already required physical exertion, it's going to be a lot worse.

@KITbutler
Copy link

KITbutler commented Jan 26, 2019

A battery charge is 1 kJ

Ouch. Makes the activation costs seem rather ridiculous though, the mini-flamethrower uses twice as much energy as a refillable lighter could possibly yield in-game.

Or more realistically, a JTR puts an actual resistance load on the body on the order of ~ 10W, and a JTR produces 1 bionic charge every 15 turns of movement. But 10W of extra effort is something you're going to feel, though it'd be like going for a walk with a heavy backpack.

Hmm, backpacks being heavy doesn't seem to be an issue for our character...

To produce 1 kJ every 12 seconds, a JTR needs to produce ~80 W. It's entirely reasonable for a person to produce 80W, but that's a moderately physically taxing physical activity like riding a bike on a mild upslope. It's something you're going to feel, and if you're doing anything else that already required physical exertion, it's going to be a lot worse.

Yeah no, the total metabolic intake for a non-strained human equates to only around 120W. That'd be a 50% increase in hunger rate over lounging/casual walking.

EDIT: I'd say nerf it to 1 power every 30 turns with no other drawbacks. At 5W that's pushing it a bit on being "unnoticeable" but we have way worse offenders. This would cement it as a passive "trickle charger" for infrequent or low-power bionic usage without causing constant micromanagement or making it completely undesirable for players who plan on ever fighting or running.

@ghost
Copy link
Author

ghost commented Jan 26, 2019

Jenkins rebuild

@ghost
Copy link
Author

ghost commented Jan 26, 2019

What does Jenkins not like about the summary line, can't see it.

@I-am-Erk
Copy link
Contributor

What does Jenkins not like about the summary line, can't see it.

Feature, not features

@ghost
Copy link
Author

ghost commented Jan 26, 2019

Doh, thanks.

@ghost
Copy link
Author

ghost commented Jan 26, 2019

Jenkins rebuild

@kevingranade
Copy link
Member

No it's Features >_<
I think the problem was the space between the last double quote and the triple tick, as you can clearly see in this regex:

+\\?"(.*?)\\?"))(`){0,3}\s*(\\r\\n|$)

(no it's not clear, even if you do regex)

src/player.cpp Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Jan 26, 2019

So the two options seem to be according to the SCIENCE posted above..
JTR creates 1 power every 30 turns moving , with no stamina drawbacks.
or JTR creates 1 power every 15 turns of moving , WITH stamina drawbacks....

@Fris0uman
Copy link
Contributor

Fris0uman commented Jan 26, 2019

Just a side note : making the JTR "toggelable" will make broken cyborg slightly easier as you'll be able to stop generating energy and stop the electric discharge effect. It's not very important though.

src/player.cpp Outdated Show resolved Hide resolved
src/player.cpp Outdated Show resolved Hide resolved
@ZhilkinSerg ZhilkinSerg added the Game: Balance Balancing of (existing) in-game features. label Jan 27, 2019
@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Bionics CBM (Compact Bionic Modules) labels Jan 27, 2019
@John-Candlebury
Copy link
Member

JTR creates 1 power every 30 turns moving , with no stamina drawbacks.
or JTR creates 1 power every 15 turns of moving , WITH stamina drawbacks....

Cant these two options be combined by toggling between them?

@kevingranade
Copy link
Member

JTR creates 1 power every 30 turns moving , with no stamina drawbacks.

No, the option was

So no fatigue cost, but a JTR produces 1 unit of bionic every 277 hours of running.

1/30 power/turns was a number @KITbutler arbitrarally suggested.

@ghost
Copy link
Author

ghost commented Jan 27, 2019

Ok, so we go with current implementation of slightly increased stamina drain.
Unless you feel it should be more stamina drain ? ( currently -11 stamina per movement, regenerating 10 naturally whilst walking so very small drain ), running and cycling would deplete stamina a fair bit faster however.

@mlangsdorf
Copy link
Contributor

I like the idea of a passive mode at 1-3W which is low enough that you don't really care about but isn't very fast, and a toggled active mode at 10-20 W which isn't as slow but drains fatigue. But I'll defer to dpbw if he wants to implement something that complicated.

@ghost
Copy link
Author

ghost commented Jan 28, 2019

The check for active or not should be fairly simple for differing drains/power.
I'll look at that tomorrow.

@I-am-Erk
Copy link
Contributor

Yeah having the passive mode still recharge without stamina drain will probably silence a lot of the outcry, and I think solves nearly every problem with stuff like broken cyborgs etc

@ghost
Copy link
Author

ghost commented Jan 28, 2019

When active : every 8 tiles walked gives 1 power. Stamina drain is increased slightly.
when using muscle power vehicles - Stamina drain is harsher, but bionic power is increased by 2 each time. ( cycling etc is exerting more force then walking )
When passive: every 160 tiles walked gives 1 power. No additional stamina drain.
when using muscle power vehicles - no additional stamina drain, bionic power will receive +1 on average 20 times slower than when toggled active.

@Night-Pryanik
Copy link
Contributor

I guess you should still stick this CBM to legs, otherwise it is unclear why power isn't generating for activities involving arms, such as fighting or wood chopping.

@ghost
Copy link
Author

ghost commented Jan 29, 2019

I guess you should still stick this CBM to legs, otherwise it is unclear why power isn't generating for activities involving arms, such as fighting or wood chopping.

Currently when using muscle powered vehicle, it powers up, this includes using the oars on a boat, if it were just legs, and just reference legs, then oar-power wouldn't make sense....
I could try and remove it from oar-power and return the reference to leg joints to the description?

@Night-Pryanik
Copy link
Contributor

I could try and remove it from oar-power and return the reference to leg joints to the description?

No, that would be a regression. Let's just leave arms power generating to another PR.

@KITbutler
Copy link

I guess you should still stick this CBM to legs, otherwise it is unclear why power isn't generating for activities involving arms, such as fighting or wood chopping.

Actually there is a very good and simple explanation for the "free" harvesting mode: the energy provided by the muscles is deposited in the target. An axe is stopped completely by the tree it hits, your leg must be stopped by your own muscle power every time you take a step and place your moving foot firmly on the ground.

The active generator mode could still harvest at a fairly steep stamina penalty but I'd like to imagine the game simply auto-deactivates it temporarily for convenience the same way we can install CBMs without activating sensory dulling. The heartbeat sound is annoying enough as it is and the in-combat use case is minimal: You'd basically need to be completely surrounded or running away would be preferable, you need strong armour to survive while charging, and you need a bionic which will actually help you out of this mess most of which are high-tier and cost a ton of power (blade, probability travel, teleport, any AoE CC)

@ghost
Copy link
Author

ghost commented Jan 29, 2019

@Night-Pryanik not sure if I've understood you correctly.
currently, before this PR, the JTR IS charged by rowing oars, so technically arm muscle power generation is already there.
That is why I removed the text description about attaching to the legs.
So you think I should put the leg description back and hope people don't get confused by generating power from oars?

@Night-Pryanik
Copy link
Contributor

@davidpwbrown Remove the leg mention.

@ghost
Copy link
Author

ghost commented Jan 29, 2019

Thats what I did in the previous commit. so thats good.

@paulenka-aleh
Copy link

If I were designing JTR for real I'd make it automatically toggle off when stamina drops to a certain level and turn back on when there's enough stamina to harvest energy.
In game we already have similar solution with Metabolic Intercharge: it will stop working if your power is at 100% or if you're very hungry.
This could reduce annoying micromanagement potentially coming along with this feature.

@kevingranade kevingranade merged commit 8e3e69c into CleverRaven:master Feb 4, 2019
ZhilkinSerg added a commit that referenced this pull request Feb 6, 2019
* upstream/pr/28084: (88 commits)
  Fix wet morale cycling
  clear player morale effects in clear_player (#28045)
  Adds some money types. (#27963)
  You lived your life, like a candle in the wind... (#27935)
  [CR] Joint torsion ratchet CBM increases stamina drain (toggleable) (#27882)
  Allowed Snowstorms to happen - added snow wet and glare effects ( and fixed test_weather ) (#27870)
  I didn't make this mod! (#28033)
  Replaced popup with a message in a sidebar
  Added a popup after the start describing scenario
  Added Color manager mention to COLOR.md (#27991)
  Fix some more mission completion dialog bugs
  Fix NPC dialog around lying and succeeding mission
  Update MSX++DeadPeopleEdition 2019-01-31
  Update RetroDays - Mouse mutants, mailboxes
  Update lab_1.json
  Clear traps in test clear_map helper
  Fixed cyan color in COLOR.md (#27969)
  Update gfx/RetroASCIITileset/tile_config.json
  RetroAscii tileset - cleanup, update, lint
  Add lab terrain
  ...
@ghost ghost deleted the joint_torsion_toggle branch February 8, 2019 11:12
@Asmageddon
Copy link
Contributor

@paulenka-aleh Makes an extremely good point here, the micromanagement potential of this change is rather painful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bionics CBM (Compact Bionic Modules) Game: Balance Balancing of (existing) in-game features. [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet