Skill Tree [Question]

This question is not related to any of the courses but I hope I can get an answer from the forum. How would you make a skill tree system like in the minecraft mod thaumcraft with the thauminomicon. Basically, you have a UI where you have “nodes”, or skills, that connect to each other. When you buy a skill, the connecting nodes to that skill will unlock. I’ve done a lot of research and cant find anything. :frowning_face: Here are some pics to show what type of skill tree I would like:


and

Please ask questions if you don’t understand fully what I’m asking. Thanks!

Hi,

In which course and lecture are you?

It’s not related to any of the courses. Am I aloud to post questions not related to the courses? :grimacing:

Sure, it is. I just don’t want to accidentally answer any questions regarding the RPG course because that’s @Marc_Carlyon’s domain.

What you need is a binary tree data structure, so you can store certain information in the parent object: the related UI object and whether the children are locked/unlocked.



https://introprogramming.info/tag/tree-data-structures/

1 Like

Hi :slight_smile:

As i dont actually have access to the prototype i cant say exactly whats coming in the new RPG.
The best person to ask on up coming content would be @Rick_Davidson or @sampattuzzi.

Those resources that Nina has posted should give you a good start though as i dont want to state something for it to be inaccurate or incorrect.

Although its a very good question!

Although I have a year or two of programming experience, it is a little bit confusing to me when the use <T> thing inside the code or the get; and set; properties but I hope I can sort those out. Do you know any good resources on learning the {get; set} attribute and the <T> thing that is put after almost every line of code, for example: public NTree<T> Parent { get; private set; } Thanks for the help so far. :+1:

T is the generic type parameter in C#. In your case, you don’t need a generic class as you probably won’t create another tree. If you do, use a generic class.

If you want to dive deeper into C#, I can recommend this free course by Bob Tabor:

2 Likes

Not something we’re planning to put in to keep the scope down.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms