Multiplayer HEX TREE (Skill, Perk, Tech)
Unreal Engine 5 Tutorial
How to use?
All examples in "BP_HexTree_PlayerCharacter"
Hex Tree - supports multiplayer and singleplayer.
If you have a single player game, then it doesn't matter if the function is called from the server or from the client.
To get started, add a "BPAC_HexTree" component to your Player Character.
"BPAC_HexTree" has only one variable that you can set to "IsDebug". If false, then there will be no Print Strings.
Now bind the keys you need, my example:
Bind an event that is called when buying a hex.
For example: If the player bought "Teleport", then after calling the event, add your own function that will give the player the ability to teleport.
You also have an event available that is called after the component is fully initialized, use it to load all the player's skills.
Check if Perk, Skill, Tech is purchased, if so, then give these privileges.
Available functions
If you have a single player game, then it doesn't matter if the function is called from the server or from the client.
How to add and edit?
Open "EHex" and add a line with the name of your future perk
Open "EHexCategory" and add a line with the category name (the category name will be displayed in the tooltip)
Open "DT_HexTree" and add the line with the perk you added to "EHex"
Hex - name from EHex
Category - category from EHexCategory
Tree type - which tree belongs to (Perk, Skill, Tech)
Icon - icon
Descriptions - description (supports Multi-Line with Shift+Enter)
Price - price in points for opening this skill
Color - color from the color template (how to add instructions below)
Unlock Hexes - which hexes will be unlocked after purchase (opening)
Is Unlocked - unlocked by default or not
IsPurchased - purchased by default or not
Need To Unlock - how many times it needs to be unlocked for it to actually unlock (e.g. 4 perks can unlock your perk and they must all be purchased for that perk to unlock)
After filling in the table, open the widget you need "W_PerkTree" or "W_SkillTree" or "W_TechTree"
Use already added hexes, if you need more just copy the existing ones and paste
Set up a hex
Now you can move it simply by holding it with the left mouse button, the hex itself will automatically adjust to the location
If you need to move several at once, just select them
If you don't have enough space then click on "W_Perks_Trafaret" and increase it in settings and click Compile to make it level
In the same place, you can adjust the color of the background hexes or hide them completely by making them transparent.
To customize the background color, buttons, glasses
How to change text color and transparency on hover on toggle buttons?
How to add your color?
To add a color open EColors and add a line with the name of the color
Open DT_Colors and add your color template
FAQ
To change the default number of points, open "BPAC_HexTree" and the "TreePoints" variable.
Still have questions?
If you have any questions, please write to me by mail: myalreadyday@gmail.com