Member
Join Date: Apr 2014
Posts: 50
|
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 Code:
Linkage pick 'attribute' not located for current context Location: 'field calculate' script for Field 'prRoll' near line 5 I have also error when I have such line: Code:
<linkage linkage="attribute" optional="yes"/> Code:
File: traits.str (line 351) - Linkage - Duplicate record encountered ('attribute') Code:
<linkage linkage="Profic" optional="yes"/> 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. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.
|
#2 |
Member
Join Date: Apr 2014
Posts: 50
|
351 line is:
Code:
<linkage linkage="Profic" optional="yes"/> 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> |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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? |
#4 |
Member
Join Date: Apr 2014
Posts: 50
|
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? |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Please re-phrase that last question. I can't tell what you're trying to ask.
|
#6 |
Member
Join Date: Apr 2014
Posts: 50
|
Why when I was using line
Code:
<linkage linkage="attribute" optional="yes"/> Code:
Linkage - Duplicate record encountered ('attribute') |
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#8 |
Member
Join Date: Apr 2014
Posts: 50
|
Ok, that is what I was suspected just wasn't sure, just thought I had to set it up in different place maybe.
|
#9 |
Member
Join Date: Apr 2014
Posts: 50
|
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"/> Code:
<eval index="2" phase="Setup" priority="5000"><![CDATA[ perform linkage[wprofic].pullidentity[Profic] ]]></eval> Code:
<link linkage="wprofic" thing="prSwords"/> Code:
<inputthing name="Proficiency" helptext="Select the attribute used to calculate the dice pool for this skill."> <it_linkage compset="Profic" linkage="wprofic"/> 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 Code:
perform linkage[wprofic].pullidentity[Profic] So, what I am missing? Thanks in advance. |
#10 |
|
|