Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- Single Party E"XP Script (ver 0.1a)
- DESCRIPTION:
- Modifies various exp functions so that the entire party has the same EXP.
- This uses up a variable in the game, witch you can specify in SETTINGS::SETVAR.
- That way everyone catches up in an instant. Initializing becomes useless, except
- for equipment.
- This however, renders rising EXP gain useless.
- Adding value to designated variable overshoots EXP bar, but is fixed with a
- victory in battle
- ======================================
- Known issues:
- 0.1a - When changing the EXP variable directly, EXP overshoots the EXP bar in
- display. Minor glitch. Fixable by battle.
- ======================================
- Instructions:
- Paste this script above Main, below Materials, and below other EXP scripts.
- It may or may not collide with other EXP scripts. So choose wisely.
- Script by CaliforniaMacky
- =end
- module SETTINGS
- #SETVAR is for setting the variable in the database to hold the Party EXP
- SETVAR = 1
- #HEAL_AFTER_BATTLE sets whether or not to fully heal the party after battle.
- HEAL_AFTER_BATTLE = true
- end
- class Game_Actor < Game_Battler
- def exp
- default = SETTINGS::SETVAR
- $game_variables[default] #@exp[@class_id]
- end
- end
- module BattleManager
- def self.gain_exp
- default = SETTINGS::SETVAR
- $game_variables[default] += $game_troop.exp_total
- $game_party.all_members.each do |actor|
- actor.change_exp($game_variables[default], 0)
- end
- wait_for_message
- end
- def self.adjust_exp
- default = SETTINGS::SETVAR
- $game_party.all_members.each do |actor|
- actor.change_exp($game_variables[default], 0)
- end
- end
- def self.heal_mofo
- if ((SETTINGS::HEAL_AFTER_BATTLE) == true)
- $game_party.all_members.each { |actor| actor.recover_all } #THIS LINE
- end
- end
- #--------------------------------------------------------------------------
- # * Victory Processing
- #--------------------------------------------------------------------------
- def self.process_victory
- play_battle_end_me
- replay_bgm_and_bgs
- $game_message.add(sprintf(Vocab::Victory, $game_party.name))
- display_exp
- gain_gold
- gain_drop_items
- gain_exp
- heal_mofo
- SceneManager.return
- battle_end(0)
- return true
- end
- #--------------------------------------------------------------------------
- # * Abort Processing
- #--------------------------------------------------------------------------
- def self.process_abort
- adjust_exp
- heal_mofo
- replay_bgm_and_bgs
- SceneManager.return
- battle_end(1)
- return true
- end
- #--------------------------------------------------------------------------
- # * Defeat Processing
- #--------------------------------------------------------------------------
- def self.process_defeat
- adjust_exp
- $game_message.add(sprintf(Vocab::Defeat, $game_party.name))
- wait_for_message
- if @can_lose
- revive_battle_members
- heal_mofo
- replay_bgm_and_bgs
- SceneManager.return
- else
- SceneManager.goto(Scene_Gameover)
- end
- battle_end(2)
- return true
- end
- end
- #=begin
- class Game_Actor < Game_Battler
- def exp
- default = SETTINGS::SETVAR
- @exp[@class_id] = $game_variables[default]
- end
- def init_exp
- default = SETTINGS::SETVAR
- @exp[@class_id] = [$game_variables[default], 0].max#current_level_exp
- last_level = @level
- level_up while !max_level? && self.exp >= next_level_exp
- level_down while self.exp < current_level_exp
- end
- def change_exp(exp, show)
- default = SETTINGS::SETVAR
- $game_variables[default] = exp
- @exp[@class_id] = [exp, 0].max
- last_level = @level
- last_skills = skills
- level_up while !max_level? && self.exp >= next_level_exp
- level_down while self.exp < current_level_exp
- display_level_up(skills - last_skills) if show && @level > last_level
- refresh
- end
- end
- #=end
Advertisement
Add Comment
Please, Sign In to add comment