Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[V1.6] Xie's Hunger Mod v1.4 (SMP Supported)


  • Please log in to reply
425 replies to this topic

#1

Xie
    Xie

    Lapis Lazuli Collector

  • Members
  • 917 posts
  • Location: Washington, DC
  • Minecraft: MrXie

Posted 27 January 2011 - 10:18 PM

All of my mods are now hosted in this thread, please visit it for the latest news and downloads :)



Xie's Hunger Mod v1.4 for Minecraft Beta 1.6.5
(As far as I know, this mod is compatible with Minecraft Beta 1.6.6)

Download 1.6.5v1.4
(Note, if you don't want it to work in SMP, don't copy the tf, mx and mi class files when installing)
Requires ModLoader)

This mod does support SMP, but it's a client-side mod and requires no modification to your server. Having said that there have been a few bugs with SMP, I'm working on it :P

Compatibility patch for Balkon's WeaponMod: Install both mods, then install this gq.class file.

Latest News
(17 June 2011) Finished the Hunger mod revision, it now supports thirst and fatigue. Sadly it does not yet support SMP. Download it here. I'm not going to update this thread, as I'm going to create a new thread dedicated to all of my mods (when I get the time :P).

About the Mod
This simple mod attempts to enhance the survival aspect of Minecraft by adding an elegant hunger mechanic.

Posted Image

Basically it adds an invisible "food" bar, the same scale and size as your health bar, that gradually decreases. An icon appears next to your health bar when you start to get hungry (the icon will not be visible when you first start the game with the default image file), and its colour indicates to what degree.

Green: Peckish
Yellow: Hungry
Red: Starving
Red w skull: Starving to death

Posted Image

This is the default hunger indicator. Feel free to try these alternate user-made hunger indicators
Lord Herman's "sandwhich bite" hunger indicator
Gnomework's hunger bar indicator
To install them, make sure the filename is "xiehunger.png" (case sensitive) and replace the xiehunger.png in the jar file (/Xie/img directory). If I missed any alternative images, or if anyone has another, please share them and I'll post a link here.

The starving to death icon indicates that your "food" bar is empty, and the hunger starts draining your health bar at the same rate (as your stomach starts digesting your body).

I've included two difficulty settings, the default adds the same amount to both your health and food bar when you om nom nom. The "harder" setting adds to one or the other, depending on how hungry you are (while starving, it adds to the food bar first, then health if there's any left over, if you're not starving its the other way around).

While playing on Peaceful the passive health regeneration is disabled when your hunger slips to yellow or lower.

I think the default is currently set to 15 minutes until you start starving to death (and then another 15 minutes to go from full health to zero), which is perhaps a little low, let me know how it works for you. You can tweak the time and difficulty in the /mods/Xie/hunger.ini file (created on first run). I like to play on the harder difficulty, but with a nice long hunger time.

My design goal was to contribute to the survival challenge of the game, while keeping it as intuitive and accessible as possible.

A huge thank you to Risugami for his ModLoader and those responsible for the MCP. Compliments to Chezzy and everyone else who was involved in this thoughtful discussion, as well as apologies for not adhering to that specification. Compliments also to Lahwran, who already did it.

SMP Support
The mod works even when you're playing SMP (in theory, SMP is hard to test thoroughly, so as usual please report any issues you have). Being a client-side mod each player can set their hunger difficulty level and starvation time independently. When you disconnect from a server your hunger state is saved to a file: /mods/Xie/SMP/Hunger/yourname.hunger. This file will be read when you connect to a server, and your hunger state matched to the IP address/port of the server you connect to. Obviously if the server you're connecting to changes you will need to modify this file, or your hunger state will be reset as though you'd connected to a new server.

All thoughtful discussion and criticism is welcome :SSSS:

Change Log
28th Jan 2011, 1.0.1: Fixed a bug where cake was inedible because you are full health, even if you are hungry.
8th Feb 2011, 1.0.2: Added SMP support.
2nd March 2011, 1.0.3: Updated to Beta 1.3_01
18th March 2011, 1.1: Updated to support Modloader v5. Fixed a bug that prevented inventory drop when starving to death. Added an "in the green" passive regeneration option, as a benefit to go with the cost of having to scoff food so frequently (defaults to off). Removed dependancy on XieMod.class. Rolled XieHunger.class into mod_XieHunger.class. Added lower and upper limits to hunger time.
12th April 2011, 1.2: Updated to Beta 1.4_01. This version does not support SMP.

