[Mod] Diet [0.1] [diet]

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

[Mod] Diet [0.1] [diet]

by rubenwardy » Sun Apr 13, 2014 18:11

Diet Mod


This mod adds a motive to make lots of different types of food.
Eating a food that you have eaten lots reduces its effect.

For example, if the last 5 things you ate were chocolate cakes, then eating another chocolate cakes would only give half its health points.
You receive messages like "Your stomach hates chocolate cake" and "Your stomach could do with a change".

Supports Better HUD.

+ Supported food


Download


Dependencies: none. Optionally depends on the above list of supported mods.
License: CC0

Download
... browse the code

+ Mod devs: Supporting this mod. You don't need to depend!


To do


  • Add nutrients such as proteins - You need to get all nutrients to gain health.
  • balanced diets: making one food healing lots of HP while reducing speed a bit, other increasing speed a bit at the cost of jump height, etc. (kaeza)
Last edited by rubenwardy on Sat Jul 23, 2016 18:45, edited 7 times in total.
 

User avatar
kaeza
Moderator
 
Posts: 2158
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sun Apr 13, 2014 18:26

You could make it a necessity to have a balanced diet, by e.g. making one food healing lots of HP while reducing speed a bit, other increasing speed a bit at the cost of jump height, etc.

Anyway, this is nice :)
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sun Apr 13, 2014 18:27

kaeza wrote:You could make it a necessity to have a balanced diet, by e.g. making one food healing lots of HP while reducing speed a bit, other increasing speed a bit at the cost of jump height, etc.

Anyway, this is nice :)


I like those ideas.
 

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sun Apr 13, 2014 19:01

[h]Update[/h]

  • Added support for Better Hud
  • Added support for all the foods Better Hud supports
 

User avatar
philipbenr
Member
 
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
Location: United States
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi

by philipbenr » Sun Apr 13, 2014 19:37

This looks really good. The idea is pretty creative too. :) Nice work.
“Would it save you a lot of time if I just gave up and went mad now?”

“I'd far rather be happy than right any day.”

“What, are you, crazy?" "It's a possibility I haven't ruled out yet"
 

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

User avatar
webdesigner97
Member
 
Posts: 1323
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sun Apr 13, 2014 20:32

What a great idea! This makes eating much more realistic and forces players to eat more than just one kind of food!
 

glenstein
New member
 
Posts: 3
Joined: Thu Mar 27, 2014 01:58

by glenstein » Tue Apr 15, 2014 19:38

would you consider adding support for sweet foods?
 

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Tue Apr 15, 2014 21:03

It is supported.

Food mod (2.2 or later) and expansions.

Sweet foods is an expansion. I will add it to the list though, to make it clear.
Last edited by rubenwardy on Tue Apr 15, 2014 21:04, edited 1 time in total.
 

Martno
Member
 
Posts: 77
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Diet [0.1] [diet]

by Martno » Thu Aug 13, 2015 16:54

Hi.
This is great idea, because without this, no motivation to eat or cook various kind of foods. I needed this mod so much. So this is awesome.
One question: is this mod supports any hunger mod? I tried with hbhunger and it seems that it doesn't work (my hunger didn't change at all). Didn't try Better HUD and hunger though.
 

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Diet [0.1] [diet]

by rubenwardy » Thu Aug 13, 2015 18:44

It's a little outdated - I need to up date it. It supports better HUD (unless the API has changed)
 

Martno
Member
 
Posts: 77
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Diet [0.1] [diet]

by Martno » Fri Aug 14, 2015 08:15

Doesn't work with Better HUD either. I got this error:
Code: Select all
10:00:11: ACTION[ServerThread]: singleplayer uses default:apple, pointing at [nothing]
10:00:11: ERROR[main]: ServerError: ...e1m519\Desktop\Minetest 0.4.12\bin\..\mods\diet\init.lua:81: attempt to index field 'hunger' (a nil value)
10:00:11: ERROR[main]: stack traceback:
10:00:11: ERROR[main]:    ...e1m519\Desktop\Minetest 0.4.12\bin\..\mods\diet\init.lua:81: in function <...e1m519\Desktop\Minetest 0.4.12\bin\..\mods\diet\init.lua:27>


If you could update this mod, it would be fantastic. Seems that diet is not very popular, I don't know why, I think it's great.
 

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

Martno
Member
 
Posts: 77
Joined: Thu May 28, 2015 07:09
Location: Hungary

Re: [Mod] Diet [0.1] [diet]

by Martno » Fri Aug 14, 2015 11:09

rubenwardy wrote:it should work now...

https://github.com/rubenwardy/diet/comm ... 56a3f1a76d

