• 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

Set Attribute to specific value?

TCArknight

Well-known member
Ok, I'm working on Savage Rifts, and in it the Glitter Boy Power Armor provides a strength of d12+4 (value of 9) when worn.

I'm trying this:Pretraits/5500
Code:
~Strength starts at value of 2 (d4)
var DiffStr as number
DiffStr = 7 - #trait[attrStr]

if (field[grIsEquip].value <> 0) then
   #traitcreation[attrStr] += DiffStr
   hero.child[attrStr].field[trtMaximum].value += 4
   endif
This successfully provides a strength of D12+4 if strength hasn't had any points put into it (and at a d4).

If strength is at a d6 before equipping the GB armor, Then strength becomes d12+5 when equipped. However, if it is at a d8, it still only goes up to a d12+5. At that point, when unequipped STR becomes a D6 abd there is an attribute point to spend.

Is there a used way to set an attribute to a specific value when an item is equipped?

Thoughts?
Thomas
 
Not from me, yet. I've been mulling it over but I'd have to find some time to really work on it and I've been just too busy. If it helps any I would probably look fro the treatcreation macro on the Wiki or in the source code to see what it's doing and maybe that could give some clues on a way to set a value without trying to do the Diff value stuff.
 
Back
Top