I am trying to implement a dual skill focus feat, which is like skill focus except that the user selects two feats and gets +2/+4 for each.
I've looked through the wiki, and I am sure the answer is there, but I cannot find it.
I've copied Skill Focus, and added a second item selection. The script will add +2 to the first skill, but I cannot figure out how to select the second skill.
I start with
This appears to set focus so that if references the values for the first item. I could not find any documentation for fTargetFoc. At this point, the rest of the skill focus script (with 3 replaced with 2) works to modify the first skill. However, I cannot figure out how to access the second skill. Call fTargetFoc a second time does not seem to advance to the next skill. It also looks like fTargetFoc is defined as bytecode or something similar, so looking at the definition in the source file is not useful.
Here's my current version from the .user file.
It also seems strange that customSrc2 is missing name and abbrev attributes, even though I set the two items to have the same "Restrict X List To..." values in the editor.
I've looked through the wiki, and I am sure the answer is there, but I cannot find it.
I've copied Skill Focus, and added a second item selection. The script will add +2 to the first skill, but I cannot figure out how to select the second skill.
I start with
Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
~set our focus to the selected pick
call fTargetFoc
doneif (state.isfocus = 0)
This appears to set focus so that if references the values for the first item. I could not find any documentation for fTargetFoc. At this point, the rest of the skill focus script (with 3 replaced with 2) works to modify the first skill. However, I cannot figure out how to access the second skill. Call fTargetFoc a second time does not seem to advance to the next skill. It also looks like fTargetFoc is defined as bytecode or something similar, so looking at the definition in the source file is not useful.
Here's my current version from the .user file.
Code:
<thing id="fDualSkill" name="Dual Skill Focus" description="Choose two skills. You are particularly adept at those skills.\n\n{b}Benefit{/b}: You get a +2 bonus on all checks involving the chosen skill. If you have 10 or more ranks in that skill, this bonus increases to +4.\n\n{b}Special{/b}: You can gain this feat multiple times. Its effects do not stack. Each time you take the feat, it applies to a new pair of skills. It does not stack with other feats that grant +2 to two skills. It {i}does{/i} stack with Skill Focus." compset="Feat" summary="You get a +2 bonus on all checks involving two skills.">
<fieldval field="usrCandid1" value="baseSkill1"/>
<fieldval field="usrCandid2" value="baseSkill2"/>
<tag group="fShowWhat" tag="Skills"/>
<tag group="fShowWhat2" tag="Skills"/>
<tag group="ChooseSrc1" tag="Hero" name="All Picks on Hero" abbrev="All Picks on Hero"/>
<tag group="ChooseSrc2" tag="Hero"/>
<tag group="fCategory" tag="Custom"/>
<tag group="fCategory" tag="General"/>
<tag group="SpecType" tag="Skill"/>
<eval phase="PreLevel" priority="5000" name="Skill Bonus Feats"><![CDATA[
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
~set our focus to the selected pick
call fTargetFoc
doneif (state.isfocus = 0)
~ Add 2 to our chosen skill
focus.field[Bonus].value += 2
field[baseSkill2].value += 2
~and another two once we're at 10 ranks
if (focus.field[skUser].value + focus.field[skInnate].value >= 10) then
focus.field[Bonus].value += 2
endif
~ Assign a tag so we know we've taken skill focus
perform focus.assign[Helper.DualSkillFocus]
~ Set our 'short name'
field[shortname].text = "Dual Focus: " & focus.field[name].text]]></eval>
</thing>
It also seems strange that customSrc2 is missing name and abbrev attributes, even though I set the two items to have the same "Restrict X List To..." values in the editor.