[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

    TheMap

    Anyone having issues with cake? Im using 1.25 , permissions 2.0 , groupmanager with the latest CB recommended. Cake doesn't seem to work with hunger. It heals but doesn't give food points.
     
  3. Offline

    fullwall

    Are you using 364 to configure hunger value?
     
  4. Offline

    Gun_Asylem

    i am trying to get this to work with permissions but its not working.. can you show me where and how to put in just the /hunger command? ive tried several ideas but my head hurts and i havnt slept. so ill sleep and hope someone can help me.

    permissions looks like this...

    Code:
    groups:
        Default:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: false
            inheritance:
            permissions:
        Moderator:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
                - Default
            permissions:
        Admins:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'
    
     
  5. Offline

    neonx

    Code:
    groups:
        Default:
            default: true
            info:
                prefix:
                suffix:
                build: true
            inheritance:
            permissions:
                - 'gastronomic.player.checkhunger'
                - 'gastronomic.player.checkfood'
                - 'gastronomic.player.hunger'
    etc....
    --- merged: Mar 1, 2011 5:07 PM ---
    Thanks! I get names now instead of ids^^
    ...but its coming with an error too :/

    + That would be nice if when i use the command "/food list", then each food would use only 1 line in the chat window :p (Or maybe its just for me because im using No UI Resize thing...)
    Screenshot attached.
     

    Attached Files:

  6. Offline

    TheMap

    Yes this is what I have.

    Code:
    #Apple
    260=10
    
    #Mushroom Stew
    282=50
    
    #Bread
    297=20
    
    #Raw Pork
    319=10
    
    #Cooked Pork
    320=30
    
    #Golden Apple
    322=100
    
    #Raw Fish
    349=10
    
    #Cooked Fish
    350=20
    
    #Cake - each time you eat a piece on the ground you will restore this amount of hunger, so be careful!
    354=50
     
  7. Offline

    fullwall

    You're using 354 instead of 364 for cake. I'll fix the null pointer exception tonight.
    --- merged: Mar 1, 2011 11:34 PM ---
    Fixed the ID.
     
  8. Offline

    ultimak

    Is it possible to only make 1 group that if affected by hunger, or does it have to affect everyone on the server?
     
  9. Offline

    gazius

    You can using permissions according to the first post.

    gastronomic.player.hunger - give this permission to enable hunger for the user/group.

    Would it be possible to have drinking water able to also restore a bit of hunger? I'd like to make it possible so that if you're really desperate you could restore 1 hunger point per water and perhaps a bit more with milk.
     
  10. Offline

    ultimak

    OH I get it, gosh im just not thinking right. I was looking for a command associated with that permission. Thanks for the reply gazius. Now to go set this up for my server!
     
  11. Offline

    fullwall

    Sure, I may implement greater talking between the two. Gotta go out for a few hours though...
     
  12. Offline

    crazyball

    Could you make a config file to translate all messages in others languages ?
     
  13. Offline

    fullwall

    Which other messages do you want available for translation?
     
  14. Offline

    Wulfspider

    I am getting an error only received with this plugin installed:

    Code:
    12:23:18 [INFO] CONSOLE: Stopping the server..
    12:23:18 [INFO] Stopping server
    12:23:18 [SEVERE] java.lang.NullPointerException
    12:23:18 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftScheduler.cance
    lTasks(CraftScheduler.java:208)
    12:23:18 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.disablePlugin(S
    implePluginManager.java:200)
    12:23:18 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.disablePlugins(
    SimplePluginManager.java:193)
    12:23:18 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.disablePlugins(Cra
    ftServer.java:72)
    12:23:18 [SEVERE]       at net.minecraft.server.MinecraftServer.g(MinecraftServe
    r.java:227)
    12:23:18 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:302)
    12:23:18 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:366)
    >Press any key to continue . . .
    I was using CB 440, but not I am using 490. Both receive the errors though. I am using the default configs and jar straight from the latest 1.26 zip.
     
  15. Offline

    Fanus

    Guys,
    If I see this again I WILL kill myself!!!!
    "You don't have permission to use that command."

    Can someone PLEASE send me the exact Permissions and Gastronomic plugin that allows user Link to check hunger but not set it.

    I am new to Permissions and Gastronomic but I tried everything earlier posts suggest.

    WHY OH WHY CANT I USE /hunger INGAME?!?!?!?!?!

    I'm quite tired so I might have made a simple mistake but its been three days I've been trying to make this work.

    Thanks,
    Fanus
     
  16. Offline

    Shabador

    Add this to the permissions of the default user:

    - gastronomic.player.*
     
  17. Offline

    Colraw

    Seems the timer is broken, I have it set as interval=12 and increment=1 but seems to be something around interval=1 (each time I check my hunger it have increased)...

    Awsome plugin otherwise :)

    Bukkit: 492 (1.3)
    Gastronomic: 1.26
     
  18. Offline

    Shabador

    "Interval = 20" is 1 second. You have your hunger increasing 1 point every 0.6 seconds or so. You're gonna need a lot of food. oO
     
  19. Offline

    Colraw

    Last version I used (1.25) interval=1 was every second but what you're saying makes sense to what I've noticed :p

    Thanks
     
  20. Offline

    ultimak

    Im getting the same error with 440 when I go to stop the server.
     
  21. Offline

    Tachoh

    Would there be any chance you could add a direct link to the current .jar files on all your projects?

    Makes auto-updating very easy.
     
  22. Offline

    Fanus

    I did do that Bjarte. Still got the message ingame. why oh why!

    what do I do with the Gastronomic.user file?

    Are all users not suppose to automatically fall under Default because that is what assume should happen but its not.
     
  23. Offline

    Shabador

    Gastronomic.user should be blank. It's where the mod saves the users hungerpoints.

    Maybe you should link the code from your permissions, then we can see if something is wrong. Here's the group-part of mine (It might be a tiny bit different as I use GroupManager instead of Permissions):

    Code:
    groups:
      Default:
        default: true
        permissions:
        - essentials.help
        - essentials.home
        - essentials.motd
        - essentials.sethome
        - essentials.spawn
        - gastronomic.player.*
        - mcmmo.skills.*
        - '/ach'
        - '/stats'
        - iSort.basic.top
        - iSort.basic.range
        - iSort.basic.chest
        inheritance: []
        info:
          prefix: ''
          build: false
          suffix: ''
      SemiAdmin:
        default: false
        permissions:
        - +groupmanager.mandemote
        - +groupmanager.manpromote
        - -groupmanager.*
        - '*'
        inheritance:
        - moderator
        info:
          prefix: ''
          build: false
          suffix: ''
      Admins:
        default: false
        permissions:
        - -mcmmo.regeneration
        - '/achadmin'
        - '/statsadmin'
        - '*'
        inheritance:
        - semiadmin
        info:
          prefix: ''
          build: false
          suffix: ''
      Moderator:
        default: false
        permissions:
        - essentials.tp
        - essentials.tphere
        - essentials.item
        - essentials.give
        inheritance:
        - default
        info:
          prefix: ''
          build: false
          suffix: ''
    
     
  24. Offline

    Fanus

    I will copy that exactly. What about my nickname. Mustn't that be in there somewhere or is it not necessary? I'm also going to start using GroupManager instead of Permissions.
     
  25. Offline

    fullwall

    I will fix the stopping error soon.
    --- merged: Mar 3, 2011 8:41 AM ---
    Done.
     
  26. Offline

    axebyte

    that would allow all Default and moderator to use /hunger and would be forced to have hunger.
    Since Admin is set to * you should be able to use all the commands listed above.
    If you have multi groups, then just inheriting from Default in this case would automatcially give them /hunger and the need to eat.
    If you want them to be able to eat or not just add
    - gastronomic.admin.enable
    If your admi and have * in there and not able to use the commands at all, then you might have some issue with your permissions not loading correctly or having some command conflict. works fine for me. (other then the counter stopping randomly it not working randomly :D )
     
  27. Offline

    ultimak

    Thank you so much for the swift fix!
     
  28. Offline

    darkcammo

    I'm sorry to request another feature, but would it be at all possible too make this compatible with MultiVerse. So that you you can have per world hunger conditions. For example, all of your worlds normal except 1 world where gastronomic is turned on. Would that be difficult to implement?
     
  29. Offline

    neonx

    I think the /gastronomic command is not working properly.
    Everytime i type it, it says: "gastronomic enabled...enabled...enabled...etc" never disabled :p
     
  30. Offline

    fullwall

    Redownload, should be fixed.
    --- merged: Mar 4, 2011 1:08 AM ---
    I guess per-world hunger could be implemented by only giving the permission gastronomic.player.enable to the players on the world that you wanted to have hunger on.
     
  31. Offline

    ultimak

    So im getting this error whenever i enter /food list, and after it gives me the list in-game it says an internal error occurred while preforming this action.
    Code:
    2011-03-03 21:26:21 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'food
    ' in plugin Gastronomic v1.26
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:21)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    76)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:638)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:601)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:595)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
            at com.fullwall.Gastronomic.Gastronomic.listFood(Gastronomic.java:242)
            at com.fullwall.Gastronomic.Gastronomic.onCommand(Gastronomic.java:134)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:19)
            ... 12 more
    Im running CB #440 with Gastronomics v1.26, GroupManager v0.99d, minecartmania, commandbook, anti-grief, multi-verse, and ichat. It doesnt seem to actually harm anything but its still concerning that its giving me an error at all.
     

Share This Page