Ok I have a little bit of a problem...I am trying to implement the Warlocks Energy Resistance into Herolab for the class. But there are several things I cannot figure out how to implement. I am very new to this, so I apologize if this is a confusing question, and if my code is just ugly! lol
First, The custom warlock I made has energy resist to two types at
5th level equal to 5, then at 10th level this increases to 10 for both., then 15 at 15, and 20 at 20... under the Class Abilities Tab while viewing a character Portfolio (in this case the "warlock" tab) I want this to show up at each level with the resistance it granted at that level and not give you the option to keep choosing 2 more resistances... Even though choosing different ones does nothing to the "Special" tab, or change the character sheets resistances, It is still kinda hokey.
is my only option for the first thing to make another ability, give it same code, and take out the code for the selection boxes? maybe just Have it say Energy Resistance 10 at level 10? or is there a way for it to check what was selected at level 5 (lets say it was fire and cold) and list those as Energy Resistance 10: Fire, Cold.
Second, How do I make sure someone doesn't choose the same resistance twice? Ill show code in below...Im not quite sure how to write it out.
If this is confusing I can email my user database. just make a level 10 warlock and you will see what i mean.
Here is my eval scripts code...
I modified the Inquisitors Resistance Judgement code...lol Best thing I could find as a basis..
Phase- Post Levels, Priority- 10,000, Index-1
Code:
var bonus as number
var level as number
var resist as number
bonus = field[xIndex].value * 5
level = field[xAllLev].value
if (level < 10) then
resist = 5
elseif (level >= 10) then
if (level < 15) then
resist = 10
elseif (level >= 15) then
if (level < 20) then
resist = 15
elseif (level = 20) then
resist = 20
endif
endif
endif
field[abValue].value += (round(field[xAllLev].value / 5,0,-1)) * 5
field[listname].text = field[thingname].text & " " & resist
field[livename].text ="Energy Resistance" & " " & field[abValue].value
~apply the bonus to the correct energy type
if (compare(field[usrChosen1].chosen.idstring,"selEnAcid") = 0) then
#applyresist[xDamRsAcid,field[abValue].value]
elseif (compare(field[usrChosen1].chosen.idstring,"selEnCold") = 0) then
#applyresist[xDamRsCold,field[abValue].value]
elseif (compare(field[usrChosen1].chosen.idstring,"selEnElec") = 0) then
#applyresist[xDamRsElec,field[abValue].value]
elseif (compare(field[usrChosen1].chosen.idstring,"selEnFire") = 0) then
#applyresist[xDamRsFire,field[abValue].value]
elseif (compare(field[usrChosen1].chosen.idstring,"selEnSoni") = 0) then
#applyresist[xDamRsSoni,field[abValue].value]
endif
Phase - Post-Levels, Priority - 5000, Index- 2
field[usrCandid1].text = "component.SelectHelp & Selection.Energy"
field[usrCandid2].text = "component.SelectHelp & Selection.Energy"
First, The custom warlock I made has energy resist to two types at
5th level equal to 5, then at 10th level this increases to 10 for both., then 15 at 15, and 20 at 20... under the Class Abilities Tab while viewing a character Portfolio (in this case the "warlock" tab) I want this to show up at each level with the resistance it granted at that level and not give you the option to keep choosing 2 more resistances... Even though choosing different ones does nothing to the "Special" tab, or change the character sheets resistances, It is still kinda hokey.
is my only option for the first thing to make another ability, give it same code, and take out the code for the selection boxes? maybe just Have it say Energy Resistance 10 at level 10? or is there a way for it to check what was selected at level 5 (lets say it was fire and cold) and list those as Energy Resistance 10: Fire, Cold.
Second, How do I make sure someone doesn't choose the same resistance twice? Ill show code in below...Im not quite sure how to write it out.
If this is confusing I can email my user database. just make a level 10 warlock and you will see what i mean.
Here is my eval scripts code...
I modified the Inquisitors Resistance Judgement code...lol Best thing I could find as a basis..
Phase- Post Levels, Priority- 10,000, Index-1
Code:
var bonus as number
var level as number
var resist as number
bonus = field[xIndex].value * 5
level = field[xAllLev].value
if (level < 10) then
resist = 5
elseif (level >= 10) then
if (level < 15) then
resist = 10
elseif (level >= 15) then
if (level < 20) then
resist = 15
elseif (level = 20) then
resist = 20
endif
endif
endif
field[abValue].value += (round(field[xAllLev].value / 5,0,-1)) * 5
field[listname].text = field[thingname].text & " " & resist
field[livename].text ="Energy Resistance" & " " & field[abValue].value
~apply the bonus to the correct energy type
if (compare(field[usrChosen1].chosen.idstring,"selEnAcid") = 0) then
#applyresist[xDamRsAcid,field[abValue].value]
elseif (compare(field[usrChosen1].chosen.idstring,"selEnCold") = 0) then
#applyresist[xDamRsCold,field[abValue].value]
elseif (compare(field[usrChosen1].chosen.idstring,"selEnElec") = 0) then
#applyresist[xDamRsElec,field[abValue].value]
elseif (compare(field[usrChosen1].chosen.idstring,"selEnFire") = 0) then
#applyresist[xDamRsFire,field[abValue].value]
elseif (compare(field[usrChosen1].chosen.idstring,"selEnSoni") = 0) then
#applyresist[xDamRsSoni,field[abValue].value]
endif
Phase - Post-Levels, Priority - 5000, Index- 2
field[usrCandid1].text = "component.SelectHelp & Selection.Energy"
field[usrCandid2].text = "component.SelectHelp & Selection.Energy"
Last edited: