• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Adding a weapon proficiency group

TobyFox2002

Well-known member
I am trying to add Firearms as a weapon proficiency group, I'm having a bit of trouble getting it to show up and function with feats such as weap prof and weap spec.

I've managed to set up a stopgap measure that confers proficiency in any weapon that is listed as a Firearm. But the weapons are still grayed out when a person tries to select the weapon and more importantly the two feats mentioned don't do anything when applied to those weapons.

Is there a file that contains information about weapon groups that I can look at for examples, (including internal files).
 
I'm not sure I follow. I created a "weapon" called Firearms. When creating new weapons that fall into this category, use the "Counts as Weapon..." feature and select this firearms weapon. That should take care of it. I've been using this, and it works with Weapon prof, weapon focus, and weapon spec.
 
It does not, it doesn't actually create a new weapon type, for instance you give them Exotic Weapon Proficiency (Firearms). And then you go to add a new weapon, but all the firearms are STILL grayed out.

Now I know that normally weapons are listed in proficiency as their seperate weapon, but it still means this fails to apply weapon proficiency to the class which should grant ALL firearms.

Also, another reason I can tell it isnt working as it should is this:

Message: Weapon Focus (crossbow or firearms) required.
Code:
foreach pick in hero from BaseWep where "Broadcast.WepFocus"
   validif (each.tagis[wProfReq.wCrs?] + each.tagis[wProfReq.wFirearms] <> 0)
nexteach

Gives the following error:

Syntax error in 'pre-requisit rule' script for Thing 'fPFPronSho' on line 2
-> Tag 'wProfReq.wFirearms' not defined
 
Last edited:
I forgot to add,

the Counts As Weapon adds the Tag IsWeapon.wFirearms
Weapon Proficiency is a different tag, or seems to be.
 
It does not, it doesn't actually create a new weapon type, for instance you give them Exotic Weapon Proficiency (Firearms). And then you go to add a new weapon, but all the firearms are STILL grayed out.

Now I know that normally weapons are listed in proficiency as their seperate weapon, but it still means this fails to apply weapon proficiency to the class which should grant ALL firearms.

Also, another reason I can tell it isnt working as it should is this:

Message: Weapon Focus (crossbow or firearms) required.
Code:
foreach pick in hero from BaseWep where "Broadcast.WepFocus"
   validif (each.tagis[wProfReq.wCrs?] + each.tagis[wProfReq.wFirearms] <> 0)
nexteach

Gives the following error:

Syntax error in 'pre-requisit rule' script for Thing 'fPFPronSho' on line 2
-> Tag 'wProfReq.wFirearms' not defined


Neither of those wProfReq tags exist as far as I can tell. I see wProfReq.Simple and wProfReq.Exotic, but not the ones you have here. Instead, you should have it look for the IsWeapon.Firearms or IsWeapon.wCrs? tags.

Also, I don't have that "grayed out" problem you have. Any weapon I have that counts as a firearm is not grayed out when I have the exotic weapon proficiency (firearms) feat.

Edit: Come to think of it, I'm not sure this pre-req is right anyway. You would have to have the weapon in the portfolio in order for it to report as valid. Without it, you could still have the feat, but get an error. You might want to look for the feat and then check its selected thingid.
 
Last edited:
Looking for IsWeapon.wFirearms would not check if they have weapon focus with firearm type weapons.

And the wProfReq.Crs? does work not give the same error but you are right that does not fulfill the conditions required either. I also tried checking for IsWeapon, even if I didnt think it had anything to do with weapon focus and that didn't work either.

Meh.

Btw, I got the code example from the class prereq of "Exotic Weapons Master."
 
Looking for IsWeapon.wFirearms would not check if they have weapon focus with firearm type weapons.

If it is within the foreach pick where you are looking for the tag Broadcast.WepFocus, it would work fine, but as I said it would require you to have the weapon in the portfolio.

And the wProfReq.Crs? does work not give the same error but you are right that does not fulfill the conditions required either. I also tried checking for IsWeapon, even if I didnt think it had anything to do with weapon focus and that didn't work either.

Meh.

Btw, I got the code example from the class prereq of "Exotic Weapons Master."

