Template:LSL Constants/Custom Damage Types/doc

From Second Life Wiki
Jump to navigation Jump to search

Custom damage types are in blocks of 100 per Creator and/or System to avoid overlaps.

It is recommended to use simple words for the damage type and the description should describe the intent. Someone might want to use your damage type in their scripts or it could even be used in third party HUDs that may need to describe your damage to a reader. E.g. for DAMAGE_TYPE_CRUSHING from an object named "water" you could code a PvP Reporting HUD to tell the (user) was (crushed) by (water).

The subtype column exists for custom damage types because native damage types are fairly broadly encompassing. DAMAGE_TYPE_PIERCING for example covers any type of a sharp, piercing damage: Bullet, shell, thrown knife, spear, sword, arrow, etc. Rather than say for example bullets vs armor-piercing bullets -- the damage types in a community exist across many genres and themes.

This is why subtypes help explore deeper branches of damage types that might be necessary and also helps health/armor systems generalise custom types (for resistances or weaknesses) to a common damage type, while allowing specialised types to have special behaviors. A hacking type of damage type could be subtype of electrical, allowing special behavior to interfere with the avatar, damageable equipment or vehicle such as temporarily shutting down or changing Foe/Friend, etc.

Need wiki editing access? Email letmein@lindenlab.com with a polite email requesting access.