Senior Member
|
Is there a way to count the number of tricks in a category?
|
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Try adding lots of skill tricks to a test character, the go to the develop menu, floating info windows, show hero tags - does anything useful show up there?
If not, right click on a few skill tricks once they're added to the character, and look at their tags - what tag defines the categories there? On the hero, it's easy to find out how many tags exist: hero.tagcount[x.x] If they only exist on the skill trick itself, you'll need something more complex: var total as number foreach pick in hero where "component.(whatever skill tricks' component is) & (your category's tag)" total +=1 nexteach |
#2 |
Senior Member
|
Thank you! I'll give that a shot.
|
#3 |
Senior Member
|
The only useful things seem to be in hero fields:
tSklTricks tSklTrkUsed tSklLeft I'm working on the Cool Head feat, the Complete Scoundrel, pg 75. I need to check for two mental skill tricks (i.e. the category) and I need to be able to add two free skill tricks and raise the character's skill trick limit by 1 if they have the mental skill tricks. |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
In that case, look at the tags on the skill tricks themselves - is there a tag specifically for mental tricks? If so, you can use a foreach loop to find them and increment a counter.
|
#5 |
Senior Member
|
There's no tag.
<pick thing="oCornerPer" saveindex="28400000" index="284" batchindex="183" oldbatch="183" root="yes" refcount="0" fieldcount="7" source="kTricks" default="yes"> <tag group="portal" tag="kTricks"/> <tag group="thing" tag="user_added"/> <field id="fChosen"></field> <field id="fFreeform"></field> <field id="hUsed" value="0." user="0."></field> <field id="hUsed2" value="0." user="0."></field> <field id="hIsOn1" value="0." user="0."></field> <field id="hIsOn2" value="0." user="0."></field> <field id="hCustText"></field> </pick> |
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
In that case, go back to the skill tricks themselves - there's an option in the editor to add user tags, so add User.skMental to all the mental skill tricks, and then you'll be able to test for it with the foreach loop I descibed earlier.
|
#7 |
|
|