Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old June 28th, 2010, 06:46 PM
Ok, I'm blanking on this and not finding it in searches.

Quote:
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?
TCArknight is offline   #1 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old June 29th, 2010, 04:44 AM
NM, I figured it (thanks for the example occupation Lawful_G. )

Quote:
foreach pick in hero from BaseClHelp
result += hero.tagcountstr[MyStr]
nexteach
TCArknight is offline   #2 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 29th, 2010, 12:47 PM
No problem.
Lawful_g is offline   #3 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old June 29th, 2010, 03:57 PM
Ok, one issue more with this.

With this:
Quote:
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:
Quote:
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
TCArknight is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 29th, 2010, 04:54 PM
The feat is set to look for picks, not things, right?
Mathias is online now   #5 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old June 29th, 2010, 06:24 PM
Hmmm... I'm not sure....

I'm building the custom expression from a text string in a Special:
Quote:
<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.kGath erInf|thingid.kKnow?|thingid.kResearch|thingid.kRe adLang|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?
TCArknight is offline   #6 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old July 2nd, 2010, 10:00 AM
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.)
Colen is offline   #7 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 2nd, 2010, 01:48 PM
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.
TCArknight is offline   #8 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 7th, 2010, 04:30 AM
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...
TCArknight is offline   #9 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old July 7th, 2010, 08:48 PM
Cool I guess that works.
Lawful_g is offline   #10 Reply With Quote
Reply


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 01:19 PM.


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