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
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 3rd, 2010, 09:04 AM
Ok, here's my bind.

I'd like to be able to show if a weapon is proficient on the Weapons tab, but the only ones that I can do are Simple weapons at the moment because that's the only proficiency that hasn't changed with D20 modern.

Simple Weapons Prof. uses hero.assign[Hero.ProfSimple]. How does that work exactly? is there a way to assign a user tag in the same way ( for example, archaic weapons prof. allows proficiency with all archaic weapons so is there a way to do a ProfArch tag in the same way as the ProfSimple one)?

Also, I'd like the same for specific weapons chosen (like Exotic Melee, etc...)

Suggestions?
TCArknight is offline   #1 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 7th, 2010, 04:31 AM
Any help out there?
TCArknight is offline   #2 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old July 7th, 2010, 08:46 PM
Yes, add the tag and then do a foreach looking for all weapons with it and assigning the Helper.Proficient tag. It won't show as proficient until actually added to the hero though.
Lawful_g is offline   #3 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 14th, 2010, 05:00 AM
Ok, I'm trying this:

Code:
      foreach thing in BaseWep where "User.ProfArch"
        debug "id: " & eachthing.idstring
        
        perform eachthing.assign[Helper.Proficient]
        nexteach
And the ids displayed are correct for each of the Archaic weapons in the files. But I'm getting an error message on recompile that the script is invalid under the circumstances.

Is there a way to use : "call ChosenProf" in this foreach?

Any suggestions?

Thanks!
TC

PS: More and more it seems the need arises to be able to assign tags to things before they're added to the hero. Any chance of getting a macro or function to do that?

Last edited by TCArknight; July 14th, 2010 at 05:07 AM.
TCArknight is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 14th, 2010, 06:17 AM
Within a "foreach thing" you can't use assign. Only "foreach pick" - until something is present on the hero, you can't assign tags to it or alter its fields.
Mathias is offline   #5 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 14th, 2010, 10:01 AM
Figured it out!

Code:
running at First/1000

      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      var wpn as string

      foreach thing in BaseWep where "User.ProfArch"
        wpn = "WepProf." & eachthing.idstring
        perform hero.assignstr[wpn]
        nexteach
The weapon then appears as proficient on the Weapon Selection screen as well as when chosen.

I think the same principle could be applied if choosing armors, etc that are considered outside of the normal D20 dataset ...

TC
TCArknight is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 14th, 2010, 10:20 AM
coding note:

Code:
 
perform eachthing.forward[WepProf.?]
will accomplish the same thing as:

Code:
 
wpn = "WepProf." & eachthing.idstring
perform hero.assignstr[wpn]
Identity tags like WepProf.? do exist while the choice is still a thing, so you can have the thing you've found forward tags that match the selected pattern to the hero.
Mathias is offline   #7 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 14th, 2010, 10:42 AM
Thanks!

That seems a bit simpler. I'll use it.
TCArknight is offline   #8 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old July 15th, 2010, 03:59 AM
Mathias,

I tried your suggestion and I get:

Quote:
Attempt to forward tags to an implied pick context with no identifiable container.
Is it something about not having hero. somewhere in that forward?

TC
TCArknight is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 15th, 2010, 06:33 AM
What is this script on?

forward ought to always forward to the container of whatever runs the script. Except for the weapon stats on a custom or specific weapon, that's the hero.
Mathias is offline   #10 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 10:09 PM.


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