Hello,
We’re working on a multiplayer project with the GAS and we want to implement a localized damage system. Each body part should have its own health and be individually affected by gameplay effects (e.g. poison affects the chest, neurotoxin affects head, fall damage hits the legs), like in Deus Ex or Fallout NV.
Concretely, we want our Health Component (shared by all entities in the game) to configure body parts through Data Assets, then expose a function like: TakeDamage(BodyPartTag, DamageAmount) to be used by various other components (fall damage, weapons, etc.).
We’re struggling to figure out how to cleanly model and route body part data:
-
The ASC does not support multiple Attribute Sets of the same type, so we can’t have one per body part;
-
An Attribute Set cannot contain maps or arrays, so we can’t index body part data this way from the component;
-
Hard-coding body part sets in one or multiple attribute sets would require branching logic in the component and knowledge of all possible body parts, which we want to avoid;
-
We could pass a gameplay tag as parameter to damage gameplay effects, then map tag → attribute data in the attribute set’s post effect callback. This should work, but I’m not sure if it’s a good idea;
-
Store and replicate health in the component instead of GAS and use gameplay effects to mutate the component.
Does anyone know the idiomatic way to achieve what we want? We can get it to work somehow, but I’d like to know the best way. Looking forward to your opinions!