Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Redcap's Corner
Senior Member
 
Join Date: Jul 2010
Posts: 149

Old January 21st, 2015, 07:09 PM
I've been using custom expressions to build lists of creatures of particular types and sizes using the following basic formula:

Code:
(HasType.tpMonHuman & (RaceSize.Small11 | RaceSize.Medium0))
Unfortunately, now I need that list of all creatures of a particular subtype and size. Unfortunately, it would seem subtypes are directly bootstrapped onto races, rather than being expressed through tags. So, is this possible?

I need to construct a custom expression that builds a list of Large-sized giants.
Redcap's Corner is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 21st, 2015, 07:25 PM
You might try nested foreaches. Not generally recommended because it can be expensive for the processer, but could work...

Something like:

Code:
var finalexpr as string
var tempstr as string

foreach thing in BaseRace where "HasType.tpMonHuman & (RaceSize.Small11 | RaceSize.Medium0)"
  tempstr = "Race." & eachthing.idstring

  ~ If our current iterated race has the correct subtype bootstrapped, then add the temporary string for this race to the final candidate expression
  foreach bootstrap in eachthing where "component.Subtype & thingid.stGiant"
    finalexpr = splice(finalexpr,tempstr, " | ")
    nexteach
  nexteach

field[usrCandid1].text = finalexpr

Last edited by Aaron; January 21st, 2015 at 07:51 PM.
Aaron is offline   #2 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:01 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.