Skill Trees System

● ARCHIVED · READ-ONLY
Started by SomeFire 312 posts Page 14 of 16 View original ↗
  1. @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. :kaothx:
  2. Frostorm said:
    @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. :kaothx:
    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 ^^
  3. Oh right, duh...iconId refers to the icon sheet. lol:kaoswt:
  4. Eliaquim said:
    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
    Frostorm said:
    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? :guffaw: (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...
  5. ATT_Turan said:
    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? :guffaw: (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
  6. Frostorm said:
    But anyway, I'll try what you suggested, thx!
    Um...how did you "try it"?
  7. @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?...
  8. Try lvls[0]
  9. 1634260837575.png

    That did it, thanks!:kaojoy:

    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)
        }
  10. Frostorm said:
    View attachment 203883

    That did it, thanks!:kaojoy:

    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!! :D

    Have fun!!!
  11. 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.
  12. 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
  13. Hunters12 said:
    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.
  14. 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?)
  15. 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.
    ]);
  16. Hey is it possible to customize this plugin with luna engine
  17. 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?
  18. DestroyDX said:
    Hey is it possible to customize this plugin with luna engine
    I think no. I don't know how luna engine works.

    Seykken said:
    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.
  19. Hey, does reseting a skill tree reset the variables back to 0?
  20. gambitben said:
    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;