• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Skill a Class Skill?

TCArknight

Well-known member
Ok, I'm blanking on this and not finding it in searches.

myStr = "ClassSkill." & field[fChosen].chosen.idstring

result = hero.tagcountstr[myStr]

result will contain number of the ClassSkill.<choice> on the hero itself. How do I check for if the skill is a class skill for the classes of the character?
 
Ok, one issue more with this. :)

With this:
var result as number
var myStr as String

myStr = "ClassSkill." & field[fChosen].chosen.idstring

result = hero.tagcountstr[myStr]
notify result

foreach pick in hero from BaseClHelp
result += each.tagcountstr[myStr]
nexteach
notify result

if (result > 0) then
~call fTargetFoc
~doneif (state.isfocus = 0)

~ Add 1 to our chosen skill
field[fChosen].chosen.field[Bonus].value += 10

else
~ If not a Class Skill, then make it a Class Skill
perform Hero.assignstr[myStr]
endif

I get this:
Attempt to assign field value with no pick context

I think it's where trying to add the bonus. If I don't have the fTargetFoc commented, then I get an error about no pick. However, the skill I'm trying to bonus is already part of the character and present on the Skills tab, just no bonuses. Shouldn't it still be able to bonus even if there's no ranks added?

Thoughts?
Thomas
 
Hmmm... I'm not sure....

I'm building the custom expression from a text string in a Special:
<thing id="xOccAcad" name="Academic" compset="Special">
<usesource source="srcD20Mod"/>
<tag group="User" tag="Occupat"/>
<eval phase="PreLevel" priority="11000"><![CDATA[~hide choosers
~perform hero.child[fCSkill1].assign[Helper.FtHide]
~perform hero.child[fCSkill2].assign[Helper.FtHide]
~perform hero.child[fCSkill3].assign[Helper.FtHide]

~ 3 Class skill choices
~reveal choosers
perform hero.child[fCSkill1].delete[Helper.FtHide]
perform hero.child[fCSkill2].delete[Helper.FtHide]
perform hero.child[fCSkill3].delete[Helper.FtHide]

var CustExpr as string
CustExpr = "thingid.kCompUse|thingid.kCraftWrit|thingid.kGatherInf|thingid.kKnow?|thingid.kResearch|thingid.kReadLang|thingid.kSpeakLang"

hero.child[fCSkill1].field[ftCandExpr].text = CustExpr
hero.child[fCSkill2].field[ftCandExpr].text = CustExpr
hero.child[fCSkill3].field[ftCandExpr].text = CustExpr

~Wealth Bonus Increase
hero.child[xWealth].field[Value].value += 3]]></eval>
</thing>

Is there a better way to do it? Or a way to set the chooser as things?
 
In the editor, look under the "Item Selection" entries for the feat. Is "Restrict To..." set to "Picks on Hero"? It needs to be set to picks, so it can change fields on the skills that are actually added (as opposed to the fields on potential skills you *might* add, which can't be changed.)
 
Well, I'm managing to get it done without the TargetFoc. :)

I'll post it after a bit.

However, I do have a related question: How can I add a feat to a hero based on a chooser? Select from feat 1, 2 or 3, and if 2 is chosen, then bootstrap it to the hero.
 
Since in all the occupations there are 6 feats that can be added from them, I bootstrapped each one to every character and have a condition set for the occupation tag to make the feat live...
 
Back
Top