AI recruitment clarification query

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
Spannerbag
Posts: 491
Joined: December 18th, 2016, 6:14 pm
Location: Yes

AI recruitment clarification query

Post by Spannerbag »

Hi all,
I'm playtesting a scenario where one ai side has multiple leaders with different recruits.
Additional leaders are created within [side] and have extra_recruit set.
Side recruit is not used (recruit=).
I'd like to control how one leader recruits, it has extra_recruit=Troll Boulderlobber,Troll Shaman,Troll Warrior and I wanted more Warriors recruited than this seems to generate.
Version is 1.16.8

First, does repeating unittypes in extra_recruit have any effect?
I.e. would extra_recruit=Bowman,Bowman,Spearman result in the ai recruiting, on average, more Bowmen than Spearmen?
My playtesting would imply not (though I could've just been unfortunate with randomness).

I tried recruitment_instructions [recruit] with
leader_id= set to the appropriate leader id, pattern=yes,
type=Troll Boulderlobber,Troll Boulderlobber,Troll Shaman,Troll Warrior,Troll Warrior,Troll Warrior,
importance=1 and blocker=no followed by a second [recruit] with importance=0.

The AI recruited the pattern= units first (which I guess is due to importance=1, can anyone suggest a suitable lower importance value?).
However then the "primary" leader ([side] id=) also sort of recruited using this same pattern, ignoring that leader's extra_recruit.
After that the other leaders seemed to recruit as expected.

The side setup is slightly weird because the [side] leader is a dummy (so the side status displays with the correct leader image and name) and this fake leader is overwritten with the real (stored) leader of the same type/name in prestart.
This "primary" leader then has
[set_extra_recruit]
extra_recruit=Highwayman,Assassin,Fugitive,Huntsman,Ranger,Troll Boulderlobber,Troll Warrior
.
These last two unittypes are also in the type= list above and this leader seems to only recruit those two types :?


Unless anyone has a better suggestion, I'll just add Great Troll and Troll Hero to extra_recruit and get rid of recruitment_instructions.

Thanks in advance for any thoughts or suggestions,
cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
Post Reply