bugBattle for Wesnoth - Bugs: bug #18679, [ai] blocks are ignored

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #18679: [ai] blocks are ignored

Submitted by:  Dan Gerhards <beetlenaut>
Submitted on:  Sat Sep 17 23:02:33 2011  
Category: BugSeverity: 4 - Important
Priority: 5 - NormalItem Group: WML
Status: InvalidPrivacy: Public
Assigned to: Celtic Minstrel <celticminstrel>Open/Closed: Open
Release: 1.9.9Operating System: Linux

Sun Mar 19 14:34:52 2017, comment #4:

The problem here is that only one of each aspect can be specified in the side's AI - in other words, you can have only one [avoid]. If you want to avoid multiple areas, you need to merge them into a single [avoid] tag. It doesn't matter how many [ai] tags you use - with a few minor exceptions, multiple [ai] tags are equivalent to stuffing everything into a single [ai] tag.

That's not to say that multiple [avoid] tags are useless, mind you. Each [avoid] tag stacks on a new facet, so if you want the AI to avoid one area, but halfway through the scenario they stop that and start to avoid a different area, you could use two [avoid] tags. The second tag would come into effect immediately; you could then use a [modify_ai] halfway through the scenario to remove it (with a path of aspect[avoid].facet[0] if I recall correctly), at which point the first [avoid] tag would be in effect.

In any case, this is not a bug but rather an misunderstanding of how the AI system works, so I'm marking this invalid.

Celtic Minstrel <celticminstrel>
Project MemberIn charge of this item.
Wed Oct 26 14:51:48 2011, comment #3:

Reproduced with both test cases.
My former setup seems to be somehow flawed in that the areas to avoid overlap...

Anonymissimus <anonymissimus>
Project Member
Wed Oct 26 03:28:42 2011, comment #2:

Hmm. It still doesn't work for me in r51650. Could you replace the original cfg (in AToTB) with the attached file, and see what happens? When I play, the ai units, which should be restricted to the castle march right for the player unless you remove the second [avoid].

(file #14263)

Dan Gerhards <beetlenaut>
Project Member
Tue Oct 25 18:34:12 2011, comment #1:

Crab, I guess you don't mind; I can't reproduce this in r51637. I used a side definition like so
The difference in ai behavior was obvious (grabbing a village in the affected column/not grabbing it).
Marking works for me.
It also worked with ai_algorithm=

Anonymissimus <anonymissimus>
Project Member
Sat Sep 17 23:02:33 2011, original submission:

If there is more than one [ai] block in a side tag, all of them are ignored. (This is true at least with [avoid]. Most other ai keys and tags have less obvious effects, so it's hard to tell.)

Dan Gerhards <beetlenaut>
Project Member


Attached Files
file #14263:  01_Rooting_Out_a_Mage.cfg added by beetlenaut (13kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by celticminstrel (Updated the item)
  • -unavailable- added by anonymissimus (Posted a comment)
  • -unavailable- added by fendrin (Updated the item)
  • -unavailable- added by beetlenaut (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Mar 19 14:34:52 2017celticminstrelStatusConfirmed=>Invalid
    Mon Feb 29 18:10:18 2016celticminstrelAssigned tocrab=>celticminstrel
    Wed Oct 26 14:51:48 2011anonymissimusStatusWorks For Me=>Confirmed
    Wed Oct 26 03:28:42 2011beetlenautAttached File-=>Added 01_Rooting_Out_a_Mage.cfg, #14263
    Tue Oct 25 18:34:12 2011anonymissimusStatusNone=>Works For Me
    Tue Oct 25 16:11:49 2011fendrinAssigned toNone=>crab
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup