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

Health dropping to -190 in one day with Leaky Bionic #22484

Open
mentos046 opened this Issue Nov 24, 2017 · 4 comments

Comments

4 participants
@mentos046

mentos046 commented Nov 24, 2017

Game version: 0.C 6952 or 0.C-25114-g9ec54b9

Operating system: Windows 10 Home

Tiles or curses: Tiles

Mods active: None

Expected behavior

Health drops fast, but not alarmingly so, when a character has a Leaky Bionic.

Actual behavior

A character's health to plummets to -190 after only one day, when that character has a Leaky Bionic.

Steps to reproduce the behavior

  1. Begin a character with a profession that has the Leaky Bionic, either Broken Cyborg or Bionic Monster.
  2. Wait one day.
  3. Check health and health modifier in the Debug Menu or elsewhere.

I created a test case in a world with no mods to ensure that none of them were the cause, and used the Debug Menu to track the health values.
image
This is on Day 2 of Spring, Year 1. Day 1 started at 8:00, and by 5:00, the next morning, it was already -191. The only thing the character did in that time was sleep.

I've played Broken Cyborg several times before, and having healthy_mod at -180 or so is a pretty common occurrence, so I don't think the Leaky Bionic itself is the cause. Have there been any changes to the way healthy_mod handles healthy, recently?

Also, I know this isn't actually related, but would it be possible to make it easier to remove some of the broken bionics? I routinely attempt it with 14 Intelligence before stimulants, 5-6 in Electronics, First-Aid, and Mechanics, which is the most I can generally get to, starting from 0 in every skill, before the health penalty from Leaky Bionics becomes too great to deal with the constant acid damage, a Scalpel or X-Acto Knife, and two Adderall, and I still consistently see two out of three attempts failing, even though the reported odds of failure are between 25 and 30%.

@uqrs

This comment has been minimized.

Show comment
Hide comment
@uqrs

uqrs Mar 24, 2018

Contributor

I believe you might have been misled- the leaky bionic is certainly at fault.

How the leaky bionic works.

Please direct your attention to src/player.cpp:

    if (has_bionic( bio_leaky ) && one_in(500)) {
        mod_healthy_mod(-50, -200);
    }

As per the definition of this function mod_healthy_mod, avert your eyes to character.cpp

void Character::mod_healthy_mod(int nhealthy_mod, int cap)

This function takes integers nhealthy_mod and cap- it simply adds the first integer nhealthy_mod to the players' health value, and makes sure it does not exceed cap. This has a 1 in 500 chance of occurring (one_in(500) == true) everytime player::process_effects is called.

Creating a player character (broken cyborg), and editing their savefile in order to strip every bionic other than the leaky bionic from them yields expected results: health stays around -190, never really exceeding that number by a large margin.

Having modified the leaky bionic cap by raising it to -130, and then recompiling yields expected results: after less than a day, the health value remains around -123.

The balance issue in question

There are two possible issues, I'm unsure which of the two (or both) you're most concerned about:

The cap is way too low, and the leaky bionic shouldn't drop the players' health below x.
This is fixable by adjusting the cap size for leaky bionic.

The rate is way too high, and while dropping to -200 isn't a bad thing per say, you'd rather have this process take a couple weeks or months, rather than being left at -190 after less than a day.
This is fixable either by modifying the RNG from 1 in 500 to something like 1 in 50000, etc., Or lowering the health modifier from -50 to -5 or something.

Contributor

uqrs commented Mar 24, 2018

I believe you might have been misled- the leaky bionic is certainly at fault.

How the leaky bionic works.

Please direct your attention to src/player.cpp:

    if (has_bionic( bio_leaky ) && one_in(500)) {
        mod_healthy_mod(-50, -200);
    }

As per the definition of this function mod_healthy_mod, avert your eyes to character.cpp

void Character::mod_healthy_mod(int nhealthy_mod, int cap)

This function takes integers nhealthy_mod and cap- it simply adds the first integer nhealthy_mod to the players' health value, and makes sure it does not exceed cap. This has a 1 in 500 chance of occurring (one_in(500) == true) everytime player::process_effects is called.

Creating a player character (broken cyborg), and editing their savefile in order to strip every bionic other than the leaky bionic from them yields expected results: health stays around -190, never really exceeding that number by a large margin.

Having modified the leaky bionic cap by raising it to -130, and then recompiling yields expected results: after less than a day, the health value remains around -123.

The balance issue in question

There are two possible issues, I'm unsure which of the two (or both) you're most concerned about:

The cap is way too low, and the leaky bionic shouldn't drop the players' health below x.
This is fixable by adjusting the cap size for leaky bionic.

The rate is way too high, and while dropping to -200 isn't a bad thing per say, you'd rather have this process take a couple weeks or months, rather than being left at -190 after less than a day.
This is fixable either by modifying the RNG from 1 in 500 to something like 1 in 50000, etc., Or lowering the health modifier from -50 to -5 or something.

@BorkBorkGoesTheCode

This comment has been minimized.

Show comment
Hide comment
@BorkBorkGoesTheCode

