|
|
Thread Tools | Display Modes |
Senior Member
Join Date: Feb 2012
Posts: 546
|
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.
|
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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.
|
#2 |
Senior Member
Join Date: Feb 2012
Posts: 546
|
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 by Quintain; January 24th, 2016 at 05:55 PM. |
#3 |
Senior Member
Join Date: Feb 2012
Posts: 546
|
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). |
#4 |
Senior Member
Join Date: Jul 2014
Posts: 412
|
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.
Forum link for my content work: Pathfinder Thread Forum link for SU 5e content work: 5e Steven Universe Thread This link is for my group, but feel free to play it with: DMM 5e | "https://www.dropbox.com/s/vsd9w1eodlnwjq0/updatesDMM.xml?dl=1" Copy this link to your update manager to get updates when available. This adds the Pisky subrace to elves from Berserk! and additional subraces for the Gem Race. Please post comments in the provided threads above. |
#5 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Quote:
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 |
|
#6 |
Senior Member
Join Date: Feb 2012
Posts: 546
|
Quote:
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 by Quintain; January 26th, 2016 at 07:23 PM. |
|
#7 |
Senior Member
Join Date: Feb 2012
Posts: 546
|
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 by Quintain; January 26th, 2016 at 07:53 PM. |
#8 |
Senior Member
Join Date: Feb 2012
Posts: 546
|
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. |
#9 |
Senior Member
Join Date: Feb 2012
Posts: 546
|
Alas, I've decided to give up on the method above. I just let the user choose the attribute that modifies the DC.
|
#10 |
|
|