Custom subrace ability scores.
I'm trying to make a custom human subrace, and I've run into a wall. I want the subrace to automatically add 2 to DEX, which is easy to do in the subrace tab. But I also want it to be able to choose an additional 1, but NOT Dex. I've got it down to bootstrapping 'raHumAbAlt' to the subrace; but this causes it to choose an additional any 2 scores. I'm just trying to figure out how to get it to only increase one of the scores but also exclude Dex from that choice.
|
You'll need to make a new custom ability to bootstrap to your subrace, instead of 'raHumAbAlt'.
I'd suggest looking at 'ra5CUAEASIChg' as a basis. That one makes you choose between DEX and INT, which is represented with the tag expression '(IsAttr.aDEX | IsAttr.aINT)' Translated to plain English, this means either DEX or INT. Instead, change that tag expression to '!IsAttr.aDEX'. The '!' means 'not', therefore what you're changing it to is not DEX. Save the new ability with a new unique ID, change the description, and click 'test'. Then you should be able to bootstrap it back to your new subrace. |
And in case someone finds this post in the future, here's how it works. The usrCandid1 field allows you to generate a list for the player, based on criteria you provide. This criteria is based on tags, and thus is called a "tag expression." In the case of 'ra5CUAEASIChg', the player can pick between the attributes of DEX or INT. To do this, it uses this tag expression:
Code:
component.BaseAttr & (IsAttr.aDEX | IsAttr.aINT) Next is the ampersand '&'. This is additive, meaning that for something to show up on the list, it has to meet both the first criterion and the following one(s). Then the parentheses begin. If you remember your algebra classes, you know that this encloses operations inside the parentheses, so anything outside them treats what is inside as one thing. In this example, it means that whatever output comes from inside the parenthesis, it's added to the first criteria by that ampersand. Now we get two attributes. Dexterity and Intelligence both natively have IsAttr tags with their own values of aDEX and aINT respectively. The '|' here is what's important. That means 'or'. So inside the parentheses, this is saying "it can either have the aDEX IsAttr tag OR the aINT IsAttr tag." This is why having this inside parentheses is important. Without the parentheses, it would read like this: Code:
component.BaseAttr & IsAttr.aDEX | IsAttr.aINT In the example from OP, we removed the INT portion, which means we don't need an "or", and we don't need parentheses since there's only two criteria and both must be met. So OP should have this: Code:
component.BaseAttr & IsAttr.aDEX Code:
component.BaseAttr & (IsAttr.aSTR | IsAttr.aCON | IsAttr.aINT | IsAttr.aWIS | IsAttr.aCHA) But it's a pain. Instead, you can use another operator: '!' The exclamation mark means 'not' (cue Borat Not Jokes youtube video). So instead of listing everything that isn't DEX, you just do this: Code:
component.BaseAttr & !IsAttr.aDEX So we're good right? Well...no, not really. All we've done is generate a list. Hero Lab is intelligent enough to know that when you select Strength on the list, you want the Strength attribute. But it doesn't have instructions from us on what to do with that selection. That's where the eval script comes in. Eval scripts are instructions we give to a Thing, in this case an ability, to perform operations. In this case, we're going to have a script look at what attribute was selected in that usrCandid1 field, take it, and apply the +1 ability score we want. Code:
~ If we're disabled, do nothing Next we're checking to see if the player has actually picked something. When they do, Hero Lab automatically changes the value of "ischosen" to 1, which satisfies the "if then" statement looking for that. Hero Lab then takes the attribute you've chosen and finds the value of the field within that attribute called aStartMod. This is basically the starting amount of that field. '+=' is a neat shortcut built into Hero Lab's script. It basically says "the thing is now equal to what it already was plus what ever number is here". So '+= 1' means "add 1 to whatever was already there." I'm a little hazy on what the second part here does, and why both it and the previous line are necessary. But often in Hero Lab, you gotta roll with what works. And this works. |
That worked perfectly! Thank you. Your detailed explanation went a little over my head, I'm not a very tech-savvy guy, but you did give me enough info to figure out what I needed to do. Thank you for that, I'd buy you a beer if I could.
|
Yeah I went a little overboard with the explanation. I've only recently figured out a lot of stuff, so I'm trying to share the knowledge. Glad it helped!
|
All times are GMT -8. The time now is 05:49 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.