I have a character that is meant to join the party later in the game, so I had it set to average his level with the rest of the party. The issue I'm having is after his level is changed, he didn't learn any of the skills he should have. How do I fix this?
I'm using a variable set with his level and a conditional branch to learn the skills, but I'd like an easier method if there is one.
This will set the level by the average level of the current active party, not including any in "reserve":
lvl = 0
$game_party.actors.each {|a|
lvl += a.level
}
lvl /= $game_party.actors.size
$game_actors[1].level = lvl
This will factor in reserve party members, but be careful that you don't have a bunch sitting at level 1, since it will greatly skew the average:
lvl = count = 0
(1..$data_actors.size).each {|i|
if $game_actors[i] != nil
lvl += $game_actors[i].level
count += 1
end
}
lvl /= count
$game_actors[1].level = lvl
Just put these in a script call.
For both methods, you need to replace the number in the brackets from the 1 to the ID of the actor you want to set the level of.
F0, I suggest you set the average level using the average EXP. This would be a lot better.
Thanks for the help and sorry for the late reply, been a little under the weather :^_^':