Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old July 7th, 2015, 11:27 AM
Thanks again to everyone who has helped me with this project. Took a long break while actually running an Iron Kingdoms game instead of playing it it. Now getting back to my character generator.

I have a situation where character can only take a particular career (Iron Fang) if he already has another career from a specified list (Aristocrat, Military Officer, Soldier, or Warcaster)

Typically, it's a single requirement (Must be Human, etc), but this is the first time I've had to deal with several potentials.

Here's how I've done it for single choices:

Code:
  <!-- Must have certain starting careers -->
  <exprreq iserror="yes" message="Must be Human"><![CDATA[
      compare(hero.findchild[Career].field[name].text, "Aristocrat")= 0 
  ]]></exprreq>
    </thing>
what do I do for multiples though? I don't see any way to extend exprreq to do this.
barrelv is offline   #1 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old July 7th, 2015, 11:47 AM
I would have careers forward a HasCareer.? identity tag to the hero and then just check with a tagexpression

@valid = tagexpress[HasCareer.Aristocrat|HasCareer.Military|etc]
AndrewD2 is offline   #2 Reply With Quote
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old July 7th, 2015, 12:04 PM
There is a tag on the hero for all careers (Career.crAristocr, etc) But I'm not sure what you mean by "tagexpress"
barrelv is offline   #3 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old July 7th, 2015, 12:07 PM
actually its tagexpr sorry, it's on the wiki, its like tagis but checks for a whole tag expression, alternately you can check for a tagis of each
AndrewD2 is offline   #4 Reply With Quote
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old July 7th, 2015, 12:16 PM
still should be inside an exprreq element? because the below code is returning true even if one of those two tags aren't present on the hero.

Code:
  <!-- Must have certain starting careers -->
  <exprreq iserror="yes" message="Must have certain career"><![CDATA[
      @valid = tagexpr[Career.crAristocr|Career.crInvestig]
  ]]></exprreq>
barrelv is offline   #5 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old July 7th, 2015, 12:23 PM
actually in an exprreq it probably should be something like

tagexpr[Career.crAristocr|Career.crInvestig] <> 0

also might have to have it be hero.tagexpr[Career.crAristocr|Career.crInvestig]
AndrewD2 is offline   #6 Reply With Quote
barrelv
Member
 
Join Date: Aug 2014
Posts: 87

Old July 7th, 2015, 12:29 PM
This did it. Thanks!

Code:
  <!-- Must have certain starting careers -->
  <exprreq iserror="yes" message="Must have certain career"><![CDATA[
      tagexpr[Career.crAristocr|Career.crInvestig] <> 0
  ]]></exprreq>
barrelv is offline   #7 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old July 7th, 2015, 12:31 PM
No prob, I'm used to using prereqs when I'm working with XML and only use Expr-Reqs when I'm in the editor
AndrewD2 is offline   #8 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old July 9th, 2015, 06:57 PM
Quote:
Originally Posted by barrelv View Post
This did it. Thanks!

Code:
  <!-- Must have certain starting careers -->
  <exprreq iserror="yes" message="Must have certain career"><![CDATA[
      tagexpr[Career.crAristocr|Career.crInvestig] <> 0
  ]]></exprreq>
Open Definition.dat

Create a macro called hascareer that checks for the career you want.
It could be something like hero.childlives[#career] for the code. Then you can just use #hascareer[] <> 0 in your expr-reqs.

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.
RavenX is offline   #9 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old July 9th, 2015, 07:22 PM
I usually assume people already know how to make macros as its covered really early in the walk-thru.
AndrewD2 is offline   #10 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 08:32 AM.


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