Latest Posts

Topic: Missing information

stonerl
Avatar
Topic Opener
Joined: 2018-07-29, 23:03
Posts: 327
Ranking
Tribe Member
Posted at: 2018-07-31, 03:28

Recently I started playing Widelands with some of my friends. What was quite cumbersome was that the Tribal Encyclopedia is missing most of the information for Production Performance. The barbarians only had some information missing, but for the other tribes there were almost no information available. We first thought that Calculation needed meant that this information would be available some time after the relevant building had produced some units.

For newcomers it's a good guidance to know how long it takes to produce the wares, just to get an idea on how to scale the economy. What calculations need to be done to have these information available for all tribes and buildings?

Best stonerl


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2018-07-31, 04:28

in most cases the value is known, althoguh the encyclopedia is not updated. Buildings have a working cycle and then they rest for a while, before they have another working cycle. So you just sum the durations, you add 3.6 seconds because that's the time it takes for the worker to put the wares on its flag and come back (double this time if two wares at a time are produced) and you get the performance. The numbers are available in the .lua files, if you have some experience you can find them.

Some buildings however also need to walk around, and in this case you can't give an exact number, because it depends on how much the worker has to travel. this applies to woodcutters, quarries, fishers, hunters, farmers. Farmers have been measured experimentally with a large number of farms over a long time, and farmers take on average 80 seconds to produce a ware, except barbarian farmers who need 100 seconds.

In most cases, getting the value is really easy, it just needs somebody to put them into the encyclopedia.


Top Quote
stonerl
Avatar
Topic Opener
Joined: 2018-07-29, 23:03
Posts: 327
Ranking
Tribe Member
Posted at: 2018-07-31, 04:45

I just had a look in some lua files. Here is the action for the barbarian bakery:

         actions = {
            "sleep=20000",
            "return=skipped unless economy needs barbarians_bread",
            "consume=water:3 wheat:3",
            "animate=working 20000",
            "produce=barbarians_bread",
            "animate=working 20000",
            "produce=barbarians_bread"
         }

So it is 20 seconds + 20 seconds + 20 seconds devided by 2 (since it produces 2 pieces) which results in the 30 seconds it takes for 1 piece of bread to be produced. Am I right?

Edited: 2018-07-31, 04:51

Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 09:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2018-07-31, 08:50

Plus the 3.6 seconds per ware for the baker to take the item from production to the flag which would make it 33.6 seconds per bread, provided the stores are stocked with enough water and wheat.


Top Quote
stonerl
Avatar
Topic Opener
Joined: 2018-07-29, 23:03
Posts: 327
Ranking
Tribe Member
Posted at: 2018-07-31, 11:41

Hmm, which means that almost none of the production times in the Tribal Encyclopedia are correct. For the barbarian bakery it says ever 30 seconds.

The correct Calculation for the bakery would be:


  20s    initial waiting
+ 20s    1. bread
+ 3,6s   take the 1. bread to the  flag
+ 20s    2. bread
+ 3,6s   take the 2. bread to the flag
=======
  67,2s  total time for one production cycle
  -----  divided by
    2    total number of steps/pieces produced in one action
=======
  33,6s  on average 

Wouldn't it?

Edited: 2018-07-31, 11:45

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 03:10
Posts: 2094
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-07-31, 12:00

stonerl wrote:

Hmm, which means that almost none of the production times in the Tribal Encyclopedia are correct.

True. The exceptions: Some farms.

For the barbarian bakery it says ever 30 seconds.

The correct Calculation for the bakery would be:

```

20s initial waiting + 20s 1. bread + 3,6s take the 1. bread to the flag + 20s 2. bread + 3,6s take the 2. bread to the flag ======= 67,2s total time for one production cycle ----- divided by 2 total number of steps/pieces produced in one action ======= 33,6s on average ```

Wouldn't it?

Yes


Wanted to save the world, then I got widetracked

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-07-31, 18:17

We should consider automating the calculations sometime... there might also have been some changes to the programs without any updates to the estimates.


Busy indexing nil values

Top Quote