BorkBorkGoesTheCode Mar 25, 2018

Contributor

The rate is way too high, and while dropping to -200 isn't a bad thing per say, you'd rather have this process take a couple weeks or months, rather than being left at -190 after less than a day.
This is fixable either by modifying the RNG from 1 in 500 to something like 1 in 50000, etc., Or lowering the health modifier from -50 to -5 or something.

The latter, since early game healing is dependent on sleeping while health stat is average or greater.

Contributor

BorkBorkGoesTheCode commented Mar 25, 2018

The rate is way too high, and while dropping to -200 isn't a bad thing per say, you'd rather have this process take a couple weeks or months, rather than being left at -190 after less than a day.
This is fixable either by modifying the RNG from 1 in 500 to something like 1 in 50000, etc., Or lowering the health modifier from -50 to -5 or something.

The latter, since early game healing is dependent on sleeping while health stat is average or greater.

@mentos046

This comment has been minimized.

Show comment
Hide comment
@mentos046

mentos046 Mar 25, 2018

I see. Thank you for looking into it. Has it always been that way, though? In the past, when I played Broken Cyborgs, healthy_mod had remained at around -200, and it always took a few weeks like that to get healthy to the point that healing no longer occurred, giving plenty of time to find a First-Aid Kit and cutting implement capable of removing it, along with raising skills to the highest possible value for success. It was a slow process to get healthy that low and even slower to get it back up once the Leaky Bionic was removed, so its impact was fairly extensive. The way it works now leaves a character condemned to death by Day 3 at the latest if everything necessary to remove it is not found and back to normal in one day once it is, so it doesn't have any real impact after that period. Needless to say, I preferred it the old way, where you had several weeks to remove it instead of one day, and it took many more to recover from its impact, rather than it not mattering a day after you succeed or leaving you doomed if you don't.

I wouldn't want it adjusted to the point that it no longer drops healthy below healing threshold; I like the idea of it putting you on a time limit to get it out, I would just prefer that it not drop you below that threshold in one day. The 2-3 weeks were thoroughly necessary to optimize odds of success.

That said, this was about 6 months ago. I have since accepted that this is the way it's going to be. Churning out 200+ identical characters on the off-chance that one of them happens upon everything necessary to attempt a removal in one day is significantly less enjoyable than endeavoring to get one person everything necessary because you have the time, but that's how it is.

mentos046 commented Mar 25, 2018

I see. Thank you for looking into it. Has it always been that way, though? In the past, when I played Broken Cyborgs, healthy_mod had remained at around -200, and it always took a few weeks like that to get healthy to the point that healing no longer occurred, giving plenty of time to find a First-Aid Kit and cutting implement capable of removing it, along with raising skills to the highest possible value for success. It was a slow process to get healthy that low and even slower to get it back up once the Leaky Bionic was removed, so its impact was fairly extensive. The way it works now leaves a character condemned to death by Day 3 at the latest if everything necessary to remove it is not found and back to normal in one day once it is, so it doesn't have any real impact after that period. Needless to say, I preferred it the old way, where you had several weeks to remove it instead of one day, and it took many more to recover from its impact, rather than it not mattering a day after you succeed or leaving you doomed if you don't.

I wouldn't want it adjusted to the point that it no longer drops healthy below healing threshold; I like the idea of it putting you on a time limit to get it out, I would just prefer that it not drop you below that threshold in one day. The 2-3 weeks were thoroughly necessary to optimize odds of success.

That said, this was about 6 months ago. I have since accepted that this is the way it's going to be. Churning out 200+ identical characters on the off-chance that one of them happens upon everything necessary to attempt a removal in one day is significantly less enjoyable than endeavoring to get one person everything necessary because you have the time, but that's how it is.

@uqrs

This comment has been minimized.

Show comment
Hide comment
@uqrs

uqrs Mar 25, 2018

Contributor

The latter, since early game healing is dependent on sleeping while health stat is average or greater.

"Average or greater"? What exactly do you mean by this?

Regardless- I'll have a quick look tomorrow and see which nhealthy_mod values would (roughly) correspond to a given timeframe. Keep in mind this will always be relatively random and non-linear- considering an increase is dependent on the 1 in 500 thing.

I think 14 - 21 days sounds relatively fair. Anytime after that the player should be well-equipped enough to deal with the low health stat (not to mention the absolute luxury of having armor bionics!).

Contributor

uqrs commented Mar 25, 2018

The latter, since early game healing is dependent on sleeping while health stat is average or greater.

"Average or greater"? What exactly do you mean by this?

Regardless- I'll have a quick look tomorrow and see which nhealthy_mod values would (roughly) correspond to a given timeframe. Keep in mind this will always be relatively random and non-linear- considering an increase is dependent on the 1 in 500 thing.

I think 14 - 21 days sounds relatively fair. Anytime after that the player should be well-equipped enough to deal with the low health stat (not to mention the absolute luxury of having armor bionics!).

@nexusmrsep nexusmrsep added this to To do in Wound system Sep 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment