Skill Trees System

● ARCHIVED · READ-ONLY
Started by SomeFire 312 posts Page 13 of 16 View original ↗
  1. SomeFire said:
    Do you use JP for a tree in 'SkillTreesSystem.class2trees'? Because job points belong to a specific class, which means tree must belong to the same class too. Actor tree can't have class because it belongs to an actor, not to a class.
    It is actorTree... Thanks. I will look into it :)

    So i just have to change it to classTree and it should work?

    regards Afaryz

    EDIT:

    It is working. Thank you alot. Maybe should be a comment for that in the description. (or did I overread it?)

    : )
  2. Error says it is not class tree. I'll add a more informative description.
  3. Hi @SomeFire . This is a terrific plugin.

    Have you thought about combining this with a plugin that adds skill levels, e.g. Yanfly's Skill Mastery Levels (YEP)?

    This way, for example, if a skill has 100 levels, instead of 100 database entries for the skill, you just need one.
  4. No, I didn't thought about it. I think this combination can be achieved by additional onLearn action, which will set Skill Mastery Level to current skill level.
  5. Heyo first of all thank you so much for this wonderful script, a one of a kind for MV.
    What you did here is crazy good :kaojoy:

    My game is using Luna Engine which changes the default UI scenes and I have a small issue with your plugin, basically the skill selection highlight is working vertically instead of horizontally, you can see what I mean in this short clip where I'm press the left key but the selection is going down instead, yet it still works and I can purchase the skills which makes me think it's probably just some UI parameters with the tree window itself that is not compatible with Luna, would you have any idea where I could look inside your code that possibly touches on this subject so I could fix this issue?

    Once again, thank you so much for the work you've done so far!
  6. Hi!

    Search for `Skills_Window.prototype.cursorDown/Up/Left/Right` functions inside SkillTreesSystem.js.
  7. SomeFire said:
    Hi!

    Search for `Skills_Window.prototype.cursorDown/Up/Left/Right` functions inside SkillTreesSystem.js.
    I ended up switching over to MOG's plugins instead of Luna Engine, which brings me to another small little issue, is there a way to disable the "X points earned" message after a battle?

    I'm trying to setup a custom victory screen but that message on the bottom left gets in the way. :kaocry:
    image
    xtvUnkw.png
  8. Sure, delete or override `Game_Actor.prototype.displayLevelUp` function.
    JavaScript:
    SkillTreesSystem.gameActorDisplayLevelUp = Game_Actor.prototype.displayLevelUp;
    Game_Actor.prototype.displayLevelUp = function(newSkills) {
        SkillTreesSystem.gameActorDisplayLevelUp.call(this, newSkills);
    
        if (SkillTreesSystem.pointsPerLevel > 0 && !SkillTreesSystem.useJP())
            $gameMessage.add(SkillTreesSystem.pointsPerLevel + " " + SkillTreesSystem._earnPointsText);
    };
  9. Hi!I‘m using this plugin on my project, it is so cool and i have a question.
    All the skills are always shown on the tree, and I want to know if there is a way to make the skills and arrows which are not learned hidden.I mean, at the first,all the skills are hidden except the prime skill. If one skill is learned, the related skills and arrows can be shown,but the skills on the next row are stills hidden unless the upper skill is learned. i think this can make the skill system more interesting and mysterious.
  10. Hi! No, this feature is not implemented. I think players will search for character builds in internet, so this feature is useless while trees are constant.
  11. Hi there, this is a bit of a strange question but is it possible to have a partywide skilltree or draw a skilltree scene directly from a dummy actor that is not in the party?
  12. Hi, no and no.The easiest thing you can do is to add tree for one actor and create OnLearnAction affecting all other actors. If you want more, then you must edit plugin code, but this requires more programming skills.
  13. Hey again! Is there a way to store unspent talent points into a variable?
  14. Yes, you can set variable inside event as script `actor.getTreesPoints()` where actor is Game_Actor object. There is several ways to get actor in script, use a way you want. For example, in demo I use `$gameActors.actor(1).getTreesPoints()` script, which takes first actor from all actors.
  15. Thank you so much <3
  16. Hi~Thanks for your answer! And i wonder how to control the pellucidity of the unlearned skill icon, i want to make the icons daker.
  17. Look for this code in SkillTreesSystem.js:
    Code:
    Skills_Window.prototype.drawItem = function(treeObj, index) {
        ...
        this.changePaintOpacity(treeObj.isEnabled(this._actor, this._tree));
        this.drawIcon(treeObj.iconId(), x, y);
  18. vorfeed said:
    Hi~Thanks for your answer! And i wonder how to control the pellucidity of the unlearned skill icon, i want to make the icons daker.
    SomeFire said:
    Look for this code in SkillTreesSystem.js:
    Code:
    Skills_Window.prototype.drawItem = function(treeObj, index) {
        ...
        this.changePaintOpacity(treeObj.isEnabled(this._actor, this._tree));
        this.drawIcon(treeObj.iconId(), x, y);
    I'd like to make the unlearned skill icons darker as well. I looked for the code shown above, but I'm not sure what to change to make the icon more grayed out. Thx

    Edit: I looked for the changePaintOpacity() function within rpg_windows.js and quickly found it on lines 243-252. So I changed the following from this...
    JavaScript:
    Window_Base.prototype.translucentOpacity = function() {
        return 170;
    };
    ...to this...
    JavaScript:
    Window_Base.prototype.translucentOpacity = function() {
        return 127;
    };
    (you can return any value you wish, 0-255)

    Of course, the changePaintOpacity() function merely changes the level of transparency. Ideally, I would love to have it so the unlearned skills are in grayscale instead of changing the opacity. Is there a filter/function for such a thing?
  19. I do not know how, but this code draws icon. If you'l find out how, you can do it here. May be there is a tint attribute or function for "contents" or image. May be there is a way to apply a mask on texture. I can't help with this task.
  20. Frostorm said:
    I'd like to make the unlearned skill icons darker as well. I looked for the code shown above, but I'm not sure what to change to make the icon more grayed out. Thx

    Edit: I looked for the changePaintOpacity() function within rpg_windows.js and quickly found it on lines 243-252. So I changed the following from this...
    JavaScript:
    Window_Base.prototype.translucentOpacity = function() {
        return 170;
    };
    ...to this...
    JavaScript:
    Window_Base.prototype.translucentOpacity = function() {
        return 127;
    };
    (you can return any value you wish, 0-255)

    Of course, the changePaintOpacity() function merely changes the level of transparency. Ideally, I would love to have it so the unlearned skills are in grayscale instead of changing the opacity. Is there a filter/function for such a thing?
    Hi there!

    As I said to you on the other thread. The simple way is creating another iconset image, all gray(And that is pretty simple to do. Just take your current Icon Set image, open with any image editor, gray everything, and save with a different name).

    After that is just add/replace this into the code:

    JavaScript:
    Skills_Window.prototype.drawItem = function(treeObj, index) {
        let x = this.itemWidth() * (index % SkillTreesSystem.skillWindowMaxCols) - this._scrollX;
        let y = this.itemHeight() * Math.floor(index / SkillTreesSystem.skillWindowMaxCols) - this._scrollY;
    
        this.changePaintOpacity(treeObj.isEnabled(this._actor, this._tree));
        
        if(this._actor.isLearnedSkill(SKILL ID)){
            this.drawIcon(treeObj.iconId(), x, y);
        }else{
            this.drawIconGray(treeObj.iconId(), x, y)
        }
        
        this.changePaintOpacity(1);
    
        if (treeObj instanceof Skill) {
            let size = this.contents.fontSize;
            this.contents.fontSize = this.itemHeight() / 3;
    
            if (treeObj.currentLevel() === treeObj.maxLevel())
                var text = SkillTreesSystem._maxedSkillText;
            else
                text = treeObj.currentLevel() + "/" + treeObj.maxLevel();
    
            this.drawText(
                text,
                x + 2,
                y + this.itemHeight() / 4 + SkillTreesSystem._maxedSkillTextYPosition,
                this.itemWidth() - 4,
                'center'
            );
    
            this.contents.fontSize = size;
        }
    };
    
    Skills_Window.prototype.drawIconGray = function(iconIndex, x, y) {
        let bitmap = ImageManager.loadSystem('IconSet_gray'); // Name of the gray iconset
        let pw = Window_Base._iconWidth;
        let ph = Window_Base._iconHeight;
        let sx = iconIndex % 16 * pw;
        let sy = Math.floor(iconIndex / 16) * ph;
        this.contents.blt(bitmap, sx, sy, pw, ph, x, y, pw * SkillTreesSystem.skillScale, ph * SkillTreesSystem.skillScale);
    };

    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.