Himeworks Exp script

Hello ,


I got a little question for you.


I'm using those scripts


- Actor Victory Exp


- Enemy Levels


- Level Difference Exp





now I would like to use Shared EXP script too , to add more exp if you have less people in battle.


Well I'm not sure about this...this is what I am try to do





I'm doing a suikoden game , so all my enemies give a 200 flat exp.


So if you are at the same level as the enemy , u get 200exp per enemy per character right ? so if you got 2 characters in the battle, I want them to receive 200exp/2 so 100exp for each killed enemy. If a party of 3 , u get 200/3 and so on. But the way it is right now , it doesn't work like that.


Not sure if u got this , but I can always explain more if you want. This is the exp chart I'm using right now





EXP_TABLE = {
   1 => { # ENEMY ID HERE
      14 => 9500,   # LEVEL DIFFERENCE, AND EXP BONUS
      13 => 9100,
      12 => 8800,
      11 => 8300,
      10 => 7800,
       9 => 7300,
       8 => 6700,
       7 => 5800,
       6 => 4900,
       5 => 3700,
       4 => 2400,
       3 => 1400,
       2 => 700,
       1 => 200,       
       0 => 0,     # Normal EXP
      -1 => -40,
      -2 => -80,
      -3 => -110,
      -4 => -130,
      -5 => -150,
      -6 => -170,
      -7 => -180,
      -8 => -185,
      -9 => -190,
     -10 => -193,
     -11 => -195,
     -12 => -197,
     -13 => -198,
   }
}


... to add more exp if you have less people in battle.



All games with the shared XP feature just split the total XP gained at the end of the battle by the number of party members.


In short, you don't get more XP with less party members, it is the other way around: you get less XP per actor when there are more people in the party.


The total XP gained is the same, no matter how many party members you got, but that total XP is split between the party members equally.


In the end, it might look the same, but code- and logic-wise, it makes a difference.


So, you can simply alias the exp_total method in the Game_Troop class, and divide the value gained from the alias with the number of party members.


class Game_Troop < Game_Unit

alias shared_xp8882 exp_total
def exp_total
return shared_xp8882 / $game_party.members.size
end

end


Doing this should work.

Original thread: https://forums.rpgmakerweb.com/threads/himeworks-exp-script.67283/