Open Reneator opened 4 years ago
Aside from adding an optional locking system, I feel like it'd have to be up to the user to decide what specific functionality they need. I'm loving this base you've made! It's really helpful. Do you have any social media with which I can show you me expanding upon it?
Hey mate! Thanks for sharing!
Its nothing official, but i have a twitter-handle: @Ronnyism
The code of this repository is now a bit old and i might need to refactor/change some parts to make it more reusable.
Added the multiple previous-nodes logic (now there is an array you can define multiple nodes). This is also controlled by a selection of "previous_nodes_type" ALL or ANY which will define if only one previuos node has to be learned or ALL.
Also added a Talent-row logic + max_talent_row_selections
Edit: Also Added Line as Scene.
I might separrate this ticket into multiple ones depending on topic. Right now this is mainly to keep notes:
As this skill-tree could be used for other things, like "weapon-leveling" "crafting-recipe-tree" "weapon-upgrade-tree" i would try to keep it generalized in a certain way. For this i have an idea to enable multiple nodes connections and the way i can define those:
A node can have a cost (which has to be paid on skilling):
(done) ~~
A node can have multiple predecessors, for which he can set up how the requirements work:
(solved by talent-rows)
This can work by having to maybe define a number of the "previous_nodes_required" or something like that.
I could do this,k by enabling the player to to define another skill-tree-node in the inspector, which would then get locked as this node gets leveled. I could also do this in a way, that it would cascade down the path and lock up all the other nodes as well.
optionals: A node can have the cost of the previous node or node's object: for example a weapon_upgrade-tree might require the weapon of the lower tier as a cost (as in consume it). Or maybe there is a simpler solution to it, by having the user define the item as part of the cost directly/by hand.
Maybe also have a locking-preview