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