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 June 18th, 2009, 05:32 PM
New question. I am making a class that only gets proficiency with light shields, not heavy ones. The code I am trying to use and which is not working quite right is....

First (Users), 10000
var result as number
foreach pick in hero where "ShldClass.Light"
result = each.assign[Helper.Proficient]
nexteach

The only problem here is that the character is not showing as proficient, so when they go to buy a light shield it is grayed out. Any better way to do this?
Lawful_g is offline   #21 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 18th, 2009, 07:11 PM
try this:

foreach thing in Armor where "ShldClass.Light"
perform eachthing.assign[Helper.Proficient]
nexteach
foreach pick in hero where "ShldClass.Light"
perform eachpick.assign[Helper.Proficient]
nexteach

Until an item is added to your hero - while you're seeing it in the purchase form - it's called a "thing". Once added to the hero, it becomes a "pick". So, your loop was searching through all the picks on the hero to find the light shields you own. So, add a second loop to find all the shield things as well. The exact details of a search through things differ slightly from searching picks.

One thing to check before doing that is to make sure that once you purchase a light shield, but not a heavy shield, it's properly proficient with your old script. If that doesn't work, then something else is going wrong.
Mathias is offline   #22 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 19th, 2009, 12:47 PM
It gives me "Non-existent component "Armor" referenced by script" error
Lawful_g is offline   #23 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 19th, 2009, 02:06 PM
Oops, BaseArmor, rather than Armor.
Mathias is offline   #24 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 19th, 2009, 04:33 PM
foreach thing in BaseArmor where "ShldClass.Light"
perform eachthing.assign[Helper.Proficient]
nexteach
foreach pick in hero where "ShldClass.Light"
perform eachpick.assign[Helper.Proficient]
nexteach

Now I get the error "Syntax error in 'eval' script for Thing 'fArmLgShld' (Eval script '#1') on line 2
-> Script reference is invalid under the circumstances"

What circumstances? Is it because I am doing it through an Eval Script? Should I do it as an Eval Rule Instead? ... No that didn't work either.

Thanks for all your help, by the way, mgehl.
Lawful_g is offline   #25 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 19th, 2009, 05:06 PM
Question - does the original script you wrote make the light shields but no the heavy shields proficient once they're purchased?

Is that good enough?
Mathias is offline   #26 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old June 19th, 2009, 05:14 PM
OK, now I'm remembering - you can't assign tags to a thing, only a pick.

I tested your original script - it does make them proficient once added, and looking at how the prereq is constructed, you'd need access to the structural files to create the tests that would look for a light shield tag.

I can't think of another way to do this.
Mathias is offline   #27 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old June 21st, 2009, 09:58 AM
Ah. Thanks anyway. This will be good enough I suppose, I've no desire to go mucking about in the structural files.
Lawful_g is offline   #28 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:52 AM.


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