[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. Here it is.

    Show Spoiler

    #Apple
    260=100

    #Mushroom Stew
    282=100

    #Bread
    297=100

    #Raw Pork
    319=10:1.5

    #Cooked Pork
    320=25:-4

    #Golden Apple
    322=100

    #Raw Fish
    349=100

    #Cooked Fish
    350=100

    #Cake - each time you eat a piece on the ground you will restore this amount of hunger, so be careful!
    354=100
     
  3. Offline

    TheMap

    Having some issues with this right now. Just re downloaded newest version placed the .jar and the folder in my plugins directory. Now I am admin on the server and the only one going hungry. Everyone else don't get hungry.
     
  4. Offline

    enkryptor

    Since some plugins doesn't support "non-standard" death, is it possible to implement an option not to kill player from hunger? For instance, if health is being decreased for 1 heart per interval, last 1 heart shouldn't be removed from player.
     
  5. Offline

    Ayrron

    How about making the hunger-time-intervals user configurable? I.E. People can choose WHEN the messages post...
     
  6. They are user configurable. :)
     
  7. Offline

    Acru

    You could make it so that if Permissions isn't available, the admin.* ones only work if player.isOp()?
    (It is a member function of Player objects.)
     
  8. Offline

    fullwall

    Yes, I have done that on some of my other plugins. I will add an option to stop death from hunger. The hunger-time-intervals could be user configurable I guess... I don't know about that though. @ Lunarius Haberdash = put a ':' then your health value after the hunger value eg. 100=100:5 would restore 100 hunger and 5 health.
     
  9. Offline

    rslink

    So now that we have beds could a sleep requirement be made?
     
  10. Offline

    fullwall

    Bukkit's still missing bed hooks.
     
  11. That's uhm... What I did, exactly, in fact. It's tracking hunger, but everything acts on the default values (Full Hunger Restoration, Basic Heal)
     
  12. Offline

    fullwall

    What do you mean?
     
  13. Offline

    darkcammo

    Great plugin by the way. Looks very good. I'm testing it out a bit. Every so often I get a random "Your health has been restored by +healthr+" even when I haven't eaten anything... very odd...

    any ideas?
     
  14. Offline

    enkryptor

    Can you post your config here?
     
  15. Offline

    fullwall

    Yeah, sounds like you've still got health restoring on.
     
  16. Offline

    neonx

    I have no idea why, but for me, the hunger stops working after a few hours. (totally random)
    Anyone experiencing the same?
    The plugin was perfect before the 1.3, but now i have this issue.
    I tried many latest builds from 432+.
    Any idea?
     
  17. Offline

    fullwall

    It could be the timing mechanism? The issue would have been present before 1.3 though. Hmmmm...
     
  18. Offline

    darkcammo

    Yarr... here it bee


    Show Spoiler
    #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=20
    # How much a user is damaged if they're starving (1-20)(1 = half a heart).
    starve-damage=4
    # What hunger level new players start at, and what you return to after death. (can be negative, capped at 100)
    initial-hunger=0
    # Interval between hunger updates. Measured in seconds.
    interval=300
    # If true, hunger cannot go below 0 after eating - use to stop people 'stocking up' on hunger.
    enforce-limit=true
    #If true, player will restore health as defined in the variables below.
    restore-health=true
    # If restore-health amount is on, when player hunger is below health-restore-limit,
    # player will regain this amount of hearts (1-20, 1 is worth half a heart)
    health-restore-amount=1
    # Hunger Limit for health restoration - when player hunger reaches this limit and restore-health is on,
    # the player will stop regaining health.
    health-restore-limit=60
    # 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.
    # +health+ - displays your health.
    # +healthr+ - displays health-restore-amount.
    message-20=§dYou start to daydream about pork.
    message-40=§dYour stomach rumbles.
    message-60=§dYou're getting hungry.
    message-80=§cYour stomach aches from hunger.
    message-100=§4You are starving! MUST EAT!
    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+.
    message-health-restore=§dYour health is restored by +healthr+.
    # Color Codes are as follows; put them into your message!
    # §0 = Black
    # §1 = Navy
    # §2 = Dark Green
    # §3 = Cyan
    # §4 = Red
    # §5 = Purple
    # §6 = Gold
    # §7 = Light Gray
    # §8 = Dark Gray
    # §9 = Dark Purple / Light Blue
    # §a = Light Green
    # §b = Light Cyan
    # §c = Light Red/Orange
    # §d = Light Purple
    # §e = Yellow
    # §f = White
     
  19. Offline

    fullwall

    Set restore-health to false.
     
  20. Offline

    darkcammo

    could it really be.... that simple.....?

    I thought that setting made it so that if you eat something, and are starving, you wont be healed instead just hunger will be lowered. Perhaps I'm confused
     
  21. Offline

    fullwall

    No. It restores health when full hunger every so often when enabled.
     
  22. Offline

    darkcammo

    OH I see. Thank you good sir, thank you :)
     
  23. Offline

    neonx

    I hope you can fix it soon :p
    This is the main plugin on my server ^^
    Any idea maybe how to restart it without restarting the whole server (until it get fixed) ?
    I tried: /plugin reload, /gastronomic on-off, (disable-enable), doesnt help.
     
  24. Offline

    fullwall

    /gastronomic reload?
     
  25. Offline

    neonx

    I just tried /reload on the server console, but it didnt work,so i just restarted the server.
    So +1 command what is not re-start the hunger.

    I will try "/gastronomic reload" next time, if the hunger stops again.

    Just another thing :p

    I dont know that its a bug or its normal that the warning message always show up every 20% whatever the increment is, but if its normal.. then i would like to make a suggestion here:

    Wouldnt be better if you change the hunger-increment to 10% then the warning message shows up every 10%? etc...
    Thanks! :)

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

    enkryptor

    THAT was my feature request, but it's not possible at present, unfortunately.
     
  27. Offline

    darkcammo

    Ah I see, that makes sense. Would be a nice feature though :)

    Ah also curious, this plugin will not actually kill you from hunger. Correct? It only takes me down to 1 heart.

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

    fullwall

    Yes it will. I haven't stopped that yet. Changing the increment would be more trouble than it's worth >.>. That feature request is due to bukkit - isn't it not updating negative health restoration values properly or something?
     
  29. Offline

    darkcammo

    Well I have my server set to take 3 hearts of damage way at every health check if someone is starving. It takes to 7, then 4, then 1 heart and I stay at 1 heart forever essentially....
     
  30. Offline

    fullwall

    Hmmmm... that's strange :S. Do you notice any other glitches when this happens?
     
  31. Offline

    darkcammo

    Nope none what so ever :| pretty odd. Should I try setting it to an even increment? Or something divisible into ten rather. Perhaps it can't hit me for 3 hearts so it doesnt..... I don't know lol...
     

Share This Page