Latest Posts

Topic: Problem with worker requests

hessenfarmer
Avatar
Joined: 2014-12-11, 22:16
Posts: 2648
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-06-29, 08:51

JanO wrote:

Would it be reasonable to code a manual mode for (tool-)smiths? Like two additional buttons (next to work/stop) where one can shift between "stop", "automatic", "manual" where stop is obvious, automatic means the current behaviour and manual makes this specific building invisible for requests from warehouses. Then we would need an additional window or tab (building-specific or economy-wide) where those manual requests can be set. This could look like the one for the economy targets to keep it simple on UI-level.

Basically, I don't see any need for this as the whole problem arose around the "poor Hamlet" Starting condition, which is a cornercase as it is a puzzle. In normal games you have enough Iron to produce the tools you need (given you have set the economic settings right) and the order of tools produced doesn't matter. So the gain for the pain isn't worth having such complicated mechanism.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 17:07
Posts: 1949
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-06-29, 09:48

In my opinion it is possible for players to figure out enough of the economy mechanics to beat the minimal starts.

Observation : A tool and a worker are created when they are no longer needed    
Explanation : When a worker is needed, he will be created when possible, regardless of future circumstances   
Solution    : Taking care never to request workers which are employed elsewhere

This starting condition is meant as a challenge for very experienced players who have mastered the art of getting their economy to run as smoothly as possible and who can therefore be expected to discover ways around such problems when they arise.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2020-06-29, 18:37

I'm not sure if it's only an issue for Poor Hamlet - I remember when I first tested the Frisian scenario and my iron just disappeared into the Warehouse without producing a single miner, and there was no mode to be had.

So, I think checking whether the playerimmovable in a request still exists before building the worker should be an easy enough solution to catch at least some of that.


Busy indexing nil values

Top Quote
Tribal-Chief
Avatar
Joined: 2018-12-09, 16:16
Posts: 62
Ranking
Likes to be here
Posted at: 2020-06-30, 08:57

Poor hamlet is my preferred starting condition, I have replaced my own hardcore start condition with it, it does not need fixing.

I agree that checking if a worker is still required before creating one is a logical improvement to any game including Poor Hamlet and would make many games better.

I have played dozens of maps and tribes with this starting condition without problems, well none that required a restart, except the first time when I did not think to check what workers I had before starting.


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

I have created a branch: https://github.com/gunchleoc/widelands/tree/check-immovable-for-worker-requests

Can you guys help me with how to recreate the problem, i.e. give me a savegame where I only have to destroy a building where a worker request already exists and should be deleted, and the results can be checked easily?


Busy indexing nil values

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 22:16
Posts: 2648
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-07-02, 08:31

@ Gunchleoc:

easiest would be use "poor Hamlet" SC with barbarians. Build a woodcutter and a woodhardener, afterwards build a metal works and dismantle one of the first 2 buildings currently an axe is produced for the second woodcutter if fixed this shouldn't happen.


Top Quote
niektory
Avatar
Joined: 2019-06-03, 19:06
Posts: 206
Ranking
Widelands-Forum-Junkie
Location: Poland
Posted at: 2020-07-03, 03:11

GunChleoc wrote:

Can you guys help me with how to recreate the problem, i.e. give me a savegame where I only have to destroy a building where a worker request already exists and should be deleted, and the results can be checked easily?

I attached a savegame. If you destroy both buildings that use felling axes (woodcutter and wood hardener) and then unpause the metal workshop, a new felling ax will be produced anyway.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2020-07-03, 07:23

Thanks! My branch doesn't fix it, because the request is sitting in the Metal Workshop, not the Warehouse.

So, we'll need to do something more elaborate at the request itself - somebody needs to subscribe to NoteImmovable and clean up the requests when it's triggered.


Busy indexing nil values

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-07-03, 17:15

Hm, because workers are produced in a warehouse, formerly i thought i had to set the target tool in the economy settings to let the toolsmith produce this tool. But now i have learned that the tool is also produced by the toolsmith if all economy settings are set to zero face-shock.png

My formerly thought was surely because i had always trouble to understand the economy settings. But now i know this is stock settings, or store settings ... and has only partly something to do with the economy. Shouldn't this be reworded to make it more clear?

And i am not sure if this behavior (production side produces ware if economy settings are set to zero) is good. Somehow i find this illogical, because: if i set all economy settings to zero, i would assume that no tools were created, regardless of worker requests.
On the other side this behavior makes playing a bit easier, because the economy settings are not involved in worker creation.
On the other side this behavior produces probably more workers than needed.

I don't know face-grin.png


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

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2020-07-03, 17:27

I have created an issue for this now: https://github.com/widelands/widelands/issues/3962

In our scenario, we actually need to cancel 2 requests: one for the worker, and one for the tool.

Looks like economy settings only affect whether new requests are created and once the request exists, the settings get ignored. Don't quote me on that though; haven't checked the code.


Busy indexing nil values

Top Quote