Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
xWhiteGodx
Junior Member
 
Join Date: May 2018
Location: East Coast, USA
Posts: 12

Old November 21st, 2018, 01:59 PM
Hello all,

I'm trying to set up some chain-type things within HeroLab for a custom class. I'll keep it as to the point as possible:

Custom Ability is Telekinetic Blast [cTelekinWildTal]
Requirement for Custom Ability is the Custom Ability "Aether" [cTelekinet]
Next step progression is the Custom Ability "Aether" (It's the 2nd tier) [cEE1AetherKinet]
Final step progression is the Custom Ability "Aether" (It's the final tier) [cEE2AetherKinet]

I need[cTelekinWildTal] to be selectable within a Configure tab if either [cTelekinet] and [cEE1AetherKinet] are on the hero, or just [cTelekinet] or just [cEE1AetherKinet], or just [cEE2AetherKinet]

I suck at understanding and working the code system, and thus resort to finding alike things that I'm going for and copy/pasting until everything works as intended. This is what I have, and I don't think it's entirely right:

Code:
~ define a work variable of Valid Count
var ValidCnt as number

~ Set to initially a value of zero
ValidCnt = 0

~ If level 7+ and Expanded Element then we are valid
If (herofield[xTotalLev].value >= 7) Then
   ~ we also need Expanded Element to be valid
   If (#hasability[cEE1AetherKinet] <> 0) Then
      ValidCnt += 1
   Endif
Endif

~ If Elemental Focus and Expanded Element then we are also valid
If (#hasability[cTelekinet] + #hasability[cEE1AetherKinet] <> 0) Then
   ValidCnt += 1
Endif

~ If either test conditions above are VALID then we are valid
validif (ValidCnt > 0)

EDIT: Also, is there a way to make an eval script give an error in a panel if a per-requisite wasn't met?
EDIT2: How to set level requirements with an Eval Script?

I appreciate any and all help, thanks!

Last edited by xWhiteGodx; November 21st, 2018 at 04:25 PM.
xWhiteGodx is offline   #1 Reply With Quote
xWhiteGodx
Junior Member
 
Join Date: May 2018
Location: East Coast, USA
Posts: 12

Old November 26th, 2018, 09:19 AM
I figured out how to do it. I spend the past 48 hours researching and making everything good. When it comes to hierarchical setup, I had to set it up in a stepping method. This is what I ended up doing (with a different ability):

Code:
~ define a work variable of Valid Count
var ValidCnt as number

~ Set to initially a value of zero
ValidCnt = 1

~ If other elements, then invalid
If (#hasability[cGeokinet] + #hasability[cPyrokinet] + #hasability[cAirKinet] <> 0) Then
   ValidCnt -= 1
endif
~ If Hydro then we are valid
If (#hasability[cHydroKinet] <> 0) Then
   ValidCnt += 1
endif

If (#hasability[cEE1PyroKinet] + #hasability[cEE1GeoKinet] + #hasability[cEE1AirKinet] <> 0) Then
   ValidCnt -= 1
Endif

~ If Fire Element or Water then we are also valid
If (#hasability[cEE1HydroKinet] <> 0) Then
   ValidCnt += 1
endif

If (#hasability[cEE2PyroKinet] + #hasability[cEE2GeoKinet] + #hasability[cEE2AirKinet] <> 0) Then
   ValidCnt -= 1
Endif

If (#hasability[cEE2HydroKinet] + #hasability[cEE1HydroKinet] + #hasability[cHydroKinet] <> 0) Then
   ValidCnt += 2
endif

If (#hasability[cWaterWildTal] <> 0) Then
   ValidCnt -= 3
endif

If (#hasability[cEE2HydroKinet] + #hasability[cEE1HydroKinet] <> 0) then
   ValidCnt += 2
endif

If (#hasability[cEE2PyroKinet] + #hasability[cEE2GeoKinet] + #hasability[cEE2AirKinet] <> 0) Then
   ValidCnt -= 1
Endif

If (#hasability[cEE1PyroKinet] + #hasability[cEE1GeoKinet] + #hasability[cEE1AirKinet] <> 0) Then
   ValidCnt -= 1
Endif

~ If either test conditions above are VALID then we are valid
validif (ValidCnt >= 1)
Hopefully this helps anyone figure out how to self-solve an either-or for prerequisites.
xWhiteGodx is offline   #2 Reply With Quote
Reply

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 05:44 AM.


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