Strange Ai recruitment...

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
Dret
Posts: 79
Joined: June 13th, 2007, 11:06 pm
Contact:

Strange Ai recruitment...

Post by Dret »

Hi to all.

During the testing phase of my multiplayers scenario I saw this:

sometimes any of the 4 Ai sides start to recruits units in bizzare way, for example:

- recruiting a less number of unit than the recruitment points or money avaiable (and sometimes no-units are created!!)

It's normal or I made some mistakes in buildind WMLcode??

This is the code for Ai sides settings:

[side]
side=5
controller=ai
team_name=2
user_team_name=Unknown Enemy
canrecruit=1
gold=250
village_gold=5
income=10
fog=yes
shroud=yes
colour=8
colour_lock=true
share_maps=yes
share_view=yes
allow_player=false
team_lock=true
gold_lock=true
income_lock=true
name={MENU_IMG_TXT "random-enemy.png" (_"Unknown Enemy")}
type=Dark Sorcerer
recruit=Skeleton,Skeleton Archer,Walking Corpse,Ghost,Vampire Bat,Dark Adept,Ghoul,Orcish Grunt,Troll Whelp,Wolf Rider,Orcish Archer,Orcish Assassin,Saurian Skirmisher,Thug,Thief,Poacher,Footpad,Saurian Augur

[ai]
recruitment_pattern=fighter,fighter,scout,scout,mixed fighter,archer
passive_leader=no
aggression=1.0
ai_algorithm=default
village_value=4
leader_value=10
villages_per_scout=6
[/ai]

[/side]


Thanks!
:)
Snarius
Posts: 18
Joined: May 16th, 2007, 4:30 am

Post by Snarius »

I've noticed that happening when one of those units is misspelled.
Dret
Posts: 79
Joined: June 13th, 2007, 11:06 pm
Contact:

Post by Dret »

Snarius wrote:I've noticed that happening when one of those units is misspelled.
I have controlled but it seems all ok under this point of view...
:?
Keeshu
Posts: 4
Joined: June 10th, 2007, 5:22 am

Post by Keeshu »

I'm new to editing, but i have messed with recruiting already, and it is caps sensitive ^^"

So maybe the problem was in this area. assuming you copied and pasted

[ai]
recruitment_pattern=fighter,fighter,scout,scout,mixed fighter,archer
passive_leader=no
aggression=1.0
ai_algorithm=default
village_value=4
leader_value=10
villages_per_scout=6
[/ai]


the Fighters, scouts, etc. dont have the first letter capitalized.... I made that mistake the first time i tried =P
Scenario Editor in training.
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

Keeshu wrote:the Fighters, scouts, etc. dont have the first letter capitalized.... I made that mistake the first time i tried =P
They aren't capitalized because they shouldn't be.

Are you sure you have at least one unit of all those types? For instance, which unit is a mixed fighter in your recruit list (it's an awfully long list)? Not having that type of unit will cause the AI to stop recruiting...

You can check the unit usage in the individual unit configuration files, under usage, right above the description. (In Unix, you can use grep and other tools to quickly search for and extract all lines with "usage=" in them :wink:)

As a first try, just remove the mixed fighter and see how it goes. :)
gabe
Posts: 180
Joined: December 15th, 2006, 1:15 am
Location: an island in the pacific

Post by gabe »

I have a campaign and in one scenario the leader recruits poorly and he has recruits that match all possible descriptions regardless of difficulty. He is always a crappy recruiter Here are his stas:

Code: Select all

		#ifdef EASY

			recruit=Mage, Footpad, Poacher, Thug
			gold=300

		#endif	
		#ifdef NORMAL
			recruit=Mage, Footpad, Poacher, Thug, Bandit

			gold=350

		#endif	
		#ifdef HARD

			recruit=Mage, Red Mage, Footpad, Thug, Bandit, Poacher, Trapper
			gold=400

		#endif	
		team_name=humans
		[ai]
			recruitment_pattern=mixed figther, mixed fighter, scout, fighter, archer
			grouping=offensive
			caution=0.5			
			villages_per_scout=1
		[/ai]
happy timezone traveler
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Ahem..."mixed figther"? :?
gabe
Posts: 180
Joined: December 15th, 2006, 1:15 am
Location: an island in the pacific

Post by gabe »

What should it be then?

edit: I can not spell good. I am dumb.
edit: fighter is how it is spelled
happy timezone traveler
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

gabe wrote:edit: fighter is how it is spelled
Unfortunately, any spelling mistakes or extra spaces behind your commas (hint) will prevent the AI from acting correctly.
Post Reply