Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old September 19th, 2013, 06:59 AM
I am working on a template that removes racial abilities (such as the Dwarf's Sturdy ability or an Elf's Immunity to Sleep), and I've hit a snag. This is what I have at the moment:

Code:
   var race as string
   var srchxpr as string
   perform hero.findchild[BaseRace].setfocus
   race = focus.idstring
   srchxpr = "SpecSource." & race
   debug srchxpr

   foreach pick in hero from BaseSpec where srchxpr
    perform eachpick.delete[Helper.ShowSpec]
   nexteach
The problem I'm running into is that the race variable is returning a value that doesn't really help. For example, if my character is an Elf, its returning Elf2. This results in none of the racial abilities being removed because all of them use the tag SpecSource.Elf not SpecSource.Elf2. Is there another way to find the race, perhaps using the Race.? tags?
Sendric is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old September 19th, 2013, 09:00 AM
srchexpr = focus.tagids[SpecSource.?,"|"]
Mathias is offline   #2 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old September 19th, 2013, 09:07 AM
Quote:
Originally Posted by Mathias View Post
srchexpr = focus.tagids[SpecSource.?,"|"]
Ah, yes. Thank you very much. That certainly helps with the above scenario of the Elf. However, it doesn't seem to resolve other issues, such as alternate races. For example, the Wavecrest Gnome was entered by a user. It counts as a Gnome, and gains most (if not all) of the usual Gnome abilities. This search only comes up with SpecSource.rGnomeWave, and does not include .rGnome. Is there a way to include the races checked in the "Counts as Race..." selection field?

Last edited by Sendric; September 19th, 2013 at 09:13 AM.
Sendric is offline   #3 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 19th, 2013, 09:50 AM
Another thing you might want to consider, especially with racial abilities that actually add something to the hero. Deleting the Helper.ShowSpec only keeps it from appearing in the list of specials, but does not keep any scripts or bootstraps from being used. Just a heads up, as I've run into this myself (and thus, usually place a conditional to run a script or apply a bootstrap only if the Helper.ShowSpec is present).
Kendall-DM is offline   #4 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old September 19th, 2013, 09:56 AM
Quote:
Originally Posted by Kendall-DM View Post
Another thing you might want to consider, especially with racial abilities that actually add something to the hero. Deleting the Helper.ShowSpec only keeps it from appearing in the list of specials, but does not keep any scripts or bootstraps from being used. Just a heads up, as I've run into this myself (and thus, usually place a conditional to run a script or apply a bootstrap only if the Helper.ShowSpec is present).
Thanks for the reminder. That was something I figured I would tackle after I get the initial part working. It is definitely something to keep in mind, though.
Sendric is offline   #5 Reply With Quote
Reply

Thread Tools
Display Modes

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 09:02 PM.


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