Skip to content

Sulfide damage rework#6802

Open
Patryk26g wants to merge 5 commits intomasterfrom
sulfide-damage-rework
Open

Sulfide damage rework#6802
Patryk26g wants to merge 5 commits intomasterfrom
sulfide-damage-rework

Conversation

@Patryk26g
Copy link
Contributor

@Patryk26g Patryk26g commented Mar 13, 2026

Brief Description of What This PR Does

Rework the hydrogen sulfide damage. Now the sulfide metabolizing organelles give only some protection, so if there is not enough of them and the cell's sulfide threshold is reached, the cell takes damage.

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    break existing features:
    https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
    (this is important as to not waste the time of Thrive team
    members reviewing this PR)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    styleguide.

Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.

@Patryk26g Patryk26g marked this pull request as ready for review March 13, 2026 18:22
@Patryk26g
Copy link
Contributor Author

Okay, testing it I need to make sure, so that after leaving the editor and the compounds are filled up, h2s is filled only to the tolerable amount. Also probably will do the same for the infinite compounds cheat

@hhyyrylainen hhyyrylainen added this to the Release 1.1.0 milestone Mar 16, 2026
}
}

public void UpdateHydrogenSulfideBarBar(float sulfide, float warningThreshold)
Copy link
Member

Choose a reason for hiding this comment

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

Typo in the method name?

var hydrogenSulfideProtection = Constants.HYDROGEN_SULFIDE_DEFAULT_PROTECTION;
if (version <= 1)
{
reader.ReadBool();
Copy link
Member

Choose a reason for hiding this comment

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

If the read bool is true shouldn't it give at least one hydrogen sulfide worth of protection? Otherwise older saves from hydrogen sulfide users are going to get extremely screwed over by not being able to eat anything before the next editor cycle.

In fact I'd even wager that the value should be maxed out if the bool is true to support continuing old saves.

// If motionless inside a hydrogen sulfide cloud, move away
if (!organelles.HydrogenSulfideProtection
&& compounds.GetCompoundAmount(Compound.Hydrogensulfide) > Constants.HYDROGEN_SULFIDE_DAMAGE_THESHOLD)
if (compounds.GetCompoundAmount(Compound.Hydrogensulfide) > organelles.HydrogenSulfideProtection)
Copy link
Member

Choose a reason for hiding this comment

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

The protection not being a fraction is a bit weird to me, because shouldn't a cell that is like just a nucleus + 5 sulfide parts + 1 vacuole be able to fill its stomach and not take damage?

Copy link
Contributor

Choose a reason for hiding this comment

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

I have to agree that creating an incentive to deliberately limit your storage capacity in order to avoid damage is not great.

I can imagine this would be quite the overhaul of the H2S damage system itself, but:

Maybe instead of the current stored amount, trigger the damage if the H2S is "coming in" at above a certain rate, with that threshold depending on what your chemosynthesis capacity is?

Copy link
Member

Choose a reason for hiding this comment

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

I think a rate based approach will be quite hard to do.

What I would personally suggest is calculating the total amount of hydrogen sulfide parts and their fraction and then pick whichever provides higher tolerance limit. Like the fraction could be multiplied by 3 or so, meaning that if you are made up of more than 33% hydrogen sulfide parts, you always get full immunity no matter how small in total you are.

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

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants