MZ Change Element on Class Change (VisuStella)

Hey!

I'm using VisuMZ_1_ElementStatusCore.js and VisuMZ_2_ClassChangeSystem.js together with the goal of setting an actor's Main/Sub elements on class change.

As far as I can tell, I unfortunately can't make the change happen in class notetags, so I'm going about using a common event to make it happen. But no matter what I do, the element change won't happen and the actor stays neutral.

Capture.PNG

Here's the common event I'm trying to call. I have it set to check the actor's class, and then calls a Plugin Command to change the Element trait to "Wind".

I feel like I'm overcomplicating this or just missing something and help would be greatly appreciated.

Thanks!
Are you talking about the damage elements?
if yes, then why using a plugin at all?
all traits are equal and accumulated on the actor ingame. While it is custom to have the element trait on the weapon equipment, there is no need for that - you can place it on the class as well.

However if the plugin gives more effects than just damage element, then that might not work.
Are you talking about the damage elements?
if yes, then why using a plugin at all?
all traits are equal and accumulated on the actor ingame. While it is custom to have the element trait on the weapon equipment, there is no need for that - you can place it on the class as well.

However if the plugin gives more effects than just damage element, then that might not work.
Ya it’s more than just the damage elements. The Element and Status Core plugin lets you set a sort of elemental affinity on actors. That controls elemental rate multipliers based on the plugin parameters.

I’m aware controlling the damage rates for both taking and dealing damage is something I could probably manage without the plugin, but the plugin gives a nice display in game.
When/where are you calling that event?
When/where are you calling that event?
I figured that just having the common event set up in this way, it would trigger on class change. If not then I’m just fundamentally misunderstanding common events lol

What I need then is this to be called when an actor’s class is changed
The trigger property of the common event tells you when it triggers automatically.
Trigger = none means it NEVER triggers automatically, it needs to be called.

That is what the event command "call common event" is meant for, or attached common events to a skill.

But in all cases, common events do not run automatically, they always need to be either triggered or called.

Check yoour class change plugin if it has any property about calling a common event on class change.

If not, this is much more complex to solve and depends on when and how a class change can happen in your game.
I figured that just having the common event set up in this way, it would trigger on class change. If not then I’m just fundamentally misunderstanding common events lol
Yes - you may want to look up some tutorials 😉

Common events never just do anything by existing. If it says Trigger: None like yours does, that will never execute unless you call it (for example by the Common Event command from another event, or attached to the Effects of a Skill or Item).

If it's set to Autorun or Parallel, then as long as the associated switch is turned on, it will attempt to execute once every frame, 60 times per second.

What I need then is this to be called when an actor’s class is changed
Yes, and unfortunately for you,
- I don't see any way to do that in the VS Class Change plugin, and
- Because they obfuscate their code, we can't just provide a little add-on plugin

So I think your best bet is to make this common event parallel, and turn on its switch at the beginning of the game so it's always there.

Give it a Wait command of, say, 30 frames so it's not bogging down your game by executing constantly.

And put in it all of the conditionals for all of your actors and all of their classes.

The alternative is to ditch the "elemental trait set" system - I don't have the plugin, I haven't looked in the parameters, but I have to assume that is simply setting some predetermined regular traits. For example, you saying the actor is Fire element probably gives them an element rate that affects fire and one that affects ice, or something.

Ditch using that system and put those same traits onto the classes directly.
Personally I like to liberally use Advanced Switches on my common events which will make them autotrigger if a Javascript condition is true. You can use it to autorun a script if an actor changes to a certain class, etc

You could store the actor's current class in a variable then have a Javascipt check on whether the actor's class is not that class (i.e. as soon as it is changed), run a script (and update the current class variable to the new class in that script).

Original thread: https://forums.rpgmakerweb.com/threads/change-element-on-class-change-visustella.158260/