• 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

How to increase Psionic Powers Known

Portilis

Well-known member
I've been working on implementing the Erudite class from Complete Psionic and whilst I overall have something that works I have hit a slight snag with powers known.

The class learns spells in a similar manner to a wizard, so unlike the rest of the psionic classes which have a set quantity of powers they can have at each level, Erudites have a base amount they start with then can learn more as and when desired.

In the long term, it would be good to see the addition of a spellcaster type dropdown much like is used for regular spellcasting (i.e. memorised, spontaneous, spellbook, unrestricted), but for now I'm trying to create an adjustment to allow me to add extra slots for the powers as I get them.

The issue I have hit is in trying to work out exactly what to add. I've narrowed the field down to cPsiPowTot, but am stuck there. When I try to use it as a straight .value it comes up with the error "defined with an incompatible style", but it doesn't appear to use an array in the xml for the class. I tried with array values of 0 and 1 to see if that helped, but whilst it doesn't present an error, it also doesn't affect it at all.

Code at present is:

Code:
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ If nothing chosen, get out now
      doneif (field[pChosen].ischosen = 0)

      ~ Add extra powers appropriately
      field[pChosen].chosen.field[cPsiPowTot].value += field[pAdjust].value

If anyone has any idea on the details for the field, it would be handy to know.


Mike
 
cPsiPowTot is an array value. You would use this to increase power points at a specific level (ie hero.child[??].field[cPsiPowTot].arrayvalue[3] would increase points at 4th level). To simply increase total points, try cPsiPPMax.
 
cPsiPowTot is an array value. You would use this to increase power points at a specific level (ie hero.child[??].field[cPsiPowTot].arrayvalue[3] would increase points at 4th level). To simply increase total points, try cPsiPPMax.

No, cPsiPowTot appears to be what is being referenced in the xml for the quantity of powers known, which is what I'm after. I'm not after power points, which is what cPsiPPTot references and by the sound of things cPsiPPMax will be a reference to the same thing.

I tried cPsiPowMax however after reading this, and it worked, so thanks :)
 
Back
Top