...
CARRIED (this one is implicit, if no <usage> is definied )
EMBEDDED - for all kinds of accessories (requires slot= and supports size= attributes)
IMPLANTED - for all bodyware (items costing essence)
Info |
---|
If no |
Items with variants
Variants are different versions of the same item. If an item has variants, it copies all attributes from the main item and allows you to override those attributes or even add new ones.
...
Now we have an item with a variant “cybereye” and one called “bodyware”. The <flag> line is specific to this case and flags the items to be subject to cost changes due to augmentation grades.
Variants can have attrdef
, usage
and flags
on their own. They also support the shortcuts like weapon
, armor
…
Dynamic Items: Choices and Formulas
Not all items are simple with static values. Often you have to make a decision (e.g. the rating) when adding the item and have values that depend on that decisions (like Cost = Rating * 100). This is where <choices> will help you.
...
Code Block | ||
---|---|---|
| ||
<item id="bow" price="100" type="WEAPON_RANGED" subtype="BOWS"> <choices> <choice uuid="adeb159c-6ca3-407b-8641-c76f9b29a49c" type="ITEM_ATTRIBUTE" ref="RATING" options="1,2,3,4,5,6,7,8,9,10,11,12,13,14"/> </choices> <requires> <valuereq type="ATTRIBUTE" ref="STRENGTH" min="$RATING"/> </requires> <modifications> <itemmod type="HOOK" ref="TOP"/> <itemmod type="HOOK" ref="UNDER"/> </modifications> <attrdef id="PRICE" value="$RATING*10 +100" /> <attrdef id="DAMAGE" value="$RATING/2 P" /> <attrdef id="ATTACK_RATING" value="$RATING/2,$RATING,$RATING/4,," /> <attrdef id="AVAILABILITY" value="$RATING/3 L" /> <weapon skill="athletics" spec="athletics/archery" /> </item> |
...
The application will ensure that decisions are made all present when an item is added to the character.
Dynamic table lookups
Sometimes values depending on a (rating) choice cannot be expressed in a formula.
...
In the example above, the essence can be expressed in a formula, but the other attributes cannot. For this case the attrdef
element has an optional table attribute, which is used after the value attribute has been calculated.
Code Block | ||
---|---|---|
| ||
<item id="cybereye" type="CYBERWARE" subtype="CYBER_EYEWARE">
<choices>
<choice uuid="fcc63c09-5af7-4f00-a2d9-d7c0972597d2" type="ITEM_ATTRIBUTE" ref="RATING" options="1,2,3,4,5"/>
</choices>
<usage mode="IMPLANTED"/>
<attrdef id="ESSENCECOST" value="$RATING*0.1" />
<attrdef id="PRICE" value="$RATING" table="1000,4000,6000,10000,16000"/>
<attrdef id="AVAILABILITY" value="$RATING" table="2,2,3,3,3"/>
<modifications>
<valmod type="HOOK" ref="CYBEREYE_IMPLANT" value="$RATING" table="1,4,8,12,16"/>
<embed type="GEAR" ref="image_link" intoType="HOOK" intoRef="INTERNAL" included="true"/>
</modifications>
</item> |
The $RATING has a range from 1-5. It is used to look up in the table and use that result instead.
Info |
---|
The result of the formula in the |
Note that the table can be used in the attrdef
element as well as in the valmod
modification element.