[INACTIVE][MECH] Gastronomic v1.3.4 - Adding realism through hunger. [766]

Discussion in 'Inactive/Unsupported Plugins' started by fullwall, Jan 28, 2011.

  1. Offline

    fullwall

    [​IMG]
    The first specialised hunger plugin for Bukkit!
    Now with Thirst - open GastronomicWater Spoiler!

    Download latest release: v1.3.4 (Uses Permissions)
    Older Versions: 1.33, 1.31, 1.3, 1.26, 1.25, 1.2, 1.1, 1.0, 0.1
    Direct link to latest: here

    Ever felt like something was missing from Bukkit? A sense of immersion, of depth? Ever felt like people shouldn't be able to survive for weeks without a single piece of food? Gastronomic provides a reason to kill those pigs, catch that fish, and cook that bread. So gather up your [wheatpicked], [redmushroom] and [meat], and keep reading.

    Features:
    • User-specified hunger intervals, increments, and damage amounts.
    • Per-item hunger restoration amounts.
    • 'Effects' system allowing very customisable health restoration/damage effects.
    • Permissions support.
    Permissions:
    Give gastronomic.admin.* support to trusted players, and gastronomic.player.* permissions to all, or configure permissions manually from the list below.
    Code:
    gastronomic.admin.enable - gives access to the /gastronomic command.
    gastronomic.admin.reload - gives access to the /gastronomic reload command.
    gastronomic.admin.sethunger - gives access to the /sethunger command.
    gastronomic.player.checkhunger - gives access to the /hunger command.
    gastronomic.player.checkfood - gives access to the /food command.
    gastronomic.disablehunger - give this permission to disable hunger for the user/group.
    
    Commands:
    Code:
    /gastronomic - enables and disables plugin.
    /gastronomic reload - reloads all configuration files.
    /hunger - checks your current hunger level.
    /sethunger [player name] [hunger level] - sets player's hunger to the specified amount.
    /food [id] - tells the player how much hunger the id restores.
    /food list - lists how much hunger each food id restores.
    
    Known issues:
    • If configuration files are deleted for any reason, the server may show some scary messages. Don't worry, it should work out fine! If not, report please :).
    • In GastronomicWater, users must left click to empty buckets (bug with bukkit not calling correct events on bucket use)
    Planned Features:
    • Suggest some!
    Changelog:
    v1.3.4 - compatibility, bugfixes.
    Older Versions (open)

    v1.33 - bugfixes, permissions are now opt-out
    v1.31
    • Finally fixed hunger saving (!)
    v1.3
    • Lotsa bugfixes (tm)
    v1.26
    • Incremented version number to reflect amount of bugfixes/new features added to 1.2.
    v1.2
    • Player hunger resets to initial-hunger after death.
    • Added enforce-limit setting to stop hunger going below 0 after death.
    • Added hunger restoration settings.
    • Allowed eating cake.
    • Added /food [id] command to get food hunger restoration value. Add gastronomic.player.checkfood to allow access.
    • Messages are now only sent to the player upon reaching the threshold.
    • Lots of bugfixes.
    • Changed the way players are added/removed on join/quit.
    v1.1
    • Added /gastronomic reload command.
    • Added initial-hunger setting to allow users to start at varying levels of hunger.
    v1.0
    • Added Permissions support.
    • Changed versioning scheme to reflect this.
    • Added support for messages with colour codes, as defined in the properties file.
    • Fixed miscellaneous bugs.
    • Hunger values can go below 100.
    v0.1 - initial release.
    Mechanics (open)

    Each player is given a hunger value, starting at 0. Every so often, at a user-specified interval, every user's hunger level goes up by a specified increment. This goes on until their hunger level reaches 100, and they begin to starve. At every following interval, damage will be taken until food is eaten, restoring hunger levels back to 0.
    Credits (open)

    • Firstly to this thread for inspiring the creation of Gastronomic. Thanks to Bashur and the other posters in that thread!
    • Secondly to TimberJaw, whose Hey0 mod (here) served as ideas for some of my plugin's functionality.
    GastronomicWater (open)
    Please note - this is not updated for 766 yet.
    Download link: 1.11, 1.0

    GastronomicWater has exactly the same features as Gastronomic, but with a separated config file.
    Commands are:
    /drink [id]
    /drinks
    /gastronomicwater (reload)
    /thirst
    /setthirst [player name] [thirst]
    gastronomic.admin.enable - gives access to the /gastronomicwater command.
    gastronomic.admin.reload - gives access to the /gastronomic reload command.
    gastronomic.admin.setthirst - gives access to the /setthirst command.
    gastronomic.player.checkthirst - gives access to the /thirst command.
    gastronomic.player.checkdrink - gives access to the /drink command.
    gastronomic.disablethirst - give this permission to disable hunger for the user/group.

    As this is an early release (and my first actual plugin), please report any bugs or issues, and also features you'd like to be added - I'm always open to suggestions! Also taking suggestions for my next plugin.
     
  2. Offline

    axebyte

    want to try this , but since permission is not included yet, does this mean everyone on server can just turn it off and ignore it anyhow?
     
  3. Offline

    Riot

    Good point. I am assuming so because it is then a global command.
     
  4. Offline

    fullwall

    Unfortunately, yes. I could upload a version with that feature disabled until I add permissions. But as it's late here it will have to wait until morning. Don't worry though, permissions support is now top priority, and I'm sure it won't take long to fix the issues I've been having (think I just spotted the error). New release should be up tomorrow.
     
  5. Offline

    Riot

    Take your time. I believe you should implement this with the Calendar plugin (It's under Plugin Submissions) and every day increases by 3 (three meals a day?). Eating three items causes hunger to decrease by 3. After one week, the player takes damager.
     
  6. Offline

    axebyte

    actually i like the system this seems to be modeled after, you had a 0-100 setting, the number slowly added to it, at different stages you got a notice. 40 your peekish, 60 your hunger, 80 yo eat something,100 you are starving then you started taking damage.
    I used this as more of a economic simuless actually having to need food. took a while but i had finally gotten the timing right to about 3 1/2 meals a day (depending on the type of food since each food took away a different number of hunger points) but then Hmod had a sudden heart attack and died.

    The rate of hunger increase was changable, and the food vaule to combat the hunger was changable, this looks like it and i personally hope it stays that way, easy to use and mod.
     
  7. Offline

    fullwall

    Yes, that's exactly how my plugin works. At the moment, there are no messages at set intervals, but I can add them in easily. Should they be user-configurable?
     
  8. Offline

    Sol

    You sir, are my goddamn hero. I have been petitioning FOREVER on the MC forums for this to happen, and in doing so created a rift in time and space that surfaced every troll and his flame dog to the thread... 10,000 trolls later and I finally gave up the crusade. Now, I wait no longer.

    *DOWNLOADS*


    Also, fullwall... yes please. If you make the messages configurable that would be super awesome.

    ~Sol
     
  9. Offline

    axebyte

    always nice so long as its simple to do, configurable+easy always makes a good plugin. Not everyone is a coder or works with these types of things all the time.
     
  10. Offline

    fullwall

    OK, working on that when I have the chance (computer's in use). Should be up by tonight... Right now thinking of six configurable messages sent to a player, at 20,40,60,80 and 100 hunger level, and also the message you get when you eat something.

    To Sol: glad I helped someone :). Always worthwhile.
     
  11. Offline

    axebyte

    20- You feel a bit snacky.
    40- You feel hungry.
    60-Your stomach rumbles.
    80-Your stomach aches with hunger.
    100-You are starving.

    eating: You feel a less hungry.
    Your stomach feels a bit more full.
    heh or just allow them to be configable so people can put what ever they like in there.
     
  12. Offline

    fullwall

    I am :p. I meant I was thinking of implementing the messages in that way - every 20 or so hunger levels. Of course, the user would be able to just leave some messages blank if they wanted to :).

    EDIT: Next release done with Permissions support and messages. Now all I need is a tester... Also trying to get colour codes in with messages :)
     
  13. Offline

    axebyte

    drop me a DL ill test it
     
  14. Offline

    fullwall

    Hmm... Can you join my server on Hamachi? Just so I can test extra stuff :). If so, tell me your Minecraft username so I can add your permissions.
     
  15. Offline

    axebyte

    same as here axebyte. give ip and ill jump on
     
  16. Offline

    fullwall

    EDIT: Blanking this post.
     
  17. Offline

    Euphoriant

    I really like this plugin! I do have a few suggestions, though.

    I personally think it would be nice to be able to set the default hunger level below 0, this way you could 'get stuffed' and be able to work for longer without having to eat. I think it would also be neat if you maybe took a slight damage penalty for 'over eating' and pushing your hunger below 0.

    Also, customizable interval messages would be swell :)
     
  18. Offline

    fullwall

    Updated to 1.0! I'm not sure about how the specifics of over-eating damage would work. Would anyone else like to see it implemented?

    EDIT: Updated to 1.1! Check changelog in the original post for details.
     
  19. Offline

    axebyte

    not sure if i did something in the settings or not, but hunger =0 and doesnt move

    found the issue it was on my side. seems to work nicely. :D
    --- merged: Jan 29, 2011 8:09 PM ---
    oh one last requestion..
    I have it set to add 1 hunger every 40 or so odd secounds (so they have eat something within an hour of play time)

    Is there any way to kill the repeating message every 40 secounds? so you only see your hunger level when you hit a new mark like 20 to 40. or when you type/hunger its a but spammy.

    oh and cake dont remove any hunger points. (even when your hurt)

    also death does not reset hunger, so a starving person who dies, keeps dieing until they eat. any chance on death the hunger could reset - 0
     
  20. Offline

    Euphoriant

    Woo hoo, updated!

    Now on to the bugs :)

    It seems as though I can set my min. hunger below zero now, but I cant eat enough to take my hunger below zero. I also noticed that cake doesn't fill your belly at all. You can also set any block to food, and as long as you're not placing the block down you can right click with it in hand and eat it infinitely. I found that out by trying to eat individual mushrooms (which used to be an edible item) but it did not work. Mushroom soup works fine.

    [edit]: If right clicking with a block in hand eats it, could you make it so it removes the item from your inventory if it isnt a normally edible item? You could also add health variables to the food so you can configure how much health you gain or lose for what food you eat.

    For instance, when mushrooms were individually edible, brown ones would give you health and red ones would hurt you.
     
  21. Offline

    fullwall

    Thanks for bug reports! I was already aware of the cake issue... I can set mushrooms to be edible if you want. Next release will reset hunger on death and stop the message spam. Unsure about health variables... maybe just for mushrooms? About the block=food issue, the best fix is just to not set it as food :p

    EDIT: 1.2 released! I will update 1.2 with the block=food fix when I clarify some things with item use events.
     
  22. Offline

    Shay Williams

    [​IMG]

    Happens every time it's suppose to update hunger.
     
  23. Offline

    fullwall

    Thanks for reporting. I'll fix when I can... until then, can you use 1.1?

    EDIT: Fix'd. Should work now - did on mine. Just redownload from the same link. In other news, I figured out the issue on blocks=food. I'm going to update 1.2 so that if you add a block id as food, and use it as such, the block stack will go down by one. Also adding optional health to all items. Just add ':' and a health number afterwards, and you can edit how much health each item restores. Just be warned, on normal food, make sure to take into account the base health add as well, as there is currently no way to stop that.

    EDIT2: Well that went quick. Aforementioned feature added. Just redownload if you haven't.
     
  24. Offline

    diegokilla

    is anyone else having trouble with 1.2? i cant even get it to load, however, 1.1 seems to work just fine
    bukkit=186...ish lol
     
  25. Offline

    fullwall

    Hmmm... Looks like an error alright XD. I'll fix soon.

    EDIT: Sorry for all the trouble with 1.2 everyone, I'm having some trouble with actually testing releases. Most major errors should be fixed now. The error mentioned above is fixed now, just redownload. Caused by not initialising my HashMap correctly :p.
    EDIT2: Fiddly maps initialisation code >.>
     
  26. Offline

    Gabriel C P S

    when ppl logs out and in again the hunger level resets to 0, is that suposed to be this way?

    it should happens just in death case.

    besides that, works fine. tks for it.
     
  27. Offline

    fullwall

    I had noticed that bug before, but was stumped as to the cause. Your post helped me to realise the edge case that caused it (My save function was called after a function that removes you if you're not online). Redownload for the fix. Thanks!
    --- merged: Feb 2, 2011 12:59 PM ---
    Thread has over 1000 views :D How many of you got/have thoughts about the plugin?
     
  28. Offline

    Juze

    Really nice. Good job over there.
     
  29. Offline

    axebyte

    okay seems the repeating message is gone, but now it doesnt warn you at all, at the 20 40 60 80 mark nothing.
    Also when you eat when reaching 100, you seem to still take damage . even after getting back to 0 hunger you continue to take damage.

    Just an update
     
  30. Offline

    fullwall

    Well, when I test on my server, I get the messages fine? Eating also stops damage. Strange... Could you post your .users file? Also, try redownloading 1.2 if you haven't
     

Share This Page