[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

    BioRage

    There is no other way, other than setting own permission on admins.

    If you just have '*' it null's everything else, and you come invincible.

    ps.

    *poke poke* when you have time, please look at my request :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 7, 2016
  3. Offline

    fullwall

    Just do '-gastronomic.disablehunger'.

    @skillnazn - redownload 1.11 of GastronomicWater for a fix.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 7, 2016
  4. Offline

    MatCat

    Ok I have had nothing but weird issues with this plugin from the first time I ever tried it. I finally got the timing down, but it never ever keeps track of hunger properly. I am including my config file for reference below. First off I set my hunger to say -9999 so I don't get spammed with I am hungry stuff, however after A server restart, a relog, or whatever it will be sometimes positive, or a weird off negative. For example a few hours ago I set it to -9999, Server restarted a few times, but gracefully every time. Based on the config you will see it should take approx 2.15 hours at the death negative of -150 and the intervals to go from -150 to 100, however I just looked and I am -8. Within maybe a 4 to 6 hour window I went from -9999 to -8, that just doesn't add up. At the same token players have told me they have never gone positive, while others struggle to keep it from getting to critical no matter what they do, while yet others eat food and it makes either no difference, or puts them in negative when it should not.
    Code:
    #Gastronomic Settings File
    #Author: Fullwall
    
    #Whether the plugin is activated. true/false
    active=true
    
    #How much each user's hunger goes up by every interval. (Any number, but hunger is capped at 100)
    hunger-increment=1
    
    #How much a user is damaged if they're starving (1-20)(1 = half a heart).
    starve-damage=1
    
    #What hunger level new players start at, and what you return to after death. (can be negative, capped at 100)
    initial-hunger=-150
    
    #Interval between hunger updates. Measured in seconds. <-- Nothing about ticks BTW
    interval=1500
    
    #If true, hunger cannot go below 0 after eating - use to stop people 'stocking up' on hunger.
    enforce-limit=true
    
    #Messages are configured here and are sent at the indicated hunger level.
    #For best results, don't put any spaces after the equals sign and before the text, and don't use any quotation marks.
    #Color codes are at the bottom.
    
    #OPTIONAL: Add these to your messages to display something.
    #+hunger+ - display hunger.
    #+name+ - display player name.
    
    message-40=�dYou feel a bit peckish.
    
    message-50=�dYour stomach rumbles.
    
    message-65=�dYou're getting hungry.
    
    message-80=�cYour stomach aches from hunger.
    
    message-100=�4You are starving! Eat something, anything!
    
    message-eat=�dYou feel better after eating. Your hunger is now +hunger+.
    message-stuffed=�dYou feel stuffed, like you couldn't eat another bite.
    
    message-no-permission=�4You don't have permission to use that command.
    
    message-check-hunger=�dYour current hunger is +hunger+.
    
     
  5. Offline

    fullwall

    Uhhh... I don't think you have 1.33, judging by your properties file. There are a whole bunch of properties that have been added since then, and your file is missing them. Also, I just checked the 1.33 ZIP, and it says 'ticks' not 'seconds'. So, please try redownloading 1.33 again, and then see if the issues get resolved.
     
  6. Offline

    MatCat

    Well it was not on my server for a while, actually since 1.3 beta came out... I just re-added it 2 days ago when I saw 1.33 version out. It is 1.33. Though the original config was still there... I will pull the config from the jar and redo it...
     
  7. Offline

    Celtic Minstrel

    Since when are properties files a good indication of version?
     
  8. Offline

    fullwall

    Well, missing properties can cause issues.
     
  9. Offline

    Celtic Minstrel

    They shouldn't. If they do, I'd say that's a bug in your program.
     
  10. Offline

    Nytemare3701

    @fullwall, Can you provide support for toggling off natural healing from food? Adding -Heal equal to the original heal kills the player when used at low life, and glitches regularly.
     
  11. Offline

    fullwall

    Well, there's no 'healed player' event as of yet, so unfortunately we have to stick with this method for now. @celticminstrel - not bugs, but it might cause unexplainable behaviour that is configurable by the new properties.
     
  12. Offline

    Nytemare3701

    On food use:
    cancel food, get health, get food value from config, add config value to old health. delete food item.
     
  13. Offline

    Ardor

    Is there anyway to make this plug-in compatible with GhostBuster ? The hunger does not register as a death in GB, and no deathban is issued.
     
  14. Offline

    Nytemare3701

    On that note, it also doesn't register on tombstone, but that's the same problem.
     
  15. Offline

    BioRage

    @fullwall

    Over time elapses, on my server, user's eat food and their hunger goes down, any suggestions?

    Also, most common error's =]

    2011-04-13 12:18:41 [SEVERE] Nag author: 'fullwall' of 'Gastronomic' about the following: onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)
     
  16. Offline

    Tealk

    hay its possible to make /afk stop the hunger
    eg. essentials have this command
     
  17. Offline

    MatCat

    Yeah I have tried using this plugin off and on for 2 months, and it has never ever worked properly. I have yet to have anyone get to the point of 100 hunger, most people regularly are -300 health when I have it set to -150 on death and join, right clicking on chests, furnaces, dispensers, crafting tables sometimes give you health but does not consume food items (when holding food).
     
  18. Offline

    fullwall

    Sigh... I'm considering discontinuing this plugin. Isn't very well coded (as it was my first) and I can't see the bugs others are getting... if you want to fix it up while I'm away, go ahead, but obviously I can't till I get back.
     
  19. Offline

    Nytemare3701

    Bug: Improper logouts don't detect the player leaving. Probably not gastronomic's fault.

    @fullwall Don't stop! I love this plugin! If you want help, I have minimal experience with plugin development, but I've dreamed of combining this+biglife for a health system overhaul mod. The guy writing biglife says his plugin will never be compatible with anything that edits health values, so it's a dead end. WE CAN DO IT FULLWALL!
     
  20. Offline

    Shanev

    Don't stop on this amazing plugin! It's one of the essential plugins I'm using on my server and expect one error message in the log it works perfectly!
     
  21. Offline

    Clavius

    Hey there,

    We are experiencing a similar bug to that of MatCat's, but only with some of the usables. When you have some food in your hand and right click any usable block that doesn't display something on screen (for example: note block, door, switch, button) the food stays (like it's supposed to) but the hunger gets decreased. Everything else works like a charm (furnace, chest, workbench, dispenser - these have a 'popup window').

    Aside from the above, all works great. We have found your plugin the best choice for increasing the economic weight of foods on our anarchy server. Thank's for your work, and keep it up!
     
  22. Offline

    BioRage

    @fullwall

    It is your first plugin, but it is also one of your best,

    There is no need for you to discontinue, it is by far one of the most popular plugins out there.


    You could also re-code it right?
     
  23. Offline

    Celtic Minstrel

    @fullwall - If you want to discontinue it, that's your choice, of course. But, if you're just worried about it being badly coded, there's also the option of completely scrapping what you have and rewriting it from scratch.
     
  24. Offline

    BioRage

    @fullwall

    Another Idea
    [My first request]
    Having food have different values, ie cooked pork, and raw pork.

    [My New Request]
    Eating food should have a time consumption toggle able, and you can't not be moving or being attacked...?
     
  25. Offline

    gsgrego

    /food list is showing a item named 9001???
     
  26. Offline

    crazyjoe567

    It says on the server console that it may be out of date. If so when will It be updated
     
  27. Offline

    LostSoulFly

    Don't give up on this plugin, fullwall! It does indeed have some issues, but as Celtic Minstrel said, rewrite it with your newfound knowledge. Many devs do this from one version to another.

    I haven't playtested my server with this on it more than an hour or two, but it seems to work fine. At the very least it keeps my players killing things -- instead of running from them.
     
  28. Offline

    kleril

    I am also going to encourage you to continue with this plugin, fullwall. This plugin may become obsolete once the mojang team implements hunger in their own way, but until then (and even after then) keep up the fantastic work!
     
  29. Offline

    Atticusmas

    not really working on build 677 i do not belive. the hunger is always 0 even when u set it.
     
  30. Offline

    Shanev

    It works for me, maybe you should check your permissions?
     
  31. Offline

    MatCat

    I agree, do not discontinue, I really want this plugin to work and so do my members :).
     

Share This Page