• 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

Gomo

Well-known member
I have a problem with linking weapons to proficiencies and attributes.
I have made a proficiency component based on skills from Savage World tutorial (I've made also skills, so I have both) but when I try to calculate roll value I got errors.
Right now I use such line:
Code:
@value = field[trtFinal].value + linkage[attribute].field[trtFinal].value
En the erro is:
Code:
Linkage pick 'attribute' not located for current context
Location: 'field calculate' script for Field 'prRoll' near line 5

In the end I will always need only Dexterity so basically I wouldn't need ane other attribute so maybe it is some simplier way to overcome this.
I have also error when I have such line:
Code:
<linkage linkage="attribute" optional="yes"/>
Error:
Code:
File: traits.str (line 351) - Linkage - Duplicate record encountered ('attribute')

So I changed it for this:
Code:
<linkage linkage="Profic" optional="yes"/>
But I guess it doesn't work.

Finally I would like to link a weapon to specific proficiency - but right now I doubt I could mange to do that.

Thanks in advance.
 
In the traits.str file, around line 351, what <linkage> elements have you defined? It sounds like you've added at least two of them - one a duplicate of the other.
 
351 line is:
Code:
<linkage linkage="Profic" optional="yes"/>

Here is the whole component:
Code:
  <component
    id="Profic"
    name="Proficiency"
    autocompset="no"> 	

    <field
      id="prRoll"
      name="Net Skill Roll"
      type="derived">
      <calculate phase="Final" priority="1000">
        <after name="Calc trtFinal"/><![CDATA[
        if (container.ishero <> 0) then
          ~@value = field[trtFinal].value + linkage[attribute].field[trtFinal].value 
          endif
        ]]></calculate>
      </field> 
	  
	  	      <field
      id="prLrnCrv"
      name="Learning Curve"
      type="static"
	  defvalue="2">
      </field>
	    
    <!--   <linkage linkage="attribute" optional="yes"/>-->
    <linkage linkage="Profic" optional="yes"/>

    <identity group="Profic"/> 

    <!-- Every skill is shown on the "Rolls" mouse-over on the Dashboard/TacCon -->
    <tag group="DashTacCon" tag="Rolls"/>

	<eval index="1" phase="Setup" priority="4000"><![CDATA[
  field[trtBonus].value = - 2
  ]]></eval> 
	
    <eval index="2" phase="Setup" priority="5000"><![CDATA[
      perform forward[Profic.?]
      ]]></eval>

    <eval index="3" phase="Traits" priority="10000">
      <before name="Calc resLeft"/>
      <after name="Bound trtUser"/><![CDATA[
      doneif (origin.ishero = 0)
      hero.child[resSkill].field[resSpent].value += (field[trtUser].value - field[trtBonus].value)*(field[trtUser].value - field[trtBonus].value) * 10 
      ]]></eval>
	  <!--
		  <eval index="4" phase="Setup" priority="5000"><![CDATA[
  ~pull the identity tag of the linked attribute into the skill
  perform linkage[attribute].pullidentity[Attribute]
  ]]></eval>      -->

    </component>
 
Okay, so are you still getting that error about duplicate records?

If not, what's your question? What is it about your Profic linkage that isn't working?
 
Right now I have commented lines which gave me errors (those from first post).
For clearing thing out:
Why is this line "<linkage linkage="attribute" optional="yes"/>" made errors?
 
Why when I was using line
Code:
<linkage linkage="attribute" optional="yes"/>
within my component, I've got such error:
Code:
Linkage - Duplicate record encountered ('attribute')
?
 
Did you copy that straight from the skills component?

Does the skills component still have a linkage named attribute?

You can't re-use the ID of a linkage in a different component.
 
Ok, that is what I was suspected just wasn't sure, just thought I had to set it up in different place maybe.
 
I pushed things further.
Now I've added some lines with intend to link weapons with proficiencies.
In WeaponMelee component I've added:
Code:
<linkage linkage="wprofic" optional="no"/>
and
Code:
<eval index="2" phase="Setup" priority="5000"><![CDATA[
  perform linkage[wprofic].pullidentity[Profic]
  ]]></eval>
in all melee wepon things I've added:
Code:
<link linkage="wprofic" thing="prSwords"/>
I've also added to editor.dat this line:
Code:
	      <inputthing
      name="Proficiency"
      helptext="Select the attribute used to calculate the dice pool for this skill.">
      <it_linkage compset="Profic" linkage="wprofic"/>
But for some reason appears as text field insted of dropdown menu (like in skills).
After this program recomplies but on load gives me such error:
Code:
Linkage pick 'wprofic' not located for current context
Location: 'eval' script for Component 'WeapMelee' (Eval Script '#2') near line 2
- - -
Linkage pick 'wprofic' not located for current context
Location: 'eval' script for Component 'WeapMelee' (Eval Script '#2') near line 2
- - -
Linkage pick 'wprofic' not located for current context
Location: 'eval' script for Component 'WeapMelee' (Eval Script '#2') near line 2
Which is about this line:
Code:
  perform linkage[wprofic].pullidentity[Profic]

I have searched for proper use of this but I've stuck.
So, what I am missing?

Thanks in advance.
 
After reading some post and code I still can't figure out how to set proper linkage from my weapons to proficiencies.
To clarify - I want to show beside my weapon statistics in Tactical Console also an according proficiency in that weapon.
So far I was able to set proficiencies for weapons through editor panel.
But now I've stuck.
Within WeaponBase component I have such line
Code:
if (container.ishero <> 0) then
        perform linkage[wprofic].pullidentity[Profic]
		done
        endif
Which isn't working (at least I have errors).
I've set in this component also:
Code:
 <linkage linkage="wprofic" optional="yes"/>
And my proficiencies have Identicty "Profic":
Code:
    <identity group="Profic"/>
.
But I still get those errors:
Code:
Linkage pick 'wprofic' not located for current context
Location: 'eval' script for Component 'WeaponBase' (Eval Script '#2') near line 11

I assume expression container.ishero doesn't fit in that place, so I tried other one that I've found (didn't work).
I don't know if should work in Tactical console at this point.
So what is wrong?
 
Beneath is my window from TC panel.
TC_prof_req.jpg
There where is underlined, on the end, I want to show stats for weapon (now it is just a template) and among them a proficiency for that weapon.
It can't be added or subtracted to any other stat because it is handled differently.
Also I've made some roll buttons which at least one of them would need to access that proficiency value
 
How are those numbers calculated? (give me the game rules for how they're calculated, not how you're doing it in Hero Lab).
 
Each weapon has its proficiency, like swords, staffs etc.
Proficiency bonus is just a number between -2 - +5.
It defines how many re-rolls you are allowed to do in a test, and that's it.
I didn't implemented re-rolls to my roll trigers but at least I would know how meny are they.
 
So the proficiencies are something that the user is adding to the character on a different table?

You need to establish a connection between each weapon and the proficiency that applies to that weapon, right?

Are proficiencies specific to each weapon - greatsword and longsword are separate proficiencies? Or are they for weapon classes - greatsword and longsword both use the swords proficiency?
 
So the proficiencies are something that the user is adding to the character on a different table?

Yes - just like skill but different table, different but similar component

You need to establish a connection between each weapon and the proficiency that applies to that weapon, right?

Yes, and I managed to fill that for most of weapons in the editor panel (it even shows a drop down menu)

Are proficiencies specific to each weapon - greatsword and longsword are separate proficiencies? Or are they for weapon classes - greatsword and longsword both use the swords proficiency?

There would be probably division for short and longswords, with some relations (like bonus for longswords is that from swords -1 if hero has no longsword proficiency) but right now just swords for all of them would be enough.
 
Could you post the entire eval script #2 in the WeaponBase component, please?

The error message you've posted says the error is on line 11, but you haven't posted any code that's at least 11 lines long, so I want to make sure of which error message we're fixing, and where in the code the error is.
 
Code:
<eval index="2" phase="Setup" priority="5000"><![CDATA[
		  ~container.parent.field[wpPiercing]
		  ~container.child[gCustMagic].field[gCustEquiv].value
		        ~doneif (container.parent.field[gIsEquip].value = 0)
				~#competencebonus[hero.childfound[kHide], 5]
					~if (linkage[defAttr1].field[attrBonus].value >= linkage[defAttr2].field[attrBonus].value) then
					~perform linkage[defAttr1].setfocus
					~perform linkage[LinkAttr].setfocus
  ~perform linkage[wprofic].field[prRoll].value
  	    if (container.ishero <> 0) then
        perform linkage[wprofic].pullidentity[Profic]
done
        endif
				~if (linkage[wprofic].field[prRoll].value <> 0) then
				 ~(field[wpPenalty].value >= 15)
				~endif
  ]]></eval>

Most of the code are comments, which I use to store some tests.
 
Back
Top