World of Banished

Conversations => Suggestions and Mod Ideas => Topic started by: Chon Waen on February 22, 2015, 05:53:31 PM

Title: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 22, 2015, 05:53:31 PM
O.K. I read somewhere that a fully functioning standard brewery produces 500 units of ale per year.
I also know that if this is the case, the brewery puts out 50 production cycles of 10units of ale in that same year.

Based on this information:

How does this translate into work units per cycle?  ie "One brewery batch takes 30 work units"

How does having more workers at a building affect work units? Is it a straight "One worker completes 100 work units a month, 2 complete 200, and 4 complete 400 (as an example). Or is there a diminishing return for more workers?

Finally, what are the minimum and maximum number of work units you can assign a production task?

I know work units do not take into account material collection time which will vary depending on how far workers have to travel for supplies. 

I ask these questions because when I make a production based Mod suggestion in the future, I'd like to be able to give solid input/output/worker/work unit numbers in my suggestion to attempt to help design balanced mods.  I may not be able to run the modding software, and my drawing skills are just about good enough to make stick figures, but I'm pretty good at the maths, and what performance I want out of a particular building.

Also, anyone know what the size/weights of most objects are in regards to buildings?  For instance, if I'm not mistaken one unit of firewood in the TP takes up significantly more space than one unit of Ale.

If there are links somewhere so you don't have to reinvent the wheel for me, that would be great too!
Title: Re: Production Buildings, Labor, and Manpower
Post by: RedKetchup on February 22, 2015, 06:05:05 PM
i can maybe give you the weight of resources when i ll have time.
Title: Re: Production Buildings, Labor, and Manpower
Post by: Paeng on February 25, 2015, 01:19:31 PM
Quote from: Chon Waen on February 22, 2015, 05:53:31 PMAlso, anyone know what the size/weights of most objects are in regards to buildings?

I made me some charts a while ago - maybe they help for starters?

(http://imagizer.imageshack.com/img661/7347/fN7Vu6.jpg)

(http://imagizer.imageshack.com/img661/5708/8vmwjY.jpg)
Title: Re: Production Buildings, Labor, and Manpower
Post by: RedKetchup on February 25, 2015, 01:39:25 PM
wow very nice and clear charts :) thanks you.
Title: Re: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 26, 2015, 12:31:44 AM
Awesome, thanks!
Title: Re: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 26, 2015, 12:48:36 AM
Now back to the other part of the question: production cycles and times for production buildings.

Please correct me if any of these assumptions are wrong.
1) Production buildings work more or less like builders do
  a) first, materials are collected and brought to site in a quantity to do multiple batches
  b) a quantity of work units are assigned to the task and the job gets done by worker actions performed by all workers present (more workers have a multiplicative effect)
  c)once a cycle completes, if there are available resources a new cycle begins.
  d) if there are insufficient resources available, the building workers drop the product off in an access square (read road), and goes off to find more ingredients.  If one or more ingredients are not available the icon shows up over the building and the workers there act as laborers until the resource becomes available.

Have I got this right?
Title: Re: Production Buildings, Labor, and Manpower
Post by: RedKetchup on February 26, 2015, 01:00:53 AM
yup, all right :)
Title: Re: Production Buildings, Labor, and Manpower
Post by: Nilla on February 26, 2015, 03:36:44 AM
You mentioned breweries at the beginning. As far as I know, there is a small exception; The ale isn't "dropped". It stays in the brewery, until someone consume it there or a trader get it. This also mean that the brewer doesn't get any new fruit, if there is too much ale left.
Title: Re: Production Buildings, Labor, and Manpower
Post by: rkelly17 on February 26, 2015, 06:48:30 AM
Quote from: Chon Waen on February 26, 2015, 12:48:36 AM
  d) if there are insufficient resources available, the building workers drop the product off in an access square (read road), and goes off to find more ingredients.

