• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Either Or Pre-Requisite

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:
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.
 
Back
Top