Thanks, but unfortunately I still have the same error. I tried when other mods were enabled, and tried with new world with just diet and better hud and hunger enabled. Same error :(

Actually with hudbars and hbhunger (instead of better hud) diet works, I got the "your stomach could do with a change" message (after I ate more than 5 food from same type), but hunger bar doesn't change.
 

tinkerlevu
Member
 
Posts: 15
Joined: Tue Sep 08, 2015 21:59

Re: [Mod] Diet [0.1] [diet]

by tinkerlevu » Tue Jan 12, 2016 08:59

hey rubenwardy... can you add support for hudbars?
 

sys4
Member
 
Posts: 38
Joined: Thu Nov 26, 2015 13:57
GitHub: sys4-fr
IRC: sys4
In-game: sys4

Re: [Mod] Diet [0.1] [diet]

by sys4 » Thu Jul 14, 2016 00:07

I have made a fork located here : https://github.com/sys4-fr/diet

The compatibility issue whith hud+hunger is fixed.
Added hbhunger (hudbars) support.
 

User avatar
TheReaperKing
Member
 
Posts: 529
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] Diet [0.1] [diet]

by TheReaperKing » Fri Oct 07, 2016 04:10

So I think this mod is fantastic and I'm using it with the exertion mod and crops mod. Would it be possible to make it compatible with the Mobs redo mod? Meat doesn't seem to work and also it doesn't take many apples for them to not be tolerated anymore. Wouldn't they just have reduced effect vs no effect?

I'm using this with my students and I think it is such a great way to teach them about diet and nutrition. Thank you so much for creating it!
Resources on happiness and life management - http://MikesHappyPlace.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Diet [0.1] [diet]

by rubenwardy » Fri Oct 07, 2016 08:39

TheReaperKing wrote:So I think this mod is fantastic and I'm using it with the exertion mod and crops mod. Would it be possible to make it compatible with the Mobs redo mod? Meat doesn't seem to work and also it doesn't take many apples for them to not be tolerated anymore. Wouldn't they just have reduced effect vs no effect?


I have a look into these when I can get around to it. I haven't maintained this mod in a while

TheReaperKing wrote:I'm using this with my students and I think it is such a great way to teach them about diet and nutrition. Thank you so much for creating it!


Please note that this is not meant to be accurate at all - if it was, then it would similar micros and macros, etc
 

User avatar
Stix
Member
 
Posts: 1282
Joined: Fri Aug 04, 2017 14:19
Location: USA
IRC: nil
In-game: Stix [+alts]

Re: [Mod] Diet [0.1] [diet]

by Stix » Sat Aug 26, 2017 16:34

will the value of certain food items go back up after you haven't eaten them in a while?
Hey, what can i say? I'm the bad guy.
Next release of your favorite game? "Bugfixes" --Wuzzy
[OLD]The new Minetest-offtopic can be found here: https://minetestoftopic.createaforum.com/index.php
 

Byakuren
Member
 
Posts: 813
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Diet [0.1] [diet]

by Byakuren » Sat Aug 26, 2017 17:00

Stix wrote:will the value of certain food items go back up after you haven't eaten them in a while?

Yes, but not enough to make up for the decrease in the other food items you ate. It's a metaphor for our search for novelty in the face of boredom and meaninglessness.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
ManElevation
Member
 
Posts: 893
Joined: Tue Aug 02, 2016 22:04
Location: Madrid,Spain
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
 

User avatar
Lord_Vlad
Member
 
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [Mod] Diet [0.1] [diet]

by Lord_Vlad » Fri Apr 20, 2018 23:09

How many food does it keep in memory ?
How many food are needed to get negative effect ?
Also can you change it ?
We need a simple configuration in mod configuration to change that.

This mod is awesome btw
 

User avatar
Lord_Vlad
Member
 
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [Mod] Diet [0.1] [diet]

by Lord_Vlad » Thu Nov 29, 2018 08:13

Sorry for double post but this is radically different from last intervention :
I have made a few addition to the mod's code, so it supports more of the mods I am using, I post it here and if you can add it to the original code...
I don't know how to make forks and pull requests yet, I really should learn...

