• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Limiting minion selection

frumple

Well-known member
I am working on a template that grants a minion. I can get it to offer the minion easy enough, but I want to limit what minions they can select to certain subtypes and crs.


I am guessing that the field I want to modify is tRaceExpr in Totals which I transition to via.

hero.minion[MINION_ID].child[Totals].field[tRaceExpr].text

For subtypes I figure I just have to append " & Subtype.SUBTYPEID"

and for cr append " & fieldval:tCR <= CRMAX"

However I cannot get the timing right. Either I get no effect or I get a nothing to select error.
 
How late have you tried assigning it? Usually when you're overwriting the expression you need to do it late in final
 
Final/5000

I am wondering if I a choosing the wrong tag expression since races are not tagged with Subtype.XXXX until they are placed in the hero but have them bootstrapped to the race.
 
Possibly also with class abilities when overwriting the expression you need to do it late like Final 99999999 (8 9s)
 
Well Final/5000 looks to add the statements. The issue does look to be that I am selecting BaseRaces that haven't been assigned tags for subtypes. Do you know if there is a way in a tag expression to check if we have a specific thing bootstrapped by it?
 
I think I got it...

In this case I want everything with the swarm subtype

Code:
~ assemble list of swarms
var swarmList as string
foreach thing in BaseRace
  var tmp as string
  tmp = "thingid." & eachthing.idstring
  var cnt as number
  foreach bootstrap in eachthing where "component.Subtype & thingid.stSwarm"
      swarmList = splice(swarmList,tmp, " | ")
  nexteach
nexteach

swarmList = "& (" & swarmList & ") & fieldval:rCR <= " & crLimit

hero.minion[MINIONID].child[Totals].field[tRaceExpr].text &= swarmList
 
Last edited:
Back
Top