Sitting leader

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
LienRag
Posts: 127
Joined: September 24th, 2018, 4:03 pm

Sitting leader

Post by LienRag »

Is there a way to debug a leader sitting next to his keep while doing nothing ?

I encircled his castle to farm XP, and it worked for a while but one turn he moved from his keep to give leadership bonus to one of his unit attacking a healer, and after that he never went back to his keep, even after I emptied the space around him. I even removed my units away from the village nearby (so he could go heal if that's what's causing the bug), to no avail.
It's been more than a hundred turns now and he still sits there without doing any action...
User avatar
octalot
General Code Maintainer
Posts: 783
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Sitting leader

Post by octalot »

Which scenario is this on, and please would you upload a savefile?

I'd guess that he's meant to stay on the keep, and that the AI has been configured for him not to move - except that the AI for "can give a leadership bonus" has been left unaltered.
LienRag
Posts: 127
Joined: September 24th, 2018, 4:03 pm

Re: Sitting leader

Post by LienRag »

octalot wrote: February 3rd, 2021, 5:19 am Which scenario is this on, and please would you upload a savefile?

I'd guess that he's meant to stay on the keep, and that the AI has been configured for him not to move - except that the AI for "can give a leadership bonus" has been left unaltered.
Oh, that could be that.
It's the Battle of Barnon in A New Order, on Wesnoth 1.15 (snap package).
I managed to kill one of the enemies, have another flee and now if I kill Bor Cryne the campaign ends.

Here's indeed what the AI part in the scenario is for Bor Cryne :
[ai]
{NO_SCOUTS}
{ATTACK_DEPTH 2 4 5}
recruitment_pattern=fighter
aggression=0.6
caution=0
grouping=offensive
passive_leader=yes
leader_value=6

I think he has a few thousands of gold pieces now so if I can make him go back to his keep I have a good battle in front of me...
Attachments
ANO-Battle of Barnon-Auto-Save1579.gz
(285.38 KiB) Downloaded 158 times
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Sitting leader

Post by Lord-Knightmare »

Code: Select all

passive_leader=yes
If that is set to yes, the leader is not supposed to move at all. Maybe there is a MicroAI in play? Particularly bottleneck defense MAI?
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
LienRag
Posts: 127
Joined: September 24th, 2018, 4:03 pm

Re: Sitting leader

Post by LienRag »

I have no idea, is there a way to check that ?
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Sitting leader

Post by Lord-Knightmare »

I have no idea, is there a way to check that ?
LienRag wrote: February 7th, 2021, 5:37 pm Here's indeed what the AI part in the scenario is for Bor Cryne :
[ai]
{NO_SCOUTS}
{ATTACK_DEPTH 2 4 5}
recruitment_pattern=fighter
aggression=0.6
caution=0
grouping=offensive
passive_leader=yes
leader_value=6
You already did.
Additionally, for checking the MAI tags, you can search up [micro_ai][/micro_ai] in the scenario file but I don't think there should be any.
Edit: I have viewed the CFG file for the scenario and I have not found any such tag.
Additionally, the whole scenario code suggests that this "Bor Cryne" is never even supposed to be approached.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
octalot
General Code Maintainer
Posts: 783
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Sitting leader

Post by octalot »

The savefile says that you're using 1.15.0-dev, and the changelog says that there was a lot of work on the AIs in 1.15.3, including bugfixes about passive leaders.
LienRag
Posts: 127
Joined: September 24th, 2018, 4:03 pm

Re: Sitting leader

Post by LienRag »

octalot wrote: February 7th, 2021, 6:48 pm The savefile says that you're using 1.15.0-dev, and the changelog says that there was a lot of work on the AIs in 1.15.3, including bugfixes about passive leaders.
I did a Snap refresh recently though ?
But if the problem is that the leader moved when it shouldn't have, I guess no AI bugfix will change that now that he moved ?

Is there a way to modify the savefile to move the leader to its keep ?
I tried to read it but wasn't able to find the coordinates for each unit (and actually wasn't able to find where the unit was in the file, ctrl+F on Bor Cryne gets a lot of result, but not the unit itself amongst them - or at least I didn't find it).
LienRag
Posts: 127
Joined: September 24th, 2018, 4:03 pm

Re: Sitting leader

Post by LienRag »

Lord-Knightmare wrote: February 7th, 2021, 6:28 pm
Additionally, the whole scenario code suggests that this "Bor Cryne" is never even supposed to be approached.
Indeed, but he's a meanie who wants to kill me, so I wanted to test what happens if I successfully counterattack.
Post Reply