AS (Artificial Sillyness)

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

AS (Artificial Sillyness)

Post by Geos »

I very well now my WML got severly rusty but, running through my old campaign (Love To Death) I bumped into a couple of AI behaviors that I just can't understand well.

In scenario 1, my evil evil dude doesn't want to attack. Has no keep, true, but it should hit the good guys when they come around, right? There is no AI tag associated, so there is not funny instruction.

In the 4th scenario it get wicked. This is the AI for the side of animals that are supposed to be few and annoy the hero as it goes through the mountains:

Code: Select all

        [ai]
            simple_targeting=yes
            aggresion=1
            village_value=0
            [target]
                race=Human
                value=2.0
            [/target]
            [target]
                race=Orc
                value=1.0
            [/target]
        [/ai]
I would say that the animals would simply attack whatever they find, giving preference to humans rather than orcs, and will not care about villages. Well, turn 1, 3 wolfs close to the starting point of player 1. One captures a village and the other 2 run away, towards the Orcs... wth!?!?!

Any idea?

It would be much appreciated.
That's ridiculous, dragons have no windows...
User avatar
Elvish_Hunter
Forum Moderator
Posts: 1446
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: AS (Artificial Sillyness)

Post by Elvish_Hunter »

Ciao Geos,
first of all I can notice that you wrote aggresion instead of aggression.
Second, your standard unit filter for [target] is incorrect. Races don't start with caps: see this line from the Orcish Grunt .cfg:

Code: Select all

race=orc
As for the first scenario, you can use the leader_aggression parameter.
Finally, you may consider updating to 1.8 syntax or using Lua AI if needed, but these aren't mandatory. :)
Current maintainer of these add-ons:
1.14: The Sojournings of Grog, A Rough Life, The White Troll (co-author), Wesnoth Lua Pack
1.12: Children of Dragons
Post Reply