[REQ] Food Type

Discussion in 'Archived: Plugin Requests' started by Sich, Nov 25, 2011.

  1. Offline

    Sich

    Plugin category: RP

    Suggested name: Food Type ?

    A bit about me: Server owner. Nothing special to say :)

    What I want:
    I whant to enforce player to eat different type of food to regain life. The player have to eat fish / meat / bread / mushroom, etc.. Each food can only give a certain % on the full bar (bread 15%, fish 20%, etc).
    With this perhaps that the player will farm more type of food, search for fish or mushroom...

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: foodtype.exempt > use the default food management from minecraft.

    Willing to pay up to: Why not. When the job is done and if it really work.

    When I'd like it by: When it's done.
     
  2. Offline

    boardinggamer

    @Sich
    This seems interesting. so what you want is something like this.
    =========== <---food bar

    ========== - eat mushroom soup
    ======== - eat meat
    ===== - eat fish
    == - eat bread

    do you want it to be that they can only heal up to the next level so they will have to eat bread then fish then meat then mushroom soup?
     
  3. Offline

    Sich

    hum, something like this.
    But perhaps that all the different type of food will be more then 100%.
    Then the user have no obligation to eat ALL type of food, but at leat 3 or 4. He have the choice.

    Like : meat, cookie/cake, fish, bread, apple/melon.
    If he eat 10 bread, the first will full is bread food bar, but the other are juste useless. To regain health he need to eat at least a little meat and bread, or cake.

    The heal should happen like the actual system (you need to have your food bar full). But it's just to full this bar, you need to eat different food.

    Config file can be used to defined group : meat (pork, raw,...) ; fish ; cake (cake, cookies) ; fruits (apple, melon) ; fish.
    Each group give a certain % of food that can be defined in the config.

    You can configure more than 100% like
    - meat : 40%
    - bread : 20%
    - Fruits : 20%
    - Fish : 30%
    - Cake : 10%

    In the config we can choose to store more then 100% (the food bar will stay full more time), or to not store more then 100% (like actually).
    With this config the user can choose to not eat fruits, or cake, or bread to have is 100%.

    And perhaps choose the delay between the need to eat.

    Sich
     
  4. Offline

    boardinggamer

    that is WAY beyond my level of coding 0.0
    what I CAN do is
    if the food bar is between lets say 21% and 40% you can only eat lets say bread.
    so if you try to eat meat when it is between those 2 %s it wont let you.
    I don't even know for sure if I can get that to work though.
    as for the config. I can make it like this
    Code:
    0-20: <food id>
    21-40: <food id>
    41-60: <food id>
    61-80: <food id>
    80-99: <food id>
     
  5. Offline

    Sich

    hum, I have to talk with my team for this :)
    It can be enough perhaps.

    And can you put multiple food id for the same % range ?

    Thanks for your answer.
     
  6. Offline

    boardinggamer

    I can ask the forums about that because at the moment I am not sure how.
     
  7. Offline

    acuddlyheadcrab

    EDIT: Derp. You can just use the ID numbers .. XP

    You might have to create your own method to "parse" a string in the config to an actual item.

    As for the conifg, it could just take a String[] or maybe List<String>:

    Code:
    path1: [this, is, a, list, of, strings]
    path2: [etc, etc]
    path3:
    path4:
    And den something like dis:

    Code:java
    1. // IN A RANDOM PART OF YOUR CODE I GUESS :p
    2. // Also, I think you can add a supresswarning tag -
    3. // or else you'll get a minor error
    4.  
    5. @SuppressWarnings("unused")
    6. List<String> foodz = plugin.config.getList("path1");
     
  8. Offline

    Sich

    After a good night, I think your system can be good, but I need to specify multiple ID on the same level.
    Like : 320, 363, 366 to allow all type of cooked meat. Or 360, 354, 260, 357 for the fruits and the cake.

    Using this will avoid the need of command, and we always have the visual level for the food bar.

    Sich
     
  9. Offline

    Sich

Share This Page