Recruit pattern of computer players takes always same units

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
User avatar
BomSite
Posts: 59
Joined: September 5th, 2008, 6:21 pm
Location: Somewhere in the mountains of Wesnoth

Recruit pattern of computer players takes always same units

Post by BomSite »

We have released a beta version of an add-on with our own era on the add-on server
Extended Armies Era
For now, the purpose of this add-on is to extend each fraction with units they don't have in the standard era's; example, dwarves don't have a mage or healer in the standard era's, now they have in these extended era's. Basically, it are the default Wesnoth armies, but with additions, and a very small amount of edits, to keep it balanced.
The trouble is that an computer player doesn't recruit all units. It always has his preferred units, that will be used over and over again, although the units are balanced in our opinion.
What can we do so there is more variation in the recruit pattern, and not always the same units are recruited?
Many thanks.
Bom(b)Site is the work of tree brothers: my work, his work and he has done work.

The result of that work is the Extended Armies Era: http://forums.wesnoth.org/viewtopic.php?f=19&t=37358
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: Recruit pattern of computer players takes always same un

Post by SkyOne »

The AI usually picks the best unit to recruit as long as it has enough golds. So you may need custom usages if there is the same one in the recruitment list (fighter, archer, etc). Then list them at the recruitment_pattern keys in the [ai] tag. Well, just an idea, though.

I guess this Era will be popular.:)
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
User avatar
BomSite
Posts: 59
Joined: September 5th, 2008, 6:21 pm
Location: Somewhere in the mountains of Wesnoth

Re: Recruit pattern of computer players takes always same un

Post by BomSite »

SkyOne wrote:The AI usually picks the best unit to recruit as long as it has enough golds. So you may need custom usages if there is the same one in the recruitment list (fighter, archer, etc). Then list them at the recruitment_pattern keys in the [ai] tag. Well, just an idea, though.
Thanks, I will look into this :)
I have also found this one now: http://forums.wesnoth.org/viewtopic.php?f=21&t=27613
SkyOne wrote:I guess this Era will be popular.:)
The future will point out :D
We have our own place in the forums now:
http://forums.wesnoth.org/viewtopic.php?f=19&t=37358

Check also your pm, I have replied to your last message (about our usage Sword Drake and Drake Swordmaster in our campaign)
Bom(b)Site is the work of tree brothers: my work, his work and he has done work.

The result of that work is the Extended Armies Era: http://forums.wesnoth.org/viewtopic.php?f=19&t=37358
User avatar
Elvish_Hunter
Posts: 1600
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Recruit pattern of computer players takes always same un

Post by Elvish_Hunter »

Moved to Coder's Corner, that is a better place for AI discussion.
SkyOne wrote: So you may need custom usages if there is the same one in the recruitment list (fighter, archer, etc). Then list them at the recruitment_pattern keys in the [ai] tag.
You can also try adding recruitment_ignore_bad_combat=yes.
Another option may be writing a new recruitment stage using Lua AI.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: Recruit pattern of computer players takes always same un

Post by mattsc »

Elvish_Hunter wrote:Another option may be writing a new recruitment stage using Lua AI.
This post deals with a similar topic and contains some more on how to do what Elvish_Hunter suggests.
Post Reply