Latest Posts

Topic: Where/how can I find ware production speeds?

Lokimaros
Avatar
Topic Opener
Joined: 2016-10-21, 16:51
Posts: 49
Ranking
Pry about Widelands
Location: Leiden, the Netherlands
Posted at: 2016-12-06, 12:52

Hello, again,

I'm still in the phase of getting my head around the economies, and wanted to use a spreadsheet to do that. In it, I want the production speed of all the wares of all three tribes, by which I mean: if a producer has all the requirements all the time, how long does it take between products coming out?

I'm guessing it varies for Ranger/Lumberjack, as they have to walk different distances each time, but then an average in a clear area (or in the lumberjacks case, an area of trees) would do, but for Bakers the rate would be a constant, not?

Is there anywhere I could copy these values from, or do I have to sit back and count with a stopwatch for each and every ware for all three tribes to get my data? I thought I'd seen them somewhere, but if I did, I can't seem to find it back.


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-12-06, 16:19

many times, it is written in the help text, that can be accessed by clicking the question mark.

in any case, you can see it from the files. you go in your widelands folder (wherever it may be installed), then data/tribes/buildings/productionsites, and from there you take different paths depending on what you are looking for. suppose you need the imperial bakery, you go in empire/bakery and you open the file init.lua with notepad. in there you'll find strings of text, look for big numbers because the time is in milliseconds. you find

actions = { "sleep=15000", "return=skipped unless economy needs empire_bread", "consume=flour water", "animate=working 15000", "produce=empire_bread" }

(note: if you have a good lua reader, you'll see the nice formatting. otheerwise, you'll see the text in a long line and it will be more confusing, but it is still there).

From this, you can see that the baker will work for 15 seconds, and it will stay idle for other 15 seconds afterwards. so it makes one bread every 30 seconds? No. because there is also the time needed to walk out, drop the bread on the flag, come back. that time is 3.6 seconds. so the imperial bakery will need 33.6 seconds to make one piece of bread. The only problem is with buildings that make different wares at different speeds, i never knew how to read those.

But you don't need to know exactly the times to play, nor to read the complicated ware graphs. I do neither, and I am probably the strongest player around. What I do to set up a balanced economy is look at the stock. I start with a handful of farms, and a copy of every production building. All of my wheat is being used, so I make new farms and wells until I see that i start having a surplus of wheat and water. Then I make mills and bakeries until I start to have a surplus of bread too. So I make more taverns, until I have a surplus of rations, and more mines. At some point I have a surplus of ores, so I make more smelting works and one more weapon and armor smiths. and when I start having a surplus of weapons I make another training camp. Now I see that my stock of wheat is starting to deplete, so I make more farms, and the cycle starts anew. Every time I see that I am accumulating a resource, I make more buildings to use that resource (or that make the resource needed to further transform it; if i have a surplus of iron, I don't make more smelting works, I make more coal mines; only when I have a surplus of both iron and coal I make smelting works). I've had upwards to 100 farms, and I had exactly the number of mills and bakeries and piggeries needed to use all of their products, to whitin the closest integer, without ever making any calculation.

Edited: 2016-12-06, 16:22

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-12-06, 17:20

The production times stated in the help files were all calculated manually. We don't have an automated calculation in place for that bit yet, because it will take some extra calculations for buildings where the workers leave the building to do their job, e.g. the lumberjack or ranger.

All the other values in the help files are automatically generated, but not the production times.


Busy indexing nil values

Top Quote
Lokimaros
Avatar
Topic Opener
Joined: 2016-10-21, 16:51
Posts: 49
Ranking
Pry about Widelands
Location: Leiden, the Netherlands
Posted at: 2016-12-07, 12:37

Thank you, that is very helpful.

So it's essentially: sleep time + animation_working time + produce_time, the last one being 3.6 seconds.

But in barbarian bakery I see twice animation and produce, does that mean barbarians make two breads per 3 wheat + 3 water in 20 + 20 + 3.6 + 20 = 3.6 seconds?


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-12-07, 16:09

Lokimaros wrote:

Thank you, that is very helpful.

So it's essentially: sleep time + animation_working time + produce_time, the last one being 3.6 seconds.

But in barbarian bakery I see twice animation and produce, does that mean barbarians make two breads per 3 wheat + 3 water in 20 + 20 + 3.6 + 20 = 3.6 seconds?

If I get it correctly, it's 20+20+3.6+20+3.6=67 seconds (it produces bread twice, so it needs to go back and forth from the flag twice).


Top Quote
Lokimaros
Avatar
Topic Opener
Joined: 2016-10-21, 16:51
Posts: 49
Ranking
Pry about Widelands
Location: Leiden, the Netherlands
Posted at: 2016-12-07, 16:15

Yes, the = in my previous post was meant to be a plus, which I failed to correct, apparently. So we're agreed on that. So 33.6 seconds per barbarian bread.

Shortly I may writing a perl script to extract this and other information to put into a database and/or spreadsheet to play with. It's a kind of thing I like to do, though tend not to finish, though, so if anyone hopes to see results, don't hold your breath.

I was partially raised by cats, if you wonder why.


Top Quote
No0815
Avatar
Joined: 2016-05-01, 13:52
Posts: 49
Ranking
Pry about Widelands
Posted at: 2016-12-11, 18:41

