Food production and Land Use

Post here your suggestions for future Towns releases

Food production and Land Use

Postby Aphid » Tue Jul 24, 2012 10:35 am

As is in the real world, your food production in this game is limited to your land use, with one exception.

E.g. harvesting wheat, the maximum production value is 1/2420 utt. (Units per tick per tile). Measuring in utt seems a bit nonuseful, as the numbers are rather small to work with. Rather going by uutt (micro-utt) seems a good way to express efficiency, so I'm going with that and list it in this way. Of course, the maximum production value is only reached if there are enough townies doing nothing, and townies are kept as close as possible to the wheat seeds at all times, so that these are immediately harvested when they pop up into full-growth.

Here's a listing of relative production values in uutt, measured per tile. Now there is some calculus involved to getting the numbers. I do assume that the actual probability is a constant chance of all real values in between the average and the average +/- half the dice size, which for our purposes will be good enough (within 0.01% of the actual answer), to prevent having to do lots of work.

Code: Select all
Formula used:
f[p, v] := 1/(2 v) (Log[p + v] - Log[p - v])
p is the average production (base plus half die size), v the max. variation (half the die size). p-v>0!
Log is the base e logarithm
For v=0, the formula goes to 1/p.
Divide by 9 for meats (the building takes up 9 tiles!)


Eggs, Milk: Infinite
Radish: 481.4
Wheat: 426.1
Mushroom, Cave Mushroom: 322.1
Apple, Pear, Banana, Snowcherry: 129.0
Cactus: 128.3
All Meats: 38.6

Now we can use these numbers to look up the production of dishes, e.g. how many % filling can we make off of one tile per 1,000,000 ticks with each dish?

Code: Select all
Formula is, simply:
P/ (N1 / I1 + N2 / I2 + ...)
where N1 is the amount of I1 you need, N2 of I2, etc. And I1, I2 are the numbers for the ingredients ( so 426.1 for wheat, etc.), and P the fill percentage. Eggs/milk have infinite I so can be left out.


90 (i)Omelette: INFINITY
5, 15 (i): RAW eggs/milk: INFINITY
50 (i)Cookie: 21300
75 Bread: 15978.8
75 Mushroom Soup*: 12078.8
130 Banana Bread: 10444.5
20 RAW radishes: 9628
90 Jungle Salad: 9156.4
110 Snowcherry Pie: 8838.4
115 Baked Banana: 7417.5
85 Apple, Pear Pie: 6829.7
80 Banana Pie: 6427.9
100 (i)Cactus Soup: 6415
120 (i)Ham and Eggs: 4632
105 Pork, Steak: 4053
125 Mountain Stew*: 3892.1
100 Poultry: 3860
90 Badger: 3474
100 Meat Pie: 3267.8
150 Special Roast: 1930

*Desert only, unsustainable in other climates (bushes run out, snow for water runs out).
(i) Inflated due to the potential of eggs and milk. Stew is not since I expect obtaining water to be fixed.

There's a point to be made here, the lower filling foods should generally be more efficient, and/or easier to craft, while a high-fill food can have rare ingredients (snowcherry?). Note how bread is more space-efficient than even banana bread, contrary to what you might expect! Note: The wiki is wrong about jungle salad being much worse than banana bread. It's fairly close, and it's BEST, apart from those eggs, in jungle maps where there ain't wheat available. Also interesting is how good radishes are. Just eating raw radish allows real good land use. Too bad there aren't good recipes with them, because banana grows so slowly. Not that raw radish is a good option because townies spend too much time eating.

Now, I don't know if you've noticed, but the production seems a little too high for meats relatively, and massively off for eggs/milk, as well as too high in general. Farming requires too little space is the general issue. Now an animal farm, when used for meats, takes up actual space, as it takes up 9 tiles of land to produce an animal every X ticks. Just up X and we get balance with other types. Eggs/milk are the big issue and that's where the suggestion comes in.

