• 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

Help with magic items

pfloyd

Member
I'm working to create two magic items, each based off of existing items. What I'm not sure on is the syntax I would need to use for both.

The first is easy. it's a Runestone of Protection, which gives a +1 Unnamed bonus to AC (normal, touch and flat-flooted) and to all saves. Sort of like a +1 Ring of Protection and a +1 Amulet of Natural Armor combined.
What I was thinking of was this:
Code:
if (field[gIsEquip].value <> 0) then
hero.child[ArmorClass].field[tACArmor].value = maximum(hero.child[ArmorClass].field[tACLuck].value, 1)
hero.child[vFort].field[vResist].value = maximum(hero.child[vFort].field[vResist].value, 1)
hero.child[vRef].field[vResist].value = maximum(hero.child[vRef].field[vResist].value, 1)
hero.child[vWill].field[vResist].value = maximum(hero.child[vWill].field[vResist].value, 1)
hero.child[ArmorClass].field[tACDeflect].value = maximum(hero.child[ArmorClass].field[tACDeflect].value, 1)
endif

Would this be correct?

Second one is a bit tougher. It's an artifact based on the Monk's Belt, but with a few additions:
1. At 9th level, it provides Dodge as a bonus feat. If the wearer already has Dodge, then it provides an additional Dodge action versus a second opponent, with the action as an interrupt.
2. +1 to hit/damage in melee
I'm sure the GM will also throw in more features as my Monk reaches higher levels.

Now, the Monk's Belt already has this as the code:
Code:
      if (field[gIsEquip].value <> 0) then
~
        ~ If we're a monk, our AC and unarmed damage abilities get
        ~ 5 extra levels
        if (hero.tagis[Classes.Monk] <> 0) then
          hero.child[cMnkAC].field[xExtraLev].value = hero.child[cMnkAC].field[xExtraLev].value + 5
          hero.child[cMnkUnarm].field[xExtraLev].value = hero.child[cMnkUnarm].field[xExtraLev].value + 5
~
        ~ Otherwise, we get 3 upgrades to our unarmed damage, and an AC bonus
        ~ assigned below
        else
          var result as number
          result = hero.child[wUnarmed].assign[Helper.DamageUp]
          result = hero.child[wUnarmed].assign[Helper.DamageUp]
          result = hero.child[wUnarmed].assign[Helper.DamageUp]
          endif
        endif

Now it's trying to figure out the syntax for the additional abilities mentioned above.

I've tried doing this before, a couple of years ago with just toying around, but never got anywhere successful.


Oh, and as a bonus, he has bracers that give +1 Strength and AC, enhancement bonuses. Fun, huh?

Thanks in advance for any assistance.
 
1. Your first item is trying to grant two separate bonuses to AC (+1 luck and +1 Deflection) and there is no luck bonus to AC. If you delete that first "AC bonus" line, the item will work and grant a Deflection bonus to AC. (Which won't stack with any existing Def AC)
You might be better using the script from the Amulet of Natural Armour, so that you grant a (or increase an existing) natural armour bonus.

2. No ideas on the Dodge for your Monk's Belt upgrade at the moment, I'll think about it if I get a chance. Look at the "Amulet of Mighty Fists" to get the +1 attack/damage bonus.

3. Bracers. Look at a Belt of Ogre Strength, etc for the Strength increase.
 
I'm working to create two magic items, each based off of existing items. What I'm not sure on is the syntax I would need to use for both.

The first is easy. it's a Runestone of Protection, which gives a +1 Unnamed bonus to AC (normal, touch and flat-flooted) and to all saves. Sort of like a +1 Ring of Protection and a +1 Amulet of Natural Armor combined.
What I was thinking of was this:

Would this be correct?

As Dami pointed out, your script is attempting to add two different AC bonuses. Based on your description, what you want is an untyped bonus that applies in all situations. You can do that with the "Bonus" field like this:

Code:
hero.child[ArmorClass].field[Bonus].value += 1


Second one is a bit tougher. It's an artifact based on the Monk's Belt, but with a few additions:
1. At 9th level, it provides Dodge as a bonus feat. If the wearer already has Dodge, then it provides an additional Dodge action versus a second opponent, with the action as an interrupt.
2. +1 to hit/damage in melee
I'm sure the GM will also throw in more features as my Monk reaches higher levels.

First, the code on the monk's belt is old, and though it still works, you can shorten it by removing the result variable and replacing it with the perform function, as such:

Now, the Monk's Belt already has this as the code:
Code:
         perform hero.child[wUnarmed].assign[Helper.DamageUp]
         perform hero.child[wUnarmed].assign[Helper.DamageUp]
         perform hero.child[wUnarmed].assign[Helper.DamageUp]

Now it's trying to figure out the syntax for the additional abilities mentioned above.

I've tried doing this before, a couple of years ago with just toying around, but never got anywhere successful.


Oh, and as a bonus, he has bracers that give +1 Strength and AC, enhancement bonuses. Fun, huh?

Thanks in advance for any assistance.

The second is easier, but you would need a foreach loop because we currently do not have a damage melee field in d20. I believe that's on Shadow's to-do list to add some day, but in the meantime, you can use the following:

Code:
foreach pick in hero from BaseWep where "wCategory.Melee"
  eachpick.field[Bonus].value += 1
nexteach

The second one is slightly trickier, but you would bootstrap the Dodge feat with the condition:

Code:
Classes.Monk>=9

That's assuming "level 9" as a requirement means 9 levels of monk and not 9 character levels.

I'll have to look into what it would take to check to see if the character already has Dodge before adding the Dodge feat, but once we get that figured out you can then use another bootstrap to add a special that indicates the ability to take another Dodge action.
 
Back
Top