View Single Post
Old 01-14-2022, 04:37 AM   #7
Join Date: Feb 2013
Location: Albuquerque, NM
Default Re: How to code equipment that boosts Attributes

Originally Posted by Armin View Post
Can't say that I've considered that before. Hmmm.

Okay, a couple options.

1) You can have the item simply negate it's own weight when active. Edit the item's gives() to include this bonus:

@if(@sametext(me::inactive,"") then 0 else -me::baseweight) to me::weight
When active, it weighs nothing, when inactive, it weighs normally.

2) You can create a new modifier, and have that do it. (You could then save that to a file and use it as needed.)

Create the new modifier, then edit it. In the modifier's edit window, have the name be something like "Carries its own weight" or something obvious. The cost should probably be 0.

In the gives() for the modifier, you'll do something a lot like the gives() above, but modified to suit a modifier by using owner:: instead of me::, so this:

@if(@sametext(owner::inactive,"") then 0 else -owner::baseweight) to owner::weight
I think either of those should do it.

Note that in both cases, we're checking to see if the inactive() tag is empty, which means it *is active* because the inactive() tag value will change depending on how it's inactivated, but will always be missing or empty if the item is active.
Correct me if I'm wrong, but if I'm using GCA5 with its ability to automatically activate and inactivate the bonuses, I shouldn't need the explicit check for inactive, right?
MeddlingMonk is offline   Reply With Quote