User Tools

Site Tools


modding:xml:itemtype

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
modding:xml:itemtype [2012/08/11 22:35] gpmmodding:xml:itemtype [2017/02/11 02:25] 0xabcdef
Line 112: Line 112:
 The <Names> structure is used to define a list of random names for the unknown type. The <Names> structure is used to define a list of random names for the unknown type.
  
 +=====Fields=====
 +====ItemStruct====
 +====ItemType====
 +  * averageCount
 +  * category
 +  * cost
 +  * description
 +  * deviceSlots
 +  * frequency
 +  * fuelCapacity
 +  * imageDesc
 +  * installCost
 +  * level
 +  * mass
 +  * name
 +  * reference
 +  * shortName
 +  * slotCategory
 +  * treasureValue
 +  * unknownType
 +  * useKey
 +=====Properties=====
 +====ItemStruct====
 +  * **category**
 +  * **charges**
 +  * **components**
 +  * **damaged** Applies to devices and armor segments only. Reduces the functionality and value of the item.
 +    * A damaged weapon has a 10% chance of firing normally, 60% chance of jamming, 20% chance of misfiring, and 10% chance of a damaging weapon chamber explosion.
 +    * Damaged shields have a 10% chance of absorbing only 75% of damage, leaving the armor underneath to take the remaining 25%. They have a 15% chance of taking double the adjusted damage. Additionally, every 10 ticks, there is a 5% chance that they may deplete themselves.
 +    * A damaged Armor segment has half as much hp when installed.
 +    * A damaged SolarDevice is half as effective as normal.
 +    * A damaged RepairerDevice does not work at all.
 +    * A damaged DriveDevice has 75% as much **maxSpeed**, 50% as much **thrust**, 30% greater **powerUse**, and cannot be inertialess.
 +    * A damaged ReactorDevice has 80% as much **maxPower** and **efficiency**
 +    * A damaged EnhancerDevice does not work at all.
 +    * A damaged CyberDeckDevice does not work at all.
 +  * **description**
 +  * **disrupted** Applies to devices and armor segments only. Same effect as **damaged**, but temporary.
 +  * **incCharges** Can only be set; increments the item's charges by the set amount.
 +  * **installed** Devices and armor segments only
 +  * **level**
 +  * **maxCharges**
 +  * **maxLevel** The maximum level that this item can have
 +  * **minLevel** The minimum level that this item can have
 +  * **massBonusPerCharge** The mass increase (in kg) when the item gains one charge
 +  * **valueBonusPerCharge** The value increase when the item gains one charge
 +  * **weaponTypes**
 +====ItemType====
 +  * category
 +  * components
 +  * currency
 +  * description
 +  * frequency
 +  * level
 +  * maxCharges
 +  * maxLevel
 +  * minLevel
 +  * massBonusPerCharge
 +  * valueBonusPerCharge
 +  * weaponTypes
 =====Events===== =====Events=====
  
Line 135: Line 195:
  
 Note that this event must not have any side-effects. In particular, you must not change gItem in this event. Note that this event must not have any side-effects. In particular, you must not change gItem in this event.
 +
 +===<GetDescription>===
 +**[apiVersion 14]** Use this event to dynamically compute the description of an item. The result is the description for the item.
 +
 +**gItem** is the item.
  
 ===<GetMaxHP>=== ===<GetMaxHP>===
-See: [[..:Armor items]]. +See: [[modding:xml:Armor_items]]. 
-See: [[..:Shields devices]].+See: [[modding:xml:Shields_devices]].
  
 ===<GetName>=== ===<GetName>===
Line 144: Line 209:
   * A string, representing the name of the item (use [[name syntax]] if necessary).   * A string, representing the name of the item (use [[name syntax]] if necessary).
   * A list, whose first element is the name of the item (use [[name syntax]] if necessary), and whose second element is an integer representing the [[name usage flags]].   * A list, whose first element is the name of the item (use [[name syntax]] if necessary), and whose second element is an integer representing the [[name usage flags]].
- 
-**gSource** is the object that carries the item. 
  
 **gItem** is the item. **gItem** is the item.
Line 176: Line 239:
  
 ===<OnDamageArmor>=== ===<OnDamageArmor>===
-See: [[..:Weapon devices]].+See: [[modding:xml:Weapon devices]].
  
 ===<OnDamageOverlay>=== ===<OnDamageOverlay>===
Line 195: Line 258:
  
 This event is called after the item is installed, but before bonuses and enhancements are computed (thus you may apply an enhancement). This event is called after the item is installed, but before bonuses and enhancements are computed (thus you may apply an enhancement).
 +
 +===<OnObjDestroyed>===
 +The object that the item is on was destroyed.
 +
 +  * **gSource** is the object on which the item was installed.
 +
 +  * **gItem** is the item
 +
 +  * **aObjDestroyed** is the object that was destroyed (generally the same as gSource).
 +
 +  * **aDestroyer** is the object that destroyed us.
 +
 +  * **aOrderGiver** is the object that ordered the destruction. Generally this is the same as **aDestroyer** but in the case of autons, this is the controller of the auton.
 +
 +  * **aWreckObj** if not **Nil** this is the wreck object that resulted from the destruction.
 +
 +  * **aDestroyReason** this is the destruction cause.
  
 ===<OnRefuel>=== ===<OnRefuel>===
Line 211: Line 291:
  
 ===<OnShieldDamage>=== ===<OnShieldDamage>===
-See: [[..:Shields devices]].+See: [[modding:xml:Shield devices]].
  
 ===<OnShieldDown>=== ===<OnShieldDown>===
-See: [[..:Shields devices]].+See: [[modding:xml:Shield devices]].
  
 ===<OnUninstall>=== ===<OnUninstall>===
Line 235: Line 315:
  
 Return to [[..:XML|Tags list]]. Return to [[..:XML|Tags list]].
- 
 =====Notes===== =====Notes=====
   * <OnFireWeapon> was introduced in RC4. In RC5, its return value was defined.   * <OnFireWeapon> was introduced in RC4. In RC5, its return value was defined.
modding/xml/itemtype.txt · Last modified: 2017/09/26 05:19 by nms