Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 2nd, 2014, 08:43 AM
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.
Gomo is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 2nd, 2014, 09:16 AM
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.
Mathias is online now   #2 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 2nd, 2014, 09:22 AM
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>
Gomo is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 2nd, 2014, 09:40 AM
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?
Mathias is online now   #4 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 2nd, 2014, 09:46 AM
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?
Gomo is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 2nd, 2014, 09:47 AM
Please re-phrase that last question. I can't tell what you're trying to ask.
Mathias is online now   #6 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 2nd, 2014, 09:54 AM
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')
?
Gomo is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 2nd, 2014, 10:05 AM
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.
Mathias is online now   #8 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 2nd, 2014, 10:14 AM
Ok, that is what I was suspected just wasn't sure, just thought I had to set it up in different place maybe.
Gomo is offline   #9 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 2nd, 2014, 02:20 PM
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.
Gomo is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:17 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.