Latest Posts

Topic: Soldiers filling up empty spaces

waldecker
Avatar
Joined: 2020-05-31, 21:15
Posts: 49
Ranking
Pry about Widelands
Location: Waldeck
Posted at: 2022-05-04, 13:23

Split out from Map Editor Forum

Nordfriese wrote:

hessenfarmer wrote:

waldecker wrote:

... why are defeated heroes replaced by rookies? Even with heroes still in the warehouse?

that is most probably a behaviour of the soldier algorithm and not related to the scenario. @Nordfriese?

Yes, that's the normal behaviour and not specific to a scenario: As long as a military site lacks soldiers (e.g. because a soldier died), the economy sends it the first-best replacement soldier who is available, regardless of soldier levels. Only when the site is fully stocked it starts to specifically request better soldiers than it has to replace its lower-ranking occupants.

"first-best" is to me that the best soldier from the nearest storage (HQ, warehouse, harbour) fills the empty space. But that's not whats happening.

Situation: --- All soldiers are stored in a single warehouse, training buildings are close to the warehouse, also weapon manufactures. (see screenshots) ---

When heroes are needed in a military building (here the castle), a potpourri of weak and medium soldiers walks to it to fill the empty spots, than the weakest are exchanged one by one with medium soldiers, when all medium soldiers have left the warehouse, the heroes start replacing the weak and medium soldiers.

When a building is set to be filled with rookies (here a new build tower) , its the opposite. First all spots are filled with heroes, then medium soldiers replace the heroes one by one and after that the medium soldiers are replaced by other medium soldier which than are replaced by rookies

Not sure what other players think about this, I could accept when the nearest soldiers go first and are than replaced by heroes/rookies (what ever is chosen in the building settings) who have a longer way, but the behaviour I observed here is annoying.

Cheers

Waldecker


Attachment: Soldiers.zip (3.3 MB)

Yesterday I stood before an abyss, today I'm one step further

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1583
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2022-05-04, 13:56

By "first-best" I meant "arbitrary". The levels are simply not taken into account at all when filling up vacant slots.

  • The algorithm first looks for the nearest supply of available soldiers. This is usually a warehouse with 1 or more soldiers in it.
  • From the selected supply, the oldest soldier or the soldier who has been there longest (one of those, not sure which one without checking the code) is selected to fill the vacant slot.
    • In games where you need heroes fast, you will often have a lot of rookies sitting around in your warehouses, in which case this soldier happens to be a rookie.
    • On the other hand, if you're replacing all the soldiers in an area with rookies, slowly heroes will start to gather in your warehouses and they will be the first to occupy new sites.

    This effect is a result of the way you're managing soldiers of different skill levels on different parts of the map. It's not a game mechanic.

When soldiers are exchanged, the algorithm always sends a better soldier, but not necessarily the best one. It was implemented like this deliberately because immediately attracting only the most highly trained soldiers would make your buildings nearly inconquerable.

The current implementation rewards you for micromanaging your soldiers in such a way that you always have a supply of replacement heroes near your frontiers to immediately replace any losses with highly skilled soldiers without waiting for an exchange soldier from some far-away place. Accomplishing that is not a military tactic but an economical challenge, which is what Widelands is all about.

Edited: 2022-05-04, 13:57

Top Quote
waldecker
Avatar
Joined: 2020-05-31, 21:15
Posts: 49
Ranking
Pry about Widelands
Location: Waldeck
Posted at: 2022-05-04, 23:03

Arbitrary is exactly what happens here, and the player is punished when soldiers are trained. Because a hero who comes back to a warehouse fresh from training is "the youngest" and thus the last to leave the warehouse if necessary. Micromanagement is all well and good, but it can't be done with the few settings available. If I want to train my soldiers quickly, I place the training buildings near a warehouse and store my soldiers there. But this way they are far away from the front (depending on the map size). If I have a warehouse in which I also store soldiers, it fills up with rookies and medium soldiers who then have to travel long distances to the training buildings. This may be somehow feasible with one opponent on small maps, but on large maps with several opponents and fronts this becomes a frustrating undertaking.


Yesterday I stood before an abyss, today I'm one step further

Top Quote