Open jdrueckert opened 1 year ago
This goes beyond the task of updating the module docs here, but I believe this is the best place to drop my notes:
Binary "health" system to allow for entities to be destroyed.
Damage types are defined as prefabs.
The minimal definition is a prefab with the empty object {}
.
Components commonly found in damage type prefabs include:
BlockDamageModifierComponent
DamageSoundComponent
In the engine, the following damage types are defined:
directDamage.prefab
physicalDamage.prefab
explosiveDamage.prefab
drowningDamage.prefab
healingDamage.prefab
supportRemovedDamage.prefab
A subset of these damage types is part of the EngineDamageTypes
enumeration:
From these 6 damage types, only 2 damage types are used or referenced in the engine itself.
git grep -e PHYSICAL --or -e engine:physicalDamage \
-- ':!engine/src/main/java/org/terasology/engine/logic/health/EngineDamageTypes.java'
CharacterSystem.java
)itemBase.prefab
)explosiveDamage.prefab
)BlockStructuralSupportSystem.java
)SideBlockSupportRequired.java
)I propose to:
EngineDamageTypes
enum.
Context
The
Health
module doc mentions theDamageResistComponent
that allows configuring damage types an entity will not be damaged by. Most basic damage types are provided by the Terasology engine code base. There is a minor note on damage types in the Asset System Tutorial. Like all other prefabs, damage types can be modified on module level using Deltas & Overrides. New damage types can further be provided as module assets.Task
Extend the module docs with information on how to add more damage types.
Open Questions
Should this information be in module-level docs or rather in the engine wiki and only linked to in the
Health
module docs?