View Single Post
Old 01-13-2022, 11:10 AM   #6
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: How to code equipment that boosts Attributes

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:

Code:
@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:

Code:
@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.
__________________
Armin D. Sykes | Visit my GCA5 blog for updates and previews. | Get GURPS Character Assistant 5 now at Warehouse 23.
Armin is offline   Reply With Quote