• 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

weapon proficiency linkage

Try this:

Code:
perform linkage[wprofic].pulltags[Profic.?]

I think "pullidentity" will be looking for identity tags in the WeaponBase component, not the identity tags of the Proficiency component, but pulltags just grabs the tags, without worrying about whether they're identity tags, or whose identity tags they are.
 
Still not working:
Code:
Linkage pick 'wprofic' not located for current context
Location: 'eval' script for Component 'WeaponBase' (Eval Script '#2') near line 12

I tried use such line to test if linkage exist:
Code:
if (islinkage[wprofic] = 0) then
		field[wpSpeed].value += 44
		endif
and:
Code:
		if (islinkage[wprofic] <> 0) then
		field[wpSpeed].value += 44
		endif
but none of them changed anything so I don't know if it is established.
 
So, double-check the weapon you're testing with - make certain that you've defined a linkage for it.

Then, double-check your test character - make certain that the proficiency pick that you want to use for the weapon you're testing with has been added to the character.
 
On the weapon:
Code:
    <link linkage="wprofic" thing="prSwords"/>
Which hero has also with proficiency.
Anyway, I've also found that when I try to save portfolio with my test heroes I've got such errors:
Code:
Attempt to access field 'grIsEquip' that does not exist for thing 'prKnives'
- - -
Attempt to access field 'grIsEquip' that does not exist for thing 'prSpears'
- - -
Attempt to access field 'grIsEquip' that does not exist for thing 'prSwords'
- - -
Attempt to access field 'grIsEquip' that does not exist for thing 'prKnives'
- - -
Attempt to access field 'grIsEquip' that does not exist for thing 'prSpears'
- - -
Attempt to access field 'grIsEquip' that does not exist for thing 'prSwords'
 
You've confirmed one of the things to test. Confirm the other, as well, please - has prSwords been added to the character yet?

For the new error message, looks like you need to look at the pick template you've chosen to use for the table where you're adding your weapon proficiencies. I think you're re-using something without customizing it for the purpose you're now using it for.
 
OK, I did it, it works (at least for tab_armory) but still got errors - perhaps some places where some display go through all the fields (I've notice that adjustment for weapon have access to proficiencies) so probably I need some additional filtering.
Probably will try to get rid of those tomorrow.

Just saw your recent post.
Yes, Hero had prSwords.
I guess I can indeed have some re-use somewhere - so I'll be doing some clean-up.
Thanks.
 
Last edited:
I had to add condition:
Code:
if (tagis[Armory.Melee] = 1) then
to every place where
Code:
if (eachpick.field[grIsEquip].value <> 0) then
was.
So no more this error for now:
Code:
Attempt to access field 'grIsEquip' that does not exist for thing 'prKnives'
 
Errors again.
My previous test just proved that something is working.
After changing this:
Code:
		if (container.ishero <> 1) then
		  @value = linkage[wprofic].field[prRoll].value
		  else
		  		  @value = -2
          endif
To this:
Code:
if (tagis[Armory.Melee] = 1) then
		  @value = linkage[wprofic].field[prRoll].value
		  else
		  		  @value = -2
          endif
... value is passed correctly but I've got my old errors:
Code:
Linkage pick 'wprofic' not located for current context
Location: 'field calculate' script for Field 'wpProfic' near line 7
multiplied by weapons added to heroes in portfolio.
I tried to remove sumary statblock, tab_proficience, tab armory, sumary_armory enitrely but nothing helped.

Also I need somthing to assign the value -2 if any needed proficiency is given to hero - right now what I have is not working (also with "if (container.ishero <> 0)" ).
How can I properly test it?
 
There is a better test to determine if a linkage has been established (container.ishero is entirely unrelated to linkages, and won't tell you anything relevant).

Here's the page on the wiki that describes all the actions and tests you can do from the pick context (which is the context of a field calculate script): http://hlkitwiki.wolflair.com/index.php5?title=Pick_Context#references

I'd like you to study that and see if you can figure out the answer for yourself. If not, I'll point you at the answer. That way, you can start learning what the code actually means, instead of just copying random things without understanding what they do.
 
Yeah, I have already checked that page but among many tests and other thing I've been implementing I have missed something.
I would give it another try right now.
 
OK, for condition on the equipment I used:
Code:
		if (this.ispick = 1) then
			if (linkage[wprofic].valid  = 1) then
		  @value = linkage[wprofic].field[prRoll].value
		  else
		  		  @value = -2
				  endif
          endif
...and it gives me -2 if there is no proficiency, but I still have got previous errors.
 
Code:
if (islinkage[wprofic] <> 0) then
  @value = linkage[wprofic].field[prRoll].value
else
  @value = -2
  endif
 
Oh thanks!
It is finally working!
I thought linkage[wprofic].valid would have the same functionality, and the right one - just missed it.
Thanks again.
 
Back
Top