Variants

When you look closely at the Shadowrun core rules, you find a lot of items that exist in variants, where the stats are different enough that it cannot be expressed using a rating. Some examples:

  • Bone Lacing comes in Plastic, Aluminium and Titanium

  • Low Light Vision exists as an accessory for cameras, contacts … or as a cybereye accessory or a bodyware for direct implant. The effect and name is the same in all cases, while availability and price differs.

  • Cyberarms come in Full, Half and Hand - each in obvious or synthetic quality.

Originally in Genesis each variant was modelled as a standalone item. This changed for Commlink.

Structure

<item id="main_id"> ... shared attributes or attributes for default item ... <variant id="variant_id_1"> .. attributes ... </variant> <variant id="variant_id_2"> .. attributes ... </variant> </item>

The code above defines an item with two optional variants. The user can choose a variant, but he doesn’t need to. Effectively the item comes in three versions (standard and 2 variants)

<item id="main_id" reqVariant="true"> ... shared attributes or attributes for default item ... <variant id="variant_id_1"> .. attributes ... </variant> <variant id="variant_id_2"> .. attributes ... </variant> </item>

The code above defines an item without a standard item and two variants, from which selecting one is mandatory.

Attributes

The order on which attributes are defined is

  1. Use shortcuts of the main item

  2. Use <attrdef> lines of the main item

  3. Use shortcuts of the variant

  4. Use <attrdef> lines of the variant

This means that attributes defined in a variant overwrite those of the main item. It also means that attributes shared in all variants can be defined in a main item.

Allowed elements in a variant

<variant id="mandatoryID" mode="" modonly=""> <usage /> <usage /> ... <attrdef /> <attrdef /> ... <flags> </flags> <alternate /> <alternate /> ... </variant>
  • mode provides an additional hint for Commlink how the variant shall be treated. Allowed values are:

    • NORMAL - Item is carried (or whatever is normal for the item)

    • EMBEDDED - Used as an accessory

    • BODYWARE - Directly implanted in the body

  • modonly means that the user cannot select the item - it may be only created by modifications.

I am not sure I will keep the mode attribute. It may be sufficient to work with <usage> instead, since they express the same.

Localization of variants

item.main_id=Cyberarm item.main_id.page= item.main_id.wifi= item.main_id.desc= item.main_id.variant.variant_id_1=Full-Arm, obvious item.main_id.variant.variant_id_1.page= item.main_id.variant.variant_id_1.desc= item.main_id.variant.variant_id_2= item.main_id.variant.variant_id_2.page= item.main_id.variant.variant_id_2.desc=

You don’t need to add .page or .desc versions - if they are not present, the main items data is used.

The name of a variant is usually the name of the main item with the variant name in brackets. E.g. “Cyberarm (Full-Arm, obvious)

Examples

Bone Lacing - different statted versions of the same item

<item id="bone_lacing" type="CYBERWARE" subtype="CYBER_BODYWARE" reqVariant="y"> <flags><flag>AUGMENTATION</flag></flags> <modifications> <itemmod type="RULE" ref="UNARMED_DAMAGE_IS_PHYSICAL" apply="CHARACTER"/> </modifications> <variant id="plastic"> <usage mode="IMPLANTED" value="0.5"/> <attrdef id="AVAILABILITY" value="3L"/> <attrdef id="PRICE" value="8000"/> <modifications> <valmod type="ATTRIBUTE" ref="RESIST_DAMAGE" value="1" apply="CHARACTER"/> <valmod type="ATTRIBUTE" ref="DEFENSE_RATING_PHYSICAL" value="1" apply="CHARACTER"/> <valmod type="ITEM_ATTRIBUTE" ref="DAMAGE" value="1" apply="UNARMED"/> <valmod type="ITEM_ATTRIBUTE" ref="ATTACK_RATING" value="1,,,," apply="UNARMED"/> </modifications> </variant> <variant id="aluminium"> <usage mode="IMPLANTED" value="1.0"/> <attrdef id="AVAILABILITY" value="4L"/> <attrdef id="PRICE" value="18000"/> <modifications> <valmod type="ATTRIBUTE" ref="RESIST_DAMAGE" value="2" apply="CHARACTER"/> <valmod type="ATTRIBUTE" ref="DEFENSE_RATING_PHYSICAL" value="1" apply="CHARACTER"/> <valmod type="ITEM_ATTRIBUTE" ref="DAMAGE" value="2" apply="UNARMED"/> <valmod type="ITEM_ATTRIBUTE" ref="ATTACK_RATING" value="2,,,," apply="UNARMED"/> </modifications> </variant> <variant id="titanium"> <usage mode="IMPLANTED" value="1.5"/> <attrdef id="AVAILABILITY" value="6L"/> <attrdef id="PRICE" value="30000"/> <modifications> <valmod type="ATTRIBUTE" ref="RESIST_DAMAGE" value="2" apply="CHARACTER"/> <valmod type="ATTRIBUTE" ref="DEFENSE_RATING_PHYSICAL" value="2" apply="CHARACTER"/> <valmod type="ITEM_ATTRIBUTE" ref="DAMAGE" value="2" apply="UNARMED"/> <valmod type="ITEM_ATTRIBUTE" ref="ATTACK_RATING" value="3,,,," apply="UNARMED"/> </modifications> </variant> </item>

Flare Compensation - exists as an optical accessory, as well as cyberware for capacity or karma

<item avail="1" price="250" id="flare_compensation" type="ACCESSORY" subtype="VISION_ENHANCEMENT"> <!-- main item: Visual enhancement --> <usage mode="EMBEDDED" slot="OPTICAL" value="1"/> <usage mode="EMBEDDED" slot="HELMET_ACCESSORY" value="1"/> <!-- Eyeware variants differ --> <variant id="cybereye"> <usage mode="EMBEDDED" slot="CYBEREYE_IMPLANT" value="1"/> <attrdef id="PRICE" value="1000"/> <attrdef id="AVAILABILITY" value="2"/> <flags><flag>AUGMENTATION</flag></flags> </variant> <variant id="bodyware" mode="BODYWARE"> <usage mode="IMPLANTED" /> <attrdef id="ITEMTYPE" value="CYBERWARE"/> <attrdef id="PRICE" value="1000"/> <attrdef id="AVAILABILITY" value="2"/> <attrdef id="ESSENCECOST" value="0.1"/> <flags><flag>AUGMENTATION</flag></flags> </variant> <modifications> <checkmod type="SKILL" ref="perception" value="1" what="EDGE" cond="true"/> </modifications> </item>