Member
Join Date: Jul 2010
Posts: 75
|
Trying to throw together the Magus final playtest class that Paizo just released. One of the new arcana (Spell Blending) allows the magus to pick one spell (at the highest level they can cast) or two spells (below the highest level they can cast) from the wizard spell list and add it to their spellbook. Having trouble building the usrCandid1 field for the pick list, in this script...
Code:
~ Final Phase (Users) - 10000 ~ If we're disabled, do nothing doneif (tagis[Helper.SpcDisable] <> 0) ~Only add the option to select a second spell if we can cast spells of a level above our minimum if (hero.child[cHelpMaF].field[cMaxSpLev].value > hero.child[cHelpMaF].field[cSplMinLvl].value) then field[usrChkText].text = "2 spells?" endif var splvl as number var searchstr as string searchstr = "( " splvl = hero.childfound[cHelpMaF].field[cMaxSpLev].value while ( splvl > 0 ) searchstr = searchstr & "sLevel." & splvl & " | " splvl = splvl - 1 loop searchstr = searchstr & "sLevel.0 )" field[usrCandid1].text = "component.BaseSpell & SpellType.cHelpWiz & " & searchstr notify field[usrCandid1].text Oh yeah, cHelpMaF is the 'Magus Final' class I'm monkeying around with. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Are you looking for things or picks (it's one of the options among those for the class special). For a normal character, the only picks on the hero that are wizard spells would be the 0-level spells that are attached to every character. You'll want to be searching things if you want a list of every Wizard spell there is.
As a heads up, selecting a spell this way can't be used to add it to your spellbook. The only method I can see to handle this ability is for the user to temporarily add the spell to their spellbook (somehow, it needs an option to expand the list of spells available to all Wizard spells, not just Magus spells, but only for the specific spells being chosen) - the user then deletes them when the ability ends. What this really needs is some new mechanisms in HL. |
#2 |
Member
Join Date: Jul 2010
Posts: 75
|
Things, but when I set 'Restrict first list to...' to 'All Things' I get an empty list. I guess it's moot, though. This arcana isn't so bad, as it's a permanent thing (IE, they're in the spellbook forever), but the 'Knowledge Pool' class ability one is going to be a doozy (activate x points from arcana pool to prepare x magus spells not normally in his spellbook - only for one day - or later, x points for x levels of wizard spells not in his spellbook). Well beyond my very modest capabilities, anyway. Good luck to y'all when you have to write that one up. :|
Out of curiosity, though, is there a way to switch usrCandid1 to search in the thing context rather than the pick context? I went over the hlkitwiki stuff but couldn't find an obvious means there. It seems from tooltips that setting 'Restrict First List to...' in the editor to '- None -' or 'All Things' would accomplish this, but both shoot back an empty list. Last edited by areteas; December 10th, 2010 at 06:36 AM. |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
They should work, but SpellType.cHelpWiz isn't assigned to any spell until it's added to the character, so there aren't any things with that tag. You want sClass.cHelpWiz.
|
#4 |
Member
Join Date: Jul 2010
Posts: 75
|
Another stab at this from a different angle...
Was trying to make it so the user could at least manually add wiz spells to their spellbook & memorized spells & trusting them to remove it after the ability is deactivated. To do this I was trying to monkey with the hero.child[cHelpMaF].field[cSpellExpr] and hero.child[cHelpMaF].field[cSplBkExpr] fields by adding another | and the contents of field[usrChosen1].chosen.idstring (candidate list restricted to wizard spells of appropriate level). However, I keep encountering 'Syntax error in dynamic 'candidate' tag expression' immediately after adding the new spell to the Magus' spellbook or list of memorized spells. Are cSpellExpr and cSplBkExpr dynamically generated (and thus not something I should be messing with) or is this some thusfar inscrutable issue with the custom ability entity I added for Spell Blending? |
#5 |
Member
Join Date: Jul 2010
Posts: 75
|
Whups... n/m, see my own mistake.
|
#6 |
|
|