Experience System
Information on how the level up and experience for the player is implemented into the project.
UI
How the UI gets and displays Levels/Experience
Clock Experience
The clock experience display is fairly simple, it gets updated with a event dispatcher on the Award Subsystem. The function above can be found in RTP_ClockPettel. (This has slightly changed, its the same but it plays animations)
Level Display Widget
VE_LevelDisplay
Cursor Player
How the player works with and stores the Levels/Experience
Playing Exp and Levelup sounds
On begin play the player binds to the events on the Award Subsystem and plays the sounds when called
Add Experience Debug Key
The player has a debug key for giving yourself a xp point when you press "-"
Shop Items and Categorys
How shop wheel knows to display items based on Level
Simple Level check while adding entry's to the shop
This is located in the function "M_LoadCatalog" inside of "ShopWheelController" (Rather then getting the level from the player it now gets it from the Award Subsystem)
DataAssets
Where are the Experience parameters stored?
Animal Definition Data
When you set the Animal Level it will automatically update the experience each task will give you expect variants, variants remain 4 experience no matter the level of the pinata.
The values per level can be found in the C++ as arrays, they are 1 indexed so the first element is level one
These values I set are from Ici's research of the values in TIP but will likely need to be adjusted overtime for RTP
Heres an example of setting the level to 4, I didnt adjust the lower values they automatically got updated. However after setting the level you can adjust the lower values freely
Plant Definition Data
The Plant experience is fairly straightforward the player has to fully grow a plant to get the growth experience and the fertilize experience is equal to the growth experience. But do note that the plants have to be fertilized 3 times to get the experience for fertilizing.
The Grown Experience is all that needs to be changed, the fertilization experience is automatically calculated from the grown experience. These values where also studied by Ici from TIP
The tree data asset has special calculations for the Growth experience and fertilization experience, but in short it goes as follows:
Grown Experience is multiplied by 4 for trees
Fertilizer 3 is Grown Experience divided by 2
Fertilizer 2 is Fertilizer 3 divided by 2
Fertilizer 1 is Fertilizer 2 divided by 2 unless Fertilizer 2 is two in which case Fertilizer 1 is 2
Tree Definition Data
Grown Experience is multiplied by 4 for trees
Fertilizer 3 is Grown Experience divided by 2
Fertilizer 2 is Fertilizer 3 divided by 2
Fertilizer 1 is Fertilizer 2 divided by 2 unless Fertilizer 2 is two in which case Fertilizer 1 is 2
Award Subsytem
The controller for the experience and levelups, also has award storage
Blueprint functions
Adding Experience
The add experience function adds experience to the pending experience variable, the tick then moves one point at a time to the experience variable leveling up along the way, every 12 the clock will need to reset