Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   weapon proficiency linkage (http://forums.wolflair.com/showthread.php?t=49204)

Gomo May 2nd, 2014 08:43 AM

weapon proficiency linkage
 
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.

Mathias 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.

Gomo 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>


Mathias 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?

Gomo 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?

Mathias May 2nd, 2014 09:47 AM

Please re-phrase that last question. I can't tell what you're trying to ask.

Gomo 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')
?

Mathias 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.

Gomo 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 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.


All times are GMT -8. The time now is 10:11 AM.

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