I think in some cases that the worker(s) place the products directly in a storage facility. For example, fishers take the fish to the closest barn or market. That's one reason to build barns or yards as close as possible to the production location. The other is that quick access to materials speeds production.
Title: Re: Production Buildings, Labor, and Manpower
Post by: RedKetchup on February 26, 2015, 09:29:53 AM
 but i think because barns dont accept ale :P so it stay there cause thats the only place that can store ale.
maybe i m wrong, i didnt really checked, thats a thought.
Title: Re: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 26, 2015, 01:22:55 PM
First off, thanks to @Nilla  , @rkelly17 , and @RedKetchup  for the corrections on storage/dropoff mechanics

O.K. So with a few exceptions, the major factors of production rate for any created production building are:
1) work units per cycle
2) number of workers at the building
3) distance for material drop-off and pick up
4) distance for worker replenishment (home, food, etc)
5) stockpiles of materials to be produced.

Factors 3-5 are based on overall town layout.  1-2 are based on the production facility itself.
So, when designing a balanced production facility for the game it should be based on factors 3-5 being minimally impactive:
Market/storage right next to facility, home nearby, and plenty of raw materials available at those places.

Next, we need to determine how to tweak factors 1 and 2 to give a balanced output that is neither over nor under powered.
In order to determine this, we need to know:
1) Given an optimal position to maximize work activity, how many work units can an individual worker accomplish in a year?
2) What is the value added per production cycle? (output units x output price)-(input units x input price)
3) What is the desired amount of worker value added per year?

As an example:  You want a facility that generates a trade good valued at 5 units each.  You also want it to house 2 workers max.  You want total inputs to be valued at about half of what the output's value is (2.5), and you want your workers to generate about 1200 value added per worker per year. 
This means you want to generate 2400 value added by the facility per year, which means you need 4800 value in output. (output-input, remember?).
At a value of 5 each, this means you want to make 960 of these trade goods a year.  Based on an assumption that you want to make 20 units per batch, this means you want 48 cycles completed.  So <x>cycles possible a year x 2 workers divided by 48 desired cycles/year is the number of work cycles you should assign to the building.

You can adjust between number of cycles and units per batch using the formula [ batches per year x units per batch = units per year]

Is all of this more or less accurate? and Finally, can anyone tell me approximately how many work units a bannie completes in a game year?  With that vital piece of information, you can make well designed and balanced production buildings for just about ANYTHING in this game!!!
Title: Re: Production Buildings, Labor, and Manpower
Post by: RedKetchup on February 26, 2015, 03:24:46 PM
thats i dont know. i know there are code lines that set the amount of work to make 1 unit. but i dont know how long (in game time ) it is.

take the blacksmith. the code is:

   int _workRequired = 5;

to make both iron tools and steel tools

the tailor =    int _workRequired = 5;
The woodcutter = no mentions at all ( i dunno if there is a default value )
Title: Re: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 26, 2015, 05:09:08 PM
Hmm... and the tavern also has int_workRequired = 5?
Title: Re: Production Buildings, Labor, and Manpower
Post by: RedKetchup on February 26, 2015, 05:36:33 PM
tavern :    int _workRequired = 10;
Title: Re: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 26, 2015, 06:00:23 PM
So taverns have a work of 10, and if I'm not mistaken, put out 10 units of Ale a batch, and i read somewhere that they can (provided you are draining them rapidly to a TP) produce about 500 units a year. With one worker. So this translates to roughly 500 work units/year. Coats and tools are usually each produced in batches of 2, yes? 500 work units divided by 5 is 100 batches, so about 200 coats made a year per tailor sound about right? Tools about the same?
Title: Re: Production Buildings, Labor, and Manpower
Post by: RedKetchup on February 26, 2015, 06:04:36 PM
too much long time i didnt played that game ^^ IMO
i cant tell. the ones who can answer this are @irrelevant  and @Nilla !!
Title: Re: Production Buildings, Labor, and Manpower
Post by: irrelevant on February 26, 2015, 06:38:49 PM
Quote from: Chon Waen on February 26, 2015, 06:00:23 PM
So taverns have a work of 10, and if I'm not mistaken, put out 10 units of Ale a batch, and i read somewhere that they can (provided you are draining them rapidly to a TP) produce about 500 units a year. With one worker. So this translates to roughly 500 work units/year. Coats and tools are usually each produced in batches of 2, yes? 500 work units divided by 5 is 100 batches, so about 200 coats made a year per tailor sound about right? Tools about the same?
The most production I've ever gotten in one year (that I noticed):
Tailor - 264 wool coats, makes me think that 300 is possible
Smith - 194 iron tools, makes me think that 200 is possible
Brewer - 580 ale, makes me think that 600 is possible
Chopper - maybe 1000-1200? Never really studied the choppers, so I don't know what to think  ;D

