Prefer Heroes/Rookies flaw with economy requests

Bug #1793360 reported by kaputtnik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Medium
Unassigned

Bug Description

Seen r8840 but i guess this happens also for build 19 (not tested):

1. Start a new game
2. Build a Sentry
3. Start building a training site (i used empire colosseum)
4. As soon the Sentry has been built set the preferred soldier to Heroes and switch back to prefer Rookies
5. Wait until the Colosseum has been finished and the first upgraded soldier leaves it

Result:
The upgraded soldier is walking to the sentry and immediately goes back to the headquarters

Expected:
The upgraded soldier has to walk immediately into the headquarters without first walking to the Sentry.

Didn't found a better Title for this bug... please change it to describe the problem better.

Tags: economy
Revision history for this message
hessenfarmer (stephan-lutz) wrote :

I see this quite often and it worsens if you have more than one building, cause the upgraded soldier will knock on the door of each of the military buildings where you have cahnged the settings to prefer rookies.

Revision history for this message
kaputtnik (franku) wrote :

Thats true and could prevent soldiers going fast to the frontier where the enemy is nearby.

Changed in widelands:
status: New → Confirmed
Revision history for this message
Benedikt Straub (nordfriese) wrote :

I think this observation might be related:
Assume you have no soldiers in warehouses, but all militarysites are occupied. You destroy a militarysite, thus freeing a soldier. He starts going to a warehouse. While he´s on the way, a new militarysite is finished and needs a soldier.
Expected behaviour: The soldier should go to the new militarysite.
What I get: He walks to the warehouse, enters, comes straight out again and then goes to the militarysite.

I´d guess that the issue is that for soldiers (or all workers?), old requests are not removed correctly and new requests don´t cancel fallback tasks as expected.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I guess what happens here is that the economy request for the soldier never gets canceled. Only after reaching the destination, the old request is canceled and the already waiting, new request is fulfilled.

tags: added: economy
summary: - Prefer Heroes/Rookies flaw
+ Prefer Heroes/Rookies flaw with economy requests
Changed in widelands:
importance: Undecided → Medium
Revision history for this message
Teppo Mäenpää (kxq) wrote :

Was done this way to keep it simple. Old requests remain in order.

Also the exchange of soldiers happens slowly, and the "old guy" may leave before replacement arrives. It would be relatively easy to do the soldier exchange so, that all good soldiers are vacuumed in. This would effectively fortify the military site: If warehouse is far, slow arrival of replacements can affect the outcome. Also the fact that soldier selection happens only when the site is full and the fact that the site just grabs "something more suitable" instead of the best candidate are intentional.

Still, I agree that in the case described in the bug description, the old request should be cancelled.

#3: This behavior happens with wares, too, and can even be worse in those situations, and in case of militarysites is not limited to soldier exchange. If you build a new military building in a seafaring map, and there are no vacant soldiers on any warehouse on that island, some far-away solders get assigned and that assignment can basically only be reversed by reducing the amount of stationed soldiers in the unoccupied site (which cancels a request) and then increasing it again, in which case a nearby vacant soldier takes over the new militarysite.

Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.