• 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

Adding a Power to Powers list of a specific subdiscipline

Quintain

Well-known member
Working on Ultimate Psionics Archtyptes and not sure where to go with this:

The tactician (Battle Medic) has this ability:


Powers Known: The combat medic selects his powers from the tactician power list, but may also select powers from the vitalist power list if they are of the healing subdiscipline.

An example power would be Body Adjustment.
I tried to add the psiClass. tag to the power, and added the Battle medic archetype to the class, but after saving and reloading, the power didn't show up in the power list.

Any suggestions on how to accomplish this?

In the Psion Disciplines, there is a script that links the powers to the discipline, however, this doesn't seem to lend itself to the subdiscipline of healing within the Vitalist list:

~ Give access to Seer Powers
linkage
.field[cPsiExpr].text &= "|psiClass.cPsiSeer"

There is an adjustment to do this for a specific class, but that isn't quite specific enough.
 
Last edited:
The red mantis assassin prestige class has a spell list that's all the spells of two specific schools from the sorcerer/wizard list - I'd copy that class and check out the script that handles that.
 
Ok, from what I'm able to parse on the Red Mantis, I've come up with this eval script:

field[cPsiExpr].text &= "|psiClass.cHelpPU5 & psiSubDisc.psddPUHeali"

However, when I bootstrap it to the archetype as a class special, I get an error:

Attempt to access field 'cPsiExpr' that does not exist for thing 'cPUBMPwrK'
Location: 'eval' script for Thing 'cPUBMPwrK' (Eval Script '#1') near line 3
- - -
Attempt to access field 'cPsiExpr' that does not exist for thing 'cPUBMPwrK'
Location: 'eval' script for Thing 'cPUBMPwrK' (Eval Script '#1') near line 3

The same sort of error happens when I try to bootstrap it as a custom special. This is the same sort of script that is used to give Psion's access to their discipline powers.

The full script for the red mantis is:

field[cSpellExpr].text = "(" & field[cSpellExpr].text & ") | ((sClass.cHelpSor | sClass.cHelpWiz) & (sSchool.Illusion | sSchool.Transmutat))"
 
Context is important. If the script is running on a class special or whatever, it first needs to transition to the class helper where the cPsiExpr field exists, before you modify that field.
 
Ok, revised script: -- it's not giving an error, but it isn't adding the powers to the list, either.

cHelpPU4 = Tactician
cHelpPU5 = Vitalist

hero.child[cHelpPU4].field[cPsiExpr].text = "(" & hero.child[cHelpPU4].field[cPsiExpr].text & ") | ((psiClass.cHelpPU5) & (psiSubDisc.psddPUHeali))"

As near as I can tell, that should put in the list either the normal tactician list (hero.child[cHelpPU4].field[cPsiExpr].text) or the vitalist powers of the healing subdiscipline -- ((psiClass.cHelpPU5) & (psiSubDisc.psddPUHeali))
 
Last edited:
Timing is important as well. What phase and priority is the script running at?

Also you might try adding some debugs.

Code:
debug "hero.child[cHelpPU4].field[cPsiExpr].text BEFORE we modify it is " & hero.child[cHelpPU4].field[cPsiExpr].text

hero.child[cHelpPU4].field[cPsiExpr].text = "(" & hero.child[cHelpPU4].field[cPsiExpr].text & ") | ((psiClass.cHelpPU5) & (psiSubDisc.psddPUHeali))"

debug "hero.child[cHelpPU4].field[cPsiExpr].text AFTER we modify it is " & hero.child[cHelpPU4].field[cPsiExpr].text

If I had to guess, I would say you are modifying things too early, such that it is either overwritten when the class automatically generates the field's text, or otherwise messes with that generation.

To see debug output, go to "Develop -> Enable Data File Debugging" and then "Develop -> Floating Info Windows -> Show Debug Output"
 
I was at Post Levels 10k, but I put timing at Final Phase (Users), 10000 and getting more powers in the list, but now I'm getting *all* psionic powers in the list (or so it seems).

Here is the debug output:


********** Start Evaluation Cycle **********

[Tinyman (Thrall) 7.1] hero.child[cHelpPU4].field[cPsiExpr].text BEFORE we modify it is psiClass.cHelpPU4
[Tinyman (Thrall) 7.1] hero.child[cHelpPU4].field[cPsiExpr].text AFTER we modify it is (psiClass.cHelpPU4) | (psiClass.cHelpPU5 & psiSubDisc.psddPUHeali)
[Tinyman (Thrall) 7.1] Unknown hit dice value!

Also, when I close the powers list window, I get this error message:

Syntax error in dynamic 'candidate' tag expression
 
psddPUHeali is too many characters to be a valid tag, which would explain the last error

Ok, I had an extra character in the sub-discipline. Got that corrected and don't get the last error anymore.

However, at this point, it's not adding any powers to the list at all:

********** Start Evaluation Cycle **********

[Tinyman (Thrall) 7.1] hero.child[cHelpPU4].field[cPsiExpr].text BEFORE we modify it is psiClass.cHelpPU4
[Tinyman (Thrall) 7.1] hero.child[cHelpPU4].field[cPsiExpr].text AFTER we modify it is (psiClass.cHelpPU4) | (psiClass.cHelpPU5 & psiSubDisc.psdPUHeali)
[Tinyman (Thrall) 7.1] Unknown hit dice value!
 
Hmm. I just went into Develop menu and did a pick fields on my cHelpPU4 and the final value of cPsiExpr is still cHelpPU4

I changed the timing to Final Phase (Users) 10100 and the final value looks set, according to the Selection field debug panel.

But the pick list for the class powers still only shows the Tactician base powers.
 
ok, I finally found the problem:

the sub discipline name is case-sensitive. was using psiSubDisc.xxx whereas the tag is "psiSubdisc" (lowercase 'd').

I have the new powers added now.

Thanks for your assistance on this.
 
Back
Top