Skill Trees System

● ARCHIVED · READ-ONLY
Started by SomeFire 312 posts Page 9 of 16 View original ↗
  1. SomeFire said:
    Currently, there is no short way to do it. You can use game variable to show points, just call actor.getTreesPoints(tree) to put points into variable before showing text.

    Or you can create messages in scripts, thus no need to use game variable.

    Can't get it working.

    Screenshot_8.png
    Screenshot_9.png

    Or isn't this that simple? :)
  2. kako05 said:
    Or isn't this that simple? :)
    Lolno) You should replace `actor` to actor you have in current piece of code (for example, $gameActors.actor(1) always points to first actor in database) and `tree` to... What points pool do you have? Do you use class trees? If you use single points pool then you can remove tree at all. If you use separate pool and class trees - replace it by classId. Otherwise replace it by treeId.
  3. SomeFire said:
    Lolno) You should replace `actor` to actor you have in current piece of code (for example, $gameActors.actor(1) always points to first actor in database) and `tree` to... What points pool do you have? Do you use class trees? If you use single points pool then you can remove tree at all. If you use separate pool and class trees - replace it by classId. Otherwise replace it by treeId.

    Thanks. Works great :)
  4. @SomeFire Is there a plugin command to remove a single specific skill/node on a skill tree? I'm trying to migrate my stat allocation skills into the skill tree system. So far, I've created a common event for the skill's effects, which works fine. So this part...
    boostHP = skill('boostHP', [293], [ [cost(1)] ], [ [commonEvent(1)] ]);
    ...and this part...
    ◆Control Variables:#0001 ActorID = $gameParty._targetActorId ◆Change Parameter:{ActorID}, Max HP + 5 ◆Change HP:{ActorID}, + 5 ◆Change Skill:{ActorID}, - Boost Max HP
    ...both work perfectly. The only issue is that the skill remains at "Max" but I want it to go back to "0/1" on the skill tree.

    Edit: On second thought, I just realized I could make it 0/50 or 0/100 or something and it would work just fine like that.:kaopride:
  5. Frostorm said:
    @SomeFire Is there a plugin command to remove a single specific skill/node on a skill tree?
    No, because every time player loads game tree will be the same as in configuration.
  6. Any way to set
    "SP in skill tree: 0"
    To different value?

    Just for display, I want to show that the character "X" already has spent "X" skill points in the "X" tree since some characters already start with some skills unlocked.

    P.S oh, nvm. I needed to use "Trylearn" instead of "force".
  7. How do you unlock their skills at start? Do skills have cost requirement?
  8. SomeFire said:
    How do you unlock their skills at start? Do skills have cost requirement?
    Various conditions. I use different stat mechanics, characters gain skill points by increasing variables and reaching certain ranks. Anyway, It was my mistake. I used the wrong command for learning skills.
    Good work! :kaoluv:
  9. SomeFire said:
    No, because every time player loads game tree will be the same as in configuration.
    Not remove, I meant unlearn...as in set the skill to 0/x.
  10. OK the plugin's instructions said that SkillTreesSystem.actor2trees and SkillTreesSystem.class2trees will add itself in the game to its respective class but somehow I can't get the Skill Tree option to appear in the menu anywhere. I might've done something wrong here.

    Also I did some alterations as I edit SkillTreesSystem.class2trees in an attempt to make a skill tree for one of my pre-made classes but there's always an error. It was a while ago and can't quite remember what error it was but bottom line is I can't open my game after I did the alterations. I'm quite inexperienced with the use of this plugin's system please help.
  11. Vergel_Nikolai said:
    I can't get the Skill Tree option to appear in the menu anywhere.
    Open the demo and check params in YEP menu plugin.

    Vergel_Nikolai said:
    there's always an error. It was a while ago and can't quite remember what error
    Yep, you made something wrong. May be you miss bracket or semicolon, etc. I can't help without error. Use F8 to open console and copy-paste error text.
  12. SomeFire said:
    Yep, you made something wrong. May be you miss bracket or semicolon, etc. I can't help without error. Use F8 to open console and copy-paste error text.
    The error was awhile back and I have since replaced the tinkered plugin with a clean duplicate so that I could work with my game again. I'll try reverse engineering my error and I'll show you if there are any errors.
  13. @SomeFire I managed to identify the problem with my little experimentation.

    Basically back then I thought of replacing the script calls of some of the content in Skills Examples to fit in my game. I replaced everything right until berserkersDance with my own skills. Without considering the other undefined script calls, I jumped right ahead to editing SkillTreesSystem.class2trees with those new script calls and so when I run the game and pressed F8 I found those undefined calls. I fixed it with replacing those unused skill script calls (by unused I mean every skill tree except class2trees) with null and now my game runs smooth. Now here comes the real problem: I can't get to add the contents on class2trees onto my character. In my game the beginning has your player actor (Actor 1, Class 1) select between 3 sprites. One of them is Warrior who upon interacting with the sprite it changes your class to Warrior (which is class 2). I can't get to load my one and only skill tree into the Skill Tree menu. At least I assume I was blind and I probably overlooked an error. Here's what it looks like.
    My Attempt
    1: skillTrees(10, [
    skillTree('Class 1', 'Class 1', [
    // Null represents empty square in the skill window.
    // Arrow points from one skill to another.
    null, null, null, wrathStrike, null, null, null,
    null, null, null, arrowDown, null, null, null,
    null, null, null, heroicStrike, null, null, null,
    null, null, null, arrowDown, null, null, null,
    null, null, null, secondWind, null, null, null,
    null, null, arrowLeft, null, arrowRight, null, null,
    null, cleave, null, null, null, bash, null,
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    ]),
    skillTree('Class 11', 'Class 11', [
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    null, null, null, null, null, null, null,
    ])]
    ),
  14. If you change class by Game_Actor.prototype.changeClass() call, then your class changes to class 2, which means you need to replace
    Code:
    1: skillTrees(10, [
    skillTree('Class 1', 'Class 1', [
    by
    Code:
    2: skillTrees(10, [
    skillTree('Warrior Tree', 'war_tree_id', [
  15. Hold up, can I do that class change in-game by default? Because by default I was only using the event command of "Change Class" for the test game I had. Do I insert that plugin command in the event where I co and change my class and then then the class 2 tree will be implemented to that class? I still can't quite understand it but maybe it's because it'slate her and I'm tired as I type this.

    Also, I need to change Code 1 into Code 2. Got it...?
  16. Vergel_Nikolai said:
    Hold up, can I do that class change in-game by default?
    I suppose - yes, because this command from RPGMV. At least it is used by YEP class change plugin.
    Vergel_Nikolai said:
    Also, I need to change Code 1 into Code 2. Got it...?
    Exactly.
  17. The plugin command didn't work because I don't have the YEP Class Change plugin. As for the tree I suppose it appears but only when I change the class in the database and not with an event. It'll keep the database class for the tree even if I use the event command defaulted to RPGMV to change my class. So yeah, I'm still stuck.
  18. Did you tried event command? It works for me - skill tree changes too.
    GUI Event Commands
    1599507767747.png
  19. Yes, that is exactly what I told you I've tried! But looks like it' another error in my end. When you told me to change the code from class 1 to class 2 I kept skillTree('Warrior Tree', 'war_tree_id', [ in Class 1 along with Class 2 so when I default the class to 1 it won't change to the Warrior ID Class 2 tree and remain an empty.

    ...Which is strange considering just a few days past I have it default to Class 3 and instead of having the Warrior Tree of either appear it was Class 3's but now it's fixed? Strange. But I guess this one's resolved.

    One more thing: How do I remove the 3 actor-specific trees from my character's list, as well as add more class-specific trees on them?
  20. Vergel_Nikolai said:
    How do I remove the 3 actor-specific trees from my character's list, as well as add more class-specific trees on them?
    Remove them from SkillTreesSystem.actor2trees.

    Try to change class with demo skill trees, and clear them step by step. If this will not help, then I suggest to move all trees to SkillTreesSystem.otherTrees and give/remove when needed.