Is it possible to activate a common event midbattle or change to change class?

In my project I have a role who works as a berserker, I want it to work that when his TP reaches 100 he will turn from his basic class to this "berserker" version.

I can do most things I want such as different stats, abilities (temporarily removing them from him until he reverts back at the end of the battle) and a different basic attack using Yanfly's weapon unleashed which increases damage based on his missing health. The one thing I can't do is have him change from his regular mode to the berserker mode how I want to. I was hoping to have him change as soon as he reached 100fp but I couldn't find a way to have it activate.

Is there anyway I can activate a common event once he reaches 100fp or is there an alternative way such as with Yanfly's passive states which activate at 100fp and change the class?
what else does "berserker" do?

I see percent health damage increase. does it do anything else? Use of different SV for instance.
you can call a common event from a troop event, but in that case you can simply use the same commands on the troop event itself. Parallels only exist on the map, nowhere else.

change class should be possible the same way, but that depends on what battleplugins you have - several plugins get their data on battlestart only and may not detect the class change.
what else does "berserker" do?

I see percent health damage increase. does it do anything else? Use of different SV for instance.
I want the berserker to have unique abilities which will use a percentage of health and increase tp (once class is changed tp returns to 0, increasing it back to 100 will revert him back to his original state) on top of that and the more damage focused stats I'd give him reduced healing, I want him to be something which is harder to manage when in his second form but the player is rewarded with high damage (there would be characters which synergise with him later on to maintain or stop him from entering berserk form but that's sacrificing their turn)
yanfly has an addon that lets you hide/show skills whne a state is present. you could have an add state event in troops (all of them, yuck i've done that) for checking if TP is <1, then it should hide the first version skills and show the second version skills which would have different calcs and would INCREASE TP while lowering HP, and another turn event that will remove the state is TP >99.

i think.

YEP_SkillCore, check that one out. may need buffs and states core too.

note that i have a small issue with this, for some reason, if i have a battle that i can lose and try again, it seems to break this :\

in fact, here is an example
Spoiler: skills and buffs for an effect
Skill 1: can't be used, means you don't have the resource. <Custom Show Eval> if (!user.isStateAffected(11)&&!user.isStateAffected(12)&&!user.isStateAffected(13)) { visible = true; } else { visible = false; } </Custom Show Eval> <Sort Priority: 11> Skill 2: the weakest useable version, you have 1 resource. <Post-Damage Eval> a.removeState(11); </Post-Damage Eval> <Sort Priority: 11> Skill 3: medium power, you have 2 of the resource. <Post-Damage Eval> a.removeState(12); </Post-Damage Eval> <Sort Priority: 11> Skill 4: high power, you have 3 of the resource. <Post-Damage Eval> a.removeState(13); </Post-Damage Eval> <Sort Priority: 11> each use of a different skill adds a state (1 resource, 2 resource, 3 resource, removing the previous resource) and as you gain the states, it changes the skill. These are the 1, 2 and 3 resource states <animationRow: 11> <Custom Confirm Effect> value = Math.ceil(value*1.05); </Custom Confirm Effect> <animationRow: 12> <Custom Confirm Effect> value = Math.ceil(value*1.1); </Custom Confirm Effect> <animationRow: 13> <Custom Confirm Effect> value = Math.ceil(value*1.15); </Custom Confirm Effect> And here's the skill that changes the applied state (basic attack, and one other special skill). <Enemy or Actor Select> <Post-Damage Eval> if (!a.isStateAffected(11)&&!a.isStateAffected(12)&&!a.isStateAffected(13)){ a.addState(11); }else if (a.isStateAffected(11) && !a.isStateAffected(12)&& !a.isStateAffected(13)){ a.addState(12); a.removeState(11); }else if (!a.isStateAffected(11)&&a.isStateAffected(12)&&!a.isStateAffected(13)){ a.addState(13); a.removeState(12); } </Post-Damage Eval>

so, using those skills adds/changes the state, the game shows/hides the skills as appropriate for the buff number, sorts them into place in the skill box, and they do their thing.
I want the berserker to have unique abilities which will use a percentage of health and increase tp (once class is changed tp returns to 0, increasing it back to 100 will revert him back to his original state) on top of that and the more damage focused stats I'd give him reduced healing, I want him to be something which is harder to manage when in his second form but the player is rewarded with high damage (there would be characters which synergise with him later on to maintain or stop him from entering berserk form but that's sacrificing their turn)


Sounds like you do require a class change.

What if you do actor change?

Use Yep Passive states to give each of the Actors a state that checks for TP level, which converts them to the other Actor.

Jekyll, Hyde, et al.

<Custom Passive Condition>
if (user.tp >= 100) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

===================================================


<Custom Passive Condition>
if (user.tp <= 0) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

===================================================

I dont JS, but I think this is close.
you can call a common event from a troop event, but in that case you can simply use the same commands on the troop event itself. Parallels only exist on the map, nowhere else.

change class should be possible the same way, but that depends on what battleplugins you have - several plugins get their data on battlestart only and may not detect the class change.
That seems to be working fine with my battle plugins thank you a ton, Had to fiddle around with some of the options but it's working fine!

Sounds like you do require a class change.

What if you do actor change?