Anyways, here is the code to accomodate most of the recent updates to farming redo :
Code: Select all
if minetest.get_modpath("farming") and farming.mod == "redo" then
   overwrite("farming:bread", 6)
   overwrite("farming:potato", 1)
   overwrite("farming:baked_potato", 6)
   overwrite("farming:cucumber", 4)
   overwrite("farming:tomato", 4)
   overwrite("farming:carrot", 3)
   overwrite("farming:carrot_gold", 6, "", nil, 8)
   overwrite("farming:corn", 3)
   overwrite("farming:corn_cob", 5)
   overwrite("farming:melon_slice", 2)
   overwrite("farming:pumpkin_slice", 1)
   overwrite("farming:pumpkin_bread", 9)
   overwrite("farming:coffee_cup", 2, "farming:drinking_cup")
   overwrite("farming:coffee_cup_hot", 3, "farming:drinking_cup", nil, 2)
   overwrite("farming:cookie", 2)
   overwrite("farming:chocolate_dark", 3)
   overwrite("farming:donut", 4)
   overwrite("farming:donut_chocolate", 6)
   overwrite("farming:donut_apple", 6)
   overwrite("farming:raspberries", 1)
   overwrite("farming:blueberries", 1)
   overwrite("farming:muffin_blueberry", 4)
   if minetest.get_modpath("vessels") then
      overwrite("farming:smoothie_raspberry", 2, "vessels:drinking_glass")
      overwrite("farming:pineapple_juice", 4, "vessels:drinking_glass")
   end
   overwrite("farming:rhubarb", 1)
   overwrite("farming:rhubarb_pie", 6)
   overwrite("farming:garlic", 1)
   overwrite("farming:chili_bowl", 8, "farming:bowl")
   overwrite("farming:grapes", 2)
   overwrite("farming:peas", 1)
   overwrite("farming:pea_soup", 4, "farming:bowl")
   overwrite("farming:pepper", 2)
   overwrite("farming:chili_pepper", 2)
   overwrite("farming:pineapple_ring", 1)
   overwrite("farming:onion", 1)
   overwrite("farming:bread_slice", 1)
   overwrite("farming:toast", 1)
   overwrite("farming:toast_sandwich", 4)
   overwrite("farming:porridge", 6)
end


And here is for various other mods :

Code: Select all
if minetest.get_modpath("mobs_zombie") ~= nil then
   overwrite("mobs_zombie:rotten_flesh", 1)
end

if minetest.get_modpath("pumpkinspice") ~= nil then
   overwrite("pumpkinspice:pumpkinspice_latte", 5, "farming:drinking_cup")
   overwrite("pumpkinspice:donut_pumpkinspice", 6)
   overwrite("pumpkinspice:pumpkinspice_cookie", 2)
   overwrite("pumpkinspice:pumpkinspice_bread", 6)
end

if minetest.get_modpath("redtrees") ~= nil then
   overwrite("redtrees:treechillitreat", 5)
end

if minetest.get_modpath("more_bread") ~= nil then
   overwrite("more_bread:pastrie_with_strawberry", 5)
   overwrite("more_bread:pastrie_with_chocolate", 4)
   overwrite("more_bread:croissant_with_cherry", 6)
   overwrite("more_bread:croissant_with_strawberry", 6)
   overwrite("more_bread:croissant_with_peach", 5)
   overwrite("more_bread:burger", 10)
   overwrite("more_bread:sausage_in_dough", 7)
   overwrite("more_bread:bun", 6)
   overwrite("more_bread:hot_cross_bun", 10)
   overwrite("more_bread:bun_block", 15)
   overwrite("more_bread:hot_cross_bun_block", 20)
   overwrite("more_bread:pastrie", 4)
   overwrite("more_bread:pastrie_dough", 1)
   overwrite("more_bread:bagel", 10)
   overwrite("more_bread:bagel_shaped_dough_lump", 3)
   overwrite("more_bread:baguette_shaped_dough_lump", 2)
   overwrite("more_bread:baguette", 8)
end

if minetest.get_modpath("foody") ~= nil then
   overwrite("foody:creamcheese", 1)
   overwrite("foody:strawberry_muffin", 5)
   overwrite("foody:chocolate_banana_muffin", 8)
   overwrite("foody:orange_raspberry_muffin", 7)
   overwrite("foody:chocolate_muffin", 7)
   overwrite("foody:coffeecake_muffin", 5)
   overwrite("foody:carrotcake", 12)
   overwrite("foody:fries", 4)
   overwrite("foody:diamond_donut", 30)
   overwrite("foody:meat6", 9)
   overwrite("foody:meat5", 9)
   overwrite("foody:meat4", 9)
   overwrite("foody:meat3", 9)
   overwrite("foody:meat2", 9)
   overwrite("foody:meat1", 9)
end


if minetest.get_modpath("food") ~= nil then
   overwrite("food:pasta_bake", 3)
   overwrite("food:soup_chicken", 4)
   overwrite("food:soup_tomato", 4)
   overwrite("food:apple_juice", 2)
   overwrite("food:orange_juice", 2)
   overwrite("food:cactus_juice", 2)
end


Last bumped by Lord_Vlad on Thu Nov 29, 2018 08:13.
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 6 guests