News
(10th Feb 2011) Lahwran has updated his Hunger mod for Beta. It has a hunger bar, and doesn't just add hunger but makes food no longer heal you. He also has dehydration and more planned, be sure to check it out.
(8th Feb 2011) Now with SMP support! This is still a client-side mod, you don't need to do anything at all to your server, but if you're playing SMP you will now get hungry and die.
(14th Feb 2011) I'll be away for a few days while travelling home. Sorry I won't be able to provide support in this time, or develop the mod further. I realise Hunger has been neglected a little in favour of my Farming and Cooking mods.
(2nd March 2011) Updated for Beta 1.3_01. I admit I haven't had time to test its SMP support, but SSP works fine.... Let me know if you do have any troubles playing SMP. Another thing, I've yet to fix sleeping, currently your metabolism pretty much shuts down overnight while you sleep. Should be an easy fix, I'll make it happen in the next revision.
(18th March 2011) Finally updated to support Modloader v5! Sorry for the wait. As a bonus I've also added a new feature that rewards you for keeping yourself well fed, a passive regeneration like in Peaceful mode that works while your hunger is "in the green" (green icon or no icon). The new feature is disabled by default, don't know if people like it or not. Remember to delete your hunger.ini file so a new one can be created if you want to edit the new option.
(3rd April 2011) Update for v1.4 might be a little while, I'm currently recovering from having punctured a lung, so I'll admit that modding isn't at the top of my list of priorities right now :SSSS: Be sure though that I will get to it, hopefully within a week or two. Apologies for making you wait :iapprove:
(20th April 2011) Beta 1.5 is out, wooo! Probably won't be able to update till after Easter, but I will get to it as soon as I can :SSSS:
(12th April 2011) Updated for Beta 1.4_01! Unfortunately I couldn't get it working for SMP, so this version is single player only. Apologies to any folks who want to use hunger on 1.4_01 servers, I'm still working on it. Cheers.
(29th April 2011) Updated to support Beta 1.5_01. SMP support has also been fixed.
(30th May 2011) Updated to support Beta 1.6.5. SMP support still works. Fixed maximum hunger time, hunger time is now only limited (to 30 minutes) if you enable passive regeneration.

Register or log in to remove.

#2

Chiefwaffles
  • Minecraft: Chiefwaffles

Posted 27 January 2011 - 10:20 PM

Thank you so much, kind sir.  ^.^
Posted Image

#3

Cowum
    Cowum

    Stone Miner

  • Members
  • 72 posts

Posted 27 January 2011 - 10:25 PM

How much does what food restore?

#4

Cragvis
    Cragvis

    Coal Miner

  • Members
  • 119 posts

Posted 27 January 2011 - 10:30 PM

THANK YOU SO MUCH! I was hoping someone would make a mod like this. I am all for masochistic realism and no one else would make a hunger mod.
GENERATION 17: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

#5

Xie
    Xie

    Lapis Lazuli Collector

  • Members
  • 917 posts
  • Location: Washington, DC
  • Minecraft: MrXie

Posted 27 January 2011 - 10:32 PM

Cowum said:

How much does what food restore?

Same amount as it would otherwise heal :Glass:

The "invisible food bar" is the same size and scale as your health bar, so you've basically got 10 "food hearts", or... stomachs? :Glass:

#6

Vanishing

Posted 27 January 2011 - 10:34 PM

it takes more than 2 days/nights to starve a man/woman to death..30 minutes = less than 2 day + 2 night..XD

edit: o.o.how did i forget to say this: nice mod!

#7

Shykary
    Shykary

    Redstone Miner

  • Members
  • 595 posts
  • Location: Brazil

Posted 27 January 2011 - 10:35 PM

Wow, man. That was impressive. I was talking about it with my friends today. Haha, thanks. :)

#8

Xie
    Xie

    Lapis Lazuli Collector

  • Members
  • 917 posts
  • Location: Washington, DC
  • Minecraft: MrXie

