Diet (Fabric/Forge/Quilt)

Diet (Fabric/Forge/Quilt)

7M Downloads

Suggestion: Add config option for adding titles to dietary effects

Foozey opened this issue ยท 9 comments

commented

For example, you might have a dietary effect called "Malnourished", which decreases your health, armor, and armor toughness. Should be a nice, fairly simple addition.

commented

Just wanted to bump this.

Showing which nutritional groups are causing which effects makes it easier for players to understand how the mod works, and it makes it easier for players to use the system actively. Also useful as most modpacks will probably create their own unique dietary effect configs, meaning players can't really memorize the various conditions for a given effect (across modpacks) and will probably have to read a wiki of some sorts.

commented

Hmm, okay, so I think I might try to go with something like this:

Dietary Effects
Malnourished
- Low Proteins
Sugar Rush
- High Sugars

-2 Health
-2 Armor
+4 Movement Speed
commented

Note that things like titles and description shouldn't be directly denoted in the config files, so more likely that it will end up with something like:

[[effects]]
  name = "sugar_rush"

And then in a resource pack with a language json:

"diet.effects.sugar_rush.title": "Sugar Rush",
"diet.effects.sugar_rush.description": "High Sugars"
commented

Yeah that sounds good. I think that if it's possible to split the attributes in the tooltip, it's probably ideal though, since that would allow the player to see what specific "Dietary Effect" is causing what attribute changes. But then again, if it's a status effect opposed to attribute changes, then you wouldn't be able to tell for those anyway by default right? Unless it's possible to change how that works as well?

commented

Hmm, I'll think about it. I'm not sure if it's ultimately a good idea, but I'll have to workshop it first.

commented

It's actually a little trickier than it seems, because attributes get merged together in the tooltip. Implementing this feature would require separating them based on title and then merging the leftovers. Also, would the title be there in place of the attributes or would it just precede the ones that it provides?

It'd help if you could provide a basic mockup or description of how the tooltip would look with this addition so that I can try to envision it.

commented

So with the attribute/status effect groups you make in the diet-effects.toml, I suggest that there should also be an option to add a title/group name to the entry. [[effects.title]] maybe? Anyway, once a title is defined and the conditions are met in-game giving the player the effects, the Dietary Effects tooltip would read something like:

Dietary Effects (white as usual)
Malnourished (red or green, depending on if its a negative or positive effect, yellow if both, colours of this information could be defined in the config entry the user makes regardless)

-2 Health (both of these are just the normal default tooltip, so essentially below the dietary effects and title of the group, it just displays the standard tooltip in blue)
-2 Armor

If it's a situation where conditions are met from multiple groups, I think it would be best if the titles were listed, so it would read:

Dietary Effects
Malnourished
Sugar Rush

-2 Health
-2 Armor
+4 Movement Speed

Hopefully this helps, let me know if you have any questions about it.

commented

If you think it would be better, another option would be to display it like this:

Dietary Effects

Malnourished
-2 Health
-2 Armor

Sugar Rush
+4 Movement Speed

As you mentioned though, attributes get merged together in the tooltip, so I think something like this might be tricky for you to accomplish.

commented

Expanding on this, you could possibly put the cause of the effect in parenthesis next to the title, [[effects.description]] maybe? For example:

Malnourished (Low Proteins)
Sugar Rush (High Sugars)