[MECH] Hungry v0.3.1 - Yet another hunger plugin [1060]

Discussion in 'Inactive/Unsupported Plugins' started by tr4656, Jun 14, 2011.

  1. Offline

    tr4656

    [​IMG]

    Hungry
    Authors: jonathanyc and tr4656
    Version: v0.3.1

    Hungry adds immersion to Minecraft! There is a reason to actually eat food in order to survive making it more realistic - so gather your food and actually eat so you won’t go hungry.

    Highlights:
    • There is actually a need to eat food (like real life)
    • Custom Language support
    Resources:
    Download Plugin
    Contribute at Bitbucket!
    Github Mirror

    Instructions, Permissions and FAQ:
    Our wiki is hosted at Bitbucket, and is available here.
    Quick Links
    To-do list and Known Bugs:
    See our Bitbucket issues page.

    Changelog:
    v0.3.1
    • Fixed eating events not registering when right-clicking on air.
    Credits:
    • Thanks to Fullwall, for his Gastronomic plugin (off which many parts of this plugin were based!)
    • Thanks to chernobyl360, for maintaining Gastronomic after Fullwall stopped (until he got hacked)
     
  2. Offline

    oglop

    donwnload link please :) (404)
     
  3. Offline

    Kingdomkey01

  4. Offline

    Chosen

    and I have this error ;/
     
  5. Offline

    Joshu012887

    How would I edit this, so people only eat 3x a day? Because my server is based off realism, so we have 24hr days and this hunger mod makes us eat every hour :p
     
  6. Offline

    Schlumpf

    Just edit this in your config:
    Code:
    "checkInterval": 60, // The length of time between when Hungry increments player hungers, sends notification messages, and does starvation damage
          "incrementAmount": 1, // The amount of hunger to add to each player every checkInterval
    1 day = 24 hours = 1440 min = 86400 sec.
    Just set the checkinterval to the time you want to check and with a bit math you can set it togheter with the Amount per Interval. For example 3 times 86400/3 and then you have to look, how you can go on to get 100% in 28800 seconds.
    --> 28800/100 = 288. So you can set the Interval to 288 and the amount to 1 and every 28800 seconds you got 100% hunger. (I hope this is true I did this in about 1 min, you must test it, if the values are correct.)
    But if you set it so as in the example, you eat 3 times in 24 hours what isn't really realistic, because you eat 3 times in about 12 hours and when it's night you eat maybe 1 time more, but usually you eat nothing when it's night. You cant make it 100% realistic but this is a good way ...
     
  7. Offline

    Ranzear

    Figured it out. I was damned right this plugin was defaulting it's own settings every restart, but I needed to pay attention to the plugin in the server log, and only the server log, and only once per restoration of my Hungry config, and only when I was doing /hungryreload in the server console directly after setting my config read-only so it'd throw the error more than once to find out why.

    I was missing one freakin' comma in the config I was just rewriting to add slabs to the ignored blocks to prevent Showcase being exploited for infinite food. Upon startup or /hungryreload the plugin would totally ignore the config, then on the subsequent shutdown would default the settings exactly as I reported previously. Thankfully I learned from the previous infuriation with Hungry's config handling to keep my own backup.

    (╯‵Д′)╯彡┻━┻ when I figured it out, naturally.

    Anyway, I found this in my log upon doing a /hungryreload with my recently tweaked, and read-only'd because it had reset twice on me already, config:

    Code:
    2011-08-25 03:52:25 [INFO] [Hungry] Loading configuration...
    2011-08-25 03:52:25 [INFO] [Hungry] Loading configuration file...
    2011-08-25 03:52:25 [SEVERE] [Hungry] Configuration file corrupt or invalid!
    2011-08-25 03:52:25 [SEVERE] [Hungry] Moving old configuration file to config.json.bak...
    2011-08-25 03:52:25 [SEVERE] [Hungry] 'Loading' a new, default configuration file...
    2011-08-25 03:52:25 [INFO] [Hungry] Loading configuration file...
    2011-08-25 03:52:25 [INFO] [Hungry] Succesfully loaded configuration file!
    2011-08-25 03:52:25 [INFO] [Hungry] Hungry succesfully reloaded!
    Now here's the problems:
    1. There are messages in the config for there being an unsuccessful /hungryreload, but it is never thrown if the command is executed in-game or at least isn't thrown when the config is invalid or corrupt. According to that last line everything is peachy-dandy and this is what is relayed if used in-game.
    2. The config.json.bak backup is a lie.
    3. It generates the default config into memory, and then that default config saves over the completely un-backed-up config.json on shutdown or /reload all.
    Previously I must have just eventually produced a valid .json syntax with my changes and additions (likely when I stopped trying to add extra warning messages) for the plugin to not reset the config in this manner. I thought I was going crazy or the config was defaulting on startup when the plugin was just totally ignoring my changes and then saving over them (and I was too busy configuring other things to not notice). I wasn't seeing the error on that first startup because it was sitting above about 500-700 lines of ModDamage config/debug output I was working on as well (and far beyond the scrollback of command prompt before I started needing to open server.log to see the top of the ModDamage output again when rewriting the whole thing for the new version) and then it naturally didn't occur on subsequent restarts or reloads because of the now defaulted config.

    As an aside, this is why I shall now forever detest .json files. I get saved so often when Bukkit and YAML will throw you nice detailed 'you dicked up your syntax here' message.

    tl;dr: Miss one comma in your config and Hungry rather silently defaults it.
     
  8. Offline

    Thaorn

    It would be great if you make a GUI, a sort of hungry bar with spout !!

    Good job !
     
  9. Offline

    Spycoclown

    Hi could some body help me? i dont know what is wrong?

    [​IMG]
     
  10. Offline

    Celtic Minstrel

    I'm guessing JSON probably does the same, but the Hungry team is overzealous in catching the exception and suppressing it.

    @tr4656 & @jonathanyc – if you're reading this, please add an e.printStackTrace() (or at least log e.getMessage()) to your exception handlers in all cases where the exception represents an actual error. Don't just silently suppress an error message that would give useful information.
     
  11. Offline

    jonathanyc

    Hello there! Sorry for my absence.
    Again, thanks for everyone who has been helping with users of this plugin. ;) @Schlumpf and others

    @Ranzear Blaming the entire JSON format based off of our implementation is kind of silly. If you want a pissing match, I'll retort that the a format that depends on spaces for grouping seems rather dumb to me, but I live with it. ;)

    @Celtic Minstrel (hoping Xenforo recognizes your name even with the space in-between) A lot of Hungry was coded in a bit of a rush - however, rest assured we know what the best practice is. ;) As you can see, though in some places we were a bit "overzealous" in catching exceptions, in other places we evidently didn't catch enough (@Spycoclown - by the way, could you please post your config.json for Poison?)

    I'll try to put in a fix, but I'm busy with my server, another project (that will hopefully give me much-needed additional cash) and a very busy school schedule.

    Thanks for understanding!

    EDIT: Evidently Xenforo didn't recognize Spycoclown, so here goes:

    @Spycoclown could you please post the contents of your Poison.jar's config.json? Thanks!
     
  12. Offline

    Schlumpf

    Hmm,
    I don't understand the new Bukkit System ... When I go to getplugins and I type in hungry I can't find this Plugin, Just in the search for all. And thats for much more Plugins so. They deleted some Plugins from the Plugin List or what is the new system about?!
     
  13. Offline

    Spycoclown



    nothing because i dont find, any information about the not healing of food
     
  14. Offline

    jonathanyc

    Yeah, I'm really not sure what they're doing. Just know that you'll always be able to find us at BitBucket and at icebrg.us. ;)
    If you didn't specify any configuration for Poison's config.json, then why did you put Poison.json in the effects/ directory?
     
  15. Offline

    Celtic Minstrel

    They were just a little trigger-happy and made Get Plugins point to the new dev.bukkit.org rather than to the forums somewhat sooner than they should have.
     
  16. Offline

    Schlumpf

    Hmm, ok. And what exactly is the new DevBukkit? I read the Post, but I don't understand it right -.-
    Is this also a Server you can download and install or what is this project exactly?!
    And to the Plugins, must I always look now to the forum to find them?

    Hmm and how is it when the Plugin says: "We are now using BukkitDev." - What means this?
    Is Bukkit Dev just for a better Plugin support and the Server is still the same?
    Can I use then this Plugin still on my CraftBukkit or how does it work? I really don't understand it -.-
     
  17. Offline

    Spycoclown

    i would like to do it but i cant find any information about the config...

    Can you give an example of what goes under

    "poisonousFoods": {
    "PORK", 0.75
    }

    but how can i put more, maybe you could post your config plz...

    and i would like to use IPs not names, because i habe 10 Food Item more then the normal mc...

    but how do i put more?
     
  18. Offline

    Celtic Minstrel

    It's a place for hosting Bukkit projects and information about them. Plugins on BukkitDev have the option of having their own forum, a ticket tracker (BukkitDev or external), a code repository (BukkitDev or external), a wiki, and a number of other things. So it's a place you could go to download, yes, but it's a lot more than just that.
     
  19. Offline

    Spycoclown

    Could somebody help me? plz
     
  20. Offline

    jonathanyc

    You mean IDs? They're not supported at the moment.

    Also, the comma should be a ":".

    And an announcement to all, Hungry will not be moving to BukkitDev in the near future because I refuse to reason with idiots like the guy who refused my approval, stating that I needed a "feature list."

    Gee, there's a plugin called Hungry, I wonder what it does?
     
  21. Offline

    Celtic Minstrel

    "Hungry" doesn't really say just what the plugin does; it gives a vague idea only. Did you try simply reformatting the opening post from here on the forum?
     
  22. Offline

    Spycoclown

    yes now it works, but how do i get the healing away? i dont want that foods heals...

    where do i put the healing part?

    "healingFoods": {
    "APPLE": 0
    }
    in the poison or where?
     
  23. Blank install with CB1060 and i get this:

    Anybody an idea whats going on?
     
  24. Offline

    Spycoclown

    they dont ansewr because this plugin is dead...
     
  25. Offline

    Lextao

    Hey! Nice plugin you've got there! I got a suggestion:
    When people are starving, they cannot jump or swim or use tools.
    Also, this should be configurable!
    Thanks!
     
  26. Offline

    Pentalive

    Are you upgrading for 1.8.x? I love to play on peaceful - but the new hunger bar does not empty on peaceful. (I think it did but today I found it had stopped). I would like a reason to be growing all this stuff and hunting all these animals..
     
  27. Offline

    jonathanyc

    Heh, that's an interesting idea. ;) I didn't think of that - with the release of 1.8, I no longer expected this plugin to have any use.

    I think the plugin should still work on 1.8, but I'm not sure. If someone could take up the plugin (you can fork our Bitbucket repository) that'd be great, as the server I wrote this for no longer needs it :<

    Thanks for all the support guys, and the innumerable feature suggestions ;)
     
  28. Offline

    Pentalive


    Yes please, Even if you have to just decrement the food bar at a constant rate (not based on what the player is doing)

    "Hey are we on Peaceful? Consume .5 food" every 5 seconds.... or something.
     
  29. Offline

    jonathanyc

    Yep, I'll look into it. ;) Thanks for the suggestion!
     
  30. Offline

    Pentalive

    Thank You :)

    Rewards for success! [diamond][cake][cookedmeat]
     
  31. Offline

    jonathanyc

    Hey, sorry for the late reply.
    Been busy with lots of stuff - anyways, in response to your question, I don't think it's possible for us to manually set hunger. Apparently we can only set the "hunger buffer," which still won't have any effect if you're in peaceful (I think) :(

    I'll keep looking some more.
     

Share This Page