Latest Posts

Topic: Missing information

stonerl
Avatar
Joined: 2018-07-30, 00:03
Posts: 94
Ranking
Likes to be here
Location: Earth
Posted at: 2018-07-31, 04: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, 18:35
Posts: 1133
Ranking
One Elder of Players
Posted at: 2018-07-31, 05: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
Joined: 2018-07-30, 00:03
Posts: 94
Ranking
Likes to be here
Location: Earth
Posted at: 2018-07-31, 05: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, 05:51
Top Quote
Tinker
Avatar
Joined: 2014-09-12, 10:53
Posts: 183
Ranking
Widelands-Forum-Junkie
Location: DDR
Posted at: 2018-07-31, 09: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.


The only way to prevent a mass extinction event is to remove homo sapiens, or stupiditus, from the planet. It may be to late for this final solution though.

Top Quote
stonerl
Avatar
Joined: 2018-07-30, 00:03
Posts: 94
Ranking
Likes to be here
Location: Earth
Posted at: 2018-07-31, 12: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, 12:45
Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 795
Ranking
One Elder of Players
Location: GER
Posted at: 2018-07-31, 13: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


“It's a threat to our planet to believe that someone else will save it.” - Robert Swan

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2623
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-07-31, 19: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