Posted 27 January 2011 - 11:14 PM

Vanishing said:

it takes more than 2 days/nights to starve a man/woman to death..30 minutes = less than 2 day + 2 night..XD

edit: o.o.how did i forget to say this: nice mod!

I know, right? XD

I'm not saying its balanced as is, I'm hoping for some feedback from people to help determine what a good starvation rate is - there's a reason you can change it in the .ini file :RFlower:

#9

MatrexsVigil
  • Location: Ohio

Posted 28 January 2011 - 04:06 AM

Normally I don't ask mod creators to create something off the top of my head once I've tried their mod, but I'm really hoping you might consider creating a Thirst mod to go along with this.  Maybe your character needs to drink from buckets of water (or bowls of water, if you'd want to mod that in) or submerse themselves in running water for X amount of time per 'thirst glass' to refill (because still water can become rancid!).

Also, if you could make a version of your mod that shows your Hunger (and Thirst if you take me up on my idea) bar visibly instead of the colorful and inventive fork and knife mini icon, that'd be great too.

Thanks for reading.  =)
Posted Image

#10

Nandonalt
  • Location: Brazil

Posted 28 January 2011 - 04:10 AM

Is it compatible with custom food? ;)
Posted Image

#11

Xenoph
    Xenoph

    Coal Miner

  • Members
  • 149 posts

Posted 28 January 2011 - 07:04 AM

Nandonalt said:

Is it compatible with custom food? :)

I gonna check it out right now!:D


Wonderful mod, Sir Xie! :iapprove:  *goes testing*

:Green: I'm running a number of mods, didn't encounter any problems. (It works with your mods too, Nand!)
:Red:  Cake can't be used to decrease hunger.
--
:SSSS: A thought: Indicator sound when it changes status?
My Modding-related Channel - tutorials, howtos, demos:
http://www.youtube.c...wo?feature=mhum

Aimed at creating vids with good information/time ratio.
Check it out!

#12

Combine_Kegan
  • Location: Seated comfortably in mountain fortress.

Posted 28 January 2011 - 11:39 AM

Ah I love these mods. But could I maybe make a simple request/suggestion though? Could you maybe make a colorblind friendly version of this? As of right now I can't tell the difference between the green and yellow hunger status.

EDIT:

Ah hang on a second, I can just edit the image. Nevermind! Nice mod!

#13

Xie
    Xie

    Lapis Lazuli Collector

  • Members
  • 917 posts
  • Location: Washington, DC
  • Minecraft: MrXie

Posted 28 January 2011 - 02:56 PM

Xenoph said:

Nandonalt said:

Is it compatible with custom food? :)

I gonna check it out right now!:D


Wonderful mod, Sir Xie! :VV:  *goes testing*

:Green: I'm running a number of mods, didn't encounter any problems. (It works with your mods too, Nand!)
:Red:  Cake can't be used to decrease hunger.
--
:DBlock: A thought: Indicator sound when it changes status?

I fixed cake, thanks for picking that up for me, I admit I didn't test cake. Unfortunately the mod is now incompatible with others that make changes to cake... though I'm not familiar with any that do... :P

On the topic of compatibility with other mods, it should work with any food mods, in fact I encourage you to play with a food mod if you want to use this one. I made the change to the player class rather than to food itself for that reason. Unfortunately this means it won't be compatible with other mods that change the player class. Furthermore it assumes that any healing is from food, so if you have a mod that provides some other form of healing, it will also be feeding you :P

And what sort of sound would you suggest? ^^

#14

Xenoph
    Xenoph

    Coal Miner

  • Members
  • 149 posts

Posted 28 January 2011 - 05:27 PM

Xie said:

I fixed cake, thanks for picking that up for me, I admit I didn't test cake. Unfortunately the mod is now incompatible with others that make changes to cake... though I'm not familiar with any that do... :P

On the topic of compatibility with other mods, it should work with any food mods, in fact I encourage you to play with a food mod if you want to use this one. I made the change to the player class rather than to food itself for that reason. Unfortunately this means it won't be compatible with other mods that change the player class. Furthermore it assumes that any healing is from food, so if you have a mod that provides some other form of healing, it will also be feeding you :P

