# Topic: Building Percentage Calculation

 littlekatana Topic Opener Joined: 2021-10-30, 15:43 Posts: 29 Pry about Widelands Posted at: 2021-11-14, 23: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 Joined: 2019-05-20, 17:49 Posts: 207 OS: Linux Version: 1.0 Widelands-Forum-Junkie Location: The land of the thirsty spider Posted at: 2021-11-15, 01: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 Joined: 2014-12-11, 22:16 Posts: 2414 One Elder of Players Location: Bavaria Posted at: 2021-11-15, 10: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 Topic Opener Joined: 2021-10-30, 15:43 Posts: 29 Pry about Widelands Posted at: 2021-11-16, 23: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 Joined: 2021-03-24, 11:44 Posts: 294 OS: antix / Debian Version: some new PR I'm testing Tribe Member Posted at: 2021-11-17, 00: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 Joined: 2014-12-11, 22:16 Posts: 2414 One Elder of Players Location: Bavaria Posted at: 2021-11-17, 08: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, 08:36 Top Quote