Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old October 24th, 2008, 10:42 AM
At 4th level, the Knight gets an ability called Armor mastery, which lets him move at normal speed in medium and eventually heavy armors. This is what I have got so far, culled from the Mithril scripts and modified a bit.

Phase: First Priority: 11000
~ If we're medium armor, remove the speed penalty
var result as number
if (hero.tagis[mClass.Medium] <> 0) then
result = delete[mCategory.Slows]
endif

However, it is not functioning when I equip medium armor, obviously, so how do I fix it? Thanks for your help, as always.
Lawful_g is offline   #1 Reply With Quote
huntercc
Senior Member
 
Join Date: Jul 2007
Location: Syracuse, NY (USA)
Posts: 213

Old October 24th, 2008, 01:00 PM
Are you trying this on a class special? That may explain why it's not working. I think you need to delete the tag mCategory.Slows from the armor itself.
huntercc is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 24th, 2008, 01:24 PM
mCategory.Slows is on the armor. You're looking for the tag on the hero.

(note that for mithral armor, the material is added as a child of the armor, which is how its script can go directly to the parent item.)

Use a foreach loop to check every piece of armor.

It's not been mentioned in the documentation yet, but note the more efficient assign/delete statement they added an update or two ago.

Code:
   foreach pick in hero where "EquipType.Armor & mClass.Medium & mCategory.Slows"
      perform each.delete[mCategory.Slows]
   nexteach
Mathias is offline   #3 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old October 27th, 2008, 01:01 PM
Lawful_g wrote:
>
>
> At 4th level, the Knight gets an ability called Armor mastery, which
> lets him move at normal speed in medium and eventually heavy armors.
> This is what I have got so far, culled from the Mithril scripts and
> modified a bit.
>
> Phase: First Priority: 11000
> ~ If we're medium armor, remove the speed penalty
> var result as number
> if (hero.tagis[mClass.Medium] <> 0) then
> result = delete[mCategory.Slows]
> endif
>
> However, it is not functioning when I equip medium armor, obviously, so
> how do I fix it? Thanks for your help, as always.


This script should do the trick:

~ Medium armor doesn't Slow any more
foreach pick in hero where "mClass.Medium"
perform each.delete[mCategory.Slows]
nexteach

It goes through each piece of medium armor, and deletes the "slows" tag
from it.


Hope this helps,

--
Colen McAlister, colen@wolflair.com
Colen is offline   #4 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old October 29th, 2008, 11:24 AM
Thanks for your help, both of you. I've got it working now.
Lawful_g is offline   #5 Reply With Quote
Reply


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 06:00 AM.


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