Project Zomboid

Project Zomboid

Auto Cook B41
 此主题已被置顶,因此可能具有重要性
Tchernobill  [开发者] 2021 年 10 月 29 日 下午 6:56
You have a better algorithm for food selection ?
Please detail your expected algorithm here.
< >
正在显示第 1 - 15 条,共 28 条留言
LyraLux 2021 年 11 月 1 日 下午 1:12 
Not an algorithm, but a small fix request. A lot of meals were updated to be "better hot", but you've probably noticed that well over half those "better hot" foods instantly cool in your inventory. Is it possible to tweak how long something stays "hot"?

Bowl of beans for example. You can eat that right out of the campfire and it will lose it's "better hot" bonuses by the time your survivor starts eating. Realistically, most cooked foods stay warm for 15 to 30 minutes, and I know a bowl of hot cooked banes falls into the latter from experience!

Not to mention, full on meals can stay warm up to an hour.

Maybe a separate mod for this? I'd make it myself if I knew more about coding, but I'm still learning. Painfully slow.

If nothing else, applying it to your own mod here would be great. Ty for your time! Ty for the mod.
最后由 LyraLux 编辑于; 2021 年 11 月 1 日 下午 1:13
Tchernobill  [开发者] 2021 年 11 月 1 日 下午 1:16 
From what I see in the code, the difference is -2 hapiness for bad-cold and + 2 happiness for good-hot. It remains hot for ~10 in game minutes instead of the ~30 you expected.
This 2 happiness difference is not significant enough for me to go further. The 10 Vs 30 minutes seems not very significant either. I guess they'll make higher stakes when they fully implement / rework temperature in the future.
Tell me if I'm wrong.

