View Single Post
eldamir
Member
 
Join Date: Aug 2014
Posts: 30

Old September 16th, 2016, 03:33 PM
The Spell Thief has a lot of the traits of the Arcane Trickster, but how the spell slots and casting works is much more in line with how Warlock does it..

Here's what I have right now in 3 Eval Scripts
The first Script is setting up both a single Warlock slot (0th level)
Code:
(Phase: Post Levels / Priority 10000 / Index 2)

       perform linkage[table].setfocus

        doneif (state.isfocus = 0)

      var numslots as number

      if (field[cTotalLev].value >= 17) then
        numslots += 4
      elseif (field[cTotalLev].value >= 11) then
        numslots += 3
      elseif (field[cTotalLev].value >= 2) then
        numslots += 2
      else
        numslots += 1
        endif

      ~ Add the slots to the highest spell level allowed at the current level.
      perform hero.child[SlotHoldWa].setfocus
      focus.field[MaxAllow].value += numslots
      if (field[cMaxKnLev].value = 18) then
        perform focus.assign[sLevel.4]
      elseif (field[cMaxKnLev].value = 12) then
        perform focus.assign[sLevel.3]
      elseif (field[cMaxKnLev].value = 6) then
        perform focus.assign[sLevel.2]
      elseif (field[cMaxKnLev].value = 2) then
        perform focus.assign[sLevel.1]
        endif
And the second Eval Script
This one seems to be doing what I want - I have cantrips and spell DCs as expected based on class level and CHA.
Code:
(Phase First / Priority 1000 / Index 1)

      perform linkage[table].setfocus

        doneif (state.isfocus = 0)

        ~ Spellcasting attribute
        perform focus.setlinkage[castattr,BaseAttr,"IsAttr.aCHA"]

        ~ Spellcasting type
        perform focus.assign[CasterType.SpontKnow]
        perform focus.assign[CasterSrc.Arcane]
        perform focus.assign[Helper.3rdCaster]
        perform focus.assign[sClass.cHelpSor]

        ~ Cantrip Array
        focus.field[cArrKnCan].arrayvalue[2] += 2
        focus.field[cArrKnCan].arrayvalue[9] += 3
And the 3rd Eval Script -- this one is the only way that i've so far been able to pick spells in the "Rogue Spells" tab
Code:
(Phase First / Priority 100 / Index 3)

      perform linkage[table].setfocus

        doneif (state.isfocus = 0)

        ~ Spells Known Array
        focus.field[cArrKnSpl].arrayvalue[2] += 3
        focus.field[cArrKnSpl].arrayvalue[3] += 4
        focus.field[cArrKnSpl].arrayvalue[6] += 5
        focus.field[cArrKnSpl].arrayvalue[7] += 6
        focus.field[cArrKnSpl].arrayvalue[9] += 7
        focus.field[cArrKnSpl].arrayvalue[10] += 8
        focus.field[cArrKnSpl].arrayvalue[12] += 9
        focus.field[cArrKnSpl].arrayvalue[13] += 10
        focus.field[cArrKnSpl].arrayvalue[15] += 11
        focus.field[cArrKnSpl].arrayvalue[18] += 12
        focus.field[cArrKnSpl].arrayvalue[19] += 13

        ~ Max Spell Levels Array
        focus.field[cArrKnLev].arrayvalue[2] += 1
        focus.field[cArrKnLev].arrayvalue[6] += 2
        focus.field[cArrKnLev].arrayvalue[12] += 3
        focus.field[cArrKnLev].arrayvalue[18] += 4
Somewhere, Spell slots are getting set for 1st through 4th level. I'm inclined to think they're coming from the last block in the first script as they persist even when the 3rd script is deleted.
I figured out that the Warlock slot is coming from the SlotHoldWa, but don't know where that's being setup to be able to clone and modify for rogue levels.

I'm out of time to play around with it, and to be honest, I'm just copy/pasting and hoping in a lot of cases with this, so am not really surprised that I haven't made much progress
eldamir is offline   #5 Reply With Quote