Use Yep Passive states to give each of the Actors a state that checks for TP level, which converts them to the other Actor.

Jekyll, Hyde, et al.

<Custom Passive Condition>
if (user.tp >= 100) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

===================================================


<Custom Passive Condition>
if (user.tp <= 0) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>

===================================================

I dont JS, but I think this is close.
Thank you but Andar gave me a solution, I didn't consider the idea of using several actors my only concern would be that if he's not in the party he wouldn't get any xp or if there is some backup xp mode that he would show up on the xp screen. In the end i just used $gameActors (4).tp >99 in battle events so it will trigger and change the class
i'm not sure if you saw my whole post, as i was editing it while everyone else was answering, but what i posted will alleviate your XP concerns and others if you have some of the necessary yanfly plugins.
yanfly has an addon that lets you hide/show skills whne a state is present. you could have an add state event in troops (all of them, yuck i've done that) for checking if TP is <1, then it should hide the first version skills and show the second version skills which would have different calcs and would INCREASE TP while lowering HP, and another turn event that will remove the state is TP >99.

i think.

YEP_SkillCore, check that one out. may need buffs and states core too.

note that i have a small issue with this, for some reason, if i have a battle that i can lose and try again, it seems to break this :\

in fact, here is an example
Spoiler: skills and buffs for an effect
Skill 1: can't be used, means you don't have the resource. <Custom Show Eval> if (!user.isStateAffected(11)&&!user.isStateAffected(12)&&!user.isStateAffected(13)) { visible = true; } else { visible = false; } </Custom Show Eval> <Sort Priority: 11> Skill 2: the weakest useable version, you have 1 resource. <Post-Damage Eval> a.removeState(11); </Post-Damage Eval> <Sort Priority: 11> Skill 3: medium power, you have 2 of the resource. <Post-Damage Eval> a.removeState(12); </Post-Damage Eval> <Sort Priority: 11> Skill 4: high power, you have 3 of the resource. <Post-Damage Eval> a.removeState(13); </Post-Damage Eval> <Sort Priority: 11> each use of a different skill adds a state (1 resource, 2 resource, 3 resource, removing the previous resource) and as you gain the states, it changes the skill. These are the 1, 2 and 3 resource states <animationRow: 11> <Custom Confirm Effect> value = Math.ceil(value*1.05); </Custom Confirm Effect> <animationRow: 12> <Custom Confirm Effect> value = Math.ceil(value*1.1); </Custom Confirm Effect> <animationRow: 13> <Custom Confirm Effect> value = Math.ceil(value*1.15); </Custom Confirm Effect> And here's the skill that changes the applied state (basic attack, and one other special skill). <Enemy or Actor Select> <Post-Damage Eval> if (!a.isStateAffected(11)&&!a.isStateAffected(12)&&!a.isStateAffected(13)){ a.addState(11); }else if (a.isStateAffected(11) && !a.isStateAffected(12)&& !a.isStateAffected(13)){ a.addState(12); a.removeState(11); }else if (!a.isStateAffected(11)&&a.isStateAffected(12)&&!a.isStateAffected(13)){ a.addState(13); a.removeState(12); } </Post-Damage Eval>

so, using those skills adds/changes the state, the game shows/hides the skills as appropriate for the buff number, sorts them into place in the skill box, and they do their thing.
That is a good idea I think I will try and utilise that, I imagine there will be a way to change remove the state once before he turns back to his original class so he can learn the skills again or would I do something along the liens of having an "If my charecter is X level then learn this skill?"
Thank you but Andar gave me a solution, I didn't consider the idea of using several actors my only concern would be that if he's not in the party he wouldn't get any xp or if there is some backup xp mode that he would show up on the xp screen. In the end i just used $gameActors (4).tp >99 in battle events so it will trigger and change the class


Under Systems>Options there is a box for Reserve EXP

If Lord Andar's resolution is of no avail, explore that.
i'm not sure if you saw my whole post, as i was editing it while everyone else was answering, but what i posted will alleviate your XP concerns and others if you have some of the necessary yanfly plugins.
Thank you a ton, I'll try and implement it when I next get the chance tommorow

Under Systems>Options there is a box for Reserve EXP

If Lord Andar's resolution is of no avail, explore that.
I will do if all else fails, how would it affect armour and weapons is there anyway to have them both equip the same one
That is a good idea I think I will try and utilise that, I imagine there will be a way to change remove the state once before he turns back to his original class so he can learn the skills again or would I do something along the liens of having an "If my charecter is X level then learn this skill?"
yeah, i think grunwave as a bit of solution for that, auto passive states.

if tp is whatever, add auto state, while that state is on, change visibility of skills. that seems about right.

my mage has a cycling set of states always applied that changes which element will do more damage.

<Category: Bypass Death Removal> <Custom Leave Effect> a.addState(28); </Custom Leave Effect> <Element Magnify 2: +100%>

the state itself lasts 3 turns, but i don't see much problem doing a TP requirement instead.
The simplest way to activate a common event mid battle is to attach it to a skill

Another way you could do it is through the troop events. Like for example, it could check each turn if an actor has a state, and if they do, it runs a common event

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-activate-a-common-event-midbattle-or-change-to-change-class.146918/