Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Field for total level (http://forums.wolflair.com/showthread.php?t=64728)

Brolthemighty September 3rd, 2020 11:44 PM

Field for total level
 
So I'm trying to figure out an Eval Script to increase # of dice at certain levels, like Superiority Dice. So I grabbed it's script...

~ Increase the number of dice at level 7 and again at 15
if (field[xAllLev].value >= 15) then
field[trkMax].value += 2
elseif (field[xAllLev].value >= 7) then
field[trkMax].value += 1
endif

But when I try to use it in my boon, it tells me:

Attempt to access field 'xAllLev' that does not exist for thing 'EP5CbnTidofWar'

I for the life of me, cannot figure out the field tag for total character level.

dungeonguru September 4th, 2020 06:06 AM

I thought the total level variable were only used for certain contexts, I can't remember the rule of thumb though.

There is a useful macro: #totallevelcount[] that you can use where the context is not right though:

Here's the help example.

~ Check whether you're at least a 5th-level hero
@valid = 0
if (#totallevelcount[] >= 5) then
@valid = 1
endif

There's a companion macro that narrows it down to a single class, but you need to know the class ID:

~ Check whether you have at least 5 levels of the Fighter class
@valid = 0
if (#levelcount[Fighter] >= 5) then
@valid = 1
endif

Brolthemighty September 4th, 2020 01:43 PM

I had found that macro and tried to simply substitute that in for the AllLev wording, and that hadn’t worked. I assumed it was because I wasn’t using the macro right.

How does that target the TrkMax value?

Edit: NVM, I input that macro in place of the check for AllLev, and it worked perfectly. Thank you!


All times are GMT -8. The time now is 10:36 PM.

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