Meanwhile you can abuse a temperature bug with PZ41 : move the beans from the heat source to the ground (NOT to your inventory). You'll have infinite hot beans, but they'll rot.
最后由 Tchernobill 编辑于; 2021 年 11 月 1 日 下午 2:06
dread_ 2021 年 12 月 14 日 下午 12:59 
Hello, not a better algorithm per se, more of a request:
Could you make it so that certain 'recipes' are saved? E.g. I lets say I prepare a salad with cabbage, potatoes and carrots (I'm not sure if these are actual ingredients, I rarely use salad). After finishing, I have to option to save this recipe (lets call it 'Nicesalad'), and next time I want to prepare something, I can chose 'Nicesalad' and the character prepares the exact same recipe (if ingredients are available).
Also, could you also implement the autocook for soup/stew?
Tchernobill  [开发者] 2021 年 12 月 15 日 上午 10:01 
Soup and stew are simple recipes, not evolved recipes. They are already available in one click, aren't they ?

The idea of our own recipes is interesting but this is slightly different purpose for a VERY different implementation. I am not interested in implementing it for now. I wish you someone else does.
最后由 Tchernobill 编辑于; 2021 年 12 月 20 日 下午 3:36
Zeng Xiao 2022 年 1 月 18 日 下午 10:57 
I have an algorithm, well 3 actually.
The mod could add 3 menu actions:
1, autocook flavorful xxx (max happiness): take random ingredients that has not been added until no more new ingredient or cannot add ingredient.
2, autocook filling xxx (max hunger): take the highest hunger option, but do not take something more than 3 times (as that reduces happiness)
3, autocook nutritious xxx (max calories): for characters with nutritionist perk, take the option with highest calories, but do not take something more than 3 times. for characters without nutritionist perk, take everything but vegetables and fruit first.
nickodemos 2022 年 1 月 23 日 下午 1:46 
Possibly, when searching, take the oldest of an ingredient.
Zeng Xiao 2022 年 1 月 23 日 下午 5:25 
引用自 nickodemos
Possibly, when searching, take the oldest of an ingredient.
The algorithm shouldnt do that as this information is not revealed to the player, but the algorithm can take stale ingredient before fresh i guess
nickodemos 2022 年 2 月 5 日 下午 10:45 
Yes. The idea was stale over fresh.
Gunther Strike 2022 年 4 月 3 日 下午 12:14 
引用自 Zeng Xiao
I have an algorithm, well 3 actually.
The mod could add 3 menu actions:
1, autocook flavorful xxx (max happiness): take random ingredients that has not been added until no more new ingredient or cannot add ingredient.
2, autocook filling xxx (max hunger): take the highest hunger option, but do not take something more than 3 times (as that reduces happiness)
3, autocook nutritious xxx (max calories): for characters with nutritionist perk, take the option with highest calories, but do not take something more than 3 times. for characters without nutritionist perk, take everything but vegetables and fruit first.


I am interested in trying to make that if you want. I'll rewrite a mod of my own if I can learn PZ modding quickly so you can choose between these preferences and if you want to use salt (used for baking cakes and is resource limited while only giving +1 bonus in meals anyway)

I'd also like to make use stale ingredients in priority and if you're cook level 7, use rotten (togglable in the mod preferences)
最后由 Gunther Strike 编辑于; 2022 年 4 月 3 日 下午 12:15
gabes 2022 年 8 月 12 日 上午 12:34 
could you possibly limit the amount of spices? I swear to god auto cook is adding every possible spice I have and making +70 happiness foods every time lmao
but it's a really nice mod
最后由 gabes 编辑于; 2022 年 8 月 12 日 上午 12:35
Undefined (已封禁) 2022 年 8 月 25 日 下午 6:01 
I love your mods and have most of them!

One thing with AutoCook, that I'm digging through your code right now, is to figure out how to disable the usage of spices.

Considering spices do nothing but decrease unhappiness, and don't give out XP for their usage, I'd prefer not to use them.

I have no experience modding PZ, and my Lua coding is rusty as hell, so wish me luck.

I'm thinking all that needs to be done is a check for

item.Spice ~= true

in AutoCook:chooseItem

EDIT: Nah, didn't work. :(

I figure there's a function we can call to check the object's Spice value but, without access to the source code, I'm at a loss as to the name of the function.
最后由 Undefined 编辑于; 2022 年 8 月 25 日 下午 11:21
Undefined (已封禁) 2022 年 8 月 26 日 上午 7:28 
引用自 gabes
could you possibly limit the amount of spices? I swear to god auto cook is adding every possible spice I have and making +70 happiness foods every time lmao
but it's a really nice mod
I think I figured it out

1. Go to mods\AutoCook\media\lua\client
2. Open the AutoCook.lua file and go to line 84
3. Replace line 84's code with this:

if instanceof(item, "Food") and not item:isSpice() and not self.playerObj:isKnownPoison(item) and (recipe:isCookable() or not item:isbDangerousUncooked() or item:isCooked()) then--do we risk to apply also survivor / carpentry / .. recipes ?

The new line of code that is being added is

and not item:isSpice()

If you don't have a code editor that displays the line number, just do a search for

if instanceof(item, "Food")
最后由 Undefined 编辑于; 2022 年 8 月 26 日 上午 7:31
Tchernobill  [开发者] 2022 年 8 月 26 日 上午 7:33 
Thanx and good work "Undefined".
I'll see to integrate this in vanilla when a find a way to select with / without spice.
Undefined (已封禁) 2022 年 8 月 26 日 上午 7:34 
Funny story: My character went from 80 weight to 93 from all the spices it was adding. XD

Normally, I just eat veggies and rabbit meat, but the spices added so much calories. At least I learned I can get his weight up by just adding spices. :D
Undefined (已封禁) 2022 年 8 月 26 日 上午 7:35 
引用自 Tchernobill
Thanx and good work "Undefined".
I'll see to integrate this in vanilla when a find a way to select with / without spice.
No problem and thanks for all the great mods you make.
< >
正在显示第 1 - 15 条,共 28 条留言
每页显示数: 1530 50