Latest Posts

Topic: Out of fields

kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-05-11, 22:45

Why is there a message about a farmer gets "out of fields"?

This message is, as i know, new in widelands. In build 18 i never noticed it.

A Farmer do allways seed new fields, so in my opinion this message is useless. So why?


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-05-11, 23:01

Perhaps he is not able to find empty field to plant new crops?


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-05-12, 00:08

well, i noticed myself that the message is sometimes sent also when the farmer has fields enough, but it is minor enough that i never assumed it worth investigating. almost always farms who give that message are effectively short in space.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1118
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-05-12, 01:52

I even had some messages like that from farms connected by single road (or 2 roads) and full of space around. Of course it took several hours of gameplay to catch that situation face-smile.png


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-05-12, 11:01

Maybe we need to adjust the delay a bit before the message comes up, for all farms and the reed yard.


Busy indexing nil values

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-05-12, 19:33

not sure if delaying the message would help. on one hand, it would avoid the fake message, but on the other, it would mean that a farm with insufficient space - but still with some space - would never give the message, even if it is chronically short in space.

I think the best way to handle it would be to send the message if the farm's productivity is below 70%, and falling. there can be only one reason for low productivity of a farm, i.e. lack of fields, so that should be a truer indicator than any counter.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-05-12, 19:54

At the moment, the message is triggered by Worker::run_findobject, except for mines, where indeed the percentage of something is used. It is triggered every time the worker doesn't find an object, and the delay counter is there to keep it from being triggered straight away.

It makes sense like that for quarries and fishers, but for farmers and lumberjacks, not so much. Bug time face-smile.png


Busy indexing nil values

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-05-12, 21:59

Most buildings have a "working area" and everyone who plays widelands knows that this could be importand. For farmers it is also graphically shown: He seeds fields only in this area. So if this area is covered by other buildings/streets everyone could imagine that the farmer couldn't get a productivity of 100%. So it would be clear that the farmers working area has to be free to get a good work for him. In my mind a notice should be send, if there is a situation for the building/worker which is not in the players hand. Covering the working area of a farm is in the players hand, but he/she should know what he/she is doing if he/she covers the working area of a farm.

Lumberjacks are often used to only get rid of trees to clear up an area on the map to, f.e. place new buildings. If the Lumberjack works together with a forester, such messages are unneeded, but if a lumberjack is working only to cut trees to get more space for buildings/streets, such a message is usefull.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-05-12, 22:17

Done properly, the messages will be useful for inexperienced players in any case. And the AI uses them as well to help it decide when to dismantle a building. So, it is important that we fix this to get messages at the proper time.


Busy indexing nil values

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-05-14, 16:12

Here it is

The worker is still the agent triggering the messages, but the production site then checks if the productivity is below a certain % and falling, as kaputtik suggested.

The percentage values in the conf files can probably be tweaked - I have set them to 33% for now, since this is where production site stats turn red. I guess we need to test these in real games to find out if they work. The new parameter is called productivity_threshold. It defaults to 100%, so mines and quarries etc. don't need to set it and will send their messages at once.


Busy indexing nil values

Top Quote