Skill Trees System

@Eliaquim Awesome! Regarding the SKILL ID, I'm thinking it's got to do w/ treeObj.iconId()...
@SomeFire Given the code above, would you have any insight into this?

Thanks a bunch btw! I wasn't expecting a solution so quickly. 🙏
@Eliaquim Awesome! Regarding the SKILL ID, I'm thinking it's got to do w/ treeObj.iconId()...
@SomeFire Given the code above, would you have any insight into this?

Thanks a bunch btw! I wasn't expecting a solution so quickly. 🙏
I think the treeObj.iconId() refers to the icon id that it will draw.
I could find a skill id that is using this icon in code. But that can lead to other problems if you have skills with the same icon id, or event if the treeObj.iconId() does not refer to the skill Icon id, and instead, just an icon id for visual purposes on the tree system.
So I guess is best to wait an answer from the author ^^
Oh right, duh...iconId refers to the icon sheet. lol😅
The problem was that I did not find a way(or didn't understand how) to get the skill Id that was currently being drawn. The code above will work if we just found a way to know this.
So it's in Skills_Window.prototype.drawItem starting on line 767 (772 draws the icon). Reading through the Skill class in the config file, it looks like you should be able to do $dataSkills[treeObj.lvls[index]].id
SomeFire Given the code above, would you have any insight into this?
It seems odd that you would ask - he wrote a random post saying "Maybe you can do this but maybe you can't, and I can't help." What makes you think he would have any insight? 🤣 (I really don't mean this to be mean, but it was a strange post that didn't seem to say anything except "I don't know")
edit: I see looking back that he's the original freaking author, so obviously he would know how to identify the skill ID...
It seems odd that you would ask - he wrote a random post saying "Maybe you can do this but maybe you can't, and I can't help." What makes you think he would have any insight? 🤣 (I really don't mean this to be mean, but it was a strange post that didn't seem to say anything except "I don't know")
Well, that was in response to a proposed filter or overlay of some sort. This is an entirely different approach via a separate png file. But anyway, I'll try what you suggested, thx!

Edit: Bummer...tho I'm sure we're on the right track!
1634257624656.png
But anyway, I'll try what you suggested, thx!
Um...how did you "try it"?
@ATT_Turan
JavaScript:
    if(this._actor.isLearnedSkill($dataSkills[treeObj.lvls[index]].id)){
        this.drawIcon(treeObj.iconId(), x, y);
    }else{
        this.drawIconGray(treeObj.iconId(), x, y)
    }
Did I do it wrong?...
Try lvls[0]
1634260837575.png


That did it, thanks!😂

Edit: Hmm, now that I'm playing around w/ it...I think it would look/feel even better if instead of "if skill x is learned", the condition should be "if skill x is learnable". Something like:
if (skill.isAvailableToLearn(this._actor, this._tree))

Edit2: Of course it didn't work lol, oh wells. XD

Edit3: Solution! if (this._tree.skills[index].isAvailableToLearn(this._actor, this._tree)) {

Edit4: Ooh, I actually need to combine both conditions to get it how I want. Like so...
JavaScript:
    if (this._tree.skills[index].isAvailableToLearn(this._actor, this._tree) || this._actor.isLearnedSkill($dataSkills[treeObj.lvls[0]].id)) {
        this.drawIcon(treeObj.iconId(), x, y);
    } else {
        this.drawIconGray(treeObj.iconId(), x, y)
    }
View attachment 203883

That did it, thanks!😂

Edit: Hmm, now that I'm playing around w/ it...I think it would look/feel even better if instead of "if skill x is learned", the condition should be "if skill x is learnable". Something like:
if (skill.isAvailableToLearn(this._actor, this._tree))

Edit2: Of course it didn't work lol, oh wells. XD

Edit3: Solution! if (this._tree.skills[index].isAvailableToLearn(this._actor, this._tree)) {

Edit4: Ooh, I actually need to combine both conditions to get it how I want. Like so...
JavaScript:
    if (this._tree.skills[index].isAvailableToLearn(this._actor, this._tree) || this._actor.isLearnedSkill($dataSkills[treeObj.lvls[0]].id)) {
        this.drawIcon(treeObj.iconId(), x, y);
    } else {
        this.drawIconGray(treeObj.iconId(), x, y)
    }
Nice you got it working!! 😀

Have fun!!!
Wow, incredible discussion in this thread! Good job guys!

The only thing I can suggest is
Code:
    if (treeObj.isEnabled(this._actor, this._tree)) {
        this.drawIcon(treeObj.iconId(), x, y);
    } else {
        this.drawIconGray(treeObj.iconId(), x, y)
    }
Thus, an unfinished skill will not be grayed out if the actor does not have enough job points to learn skill. On the screenshot you can see bright 1/5, but 2/5 will be gray with 0 JP.

Also, changePaintOpacity code is redundant in this way. I used opacity to differ available skills from unavailable, but you do it by coloring.
Any idea how to change opacity to 0 or make transparent for Scene_SkillTrees only ?
its seem Scene_SkillTrees and Scene_Menu combine together.

1636596843308.png

When I change opacity for Scene_Menu it work, but it make Scene_Menu become transparent

1636597437669.png


Already try using SRD plugins, but still the opacity not changed
1636597553800.png
its seem Scene_SkillTrees and Scene_Menu combine together.
Bug.

In SkillTreesSystem.js replace
Code:
Scene_SkillTrees.prototype.constructor = Scene_Menu;
by
Code:
Scene_SkillTrees.prototype.constructor = Scene_SkillTrees;
It will solve your issue.
Dunno if this has already been asked, but is there a way to have multiple squares affecting different parts of the same skill?

Basically, something like this?
1637392750345.png


(preferably without using a yanfly plugin?)
No, there is noithing similar in my plugin. The current logic: when the skill level increases, the previous database skill is removed and a new one is given.

The easiest way to implement such behaviour is to make "Fortify" depending on game variables. Change game variables in skill upgrades. To change them use OnLearnChangeVariable as OnLearnActions like in example:
Code:
guard2 = skill('guard2', [2], [
    [cost(1), switchReq(1)], // Requires switch 1 to be true.
], [
    [changeVar(1, 2)] // On learn action, which increase the game variable 1 by 2.
]);
Hey is it possible to customize this plugin with luna engine
Hello SomeFire!
I don't remember if it was asked before (i was away from creating for some time), but how do i remove skill points from one class's tree?
I tried the following: "actor.addTreesPoints(-10, 11);", but this command didn't do anything....
I am doing something wrong?
Hey is it possible to customize this plugin with luna engine
I think no. I don't know how luna engine works.

Hello SomeFire!
I don't remember if it was asked before (i was away from creating for some time), but how do i remove skill points from one class's tree?
I tried the following: "actor.addTreesPoints(-10, 11);", but this command didn't do anything....
I am doing something wrong?
11 is a class number? You should use treeId (symbol) instead of class number.
Hey, does reseting a skill tree reset the variables back to 0?
Hey, does reseting a skill tree reset the variables back to 0?
No, it works only for points in "Cost" requirement.
If you want to implement it, you can do it in SkillTreesSystem.js
Code:
SkillTreesSystem.resetSkillTree = function(actor, tree) {
like points
Code:
if (req.type === "points")
    points += req.price;

Original thread: https://forums.rpgmakerweb.com/threads/skill-trees-system.100429/