Attributes - chaosforgeorg/jh-mods GitHub Wiki

  1. Attributes persist up through the parent entities to apply to either a weapon or a being, so if A is attached to B which is attached to C then C will get either the sum or the product of all attributes on A and B.
  2. The following attributes are multiplicative and the product is taken, all the rest are summed: experience_mult, medkit_mod, melee_guard_mod, move_time, multikit_mod, speed, splash_mod, use_time
  3. The total value of an attribute on entity, can be retrieved using the :attribute("attributename") or **:attribute("category", "attributename") **functions, e.g self:attribute("splash_mod") or who:attribute("resist", "ignite").
  4. To set the attribute value of an entity you can't call entity.attributes.attributeName = value, instead the syntax is self.attributes["attributeName"] = value, or self.attributes["attributeName.category"] = value; e.g. self:attribute["splash_mod"] = 0.25 or who:attribute["ignite.resist") = 50.
  5. Attributes are defined inside the C++ engine you can't arbitrarily define new ones. <- not sure if true