[INACTIVE][MECH] Gastronomic v1.4 - Adding realism through hunger. [798]

Discussion in 'Inactive/Unsupported Plugins' started by chernobyl360, May 22, 2011.

  1. Offline

    chernobyl360

    [​IMG]
    The first specialised hunger plugin for Bukkit!
    Now with Thirst - open GastronomicWater Spoiler!
    Original Thread:
    http://forums.bukkit.org/threads/in...1-3-4-adding-realism-through-hunger-766.2685/

    Download:
    http://dl.dropbox.com/u/1015938/Gastronomic.jar -CB798

    Permissions:
    http://forums.bukkit.org/threads/ad...ow-with-real-multiworld-permissions-766.5974/

    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:
    • Iconomy Support?
    Mechanics
    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

    • 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.
    • A Very Special Thanks To FullWall To Allow me To Continue This Amazing Plugin!

    Config


    Code:
    #Minecraft Properties File
    #Sun May 22 10:26:48 EDT 2011
    hunger-increment=20
    enforce-limit=true
    message-40=Your stomach rumbles.
    hunger-respawn=0
    message-eat=You feel better after eating. Your hunger is now +hunger+.
    message-100=You are starving\! Eat something, anything\!
    active=true
    restore-health=false
    message-health-restore=You feel full and your vitality increases. Your health is restored by +healthr+
    initial-hunger=0
    message-check-hunger=Your current hunger is +hunger+.
    health-restore-limit=20
    message-20=You feel a bit peckish.
    message-stuffed=You feel stuffed, like you couldn't eat another bite.
    message-80=Your stomach aches from hunger.
    health-restore-amount=1
    disable-world-guard=false
    message-no-permission=You don't have permission to use that command.
    starve-damage=1
    message-60=You're getting hungry.
    interval=2000
    reset-hunger-respawn=true
    


    Changelog:
    V1.4 - Updated to CB798
    v1.3.4 - compatibility, bugfixes.

    Ill Be Working on Gastronomic Water..

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
    Kingjarrad and kahlilnc like this.
  2. Offline

    m5k

    Ever thought of adding sleep deprivation?
     
    Kingjarrad likes this.
  3. Offline

    chernobyl360

    hmm thats a interesting idea. so basically stay up for too long and loose health? or stay up and maybe your guy will freeze in place?
     
  4. Offline

    Tealk

    is it possible to feed your wolf without getting your hunger filled up?

    //Edit
    and its possible to make an afk command?
     
  5. Offline

    kahlilnc

    Thank you for your fork. :D
     
  6. Offline

    madflavius

    Quick question for anyone (don't want to waste chernobyl360's time): could you paste a working effects config file in this thread? I've tried without success to make effects work like it did before it was a separate config file (aka, remove the health-giving effects of food), and I think I'm just not creating a config file correctly. I just need to see what a proper one looks like so I can emulate it. Thanks in advance!
     
  7. Offline

    Eugen

    On 1.3.4 and 1.4 a message is no longer showing up when taking damage at 100 hunger; 1.3.3 doesn't have this bug. CraftBukkit 798.
     
  8. Offline

    chernobyl360

    I could look into that. Also why make an AFK command for this? lol. ill just try and make a separate basic /afk plugin :p

    Ok Ill Post The Config Up..

    @Eugen
    Ok, Ill Look Into It.
     
  9. Offline

    madflavius

    @chernobyl360 - Sorry, I don't think I was clear, I meant the config for just the Gastronomic.effects file, not the Gastronomic.properties file. Thanks!
     
  10. Offline

    chernobyl360

    well when you open up the effects file it only shows this


    Code:
    #Minecraft Properties File
    #Sun May 22 10:26:47 EDT 2011
    
     
  11. Offline

    madflavius

    Yes, but my question is, how do you properly modify the file, then, for the food items you want? For instance, is it

    Code:
    #Cooked Pork
    320=-8
    Like it was in the Gastronomic.Foodstuffs file? Because I have it written as shown, but it doesn't remove the healing effects of pork, it doesn't seem to have any effect. Is there a setting I have to change to activate the effects file?
     
  12. Offline

    chernobyl360

    Im Not 100% sure on this. I just forked this today, i need to get more familiar with the code to figure this out.
     
  13. Offline

    madflavius

    Oh sure, no worries. :) Thank you so much, by the way, for forking this project. This was one of the key features that makes my server (soon to go public) unique and exciting, and I don't know what I'd do without it!
     
  14. Offline

    fullwall

    Effects file -
    Code:
    # An effect is something that occurs when an item is eaten.
    # They are defined like so:
    # itemID(:data)=effect(:delay(:message(:repeats(:repeatMessage))))
    
    # Effect is the damage that is dealt to the player:
    # this can be positive or negative (measured in one of 20 half-hearts).
    # The delay is how many server ticks pass before this (or any repeats) occurs.
    # The message is what is told to the player the first time this effect happens.
    # The repeats defines how many times to repeat this effect.
    # The repeat message is what is displayed when a repeat occurs.
    # The messages can have variables in them.
    # Available variables :
    # +remaining+ - the number of times remaining before the effect finishes.
    # +damage+ - the damage caused by this effect.
    # +delay+ - the delay between each effect.
    # +item+ - the item name that caused this effect.
    #Example - poisoned raw pork. Damages you 3 times for 2.5 hearts every 5 ticks.
    319=-5:1:Poisoned from eating +item+:3:Still poisoned from eating +item+.
     
  15. Offline

    NaliNCN

    Could it be possible to give more effects on food than just to heal a player or to set hunger bar to 0 again. I would love to use a plugin where food gives your characters buffs (increased digging speed, increased drop size, increased movement speed, increased attack damage). You could connect different buff types, buff strengths and effect durations to different kinds of food according to their difficulty to be crafted. This would encourage players to use food in a more positive way and give food an even more important role in minecraft.
     
  16. Offline

    m5k

    The sleep deprivation was my idea for a separate plugin but I thought this feature would be great to add to this plugin.
    The idea is that if you don't sleep for a full day/night circle you start walking at ~80% speed. If you stay up for another day cycle, you start walking at 50% speed and begin to take half a heart damage every so and so time. Resulting in half health lost during this cycle. On the third sleepless cycle you begin taking 1 heart damage each time and you will die unless you find a bed to sleep in.
     
  17. Offline

    Nitnelave

    What's the time unit? seconds? ticks? miliseconds? 2000 corrseponds to how long in seconds?
    And for hunger restoration? for the moment, nothing helps when I'm starving. Food heals me, because I set restore health to true, but my hunger level stays at 100. Do I have to edit the foodstuffs file? what's the syntax?
     
  18. Offline

    fullwall

    Ticks. 1 tick = 20 seconds.
     
  19. I love the idea of this plugin. Really useful coz atm no food required about to anything.
    How do i add the food list?
    Does is show in food list like "Cooked pork" and it takes -8 off the hunger level? like if hunger lvl is 10 -> it goes to 2. ?
    #Cooked Pork
    320=-10
    #Raw Pork
    319=-6
    #Golden Apple
    322=-100
    #Apple
    260=-8
    #Cookie
    357=-3
    #Fish
    349=-12
    #Cooked Fish
    350=-15


    EDIT:

    lol it must be 10,6 etc. if it has "-" infront -> u just make ur hunger BIGGER :D
     
  20. Offline

    Nitnelave

    Hum... you mean, 20 ticks = 1 seconds, right?
     
  21. Offline

    fullwall

  22. Offline

    Nitnelave

    I have a few questions, stuff that's not clear.
    First off, I have to nag you about onPlayerJoin that has been replaced by PlayerJoinEvent (someone has to, sorry)
    Then, I'd like to know what exactly enforce-limit and health-restore-amount do, because when I set enforce-limit to true, once you eat something, you cannot get hurt (WTF?) and when I set it to false, I cannot lower my hunger and it doesn't display messages... What I'd like to do is keep the usual health system, but once you starve, you start losing health, (and you can eat to lower your hunger, of course) and you only get health back if you're not too hungry (lower than, say, 30). What settings do I need then?

    Oh, and is it possible to add accents in the config file? (I have a french server) For now, when I do, they just don't appear (ex: "Tu as mangé une pomme" --> "Tu as mang une pomme")
     
  23. Offline

    fullwall

    enforce-limit is meant to stop your hunger going below 0. Use health-restore-amount as a negative number (it is used when you're stuffed). Use starve-damage.
     
  24. Offline

    Nitnelave

    When I reload the plugin, I can get hurt, but only until I eat something. Then no matter how high I jump or for how long I starve, I stay at full health (and when I eat, my hunger level doesn't drop). (BTW, I edited my post above, about the accents)
    Here's my config :
    config (open)
    #Minecraft Properties File
    #Mon May 23 11:59:44 CEST 2011
    hunger-increment=10
    enforce-limit=true
    message-40=Ton estomac gargouille.
    hunger-respawn=0
    message-eat=Tu te sens mieux. Ton niveau de faim est maintenant : +hunger+.
    message-100=Tu es affamé\! Mange quelque chose, vite\!
    active=true
    restore-health=false
    message-health-restore=#You feel full and your vitality increases. Your health is restored by +healthr+
    initial-hunger=0
    message-check-hunger=Ton niveau de faim : +hunger+.
    health-restore-limit=40
    message-20=Tu as un petit creux, héhé.
    message-stuffed=Tu as trop mangé... Tu ne pourrais même pas en reprendre si tu le voulais.
    message-80=Tu as des crampes d'estomac.
    health-restore-amount=-1
    disable-world-guard=false
    message-no-permission=Tu n'as pas la permission pour cette commande.
    starve-damage=1
    message-60=Tu commences à avoir la dalle.
    interval=200
    reset-hunger-respawn=true
     
  25. Offline

    TelephoneKiosk

    Link won't work
     
  26. Offline

    TheSmith

    Works great with iConomy/iConomy Chest Shop. Also, brings a point to farming. Love it. Thank you for updating it!
     
  27. Offline

    Thyraxxx

    dropbox not working :eek:
     
  28. Offline

    Minecraft93

    jtlcr777 likes this.
  29. Offline

    jtlcr777

    uh...change your password?
     
  30. Offline

    Minecraft93

    eh well if he was hacked how is he gonna change his password? most likely email was changed too.
     

Share This Page