Back when I was playing Widelands I created such a file: Widelans.ods. The values were taken from the lua-files though they aren't totally correct since I didn't account for the 3.6 seconds to carry output-wares to the flag (always assumed that's done parallel to the next part of the work-cycle). Times for products where the worker wanders around (e.g. lumberjack, fisher ...) are basically nonsense because the major part of the cycle (the walking) can not be calculated easily and aren't included at all. I also don't know if anything changed during the last six months. The file was supposed to serve as an orientation about how much producers I might need.

How to read the data:
Each column highlights the input wares this production site needs. The top value for each ware are the required numbers for one production cycle. The row below tells you, how many suppliers you need to exhaust the production capacity. If there are more than one possible type of supplier (like the different upgrades of mines) each one is calculated in it's own row.
Tabelle4 gives an overview on how much resources you need for one fully promoted soldier. Ignore the last sheet, it has nothing to do with Widelans at all.

king_of_nowhere wrote: But you don't need to know exactly the times to play, nor to read the complicated ware graphs. I do neither, and I am probably the strongest player around. What I do to set up a balanced economy is look at the stock. I start with a handful of farms, and a copy of every production building. All of my wheat is being used, so I make new farms and wells until I see that i start having a surplus of wheat and water. Then I make mills and bakeries until I start to have a surplus of bread too. So I make more taverns, until I have a surplus of rations, and more mines. At some point I have a surplus of ores, so I make more smelting works and one more weapon and armor smiths. and when I start having a surplus of weapons I make another training camp. Now I see that my stock of wheat is starting to deplete, so I make more farms, and the cycle starts anew. Every time I see that I am accumulating a resource, I make more buildings to use that resource (or that make the resource needed to further transform it; if i have a surplus of iron, I don't make more smelting works, I make more coal mines; only when I have a surplus of both iron and coal I make smelting works). I've had upwards to 100 farms, and I had exactly the number of mills and bakeries and piggeries needed to use all of their products, to whitin the closest integer, without ever making any calculation.

But doesn't this strategy take forever to result in a sufficiently balanced economy (by that I mean at least one arena and training camp working to capacity) if you don't already have a good understanding of how much buildings you will need? Giving building order, wait for material and builder to arrive, wait for finishing construction, wait for worker and supply, wait till production kicks in and has effect on stock ... I'd expect about five to ten minutes. Per cycle. The frustration from that was the main reason why I completely gave up on the game back then.


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-12-11, 18:58

No0815 wrote:

But doesn't this strategy take forever to result in a sufficiently balanced economy (by that I mean at least one arena and training camp working to capacity) if you don't already have a good understanding of how much buildings you will need? Giving building order, wait for material and builder to arrive, wait for finishing construction, wait for worker and supply, wait till production kicks in and has effect on stock ... I'd expect about five to ten minutes. Per cycle. The frustration from that was the main reason why I completely gave up on the game back then.

Good point. Well, for the first part about having an economy working to capacity, I already have a fairly good idea on how to start that. At least for atlanteans, that should be 5 farms, 3 blackroots, 3 mills, 3 bakeries, 3 smokeries, 1 mine for each type. Possibly you may have to stop the dungeon every once in a while unless you add another coal mine, though, not sure. Anyway, after that, if I have space to go wide, I make new buildings in large amounts. For example, if I see I am lacking corn, I make like 6 new farms and 3 blackroot farms, plus 6 wells, plus 3 fishers, 4 fish breeders, 3 smokeries because I anticipate the need for more smoked fish too. Then I wait a while (which also refill my stock of building material) and see where is the imbalance then. For the biggest canon map I know, ice wars, I take around 6-8 hours to fill all my land with buildings. True, someone knowing exactly the ratios could do better than that. Well, I like to powergame, but that approach is too much for my tastes.


Top Quote
No0815
Avatar
Joined: 2016-05-01, 13:52
Posts: 49
Ranking
Pry about Widelands
Posted at: 2016-12-11, 19:13

king_of_nowhere wrote: Well, for the first part about having an economy working to capacity, I already have a fairly good idea on how to start that. At least for atlanteans, that should be 5 farms, 3 blackroots, 3 mills, 3 bakeries, 3 smokeries, 1 mine for each type.

Ah, well, building in that amount is speeding up the process for sure. Though I have to mention that Atlanteans have it much easier. They don't have to upgrade their mines (which messes up the whole balance, with different requirements) and have a less intricate economy (seems to me, at least, only played them in the campaign once). Barbarians are a nightmare and that's what you start with, in the campaign.


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2016-12-11, 19:34

Oh, right, barbarians are more complex. But they can be greatly simplified by observing that their rations are extremely cheap: just one meat, that they get with one hunter and one gamekeeper. So I make a few taverns, order them to accept nothing but meat, and I make sure to have a meat surplus. That way, those taverns will do nothing but rations, fulfilling the needs of the simple mines. Then I apply the same modus operandi to the rest of the economy. It just means that whenever I find myself with few simple mines, I will have lower ore production and will need to stop a war mill and training camp.

I treat deep and deeper mines the same, since both require the same amount of raw resources to work. When I have enough master miners, I update all simple mines to deep mines directly. That way, I only need one microbrewery or 2, and I can upgrade all the others.


Top Quote