You don't need a script OR an event to fix this.
Database > System > Options box > Reserve Members' EXP
If you literally remove them, then they are not in the party. You should have stated that you actually remove them from the party in your initial post. Normally "switch out" means change formation so they're no longer a battler (but they're still in the party).
So what you're after is, when EXP is gained from battles, to also give it to anyone who HAS BEEN in the party but is currently NOT in the party?
Are you using any custom party or battle scripts? If so, please list them and provide links.
If you are using event battles (Like the enemies are on the map) you can just make the event give all out of party players the EXP after the battle through event commands. (Assuming you're not using random encounters, which is a majority hatred option, even I personally hate random battles.)
Other than that, don't use your current party script and switch to a better one that has party formation. Party reserves is just going to make things harder.
Do you want them all to have the same EXP, or the same LEVEL? If they have different EXP curves, giving them the same EXP will not necessarily put them at the same level.
I would just do events to add the character to the party, do a Call Script command to get the EXP or LEVEL I want them to have (whether it's the value of a certain party member, the average of the current party, or the maximum of the current party), then (in the same call script command) change the new person's EXP or LEVEL to the same value.
That way, it's only calculated and applied when you change party members, not during every single battle (or if the party can gain EXP out of battle).
Well, how do you want it to work? Do you want to give them the same EXP or the same LEVEL? And do you want to base it on a certain character, the leader, the maximum of the party, or the average of the party?
(you don't have to quote the whole post when you're replying immediately after)
Oh, sorry for quoting then!
I want it to be EXP of the leader.
Okay, in your event where you add the actor, do this (the Script line is created by using the Script event command, which is the last one on tab 3 of the event commands):
Change Party Member: Add [Actor], Initialize
Script: $game_actors[id].change_exp(
$game_party.leader.exp, false)
The bits in bold and underlined need to be substituted:
Actor will be the actor you want to add to the party
id is the id of that actor in the database (don't include 0s at the beginning)
So if I want to add actor 3, whose name is Terence, it'll end up looking like this:
Change Party Member: Add [Terence], Initialize
Script: $game_actors[3].change_exp(
$game_party.leader.exp, false)
If you have the newest version of Ace, which has a much wider script window, you don't need to split the second and third line. But if you're using the version with the smaller script window, make sure the line break is right after the (
You may not want to initialize them if they've been in your party before, but you should already have that sorted out, as it's not related to this query.
You don't actually type Script: in the script.
It looks like you've got the version with the wider script editor. See if you can put that all on one line (but it doesn't really make a difference).
Hoozah! It worked. Problem solved.
Also feel like a real idiot for putting Script: in the script call. I face palmed once I realized it.
lol - you wouldn't be the first person who's done that 🙂 I should have explained that your event would look like that in the end, not that you should type the whole line exactly.
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.