Latest Posts

Topic: Bugs

Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-02-20, 21:43

king_of_nowhere wrote:

Tibor wrote:

One of questions is, should we use times form lua files or actual time of production

for buildings that do not require workers to walk around, time for lua files is actual time of production (remeber to add the 3.6 seconds to walk to the flag and back).

For farms, I made a good experimental measure there, giving 80 seconds for empire and atlantean and 100 seconds for barbarians.

for woodcutters, foresters and quarries, there is no easy way to do it, because the walked distance will depend a lot on the terrain. we could calculate an average, if we accept that productivity may be greater than 100% if a building get to work closer than usual. we may add a line in the help to explain it if we do.

So than actual time would be the best. Easiest to implement, no complicated estimations and could be used for all productionsites. Mixing values from lua files and estimations seems to be too complicated....


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2017-02-21, 00:26

Tibor wrote:

So than actual time would be the best. Easiest to implement, no complicated estimations and could be used for all productionsites. Mixing values from lua files and estimations seems to be too complicated....

well, you are the one with programming experience, so you can judge this best. as far as i understand, it would be equivalent; iin one case you calculate the time of a working cycle from the lua files, in the other you find it experimentally.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-02-21, 08:52

For workers who do not leave the building, actual time from the Lua files will indeed do.

For workers who leave the building, we could maybe disregard the time for now and fix it up later if the stats are way off? They have no economy requirements, so the production will only fail if there is no resource/free space available.


Busy indexing nil values

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2017-02-21, 09:25

GunChleoc wrote:

For workers who do not leave the building, actual time from the Lua files will indeed do.

For workers who leave the building, we could maybe disregard the time for now and fix it up later if the stats are way off? They have no economy requirements, so the production will only fail if there is no resource/free space available.

Yes, I agree that we could disregard them for the time being. Or we could just make a crude approximation by calculating time for half their radius - balancing the fact that there are more corners more distant from the center and that the worker preferrably works closer


Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-02-21, 11:20

So you suggest new entry in lua files like "estimated working time"?

My idea is a new variable for productionsite objects like:

uint32_t last production_end_time

This would provide accurate timing to the miliseconds. But it depends on how overall counting of statistics will look like....


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 17:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2017-02-21, 11:37

I was concerned with increasing too much the use of cpu or RAM by adding new variables that need to be counted every millisecond. but if you can do it just by adding a single number that only has to be changed donce in a while, then good


Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-02-21, 18:18

The variable would be updated only at the end of production cycle, or "skip" or "fail" cycle. I am not sure how long skip or fail cycle takes, but I presume it will be about 1 second...


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-02-21, 19:07

Tibor wrote:

So you suggest new entry in lua files like "estimated working time"?

We might do that as a second step, for the production sites where the workers do the work only. If we do this cleverly, we could use this for the helptexts too then.


Busy indexing nil values

Top Quote
WorldSavior
Avatar
Topic Opener
Joined: 2016-10-15, 03:10
Posts: 2094
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-02-22, 23:04

GunChleoc wrote:

After a lot of digging, I found the stay at home bug: https://code.launchpad.net/~widelands-dev/widelands/bug-1664145-miners/+merge/317710

We do need to check with the Atlanteans if they need granite. Otherwise, they won't get any if they have some diamonds or quartz left. If they have plenty, the check won't trigger the work, so removing the granite check won't make them work more.

What do you mean?

As to the Empire, here's their production program in a nutshell:

Marble Mine

  1. 3 marble, 1 granite
  2. 1 marble, 3 granite

Deep Marble Mine

  1. 3 marble, 2 granite

Quarry

Will find 7 granite / 2 marble

So, if you want less granite and more marble, you need a mine, and if you want to shift the balance even more, an upgraded mine. I don't think we need an extra button in the quarry - that would make the game mechanics more complicated and replace the challenge for building efficient mines by micromanagement.

I don't see that my suggestion brings the need for a lot of micromanagement...

What we could have is the worker for the quarry gaining experience and then cutting more marble when he's advanced a level.

Would be a possibility. And the workers could gain experience in that one other type of building (were they work) as well...

Suggestion for the marble mine:

  1. If marble needed: Produce 3 marble, 1 granite. Skip otherwise.
  2. If granite needed: Produce 1 marble, 3 granite. Skip otherwise.

king_of_nowhere wrote:

long talk about mines

GunChleoc wrote:

After a lot of digging,

Pun intended?

((-:

GunChleoc wrote:

Regarding the productivity calculations, I found an open bug: https://bugs.launchpad.net/widelands/+bug/1505401

It's funny that the productivity statistics sometimes show a number which is too low (mill, wood cutters etc.) and sometimes a number which is much too high (mostly work-skipping buildings) face-grin.png

@diskussion:

I measured some of the speeds of some buildings. "Building: x times in an hour working"

Atlanteans

Very productive woodcutter: 84

Fisher: 85

Best forester ever: 92

Barbarians

Fisher: 86

Hunter: 66

Good Gamekeeper: 52

Perfect Gamekeeper: 58

Empire

Fisher: 96 (is that possible?)


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: 2017-02-23, 17:01

WorldSavior wrote:

GunChleoc wrote:

After a lot of digging, I found the stay at home bug: https://code.launchpad.net/~widelands-dev/widelands/bug-1664145-miners/+merge/317710

We do need to check with the Atlanteans if they need granite. Otherwise, they won't get any if they have some diamonds or quartz left. If they have plenty, the check won't trigger the work, so removing the granite check won't make them work more.

What do you mean?

  • Imagine a map where rocks are scarce and everybody needs to build granite/marble/crystal mines.
  • Then imaging that the Atlantean player isn't building a lot of higher-level buildings, which means that no quartz or crystal are needed, because stock is already plenty.
  • Result: Atlanteans won't get any granite at all, because the "economy needs granite" check has been removed, and the checks for quartz and diamonds return that none are needed. So, Atlanteans won't be getting and granite.
  • Conclusion: "economy needs granite" needs to stay.
Edited: 2017-02-23, 17:03

Busy indexing nil values

Top Quote