Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old March 6th, 2023, 01:39 PM
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...
Mediator9292 is offline   #1 Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:06 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.