Felskis Skilltree Plugin

● ARCHIVED · READ-ONLY
Started by Felski 294 posts Page 13 of 15 View original ↗
  1. Deagron said:
    Hello @Felski !

    I was trying to make a node that increases the Actor's Max TP since in my project I change TP into a Stamina system.
    I tried to put $gameActors.actor(0001).gainTp(5) in the 'Run Custom Javascript Code' section but when I activate the node I get an error message :
    View attachment 182998
    I tried to do the same on a new project but the issue comes anyway. I'm not good at Javascript so maybe I'm doing something wrong ?
    Try removing the leading zeros from gameActors
    $gameActors(1)
  2. xDRAGOONx said:
    Try removing the leading zeros from gameActors
    $gameActors(1)
    I made it stop the error, but TP didn't increase
    I suppose it doesn't work with SumRndmDude TP plugin ?
  3. Deagron said:
    I made it stop the error, but TP didn't increase
    I suppose it doesn't work with SumRndmDude TP plugin ?
    Next, I would try opening the console during a test play and I putting the code you're trying to run evaluate and see what errors you get there. I did notice the HUD maker error in your screenshot. Could be a problem there. You could try moving HUD maker below the skill tree plugin on your plugin list,but I'd try that after the console attempt.
  4. xDRAGOONx said:
    Next, I would try opening the console during a test play and I putting the code you're trying to run evaluate and see what errors you get there. I did notice the HUD maker error in your screenshot. Could be a problem there. You could try moving HUD maker below the skill tree plugin on your plugin list,but I'd try that after the console attempt.
    No errors are appearing while doing the method, just no TP increase
    I think it has to do with the notetags that alter the TP of the actor, it might override the TP command ?
    I tried to do a switch to apply a variable to the tp, but it doesn't erase the stat when changing class
    I also tried to use the command '$gameVariables.setValue(233, 5)' in the 'Run Custom Javascript Code' section but it doesn't do anything
  5. Alright, I found kind of a solution :
    I turn a switch on with the custom Javascript Code when activating a node, then turn it off when deactivating by changing class.
    It needs a common event so it doesn't appear immediately on the menu, but it works after going out of the menu
  6. Ok I got a new issue now :aswt2:
    So the switch idea I had wasn't working correctly (basically I either had to make one enormous event that would consider every switch tied to TP increase or else it considered the switches off all the time so substracting MaxTP from the start), so I looked at variables control.

    For now I use this formula in 'Run Custom Javascript Code' :
    $gameVariables.setValue(28, $gameVariables.value(28)+1) is used on activation, and
    $gameVariables.setValue(28, 0) is used on deactivation
    variable 28 is used in the MaxTP formula from SumRndmDude on my actor :

    <Max TP: 50 + $gameVariables.value(25) + $gameVariables.value(28)>
    (variable 25 is for level up values and works perfectly on its side)

    The issue is that the activation formula happens a second time when changing class.
    I'll use an exemple for clarity :
    The Actor has 50 TP.
    On Class A, he unlocks a node on the skilltree that adds 5 TP. He now has a total of 55 TP.
    When changing to Class B, the TP goes back to 50.
    But when going back to Class A, TP goes to 60 instead of 55. I tried doing the above twice in case the formula repeats, but TP increase only twice, so my Actor gets his bonus twice and I don't understand how it happens and how to correct it.
  7. Sorry to post again,

    I tried to use the tree on a new project in case another plugin, or the class change plugin could be causing the issue. After using two different class change plugins and then use events to change class without plugin use, the plugins seems to affect the variable or maybe the javascript of the skilltree.

    The class change plugins were YEP_ClassChange and dsJobChange
    I'll try other ones to see if they also cause this issue.
  8. @Deagron $gameActors.actors(0001) or $gameActors(1) does nothing,
    $gameActors.actor(1); does

    as for the way you want to set up, you can find out :)
  9. ShadowDragon said:
    $gameActors.actors(0001) or $gameActors(1) does nothing,
    $gameActors.actor(1); does

    as for the way you want to set up, you can find out :)
    It made $gameActors.actor(1).gainTp(5) refill tp by 5 points, but not increase its max value.
    I searched but it doesn't looks like there's any way to increase max TP with base javascript, hence why I've been using the plugins I mentionned above, but now my issue is revolving around the class changing plugins :aswt2:
  10. I dont know how TP exacly works, or your formula, but if there is
    a plugin that give you total control over TP, it should be do able
    if it's in the helpfile, so I cannot help with the tp part D:

    Unless you do fully control TP by variable, if class is A, var x = +5
    if class is B, var x = +10, else - var x -= 10
    in case it's not class, but this require more checks by than.

    with Ocram Parallel_Ex can it play's once the variable is changed,
    but there might be other ways to avoid additional plugins.
  11. ShadowDragon said:
    I dont know how TP exacly works, or your formula, but if there is
    a plugin that give you total control over TP, it should be do able
    if it's in the helpfile, so I cannot help with the tp part D:

    Unless you do fully control TP by variable, if class is A, var x = +5
    if class is B, var x = +10, else - var x -= 10
    in case it's not class, but this require more checks by than.

    with Ocram Parallel_Ex can it play's once the variable is changed,
    but there might be other ways to avoid additional plugins.
    I use SumRndmDude's TP Upgrade plugin :
    TP Upgrade [v3.02] (Max TP Rate, Initial Battle TP, TP Cost/Gain, TP Damage, and more!) The plugin uses notetags that can have javascript to determine an Actor's Max TP, I can try to read the json to search if the plugin alters more than that in terms of code but I don't really know javascript :aswt:
  12. if notetag in calss = <max TP: +5> than it would add whenever you change
    the class back to previous.

    so if you want to add it, you need to make sure to choose classes wisely.
    because from the look and description, it doesn't check previously.

    so I would rather avoid <max TP: +5> but use or test, something like this:

    Actor starting TP = 0

    on Class (while it needs one) <max TP: 50>

    if class B <Max TP: 55> so it should be 55, if change back, it should be 50 again.

    if it does not, than I dont know, I dont use TP though.
  13. ShadowDragon said:
    if notetag in calss = <max TP: +5> than it would add whenever you change
    the class back to previous.

    so if you want to add it, you need to make sure to choose classes wisely.
    because from the look and description, it doesn't check previously.

    so I would rather avoid <max TP: +5> but use or test, something like this:

    Actor starting TP = 0

    on Class (while it needs one) <max TP: 50>

    if class B <Max TP: 55> so it should be 55, if change back, it should be 50 again.

    if it does not, than I dont know, I dont use TP though.
    From the help in the plugin manager is explained this :


    <Max TP: value>

    Sets the base Max TP of the Actor to 'value'.

    Value can be a JavaScript eval.



    Examples: <Max TP: 5>

    <Max TP: this.level * 2>



    Overwrittes based on priority:

    State, Weapon, Equipment, Class, Actor.

    So I put it on Actor for now, and changed variables like I mentionned above :
    <Max TP: 50 + $gameVariables.value(25) + $gameVariables.value(28)>
    variable 25 is for level up values and works perfectly on its side, I even put it off in case it messed the calculation but it didn't change anything

    Then I added $gameVariables.value(28) that was modified by the Techtree's 'Run Custom Javascript Code' section
    Now if I change class once it doubles the value of variable 28
    So if I have class A at 50 maxTP, the node adds 5. maxTP's at 55.
    Switching to class B puts maxTP back at 50 correctly.
    Then switching back to class A adds 5 more TP once. maxTP of class B is now 60, and it doesn't happen many times if doing this multiple times.
  14. if Class A have that in the notetag, than it will add another 5,
    each time you switch back to Class A?

    if so, than you need to make a different way, like:
    Once they choose a class (if Class A, to Class B, Class C or Class D.
    once chosen, they cannot reverse it.

    if you want to reverse it, that I think you need an eval that variable
    is resetted to 0 + level probably or however it set's it up.
    like variable(28) - 10
    change class back, but I have no idea if that works, or how you set up
    the scriptcalls for this purpose, but I think you need to adjust var 28
    before using the scriptcall for the correct output?

    but I hope you can figure it out one way or another, so good luck on your project,
    and hope you can manage the calculations somehow ^^
  15. Finally made it by giving each node a separate variable, so the Max TP's script will have them all at once (maybe I'll put the script on classes if one have a lot more nodes than an another) but it won't be disrupted by an addition since the operation seems to be the problem :aswt:
  16. ShadowDragon said:
    if Class A have that in the notetag, than it will add another 5,
    each time you switch back to Class A?
    Only once, which is strange I agree.
    ShadowDragon said:
    if you want to reverse it, that I think you need an eval that variable
    is resetted to 0 + level probably or however it set's it up.
    like variable(28) - 10
    change class back, but I have no idea if that works, or how you set up
    the scriptcalls for this purpose, but I think you need to adjust var 28
    before using the scriptcall for the correct output?
    The variable is reset to 0 when changing class, there a 'on deactivation' part on the 'Run Custom Javascript Code' of the skilltree
    When I tried to substract on deactivation it substracted for the other class, meaning changing class ended up decreasing TP...
    ShadowDragon said:
    but I hope you can figure it out one way or another, so good luck on your project,
    and hope you can manage the calculations somehow ^^
    Thanks, the skilltree is one of the last thing I need to check in order to begin making the whole project :aswt:
  17. Deagron said:
    Only once, which is strange I agree.

    The variable is reset to 0 when changing class, there a 'on deactivation' part on the 'Run Custom Javascript Code' of the skilltree
    When I tried to substract on deactivation it substracted for the other class, meaning changing class ended up decreasing TP...

    Thanks, the skilltree is one of the last thing I need to check in order to begin making the whole project :aswt:
    So if the nodes have an 'on deactivation' eval that run when you change froma class as well as a 'on activation' eval that run when you change to a class? If it's adding all the tp from the activated nodes when you change to a class, why don't you set max tp to 0 everytime you change from a class.
  18. ThreeSixNine said:
    So if the nodes have an 'on deactivation' eval that run when you change froma class as well as a 'on activation' eval that run when you change to a class? If it's adding all the tp from the activated nodes when you change to a class, why don't you set max tp to 0 everytime you change from a class.
    I tried but the TP plugin might disrupt the usual maxTp javascript since it didn't work (or I made a mistake since I'm not good at Javascript).
    For now I'll use the solution I found and that currently works ^^
  19. Hello !

    Just wanted to know if there was a way to change the position of currency and skill icons in the node. I find it useful to be shown under the node header but it currently overlaps, like on the image below :
    1616361182130.png
  20. I'm using MZ and I keep getting this error and so far I cant chang eit, database max skill number is 2000 and I wonder if someone oculd give me any assistanceScreenshot_1.pngScreenshot_2.png