• 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

Maybe linkage is the wrong approach...

barrelv

Well-known member
I think I might have barked up th wrong tree, asking for advice.

The weapons in the system I'm coding are tied to skills, Pistols use the Pistol skill, Swords use the Melee skill, Poleaxe uses Great Weapon skill, etc.

I've linked the skills to the weapon thing, but the problem I'm running into is when someone buys a weapon for a skill they don't have. Then the system freaks out about the linked skill not existing. Here's the code it's choking on

Code:
    <!-- Calculate the net attack (MAT) value for the weapon -->
    <eval index="2" phase="Final" priority="7000" name="Calc wpNetAtk"><![CDATA[
      var skill as number
      skill = linkage[skill].field[trtUser].value
      field[wpNetAtk].value = skill + field[wpBonus].value + field[wpPenalty].value + #trait[attrPrw]
      ]]></eval>

Is there a way to do something similar to childfound with linked skills? In most languages, i'd use something like isNull, but I have no clue how to do this here. Do I need to re-write my weapons to maybe use tags for their related skill instead of a linked skill?
 
Shadowrun does use tags, rather than linkages for this sort of thing - tags are easier to change on the fly if some weapon is associated with a different skill when used in certain ways.
 
Back
Top