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
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old March 28th, 2014, 03:20 AM
I am having a bit of a hard time figuring out how to keep the field for currently memorized spells on the class tab... I've used this code, but for some reason the array increments upward for every class instead of the 1 class I am trying to get it to work for.

Code:
    <eval index="6" phase="Effects" priority="6000"><![CDATA[

          foreach pick in hero from Spell where "SpellLevel.01"
            field[clMemCur].arrayvalue[0] += eachpick.field[spPrepared].value 
            nexteach

      ]]></eval>

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   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 28th, 2014, 06:41 AM
Take another look at the where portion of your foreach - that needs to also include a tag that's particular to the specific class that's running this script. Without that specificity, it's finding all the spells on the character.
Mathias is offline   #2 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old March 28th, 2014, 07:57 AM
Quote:
Originally Posted by Mathias View Post
Take another look at the where portion of your foreach - that needs to also include a tag that's particular to the specific class that's running this script. Without that specificity, it's finding all the spells on the character.
So the SpellSort tag for the class it's attached to? How can I access that to include it in the "the tags" part?

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   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 28th, 2014, 08:09 AM
You've used this sort of thing before, I know:

Code:
foreach pick in hero from Spell where searchexpr
Think how you could build an expression in searchexpr that includes tags that are specific to this class.
Mathias is offline   #4 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old March 28th, 2014, 08:16 AM
Yeah I have, just not for a while. This is what I came up with and after testing it is working correctly. Thanks for helping me.

Code:
          var spellclass as string
          spellclass = tagids[SpellSort.?] 
          spellclass &= " & SpellLevel.01"
 
          foreach pick in hero from Spell where spellclass
            field[clMemCur].arrayvalue[0] += eachpick.field[spPrepared].value 
            nexteach

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   #5 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:17 AM.


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