Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # ~ Experience Split by TheoAllen ~
- # Version : 1.0
- # Contact : www.rpgmakerid.com
- # =============================================================================
- # Description :
- # This script make the experience gained from battle divided by total party
- # battle members
- # -----------------------------------------------------------------------------
- # Instruction :
- # Insert this script above main and below Material.
- # -----------------------------------------------------------------------------
- # Terms of use :
- # You may use and edit this script both for commercial and non-commercial.
- # Credit isn't necessary. But if you wish to, you can put "TheoAllen" in your
- # credit list.
- # -----------------------------------------------------------------------------
- # =============================================================================
- # Configuration :
- # =============================================================================
- module THEOLIZED
- ALIVE_MEMBERS = true # Exp will splited by the number of alive party members
- end
- # =============================================================================
- # Do not edit unless you know what to do ~
- # =============================================================================
- module BattleManager
- def self.display_exp
- if $game_troop.exp_total > 0
- if THEOLIZED::ALIVE_MEMBERS
- text = sprintf(Vocab::ObtainExp, $game_troop.exp_total/$game_party.alive_members.size)
- else
- text = sprintf(Vocab::ObtainExp, $game_troop.exp_total/$game_party.members.size)
- end
- $game_message.add('\.' + text)
- end
- end
- def self.gain_exp
- $game_party.all_members.each do |actor|
- if THEOLIZED::ALIVE_MEMBERS
- actor.gain_exp($game_troop.exp_total/$game_party.alive_members.size)
- else
- actor.gain_exp($game_troop.exp_total/$game_party.members.size)
- end
- end
- wait_for_message
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment