Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
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? |
#1 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Any help out there?
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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.
|
#3 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Ok, I'm trying this:
Code:
foreach thing in BaseWep where "User.ProfArch" debug "id: " & eachthing.idstring perform eachthing.assign[Helper.Proficient] nexteach 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. |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.
|
#5 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
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 I think the same principle could be applied if choosing armors, etc that are considered outside of the normal D20 dataset ... TC |
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
coding note:
Code:
perform eachthing.forward[WepProf.?] Code:
wpn = "WepProf." & eachthing.idstring perform hero.assignstr[wpn] |
#7 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Thanks!
That seems a bit simpler. I'll use it. |
#8 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Mathias,
I tried your suggestion and I get: Quote:
TC |
|
#9 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#10 |
|
|