Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
As near as I can tell, the "psiattr" field for manifesters (psionics) is analogous to the "spellattr" field for spellcasters.
But I can't get the linkage syntax right to assign a string variable the text of "aWIS" if Wisdom is the primary manifesting ability for that class (such as a psychic warrior).
doneif (hero.childfound[WHATEVERCLASSHELPER].islinkage[psiattr] = 0)
var randstring as string
if (hero.childfound[WHATEVERCLASSHELPER].linkage[psiattr].tagis[IsAttr.aWIS] <> 0) then
randstring = "aWIS"
endif
debug "randstring is " & randstring
~ Do whatever you need with that string
Where is the code running from? Assuming it runs from something not the class helper, I would try:
Code:doneif (hero.childfound[WHATEVERCLASSHELPER].islinkage[psiattr] = 0) var randstring as string if (hero.childfound[WHATEVERCLASSHELPER].linkage[psiattr].tagis[IsAttr.aWIS] <> 0) then randstring = "aWIS" endif debug "randstring is " & randstring ~ Do whatever you need with that string
doneif (linkage[varies].islinkage[psiattr] = 0)
var vKAb as number
var vINT as number
var vWIS as number
var vCHA as number
if (linkage[varies].linkage[psiattr].tagis[IsAttr.aINT] <> 0) then
vINT = #attrmod[aINT]
elseif (linkage[varies].linkage[psiattr].tagis[IsAttr.aCHA] <> 0) then
vCHA = #attrmod[aCHA]
endif
vWIS = #attrmod[aWIS]
vKAb = maximum(maximum(vINT,vCHA),vWIS)
#dc[fPUUnwillP] += 1 + (vKAb - vWIS)
So this statement is not correct. Linkage[varies] is a link between an Archetype and the "base" class it is "linked" too. "hero.childfound" allows you to search for ANY Pick that is live on the character.I saw on a differrent post that "linkage[varies]" is the same as hero.childfound
@Quintain can you list the "game" rules you are trying to do? One minute you make it sounds like its a PrC which Aaron tries to answer but then you put the scripts onto a feat. Maybe I am the only the only that is now confused but please list "what" game rule you are trying to implement. Is this a PrC, Archetype or just a feat?
A simple chooser is most often best. Even LW tries not to figure out the 'best' score as doing all the logic checks and the foreach loops required is "allot" of overhead. Its better to just let the gamer choose. In that case look at THIS post where I give the script to change the attribute for the Unwilling Participant feat. Change the "xxx" then to "field[usrChosen1].chosen".This proved unworkable, so I decided to fall back on letting the user choose.
~ replace the Wis Modifier of Unwilling Participant with
~ chosen key ability modifier
~if the user hasn't selected an attribute, there's nothing more we can do
doneif (field[usrChosen1].ischosen = 0)
var vKAb as number
~set our focus to the chosen attribute. This saves typing later
perform field[usrChosen1].chosen.setfocus
if (focus.tagis[thingid.aINT] <> 0) then
vKAb = #attrmod[aINT]
elseif (focus.tagis[thingid.aCHA] <> 0) then
vKAb = #attrmod[aCHA]
else
~ go with the default
vKAb = #attrmod[aWIS]
endif
#dc[fPUUnwillP] += 1 + (vKAb - #attrmod[aWIS])