Skill Trees System

● ARCHIVED · READ-ONLY
Started by SomeFire 312 posts Page 2 of 16 View original ↗
  1. @atoms, I have free time only on weekends, so I can't do many things.

    @therpglper1, looks like SkillTreesConfig.js have errors and wasn't loaded. Open console (F8) and look for errors.
  2. @SomeFire That's perfectly understandable. If you are happy to do the item consuming, and more than one item, request sometime in the future let me know then.

    Good luck with anything else you plan to do!

    @therpglper1 It's late here now but I'll check that out sometime over the next few days for you and see if I end up with the same issue or not.
  3. Okay I think I figured it out. Apparently when looking through the code more closely, I had used a SkillReq() function in one of the skill definitions and the required skill I used wasn't defined until further down the code. So I moved it above that skill and now the trees actually work. I did not know about the f8 console in MV but that was really helpful in figuring that out.

    For some reason the arrows aren't showing up but I can live with that.
  4. therpglper1 said:
    For some reason the arrows aren't showing up but I can live with that.
    If you trying plugin in a new project - you need to copy-paste IconSet or create your own arrow images and use them for Arrow objects in the SkillTreesConfig.js.
  5. Oh. Yeah that could definitely make a difference. Thanks for all the help!

    EDIT: How does the script handle giving SP to actors besides with the script command doing it manually. Does it automatically award actors a skill point on level up or is that not implemented?
  6. Version 1.2:
    - Added item requirement.
    - Added game variable and game switch requirements.
    - Added on skill learn action to change game variables.
    - Colored requirements.
    - Skill points can be received on level up.

    Reload the Demo to see how the changes works.
  7. therpglper1 said:
    How does the script handle giving SP to actors besides with the script command doing it manually. Does it automatically award actors a skill point on level up or is that not implemented?
    First of all I made manual actions to use anywhere as custom scripts, but now you can setup SkillTreesSystem.js plugin to recieve points on lvlup.

    @atoms, I made 2 and 3. I'll try to integrate my plugin with Yanfly's plugins on the next weekend.
  8. @SomeFire Wow, many thanks glad to hear you were able to add the items and variable features! This plugin will definitely help me a lot with one of the two games I'm working on, thanks. Best of luck with your future plans for this plugin and any other plugins, games, or anything else you may want to do.
  9. I´m sorry to be like this, but I prefer to use 1.5.1 because of some of my plugins don´t have uptades to 1.6.1, and i really know the basics of java script, but really basic stuff, so if you can get me a example of changing the classes to objects, so that i could used it as a base to others.
    I´m sorry if this will give to any of you any trouble.
    Thanks in advance.
  10. @Geriancomp, no problem. I think the only issue here is the classes. You need is to use JS prototypes instead of them.
    Spoiler
    For example, change
    Code:
    class Skill extends TreeObject {
       constructor(levels, requirements, onLearnActions) {
            super();
            this.lvls = levels;
            this.level = 0;
            this.reqs = requirements;
            this.learnActions = onLearnActions;
        }
    
        iconId() {
            return $dataSkills[this.lvls[0]].iconIndex;
        }
    }
    to something like this
    Code:
    function Skill() {
        this.initialize.apply(this, arguments);
    };
    
    Skill.prototype = Object.create(TreeObject.prototype);
    Skill.prototype.constructor = Skill;
    
    Skill.prototype.initialize = function(levels, requirements, onLearnActions) {
        TreeObject.prototype.initialize.call(this);
        this.lvls = levels;
        this.level = 0;
        this.reqs = requirements;
        this.learnActions = onLearnActions;
    };
    
    Skill.prototype.iconId() = function() {
        return $dataSkills[this.lvls[0]].iconIndex;
    }
  11. @SomeFire Thank you! Sorry to thank you so later, but i really apreciate the fast response.
  12. Version 1.3:
    - Fixed loading bug.
  13. Version 1.4 Experimental:
    - Separate Points Pools for class trees.
    - YEP Job Points and class plugins integration.

    Beware, API was changed in v1.4. Check your code.
  14. Love your plugin! I managed to get it all figured out and I'll be using it alongside yanfly's stat allocation for my next project.

    Do you have any plans to give the player an option to reset their skill trees, or can this be done with a script call?
  15. I think I'll add a script call for reset. And example as "Tome of Retraining" like in WC3.
  16. @SomeFire
    Hi, first of all, thanks for this plugin, it's awesome, way better than any analogue, imo.
    And second, few questions:
    1. What is max size of skilltree?
    In your example, you used 7x9, and there is [param Skills in a row] in System.js, but no such things for lines, does it mean that I can only use 9 rows or did you just use it as a sample?
    2. In Config.js there is part when you add different arrows:
    /**
    * Arrow pointing down.
    *
    * @type {Arrow}
    */
    arrowDown = new Arrow(28);

    In icons file there is horizontal arrows and space-lines for them, but you only added vertical and diagonal ones.
    Can I add horizontal ones and space-lines like this:
    /**
    * Arrow pointing straight right.
    *
    * @type {Arrow}
    */
    arrowHorRight = new Arrow(16);

    Or does they allready implemented by code somewhere else (I'm not good at reading code. Yet.)?
    Or maybe you could consider it as violation of intellectual property, since I'll alter your code by adding some stuff.
  17. @FrancisFillwood, hi!

    1. Tree size is unlimited, it can slide down as any Window_Selectable, but I didn't checked how it looks and works. I expect drawing bugs with long trees. It will be good if you create such example, find and describe bugs and share it.

    2. You are right - I added icons, but didn't created object for them, because I don't use them in example. So, yes, you should declare horizontal ones and space-lines manually. It will not violation:smile:
  18. SomeFire said:
    It will be good if you create such example, find and describe bugs and share it.
    And I did. It was a quick test-run, and I made a 25x25 skill tree (out of one skill, but it dosn't matter, that was all for tests) and here is results:
    Image1 Default RPGMMV Resolution
    qVsfZtc.png
    As you can see, there is only 16 rows height, and though it could fit 25(~ish) skills wide - there will be no room for skill description on the right and I was unable to scroll tree down.
    After that I tried to increase resolution up to FullHD (1920x1080).
    Image2 FullHD via YEP Core Engine
    PUMcQsH.png
    That is better, tree now could fit all 25x25(~ish) skills and there is enogh room for skill description on the right. Horay!
    Conclusion is: if you want to make big skill tree - consider some resolution change, looks like in FullHD there is enogh room for at least 31 skills high, maybe 32. Oh and about that 25~ish skills wide, as you may notice skilltree window is cutting few pixels from most right arrow, at first I thought that this is because of low res, but same thing happend in 1080, so keep that in mind when you'll be growing your own beautifull tree.

    Also @SomeFire I'm not sure if this is possible but I'll throw one idea just incase, that's about arrows.
    Maybe instead of drawing every possible icon for arrow you could use 8 icons for arrowheads and 8 more for lines, and then make it that way so arrow in tree would be multi-icon object. Line icons would be omnidirectional, coming from the center, so you could make arrows like that [┴→] without adding more custom icons. And in that case, if we call the [l1-8] for lines and [h1-8] for heads, instead of [arrowT, arrowHRight] there would be combined [a1a3a7, a3a7h3]
  19. FrancisFillwood said:
    And I did. It was a quick test-run, and I made a 25x25 skill tree
    What about cursor on such tree? Is it works normally?

    FrancisFillwood said:
    Maybe instead of drawing every possible icon for arrow you could use 8 icons for arrowheads and 8 more for lines, and then make it that way so arrow in tree would be multi-icon object. Line icons would be omnidirectional, coming from the center, so you could make arrows like that [┴→] without adding more custom icons. And in that case, if we call the [l1-8] for lines and [h1-8] for heads, instead of [arrowT, arrowHRight] there would be combined [a1a3a7, a3a7h3]
    Too complex work with low profit.
  20. SomeFire said:
    What about cursor on such tree? Is it works normally?
    It could go out of bound and level up skills wich isn't visible. Othervise it's working normaly.