The smith and tailor were both with @slink's specialized markets directly across the street, so this was near optimal.
The brewer was fronted on a market with ~1000 fruit always in stock; again, optimal.
Title: Re: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 26, 2015, 10:11:52 PM
Hmm, maybe need to figure out how much initial ingredients the tailor/blacksmith/brewer stock in before cycling production.  Could be that needing more ingredients and maybe the heavier masses involved have a bigger negative impact on stocking and how many runs before they have to go out for more ingredients compared to the tailor. 36 mass of 2 different items to make 2 tools vs what the tailor produces with 20 mass worth of one ingredient, leather.... even with optimal spacing for the pickup, they have to stop working, drop stuff off, and pick stuff up, (blacksmith twice) so that's gonna eat up time, hmm, might need to compare steel tool making vs iron tools and if you produce significantly less due to having to spend more time stocking 3 ingredients.  If iron tools are roughly equivalent to warm coats in production/year, I bet that number of different ingredients will really need to be factored in.  As is, wool coat production rate (1 ingredient) is much more comparable to ale production (1 ingredient) than to iron tools (2 ingredients) when just looking at int_workRequired=<x> alone.

Thanks @irrelevant !  Time to do some more investigating whilst trying out Red's new cathedral!

Title: Re: Production Buildings, Labor, and Manpower
Post by: irrelevant on February 27, 2015, 06:20:19 AM
Quote from: Chon Waen on February 26, 2015, 10:11:52 PM
Hmm, maybe need to figure out how much initial ingredients the tailor/blacksmith/brewer stock in before cycling production.  Could be that needing more ingredients and maybe the heavier masses involved have a bigger negative impact on stocking and how many runs before they have to go out for more ingredients compared to the tailor. 36 mass of 2 different items to make 2 tools vs what the tailor produces with 20 mass worth of one ingredient, leather.... even with optimal spacing for the pickup, they have to stop working, drop stuff off, and pick stuff up, (blacksmith twice) so that's gonna eat up time, hmm, might need to compare steel tool making vs iron tools and if you produce significantly less due to having to spend more time stocking 3 ingredients.  If iron tools are roughly equivalent to warm coats in production/year, I bet that number of different ingredients will really need to be factored in.  As is, wool coat production rate (1 ingredient) is much more comparable to ale production (1 ingredient) than to iron tools (2 ingredients) when just looking at int_workRequired=<x> alone.

Thanks @irrelevant !  Time to do some more investigating whilst trying out Red's new cathedral!

@Chon Waen you're welcome.

You don't have to figure this out  ;)

Bannies carry 100 load points (except vendors and traders who can carry 500 with their wheelbarrows). So a brewer will grab 100 fruit (weight 1 load point each) and take it to his tavern to make ale. He will make three batches (30 fruit=10 ale), then he will have to re-load as he doesn't have enough fruit to make a fourth batch.

