Food mechanics - how does it work?

As the title suggests, for " Stonehearth vanilla version 1.1 " + " ACE Mod 0.9.3.3 " . I felt this post was necessary in order to create one single place where some " hidden " food mechanics are better explained.

1 - How do hearthlings priorize which cooked food they should eat first? Is it through cooked food appeal value? And if you have a lot of one single " high value / priority " food, will all hearthlings eat all of it first before going for other " lower value / priority " food?

2 - As far as i understood cooked food is divided into " servings ", so 1 unit of " bug meat stew " = many portions for many hearthlings. Is the number of servings a fixed number for all cooked food?

3 - As far as i understood, one 11x11 farm field has room for 66 plants, but one harvested plant inside that field does not yield one food basket, instead a farmer has to harvest a variable number of plants (depends on the crop) to yield one full basket; for example, 5 plants for 1 full basket of wheat, 2 plants for 1 full basket of paddy, 9 plants for 1 full basket of corn. Those are maximum numbers, it can be lower than that - for example, if there are no more plants left to be harvested. The question: does the number of stacks inside a basket affect the number of servings inside a unit of cooked food?

4 - Where and/or how can i find all these information?

Sorry for the long post, and thank you very much for everyone that minded reading and answering. If something i wrote is wrong, please correct me.

I’ll answer the easy ones because I’m lazy.
2 - No.
3 - No.
4 - For 2, inside the JSONs for the food_container versions of the food entities (not the serving versions); for 3, it’s based on the number of stacks expressed in the basket version of the food entity combined with the perks that the farmer harvesting it has.

1: actually i dont know, but it seems rather…random to me.
2&3 what paul said
4: depends on what you know already stonehearth modding wise, though pauls answer is correct (its paul, he knows his shit) i dont know if its full enough for you so if you need specific explanations dont hesitate to ask.

Ok, i managed to find and open the files. For those that do not know how, find your Steam directory, the path should be like this Steam\steamapps\common\Stonehearth\mods , there you will find three files with .smod extension :

stonehearth.smod (this is the main file for vanilla).
northern_alliance.smod
rayyas_children.smod

They are simple renamed zip files, just unzip them and inside you should find through “entities > food” the relevant files, which can be opened with Notepad++. For example inside the corn directory you will find corn_basket.json and corn_serving.json , inside the meat stew directory you will find meat_stew.json and meat_stew_serving.json .

For ACE related content, you will search through Steam\steamapps\workshop\content and once there you will have to search for stonehearth_ace.smod file - unzip , “entities > food” .

I have got these questions:

5 - I found two parameters, " quality " which seems to be associated with food priority - the higher the more likely hearthlings will pick it up first; and " satisfaction " which seems to be associated with hapiness, there are two values, one for eating sitting on a chair and one for eating sitting on the ground. Am i correct about both?

6 - How do you convert the satisfaction parameter into " in game " hapiness? Do you divide by 20 or something like that?

7 - For meat stew i also found " max_stacks " = 40 and " stacks_per_serving " = 6. If i understood it correctly then for one unit of meat stew i have 7 servings; am i correct? Or is it rounded down to six?

8 - It seems that final product parameters are somewhat independent from input products parameters. For example, if i create one unit of veggie stew, it requires 3 baskets of vegetables, and satisfaction/quality/“ammount of servings” will be EXACTLY the same whether it is done with “3 half full baskets of corn” (less than maximum ammount of stacks in each basket) or “3 full baskets of carrots”. Am i correct?

In bed now so can’t dubbel check so I’ll answer 8 for now and the rest edit in later
8- yes, imput is completely seperate from outout

Does anyone else know the answers?
I have created a spreadsheet with “in game”/“in file” names, max_stacks , max_stacks_per_serving , quality , satisfaction (sitting and default) for food and i am willing to share it here if the forum rules allow.
I would like, however, to know at least the answers to questions 5 and 6 before posting.

quality is an attribute that makes them like the food or not, check the character sheet after they eat something, you will see things like “I ate a raw food”
The values goes from 1 to 3 for raw food, 1 is bad food, 2 normal, and 3 is good raw food.
And they go from 4 to 6 for prepared food, 4 is bad, 5 normal, and 6 good prepared food

Satisfaction is how much it fills their stomach, so they require less items if they have higher satisfaction. For example, berries have low satisfaction, so they need to eat many times to stop being hungry, where a cake fills then at once

The max stacks means that the item when full has all those stacks, and stacks per serving means each time someone grabs that food to eat, it will remove that amount from the max stacks, until it reaches 0 which makes the food disappear

3 Likes

Food ACE0933.zip (19.8 KB)

I attached the spreadsheet i mentioned above, it is a zipped .ods file done with Libre Office (i used comma as decimal separator). The last spreadsheet “tab” ( Final ACE 0933 ) contains a summary of most important values for all cooked food ( quality, satisfaction while sitting on a chair, number of servings ). Feel free to change, improve or add stuff - there is certainly room for it.

First of all, thanks everyone - but specially you Bruno, you explained stuff that is hard to find on internet. I am really grateful to you.

9 - I have one last question: in order to have an idea of how much time hearthlings will feel their stomachs full with a given food (thus a specific satisfaction value), i need to know how much " calories " they burn in a 24 hour cycle (sorry, i do not know what is the “in game” name for that parameter). Do you have an idea of how much is that " calories " value ?

Oh, I had one already, vanilla only, but is more complete, has gold value, if it is raw or cooked, etc…
food.zip (9.7 KB)

1 Like

Let us hope someone else joins both spreadsheets in a more complete one - someday :sweat_smile:

In base_human.json, you can find the min and max calories a hearthling can have, it ranges from -24 up to 88.
They lose (by default) 1~2 calories per hour. (as in the consuption_component.lua and constants.json)

2 Likes