Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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 |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
srchexpr = focus.tagids[SpecSource.?,"|"]
|
#2 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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. |
#3 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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).
|
#4 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
|
|
#5 |
|
|