Thread: Script Question
View Single Post
jfrazierjr
Senior Member
 
Join Date: Aug 2013
Posts: 123

Old May 14th, 2017, 10:45 AM
Quote:
Originally Posted by Tizzar View Post
Morning,

What script would you use to set a characters attribute to a certain score? Right now I am using "#traitinplay[attrStr] += 9", so if two different characters use this item they both could have a different strength score. I would like to have the item set the characters strength to a fixed score.

I have skimmed through the forum looking for an example to answer my question but I have had no luck. I am pretty new at the scripting side of hero lab so please go easy on my lack of understanding.

Thanks

Jason.
Just set it to a number using = instead of adding(that's what += does).

This will work in the short term, but once the characters natural dice size is higher, they will be restricted to the lower dice with "=".

In order to fix that, you will have to do an if statement(unless that's exactly what the effect is SUPPOSED to do!)

So the question is, which do you need?

you can check out a few racial abilities such as abTough for example for an example used during character creation for specific races. However, this does not deal with the later case where it's conditional(if thats what you need).

Also, check out Power Armor(a few variations), armPowBat and armPowHvy. while they don't add to Str, you can use the syntax in the if statement, add an additional "if"(or not as you need to) and utilize that.

EDIT: oh, and the number for trait adjustments is one half of the dice size. So 2 = d4, 3 = d6, 4 = d8, etc. So if you want the Stength = d10, you put " = 5". A also, be sure to check out http://forums.wolflair.com/showthread.php?t=33740 as there are many examples of various difference script related things in there.

Last edited by jfrazierjr; May 14th, 2017 at 10:51 AM.
jfrazierjr is offline   #2 Reply With Quote