MZ Using Common Events to control Switches

I've been trying to re-get Felskis attention on this because I reckon there's a way to have a the nodes activated more directly and be actor specific that I'm just not seeing. In the meantime workarounds have been the thing haha
If it is not node vísibility you actually worry about, but rather node activation, Felski's plugin has a command for that. From its documentation:
You can activate a specific node during the game for an actor using:
- ACTIVATENODE [actorId] [tree uid] [node uid]
You can see that this simply calls the function .activateNode([tree uid], [node uid], false) on the corresponding game actor. When we look deeper this function executes any code that should happen on activation (stat changes, skills learned, ...) and sets the flag this._techtrees[i].nodes[j].active = true; (where it first searches for the right techtree and node by their uid).
So if you want to activate a node when a skill is learned by other means you can use my plugin to execute the function. If you don't want to actually execute the code then you can still use my plugin to search for the correct indices yourself and only set the active flag.

So what exactly are you trying to do? Do you want the player to be able to learn skill X for example both from the skill shop and the skill tree, so when they learn it from the shop the node in the skilltree should be active? (but not execute any code, because if on learning skill x you use my plugin to activate the node to learn skill x, well you have built yourself an endless loop).
Or do you want it that skill x for example can only be learned in the skill shop, but on learning it, a node in the skill tree should activate and maybe grant the actor a stat boost also? Then we could simply call the function from the plugin command.

Any solution you will try with switches will however not work, because as far as I can tell the visibility requirements are global and not actor specific - unless you give each actor a copy of the same skill tree but keyed to different switches. StillI think the intention was that with the visibility requirements you could do secret skills that only are visible once some other ingame conditions are met. And then it doesn't make sense to display a secret skill for only certain actors once it has been discovered. For requirements the skill tree plugin kind of assumes that its system of required parent nodes and costs would be sufficient (and it would be if the skill tree plugin is the only way to learn skill requirements).

Original thread: https://forums.rpgmakerweb.com/threads/using-common-events-to-control-switches.150942/