Class changing after battle

Status
Not open for further replies.

namelessCiel

Villager
Member
Joined
Jun 29, 2014
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
Good day,

I would like to change an actor's class after every battle ends.

The character has 3 skills that change its class to a different one in battle by calling a common script, which turns on a switch. When the switch is turned on, a parallel process event comes on and changes the class for the character.

Each class enables and disables a certain set of skills accordingly. And finally, two of the class-changing skill come together with positive MP regeneration as states, and HP damage every turn. The first class changing skill unlocks no skill sets and removes the HP/MP states.

Ideally, the character should always start a battle as "class 1", change onto either "class 2" or "class 3" while getting the benefits of the MP regen and the HP damage while in battle. Then, when the battle ends, it should go back to "class 1" and the states for HP/MP should end/be removed after battle.

The problem is I can't figure out how to make it go back to "class 1". If the character remains on "class 2" or "class 3" after battle, then the skills they seal or enable are unlocked accordingly, but they lose the MP regen/HP damage every turn which is important to their functioning. If the states don't end after battle, then they're simply stuck taking damage in the overworld until I change them back to "class 1" manually in battle. Plus, I would highly prefer if the character would simply go back to "class 1" rather than getting the HP/MP states back as soon as a battle starts.

I know it might be possible to change this by editing the BattleManager script to make it part of the battle end to change the job ID of the actor into "class 1". I know how to access BattleManager but I know nothing about scripting; I don't know how to make that change. Could someone please help me with this or provide me with the change to the script?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
No, you should not need scripts for this.


Please post screenshots of your event and we'll check what you did wrong and tell you how to make it work...
 

namelessCiel

Villager
Member
Joined
Jun 29, 2014
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
Thank you for your reply. As you asked, I took some screenshots.







It's the same for all 3 skills basically. The classes change when using the skill to call the common event, but I can't figure out how to make it go back to "class 1".
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Your problem is with your settings of the common event.


A parallel process common event can never be called by an effect call, that's why the switch never gets turned ON.


If you want to call a common event (no matter if from command or by effect), the trigger needs to be NONE.


And why did you make a map event for the change class? that way it will only happen if the actor is on that map when the skill is executed.


If you want it to happen on every map where the skill is executed, erase that map event and change the common event to include that change class.


Or better. make it a different common event on parallel, that way it will happen on all maps after the battle.
 
Last edited by a moderator:

namelessCiel

Villager
Member
Joined
Jun 29, 2014
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
Thanks for the help, I wasn't sure if I could use the common event for that. I was following someone else's instructions, it doesn't seem like they were correct.

With that being said, the skills did change the class of the user though. Changing the class is not a problem. The problem is making it so that every time the battle is over, they go back to their default class.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
The problem is making it so that every time the battle is over, they go back to their default class.
Make a new, additional common event "Transform back", set it to parallel process and condition it to a new switch "after battle".
That event should contain two commands:


1) change class to the class you want them to have after battle


2) turn switch "after battle" OFF


Then go to the troop tab, and create an additional troop event. Set it to run once on Turn 0 of the battle.


Inside this troop event, you place a control switch command "after battle" ON.


You either need to copy that troop event into all troops, or use a script that executes all events from a default troop in all battles.


That is all you need, because the parallel process common event will not run during battle and only be triggered after the battle.
 

namelessCiel

Villager
Member
Joined
Jun 29, 2014
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
That worked like a charm. Thank you very much.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.


Edit: and unlocked again


Instead of using the Change Actor Class command, use its script equivalent, which allows you to pass an argument telling it NOT to reset the EXP.


Note the id of your actor and of the class - ignore any leading zeros. For the example, I'll use actor 3 and class 7.

$game_actors[3].change_class(7, true)This means he'll change classes and keep his EXP, and his level after the change will be equivalent to the new class's level at that EXP.
What WON'T happen though, is a change in skills. Skills your actor had learned from the previous class will not be lost, and skills the actor would learn from the new class via levelling up will not be learned.


If THAT is going to be an issue, you would need to look into scripts. I do know there's at least one out there that allows you to change class, keep EXP and get the correct level, AND do the switching of the skills. I just don't recall its name or who wrote it.
 
Last edited by a moderator:

namelessCiel

Villager
Member
Joined
Jun 29, 2014
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
Everything works the way it should now. Thanks a lot.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You sure, now? ;)


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top