Make pressure tolerance sliders logarithmic#6913
Make pressure tolerance sliders logarithmic#6913RyuDanuer wants to merge 3 commits intoRevolutionary-Games:masterfrom
Conversation
|
If I get this correctly, it is purely on the visualisation, correct? (apart from the created bug with the perfect adaptation) I see you made the Flexibility slider logarithmic also, but I actually don't see the need in doing that. In fact, it creates some confusing behaviour with the MP costs not being linear as you move the slider. |
Good point. The original idea about the logarithmic slider was that it wouldn't apply to the tolerance range slider as well. Sorry if this wasn't communicated clearly in the issue description. |
|
I think there's a balance/design argument for having the flexibility slider apply logarithmically based on the current minimum pressure. Because there's just a greater difference in pressure between patches at greater depth, so the same amount of flexibility does much less (as I think this PR's UI does demonstrate clearly). But that would be a mechanical change, not a UI change. |
|
Adjusted in 6d23643. I kept the minimum pressure slider logarithmic, restored the pressure tolerance/flexibility slider to linear values, and made the minimum pressure step a bit coarser so keyboard/controller input is less painful. Tested on my machine with |
|
The keyboroard speed is now better but I have 2 comments:
|
|
I'll hold off on looking at the code in this PR until the gameplay testing is done. |
|
Tested this on my pc in the microbe editor tolerances tab. The pressure slider opens and adjusts correctly in-game. Tbh I didn't change the high-pressure perfect adaptation / percentage flexibility part here, as that seems like a separate mechanics/design change from what this PR originally touched. Updated screenshots from the gameplay check without the tutorial overlay: |
Regardless, it's possible in current master to get the perfect adaptation bonus for pressure tolerance, even at high pressure. So if this PR breaks that, it would need to be fixed within the same PR. I will agree with you that changing the flexibility system to something percentage based instead of a fixed number goes beyond the required scope of what is supposed to be just a UI change. |
you need to reduce flexibility to minimum. ypu can check on master hownit works like. you'll see green text for perfect adaptation |




Brief Description of What This PR Does
This makes the pressure minimum and pressure range controls use logarithmic slider positions while still storing the real pressure values in pascals. The surface pressure range was squeezed into a tiny part of the old linear slider, so this should make those values way less annoying to adjust tbh.
I also made the pressure range display use the same log scale, so the slider grabber and the displayed range stay visually lined up.
I tested this on my machine with:
dotnet run --project Scripts -- check files rewrite --include src/microbe_stage/editor/TolerancesEditorSubComponent.cs --include src/microbe_stage/editor/ToleranceRangeDisplay.cs --include src/microbe_stage/editor/TolerancesEditorSubComponent.tscn --no-rebuilddotnet run --project Scripts -- check inspectcode --include src/microbe_stage/editor/TolerancesEditorSubComponent.cs --include src/microbe_stage/editor/ToleranceRangeDisplay.cs --no-rebuilddotnet build Thrive.sln --no-restoredotnet test test\code_tests\ThriveTest.csproj --no-buildRelated Issues
Closes #5963
Progress Checklist
Note: before starting this checklist the PR should be marked as non-draft.
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)
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.