Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
pfloyd
Junior Member
 
Join Date: Aug 2009
Location: Worcester MA
Posts: 15

Old September 16th, 2016, 03:07 PM
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.

A learning experience is one of those things that say, "You know that thing you just did? Don't do that."
=== Douglas Adams
pfloyd is offline   #1 Reply With Quote
Dami
Senior Member
 
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 535

Old September 16th, 2016, 07:01 PM
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.
Dami is offline   #2 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,709

Old September 17th, 2016, 08:13 AM
Quote:
Originally Posted by pfloyd View Post
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

Quote:
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]
Quote:
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.
Sendric is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 10:51 AM.


Powered by vBulletin® - Copyright ©2000 - 2019, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.