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

Some minor tweaks to improve experience #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MarioSMB
Copy link

Adds some minor tweaks to improve the gameplay experience a little:

  • Hunger bars will only turn red when there is 20% remaining (hardcoded) on the food item rather than when the food can be eaten again
    Red usually indicates that something is running out, it was causing visual misinformation with a higher eat again percentage
  • Set respawnGracePeriod below 0 for an infinite grace period, allowing one to sprint indefinitely even without food, fixes Unable to sprint after a while #14
    This should arguably be a separate option to permanently allow sprinting, but -1 usually means infinite so it should be alright!
  • Max health is rounded to the nearest full heart, fixes [Suggestion] Scale to full hearts #17

Copy link

@ALE199 ALE199 left a comment

Choose a reason for hiding this comment

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

looks like great changes

@TheInvisibleMage
Copy link

Desperately want that respawnGracePeriod change; hoping this gets in soon!

@@ -88,7 +88,7 @@ private static void renderFoodSlot(#if PRE_CURRENT_MC_1_19_2 PoseStack #elif POS
int startWidth = width - (size * offset) - offset + 1;
float ticksLeftPercent = Float.min(1.0F, (float) food.ticksLeft / foodConfig.getTime());
int barHeight = Integer.max(1, (int)((size + 2f) * ticksLeftPercent));
int barColor = ticksLeftPercent < SOLValheim.Config.common.eatAgainPercentage ?
int barColor = ticksLeftPercent < 0.2 ?

Choose a reason for hiding this comment

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

Suggestion: Rather than hard-coding, you should consider making this a configurable value.

Copy link
Author

Choose a reason for hiding this comment

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

You're probably right, but on the other hand - there's a lot of hardcoded values here that should be config options, so I figured I'd leave it to whoever's making the config actually work to fix them!

@@ -99,6 +99,8 @@ private void onTick(CallbackInfo info) {
}

float maxhp = Math.min(40, (SOLValheim.Config.common.startingHealth * 2) + sol_valheim$food_data.getTotalFoodNutrition());
// hack: round to full hearts
maxhp = Math.round(maxhp / 2) * 2;

Choose a reason for hiding this comment

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

Suggestion: I'd recommend adding a config value to enable/disable this line.

Copy link
Author

Choose a reason for hiding this comment

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

Not sure if a bug should be given a configuration option... for the record someone merged this in and is looking to get a more up to date version accepted at #42, they'd probably be the ones to ask for config updates as they got it working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Suggestion] Scale to full hearts Unable to sprint after a while
3 participants