Senior Member
Join Date: Feb 2013
Location: Blandford, UK
Posts: 164
|
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 Mike |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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.
|
#2 |
Senior Member
Join Date: Feb 2013
Location: Blandford, UK
Posts: 164
|
Quote:
I tried cPsiPowMax however after reading this, and it worked, so thanks |
|
#3 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Ah. Sorry for the confusion. I was in kind of a rush. Glad you got it figured out though.
|
#4 |
|
|