• 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

[Psionics] Where in HL is the Spellcasting/Manifesting Attribute defined?

Quintain

Well-known member
See subject. I need to be able to assign in a script the tag value of one of the 6 ability scores depending on the class taken. Hopefully without having to set up a if/elseif construct of nightmares.
 
If I am understanding your meaning, it's defined on the class helper for each class that gets spells/powers. The default attribute is usually set by a linkage, and you can override it with a tag.
 
Ok, that part I understand.

Is the syntax for grabbing that value and assigning it to a variable

var aKAb as string

aKAb = linkage[psiattr].value <-- for psionics

and the spellcasting version "linkage[spellattr].value <--- for spellcasters?

or perhaps: linkage[varies].field[psiattr].value
 
Last edited:
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).
 
I never managed to get that far either when setting up the Archivist archetype. Instead I just built up a new slate under archetype and then used the button under Override spell-casting attribute/override psionics attribute. Of course you can set the class to modify with the archetype setting, but if you are planning a new class altogether then it should be easy to just set the attribute. I am guessing you don't want to use the archetype and thus are trying to override the attribute directly. I probably am wrong about your intentions, alas I never have come across that script yet. I do hope the above info helps you out though.
 
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).

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
 
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

Aaron:
1) We won't know what class helper to test for. Is there a way to pull the current class helper value?
2) Is there a way to directly assign the "aWis" to a string instead of testing for it's existence? -- or is chaining this 'if' statement to test for all three manifesting stats the only method available?

Delta,

This is just a feat that reassigns the attribute used to calculate the DC to something different than the original. The concept is simple, but it seems the execution of the concept is a bit more difficult than expected.
 
Last edited:
I saw on a differrent post that "linkage[varies]" is the same as hero.childfound

Ok, so my goal is to replace the default wisdom modifier with the highest "key ability modifier" of all the character's manifester classes in the DC calculation of the Unwilling Participant feat. With that in mind, here's my logic:

Code:
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)
 
Last edited:
With the above, I'm getting the following error:

Linkage pick 'varies' not located for current context
Location: 'eval' script for Thing 'fPAFImpUP' (Eval Script '#1') near line 4

So it looks like I'll have to use a foreach and loop through all the manifester classes on the character. Or perhaps allow the player to pick the attribute.
 
Alas, I've decided to give up on the method above. I just let the user choose the attribute that modifies the DC.
 
@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?
 
I saw on a differrent post that "linkage[varies]" is the same as hero.childfound
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.

Above Aaron is showing you that a Class Helper has a "link" to which attribute it uses for Psionics. This is represented using "linkage[psiattr]" which links the Class Helper directly to the "attribute" score it uses. The linkage is set in the editor and can't be changed once set. But it makes it easy for the class to go to the linked attribute without having to use "tags".

Still not 100% sure what your trying to implement but it sounds like "Pulling" the "UseAttr.?" tag from the linkage[psiattr] is what you want. Then you can simply delete the "UseAttr.?" tag on fPUUnwillP feat and "push" the one you pulled from the Linkage onto the feat. This way you won't have to care which actual ability score the class works with.
 
@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?

Shadow,

It's just a feat. One of my own devising. Since the unwilling participant feat is based off of Wisdom, and there are classes with collectives based off Int and potentially Cha, I was making a feat that switched the attribute used and added one to the DC.

Part of what I saw as the problem was a character could potentially have more than 1 collective based off different attributes. So, I was trying to make the feat always work on the highest attribute mod automatically.

So, with multiple possible classes with multiple possible attributes and multiple collectives, I was looking for a way to have that calculation be automatic.

This proved unworkable, so I decided to fall back on letting the user choose.
 
This proved unworkable, so I decided to fall back on letting the user choose.
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".

Update: The post I linked too would be assuming the drop down selection is the Psionic Class "helper". If you want to select based on "attribute" remove the "linkage" part leaving the first statement as "field[usrChosen1].chosen.pulltags[UseAttr.?]"
 
Last edited:
Yeah, I came to that conclusion myself.

Here's the final result on my code that came up with that looks like it's working -- it doesn't reference a specific class, just limits the attribute list to Intelligence, Wisdom or Charisma and does the calculations based on which one is chosen.

It works, although it could probably be shortened with the pull/pushtags options in your other post.

Code:
~ 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])
 
Back
Top