Strange Ai recruitment...
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.
Strange Ai recruitment...
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!
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!
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
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.
They aren't capitalized because they shouldn't be.Keeshu wrote:the Fighters, scouts, etc. dont have the first letter capitalized.... I made that mistake the first time i tried =P
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 )
As a first try, just remove the mixed fighter and see how it goes.
Try some Multiplayer Scenarios / Campaigns
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
Unfortunately, any spelling mistakes or extra spaces behind your commas (hint) will prevent the AI from acting correctly.gabe wrote:edit: fighter is how it is spelled
Try some Multiplayer Scenarios / Campaigns