[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

    hungererror2.png getting this now.

    Updated and cleared out all complete replace. The messages do seem to work sometimes, but occasionally they skip a notice amount. user file was empty as i completely readded but this is the one i got now.
    #Thu Feb 03 10:20:10 MST 2011
    someuser=13
    dummyuser=0
    somesonename=50
    someonename=1
    that with 9-15 players this morning. so not sure why there is not more in there.
     
  3. Offline

    bunjeee

    After dying of starvation, my hunger resets to 0 but I still get damage even after eating, though my hunger is 3 after typing /hunger
     
  4. Offline

    axebyte

    Yup still happening here as well/
     
  5. Offline

    fullwall

    Fixed the death bug, redownload. Ordering of functions issue. About the hunger sometimes not saving, I included a fix that may or may not work.
     
  6. Offline

    Swizzlestix

    Is there any way to reduce the rate at which hunger accumulates? I worry players would start to get annoyed if they have to eat too frequently.
     
  7. Offline

    axebyte

    in the gastronomic.props

    the way i have it set up every 45 secs it goes up one, so they would reach 100 and starve after 1.3 hours. so they need to eat roughly once an hour.

    If you set increment=1 and interval=180 . 1 hunger point would be added every 3 minutes. soo really slow.

    you can change it up as much as you like and fine tune it until all is well.

    am testing the new update out ill get back to you. great plugin hope it gets squared away soon.

    Test results from my server...
    logging out again clears hunger lvl.
    getting the same error as above i posted.
    some people are getting tons of messages,some getting no notice, (every 45 secs my add hunger duration)
    when you get 100 hunger, and eat the hunger level returns to 0 but you still continue to take damage.
    I am using craftbukkit version. 232
     
  8. Offline

    diegokilla

    i am getting this error as well,
    also @ fullwall, is it possible to set food healthgiving values to a negative number ie:
    set RAW pork to -3, thus actually hurting the user 1.5 hearts?

    also my users get this message when they type /hunger : "Type /hunger to display hunger"
    but typing .hunger actually displays their hunger lvl
     
  9. Offline

    Swizzlestix

    Thanks for the swift reply, kinda feel dumb for not checking up the sublinks sooner.

    One other thing that's come up, is that for some (most) of my players, the warning messages do not appear. This includes myself, though the other players (incidentally who *do* see the warning messages) claim they're getting messages stating they're "full" when they craft pickaxes and such. I don't see the messages in the config, nor have I seen them ingame, but either way, at least half the players are not getting the hunger warnings, and still getting damaged when the interval reaches 100. What do I do?
     
  10. Offline

    fullwall

    Sorry for all the errors, I will have to try fixing them later, as I'm going out for a few hours. Yes, you can set health values to negative numbers. That is very unusual about crafting pickaxes! My plugin doesn't check for that at all :S. Also, the .hunger issue also is weird. I only check for /hunger... Hopefully I can sort all these issues out very soon.
    --- merged: Feb 5, 2011 2:31 PM ---
    OK, try redownloading, fixed a few bugs.
     
  11. Offline

    diegokilla

    quick question, are you only editing the .jar file? is that the only one i need to extract from the zip?
     
  12. Offline

    fugue2005

    tried /food 260 all i get back is
    "couldn't find the food type from the id specified"

    i have also tried /food apple and /food Apple no luck
     
  13. Offline

    Heinz Harald

    Hey fullwall,

    thx for your fix. Great Plugin, i love it!

    Issue:
    If i edit the interval in Gastronomic.properties on running server and reload it with /gastronomic reload it wouldn`t change.
    hunger-increment works but after /gastronomic reload i'll get all messages twice. After that i can`t disable the plugin by console. It seem`s theres another session of gastronomic running.

    Another question:
    Could you make it possible to edit all messages by .properties. Status Messages "You hunger ist now 0" too? Iam working on a localized version.
     
  14. Offline

    fullwall

    The issue is probably from my scheduled tasks not shutting down correctly. If you want, I'll add more customisable messages. Just wary of making the properties file too big.
     
  15. Offline

    axebyte

    The last fix seemed to fix the continous damage after reaching 100, so that seems correct now. (so far although with MC.net being up and down again i dont have many testing with me)

    Still having message issues on the warning marks 20 40 60 80 not seeing them at all again.
     
  16. Offline

    diegokilla

    ya some of my users are also still having occasional hunger message not appearing issues,

    also i've found a pretty major bug, had a user rage quit because he lost 16 diamond :p o well
    anyways, i've tested it and comfirmed that when a player dies from hunger, none of his items pop out like normal, they just vanish :(

    (so sad i had to disable hunger for the time being, but i dont want any more users rage quitting... or do i?? lol)
     
  17. Offline

    fullwall

    His items don't pop out? I was wondering whether Bukkit had fixed that :S. I'll fix that soon. Stupid messages :p. Finding it hard to get a reliable method of storing their current message status, which is the cause of the issues unfortunately.
    --- merged: Feb 6, 2011 4:29 AM ---
    Redownload, just fixed item dropping bug :). Test if you feel unsure. I *really* need a better testing mechanism, my computers are on the fritz when it comes to Minecraft >.>
    --- merged: Feb 6, 2011 5:52 AM ---
    Added more message settings and a few optional things to display in messages (+hunger+ and +name+). Ask if you want others configurable.
     
  18. Offline

    axebyte

    hungererroraa.png
    the :tempName is : 0 just keeps repeating.
    /hunger command causes this issue easy to see what it is the + :D
     
  19. Offline

    fullwall

    TempName was for debugging :p. Forgot that + is a regex expression... fixed. Redownload please :).
     
  20. Offline

    diegokilla

    it was a bukkit bug?? 'doh! dont i feel like a jerk now! anyways, testing will have to wait till tommorrow morning, thanks for the speedy fix :D
     
  21. Offline

    fullwall

    Well, before my plugin would just set health to 0, and hope that Bukkit would drop the items :p. But, Bukkit doesn't for some reason... it's either a bug with Bukkit or minecraft itself (not calling entity_death or something). Anyway, Hey0 had the same issue. Thanks for the support!
     
  22. Offline

    Heinz Harald

    thx for fixing! Change of interval works now. Thx for more editable messages too.
    But there is a new issue. If i change the message 20-100 they would`nt displayed ingame.
     
  23. Offline

    fullwall

    What do you mean, don't show up? Could you post what you changed them to, and what happens instead of them showing up?
     
  24. Offline

    Heinz Harald

    Look here.

    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=20
    
    #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=0
    
    #Interval between hunger updates. Measured in seconds.
    interval=240
    
    #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-20=§dDu hast Lust etwas zu essen.
    
    message-40=§dDein Magen knurrt.
    
    message-60=§dDu wirst richtig hungrig.
    
    message-80=§cDein Magen zieht sich vor Hunger zusammen.
    
    message-100=§cDu verhungerst! Iss etwas, egal was!
    
    message-eat=§dMahlzeit! Nun fuehlst du dich besser. Dein Hunger ist nun bei +hunger+.
    
    message-stuffed=§dDu fuehlts dich vollgestopft, jetzt bekommst du keinen bissen mehr runter.
    
    message-no-permission=§4Du hast nicht die noetigen Rechte an diesem Befehl.
    
    message-check-hunger=§dDein derzeitiger Hunger liegt bei +hunger+.
    
    #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
    
     
  25. Offline

    fullwall

    Hmmm... I'm unable to test right now, but it should work. One thing that might be an issue (or not) is that I see you uploaded a file with the extension .properties.txt. Have you tried with the file extension .properties (with no .txt)? Might just be you renaming it for something else, but you should be able to edit .properties files anyway directly with notepad etc. Only issue I can think of without testing.
     
  26. Offline

    Heinz Harald

    I`ve renamend the file just for uploading. In my plugin order the file extension is .properties (without .txt)
     
  27. Offline

    axebyte

    New update on my server testing this.
    The hunger damage continuing after eating seems corrected :D
    The error that was caused byt the + is gone :D
    The messages still seem to be random and dont fire off on the 20 40 60 80 marks. :(
    -they do show up but randomly working at times and other times not at all
    -Have not tested the death from hunger dropping items as of yet.

    Just a note i am increasing hunger by 1 every 45 secounds. Maybe your not seeing the odd message behavior i am if your running at the default 20 every x amount of time.

    other then mentioned it seems to be working fine.
    Thanks for the all time you spend on this plugin, but its a huge help for economy when it comes to food based items.
     
  28. Offline

    fullwall

    Thanks for the support guys, and I will be doing some tests, especially for Heinz' properties file. Axebyte: do the messages show up if its just you on the server?
     
  29. Offline

    cyberbobjr

    Excellent idea ! i will try it :)
     
  30. Offline

    axebyte

    I dont think i ever had just me on the server.. so i cant really help there. (but they seem to show up for me everytime the amount of time passes to add to hunger)
    Its mostly the players that randonly do and dont get the messages.

    And the users.prop only seems to ever list 1-3 people when there is 10+ on.
     
  31. Offline

    fullwall

    It only saves them in the props when they leave...
     

Share This Page