The ? may cause it not to spit an error. I don't really know. Either way, its not a tag I've ever seen. I took a look at the Exotic Weapons Master. That's looking for any weapon that's exotic, and while its not a perfect implementation I can't think of a better way to do it for that particular requirement. I actually need to work on something similar to this. I'll do that and get back to you shortly.
 
So it turns out Weapon Focus places a tag on the hero. Therefore, you can do an expr-req as such:

Code:
hero.tagis[WepFocus.wCrs?] + hero.tagis[WepFocus.wFirearms] <> 0
 
Still doesn't work even with that code. I've tried examining the original feat which is a pathfinder one and I have the code for it but the syntax is.. um very different and I don't understand the pathfinder code well enough to take a shot at converting it.

Code:
        var searchexpr as string

        searchexpr = "wFtrGroup.Crossbows | wCategory.Firearm"
        if (#hasfeat[fProneSlin] <> 0) then
          @message = "Weapon focus (crossbow, firearm or sling) required."
          searchexpr &= " | IsWeapon.wSling"
          endif

        ~search through all the crossbows and firearms (and maybe also slings)
        ~in the game, and compare them to the list of weapons we have weapon
        ~focus in - if there's a match, then we're valid
        foreach thing in BaseWep where searchexpr
          validif (eachthing.intersect[WepFocus,WepFocus] <> 0)
          nexteach

Perhaps, if I can convert this, I can get the prereqs for the feat to function.
 
I'm confused why this isn't working since it does for me. Maybe we set things up differently. How did you create your firearms group?
 
I added a "new" weapon called it "Firearms" and set all of the other weapons to count as weapon. Hoping that when you select proficiency with say...
Exotic Weapon Proficiency (Revolver) it would be called "firearms"

At least it makes sense in my own head, if you want to examine it.. here's the file..
 

Attachments

Ok, looks the same as what I did except you have that User.Firearms tag which I'm not sure what that would be used for.

If you take Exotic Weapons Proficiency (Revolver) it will allow you to use the Revolver, but nothing else. If you take Exotic Weapons Proficiency (Firearms) it will allow you to use any weapon with the tag IsWeapon.wFirearms (so anything marked with "Counts As..." wFirearms).
 
I'm aware of that, once I get all of it working I will "Hide" 'firearms' except for classes. Also, even when I assign the Exotic Weapon Prof (Firearms) to the character. If I go to the weapon selection list all "firearm" type weapons are still grayed out. Which they shouldn't be.

And this still doesn't help me with a feat that requires a weapon focus for any firearm. Meh, perhaps this just isn't possible with the 3.5 version of hero labs.
 
Last edited:
I'm not seeing any weapons greyed out that shouldn't be greyed out. The feat in question doesn't appear to be in the file you attached.

Maybe I need to see the portfolio you are having problems with.
 
Thank you Sendric for all your assistance in this issue. This is the final code as I have come up with it. Lets hope it holds together.

Code:
if (#hasfeat[fExoticWep] <> 0) then
 foreach pick in hero from BaseFeat where "thingid.fExoticWep"
  validif (eachpick.field[fChosen].chosen.tagis[IsWeapon.wFirearms] <> 0)
  validif (eachpick.field[fChosen].chosen.tagis[IsWeapon.wCrs?] <> 0)
 nexteach
endif

~ If hero has PRONE SLINGER feat, expand pre-reqs to include Weapon Focus (Sling).
if (#hasfeat[fPFPronSli] <> 0) then
 @message = "Weapon focus (crossbow, firearm or sling) required."

 if (#hasfeat[fExoticWep] <> 0) then
  foreach pick in hero from BaseFeat where "thingid.fExoticWep"
    validif (eachpick.field[fChosen].chosen.tagis[IsWeapon.wFirearms] <> 0)
   validif (eachpick.field[fChosen].chosen.tagis[IsWeapon.wCrs?] <> 0)
  nexteach
  endif
  validif (hero.tagis[WepFocus.wSling] <> 0)
endif

Also, if I've missed any weapons that are "slings" in the Weapon Focus, sorry.
 
Back
Top