Hi! I'm currently working on a game using Felski's TechTree plugin, and if anyone has any experience with it, I'd like to know if there's anyway I could edit a character's trait from activating a node. For instance, lets say I want to change the attack times trait in a node, how would I accomplish that? Any help would be appreciated. Thanks!
MV Trait Edits Using Felski's TechTree Plugin?
Javascript/Plugin SupportHi, there - per the section guidelines, please provide links to plugins you're asking about.
Aside from the convenience, it also makes sure everyone is talking about the same thing. For example, nothing comes up for me when I Google the name of the plugin you gave - the posts and store listings all say Skilltree, it's not until I download the actual file that it says Techtree.
So aside from that - you'd need to use it in conjunction with another plugin. Traits are not normally editable. Shaz and Galv both offer dynamic traits plugins (and there may be others).
You would then use the eval property of an onActivate attribute for the node to run the function calls provided by the trait plugin.
Aside from the convenience, it also makes sure everyone is talking about the same thing. For example, nothing comes up for me when I Google the name of the plugin you gave - the posts and store listings all say Skilltree, it's not until I download the actual file that it says Techtree.
So aside from that - you'd need to use it in conjunction with another plugin. Traits are not normally editable. Shaz and Galv both offer dynamic traits plugins (and there may be others).
You would then use the eval property of an onActivate attribute for the node to run the function calls provided by the trait plugin.
Okay great! Sorry about the whole link thing, but thanks for the help!
Felski plugin comes with that tech tree building app. You can specify custom JavaScript that runs whenever this specific tech tree node is purchased.
Alternatively, you can execute a common event when a given tech node is purchased and use the dynamic traits plugin that Turan mentioned to update a trait.
Alternatively, you can execute a common event when a given tech node is purchased and use the dynamic traits plugin that Turan mentioned to update a trait.
Just to clarify, this is not either/or.
As I pointed out in my first reply, there is no way to change traits in the default engine, even with custom JavaScript.
You must use the dynamic traits plugin, and then you can either run JavaScript via the eval property, as I described, or you could try the common event...but I don't know how the common event would know which trait on which actor to modify, unless your skills are actor-specific.
The only way to not use a dynamic traits plugin would be to preconstruct however many different passive states representing every change from a learned skill, and have learning the node activate the passive state.
But that would be inefficient and, depending on how many you have, possibly get to the point of lagging your game.
I suppose you could construct different versions of each actor/class that has every possible combination/value of traits and make learning the node switch between them, but that seems ridiculous.
Original thread: https://forums.rpgmakerweb.com/threads/trait-edits-using-felskis-techtree-plugin.165610/