• 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

Custom Item Powers

Hinairusu

Member
Okays, so first step was to search through the forums.
I found this thread, and a second one by the same author, saying to copy/pasta from "luck blade".
http://forums.wolflair.com/showthread.php?t=12367

What i am attempting:
Item enchantment which allows the user to gain +1 to all saving throws, which is available on Armor, Shields and Weapons, and the ability similar to a luck blade in that they can re-roll one saving throw per day.
so far i have this.

Armor
Code:
UID: ipLuckARM
Name: Lucky Markings
Description: These lucky markings cover the item, infering a +1 luck bonus to all saves, and giving you a chance to reroll one saving throw once per day.
Field ID: iPrice 
 ~ Value: 3
Tags:
Group ID:PowerType
 ~ Tag ID: Armor
 ~ Name: Armor
Group ID: PowerReq
 ~ Tag ID: Armor
 ~ Name: Armor
Eval Script:
 ~ Phase: Pre Levels
 ~ Priority: 10000
 ~ Index: 1
 ~ Script: 

      ~ If we're not equipped, get out
      if (field[gIsEquip].value + field[wIs2nd].value = 0) then
        done
        endif
      #applybonus[BonLuck, hero.child[svFort], 1]
      #applybonus[BonLuck, hero.child[svRef], 1]
      #applybonus[BonLuck, hero.child[svWill], 1]
 ~ Timing: None

Doesn't work. Next tried a variant using another type of bonus i found,
Shield:
Code:
UID: ipLuckARM
Name: Lucky Markings
Description: These lucky markings cover the item, infering a +1 luck bonus to all saves, and giving you a chance to reroll one saving throw once per day.
Field ID: iPrice 
 ~ Value: 3
Tags:
Group ID:PowerType
 ~ Tag ID: Armor
 ~ Name: Armor
Group ID: PowerReq
 ~ Tag ID: Shield
 ~ Name: Shield
Eval Script:
 ~ Phase: Post Levels
 ~ Priority: 10000
 ~ Index: 1
 ~ Script: 

      if (field[gIsEquip].value <> 0) then
        hero.child[svFort].field[svResist].value = maximum(hero.child[svFort].field[svResist].value, 1)
        hero.child[svRef].field[svResist].value = maximum(hero.child[svRef].field[svResist].value, 1)
        hero.child[svWill].field[svResist].value = maximum(hero.child[svWill].field[svResist].value, 1)
        endif
 ~ Timing: None

Still no luck. Went back to the first one to see if the timing had anything to do with it.

Code:
UID: ipLuckARM
Name: Lucky Markings
Description: These lucky markings cover the item, infering a +1 luck bonus to all saves, and giving you a chance to reroll one saving throw once per day.
Field ID: iPrice 
 ~ Value: 3
Tags:
Group ID:PowerType
 ~ Tag ID: Weapon
 ~ Name: Weapon
Group ID: PowerReq
 ~ Tag ID: Weapon
 ~ Name: Weapon
Eval Script:
 ~ Phase: Pre Levels
 ~ Priority: 10000
 ~ Index: 1
 ~ Script: 

      ~ If we're not equipped, get out
      if (field[gIsEquip].value + field[wIs2nd].value = 0) then
        done
        endif
      #applybonus[BonLuck, hero.child[svFort], 1]
      #applybonus[BonLuck, hero.child[svRef], 1]
      #applybonus[BonLuck, hero.child[svWill], 1]
 ~ Timing: None

This time, it actually shows up in the enchantment box, but it still does not infer the +1 bonus to saves that i am after

Sources for coding: Cloak of Resistance +1, Luck Blade.

Any help would be appreciated, Thanks everyone :)
 
I'd recommend that you look up other weapon powers so that you can see how weapoon powers go about checking whether their weapon is active or not - that differs from how magic items or magic weapons reference whether they're equipped or not.
 
Back
Top