This is intended to use the vanilla team mechanic to find players within a set range to share experience from kills, if the option is enabled in the kill_entity experience source. team_shared_experience enables the feature when present, and configures the max distance in which to share experience between the attacking player and their teammates.
Experience is shared evenly between all team members in range (including the player who got the final blow), but provide a minimum of 1 xp to all eligible team members.
Additionally, added is_on_team as a supported predicate if a user wishes to leverage this in their operations or experience expression.
I opted to not change the parameters or logic around the anti_farming behavior, because there is likely no net gain for someone to alternate killing blows while in a team (and sharing the xp) vs normal xp gain while not in a team. The existing behavior should suffice.
This is intended to use the vanilla team mechanic to find players within a set range to share experience from kills, if the option is enabled in the
kill_entity
experience source.team_shared_experience
enables the feature when present, and configures the max distance in which to share experience between the attacking player and their teammates.Experience is shared evenly between all team members in range (including the player who got the final blow), but provide a minimum of 1 xp to all eligible team members.
Additionally, added
is_on_team
as a supported predicate if a user wishes to leverage this in their operations or experience expression.I opted to not change the parameters or logic around the
anti_farming
behavior, because there is likely no net gain for someone to alternate killing blows while in a team (and sharing the xp) vs normal xp gain while not in a team. The existing behavior should suffice.