Hunger thoughts

Home Forums MeseCraft Discussion Suggestions Hunger thoughts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3990
    gd2shoe
    Participant
    • Member

    I just had my first death from hunger in a long time.  It snuck up on me, and I noticed some oddities.

    First, hunger damage causes armor damage.  My beat-up steal armor died before I did, which was weird.  I have no idea how hard this would be to fix.

    Second, the player is notified in chat that their stomach wants different food, but there’s no warning whatsoever that you’re seconds away from starving to death.  This seems inconsistent.  Not having a notification does increase the difficultly somewhat, but I could see new players being completely confused, frustrated that they cannot figure out what’s attacking them.

    #3991
    gd2shoe
    Participant
    • Member

    Not a thorough analysis by any stretch of the imagination, but I have a working hypothesis about the armor bit.

    It looks like 3d armor checks the reason for the HP change before deciding how to intervene.  If reason.type is “drown” or reason.hunger exists, then it skips the rest of the callback.

    hbhunger, on the other hand, calls player:set_hp without passing a reason.  It’s not mandatory for the minetest engine, but if it doesn’t give a reason, then other mods (like 3d armor) can’t react appropriately.

    #3992
    komodo
    Participant
    • Active Member

    I agree that this can be improved. I’m just not familiar with the mechanisms. I didn’t know that 3d_armor reacted to those calls. I didn’t even know how those calls worked. I think we should pass the reason and correct this.

    Also, I think a stomach growling sound effect would be perfect for an in-game contextual message to notify a player about this. If we want to consider that some people are deaf, perhaps a console message or hud icon (playereffects api) would be helpful too.

    If you have any suggestions, they’re welcome!

    #3995
    gd2shoe
    Participant
    • Member

    Eww.  There might actually be a fair bit of work related to this.  It looks to me like most damage dealt by mods don’t register a reason.  I’m confronting this indirectly at the moment with bees.  For the time being, bees are also going to damage armor. ☹️

    There should probably be an ‘ignore_armor’ field recognized by 3d armor.  Getting 3d armor to recognize it will be trivial, but finding all the many places where damage is dealt and adding appropriate flags may be a real bear.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.