[Mod] Advanced Food Cooking [cooking]
- sparky
- Member
- Posts: 154
- Joined: Sun Oct 05, 2014 00:54
- GitHub: Elkien3
- IRC: ircSparky
- In-game: sparky
- Location: USA
- Contact:
[Mod] Advanced Food Cooking [cooking]
This mod adds tools and some crafts that uses them to prepare food with no formspecs or menus.
How the mod works
There are 8 types of crafts:
Stacking: put items onto the plate in order and then dig with anything.
Mixing: put items into mixing bowl (order doesn't matter) and dig with spoon or stick.
Soup: put items into pot with water (order dosnt matter) and dig with spoon or stick. Use bowl to take and eat the soup. (It may need to be cooked first)
Cutting: put item onto cutting board and dig with sword.
Rolling: put item onto cutting board and dig with roller.
Pressing: put item onto hand press and dig with anything.
Stove/Oven: put fuel in bottom and item to cook on top. They do not share crafts. (Be careful, if you leave an item cooking too long it will burn.)
The mod has no craft guide of its own so it's highly recommended to use craftguide or unified_inventory (see optional depends)
Or if you're the trial-and-error type, don't xD
Addon recipe mods
Cooking Farming Redo (cooking_fr): https://github.com/Elkien3/cooking_fr
If you make your own recipes please share! :D I will put links to them here, make sure to say what other dependencies your recipe has.
I haven't made documentation for making your own crafts yet, but for now you can copy and edit the existing crafts to make your own.
It is similar to default recipe registration, but item groups (such as group:wood) aren't supported yet.
param2 for soups relates to the pixel selected from palette.png to be the soup's color.
License
https://github.com/Elkien3/cooking/blob ... icense.txt
Dependencies
default
Optional Dependencies
technic
farming (default or redo) (recommended)
flowers (recommended)
craftguide (recommended)
unified_inventory
Download
https://github.com/Elkien3/cooking/arch ... s/main.zip
Browse Code
https://github.com/Elkien3/cooking
How the mod works
There are 8 types of crafts:
Stacking: put items onto the plate in order and then dig with anything.
Mixing: put items into mixing bowl (order doesn't matter) and dig with spoon or stick.
Soup: put items into pot with water (order dosnt matter) and dig with spoon or stick. Use bowl to take and eat the soup. (It may need to be cooked first)
Cutting: put item onto cutting board and dig with sword.
Rolling: put item onto cutting board and dig with roller.
Pressing: put item onto hand press and dig with anything.
Stove/Oven: put fuel in bottom and item to cook on top. They do not share crafts. (Be careful, if you leave an item cooking too long it will burn.)
The mod has no craft guide of its own so it's highly recommended to use craftguide or unified_inventory (see optional depends)
Or if you're the trial-and-error type, don't xD
Addon recipe mods
Cooking Farming Redo (cooking_fr): https://github.com/Elkien3/cooking_fr
If you make your own recipes please share! :D I will put links to them here, make sure to say what other dependencies your recipe has.
I haven't made documentation for making your own crafts yet, but for now you can copy and edit the existing crafts to make your own.
It is similar to default recipe registration, but item groups (such as group:wood) aren't supported yet.
param2 for soups relates to the pixel selected from palette.png to be the soup's color.
License
https://github.com/Elkien3/cooking/blob ... icense.txt
Dependencies
default
Optional Dependencies
technic
farming (default or redo) (recommended)
flowers (recommended)
craftguide (recommended)
unified_inventory
Download
https://github.com/Elkien3/cooking/arch ... s/main.zip
Browse Code
https://github.com/Elkien3/cooking
Last edited by sparky on Mon Nov 14, 2022 16:50, edited 2 times in total.
- freshreplicant
- Member
- Posts: 224
- Joined: Sun Aug 09, 2020 10:37
- In-game: freshreplicant
Re: [Mod] Advanced Food Cooking [cooking]
This looks really nice, will try it out. I've always felt like Minecraft style cooking is a little bit too simple.
Re: [Mod] Advanced Food Cooking [cooking]
That's pretty great!
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile
Re: [Mod] Advanced Food Cooking [cooking]
Very nice.
What's the plan with foodspoil? Apart from the obvious. I mean, does the 4 have any significance, like a type of spoilage, or a duration, or is it just an arbitrary number for the time being? Cool idea, though I have no idea how you will make it work with all the varied types of bags and sacks and backpacks and boxes and refrigerators and shelves and other assorted storage mods. Won't stacking be a problem anyway?
Slabs can be a little problematic since there was no standardization between tree mods, so if you use several of them, it is absurdly easy to find yourself without access to the base minetest trees. Maybe something like putting an axe in the grid with a plank gives you 2 cutting boards and replaces the axe? "I sure wish I had only one cutting board," said no chef ever. Maybe they could even be wear items. I've gone through more cutting boards than axes in my personal life.
Is burned a thing yet? I'm not understanding how that works.
What's the plan with foodspoil? Apart from the obvious. I mean, does the 4 have any significance, like a type of spoilage, or a duration, or is it just an arbitrary number for the time being? Cool idea, though I have no idea how you will make it work with all the varied types of bags and sacks and backpacks and boxes and refrigerators and shelves and other assorted storage mods. Won't stacking be a problem anyway?
Slabs can be a little problematic since there was no standardization between tree mods, so if you use several of them, it is absurdly easy to find yourself without access to the base minetest trees. Maybe something like putting an axe in the grid with a plank gives you 2 cutting boards and replaces the axe? "I sure wish I had only one cutting board," said no chef ever. Maybe they could even be wear items. I've gone through more cutting boards than axes in my personal life.
Is burned a thing yet? I'm not understanding how that works.
- sparky
- Member
- Posts: 154
- Joined: Sun Oct 05, 2014 00:54
- GitHub: Elkien3
- IRC: ircSparky
- In-game: sparky
- Location: USA
- Contact:
Re: [Mod] Advanced Food Cooking [cooking]
foodspoil is a separate mod of mine I haven't published yet, it has no significance unless you happen to have it.
If the mod was installed the food item would spoil in 4 ingame days, which means it would no longer give any benefits when eaten (and if it's very spoiled it may damage you instead).
The expiration date is put in the item's meta, which is saved no matter what kind of storage it is put into. :D Stacking is an issue, as you cannot stack foods that have different expiration dates/meta. It has a few other issues and needs testing, which is why it isn't published.
hmm, I could also do a search of all items containing "slab" and "wood" and add crafts for them, otherwise I think I'd have to do a search for all axes.
Burning works by having a recipe automatically made for each cooked item that goes to "burnt food" or "burnt soup"
If the mod was installed the food item would spoil in 4 ingame days, which means it would no longer give any benefits when eaten (and if it's very spoiled it may damage you instead).
The expiration date is put in the item's meta, which is saved no matter what kind of storage it is put into. :D Stacking is an issue, as you cannot stack foods that have different expiration dates/meta. It has a few other issues and needs testing, which is why it isn't published.
hmm, I could also do a search of all items containing "slab" and "wood" and add crafts for them, otherwise I think I'd have to do a search for all axes.
Burning works by having a recipe automatically made for each cooked item that goes to "burnt food" or "burnt soup"
Re: [Mod] Advanced Food Cooking [cooking]
I saw you were storing data in the meta. I did not see that the graphic changes based on the meta data. Granted, at the moment, no big deal because the food never spoils. Just wondering if the expectation is that the player is going to be expected to keep track of the food he cooks and make sure he tosses it before it spoils or if there will be some visual cue that this food is only good for composting.
Not sure about the stack size. One inventory slot of soup is worth 6. One inventory slot of apples is worth almost 200, of bread, almost 500. That's a pretty major change in gameplay. OTOH, if there's no spoilage, might as well set stacksize to 99.
Or maybe the long range goal is to get rid of apples and other existing food?
Don't take any of this negatively. In part I'm fishing for ideas about what you've done, thought about, rejected, etc. A few of the students have been toying with making a more intensive survival game, and while they haven't gone to this extent (yet) that is the plan. They've chosen to address the food spoilage with things like canning or crocking the prepared foods, storage conditions that extend food life (portable like a thermos bottle to permanent like a root cellar), things like that. The best answer they've come up with so far on the stack problem is making larger batches or, alternatively, making a portion be "worth" more. This coupled with a drastic rescale of Wuzzy's satiation ([hbhunger], IIRC) anyway.
Another option that's skirting the boundaries of verisimilitude is "resetting" the expiration by weighted average by adding fresh food to it, i.e., if you have 3 portions left of food that expires in 1 day, and you add 3 portions that expire in 7 days, you end up with 6 portions that expire in 4 days. This also fixes the problem of having the entire inventory space taken up by single portion servings by explicitly allowing you to stack them. But it's not a great answer either.
Working around the existing food is a major deal.
Not sure about the stack size. One inventory slot of soup is worth 6. One inventory slot of apples is worth almost 200, of bread, almost 500. That's a pretty major change in gameplay. OTOH, if there's no spoilage, might as well set stacksize to 99.
Or maybe the long range goal is to get rid of apples and other existing food?
I just wasn't seeing how it was ending up burned. I didn't see where just leaving it on the stove was resulting in "burnt soup"
Don't take any of this negatively. In part I'm fishing for ideas about what you've done, thought about, rejected, etc. A few of the students have been toying with making a more intensive survival game, and while they haven't gone to this extent (yet) that is the plan. They've chosen to address the food spoilage with things like canning or crocking the prepared foods, storage conditions that extend food life (portable like a thermos bottle to permanent like a root cellar), things like that. The best answer they've come up with so far on the stack problem is making larger batches or, alternatively, making a portion be "worth" more. This coupled with a drastic rescale of Wuzzy's satiation ([hbhunger], IIRC) anyway.
Another option that's skirting the boundaries of verisimilitude is "resetting" the expiration by weighted average by adding fresh food to it, i.e., if you have 3 portions left of food that expires in 1 day, and you add 3 portions that expire in 7 days, you end up with 6 portions that expire in 4 days. This also fixes the problem of having the entire inventory space taken up by single portion servings by explicitly allowing you to stack them. But it's not a great answer either.
Working around the existing food is a major deal.
- sparky
- Member
- Posts: 154
- Joined: Sun Oct 05, 2014 00:54
- GitHub: Elkien3
- IRC: ircSparky
- In-game: sparky
- Location: USA
- Contact:
Re: [Mod] Advanced Food Cooking [cooking]
I don't have any visual indication apart from it saying the expiration date on the item description.
that's all handled in the other mod, I just added the registration to this mod since I'll be using them together in the future.
I'll remove the soup stack limitation if you'd like, I suppose my logic was that it's harder to carry around a lot of open bowls of soup than of apples xP I suppose it's established that Sam has an inhuman ability to carry any type of item so it's not a big deal.
For my purposes I want to encourage meals to be prepared shortly before consuming them so large meals that take up a whole slot may be my personal preference, but others may need it set up differently.
I made apple pies stack and they give satiation more than mushroom soup. I suppose I should be consistent. xP
I somewhat implemented a "weighted average", but only when items of different spoilage are being crafted together. (eg: combining 1 old wheat and 2 new wheat to make dough results in a slightly old dough, which results in a slightly old tasting bread)
I figure if 1 minetest day is too short and stacks are split too much because of it one can round to the nearest even, 5th, or 10th day for items with long enough lifetimes for it to not be a big deal.
All I've done for preservation is making an icebox that doubles the lifetime of the item by adding a day to the expiration every two days.
kinda funny we're talking about this when the cooking mod on it's own has none of these features xP
So you don't think soup should burn? or you don't see the code that handles it?
that's all handled in the other mod, I just added the registration to this mod since I'll be using them together in the future.
I'll remove the soup stack limitation if you'd like, I suppose my logic was that it's harder to carry around a lot of open bowls of soup than of apples xP I suppose it's established that Sam has an inhuman ability to carry any type of item so it's not a big deal.
For my purposes I want to encourage meals to be prepared shortly before consuming them so large meals that take up a whole slot may be my personal preference, but others may need it set up differently.
I made apple pies stack and they give satiation more than mushroom soup. I suppose I should be consistent. xP
I somewhat implemented a "weighted average", but only when items of different spoilage are being crafted together. (eg: combining 1 old wheat and 2 new wheat to make dough results in a slightly old dough, which results in a slightly old tasting bread)
I figure if 1 minetest day is too short and stacks are split too much because of it one can round to the nearest even, 5th, or 10th day for items with long enough lifetimes for it to not be a big deal.
All I've done for preservation is making an icebox that doubles the lifetime of the item by adding a day to the expiration every two days.
kinda funny we're talking about this when the cooking mod on it's own has none of these features xP
So you don't think soup should burn? or you don't see the code that handles it?
Re: [Mod] Advanced Food Cooking [cooking]
No, leave things per your vision. Obviously when you add the spoilage rate, stacking toast and jam is going to be different that stacking cobblestone, so there's no point changing that then changing it back. All I was getting at is that we had tried to figure out some advantage to give to prepared food over just carrying a stack of apples, and were running into problems coming up with something that would not entail rewriting every other food source in the game.
Yes, I understand this particular mod has little to do with the things I brought up. I initially gave your mod a pass, then on a lark decided to look at the code and saw you were thinking about some of the same things the students were also thinking. There's much to be gained by a multiplicity of approaches.
Yes, I understand this particular mod has little to do with the things I brought up. I initially gave your mod a pass, then on a lark decided to look at the code and saw you were thinking about some of the same things the students were also thinking. There's much to be gained by a multiplicity of approaches.
The latter. I didn't see it. TBH, I was more skimming it, paying special attention to the concatenation. Lua is really easy to embed malicious code into that way, and while I don't suspect anyone, I'm not the type to just put code on a LAN and hope for the best.
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: [Mod] Advanced Food Cooking [cooking]
It looks like a decent compromise between ease of implementation and level of detail was reached.
- sparky
- Member
- Posts: 154
- Joined: Sun Oct 05, 2014 00:54
- GitHub: Elkien3
- IRC: ircSparky
- In-game: sparky
- Location: USA
- Contact:
Re: [Mod] Advanced Food Cooking [cooking]
Ah, I added a "burned" option in the craft definition that let's you pick what it turns into when burned.
here is the code that automatically makes the burn craft:
No worries, I don't mind discussing things, discussions are needed to explore better potential options. :D
My plan is to lower the value of eating raw foods, so a raw apple would only give 1hp, then make prepared foods give more and more based on how much work is taken to prepare.
I did it somewhat already, if you cut a loaf of bread, cut it in slices, and then toast the slices, it will altogether give more hp.
Three mushrooms by default would give 3hp total but with mushroom soup it's worth 6hp.
And making a jam out of berries and putting it on bread gives more hp than eating the berries raw.
It's not entirely true to real life but it should give the encouragement needed to cook.
This mod is just a piece of my whole plan (which isn't completed yet), but I wanted to release it separately so people could enjoy the mod and also tweak to fit their own needs.
Code: Select all
cooking.register_craft({
type = "stove",
cooktime = 10,
recipe = "cooking:mushroom_soup_uncooked",
output = "cooking:mushroom_soup",
burned = "cooking:burnt_soup"
})
Code: Select all
cooking.registered_cookcrafts[table_to_string(tbl.output)] = {output = tbl.burned or "cooking:burnt_food", time = 60, method = tbl.type}
My plan is to lower the value of eating raw foods, so a raw apple would only give 1hp, then make prepared foods give more and more based on how much work is taken to prepare.
I did it somewhat already, if you cut a loaf of bread, cut it in slices, and then toast the slices, it will altogether give more hp.
Three mushrooms by default would give 3hp total but with mushroom soup it's worth 6hp.
And making a jam out of berries and putting it on bread gives more hp than eating the berries raw.
It's not entirely true to real life but it should give the encouragement needed to cook.
This mod is just a piece of my whole plan (which isn't completed yet), but I wanted to release it separately so people could enjoy the mod and also tweak to fit their own needs.
- GamingAssociation39
- Member
- Posts: 858
- Joined: Mon Apr 25, 2016 16:09
- GitHub: Gerold55
- IRC: Gerold55
- In-game: Gerold55
- Location: Maryland, USA
Re: [Mod] Advanced Food Cooking [cooking]
It would be cool if eventually there would be a mod that will make it so you need to have a variety of foods each day/week etc etc
Jesus Is Lord and Savior!!!
Re: [Mod] Advanced Food Cooking [cooking]
Vintage Story has a good model for that. https://wiki.vintagestory.at/index.php?title=SatietyGamingAssociation39 wrote: ↑Sat Jan 08, 2022 09:57It would be cool if eventually there would be a mod that will make it so you need to have a variety of foods each day/week etc etc
Basically, you have hunger bars for fruit, grain, dairy, protein and vegetable. Keep them all high and you get a boost in HP. It's not that you are penalized for bad diet as you get a pretty decent boost (nearly doubled HP) for having a good diet. You could probably even use one of the player physics mods here to give boosts to running or jumping or whatever, depending on nutrition.
When I first loaded this mod, I immediately thought something like that might be what sparky was going for. We just weren't ambitious enough to adjust all the other foods in the game, changing the values of Eat() and adding spoilage values.
[EDIT]
It occurs to me, sparky, that if that's the direction you are headed, maybe all you would need to do is set the satiation bar (what Wuzzy called it) to 200 (or whatever) instead of 20, and leave all the other values the same, so it takes 30 apples to fill the fruit bar, but give a huge boost to a carried meal such that it restores most of the satiation bar while simultaneously increasing the bars for each food group that meal contains.
You still need to add spoilation compatible with your mod for at least the base game food, and ideally, for the more popular farming mods.
If you want to support [cooltrees], I'd recommend adding "nuts" as a food group all its own -- chestnuts and acorns appear by the bushelbasket.
[/EDIT]
Re: [Mod] Advanced Food Cooking [cooking]
We are really interested in this. Are you planning to work on it some more?
Thanks!
Thanks!
- sparky
- Member
- Posts: 154
- Joined: Sun Oct 05, 2014 00:54
- GitHub: Elkien3
- IRC: ircSparky
- In-game: sparky
- Location: USA
- Contact:
Re: [Mod] Advanced Food Cooking [cooking]
sorry for late reply
well, this mod is just for crafting food items, not going to have any spoilage or nutrient based satiation built in.
My plans to add to this mod specifically is perhaps a 'age' craft type, where the item sits out for a certain amount of time. (example: you leave bread dough out for a bit for it to rise), and eventually I'll have a recipe pack with food items from made from farming_plus crops and animal products from mobs
If there is some changes or callbacks I need to add to help give support to spoilage or nutrient based satiation mods I could do that. most things should be possible with minetest.override_item, any such mod would have to override default food items anyway.
well, this mod is just for crafting food items, not going to have any spoilage or nutrient based satiation built in.
My plans to add to this mod specifically is perhaps a 'age' craft type, where the item sits out for a certain amount of time. (example: you leave bread dough out for a bit for it to rise), and eventually I'll have a recipe pack with food items from made from farming_plus crops and animal products from mobs
If there is some changes or callbacks I need to add to help give support to spoilage or nutrient based satiation mods I could do that. most things should be possible with minetest.override_item, any such mod would have to override default food items anyway.
- sparky
- Member
- Posts: 154
- Joined: Sun Oct 05, 2014 00:54
- GitHub: Elkien3
- IRC: ircSparky
- In-game: sparky
- Location: USA
- Contact:
Re: [Mod] Advanced Food Cooking [cooking]
I've done a few fixes to the cooking mod, and added a farming redo cooking mod addon (see original post)
-
- New member
- Posts: 1
- Joined: Fri Jan 12, 2024 13:42
- In-game: --shykitty--
Re: [Mod] Advanced Food Cooking [cooking]
Best cooking mod ive seen, itll be hard to make something more advanced than this. It gives a realistic vibe that we have to mix food, cut vegetables and etc. Sometimes it crashes when i try to mix or stack items but it seems to only happen when try to make like a heartstopper burger or something with alot of ingredients, so i stick to smaller ingredient foods and it works. Very fun and definetly recommend :D
Who is online
Users browsing this forum: No registered users and 22 guests