UE5 Experience System
This page is part of the documentaiton for my UE5 Experience System

Add Experience Points

UE5 Experience System Version: 1.0

    Add player experience

    To add player experience to a single experience type simply call the AddExperience event. This event has a Name input called ExperienceType. This should be a reference to the row name for the experience type in your data table. The float value amount is the amount of experience to add to the player. This value should be the base amount. Multipliers will be applied to this base amount to come up with the final amount that is applied to the player.

    Bulk add different experiences with different amounts

    Use the AddExperienceBulk to add multiple experiences at one time. The input on this function is a map, the keys in this map should be your experience types, and the values are the base amount of experience to add. The system will iterate through and call the AddExperience event for each one. Most of the examples in the demo world reward multiple experience types, and this is the event that is used to handle that. Review the example player controller BP_ExperienceExamplePlayerController found at the base of the Demo/ folder to see how I am using this event to award endurance and jumping experience at the same time whenever the player jumps.

    Share experience in Multiplayer Games

    For multiplayer games you can also use the AddExperienceShared event, which functions similar to the AddExperienceBulk method but has the added feature that lets you distribute additional experience to all other connected players. In addition to the Experience map input you also have a float called AwardOthersMultiplier. If you leave this to 1 the other players will receive the same amount as the player who instigated it (typically the player who got the last hit/kill). If you set this to a value between 0 and 1 the other players will receive only a fraction of the experience as the instigator (this value multiplied by the base experience awarded to the instigator). If you set this value above 1 the other players will receive more than the player who instigated the event.

    This solution is healer friendly, and does not require all players to hit the target. By default this event will iterate through the players array on the game state to try and award the experience, if you need to change this (like to limit to a party system) you will want to review the handleExperienceChangeShared function inside the AC_ExperienceSystem component.
    Timmy The demo world uses this shared experience event inside the Demo/MapHelpers/BP_MovingTarget blueprint. This AddExperienceShared event is triggered when you knock out one of the robots in the demo world, and awards the other players 50% of the base experience amounts. In this example both level & combat experience are shared with all other players, but weapon experience is only awarded to the player who instigated the request.