[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

    fullwall

    Fixed, redownload.
     
  3. Offline

    ultimak

    Thank you so much for the quick fix!
     
  4. Offline

    TheYeti

    Any chance of making it so that we can exempt specific users or groups either one from gaining hunger/thirst. Nothing worse than being in another window working on a plugin or doing something to the server and come back to find I have wasted away and died. Now the players are greedily harvesting the diamonds that just rained down from the sky out of my dead carcass.
     
  5. Offline

    fullwall

    If you note the permissions - gastronomic.player.hunger - give this permission to enable hunger for the user/group.
    not having this permission will disable your hunger.
     
  6. Offline

    Zothen

    Hello fullwall, I really like your plugin - adds lot to the immersion and I finally could nerf bread and chops! Thx alot!

    A little request: I would love to be able to set the initial hunger for a new logged in player and the hunger level after respawn differently, so newcomers could get a little space to adapt and grap something to eat before starting to starve (which would be a unwanted negative first contact for some).
    Optionally turning off the change of the players hunger level after respawn - to prevent "respawn feeding" - would be awesome, too!

    Thanks, and keep up the good work!
     
  7. Offline

    fullwall

    I will add those features in a bit.
    --- merged: Mar 4, 2011 12:52 PM ---
    Redownload, add new properties.
     
  8. Offline

    TheYeti

    Yes, I got that much out of it. However, I have the * permission so I have all permissions. Now, I know how to use Permissions to remove just gastronomic.player.hunger from myself even with having the global all permission node. But not everyone can figure that out. So having a config option to be able to ignore certain players would be good.
     
  9. Offline

    Thodiral

    Whenever this plugin is enabled and I "safe shut down" by typing stop in the console,
    The server doesn't save the chunks, rather just shuts down the server.
     
  10. Offline

    Zothen

    Wow, fullwall, thanks for those new properties! [diamond]

    Just a little suggestion - I would really recommend to set the plugins default values (those that it has when you download it) to hunger-increment=5. Players that are new to Gastronomics get very soon overwhelmed when they start to get damage from hunger after a bit over 8mins. Seems a bit too drastic as default, imo!

    Oh, and whats about saving the players hunger levels so it wont default after logout-login? Gastronomic.users seem to be already in place for that job.

    thx, and keep up the good work!
    --- merged: Mar 5, 2011 12:12 PM ---

    Ive noticed a problem with eating and protected land. (most recent version) When you are on proteced land without access (e.g. via WorldGuard) you can right-click your food and it wont be consumed, but your hunger level gets lowered by the foods value. (confirmed with WorldGuard, Towny not tested yet)

    I was told that this can lead to a bug where your food level seems to get lowered but somehow you the hunger stays and you start to starve. I couldnt confirm this but I was told that the only way to get rid of such a bugged player is to restart the server. Might have been in a previous version so it has to be confirmed.

    Do you think you can do a fix to deal with the protected land problem? Maybe check if the food is consumed before changeing the hunger-level?
     
  11. Offline

    fullwall

    Hmmm... There's not really a way to check if the food is consumed :S. I doubt it'd lead to a bug, but that could be an issue. I'll think about it.
     
  12. Offline

    Zothen

    Maybe a workaround to check for protected areas or a change in the players inventory?
     
  13. Offline

    htm_Potato

    Bug report for Gastronomic 1.25 and Gastronomic 1.26:

    Server details:
    Code:
    BUKKIT-BUILD 457 JENKINS
    Running plugins:
         Essentials 233
         Gastronomic 1.26
         HeroSneak 1.0.2.29
         OtherBlocks 0.4.1
    
    I've got my java.exe's stdin and stdout redirected to a text box in
    a VB.NET program i made for myself to help automate some
    server behaviour (non intrusive and without hooks, mainly tracking
    currently online players, broadcasting info, a nice GUI with quick
    buttons for me, etc) but i doubt this is an issue.
    Problem:
    Code:
    Gastronomic is not saving user hunger levels upon server restart.
    When I manually add an entry to my Gastronomic.users file,
    [I]the entry gets deleted, leaving the rest of the file alone[/I]
    Example:
    Code:
    1. I create an entry in the gastronomic.users file "circle=31" and on the next line "square=25".
    2. I start the server, join the server with the name circle.
    3. I check my hunger. 31! great.
    4. I issue command /sethunger circle 69
    5. I leave and stop the server
    6. Gastronomic.users file now only consists of "square=25"
    WITH Gastronomic

    .foodstuffs:
    Code:
    #Apple
    260=100
    
    #Mushroom Stew
    282=100
    
    #Bread
    297=100
    
    #Raw Pork
    319=100
    
    #Cooked Pork
    320=100
    
    #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
    .properties
    Code:
    # 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=5
    # 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 (can be negative, capped at 100)
    initial-hunger=0
    
    # What hunger level respawning players return to
    hunger-respawn=0
    
    # Set to true to enable resetting hunger on respawn
    reset-hunger-respawn=true
    
    # Interval between hunger updates. Measured in server ticks. 20 ticks - 1 second.
    interval=2000
    
    # 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=false
    
    # 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=20
    
    # 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 feel a bit peckish.
    
    message-40=§dYour stomach rumbles.
    
    message-60=§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+.
    
    message-health-restore=§dYour health is restored by +healthr+.
    
    End With

    Basically using DEFAULT gastronomic files from the 1.26 link.

    Please help! If I've missed anything out that you need for diagnosis, do tell me. I've tried to make this as comprehensive as possible in terms of debug info anyway.

    edit:
    oh no, bukkit dropped my smiley face :)
     
  14. Offline

    fullwall

    Redownload, finally fixed this persistent bug.
     
  15. Offline

    necavi

    Bug report (hopefully not as unsolvable as the protection issue): If you hold a cake in your hand and point your view to the sky and right click, you will be granted the cake gastro benefits without ever even placing it on the ground.
     
  16. Offline

    fullwall

  17. Offline

    Zothen

    Thanks for the fixes. However Im wondering why you dont update the version number while doing all those nice fixes, fullwall? Im sure nobody would beat you if you change those numbers ;)
     
  18. Offline

    fullwall

    Hahaha, maybe I will.
     
  19. Offline

    Zothen

    Any news for a workaround for protected land, fullwall?
     
  20. Runnin gastro 1.3 , CB 493, and for some reason, when it heals the user, or health is granted, it doesn't display the actual value.. just the variable code.

    Also, when users log out/in, it resets their hunger.
     
  21. Offline

    fullwall

    Try redownloading, stargateanubis. Still no, Zothen :(. I've been extremely busy with other plugins/life.
     
  22. Offline

    Arno00

    I'm using the last version, i tried everything but each time I die, my hunger goes back to 0. So we can reset hunger by suicide :/

    I tried:
    reset-hunger-respawn=true
    hunger-respawn=80

    Then :
    reset-hunger-respawn=false
    hunger-respawn=80

    Neither works, hunger goes back to 0 each time a die :/
     
  23. Offline

    Cehel

    I launched your mod on my server and it works fine for ops, but doesn't worl for non ops, which means all the other players. I would like them to fell the hunger too, do you have any idea of what's wrong?

    Is it from the fact I don't want to use permissions ?
    Thanks for you answer :)
     
  24. Offline

    fullwall

    Yes, its from not using permissions. I will check it out Arno.
    [MERGETIME="1299990603"][/MERGETIME]
    Redownload, should be fixed.
     
  25. Offline

    Cehel

    Ok I'm trying to use permissions but this is quite blur to me. I can't understand how to configure this while I'm usually quite a ease with this kind of stuff.
    I installed permissions, bu non op player still can't use /hunger or feel the hunger.
    I would like to manually copy the text you put in your main post, but I don't know where nor how?
    Any help please, I'm still searching while waiting any answer, thank you.
     
  26. Offline

    fullwall

    Use this permission. gastronomic.player.checkhunger - gives access to the /hunger command.
     
  27. Offline

    DeadLeaves

    For some reason you have to be OP to use the gastronomic water. Or rather, you can drink and everything. But you will stay at 0 thirst because it doesn't updated the thirst for non-OPs
     
  28. Offline

    fullwall

    Do you have gastronomic water permissions?
     
  29. Offline

    enkryptor

    I'm sorry, why this plugin was moved into the "Unsupported Plugins"? It works fine with the latest CB..
     
  30. Offline

    fullwall

    I am actually not sure how/why they did it, this happened to a couple of my active plugins >.>.
     
  31. Offline

    fullwall

    Redownload for the protected land fix (hopefully works). Just checks if they can build in the area, if not, can't gain hunger.
     

Share This Page