Latest Posts

Topic: Building Percentage Calculation

littlekatana
Avatar
Topic Opener
Joined: 2021-10-30, 16:43
Posts: 29
Ranking
Pry about Widelands
Posted at: 2021-11-15, 00:45

I see that the various building's production rate is shown at a %.

Some variations of this % makes sense for certain buildings, like if there are only so many trees in the working area of a lumberjack, then the lumberjack would be at a lower %.

However, for Farms, I can't understand why it would be at lower than 100% all of the time, since the farmer goes to each plot and plants his own grain, unlike the lumberjack who relies on the forester. Can anyone explain this calculation? I have a few farms in a game I'm playing and some of them are at 90% and some of them have dipper even lower.


Top Quote
mxb2001
Avatar
Joined: 2019-05-20, 18:49
Posts: 243
OS: Linux
Version: 1.1
Ranking
Widelands-Forum-Junkie
Location: The land of the thirsty spider
Posted at: 2021-11-15, 02:26

For farms I think that means there's not enough room. They're very generous for overlap allowed. VERY. But if you really cram them in to too tiny a space they will suffer.


--
To Boldly Go Where No Man Has Gone Before

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-11-15, 11:06

mxb2001 is right. if a farm has less then a certain amount (differs between some farms of some tribes) of free fields, its percentage will not reach maximum. however as the calculation is kind of an asymptotic function every percentage above 90% would mean everything is ok.


Top Quote
littlekatana
Avatar
Topic Opener
Joined: 2021-10-30, 16:43
Posts: 29
Ranking
Pry about Widelands
Posted at: 2021-11-17, 00:50

hessenfarmer wrote:

mxb2001 is right. if a farm has less then a certain amount (differs between some farms of some tribes) of free fields, its percentage will not reach maximum. however as the calculation is kind of an asymptotic function every percentage above 90% would mean everything is ok.

Can you elaborate on that in a pseudomathematical way, but also still easy for me to understand? lol Like, there is no veritable game effect/difference between a farm at 90% and a farm at 100%? Because my follow up question was going to be why does it seem to go up and down? Apart from me re-arranging things on the map, you'd think once a farm was placed it would have a set efficiency based on its surroundings.


Top Quote
tothxa
Avatar
Joined: 2021-03-24, 12:44
Posts: 436
OS: antix / Debian
Version: some new PR I'm testing
Ranking
Tribe Member
Posted at: 2021-11-17, 01:01

littlekatana wrote:

why does it seem to go up and down? Apart from me re-arranging things on the map, you'd think once a farm was placed it would have a set efficiency based on its surroundings.

I think it is affected by the walking time of the farmer, so when he works on a field near his flag, the efficiency will be higher than when he works on a field farther away.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-11-17, 09:34

well I try the requested math explanation.
we avaluate always the last 5 Minutes in the following way.

we have the duration a work Program (e.g. harvest field) has taken and the boolean value if we were succesful.
the formula is then:
(productivity before the last work program * (5 Minutes - duration) + success * duration) / 5 Minutes

as the walking times differ and failing is much quicker then success the values are weighted differently

Edited: 2021-11-17, 09:36

Top Quote