• 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

Feat: Versatile Spellcaster

Sevisin

Well-known member
This is probably going to be the same problem as the issue I posted here but we'll see if there is a possible solution...

Versatile Spellcaster (Races of the Dragon pg.101)
you can use two lower-leve spell slots to cast a spell one level higher.

Here we go again - trying to access the spell list. Any thoughts?

-S
 
I've been giving this scenario some more thought. I found a Variant Class Ability that adjusts the amount of spells you're able to learn with the following code...

Healing Pool
Code:
      ~ Adjustments via this variant class mechanism fail so hard coding 1 less 4th level cleric spell.
  if (hero.child[cHelpClr].field[cTotalLev].value >= 7) then
    hero.child[cHelpClr].field[cMemMax].arrayvalue[4] -= 1
      if (hero.child[cHelpClr].field[cMemMax].arrayvalue[4] = 0) then
        hero.child[cHelpClr].field[cSecMax].arrayvalue[4] = 0
      endif
  endif

Where you can adjust the level with the variable (as far as I can tell). I'm almost positive the amount and level can be adjusted as well via UI. Initial thought was from the adjustment, but that doesn't seem very feasible. What do you think?
 
Yes, there should be a way to select what class and levels that this is attached to, I'm not exactly sure on how to go about doing that though.

This gets into crazy quilt code, that I quickly get lost with, however from what I can see you are on the right track with this. I've never been very good with manipulating the arrays for casting class and I was NOT looking forward to trying to code this. If you can get it working I'll add it to the Races of the Dragon file I am working on for the next release.

+1 Llama/Internetz/Cookie/Muffin Whatever particular fake currency you prefer. You are my savior with this.
 
You can put a chooser on the feat to find the class. I would use this custom expression:

Code:
component.BaseClHelp & CasterType.SpontKnow

And Restrict it to Picks on Hero

Then you can get the id of that class with this:

Code:
var class as string
class = field[fChosen].chosen.tagids[thingid.?]

Then you can use that string to change the appropriate field (I would use the CastCur array):

Code:
foreach pick in hero from BaseClHelp where class
 eachpick.field[cCastCur].arrayvalue[1] += 1
nexteach

Note that I am using a foreach loop because I don't know another way. If its possible to use a variable in hero.child then I would do that, but its not. Maybe shadow knows a better way.

I think it I were coding this, I would create a checkbox that lives in the In-Play tab. If checked, whenever you cast a spell, it would do the following:

1) determine level of spell
2) determine level of spell-1
3) subtract 1 from cCastCur array at spell level
4) add 2 to cCastCur array at spell level-1
 
Last edited:
Code:
foreach pick in hero from BaseClHelp where class
  eachpick.field[cCastCur].arrayvalue[1] += 1
nexteach

Note that I am using a foreach loop because I don't know another way. If its possible to use a variable in hero.child then I would do that, but its not. Maybe shadow knows a better way.
Your answer lies in using "findchild" op code. It does exactly what your looking for here.

Code:
hero.findchild[BaseClHelp,class].field[cCastCur].value += 1

The context is hero.findchild[Component,"Search String"]. The "component" is component set that HL uses like your BaseClHelp or BaseWep. Then next comes the search string which is the same you can/would use in a foreach loop.

Also note that the "search" string is optional. So if you know you only have "one" pick of something you can just do like hero.findchild[BaseRace].xxxxx.

If you need to set "lots" of fields of the findchild[] what you then you do a "setfocus" that creates a permanent pointer to the Pick. Example:
Code:
[B][COLOR="Green"]~ set our focus to the currently equipped shield[/COLOR][/B]
perform hero.findchild[BaseArmor,"Helper.CurrShield"].setfocus
[B][COLOR="Green"]
~ If we didn't find one get out now[/COLOR][/B]
doneif (state.isfocus = 0)
[COLOR="Green"][B]~ Set our bonus to our currently equipped shield bonus[/B][/COLOR]
field[abValue].value += focus.field[arAC].value
After you set "focus" you access those focus fields by placing "focus." in front.

That ends today tip and tricks. :)
 
Back
Top