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
modding:xml:itemtype [2012/08/11 22:35] gpmmodding:xml:itemtype [2017/09/26 05:19] (current) – link nms
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 120: Line 180:
  
 **gItem** is the item. **gItem** is the item.
 +
 +**aItemToReplace** is the item that will be removed.
  
 The event may return True to indicate that installation should proceed. Alternatively, it can return a text string, to indicate that installation has failed. The string is the text to display to the player explaining the reason for the failure. The event may return True to indicate that installation should proceed. Alternatively, it can return a text string, to indicate that installation has failed. The string is the text to display to the player explaining the reason for the failure.
Line 135: Line 197:
  
 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]]. 
-See: [[..:Shields devices]].+See: [[modding:xml:Shield_devices]].
  
 ===<GetName>=== ===<GetName>===
Line 144: Line 211:
   * 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 173: Line 238:
  
 ===<OnArmorDamage>=== ===<OnArmorDamage>===
-See: [[..:Armor items]].+See: [[modding:xml:Armor]].
  
 ===<OnDamageArmor>=== ===<OnDamageArmor>===
-See: [[..:Weapon devices]].+See: [[modding:xml:Weapon devices]].
  
 ===<OnDamageOverlay>=== ===<OnDamageOverlay>===
-See: [[..:Weapon devices]].+See: [[modding:xml:Weapon devices]].
  
 ===<OnDamageShields>=== ===<OnDamageShields>===
-See: [[..:Weapon devices]].+See: [[modding:xml:Weapon devices]]
 + 
 +===<OnDisable>=== 
 +The item was disabled. 
 + 
 +**gSource** is the object on which the item is installed. 
 + 
 +**gItem** is the item.
  
 ===<OnFireWeapon>=== ===<OnFireWeapon>===
-See: [[..:Weapon devices]].+See: [[modding:xml:Weapon devices]]
 + 
 +===<OnEnable>=== 
 +The item was enabled or installed on an object. 
 + 
 +**gSource** is the object on which the item is installed. 
 + 
 +**gItem** is the item.
  
 ===<OnInstall>=== ===<OnInstall>===
Line 195: Line 274:
  
 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.
 +
 +===<OnReactorOverload>===
 +An object's reactor overloaded.
 +
 +**gItem** is the item that has the event.
 +
 +**gSource** is the object on which the item is installed.
  
 ===<OnRefuel>=== ===<OnRefuel>===
Line 211: Line 314:
  
 ===<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 338:
  
 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.1344724548.txt.gz · Last modified: 2014/12/27 04:40 (external edit)