Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Suicidal leaders ruining game objectives #4203
There are some scenarios in different campaigns where the leader of an allied faction goes into suicidal mode.
This happens usually when an enemy unit is nearby that can be killed by that leader; often due to the leader being quite strong or the target having few hitpoints.
This in turn leads to the player losing the scenario because the suicidal leader ruining the game. (The scenario typically has a defeat-clause, where you lose the scenario if the allied leader dies. So the scenario is then lost due to "AI" behaviour primarily.)
There are partial workarounds, such as making sure that enemy units aren't close by etc.. but these are workarounds. The primary issue is that the leader is going into a suicidal run on its own, without the player having any way to control this.
Since this is a recurring issue, due to the "AI" being so linear, I suggest a simple but effective fix, or partial fix.
In the context menu, right clicking, AT THE BEGINNING OF A SCENARIO, the player can toggle the behaviour of the leader, AND SPECIFICALLY ENABLE a different "AI" behaviour in that the routine that triggers the above condition, is NOT applied for the leader.
The reason I suggest this to happen only on the beginning (first turn) is so that players can not gamble-toggle this on and off to control the allied leader. (Although I would not be against players being able to control allied leaders at all times - they tend to be so stupid and ruin a game which is annoying to no ends, since you have no control over it).
I do not know where the code is that triggers the aggressive suicidal behaviour of the allied leader, but evidently it must be somewhere where it checks whether it can attack an enemy unit, and then proceeds to attack so.
There are alternatives to the above, such as more behaviour differences, where allied leaders would be more "cautious" and don't leave their home base in an attacking-forward motion. But if players are able to change that behaviour on start of a scenario, for that scenario, then this would actually fix the above problem.
I am writing this right after playing an add-on campaign where I have to defend a necromancer who keeps on running against outlaws that are hitting his castle. The problem is that my units can not yet help since they are too far away (even lancers); and even when I arrive nearby, the allied leader goes on a suicide run AND THERE IS NOTHING I, AS A PLAYER, CAN DO ABOUT IT RIGHT NOW.
This is why I think a change ought to happen in an upcoming wesnoth release.
Please disregard it if an upcoming dev-version already fixes it - I am only playing on latest stable (1.14.7); had too many problems with unstable versions not compiling on my linux system. Thanks for reading.