• 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

Class Level Specific Ability Option

Sevisin

Well-known member
Hello,

I'm new to Hero Lab and though I'm relatively happy with what I've seen, I noticed a number of things missing from the content in the software itself. So while I'm trying to get used to the editor, I find myself unable to find a suitable API or anything really to answer my question (and I've been looking for a number of hours). Maybe something just isn't clicking because everywhere I've looked and everything I could think of just isn't doing what I want it to.

I would like to create custom abilities in the editor that you can select at a specific level. Let's say a class can get a special custom ability at levels 1 and 2. At level 1, they can pick ability A, B, or C. At level 2, they can pick D, E, or F. Ect.

Any help would be appreciated (especially a link to an API). Thanks

-S
 
First off, welcome to Hero Lab. For content, I highly recommend downloading the community set (you can get the details here). The problem is that LW doesn't have a license for any of the non-OGL stuff from 3.5, so the community has had to create that content. It remains incomplete, but a few of us are still adding to it.

If you search around the files in the community set, you can usually find ways of doing what you are looking to do. In this case, you have a couple of options. If it makes sense, you can use primary and secondary custom abilities. A, B, and C would be primary, and the character could be allowed to choose 1 at level 1. Then you make D, E, and F secondary abilities and give them the choice of 1 at level 2. If that was all that was needed, then this is the way I would do it. If it's more complicated than that, then you can use the Expr-req or Pre-req fields to allow or disallow certain abilities. Note that this will only gray out the options you don't want selectable, but they will still be there. For something based on level, here is an example from a class I did:

Expr-req:
Code:
tagcount[Classes.Factotum] >= 4

This allows the custom ability to be selected only the character has achieved four levels of Factotum (from Dungeonscape).

Hopefully this gets you on your way. If you need more help, please let me know.
 
@Sendric
Thank you for the reply. I'll take a look at the community set shortly.
The problem with only using Primary and Secondary Abilities is that it goes beyond two sets of abilities. I'd like to work with Alternate Class Features on my characters and those branch off on different levels.

I haven't tried the code snip it you posted, but it seems that you'll be able to pick a "level 1" ability at level 4 when you're only able to select one ability per level. I suppose it's hard to explain.... Okay, try this..

At level 1, the class is able to pick one of three abilities A, B, or C.
At level 2, the class is able to pick one of three abilities D, E, or F. A, B, and C can't be selected.
At level 3, the class is able to pick one of three abilities G, H, or I. A-F can't be selected.

That means at level 3, a class will have abilities A, E, and H (for example).

I hope that clarifies things. I'll take a look at the link. Maybe my answer will be there. If it is, I'll post the solution.

Thanks again,

-S
 
By the way, this is the code I put in the Pre-Req section.
Code:
@valid = 0
if (#levelcount[MyClass] = 1) then
  @valid = 1
endif

I know why it didn't work (because at level 2, you're not level 1 so the ability can't be selected).
 
Ah. Ok, that's a little more complicated. Here's how I would handle this. For each ability in a group, have the ability assign a tag. On each ability within the group, use the following:

Group A, B, and C:

eval script:
Code:
Levels, 10000

perform hero.assign[User.Test]

Pre-req:
Code:
        var check as number
        check = 0
        if (@ispick <> 0) then
          check = 1
          endif
        if (hero.tagcount[User.Test] <= check) then
          @valid = 1
          endif

On one of the abilities you'll have to create the tag by scrolling to the bottom of the editor and hitting the "Edit" button next to "User Tags". Select -New Tag- and enter the name of the tag at the top. Name and abbreviation are optional and unnecessary for what we are doing here.

Once you create the tag, you use the eval script to assign it to the hero (you don't have to use Test, but it will always be User.?). The pre-req then looks for the tag, and if it exists, the ability becomes invalid. This would be straight forward except that once you selected the ability, the tag would be assigned and you would get an error. That's what the @ispick check is for. This allows you to remain valid when selected.

You'll do this for each group with a different tag for each. The additional expr-req to check for level will still be necessary for the groups of abilities selectable at higher levels.

Hope this helps!

PS. BTW, I did this same thing for Illithid Heritage feats from Complete Psionic, except the tags already existed.
 
Last edited:
@Sendric
Thanks a lot. What you wrote works. And in terms of the previous link, I already installed Lawful G's custom stuff (was looking for Warlocks a while ago).

-S
 
@Sendric
Thanks a lot. What you wrote works. And in terms of the previous link, I already installed Lawful G's custom stuff (was looking for Warlocks a while ago).

-S

Ok, cool. Glad it worked. We are up to version 1.9, and it is hosted on a different site then previously. If you updated this year, then you are probably fine. Not sure when 1.10 will be out.
 
Back
Top