Mediator9292
Well-known member
O Great and Powerful Gods of Code, I beseech thee for guidance on my novice attempt at redesigning the Variant Multiclass Witch (Secondary Class tab in the Editor). My goal to make the VMC Witch a bit more meaningful, since it seems an order of magnitude less powerful than most of the other VMCs. Here's what I had outlined, but calling it the 'Wiccan' so I don't have to deal with replacing a file entirely.
Patron: At 1st level, she chooses a patron.
Familiar: At 3rd level, she gains a familiar, treating her character level as her effective witch level.
Hex: At 7th level, she gains a hex of her choice, treating her effective witch level as half her character level.
Hex: At 11th level, she gains a second hex, treating her effective witch level as half her character level.
Improved Hexes: At 15th level, she gains a third hex, treating her effective witch level as her character level for all hexes.
Major Hex: At 19th level, she gains a major hex.
This mostly involved using the same code as the original VMC Witch, but the complicated part now involves the eval script for determining the effective witch level regarding the hexes at different levels - below is my current attempt, run during the Post-levels Phase, Priority 151, with the Timing's Before Script set as Incorporate xEffectLev
var mod as number
foreach pick in hero from BaseCustSp where "CustTaken.csWitch"
if (eachpick.field[custOrder].value = 1) then
if (field[cTotalLev].value >= 15) then
mod = field[cTotalLev].value
else
mod = round(field[cTotalLev].value/2,0,1)
endif
elseif (eachpick.field[custOrder].value = 2) then
if (field[cTotalLev].value >= 15) then
mod = field[cTotalLev].value
else
mod = round(field[cTotalLev].value/2,0,1)
endif
elseif (eachpick.field[custOrder].value = 3) then
mod = field[cTotalLev].value
endif
elseif (eachpick.field[custOrder].value = 4) then *(line with error)*
mod = field[cTotalLev].value
endif
eachpick.field[xEffectLev].value += mod
nexteach
The issue I'm running into is that for some reason that I can't solve, HL keeps hitting this error:
Syntax error in 'eval' script for Thing 'csWiccan' (Eval Script '#1') on line 18
-> Encountered a mismatched 'if' and/or 'while' statement context
Can anybody help me figure out why the syntax is wrong? It follows exactly the same syntax and goal as line 15, so I'm at a loss, since I'm not a programmer and can't actually speak XML...
Patron: At 1st level, she chooses a patron.
Familiar: At 3rd level, she gains a familiar, treating her character level as her effective witch level.
Hex: At 7th level, she gains a hex of her choice, treating her effective witch level as half her character level.
Hex: At 11th level, she gains a second hex, treating her effective witch level as half her character level.
Improved Hexes: At 15th level, she gains a third hex, treating her effective witch level as her character level for all hexes.
Major Hex: At 19th level, she gains a major hex.
This mostly involved using the same code as the original VMC Witch, but the complicated part now involves the eval script for determining the effective witch level regarding the hexes at different levels - below is my current attempt, run during the Post-levels Phase, Priority 151, with the Timing's Before Script set as Incorporate xEffectLev
var mod as number
foreach pick in hero from BaseCustSp where "CustTaken.csWitch"
if (eachpick.field[custOrder].value = 1) then
if (field[cTotalLev].value >= 15) then
mod = field[cTotalLev].value
else
mod = round(field[cTotalLev].value/2,0,1)
endif
elseif (eachpick.field[custOrder].value = 2) then
if (field[cTotalLev].value >= 15) then
mod = field[cTotalLev].value
else
mod = round(field[cTotalLev].value/2,0,1)
endif
elseif (eachpick.field[custOrder].value = 3) then
mod = field[cTotalLev].value
endif
elseif (eachpick.field[custOrder].value = 4) then *(line with error)*
mod = field[cTotalLev].value
endif
eachpick.field[xEffectLev].value += mod
nexteach
The issue I'm running into is that for some reason that I can't solve, HL keeps hitting this error:
Syntax error in 'eval' script for Thing 'csWiccan' (Eval Script '#1') on line 18
-> Encountered a mismatched 'if' and/or 'while' statement context
Can anybody help me figure out why the syntax is wrong? It follows exactly the same syntax and goal as line 15, so I'm at a loss, since I'm not a programmer and can't actually speak XML...