Jump to content

Created a skill tree mod


ZDoctor

Recommended Posts

Skill Trees Mod

J6DKoZA.png

Basic Player Info Page

 

Summary

The Skill Trees mod is a small mod that adds an easy way for modders to implement and add skill trees to their mod and aims to provide maximum customizability should the default look not suit your needs. This mod also provides methods for skill tree makers and other modders to check if certain skills are obtained. This mod does not add skills into the game itself. If you would like to be a part of a mod that will, check this post out. And post to the forum here .

 

Skills

By default, there are two types of skills and attribute skills. Attribute skills make it easy to affect the player's attributes. As long as the skill is active and the player has this skill, the player's stats will be changed (i.e. Double damage, natural armor, speed, etc). These changes can be viewed in the Player Info Tab (Note: this tab will show all modifiers currently affecting the player).

 

The base skill does not do anything much on its own but can be used as a requirement to do something (i.e. craft swords and other items, use certain tools and weapons, interact with mobs, etc). Modders can also choose to do something special when the skill is obtained or removed (give or take an item from player an item, code particle effects, etc). Skills can also be made to be togglable so that their effects aren't constant. A skill can also be made tickable, meaning you can have something happen every 20 ticks (1 second) the skill is active (night vision, underwater breathing, fire resistance, mana use, etc). Skills can also be linked to each other. So you can require having a certain skill before obtaining a more powerful skill or useful skill down the line. The skills can branch out into multiple trees... skill trees! A line will automatically be drawn between each connected skill.

 

Skill Points

By default, this mod does not add any items to the game that give the player skill points. However, it does provide methods for doing so in the API and a base Item.class called ItemSkillPoint that will give the player a number of skill points. How you want the player to get skill points is up to you!

 

Skill Trees

By default, you can view your skill trees by pressing 'k' (you can change this in settings). You'll be taken to the last viewed page or the Player Info Page. There are serval default backgrounds (the same as advancements) and an option to use your own.

 

You can discern several pieces of information at a glance: whether or not you have the skill, if you have the requirements to get a skill, if it is active, and the skills parents. If a skill does not have a lock on it, you have already obtained that skill. If a skill has an unlocked lock, it means you are able to buy it, while a skill with a locked lock means its locked. An inactive skill is grey and an active skill is orange. Connected skills are connected with a line (the line can go either way; you do not need to place skills from right to left, you can place them in any format). You can get more info about a skill by hovering over it. That will display its name, requirements, and description (all of these can be defined in the lang file). By default, unfulfilled requirements are displayed as red and fulfilled requirements are green, names of obtained skills are yellow and unobtained are white, and descriptions are white (these can be changed at creation).

 

To purchase a skill, simply click on it. The skill will become active once the skill is purchased. (Note: Once you click a skill, if you could have purchased it, you will!) If the skill is already purchased and the skill is togglable, then clicking it will toggle it instead. By default, skill trees are kept on death. You can change this in the config. (I have included my EasyConfig class in the mod, feel free to use it!).

 

Skill Requirements

Skill Requirements are very important because without them you would just be able to buy all the skills. There are 5 default requirements, but you can create your own easily by implementing ISkillRequirment. The first two added are the Name Requirement and Description Requirement. These two add names and the description to the Skill Tooltip and are automatically added and created for by default. There are a few methods to interact with them, but you will most likely not need them unless you are creating skills that act differently than the default. The next most common one is the parent requirement. This automatically created and added to the skill for you. The last two are Skill Point Requirement and Level Requirement. Ther former requires a certain number of skills points that are consumed when purchased, and the latter is the same but for levels.

 

Commands

This mod adds commands to interact with the skill tree. Currently, there are 4: reset, addPoints, give and remove. Type "/sk" for usage. Most arguments can be tabbed completed.

 

Server Compatability

This mod should be fully server compatible and has been tested. If any bugs are found please report them to the GitHub below.

 

Download

You can download it at curse here and visit the forum here

 

Creating a Skill Tree

For Documentation and an example Skill Tree and the soruce, visit the Github here.

 

Example Skill Trees

Q6RS75D.png

 

  • Like 1
Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I was just trying to play my modded world when i randomly got this crash for no reason. I sorted through like every mod and eventually I realized it was LLibrary but I can't seem to find a solution to fix the crashing. I can't lose the world that I have that uses this mod please help me. Here's the report: https://pastebin.com/0D00B79i If anyone has a solution please let me know.  
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Ligawin88 adalah bocoran slot rekomendasi gacor dari Ligawin88 yang bisa anda temukan di SLOT Ligawin88. Situs SLOT Ligawin88 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Ligawin88 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Ligawin88 merupakan SLOT Ligawin88 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Ligawin88. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Ligawin88 hari ini yang telah disediakan SLOT Ligawin88. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Ligawin88 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Ligawin88 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Ligawin88 di link SLOT Ligawin88.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑   Daftar Slot Asusslot adalah bocoran slot rekomendasi gacor dari Asusslot yang bisa anda temukan di SLOT Asusslot. Situs SLOT Asusslot hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Asusslot terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Asusslot merupakan SLOT Asusslot hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Asusslot. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Asusslot hari ini yang telah disediakan SLOT Asusslot. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Asusslot terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Asusslot terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Asusslot di link SLOT Asusslot.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Galeri555 adalah bocoran slot rekomendasi gacor dari Galeri555 yang bisa anda temukan di SLOT Galeri555. Situs SLOT Galeri555 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Galeri555 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Galeri555 merupakan SLOT Galeri555 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Galeri555. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Galeri555 hari ini yang telah disediakan SLOT Galeri555. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Galeri555 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Galeri555 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Galeri555 di link SLOT Galeri555.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Daftar Slot Kocok303 adalah bocoran slot rekomendasi gacor dari Kocok303 yang bisa anda temukan di SLOT Kocok303. Situs SLOT Kocok303 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Kocok303 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Kocok303 merupakan SLOT Kocok303 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Kocok303. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Kocok303 hari ini yang telah disediakan SLOT Kocok303. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Kocok303 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Kocok303 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Kocok303 di link SLOT Kocok303.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.