And what sort of sound would you suggest? ^^

Your welcome and thanks! Update works with my mods.

:Yellow: For the indicator sound, it could be something like a dinner bell. Not too harsh but unique enough to be easily noticeable. Maybe a similar to one of these could suffice:

:Yellow: Are you planning to add thirst? I think a bucket of water could be poured into a bowl Posted Image, just like milk in Nandonalt's Dairy mod.

:Red: It can be me but I can't find the hunger.ini in the .zip provided..
My Modding-related Channel - tutorials, howtos, demos:
http://www.youtube.c...wo?feature=mhum

Aimed at creating vids with good information/time ratio.
Check it out!

#15

houndog
    houndog

    Zombie Killer

  • Members
  • 241 posts
  • Location: Right here!

Posted 28 January 2011 - 05:34 PM

I have been looking for a mod like this, but the food bar is a bit to fast for me...
Anyway its a very good mod three :cobblestone: for you!

#16

Cragvis
    Cragvis

    Coal Miner

  • Members
  • 119 posts

Posted 28 January 2011 - 06:29 PM

houndog said:

I have been looking for a mod like this, but the food bar is a bit to fast for me...
Anyway its a very good mod three :Diamond: for you!

Just edit the .ini file in the mods folder. I set mine from 15 minutes to 450 minutes and it is realistic given the game time. Takes about 2 weeks before you start to die of hunger.
GENERATION 17: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

#17

xCrAzYbOy

Posted 28 January 2011 - 06:47 PM

Good work here! This looks really awesome, I'll definitely give this a try. All though, I agree with others. You should definitely implant thirst. :D Nothing better, then having a cool glass of water after a fine meal.

#18

Xie
    Xie

    Lapis Lazuli Collector

  • Members
  • 917 posts
  • Location: Washington, DC
  • Minecraft: MrXie

Posted 28 January 2011 - 07:56 PM

Cragvis said:

Just edit the .ini file in the mods folder. I set mine from 15 minutes to 450 minutes and it is realistic given the game time. Takes about 2 weeks before you start to die of hunger.

lol, yeah the 15 minutes is a bit quick :P

Xenoph said:

:Red: It can be me but I can't find the hunger.ini in the .zip provided..

Its not, it will be created when you first run it. You should find it in your minecraft folder under /mods/Xie.

As for adding thirst... The reason I didn't was because I wanted it to be a simple addition that's intuitive and accessible for a new player. I didn't want anything to complicated (hence an icon, not a bar) and I didn't want something a new player wouldn't get right away - which is harder to do with thirst...

Having said that it seems a popular suggestion, so I may yet do a thirst bar/hunger bar if ppl keep asking for it.

(And besides, all of this is just tiding us over till Notch implements it himself ^_^)

#19

Xenoph
    Xenoph

    Coal Miner

  • Members
  • 149 posts

Posted 29 January 2011 - 01:44 AM

Thanks, it was there. :coalore:

:cobblestone: About Thirst, you definitely make a point. For me it was more like common sense to implement it as everyone drinks. But I don't know what unique and practical use could it have...

:cobblestone: Is it possible to implement that everything that has healing function can be used to reduce hunger? So that you won't need to add the foods one by one (I don't really know how this works, just wondering). Because I just installed Nandonalt's Chocolate mod and can't eat the chocolate cake to reduce my hunger. Or is the cake-thing a special one as the cake is a special block itself?
My Modding-related Channel - tutorials, howtos, demos:
http://www.youtube.c...wo?feature=mhum

Aimed at creating vids with good information/time ratio.
Check it out!

#20

NeonJ
    NeonJ

    Diamond Miner

  • Members
  • 864 posts

Posted 29 January 2011 - 01:52 AM

I love this mod! Gives me a REASON to eat for once! I decided to play this on a difficulty other than peaceful for the lulz. I found myself spamming bonemeal on freshly planted wheat for an emergency hunger replenisher. I eventually found a skeleton dungeon though, and I've been using it for all my bone needs ever since. Also, bread is now my main food source! XD

... I love this mod.
Posted Image The name's Cirom, a BLU KAG archer of awesome. Click the archer to join me in KAG!