• 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

Improved Weapon Familiarity Feat

bodrin

Well-known member
Another Complete Warrior Feat.

Does anyone have any idea how to script the Improved Weapon Familiarity Feat to assign all Exotic weapons associated with the race of a character as Martial weapons instead, including any weapons that contain the name of the race too EG:- Elven Thinblade= Martial weapon for Elves.

I've looked at the Exotic weapon proficiency feat for ideas, and the Dwarven Urgrosh weapon but I can only see the Easy if Race tick box to make the individual weapon one proficiency lower than needed.

I found this code elsewhere on the forum but it refers to bootstrapping, at the moment i don't know how or what Bootstrapping is.
Code:
if (hero.tagis[Hero.ProfMart] <> 0) then
var result as number
result = hero.assign[WepProf.wGythka]
endif

Thanks for any help in advance.
 
Silly Me

Found an old file with this Improved Weapon Familiarity script i'd entered a year and a half ago!

Code:
Eval Script Phase first Priority 1000 index 1
var result as number
      result = hero.assign[Hero.ProfMart]
Code:
Pre Req
Base attack +1 Required
       if (child[Attack].field[tAtkBase].value >= 1) then
          @valid = 1
          endif

It seems to only assign the Martial weapon proficiency though and not tie it to any race so it may need tweaking!
 
Last edited:
I'm not sure myself but need to work this one out as well. I do know how to check for race:

@valid=tagis[Race.Elf]

This is from one of my weapon group feats: Axes (from the Unearthed Arcana):

Code:
perform hero.assign[WepProf.wHandaxe] 
perform hero.assign[WepProf.wBattleaxe] 
perform hero.assign[WepProf.wGreataxe]
perform hero.assign[WepProf.wWaraxeDw]

var hasfeats as number 
hasfeats = hero.pickexists[fWGrpSpear] + hero.pickexists[fWGrpDbl]

if (hasfeats = 2) then 
  if (hero.pickexists[wUrgroshDw] = 0) then
    perform hero.assign[WepProf.wUrgroshDw] 
  endif
  perform hero.assign[WepProf.wAxeOrcDbl] 
endif

So that would give you how to assign proficiency based on a condition, i.e. check for race and then assign proficiencies.
 
So I would guess this would work for example:

Code:
var israce as number
israce = tagis[Race.Elf]

if (israce > 0 ) then
  perform hero.assign[WepProf.wThinBlade]
endif
 
Also decided to check to make sure they have the martial weapon proficiency. So, code, final version for elf is:

Code:
~ If you're an elf you're proficient with Elven weapons.
var israce as number
var hasfeat as number
israce = tagis[Race.Elf]
hasfeat = #hasfeat[fWepMart] + #hasfeat[fMartial]

if (israce > 0 ) then
  if (hasfeat > 0) then
    perform hero.assign[WepProf.wThinBlade]
    perform hero.assign[WepProf.wLightBld]
    perform hero.assign[WepProf.wDoubleBow]
  endif
endif

Again, haven't tested it but it should work. :)
 
Note that you'll need hero.tagis[Race.Elf], rather than tagis[Race.Elf] - your proficiency isn't an elf.

and to simplify:

if (hero.tagis[Race.Elf] <> 0 then

will work just as well as declaring a variable, setting the variable, and then testing the variable.
 
Ah, good eye...corrected. Yeah, I just prefer to use the same method rather than a variable for one thing and a tag for another. To each his own. :)
 
Thank you for the help on this one.
Here's the full working script for my Elven Thinblade and Lightblade. I'll integrate the Gnome, Orc, Half Elf, Dwarf and other races later.

Code:
~ If you're an elf you're proficient with Elven weapons.
var hasfeat as number

if (hero.tagis[Race.Elf] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wElvLigBla]
    perform hero.assign[WepProf.wElvThiBla]
   endif
endif
 
It works but?

Hers a strange one guys!

The following code for the Improved Weapon Familiarity feat worked perfectly until I added the Half-Orc race.

On a test character with all the Race weapons added the Axe, Orc Double isn't assigned to the Half-Orc as proficient, the other races, Elf, Half-Elf and so on do get assigned correctly. Changing the race in real time worked superbly until, as stated, the Half-Orc.

Current Script!
Code:
~ If you're an elf you're proficient with Elven weapons.
var hasfeat as number

if (hero.tagis[Race.Elf] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wElvLigBla]
    perform hero.assign[WepProf.wElvThiBla]
   endif
endif

~ If you're an Dwarf you're proficient with Dwarven weapons.
var hasfeat as number

if (hero.tagis[Race.Dwarf] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wWaraxeDw]
    perform hero.assign[WepProf.wUrgroshDw]
   endif
endif

~ If you're an Gnome you're proficient with Gnomish weapons.
var hasfeat as number

if (hero.tagis[Race.Gnome] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wHammerGnm]
    endif
endif

~ If you're a Half-Orc you're proficient with Orcish weapons.
var hasfeat as number

if (hero.tagis[Race.HalfOrc] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wAxeOrcDbl]
    endif
endif

However after further investigation I noticed that the code isn't actually doing anything, it is only reading the "Easy If Race" tick box for the racial weapons.

I assigned the Easy if race to the Elven thinblade and the lightblade but the Gnome hammer and the Dwarven weapons are classed as martial for the race anyway.
It was only when the Orc Axe flagged as non proficient and I removed the Easy if race tick from the Thinblade and Lightblade that I realised this.

Anymore Ideas?
 
Still tinkering with the script, I've noticed that If I select the race first then look on the weapons list the relevant weapons are selectable and not greyed out, but once picked they are not being assigned as proficient!

I've changed the timing to final(user) 10000 as well.
Arrrghh!
 
Back
Top