Wool and leather weigh 10 load points each; logs weigh 11, and iron weighs 25. But bannies will often grab less than capacity of these, as they may need to grab from a location that doesn't have enough stock for them to grab the full amount. Also, they typically will grab only one type of resource at a time, so smiths (and tailors making warm coats) will have to make multiple trips to keep their production running. This obviously will negatively impact their output. One more reason to purchase rather than make warm coats, to say nothing about steel tools, with three inputs! Coal weighs 15 each.

Anyway, a full load of wool or leather would be 10 units of either one. A full load of logs is 9 units, iron is 4 units, and coal is 6 units. So a tailor will ideally stock 10 wool or leather before beginning production, while a smith will stock 9 logs and 4 iron first. An educated smith therefore will be able to make only 4 batches of iron tools (8 tools) before his iron is gone; he will then stop and go pick up 4 more iron, make 8 more tools, pick up 4 more iron, make two more tools, and then he is out of logs. He goes to pick up 9 more logs, makes 6 more tools, and then he is out of iron again. As you can see, tool production is fragile. Steel tool production is far worse.

Actually, now that I think about it more, the theoretical capacity of a smith likely could be the same as the capacity for a tailor. But a smith will never get close to the theoretical max because he has to make so many more trips for resources, due to the higher unit weights of his inputs, particularly of iron.
Title: Re: Production Buildings, Labor, and Manpower
Post by: rkelly17 on February 27, 2015, 08:05:07 AM
Something we haven't thought of yet: Time spent working vs. time spent doing other things as a factor in productivity. On a town I was working on yesterday I had to build a fishing dock pretty far from the nearest market. Even though the houses and barn were right next door, the 4 fishers spent a lot of time getting supplies for their two houses. When I built a general store (small market mod from @Elfecutioner with graphics by @RedKetchup) next door to the barn they spent way more time fishing and much less time getting supplies. Then I built a school next to that so their children didn't have to walk a long ways to school--which delays graduation significantly.

Conclusion: I'm assuming that the distance between the worker's house and the nearest source of supplies (market, barn or storage yard) will impact productivity. An ideal industrial area will include housing, storage, and a source of supplies in close proximity to the workplace. Any testing needs to take that into account as a variable.

Then there is the need to idle. I'm not at all sure how that factors in. I always build a variety of idling locations, but my citizens never idle only at the nearest location. They wander around the map seemingly at random (Though probably not really at random). I've also seen workers with an active assignment at a work place with full materials idling rather than going to the work site. The original game notes said that unhappy workers idle more, but I've seen 5-star citizens choosing to idle rather than work. Obviously that has an impact on productivity, but I'm not sure how you would factor it in to any testing.
Title: Re: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 27, 2015, 11:20:07 AM
Idle time really shouldn't be a factor in balancing production buildings, since theoretically all bannies idle equally.  What I am most interested in is finding a stock formula or small matrix that allows you to figure out balances between annual production rates, trade prices, and value added per worker.  These are the primary factors with value added per worker being the most tightly constrained. Typically you will want something in the range of 700-1300 per worker.  The low-end is usually reserved for initial production sites (farmers, foresters, etc). The middle of the range for intermediate activities (millers, supposedly woodcutters, etc). And the high end for export goods (ale, warm coats, steel tools).  Where this is seemingly breaking down is on complex ingredient production.
I guess one of the next questions to ask, then is whether or not int_workRequired is strictly per building, or if it can be adjusted per task within a building.  Ideally, it should be by task, but I wouldn't be surprised if it isn't to reduce complexity.
Title: Re: Production Buildings, Labor, and Manpower
Post by: Chon Waen on February 27, 2015, 12:33:05 PM
Also, distance to supplies is definitely a factor on production! However, its not one you can really adjust for in a production building's design except perhaps in number of different input ingredients.  Its why I am most interested in near-optimal supply. Sub-optimal supply infrastructure will impose its own penalties to players, and the fault will not lie in the building's design but in that player's gameplay.