Skip to content

Limit max oxygen tolerance#6796

Open
Patryk26g wants to merge 14 commits intomasterfrom
oxygen-tolerance-limiting
Open

Limit max oxygen tolerance#6796
Patryk26g wants to merge 14 commits intomasterfrom
oxygen-tolerance-limiting

Conversation

@Patryk26g
Copy link
Copy Markdown
Contributor

@Patryk26g Patryk26g commented Mar 11, 2026

Brief Description of What This PR Does

This PR:

  • limits max value of oxygen tolerance to 10%,
  • allows for bigger values when loaded from an older save or different microbe
  • changes calculation of optimal UV and Oxygen starting value as previously, when starting multicellular freebuild, the microbe had unnecessarily big tolerance values when organelles added positive effects

Draft for now as I need to playtest it more

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.

@facemizer
Copy link
Copy Markdown

Would this limit the slider on the tolerance panel to 8%, or am I misreading the explanation.

@Patryk26g
Copy link
Copy Markdown
Contributor Author

It would limit the movable slider, but not the max display value, this one stays at 100% max

@hhyyrylainen hhyyrylainen added this to the Release 1.1.0 milestone Mar 12, 2026
@Patryk26g
Copy link
Copy Markdown
Contributor Author

It seems that since auto-evo is still run, the begging conditions when player's cell tolerances are calculated are changed (the one read in OxygenResistance = GetAmbientCompound(Compound.Oxygen, CompoundAmountType.Biome)). So oxygen level might decrease, hence the *0.8 multiplication

@Patryk26g Patryk26g marked this pull request as ready for review March 12, 2026 16:44
@hhyyrylainen
Copy link
Copy Markdown
Member

Shouldn't it be slightly increased instead? Because couldn't auto-evo theoretically cause the world to also get more oxygen thus requiring more protection. I'd like to much more avoid the situation where the player's initial tolerance is not good enough for their environment.

}
else
{
// auto-evo is run and oxygen levels might decrease a bit so make sure the tolerance is high enough
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment still says the opposite (decrease instead of increase), but other than that the code changes now look good.

Copy link
Copy Markdown
Member

@hhyyrylainen hhyyrylainen left a comment

Choose a reason for hiding this comment

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

To me it does not look good that the upper bar is not updated to match with the range of the lower bar, I think both sections should have the same max range as otherwise it looks silly like this:

Image

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

Labels

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants