• 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

Transition from Archetype to Class?

TCArknight

Well-known member
Is there a way for a Special Ability bootstrapped to an archetype to see the class it's on for purposes of adjusting fields, etc?

For example, the Archetype I'm working on will be able to be taken by multiple classes (rogue or ninja for example) and I'd rather not make two copies of the same special ability if I don't have to.

right now I have:
Code:
hero.childfound[<class helper>].field[cBonFtTot].arrayvalue[1] = 2

This sets the Class bonus feats to 2 at 2nd level. I tried:
Code:
root.root.field[cBonFtTot].arrayvalue[1] = 2

That gave an error about root not being able to reliably access bootstrap source for unique pick.

Thoughts?
 
Check the stickied thread called "Editor & Scripting Resources", and the link in that thread called "Location, Location, Location": http://forums.wolflair.com/showthread.php?t=21663

You're starting from the pick context - can you find how to get to the archetype (another pick) from there? Then, can you figure out how to travel from the archetype to the class?
 
Ah, thanks Mathias. :)

So, after checking that thread, I see linkage[varies] transitions from the Archetype pick to the class that it applies to, am I reading that correctly? My thinking is this:
root - transition to the archetype from the Class ability
.
linkage[varies] - transition from the Archetype to the Class it is applied to
.
field[cBonFtTot].arrayvalue[1] - to set the 2nd array entry of the Class' cBonFtTot field

Code:
root.linkage[varies].field[cBonFtTot].arrayvalue[1] = 2

That should be correct?
 
Do I have something wrong with this? I've tried it from First/1000 to Final/1000 and I always get just the "!thingid.cODAAC" as myExpr value.

Code:
var myExpr as string
myExpr = linkage[varies].field[cCstS3Expr].text

myExpr = myExpr & "!thingid.cODAAC"

linkage[varies].field[cCstS3Expr].text = myExpr

Am I missing something? The intent is to exclude one specific talent from the additional talents available to the archetype's class.

Along the same lines, the archetype modifies the Quarry ability by allowing the animal companion to share the Quarry bonuses. I've tried:
Code:
var myDesc as string
MyDesc = linkage[varies].childfound[cRgrQuarry].field[CustDesc].text

This keeps returning a blank string. It seems like this should work. Suggestions?
 
Last edited:
Not working. :(

I tried myDesc = linkage[varies].childfound[cRgrQuarry].field[CustDesc].text at Final/10000000, and Render/1000, and get "Script Reference is invalid under the circumstances."
 
Oh, sorry I didn't notice a script errors in the previous one - I was just focused on the timing error.

Look again at the location thread - once you use linkage[varies], you're in the pick context - is childfound[] something you can use from the pick context, or do you need to be in a different context in order to use that?
 
Thanks Mathias, I think I found it!

linkage[varies].origin.child[cRgrQuarry].idstring pulls the cRgrQuarry id correctly.
 
Hmmm... I thought I tried that.... let me try it again...

the linkage[varies].origin basically takes you to the hero level, right? In this case?
 
Agreed. :)

I'm obviously missing something though. :( This is what I have at Final/10000000:
Code:
perform hero.childfound[cfgTeamWFt].setfocus

~ Rename the bonus feats
var myStr as string
myStr = focus.field[cfgAddTxF1].text
notify myStr
myStr = replace(myStr,"bonus","teamwork",0)
notify myStr
focus.field[cfgTitleF1].text = myStr

and myStr is constantly empty. cfgTeamWFt is the Configurable.
 
I've added the Configurable to the Archetype, and just made it available at the appropriate level.

Right now, as there will be 2 different bonus feat entries, each with separate requirements on that tab, I'm trying to rename the "Add new bonus feats" bit of the selection to say "Add new teamwork feats" or "Add new x feats".

on the configurable, the cfgAddTx field is the one that holds that, I thought using the replace() on "bonus" would be the easiest way to do it.

It's possible that the tab would show two different entries both saying "add new bonus feat" and I'd like to make it easier for the user to know which is which.
 
Render/11000:
Code:
focus.field[cfgAddTxF1].text = replace(focus.field[cfgAddTxF1].text,"bonus","bonus teamwork",0)
focus.field[cfgTitleF1].text = replace(focus.field[cfgTitleF1].text,"bonus","bonus teamwork",0)
 
Back
Top