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

[CR] Add a way for the raw satiety value to be obtained given player skills/traits/bionics #44562

Closed
wants to merge 7 commits into from
Closed

Conversation

gkarfakis19
Copy link
Contributor

@gkarfakis19 gkarfakis19 commented Oct 2, 2020

Summary

SUMMARY: Interface "Add a way for the raw satiety value to be obtained given player skills/traits/bionics"

Purpose of change

As discussed on #44490, we need to consider whether the raw satiety value (of the new Satiety row on the (E)at menu)
should be given to the player, and when this should happen. For now, it is a simple check allows players with:

  1. The bio_digestion bionic
  2. The self-aware trait
  3. Cooking skill above 6

to see the raw satiety values of food.

I would like to hear the community's ideas on whether these checks are sufficient or should be made stricter.

Describe the solution

Heavily refactored satiety_bar to improve maintainability by including vague/raw number checks onto it. This allows for satiety bar to be used in other menus (#44565). This also has an interesting side effect:
image

We now have colored satiety numbers.

Describe alternatives you've considered

Never showing the raw food satiety value

Testing

Additional context

Should we have colored satiety numbers?

Satiety bar cannot stay at output.cpp as there is no way I could see to get the player class on there. get_player_character() doesnt work and passing it by reference onto the function creates a very weird "incompete type" error.
Tests don't refer to the player_character. We either have to create an overloaded function (which I did) or use a optional argument with many if statements, which is hacky.
src/game_inventory.cpp Outdated Show resolved Hide resolved
…perly aligning colorized numeric values

This might need to be reverted, it is quite clunky but works.
@gkarfakis19 gkarfakis19 marked this pull request as ready for review October 3, 2020 16:55
@gkarfakis19
Copy link
Contributor Author

I need your help now. What do you think, should the raw satiety_bar values ever be displayed to the player? If that's the case, when should that happen? Is bio_digestion and selfaware enough, or should there be stricter checks? This PR was made to get ideas from the community on this.

Why does the compiler keep whining..
@MichaelMacha
Copy link
Contributor

It occurs to me that this is the kind of thing people have an imprecise feel for, even if they don't know why. I don't see any harm in having colors for it, but I think the feeling of being "full" could be implemented in an imprecise way for people below the qualifiers for seeing the exact satiety values.
That said, there might be less precise ways of accounting for it that still followed the system in place for the satiety color gradient. Rather than having "picked veggy (fresh) 200" lower-skill players might see "pickled veggy (fresh) scant"; and "meat sandwich 1353" could be "meat sandwich heavy".
In fact, the color coding could even provide additional information, like how much of the "mood" for the food the player is in. As an example, if we have an emaciated character, their dietary needs are going to be very different from an overfull one.

Copy link
Member

@kevingranade kevingranade left a comment

Choose a reason for hiding this comment

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

I'm not convinced this should ever be displayed.
The CBM makes no sense as it's giving you feedback on food you're looking at.
I'm 100% against extending the self aware trait further.

Something related to cooking skill comes the closest to making sense, but it would still be an estimate, not a raw number.

This is fundamentally not something people IRL ever know with any degree of precision.

@wapcaplet
Copy link
Contributor

Something related to cooking skill comes the closest to making sense, but it would still be an estimate, not a raw number.
This is fundamentally not something people IRL ever know with any degree of precision.

@kevingranade I had insisted on a numeric display of #44490 after reading your comment on 44374:

Bars can be supported, but we must also have a numeric display so screen readers can read them, and I'm not clear on how bars are an improvement for anyone.

I agree it's not something people know with any numerical precision (especially being an arbitrary dimensionless value), but people do have some sense of how rich or energy-dense a food is, which I think the graphical bars represent well. But I also want to ensure accessibility if possible. What would you suggest as an alternative?

@gkarfakis19
Copy link
Contributor Author

If you think bio_digestion doesn't make sense, as long as it doesn't bloat things too much, I'd be happy to create a cooking-related bionic (like a food analyzer) that assists with cooking and also displays these numbers to the player.

@kevingranade
Copy link
Member

I had insisted on a numeric display

Numeric is needed for accessibility, but it needs to be fuzzed the same way the bar is by only displaying certain thresholds. In other words my problem with this isn't that it's numeric, it's just the precision that's a problem.

As for a CBM to do this, is there a market for that? Is there anyone going, "man I really need to calculate exactly how much food I can fit in my stomach"? This is a solution in search of a problem.

@gkarfakis19
Copy link
Contributor Author

gkarfakis19 commented Oct 4, 2020

What if instead of numeric, we used a short string description for screen readers?
“Not filling at all” - “ Slightly filling” - .... - “Highly filling” etc?
In regards to high cooking skill, I have no clue how a numeric estimate of an arbitrary dimensionless quality could ever be more informative than the very granular bar system. It’s either the raw value, which, as you rightly said, doesn’t really tell you much unless you have inspected the source code and can only be used for comparisons between similar food items, or the bar system.

@kevingranade
Copy link
Member

have no clue how a numeric estimate of an arbitrary dimensionless quality could ever be more informative than the very granular bar system.

It's not about being more informative, the problem is screen readers can't handle the bars, they get rendered as, "pipe, pipe, pipe, pipe, slash, dot, dot" or something.

@gkarfakis19
Copy link
Contributor Author

Oh, I misunderstood your earlier comment. Looking back, I really don’t think the number should ever be accessible to the player. I will probably edit this PR to just contain the refactor of satiety bar, unless someone has a better idea.

@gkarfakis19
Copy link
Contributor Author

gkarfakis19 commented Oct 4, 2020

Looking back at this again, it seems that the refactor itself is also meaningless. Unless someone has a better idea, this PR will soon be closed.

@lcy03406
Copy link
Contributor

lcy03406 commented Oct 5, 2020

I hope we can fix the popcorn glitch, and "Calorie Density" becomes a meaningful measure.
"Calorie Density" can be in numeric, as cal and kg are already in numeric.

@DoctorVanGogh
Copy link
Contributor

it needs to be fuzzed the same way the bar is by only displaying certain thresholds. In other words my problem with this isn't that it's numeric, it's just the precision that's a problem.

I understand the design intent behind this but that is an exceptionally marked difference to other types of items where the player is drowned in pure, absolute, precise numeric information. Every single gun and every single gizmo on any gun will give pages of highly precise numeric information. Add this attachment, use 3.4 more fractional action points per shot, have 4.7 less recoil and do that much more or less damage.

But we can't have that type of information for food...


What about just giving 'fractional' numeric values? (Those which are used to give 0-5 bars). Players with a high cooking (and/or first aid) skill know enough about nutrition that foo not just gives |||.. units of satiety but 3.3, while bar might also give |||.. but "only" 3.1 units of satiety.
Don't show the raw calories / effective volume but the derived scaled "satiety units"?

@kevingranade
Copy link
Member

I understand the design intent behind this but that is an exceptionally marked difference to other types of items where the player is drowned in pure, absolute, precise numeric information.

Yea, I'm not happy about that, all this stuff should be approximate.

@gkarfakis19 gkarfakis19 closed this Oct 7, 2020
@anothersimulacrum anothersimulacrum added [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. labels Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants