Skill Trees System

● ARCHIVED · READ-ONLY
Started by SomeFire 312 posts Page 11 of 16 View original ↗
  1. @Andyest, I made fix. It was easier than I though. You can take last changes here.
  2. SomeFire said:
    @Andyest, I made fix. It was easier than I though. You can take last changes here.
    Programmers are really the best community. :)
    Thanks a lot!
  3. This plugin fantastic enough right now.
    But, It would be even more AWESOME if some functions were added.

    Because skill description truncated.
    It's a little shorter than the actual description.

    Maybe.. skill description directly with Java
    or Line wrap/word wrap.
    or changed Font size?

    I hope these functions will be updated in the future.
  4. @SomeFire Hey, it's been a while... I was wondering what I would need to edit in order to move this text down a few pixels?: (the words "MAX" and "0/1" is what I mean)
    1609134187414.png
  5. Frostorm said:
    @SomeFire Hey, it's been a while... I was wondering what I would need to edit in order to move this text down a few pixels?: (the words "MAX" and "0/1" is what I mean)
    Find `Skills_Window.prototype.drawItem` function in SkillTreesSystem.js, here you can adjust position in `this.drawText(text, x + 2, y + this.itemHeight() / 4, ...`
  6. Thanks for the update! Is anyone else running into the issue where if you initialize a character, you duplicate their starting skill tree?

    Additionally, is there a way to reset a character (remove all skill tree skills and points) without using an item.
  7. Danielcross said:
    Thanks for the update! Is anyone else running into the issue where if you initialize a character, you duplicate their starting skill tree?
    What do you mean?

    Danielcross said:
    Additionally, is there a way to reset a character (remove all skill tree skills and points) without using an item.
    There is no pure function yet. Try this code:
    Code:
    let points = 0;
    
    if (SkillTreesSystem.singlePointsPool) {
        for (let tree of actor.skillTrees.trees)
            points += SkillTreesSystem.resetSkillTree(actor, tree);
    
        actor.addTreesPoints(points, 0);
    } else {
        for (let tree of actor.skillTrees.trees) {
            points = SkillTreesSystem.resetSkillTree(actor, tree);
    
            if (tree._actorId > 0)
                actor.addTreesPoints(points, 0);
            else if (tree._classId > 0)
                actor.addTreesPoints(points, tree._classId);
            else
                actor.addTreesPoints(points, tree.symbol);
        }
    }
  8. SomeFire said:
    What do you mean?


    There is no pure function yet. Try this code:
    Code:
    let points = 0;
    
    if (SkillTreesSystem.singlePointsPool) {
        for (let tree of actor.skillTrees.trees)
            points += SkillTreesSystem.resetSkillTree(actor, tree);
    
        actor.addTreesPoints(points, 0);
    } else {
        for (let tree of actor.skillTrees.trees) {
            points = SkillTreesSystem.resetSkillTree(actor, tree);
    
            if (tree._actorId > 0)
                actor.addTreesPoints(points, 0);
            else if (tree._classId > 0)
                actor.addTreesPoints(points, tree._classId);
            else
                actor.addTreesPoints(points, tree.symbol);
        }
    }

    Thanks for the quick response! Is this for a scriptcall? Does the code go in system or config JS?
    Could you show me how a full example scriptcall would work for an actor? I'm pretty sure I'm inputting the scriptcall wrong.

    I'll test it out now, will report back if it works.
  9. Yes, it is a script call removing all learned skills and giving back all spent points. You can use it in custom script.

    As for an actor - take it from the party or any other way. For example, $gameActors.actor(actorId) where actorId is actor id in database.
  10. SomeFire said:
    Yes, it is a script call removing all learned skills and giving back all spent points. You can use it in custom script.

    As for an actor - take it from the party or any other way. For example, $gameActors.actor(actorId) where actorId is actor id in database.

    Ah sorry, I'm really new to scriptcalls as I haven't really used any. Not sure what the proper prefix is. I'm currently inputting this which I assume is incorrect:


    Scriptcall for actor 106 and class 25:

    Code:
    SkillTreesSystem.resetSkillTree(106, 25)
  11. There is an actor, which is actor itself, and actor id, which is number in database. resetSkillTree takes actor and skill tree and resets only 1 tree. To reset all trees you can get actor like $gameActors.actor(106) and insert into code snippet in my previous message.
    code
    Code:
    let actor = $gameActors.actor(106);
    let points = 0;
    
    if (SkillTreesSystem.singlePointsPool) {
        for (let tree of actor.skillTrees.trees)
            points += SkillTreesSystem.resetSkillTree(actor, tree);
    
        actor.addTreesPoints(points, 0);
    } else {
        for (let tree of actor.skillTrees.trees) {
            points = SkillTreesSystem.resetSkillTree(actor, tree);
    
            if (tree._actorId > 0)
                actor.addTreesPoints(points, 0);
            else if (tree._classId > 0)
                actor.addTreesPoints(points, tree._classId);
            else
                actor.addTreesPoints(points, tree.symbol);
        }
    }
  12. SomeFire said:
    There is an actor, which is actor itself, and actor id, which is number in database. resetSkillTree takes actor and skill tree and resets only 1 tree. To reset all trees you can get actor like $gameActors.actor(106) and insert into code snippet in my previous message.
    code
    Code:
    let actor = $gameActors.actor(106);
    let points = 0;
    
    if (SkillTreesSystem.singlePointsPool) {
        for (let tree of actor.skillTrees.trees)
            points += SkillTreesSystem.resetSkillTree(actor, tree);
    
        actor.addTreesPoints(points, 0);
    } else {
        for (let tree of actor.skillTrees.trees) {
            points = SkillTreesSystem.resetSkillTree(actor, tree);
    
            if (tree._actorId > 0)
                actor.addTreesPoints(points, 0);
            else if (tree._classId > 0)
                actor.addTreesPoints(points, tree._classId);
            else
                actor.addTreesPoints(points, tree.symbol);
        }
    }


    Ahh, you misunderstand, I'm lost on the basics. I was wondering what I put in the scriptcall box.

    screenshot3454.png

    Also, not sure how to find the skill tree "symbol"
  13. You should place code under spoiler in my previous message. For symbol see tutorial.
  14. SomeFire said:
    You should place code under spoiler in my previous message. For symbol see tutorial.

    Ah thanks. Another stupid question, your code exceeds the limit for the script box, is there a way to get around that?
  15. Do you use SkillTreesSystem.singlePointsPool? True or false? You can cut off one branch and keep the one you need. Remove empty line.

    Or use Flow Control Event Commands instead of code. "Conditional Branch..." to replace if statement, game variables instead of local variables, etc.
  16. So I haven't done anything yet with any of the plugin code and just trying to check the look of the screen and I got this error
  17. Do you use demo or just copy-pasted js files? What RPGMV version do you use?
  18. I just copied the js files to my plugin folder, I'm on version 1.6.2
  19. Ok, that means you don't have some skills in database. Download demo - it is RPGMV project, so you can open it in Maker and see all insides.
  20. SomeFire said:
    Ok, that means you don't have some skills in database. Download demo - it is RPGMV project, so you can open it in Maker and see all insides.
    Okay, thank you! I will check out the demo, thanks again!