Barbarian campaing, scenario 2: yellow brother bails out

Bug #1639514 reported by Steven De Herdt on 2016-11-05
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

I was slowly playing the Barbarian campaign again. When I finally got to the two warring brothers, I found the yellow territory empty, no military sites to defeat. The military might graph shows a rather sudden, but not immediate, drop for yellow. I suppose this AI just blew up its own buildings, as he figures (after a few hours) he has lost, that is, he has no warehouses left. (I've seen this happen before, (after a long time) to a disconnected part of an AI empire.)

This doesn't look very impressive, we'd better give the poor warlord a warehouse. ;) There's probably more to be done to make the area look more like a ravaged city, instead of the snowy desert it is now, but that's another matter/bug.

(Easily reproducible: start scenario and let it run for a few game-hours.)

Related branches

GunChleoc (gunchleoc) on 2016-11-05
tags: added: barbarians campaign
Changed in widelands:
milestone: none → build20-rc1
importance: Undecided → Medium
status: New → Confirmed
TiborB (tiborb95) wrote :

AI has a policy to dismantle a site if not connected to warehouse for some time. Soldiers can find a way home and productionsites are useless if not connected to warehouse.
But I can imagine an exemption here - do not dismantle unconnected buildings if a player has no warehouse at all, makes sense.

Assigning it to me, I hope I will not forget about it...

Changed in widelands:
assignee: nobody → TiborB (tiborb95)
hessenfarmer (stephan-lutz) wrote :

Alternatively it would be helpful to turn the AI completely off for defined players in some scenario design. Even better to change the state of the AI for every Computer player between "off" "poor" and "good" via script. Had an issue with the Ai dismantling the wrong building in empire 4 lately.

GunChleoc (gunchleoc) wrote :

We could try changing the AI in the player_names packet

Legal value is probably "empty", try "none" if that doesn't work.

TiborB (tiborb95) wrote :

Switching between various AI types can be problematic, as weaker AIs have some buildings limited, so I am not sure how AI would cope with such changing limit....

kaputtnik (franku) wrote :

I have tried to use ai="none" and run a test game, this seems to work, all buildings of the yellow player were still there as i reached him. The buildings weren't connected with roads, though. That could be fixed and is the reason for the merge request:

But there is another issue:
If i start the game and make the area of the yellow player visible, i see that from time to time a soldier get out of a military building, walking directionless around. You could try that yourself:

1. Run the game and open the second barbarian campaign
2. Wait until the first message box is shown and close it
3. Pause the game
4. Open the scripting console
5. Reveal the area of the yellow player and scroll to it (do not reveal all fields, because that will raise additional tasks):
6. Set game speed to 3x or more

After some time a soldier leaves a military building.

kaputtnik (franku) wrote :

Used ai="empty" now and manually connected the military buildings with some roads. tested by revealing the fields like described in #5 and let the game run for about 3hrs gametime without interaction. No soldiers left the buildings and the buildings get not destroyed.

Not tested how the empty ai manage defense of the buildings. Would this be affected if ai="empty" is set?

The linked branch contains these changes, but need this branch as prerequisite:

Will test the defense question later...

GunChleoc (gunchleoc) wrote :

Ai won't manage the defense of the buildings, since there is no AI. Soldiers will simply stay put and defend each building when attacked.

kaputtnik (franku) on 2018-02-16
Changed in widelands:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers