TheoAllen

Theo Exp Split

Feb 10th, 2013
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.03 KB | None | 0 0
  1. # =============================================================================
  2. # ~ Experience Split by TheoAllen ~
  3. # Version : 1.0
  4. # Contact : www.rpgmakerid.com
  5. # =============================================================================
  6. # Description :
  7. # This script make the experience gained from battle divided by total party
  8. # battle members
  9. # -----------------------------------------------------------------------------
  10.  
  11. # Instruction :
  12. # Insert this script above main and below Material.
  13. # -----------------------------------------------------------------------------
  14.  
  15. # Terms of use :
  16. # You may use and edit this script both for commercial and non-commercial.  
  17. # Credit isn't necessary. But if you wish to, you can put "TheoAllen" in your
  18. # credit list.
  19. # -----------------------------------------------------------------------------
  20.  
  21. # =============================================================================
  22. # Configuration :
  23. # =============================================================================
  24. module THEOLIZED  
  25.  
  26.   ALIVE_MEMBERS = true # Exp will splited by the number of alive party members
  27.  
  28. end
  29. # =============================================================================
  30. # Do not edit unless you know what to do ~
  31. # =============================================================================
  32. module BattleManager  
  33.   def self.display_exp
  34.     if $game_troop.exp_total > 0
  35.       if THEOLIZED::ALIVE_MEMBERS
  36.         text = sprintf(Vocab::ObtainExp, $game_troop.exp_total/$game_party.alive_members.size)
  37.       else
  38.         text = sprintf(Vocab::ObtainExp, $game_troop.exp_total/$game_party.members.size)
  39.       end
  40.       $game_message.add('\.' + text)
  41.     end
  42.   end
  43.  
  44.   def self.gain_exp
  45.     $game_party.all_members.each do |actor|
  46.        if THEOLIZED::ALIVE_MEMBERS
  47.          actor.gain_exp($game_troop.exp_total/$game_party.alive_members.size)
  48.        else
  49.          actor.gain_exp($game_troop.exp_total/$game_party.members.size)
  50.        end
  51.     end
  52.     wait_for_message
  53.   end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment