• 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

Goliath Weapon & the editor

Redjack

Well-known member
Over the Christmas break I've dug into the editor and made a fair bit of headway in a number of areas. I have one that I'm scratching my head on:

I have a Warhammer +1, attunement optional. Null sheen.

I want to have it so that if a Goliath attunes it, it becomes a +2 warhammer instead. How would I make that work?
 
This is a basic script to do this to a magic weapon that has the Bonus set to 1 (as a default). The script only runs if the weapon is equipped and attuned and the hero is a Goliath. (Hint: To find a given race tag, you need to go into the Develop menu -> Floating Info Windows -> Show Hero Tags. If you type IsRace in the debug window you can see what race is applied to a hero.)

Code:
~ quit if not equipped
doneif (field[gIsEquip].value = 0)
~ quit if not attuned
doneif (field[gIsAttuned].value = 0)
~ quit if not Goliath
doneif (hero.tagis[IsRace.r5CEEGolia] = 0)

~ if we got past the quit options, add +1 to the weapon bonus
field[Bonus].value += 1

Timing Wise, you can put this post-attribute/10000, which is after attributes are calculated, but before final bonuses are calculated for magic weapons (which if i remember is in final phase).
 
Back
Top