Jump to content
Sign in to follow this  
eddan (DayZ)

HUNGER-SYSTEM: Add calories to food, and bodyfat % [EASY TO CODE]

Recommended Posts

also on reddit

Each survivor starts at 14-15% bodyfat and 70 KG.

We translate bodyfat % into numbers so it gets easier to code.

Each survivor starts 10 KG fat and 60 KG lean mass.

7700 calories per KG of fat, that gives each survivor a storage of 77000 calories.

When you eat, calories are added to your storage. Calories are burned off at a fixed rate of 1600 calories per day (metabolism) even when you are offline. Since you can track how far people walk/run, you can add how much is burned per meter, or click/kilometer.

If you have a healthy calorie storage (bodyfat) you regenerate blood faster, when you reach a low calorie storage you degenerate blood slowly, when you reach 1-3% (in calorie storage) you will start to lose muscles, making it hard to run around until you start taking power naps and die.

That was the easy version, if you want to go deeper you need to put in a metabolism calculator on the height and sex people choose in-game, a female have higher fat percentage, but burns more. People who are taller will require more calories, but might be able to reach for those extra can of beans on the top of counters, balancing it out, and allowing group play of different sizes. To me that is also easy to code, but takes longer, then you can start changing models and so on, but let's forget that for now. Possibilities are limitless.

Also, to burn less calories when being offline, you might want to choose to take a nap for 30 mins before you log out, leaving your character logged in for 30 minutes, leaving you vulnerable to zombies or players. Like, now I want to go offline, choose NAP button on a bed or, you lay down, a sleeping animation, and you are forced to go offline for 30 minutes, you cannot log in for a couple of hours. (so just logout if you want to come back!)

If you make it like this and want to balance it out, adjust how much food spawns and how much it gives.

tl;dr food gives calories, calories add on your storage, you lose calories from your storage when you run or walk, and lose at a fixed rate even when offline.

Edited by eddan
  • Like 1

Share this post


Link to post
Share on other sites

The reason Rocket removed the need to eat offline is because he realized that not everybody has the opportunity to play every day, myself included. So no, hunger/calorie meter should not deplete while offline.

EDIT: I do however think that the current health regeneration/hunger system is too simplistic for the purposes of the game. It could be as simple as separating fats, proteins and carbohydrates and vitamins. Especially in the case of vitamins it should be quite simple to add deficiency symptoms, like increased susceptibility to disease and slower wound healing.

Edited by TheSodesa
  • Like 2

Share this post


Link to post
Share on other sites

I would prefer not having to spend my time counting calories and body fat. I love realism but not to the point where the game becomes a chore.

  • Like 2

Share this post


Link to post
Share on other sites

No, offline you don't need no food; maybe have a preset counter, if you log off for more than 1hours (so you stop playing) you burn one time 300 calories, just so you need to eat before you go to "sleep"

I agree a more complex system is needed, but your ide needs some extras:

7700 calories per KG of fat, that gives each survivor a storage of 77000 calories.

This would basically mean you don't have to eat for a day or two; human body unfortunatley doesn't qork like a resrvoir, it is a bit more complex;

I wouldn't like counting calories either, but it would be great to see the characther grow thin/fat based on how much you eat + diseases etc...

  • Like 1

Share this post


Link to post
Share on other sites

regarding the average lifespan in dayz i don't see how this should really affect your body. it would take a very very long time until your body starts to respond to that bad "one-sided" nourishment.

And to be honest a "simple life" would lead to people become again more healthy because of the naturally balanced food they would scavenge/hunt/harvest..

edit: ok depending on time since day 0 has passed...i doubt ppl would get fat in any way in such a harsh environment! it would always be the fight against starvation..

Edited by joe_mcentire

Share this post


Link to post
Share on other sites

The reason Rocket removed the need to eat offline is because he realized that not everybody has the opportunity to play every day, myself included. So no, hunger/calorie meter should not deplete while offline.

EDIT: I do however think that the current health regeneration/hunger system is too simplistic for the purposes of the game. It could be as simple as separating fats, proteins and carbohydrates and vitamins. Especially in the case of vitamins it should be quite simple to add deficiency symptoms, like increased susceptibility to disease and slower wound healing.

70,000 calories let you be offline for 48 days until your character will be limited to movement, and almost dead.

If you don't log on for 48 days your character deserves to be dead.

If rocket wants to balance it, he can simply make it easy for people to log on, play for a few hours and put your bodyfat up to 80 days for example. It depends on your priority.

"I want to be offline for a year, and still have my character, I should eat constantly for 2 days until my calorie intake is at level"

I already told you, if you want it to go slower you will have to make your character go to sleep.

It's not an excuse, sorry.

People saying they can't calories can't count 1+1.

For example. It can say, get below 1 to 3 bodyfat and you're dead. This bar gives you +0.1% bodyfat. There you have a meter, bodyfat % and blood.

Now instead of having bodyfat, you can for example change that value to 1-100% and put it at hunger, +1% hunger and so forth.

Putting things already done in nature into the game will be successful instead of trying to artificially create a system for hunger.

Edited by eddan

Share this post


Link to post
Share on other sites

regarding the average lifespan in dayz i don't see how this should really affect your body. it would take a very very long time until your body starts to respond to that bad "one-sided" nourishment.

And to be honest a "simple life" would lead to people become again more healthy because of the naturally balanced food they would scavenge/hunt/harvest..

edit: ok depending on time since day 0 has passed...i doubt ppl would get fat in any way in such a harsh environment! it would always be the fight against starvation..

Currently (well, the last time I played) I would eat all the food I would find, mainly cans that aren't exactly healthy... So If my character ate 10 cans of food every day (and they are some large cans), I think in 10 days it would show ;)

On that subject, and I know it was suggested before, I'm just emphasizing, the player should not be able to eat 5 cans in a row...

Share this post


Link to post
Share on other sites

Currently (well, the last time I played) I would eat all the food I would find, mainly cans that aren't exactly healthy... So If my character ate 10 cans of food every day (and they are some large cans), I think in 10 days it would show ;)

On that subject, and I know it was suggested before, I'm just emphasizing, the player should not be able to eat 5 cans in a row...

already another awesome idea..do you have a thread for this?

if you force-eat too much --> vomiting, discomfort... a quasi natural behaving limitation ...nice!

Edited by joe_mcentire

Share this post


Link to post
Share on other sites

what about the different types of glands and stuff, like some people cant get fat and some people cant lose weight. thyroid glands, google it

Share this post


Link to post
Share on other sites

well to add fat you would also have to add carbs. fat should only be lost once you run out of glucos. so eating foods with high carbs will give you more glucos so this way you can maintain your fat easier

EDIT:eating a lot of bad fat should increase your chances of getting a disease since it actually does it in real life

bad fat includes high fat meat and whole fat milk

Edited by HashSlingingSlasher192

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×