Filtering recruits for temporary leader
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.
Filtering recruits for temporary leader
In my Drake campaign, I'm having trouble juggling recruiting.
First of all, I have a Saurian leader Szel. He is the leader for just one scenario. I want to have all of his recruits be available to the real leader Menir, so I give him a save ID.
In scenario 2 and onward, I have Menir. Menir's code is as follows:
I don't know how to add Szel back in as a unit, so I use this command in the start event:
After that, I just recall Szel each time.
In scenario 7, I want just Szel to be in charge, and I want him to be only able to recall non-flying units.
My problems:
-Szel is able to recruit in scenarios 2-6, where I just want him to be a regular nonrecruiting loyal unit in those scenarios.
-Despite the filter_recall, the recalls are not filtered.
What can I do? You can get the full code from my add-on "A Fiery Birth". I've spent several days on the second problem and thought I had it solved, but now I don't know what to do.
First of all, I have a Saurian leader Szel. He is the leader for just one scenario. I want to have all of his recruits be available to the real leader Menir, so I give him a save ID.
Code: Select all
[side]
side=1
save_id=Menir
controller=human
recruit=Saurian Skirmisher, Saurian Augur
gold=150
team_name=good
user_team_name= _ "Enemies"
{FLAG_VARIANT undead}
type=Saurian Soothsayer
id=Szel
name= _ "Szel"
canrecruit=yes
facing=nw
[/side]
Code: Select all
[side]
side=1
controller=human
recruit=Saurian Skirmisher, Saurian Augur, Drake Burner, Drake Glider
gold=150
team_name=good
user_team_name= _ "Enemies"
{FLAG_VARIANT undead}
save_id=Menir
type=Drake Burner
id=Menir
name= _ "Menir"
canrecruit=yes
facing=nw
[/side]
Code: Select all
[unit]
name= _ "Szel"
type = Saurian Soothsayer
id=Szel
x,y=25,30
side=1
random_traits=yes
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_HERO}
unrenamable=yes
[/unit]
In scenario 7, I want just Szel to be in charge, and I want him to be only able to recall non-flying units.
Code: Select all
[side]
side=1
type=Saurian Soothsayer
save_id=Menir
id=Szel
recruit=Saurian Skirmisher, Saurian Augur, Drake Clasher
name= _ "Szel"
unrenamable=yes
canrecruit=yes
[filter_recall]
type=Saurian Skirmisher, Saurian Skirmisher, Saurian Flanker, Saurian Oracle, Saurian Soothsayer, Saurian Augur, Drake Clasher, Drake Arbiter, Drake Warden, Drake Thrasher, Drake Enforcer
[/filter_recall]
team_name=drakes
user_team_name=_"Scaly Folk"
controller=human
#ifdef EASY
gold=240
#else
gold=180
#endif
{FLAG_VARIANT loyalist}
[/side]
-Szel is able to recruit in scenarios 2-6, where I just want him to be a regular nonrecruiting loyal unit in those scenarios.
-Despite the filter_recall, the recalls are not filtered.
What can I do? You can get the full code from my add-on "A Fiery Birth". I've spent several days on the second problem and thought I had it solved, but now I don't know what to do.
Drake Campaign: A Fiery Birth | Knalgan Alliance Campaign: Drunkards, Dwarves, and Doubloons | Dunefolk Campaign: Asheviere's Shadow | Northeners Campaign: Goblin's Glory | Undead Campaign: Shakespeare's Ghost | Rebels Campaign: Santa Must Die
- ForestDragon
- Posts: 1771
- Joined: March 6th, 2014, 1:32 pm
- Location: Ukraine
Re: Filtering recruits for temporary leader
if you don't want him to recruit, just put something like {MODIFY_UNIT id=Szel )cancrecruit=no)}. I'm not sure if it's actually possible to filter recalls, though.
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
Re: Filtering recruits for temporary leader
Your problem is that [filter_recall] is a property of the unit (the leader), not of the side, and in your third scenario all unit properties (except id) will be ignored sionce it will just use the unit with the id Szel from the previous scenario instead of creating a new one with the specified properties.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Filtering recruits for temporary leader
So you've given me enough information that now I've fixed the recall list. Now I'm going to work on trimming the recruit list. Thanks!
Drake Campaign: A Fiery Birth | Knalgan Alliance Campaign: Drunkards, Dwarves, and Doubloons | Dunefolk Campaign: Asheviere's Shadow | Northeners Campaign: Goblin's Glory | Undead Campaign: Shakespeare's Ghost | Rebels Campaign: Santa Must Die