View Single Post
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old June 2nd, 2021, 10:37 PM
Good, I'm glad you did that. Treating them as separate modules just makes sense.

Let's take a look at that custom expression:

Code:
component.BaseWep # It has to be a weapon
& !Helper.NoSelect # It can't be marked as not selectable
& !component.Specific # not sure what this one does
& !wCategory.Amm? # It cannot be any kind of ammunition
& !IsWeapon.wCrsRp? # not sure what this one does
& ( # It must have any one of the following tags:
wFtrGroup.Crossbows # Part of the crossbows group
| wFtrGroup.Thrown # Part of the thrown weapons group
| wCategory.Firearm # A firearm
| Custom.RapidRel # Weapon is compatible with rapid reload
)
So I guess what you're trying to do is present the user with a choice between Crossbows, Firearms and Thrown weapons?

I just spent a bunch of time trying to figure out how to make the select box show a limited selection of weapon fighter groups, and came up blank. That part was pretty easy with the feats I did, like Weapon Focus etc, because they let you pick from ALL weapon groups. All I had to do was select "Weapon Groups" from the drop down and then the select box was set to fShowWhat.WeaponsGrp and they were all there.

I suspect you need to use a custom expression to populate the list, but I'm not sure quite what it would be. Anyone else care to chime in on that?

As for checking whether a finesse/light weapon is equipped, wouldn't it be something like:

Code:
foreach pick in hero where "wCategory.Melee & (wClass.Light | Helper.Finesse)"
	# Code to do something goes here
nexteach
It would be helpful if you could post your code when you need help. Also, be sure to tell us the end goal. It's easy to get focused on the immediate problem and forget to communicate what the ultimate outcome is supposed to be. There may be some totally different way of approaching the end goal which bypasses the problem you're having -- but we won't know to suggest that if we don't have the full context of what you're doing. Basically, the more info you can provide as part of your question, the better.
wdmartin is offline   #158 Reply With Quote