Currently, a single chicken farm can theoretically sustain the maximum amount of townies you can possibly have on the map. (map is 256x256x10 = 655360 tiles, so you're looking at around 60,000 townies), by piling on a metric tonne of chickens in a small pen. The chickens will produce eggs every so many ticks and there's no limit to the amount of chickens that can fit in one tile. This just seems off somehow. Chickens also don't die, and even if everything had realistic lifespans, chickens can produce 1,000-2,000 eggs in their typical lifespans, so this would not really matter.

I suggest that animals till the tile they stand on when producing an egg or a milk. Grass grows back automatically in X ticks. Animals cannot spawn eggs or milk unless standing on grass / jungle / etc.

Would fix this and add a space requirement to this type of food. The exact space requirement can be balanced with X. If one is looking for somewhat harder gameplay still than this, growth can only happen iff there is grass in a neighbouring tile. For the optimalization freaks out there it just means for number purposes we can halve X. This is an interesting addition, as it will not harm a small farm with a few chickens, but large farms will need strips of fences to optimize egg throughput. What if a layedeggchicken is about to turn into a chicken? It can only do so when standing on actual grass.

The second thing, balancing meat versus wheat, is very well done. :D The advantage to meat should be that meats are generally more filling and/or easier to cook (less steps involved). Which is generally true currently, banana bread is very complicated to make, requiring two cook jobs, one mill job, two harvest jobs, and four haul jobs, total of 9 separate jobs for one banana bread. Compared to a roast, which is three haul jobs, three butcher jobs, and one cook job, or only 7, while being 150% versus 130%. The roast is much less labour intensive, as it should be. Also, the meat takes up much more space, as it should.

And thirdly, perhaps the more important one, would be some difficulty setting for farming efficiency, which multiplies all the growth speeds by a factor to increase land use by just that factor. E.g. this would increase the growth speed of grass, the amount of ticks it takes for fruit to spawn, the growth speed of wheat and, last but not least, the speed at which animal farms generate animals. The user that wants to have a town with a more realistic land use (and really hard to start up) could have his way, as can the user that just wants food production small and simple. For me I'd like a factor of x100 or so, as I find I can supply quite the number of townies off of even a small meat farm, let alone what happens with bread.

Fourth: Why can't I obtain a bucket of water from the river in my jungle or desert map? That seems weird. It would make stews and soups possible in jungle maps, because you run out of bushes real fast.
Aphid
 
Posts: 14
Joined: Tue Jul 24, 2012 9:01 am

Re: Food production and Land Use

Postby YetiChow » Wed Jul 25, 2012 7:21 am

You do know that milk can be used to make stew, right? Not a dig, but from the skim-read of your post I took you seemed to have overlooked this. Of course it could have been me overlooking your not overlooking of this fact...

The other thing you have to factor in is the fill-time and random length between townies feeling full and becoming hungry. By the time you have all the random dice rolls in place and all the possible variations accounted for, mean scores are almost useless as they could be as much as 1000% out (e.g. the average score for a particular food is x uutt, but the actual uutt value is 1000% longer or shorter). The better measure to use is the median, as outlying values have less of an effect.

Still, I'm impressed by your dedication and savvy to run those numbers - I'm fairly good with maths myself but I'm pretty sure my head would have exploded beore I got half way :lol:
What's that you're eating? A nice, juicy apple? You weren't supposed to eat that you fool, you were supposed to make it into a pie! - last words recorded words of Francis D'Avre before he went looking for snowcherries, but found a hungry Yeti instead.
YetiChow
 
Posts: 2174
Joined: Wed Apr 25, 2012 9:26 am
Location: Cramped between a Yeti's small intestine and its stomach... trying not to dissolve!

Re: Food production and Land Use

Postby Aphid » Wed Jul 25, 2012 7:29 am

Some clarifications for the above post {putting this in a separate post}. Some other assumptions were made without telling the reader.

First , any towns player will tell you a banana tree sometimes dumps two bananas, not one. However, I have yet to find configurations of trees and paths that make full use of this without wasting so much land a tight grid of trees would give around the same efficiency. For example, using long stretches of empty grass in between tree groups yields only 66.7% use. I have not yet measured the extent of double-drops (their relative frequency), and have a distinct impression that it might depend on the particular layout. So far in the layouts I've tried it always ended up worse. Some smart person might try some things though to see if they can improve my numbers.

Second, this has been written with 0.50 in mind. I figure mills may be built on the 1st, 2nd, etc. floor. Combine this fact with the average qty. of land taken up by stone patches (which are completely infertile save for the magic infinite egg/milk exploit farms), a mill will not take the place of fertile soil in this version unless you really want to go for optimum labour efficiency (we're going for land use efficiency, a different beast entirely). Whence the land taken up by mills is not taken into account.

Third, the same goes for land taken up by fences, roads, andsoforth, as the density of this depends on the particular layout and not so much on the chosen crop. A 9x9 fenced field with stair* works just as well for cows as it does for apple trees, wheat, and so on.

*A trick I've started to use. Completely fence around farms. This forces people to use a particular stairs to get to them, allowing you to optimize your town better for food production. Also, if the closest dump spot for each tile in the fenced off area by manhattan distance is inside said area, it greatly reduces stupid pathfinding occurrences.

Responding to YetiChow: I have not overlooked this. However, milk has infinite land efficiency. In theory you can do with just one cow or unifallow farm, or a total of 9 tiles used. In practice it translates to 25 tiles for a slow growing town to keep the cows contained, or additional sets of 3x3 added if the town is fast-growing (the rate at which one cow farm increases milk production might not be enough). Whence the spatial requirement is insignificant.

And secondly, the amount of time townies take to get hungry, this being hungry and all, this seems hardly relevant. The only real assumption I make is that if I have two foods with fill rates 'A' and 'B', that if I took a million townies, I would need B/A times as much B as A to keep a food supply of 1,000,000 units constant. Putting the supply at the number of townies ensures that any townie that goes into the hunger zone immediately gets fed. Any more than that is just a safety buffer and won't increase consumption. This is a fairly reasonable assumption to make, because why else would the devs prettily present those percentages so pristinely to the player? In any case, we could run an experiment, or look into the code and see if one can do a deduction.

The second random factor, the age of the crop has been accounted for.

The third random factor, the time it takes from the completion of the growth cycle before a townie harvests an item, is assumed insignificantly small. In reality, this is a number that depends on the size of your town, but in practice measuring it yields very low values for fully operational farms with large quantities of idle citizens. In fact, in theory, with one idler per farm tile, manually repositioned each harvest, it will be exactly 0. Harvesting time itself is a constant (I believe 120 ticks?), and already factored in.

Finally, I do wish to advise against using these numbers to compute how much space you need for your farm. Generally, get about twice as much, at the very least. There's one thing I've left unaccounted that actually IS a big flaw, and there's no way to account for it either. Stupidity. E.g. the townie that gets hungry, gets a bellyache, walks very slowly to the wheat farm, picks up a wheat. Then walking out of the wheat farm, all around the millhouse, dumping the wheat on the other side of the fence, going underground through the living complex first. Then taking the wheat all the way back to the mill (next to the darn farm), to turn it into flower. Then taking the whole route twice again. And finally dying before reaching the bakery. All this meant we had a mill at very reduced production rates. Other parts of the system may suffer as well so building to large overcapacity is probably the way to go.
Aphid
 
Posts: 14
Joined: Tue Jul 24, 2012 9:01 am

Re: Food production and Land Use

Postby caprontos » Wed Jul 25, 2012 2:09 pm

They are considering making it so you have to feed animals.. and that will make it so you need a wheat farm to feed how ever many animals you have... This will mostly effect chickens and cows for eggs and milk... and not so much effect I assume large meat producing farms.. Since your constantly killing animals off they shouldn't need to eat much if at all depending how close you are..

but if you have 100 chickens you will need to be able to feed them..

This may actually make meat worth while for a change.. or bread the most valuable :P
Image
Cha Cha Cha!
User avatar
caprontos
 
Posts: 3355
Joined: Wed Apr 04, 2012 3:18 am

Re: Food production and Land Use

Postby Aphid » Wed Jul 25, 2012 11:39 pm

If we need to feed animals with wheat, the logical step would be to have it turn 1 wheat into an egg or milk. E.g. simply have a required item tag for wheat for the milking and egglaying actions for a townie. The townie will 'feed' the animal to retrieve the egg. This forces a certain amount of material (one) to be used per egg created, allowing for easy balancing. But how do we get wheat in the desert, or jungle? Grazing as described above seems like an o-kay solution right off the bat. Feeding might be a little difficult though. I suppose we could feed the animals straw instead of wheat. Straw should be farmable on any terrain type. Feeding the animals existing products can't be a very good idea as it ties up the game balance somewhat, now suddenly the farming efficiency of that product will have to be balanced for both human and animal use, not very ideal.
Aphid
 
Posts: 14
Joined: Tue Jul 24, 2012 9:01 am

Re: Food production and Land Use

Postby caprontos » Thu Jul 26, 2012 1:08 am

Aphid wrote:If we need to feed animals with wheat, the logical step would be to have it turn 1 wheat into an egg or milk. E.g. simply have a required item tag for wheat for the milking and egglaying actions for a townie. The townie will 'feed' the animal to retrieve the egg. This forces a certain amount of material (one) to be used per egg created, allowing for easy balancing. But how do we get wheat in the desert, or jungle? Grazing as described above seems like an o-kay solution right off the bat. Feeding might be a little difficult though. I suppose we could feed the animals straw instead of wheat. Straw should be farmable on any terrain type. Feeding the animals existing products can't be a very good idea as it ties up the game balance somewhat, now suddenly the farming efficiency of that product will have to be balanced for both human and animal use, not very ideal.



I don't like that idea.. I'd prefer they get hungry like townies only less often for clear reasons (like once every 2 or 3 days...).. and you mostly feed long standing herds.. but we shall see..


and we will be able to trade for wheat to get it in the desert an jungle.. then you just have to grow it (underground in the jungle.. harder in the desert).. but thats a good point I'll mention that to them if they miss it here:P
Image
Cha Cha Cha!
User avatar
caprontos
 
Posts: 3355
Joined: Wed Apr 04, 2012 3:18 am

Re: Food production and Land Use

Postby YetiChow » Thu Jul 26, 2012 4:50 am

The dice rolls to determine hunger times and crop growth times are half the total time (e.g. crops take 1d240+240 ticks to grow if I remember correctly; either way that number will do for an example). Assuming only bread production and 3 patches of planted wheat, you could wait anywhere from 241-480 ticks for the wheat. Assuming that townies have a hunger time of 1d1200+1200 (again that's an example and shouldn't be taken as the actual value), then that bread will last anywhere from 1201-2400 ticks. Not a big issue, you might think, and you'd be right. The issue happens when you have large numbers of townies - while you can theoretically suport several townies easily with that setup, there will eventuall come a time when they are all hungry at once. You'll run out of food and hunger will start to kick in, and you'll never be able to get production back up (townies will be moving at between 25% and 10% speed so your efficiency goes out the window). What happens if a siege hits somewhere in the meantime though? Or if all your wheat tkaes the full time to grow for several cycles while the dice roll for fill-time is consistently small? Or perhaps some other task hold a townie up and they starve before they can eat, or they all get tired and sleep right the small window where the wheat is ripe and ready to harvest?

The point is that there's no practical way to weigh up the benefits of each kind of food - there are just too many variables which cannot be controlled to test anyting empirically. The best (and only) solution is to ensure a high surplus of food, and use the most filling food possible to give the longest-lasting benefits. I'm sure that later (probably late Beta) you'll be able to conduct thourough testing after all the kinks have been ironed out and after more variables can be controlled, but for now it doesn't matter how exhaustively you run the numbers - it's just not possible to get an accurate, empirical result with the data available.

Full points for trying though, and if the Devs ever do release the missing data I'm certain our research will be invaluable :D
What's that you're eating? A nice, juicy apple? You weren't supposed to eat that you fool, you were supposed to make it into a pie! - last words recorded words of Francis D'Avre before he went looking for snowcherries, but found a hungry Yeti instead.
YetiChow
 
Posts: 2174
Joined: Wed Apr 25, 2012 9:26 am
Location: Cramped between a Yeti's small intestine and its stomach... trying not to dissolve!

Re: Food production and Land Use

Postby Aphid » Thu Jul 26, 2012 12:13 pm

Actually, probabilit y behaves the opposite way. Use Lindemann's CLT theorem to the amount of Farm lands you have. The sum probability of dice rolls is about equal to the normal probability distribution. Actually, beyond about 20 for all intents and purposes using the N distribution is fine. Assuming the current age of crops is naturally distributed, where this distribution is a certain function\

Code: Select all
f(t) :=
A * 1 for t < p - v
f' = -P[X] for p-v <= t <= p+v, with P[X] a modified natural distribution with P=0 outside the bounds of impossibility, and slightly increased within. P has no representation because of this.
0 for t > p+v.


The natural distribution is what the system will tend to, as it is a stable equilibrium, and in fact the only stable equilibrium, for if the distribution is unnatural the probability of it becoming more natural is higher than it is less, all things else considered equal. Simply consider f' between one point and the next. The end result is actually a steady flow of wheat.

You can apply the same logic to hunger. In the limit of taking the number of townies to infinity you will see a stable number of townies go hungry each tick, where the variation in this number goes down relatively with O(n^(-1/2)). All that means that with, say, 10 townies, keeping the full stock of 10 in case they all go hungry at the same time is a reasonable thing to do, but with 100, you shouldn't worry about this as the probability of this happening is incredibly tiny. So the more townies you have the more useful thing this is in practice. Guess what, I'm trying to see how many townies I can get, so that's why I made this in the first place. Also, to show that eggs need nerfing in some way.

If you want to know how large the total variation is, we need to take it relative to p. Define the p and v of the hunger of townies as q and w. The inverse straight distribution function (farm output per tick and ) has variation
Code: Select all
((p+v) - (p-v)) / (2v(p^2 - v^2))

for a single crop. For multiple crops, the variation is thus
n^(1/2) * ((p+v) - (p-v)) / (2v(p^2 - v^2))

The variation for hunger is the same form, and we already computed the averages in the first post. Replace p with q and v with w.

Here is where it gets a little tough, we need to use http://en.wikipedia.org/wiki/Ratio_distribution, section 3. to find out the end-result. The formula itself will probably be longer than the rest of this post combined so I"m NOT putting it here. We look at the ratio of gaussian distributions formula from that page and replace the sigma's and mu's with our examples. That means sigma-x is the above formula, sigma-y is it with q and w. u-x is the formula from the 1st post, while u-y is it with q and w.

In the end, integrate that huge expression towards its second moment to find out the new sigma. Unfortunately, this cannot be done except numerically. This means we have to repeat our integration process for each new set of p, v, w, q, n, m. It will still go down with increasing n, m. Ideally, you want to pick your n given m so that the probability of the Ratio distribution being less than 1 (which can lead to starvation if it happens for long enough) is small, say, less than 1/1000. Interestingly, some crops have far less variation than others, for example fruit trees have low variation, while animal farms have relatively high variation.

EDIT: well, actually it didn't turn out that bad. Haven't verified it yet though. Numerical Integration might take some time.
Code: Select all
 expectance is integrated zf(z,v,w,p,q,n,m) over 0 to infinity
 variation is integrated z^2f(z,v,w,p,q,n,m) over 0 to infinity
 f(z,v,w,p,q,n,m) = (E^(1/2 (-(((p^2-v^2)^2 (-Log[p-v]+Log[p+v])^2)/(4 n v^2))-((q^2-w^2)^2 (-Log[q-w]+Log[q+w])^2)/(4 m w^2))) (p^2-v^2) (q^2-w^2))/(Sqrt[m] Sqrt[n] \[Pi] ((q^2-w^2)^2/m+((p^2-v^2)^2 z^2)/n))+(E^((((p^2-v^2)^2 z (-Log[p-v]+Log[p+v]))/(2 n v)+((q^2-w^2)^2 (-Log[q-w]+Log[q+w]))/(2 m w))^2/((q^2-w^2)^2/m+((p^2-v^2)^2 z^2)/n)+1/2 (-(((p^2-v^2)^2 (-Log[p-v]+Log[p+v])^2)/(4 n v^2))-((q^2-w^2)^2 (-Log[q-w]+Log[q+w])^2)/(4 m w^2))) (p^2-v^2) (q^2-w^2) Erf[(((p^2-v^2)^2 z (-Log[p-v]+Log[p+v]))/(2 n v)+((q^2-w^2)^2 (-Log[q-w]+Log[q+w]))/(2 m w))/(Sqrt[2] Sqrt[(q^2-w^2)^2/m+((p^2-v^2)^2 z^2)/n])] (((p^2-v^2)^2 z (-Log[p-v]+Log[p+v]))/(2 n v)+((q^2-w^2)^2 (-Log[q-w]+Log[q+w]))/(2 m w)))/(Sqrt[m] Sqrt[n] Sqrt[2 \[Pi]] ((q^2-w^2)^2/m+((p^2-v^2)^2 z^2)/n)^(3/2))
 using E for e and Erf, Log, Sqrt, Pi should be obvious.
 
Aphid
 
Posts: 14
Joined: Tue Jul 24, 2012 9:01 am

Re: Food production and Land Use

Postby YetiChow » Fri Jul 27, 2012 5:43 am

I get what you're saying about crop growth time, and you're right. No argument there, it's entirely possible to calculate which foods take the longest to grow or have the best efficiency of time and space. My point is that that only works in a game where those are the only variables. Your calculations don't take into account things like what happens when the number of townies decreases or when the work is interrupted. You've assumed peak efficiency, and anyone will tell you that peak efficiency in Towns is a dream well beyond the grasp of current players.

For example, your calculations assume one towny for each tick or effectively 1 million townies - that's never going to happen. Even if someone booked out a supecomputer the game engine could never handle that many townies. Of course the game distributes the current number of townies to the current number of tasks, but that leaves big patches of noise - things like travel time, townies having to eat and sleep, attacks from monsters etc. It is technically possible to average all that data out if you have acces to it, but the key fact is that a lot of the information is hard-coded and not accessible (at least if you do decompile it and rum the numbers you're not allowed to publish them due to the way the liscence and copyright work). Hence my assertion that an empirical study is impossible, as you are searching for an unknown without having all the relevant contextual or surrounding data.

Again, I applaud your attempt and it does have very real uses as a way to figure out what should be the ideal production rate of a particular food, it's just that practically the data will never match the theoretical data set and your theory (while correct and laudable in its desgin and execution) is trivial and irrelevant to gamers as a practical guide.

I guess you could say that it's not your work I have reservations about, it's more the implications of the title. Perhaps you would consider adding something which alludes to the theoretcial nature of your study? Still, I'd like to whole-heartedly +1 the suggestions you've interwoven with all that information, as I agree with your key concept that food output needs to be increased.
What's that you're eating? A nice, juicy apple? You weren't supposed to eat that you fool, you were supposed to make it into a pie! - last words recorded words of Francis D'Avre before he went looking for snowcherries, but found a hungry Yeti instead.
YetiChow
 
Posts: 2174
Joined: Wed Apr 25, 2012 9:26 am
Location: Cramped between a Yeti's small intestine and its stomach... trying not to dissolve!

Re: Food production and Land Use

Postby Aphid » Fri Jul 27, 2012 3:38 pm

Increase output? I'd say we want to decrease output and increase land use. Just perhaps decrease the labour requirement for some of the foods by, say, directly dropping things to the next production stage when an order is placed for the final product. E.g. a townie that checks
Can I make bread? --> Is there flour? (yes/no), in case no, --> Is there Grain? (yes/no), in case no, --> Is there any fully grown wheat? (yes/no)
And secondly: Allowing townies to drop any food product on any square producing said product. So a grain can be dropped on top of a wheat farm, and a mill can hold flour. By default that would be 4 units but I'd say 10 would work better.

Or, say, decrease output and decrease townie food requirements by the same amount. If we decrease outputs by a factor 2, then do the same for townie food requirements, and then increase the non-walking work time by a factor 2, the food balance is the same if we had 0 walk distance, but the effect of increasing walk distance is greatly increased.

And yep, we're dealing with quite a low amount of townies in the average game where you won't get a clear thing going until you get several hundred. But check the game where someone got 500. He should have a fairly steady production.

Interestingly enough though, even if the absolute values are of little practical use, the relative values are quite useful. If I want to limit my land use and not abuse chickens, wheat is the answer, as it should be since it is so in the real world too. Combining both would in the end be a pretty bad idea as a townie can't drop an egg on a square a wheat is on.

By the way, making animals require to be fed would be a pretty bad answer to the problem. Meat might suddenly become a massive workload :?
If animals fed themselves, or we could load some kind of structure with raw wheat it could be okay. An unfed animal would not produce eggs/etc. An animal farm turns X grain/crop into animals. And a special feeder station could be put inside an animal pen, to which animals who have [noegg] for at least X ticks will path, eat from, and become regular versions again. In this case scenario the fast-producing animal farms are no big deal, as a large land requirement would still be the stuff we feed the animals. Pigs and Chickens would eat anything, Cows want wheat, Unifallow want cactus fruit (there's nothing else in that climate... maybe we'd need reeds or something?), and badgers want non-badger meat.

Think about it. If a grain would require 20,000 ticks to grow instead of 2,000, it would require only 1/10th of the labour to be harvested. If then townie hunger reqs are a bit less crazy walk time will be far less. Or alternatively compress quantities. So 40 grain => 1 flour => 20 breads (which are carried by one townie). 1 cow => 30 cow meats => 30 steaks. Increase capacity drastically for food containers, and increase growth time by the same. This way, I now need 40 times as many grain to feed my town, so for 11 townies I'd need about 1000 tiles instead of 25. Sounds bad, until you realize the workload for harvesting will stay the same, while the walking and baking workload will be around 1/30th to 1/40th depending on the walk distance. Same for other chains. If one cow is 30 cow meats and we increase spawn time for the cow farm by a factor 30, little changes. For more realistic land use you'd want more though.

IN summary, the suggestion is the following:

- The labour requirement to be less sensitive to walking distances.
- A significant labour requirement. 2 townies feeding 100 like in DF is rediculous, in the middle ages a large portion of the population was in a food-related profession.
- There needs to also be a significant land requirement. It's dumb when my other buildings take up 10x the space my farms take up. Anything above a 50/50 looks way better.
- Meat is a luxury product. Hence it should be less efficient.
- Rewarding meal variety. Happiness is a boring way of doing it. Why not modify food fill rates by a measure of variety v?


Creating v might be a little tricky. I suppose some boundaries should be in place. Let's say 1<v<1+a+b. Let's also say each townie has a memory of their last meals eaten. You could store say up to 20 meals this way. Then, if those 20 contains at least a certain faction of different types (meat or meat substitutes / Grains&Mushrooms&Veg / Fruits / Dairy / Sweets, say 5%/30%/15%/10%/0%), the townie gets a bonus of 1+a so far. Of course, whenever a townie is hungry, they need to browse their memory to see which food they would like the most. This isn't exactly simple for more complex recipes that include multiple categories. Ideally, go for things without useless categories first. If there are still multiple things to choose from we try to pick whatever is not in the list already.

. And if they do meet the fractions (which is possible, there's 40% headroom!), they'd try to get something not in their memory, anything, with the default priorities, but something they don't have eaten yet according to the list takes priority above that still. Then, the remaining b bonus is gotten when all 20 dishes are different. If they're all the same (stew, anyone?) 0 is given, and we go linear in between. Use a,b as a balancing constants set. The whole thing should take <100 instructions each time it is called even if it doesn't cache more than the minimum.

Now what happens when a townie is new? We should simply make some 'hidden' dishes players can't actually make in the game in their memories, so they have the perfect mix when you first start out. That way v starts out at 1+a+b, and will go back to 1 if you'd feed only bread, or near 1+ a for stew.

That should give some incentive towards diversification and wouldn't even be that hard or demanding on a computer. With 400 townies, that's 40,000 instructions in a day.

Edit: Question: When is v applied?
After eating, the townie first applies the bonus, then recomputes v, and then applies the bonus if it is now higher. This is to prevent a situation where a townie would eat sweets when exactly meeting the percentages, dropping slightly below. Alternatively you could try to smartly get 5% more as another priority but that might complicate matters a bit too far.

Question: Why those types?
Makes sense given what is in the game so far. Sweets are a bit of an exception to being placed in multiple categories, because too much is bad for you.
Meats: Pig/Cow/Unifallow/Chicken/Badger/Deer/Fish /Roast/Ham'n'Eggs/ Mountain Stew / Meat Pie
Grains: Bread/Banana Bread/Mushroom/Jungle Mushroom/Apple Pie/Pear Pie/Snowcherry Pie/Meat Pie / Banana Pie / Mushroom Soup / Mountain Stew / Jungle Salad
Fruits: Apple/Pear/Snowcherry/Cactusfruit/Apple Pie/Pear Pie/Snowcherry Pie/Cactus Soup / Banana Pie / Baked Banana / Jungle Salad
Dairy: Milk / Egg / Omelet / Ham 'n Eggs / Cactus Soup / Mushroom Soup (d) / Mountain Stew (d)
Sweets: Cookie

Most interestingly, all climates have viable options for all categories. A desert map can use cactus soup or mt. stew for dairy and mushroom soup for grains. Cactus soup works for fruits, and unifallow for meat. A jungle map can use skootenbeeten for meat, Jungle Salad or Mushroom soup for grains (grains might be a little difficult. Perhaps rice?), Fruits are filled with bananas, and there's eggs for dairy. The standard, mountain and mixed maps have so much available that it shouldn't be a problem, while the snow map will require you to use your grass patches wisely. Which is kinda how it is now anyway. Besides, failing to meet anything returns us to base efficiency.
Aphid
 
Posts: 14
Joined: Tue Jul 24, 2012 9:01 am


Return to Suggestions

Who is online

Users browsing this forum: Google [Bot] and 1 guest