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

Experience Bars

UE5 Experience System Version: 1.0

    Experience Bar HUD Location

    By default the experience bar will show at the top of the screen, if you would like to change this to the bottom, or switch to the Micro HUD you will want to change the HUDLocation variable on the details panel of the component we attached to the player controller. Select the component then from the details panel navigate to Default > Experience System > HUD, the HUDLocation is a drop down and should be set to “Edge - Top”. You can also disable showing this HUD by setting the value of HUDLocation to null. You can learn more about the experience HUD in the UIs chapter of this documentation.

    Experience Bar Colors

    Experience bars are colored based on the color set for the experience type in the data table. Learn about these types and the data table in the experience type chapter of this documentation.

    Experience Bar Animation Speed

    The speed of the experience bar animation can be set on the AC_ExperienceSystem component, the ExpBarAnimationSpeed [float] variable. The value can be set between 0.01 and 1. Where higher number is fastest and 1 is instant (it is more efficient to disable the animate boolean then setting this value to 1, both will have the same visual result).

    To learn about all of the other UI related features of this system view the Experience System UIs chapter.

    Standard Experience Bar

    The traditional rectangle experience bar can be found in the UIs/ExperienceBars/ folder, the UI_ExperienceBar widget blueprint. You can embed this widget anywhere you want to show a traditional experience bar. The standard experience bar has the following options:

    Variables

    experienceType [name]

    The experience to track with this experience bar.

    heightOverride [float]

    The height (pixels) of the experience bar.

    showNotches? [bool]

    Set to true to show the notches every 10% on the experience bar.

    isFlat? [bool]

    Set to true to disable the gradient (light to dark) effect that appears on the experience bar. The end result is a more flat looking experience bar.

    barPadding [struct]

    Adjust the margin of the colored portion of the bar relative to the background of it.

    Animate? [bool]

    Set to true to animate the progress percentage changes (uses tick).

    UseBindings? [bool]

    Set to true to let this experience bar bind directly into the event dispatchers for experience change and level ups. Set to false if controlling the experience bar from a higher level (see the experience window for an example of this).

    showLockOnLocked? [bool]

    Set to true to show a lock icon above the experience bar when it is locked. Set to false if controlling it from a higher level (like the experience window).

    isPrimaryExperienceBar? [bool]

    Set to true if this is the main experience bar being shown to the player. This is the one that will change experience types when the player clicks on another experience bar (like inside the experience window).

    Callable Events

    changeExperienceType

    Call this event to change the experience type shown on this bar, expects experienceType [name] as an input.

    setPercent

    Call this event to change the current percentage of the experience bar, use this when you are not using the bindings.

    resetBar

    Resets the percentage of this bar to 0.

    resetForNextLevel

    Update the Level [int] variable which is used to track if the current level is not the max level, then resetBar.

    Tap in points via overrides

    There are a number of overrides you can tap into to add additional functionality to this experience bar. An example of this is the Edge HUD, which is just a child of this experience bar, with the added functionality of binding to the edge of the screen, this binding is performed through an override of the OnConstruct. The Edge HUD also overrides the OnClick event which changes the default functionality of changing the main experience type when clicked, to showing the experience window when clicked. The last override that is utilized by this Edge HUD is the OnReset, which is used to change its type back to its original starting type.

    onConstruct

    Called at the end of the construction event.

    onDestruct

    Called at the end of the destruct event.

    onBuild

    Called after the buildInterface function runs, which happens on load, when the type changes, and when an experience is locked or unlocked.

    onHover

    Called when the mouse moves over this experience bar

    onUnhover

    Called when the mouse leaves this experience bar

    onChangeExpType

    Called when the experience changes (before the rebuild).

    onReset

    Called whenever a reset event dispatcher is received.

    onSetPercent

    Called whenever the experience progress is successfully changed.

    onClick

    Called whenever this experience bar is clicked.

    Circular Experience Bar

    The circular experience bar (UI_ExperienceBarRadial) can be used as an alternative to the standard. While it does share some similarities it does have a different set of variables and functions differently so it is not a child of the base experience bar, but rather its own base. The events and tap in points are the same as the ones offered in the standard experience bar.

    Variables

    experienceType [name]

    The experience to track with this experience bar.

    Animate? [bool]

    Set to true to animate the progress percentage changes (uses tick).

    UseBindings? [bool]

    Set to true to let this experience bar bind directly into the event dispatchers for experience change and level ups. Set to false if controlling the experience bar from a higher level (see the experience window for an example of this).

    radialBarStartingPoint [float]

    The starting point for the experience bar, experience gains grow clockwise. 0.25 = Top, 0.50 = Left, 0.75 = Bottom, 1.0 = Right.

    radialBarThickness [float]

    A range from 0.01 to 0.5 that determines the thickness of the radial bar.

    barBackgroundColor [color]

    The background color of the bar, the foreground is set by the experience type (inside the data table).

    Events & Overrides

    The radial experience bar offers the same events and tap in points as the standard experience bar.