Skip to content

Some minor tweaks to improve experience#35

Open
MarioSMB wants to merge 3 commits into
txnimc:masterfrom
MarioSMB:tweaks
Open

Some minor tweaks to improve experience#35
MarioSMB wants to merge 3 commits into
txnimc:masterfrom
MarioSMB:tweaks

Conversation

@MarioSMB

Copy link
Copy Markdown

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

@ALE199 ALE199 left a comment

Copy link
Copy Markdown

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
Copy Markdown

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

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 ?

Copy link
Copy Markdown

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
Copy Markdown
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!


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;

Copy link
Copy Markdown

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
Copy Markdown
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