Mother 3 Visuals Mod by Ramiro

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
This script changes the party's battle hud to look like Mother3 style of battle hud.

I want to use the hud visual style but not the battle manager as I am using a modified Yanfly, Symphony, Victor, and MogHunter Mix.

I would do it  myself but I don't know which parts are need for the visuals. I just want ti to show the Mother 3 visuals.

Thank you in advance.

Code:
#==============================================================================# Mother3 Visuals# Author Ramiro# Version, 1.3#------------------------------------------------------------------------------# Shows Mother 3 visual, battle system.#==============================================================================$imported = {} if $imported.nil?$imported['Ramiro-Mother3Visual'] = truemodule BattleConfig  # tone of the window when dead and when the hp is below 1/4  Window_DeadTone      = Tone.new(200, 0, 0)  Window_CriticalTone  = Tone.new(200, 120, 10)  # Chech if the message window is always on the top of the screen.  AlwaysOnTop          = true    # animations used on magic reflection and counterattack, set to 0 if you  # wish to disable  Reflex_AnimationID        = 94  Counterattack_AnimationID = 95  PanoramicCamera  = true  PanoramicCameraH = 160    DisapearWhenNoSelection = false  end#==============================================================================# ¦ #==============================================================================class Scene_Base    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------      attr_reader :info_viewport  end#==============================================================================# ¦ #==============================================================================module BattleManager    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    class << self    alias ramiro_m3_process_victory process_victory  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def self.phase    return @phase  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def self.process_victory      SceneManager.scene.wait(20)    $game_party.members.each do |i|      i.sprite.battle_show if i.alive?    end    SceneManager.scene.wait(20)    ramiro_m3_process_victory  end  end#==============================================================================# ¦ Game_Message#==============================================================================class Game_Message    alias ramiro_m3_position position    def position    return 0 if BattleConfig::AlwaysOnTop && SceneManager.scene_is?(Scene_Battle)    ramiro_m3_position  end  end#==============================================================================# ¦ #==============================================================================class Window_BattleStatusPart < Window_Base    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def initialize(actor_index)    @shake_time = 0    @actor_index = actor_index    @move_time = 0    @x_position = x_at(actor_index)    @x_destination = @x_position    @y_position = 0    @y_destination = 0    super(0, 0, window_width, window_height)    update_screen_position    refresh    hide_actor_quickly  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------      def x_at(actor_index)    128 + (total_draw_area - window_width * window_count) / 2 + window_width * actor_index  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def update_tone    if actor.dead?      self.tone.set(BattleConfig::Window_DeadTone)    elsif actor.hp < actor.mhp / 4      self.tone.set(BattleConfig::Window_CriticalTone)    else      super    end  end        #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def total_draw_area    Graphics.width - 128  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def window_count    $game_party.members.size  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def max_window_count    $game_party.max_battle_members  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def window_width    total_draw_area / max_window_count  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def window_height    fitting_height(visible_line_number)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def screen_x    @x_position  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def screen_y    return @y_position  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def visible_line_number    return 4  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def update    super    if @move_time > 0      @x_position = (@x_position * (@move_time - 1) + @x_destination) / @move_time      @y_position = (@y_position * (@move_time - 1) + @y_destination) / @move_time      @move_time -= 1    end      update_screen_position  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------      def move_to_index(actor_index)    @x_destination = x_at(actor_index)    @move_time = 20  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def return_to_origin    @x_destination = x_at(actor.index)    @y_destination = 0    @move_time = 20      end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def move_down    @y_destination = self.height - line_height - standard_padding    @move_time = 20  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def update_screen_position    self.x = screen_x + shake_amp    self.y = screen_y    self.z = self.y  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------       def shake_amp    if @shake_time > 0      @shake_time -= 1      return @shake_time % 2 * 4 - 2    else      return 0    end    end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def refresh    self.contents.clear    draw_actor_status if actor  end    #--------------------------------------------------------------------------  # ?  #--------------------------------------------------------------------------  def line_color    color = normal_color    color.alpha = 48    color  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def draw_horz_line(y)    line_y = y - 1    contents.fill_rect(0, line_y, contents_width - 24, 2, line_color)  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def draw_actor_status    self.contents.font.size = 16    draw_actor_name(actor, 0, 0, contents.width - 24)    draw_horz_line(line_height)    self.contents.font.size = 16    draw_actor_hp(actor, 2, line_height, contents.width - 4)    if $data_system.opt_display_tp      draw_actor_mp(actor, 2, line_height * 2, contents.width / 2 - 6)      draw_actor_tp(actor, 4 + contents.width / 2, line_height * 2, contents.width / 2 - 6)    else      draw_actor_mp(actor, 2, line_height * 2, contents.width - 4)    end      draw_actor_icons(actor, contents.width - 24, 0, 24)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def show_actor    actor.sprite.battle_show  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def hide_actor    actor.sprite.battle_hide  end  #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def hide_actor_quickly    actor.sprite.opacity = 0  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def index    @actor_index  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def actor    $game_party.members[@actor_index]  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def shake    @shake_time = 20  end  end#==============================================================================# ¦ #==============================================================================class Window_BattleStatusPatner < Window_BattleStatusPart    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     attr_accessor :actor_index    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def window_width    128  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def screen_x    0  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def show    return if $imported["YEA-BattleEngine"]    super  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def screen_y    Graphics.height - window_height  end    end#==============================================================================# ¦ Window_BattleStatus#==============================================================================class Window_BattleStatusMultiple < Window_BattleStatus    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     attr_accessor :viewport  attr_accessor :wait_method    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def initialize    super    @status_windows = []    @viewport = nil    @wait_method = nil    self.visible = false    self.windowskin = Cache.system('')    @index = -1  end    #--------------------------------------------------------------------------  # ? ??????????  #--------------------------------------------------------------------------  def create_contents    self.contents.dispose if self.contents && !self.contents.disposed?    self.contents = Bitmap.new(1, 1)  end    #--------------------------------------------------------------------------  # ? ??????????  #--------------------------------------------------------------------------    def draw_item(index)    return if index.nil?    return unless $game_party.members[index]    @status_windows = [] unless @status_windows    return unless @status_windows[index]    @status_windows[index].refresh  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def window_width    Graphics.width - 128  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def window_height    fitting_height(visible_line_number)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def visible_line_number    return 4  end        #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def refresh	@status_windows = [] if !@status_windows    @status_windows.each do |i|      i.refresh    end    end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def update    super	@status_windows = [] if !@status_windows    need_wait = false    self.visible = false    $game_party.members.each do |actor|      if !@status_windows.any? { |i| i.index == actor.index}        window = Window_BattleStatusPart.new(actor.index)        window.viewport = self.viewport        @status_windows << window        actor.sprite.update        window.x = window.screen_x        window.update        window.viewport.update        window.update        need_wait = true      end      end      @status_windows.each do |i|      if $game_party.members.include?(i.actor)        i.update        i.viewport = self.viewport      else        @status_windows.delete(i)        i.dispose      end      end    SceneManager.scene.wait(1) if need_wait  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def dispose    super    @status_windows = [] if !@status_windows    @status_windows.each do |i|      i.dispose    end      end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def show_actor(index)    @status_windows = [] if !@status_windows    @status_windows.sort! { |a, b| a.index <=> b.index}    @status_windows[index].show_actor if index >= 0 && @status_windows[index]  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def hide_actor(index)    @status_windows = [] if !@status_windows    @status_windows.sort! { |a, b| a.index <=> b.index}    @status_windows[index].hide_actor if index >= 0 && @status_windows[index]  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def select(index=0)    hide_actor(@index) if index > @index || BattleConfig::DisapearWhenNoSelection    wait_show    @index = index    show_actor(@index)    wait_show  end  #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------   def wait_show    return unless @wait_method    @wait_method.call(20)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def unselect    #hide_actor(@index)    @index = -1  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def shake_window(index)	@status_windows = [] if !@status_windows    @status_windows.sort! { |a, b| a.index <=> b.index}    @status_windows[index].shake  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def window_at(index)	@status_windows = [] if !@status_windows    @status_windows.sort! { |a, b| a.index <=> b.index}    @status_windows[index]  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def show	@status_windows = [] if !@status_windows    @status_windows.each do |i|      i.show    end    super  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def hide	@status_windows = [] if !@status_windows    @status_windows.each do |i|      i.hide    end    super  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------      def make_window_return(index)	@status_windows = [] if !@status_windows    @status_windows.sort! { |a, b| a.index <=> b.index}    @status_windows[index].return_to_origin  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def substitute(target_index, substitute_index)  	@status_windows = [] if !@status_windows    @status_windows[substitute_index].move_to_index(target_index)    @status_windows[target_index].move_down  end    end#==============================================================================# ¦ #==============================================================================class Game_Enemy < Game_Battler    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def sprite    SceneManager.scene.spriteset.enemy_sprites.reverse[self.index]  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def atk_animation_id1    return 1  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def atk_animation_id2    return 0  end    end#==============================================================================# ¦ #==============================================================================class Game_Actor < Game_Battler    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     alias ramiro_m3_setup setup    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     attr_accessor :extra_y    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def setup(actor_id)    ramiro_m3_setup(actor_id)    @extra_y = 0  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def use_sprite?    return true  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def sprite    SceneManager.scene.spriteset.actor_sprites[self.index]  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------      def status_window    return nil if !SceneManager.scene_is?(Scene_Battle)    return nil if !SceneManager.scene.status_window    SceneManager.scene.status_window.window_at(self.index)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------      def screen_y    return Graphics.height - 120 + @extra_y  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------      def screen_x    return 0 if !self.index        return -1000 if !SceneManager.scene    return -1000 if !status_window    sw = status_window    sw.screen_x + sw.width / 2 - sw.viewport.ox + sw.viewport.rect.x  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def screen_z    return -1000 if !self.index        return -1000 if !SceneManager.scene        100  end    end#==============================================================================# ¦ #==============================================================================class Sprite_Battler < Sprite_Base    FRONTAL = false    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    alias ramiro_m3_initialize initialize  alias ramiro_m3_start_effect start_effect  alias ramiro_m3_update_effect update_effect  alias ramiro_m3_setup_new_animation setup_new_animation  #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def initialize(viewport, battler=nil)    ramiro_m3_initialize(viewport, battler)    if battler && battler.actor?      self.visible = false      self.opacity = 0    end  end  #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def battle_show    return if !@battler || @battler.enemy?    start_effect(:go_up)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def battle_hide    return if !@battler || @battler.enemy?    start_effect(:go_down)     end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def start_effect(effect_type)    @effect_type = effect_type        case effect_type    when :go_up      revert_to_normal      @effect_duration = 20    when :go_down      revert_to_normal      @effect_duration = 20    else        ramiro_m3_start_effect(effect_type)    end    end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def update_effect    if @effect_duration > 0       @effect_duration -= 1      case @effect_type      when :go_up        update_go_up_effect      when :go_down        update_go_down_effect      end        @effect_duration += 1    end      ramiro_m3_update_effect  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def update_go_up_effect    self.opacity = (self.opacity * @effect_duration + 255 ) / (@effect_duration + 1)    @battler.extra_y = (@battler.extra_y * @effect_duration) / (@effect_duration + 1)    self.visible = (self.opacity > 50)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def update_go_down_effect    self.opacity = (self.opacity * @effect_duration) / (@effect_duration + 1)    @battler.extra_y = (@battler.extra_y * @effect_duration + 60) / (@effect_duration + 1)        self.visible = (self.opacity > 50)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def update_bitmap    if @battler.enemy?      new_bitmap = Cache.battler(@battler.battler_name, @battler.battler_hue)    else      new_bitmap = Cache.character(@battler.character_name)    end      if bitmap != new_bitmap      self.bitmap = new_bitmap      init_visibility      update_rect if self.bitmap && @battler.actor?    end    self.opacity = 0 if @battler.actor? && @battler.extra_y == 60  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def update_blink      end      #--------------------------------------------------------------------------  # * Initialize Visibility  #--------------------------------------------------------------------------  def init_visibility    return @battler_visible = true if @battler.actor?     @battler_visible = @battler.alive?    self.opacity = 0 unless @battler_visible  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def setup_new_effect    if !@battler_visible && @battler.alive? && @battler.enemy?      start_effect(:appear)    elsif @battler_visible && @battler.hidden? && @battler.enemy?      start_effect(:disappear)    elsif @battler.alive? && @was_dead      @was_dead = false      start_effect(:appear)    end    if @battler_visible && @battler.sprite_effect_type      start_effect(@battler.sprite_effect_type)      @battler.sprite_effect_type = nil    end    setup_popups if $imported["YEA-BattleEngine"]  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def revert_to_normal    self.blend_type = 0    self.color.set(0, 0, 0, 0)    self.opacity = 255    self.ox = bitmap.width / 2 if bitmap    if @battler.enemy?      self.src_rect.y = 0    else        update_rect    end    end      alias ramiro_m3_revert_to_normal revert_to_normal    #--------------------------------------------------------------------------  # * Revert to Normal Settings  #--------------------------------------------------------------------------  def revert_to_normal    ramiro_m3_revert_to_normal    if self.battler.actor?      update_rect      update_origin    end  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def update_rect    sign = @battler.character_name[/^[\!\$]./]    if sign && sign.include?('$')      i = 0      j = 0      w = self.bitmap.width / 3      h = self.bitmap.height / 4    else      i = @battler.character_index % 4      j = @battler.character_index / 4      w = self.bitmap.width / 12      h = self.bitmap.height / 8          end    k = FRONTAL ? 3 : 0    self.src_rect.set(w + i * w * 3, j * h * 4 + k, w, h * 3 / 4)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def update_origin    if bitmap      self.ox = self.width / 2      self.oy = self.height    end  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def animation_set_sprites(frame)    cell_data = frame.cell_data    @ani_sprites.each_with_index do |sprite, i|      next unless sprite      pattern = cell_data[i, 0]      if !pattern || pattern < 0        sprite.visible = false        next      end      sprite.bitmap = pattern < 100 ? @ani_bitmap1 : @ani_bitmap2      sprite.visible = true      sprite.src_rect.set(pattern % 5 * 192,        pattern % 100 / 5 * 192, 192, 192)      if @ani_mirror        sprite.x = @ani_ox - cell_data[i, 1]        sprite.y = @ani_oy + cell_data[i, 2]        sprite.angle = (360 - cell_data[i, 4])        sprite.mirror = (cell_data[i, 5] == 0)      else        sprite.x = @ani_ox + cell_data[i, 1]        sprite.y = @ani_oy + cell_data[i, 2]        sprite.angle = cell_data[i, 4]        sprite.mirror = (cell_data[i, 5] == 1)      end      sprite.z = self.z + 300 + i      sprite.ox = 96      sprite.oy = 96      sprite.zoom_x = cell_data[i, 3] / 100.0      sprite.zoom_y = cell_data[i, 3] / 100.0      sprite.opacity = cell_data[i, 6]      sprite.blend_type = cell_data[i, 7]    end  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def setup_new_animation    return if @battler.actor?    ramiro_m3_setup_new_animation  end      alias ramiro_m3_update update    def update    ramiro_m3_update    return unless BattleConfig::PanoramicCamera    return unless self.battler     self.zoom_x = self.zoom_y = ((self.y - BattleConfig::PanoramicCameraH * 130 / 100) * 0.005 + 1.0) if self.battler.enemy?  end  end#==============================================================================# ¦ #==============================================================================class Spriteset_Battle    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------   alias ramiro_m3_create_viewports create_viewports  alias ramiro_m3_update_viewports update_viewports  alias ramiro_m3_dispose_viewports dispose_viewports  alias ramiro_m3_create_actors create_actors  alias ramiro_m3_dispose_actors dispose_actors  alias ramiro_m3_update_actors update_actors    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     attr_reader :actor_sprites  attr_reader :enemy_sprites    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def create_viewports    @viewport4 = Viewport.new    @viewport4.z = 200    ramiro_m3_create_viewports    @viewportPopups.z = 500 if @viewportPopups  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def update_viewports    ramiro_m3_update_viewports    @viewport4.update  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def dispose_viewports    ramiro_m3_dispose_viewports    @viewport4.dispose  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def create_actors    ramiro_m3_create_actors    @actor_animation = Array.new(4) {Sprite_ActorAnimation.new(@viewport4)}  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def dispose_actors    ramiro_m3_dispose_actors    @actor_animation.each do |i|      i.dispose    end    end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def update_actors    ramiro_m3_update_actors     @actor_animation.each_with_index do |sprite, i|      sprite.update      sprite.actor = $game_party.members[i]    end     end    end#==============================================================================# ¦ #==============================================================================class Sprite_ActorAnimation < Sprite_Base    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    attr_accessor :actor    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def initialize(viewport, actor=nil)    super(viewport)    @actor = actor  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def update    super    return unless @actor    if @actor.animation_id != 0      animation = $data_animations[@actor.animation_id]      mirror = @actor.animation_mirror      start_animation(animation, mirror)            @actor.animation_id = 0    end      self.x = @actor.screen_x    self.y = @actor.screen_y  end  end#==============================================================================# ¦ #==============================================================================class Scene_Battle < Scene_Base    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     alias ramiro_m3_next_command next_command  alias ramiro_m3_prior_command prior_command  alias ramiro_m3_apply_item_effects apply_item_effects  alias ramiro_m3_create_all_windows create_all_windows  alias ramiro_m3_on_actor_ok on_actor_ok  alias ramiro_m3_on_actor_cancel on_actor_cancel  alias ramiro_m3_select_actor_selection select_actor_selection    alias ramiro_m3_invoke_item invoke_item  alias ramiro_m3_apply_substitute apply_substitute  alias ramiro_m3_invoke_counter_attack invoke_counter_attack  alias ramiro_m3_invoke_magic_reflection invoke_magic_reflection  #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     attr_reader :spriteset  attr_reader :status_window    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def apply_item_effects(target, item)    @status_window.shake_window(target.index) if target.actor? && !item.damage.none? && !item.damage.recover?    ramiro_m3_apply_item_effects(target, item)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def create_status_window    @status_window = Window_BattleStatusMultiple.new    @status_window.wait_method = method( :wait )   end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def show_attack_animation(targets)    show_normal_animation(targets, @subject.atk_animation_id1, false)    show_normal_animation(targets, @subject.atk_animation_id2, true)  end      #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def next_command    ramiro_m3_next_command  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def prior_command    ramiro_m3_prior_command  end  #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def create_all_windows    ramiro_m3_create_all_windows    create_actor_selection_partner_window  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def create_actor_selection_partner_window    @actor_selection_patner = Window_BattleStatusPatner.new(0)    @actor_selection_patner.z = 9999    @actor_selection_patner.hide  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def set_patner_info(index)    @actor_selection_patner.actor_index = index    @actor_selection_patner.refresh    @actor_selection_patner.show  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def execute_action    @subject.sprite.battle_show if @subject.actor?    @invoked_targets = [@subject]    wait(20)    use_item    @log_window.wait_and_clear    unless $game_troop.all_dead?      @invoked_targets.each do |actor|        next unless actor.actor?        actor.sprite.battle_hide      end    end      wait(20)  end       #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def on_actor_ok    @actor_selection_patner.hide    ramiro_m3_on_actor_ok  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def on_actor_cancel    @actor_selection_patner.hide    ramiro_m3_on_actor_cancel  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def select_actor_selection    set_patner_info(BattleManager.actor.index)    ramiro_m3_select_actor_selection  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------     def invoke_item(target, item)    ramiro_m3_invoke_item(target, item)    wait(20)    $game_party.members.each do |actor|      @status_window.make_window_return(actor.index)    end    wait(20)       end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------    def invoke_counter_attack(target, item)    @invoked_targets.push << target        target.sprite.battle_show if target.actor?    target.animation_id = BattleConfig::Counterattack_AnimationID       ramiro_m3_invoke_counter_attack(target, item)  end    #--------------------------------------------------------------------------  # ?   #--------------------------------------------------------------------------  def invoke_magic_reflection(target, item)      @invoked_targets.push << target       target.sprite.battle_show if target.actor?    target.animation_id = BattleConfig::Reflex_AnimationID    ramiro_m3_invoke_magic_reflection(target, item)    end    #--------------------------------------------------------------------------  # ?  #--------------------------------------------------------------------------  def apply_substitute(target, item)    new_target = ramiro_m3_apply_substitute(target, item)    if new_target != target && target.actor? && new_target.actor?      @status_window.substitute(target.index, new_target.index)      wait(40)    end     new_target  end      alias ramiro_m3_start_party_command_selection start_party_command_selection    def start_party_command_selection    for battler in $game_party.members      battler.sprite_effect_type = $game_troop.turn_count > 0 ? :go_up : :appear     end      wait(20)     ramiro_m3_start_party_command_selection  end      alias ramiro_m3_command_escape command_escape    def command_escape    for battler in $game_party.members      battler.sprite_effect_type = :go_down     end      wait(20)     ramiro_m3_command_escape  end        alias ramiro_m3_turn_start turn_start    def turn_start    wait(20)    @info_viewport.ox = 0    for battler in $game_party.members      battler.status_window.viewport = @info_viewport if battler.status_window      battler.sprite_effect_type = :go_down     end      wait(20)     ramiro_m3_turn_start  end       end
 
Last edited by a moderator:

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
You mean you want something with the kinda psychedelic moving background that's it? 
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
No its not for the battleback Pokeymon. I updated the first post with details.
 

R-Soul

Battle Sonata
Veteran
Joined
May 22, 2013
Messages
56
Reaction score
12
First Language
Spanish
Primarily Uses
Something like this I suppose?

Put these scripts in order:

#==============================================================================
# ** Earthbound-Ish Battle Core
#------------------------------------------------------------------------------
# Version: 1.0
# Author: cozziekuns
# Date: February 17, 2013
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# This script attempts to mimic the battle system of the Earthbound/Mother
# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3).
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials. Edit the modules to your liking.
#==============================================================================

#==============================================================================
# ** Cozziekuns
#==============================================================================

module Cozziekuns
 
  module Earthboundish
   
    ActorIcons ={
      # Command Name => IconID
      "Attack" => 116,
      "Magic" => 152,
      "Special" => 128,
      "Guard" => 161,
      "Items" => 260,
      "Escape" => 474,
    }
   
  end
 
end

include Cozziekuns

#==============================================================================
# ** Sprite Battler
#==============================================================================

class Sprite_Battler

  alias coz_ebish_spbtlr_update_effect update_effect
  def update_effect(*args)
    update_select_whiten if @effect_type == :select_white
    if @battler.sprite_effect_type == :select_white_to_normal
      revert_to_normal
      @battler.sprite_effect_type = nil
    end
    coz_ebish_spbtlr_update_effect(*args)
  end

  def update_select_whiten
    self.color.set(255, 255, 255, 0)
    self.color.alpha = 128
  end
 
end

#==============================================================================
# ** Window_ActorCommand
#==============================================================================

class Window_ActorCommand

  def visible_line_number
    return 1
  end

  def col_max
    return 6
  end

  def contents_height
    item_height
  end

  def top_col
    ox / (item_width + spacing)
  end

  def top_col=(col)
    col = 0 if col < 0
    col = col_max - 1 if col > col_max - 1
    self.ox = col * (item_width + spacing)
  end

  def bottom_col
    top_col + col_max - 1
  end

  def bottom_col=(col)
    self.top_col = col - (col_max - 1)
  end

  def ensure_cursor_visible
    self.top_col = index if index < top_col
    self.bottom_col = index if index > bottom_col
  end

  def item_rect(index)
    rect = super
    rect.x = index * (item_width + spacing)
    rect.y = 0
    rect
  end

  def window_width
    Graphics.width - 224
  end
 
  def open
    @help_window.open
    super
  end
 
  def close
    @help_window.close
    super
  end
 
  def update
    super
    @help_window.update
  end
 
  def draw_item(index)
    rect = item_rect_for_text(index)
    x = rect.x + rect.width / 2 - 12
    y = item_rect_for_text(index).y
    draw_icon(Earthboundish::ActorIcons[command_name(index)], x, y, command_enabled?(index))
  end
 
  alias coz_ebish_waccmd_make_command_list make_command_list
  def make_command_list(*args)
    coz_ebish_waccmd_make_command_list(*args)
    add_escape_command
  end
 
  def add_escape_command
    add_command(Vocab::escape, :escape, BattleManager.can_escape?)
  end
 
  def update_help
    @help_window.set_text(command_name(index))
  end
 
end

#==============================================================================
# ** Window_BattleStatus
#==============================================================================

class Window_BattleStatus
 
  [:basic_area_rect, :gauge_area_rect].each { |method|
    define_method(method) { |index|
      rect = item_rect(index)
      rect
    }
  }
 
  def col_max
    $game_party.members.size
  end
 
  def window_width
    Graphics.width / ( 4 / $game_party.members.size.to_f )
  end
 
  def window_height
    fitting_height($data_system.opt_display_tp ? 5 : 4)
  end
 
  def item_width
    (window_width - standard_padding * 2) / $game_party.members.size
  end
 
  def item_height
    (window_height - standard_padding * 2)
  end
 
  def draw_basic_area(rect, actor)
    draw_actor_name(actor, rect.x, rect.y, rect.width)
    draw_actor_icons(actor, rect.x + 4, rect.y + line_height, rect.width)
  end

  def draw_gauge_area_with_tp(rect, actor)
    draw_gauge_area_without_tp(rect, actor)
    draw_actor_tp(actor, rect.x + 4, rect.y + line_height * 4, rect.width - 8)
  end

  def draw_gauge_area_without_tp(rect, actor)
    draw_actor_hp(actor, rect.x + 4, rect.y + line_height * 2, rect.width - 8)
    draw_actor_mp(actor, rect.x + 4, rect.y + line_height * 3, rect.width - 8)
  end
 
  def draw_actor_name(actor, x, y, width = 112)
    change_color(hp_color(actor))
    draw_text(x, y, width, line_height, actor.name, 1)
  end
 
  alias coz_ebish_wbtlsts_item_rect item_rect
  def item_rect(index, *args)
    rect = coz_ebish_wbtlsts_item_rect(index, *args)
    rect.x = index % col_max * item_width
    rect
  end
 
  def update
    super
    update_position
  end
 
  def update_position
    self.x = (Graphics.width - window_width) / 2 + 128
  end
 
end

#==============================================================================
# ** Window_BattleActor
#==============================================================================

class Window_BattleActor
 
  def update_position
    self.x = (Graphics.width - window_width) / 2
  end
 
end

#==============================================================================
# ** Window_BattleEnemy
#==============================================================================

class Window_BattleEnemy
 
  def cursor_left(wrap)
    select((index - 1 + item_max) % item_max)
  end
 
  def cursor_right(wrap)
    select((index + 1) % item_max)
  end
 
  def cursor_up(wrap)
    cursor_left(true)
  end
 
  def cursor_down(wrap)
    cursor_right(true)
  end

  def show
    select(0)
    self
  end
 
  def update_help
    @help_window.set_text(enemy.name)
  end

end

#==============================================================================
# ** Window_BattleSkill + Window_BattleItem
#==============================================================================

[:Window_BattleSkill, :Window_BattleItem].each { |klass|
  Object.const_get(klass).send:)define_method, :show) {
    select_last
    super()
  }
  Object.const_get(klass).send:)define_method, :hide) { super() }
}

#==============================================================================
# ** Window_ActorHelp
#==============================================================================

class Window_ActorHelp < Window_Help
 
  def initialize
    super(1)
    self.openness = 0
    update_position
  end
 
  def update_position
    self.x = Graphics.width - 224
    self.width = 224
    create_contents
  end
 
  def refresh
    contents.clear
    draw_text(4, 0, 224 - standard_padding * 2, line_height, @text, 1)
  end
 
end

#==============================================================================
# ** Scene_Battle
#==============================================================================

class Scene_Battle
 
  def start_party_command_selection
    unless scene_changing?
      @status_window.open
      @status_window.refresh
      if BattleManager.input_start
        next_command
        start_actor_command_selection
      else
        @party_command_window.deactivate
        turn_start
      end
    end
  end
 
  def create_actor_command_window
    @actor_command_window = Window_ActorCommand.new
    @actor_command_window.set_handler:)attack, method:)command_attack))
    @actor_command_window.set_handler:)skill,  method:)command_skill))
    @actor_command_window.set_handler:)guard,  method:)command_guard))
    @actor_command_window.set_handler:)item,   method:)command_item))
    @actor_command_window.set_handler:)escape, method:)command_escape))
    @actor_command_window.set_handler:)cancel, method:)prior_command))
    @actor_command_window.help_window = Window_ActorHelp.new
  end
 
  def create_help_window
    @help_window = Window_Help.new(1)
    @help_window.visible = false
  end
 
  alias coz_ebish_scbtl_create_enemy_window create_enemy_window
  def create_enemy_window(*args)
    coz_ebish_scbtl_create_enemy_window(*args)
    @enemy_window.help_window = @actor_command_window.help_window
  end
 
  alias coz_ebish_scbtl_update_basic update_basic
  def update_basic(*args)
    old_enemy = @enemy_window.active ? @enemy_window.enemy : nil
    coz_ebish_scbtl_update_basic(*args)
    update_enemy_whiten(old_enemy)
  end
 
  def update_enemy_whiten(old_enemy)
    if !@enemy_window.active or old_enemy != @enemy_window.enemy
      old_enemy.sprite_effect_type = :select_white_to_normal if old_enemy && !old_enemy.dead?
    end
    @enemy_window.enemy.sprite_effect_type = :select_white if @enemy_window.active
  end
 
  def update_info_viewport
    move_info_viewport(128)
  end

end
#==============================================================================
# ** Earthbound-Ish Odometer Roll
#------------------------------------------------------------------------------
# Version: 1.0
# Author: cozziekuns
# Date: February 17, 2013
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# This script attempts to emulate the battle system of the Earthbound/Mother
# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3). This
# certain addon addresses the infamous HP/MP scrolling system that made battles
# that much more intense.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials. Edit the modules to your liking.
#==============================================================================
# Graphics:
#------------------------------------------------------------------------------
# You must have two Odometer pictures in your Graphics/System folder. One of
# them must be named "Odometer_HP", and the other one must be named
# "Odometer_MP". Obviously, they represent the odometer for HP and MP values,
# respectively
#==============================================================================

#==============================================================================
# ** Cozziekuns
#==============================================================================

module Cozziekuns
 
  module Earthboundish
   
    Odometer_Roll_Speed = 4 # Smaller speeds are faster than larger speeds.
   
  end
 
end

include Cozziekuns

#==============================================================================
# ** Game_Actor
#==============================================================================

class Game_Actor
 
  attr_accessor :odometer_hp
  attr_accessor :odometer_mp
 
  alias coz_ebisohd_gmactr_setup setup
  def setup(actor_id, *args)
    coz_ebisohd_gmactr_setup(actor_id, *args)
    @odometer_hp = 0
    @odometer_mp = 0
  end
 
  alias coz_ebishod_gmactr_execute_damage execute_damage
  def execute_damage(user, *args)
    if $game_party.in_battle
      on_damage(@result.hp_damage) if @result.hp_damage > 0
      @odometer_hp += @result.hp_damage
      @odometer_mp += @result.mp_damage
      user.hp += @result.hp_drain
      user.mp += @result.mp_drain
    else
      coz_ebishod_gmactr_execute_damage(user, *args)
    end
  end
 
  [:hp, :mp].each { |stat|
    alias_method("coz_ebishod_gmactr_item_effect_recover_#{stat}".to_sym, "item_effect_recover_#{stat}".to_sym)
    define_method("item_effect_recover_#{stat}".to_sym) { |user, item, effect|
      if $game_party.in_battle
        value = (send("m#{stat}".to_sym) * effect.value1 + effect.value2) * rec
        value *= user.pha if item.is_a?(RPG::Item)
        value = value.to_i
        @result.send("#{stat}_damage=".to_sym, @result.send("#{stat}_damage".to_sym) - value)
        @result.success = true
        send("odometer_#{stat}=".to_sym, send("odometer_#{stat}".to_sym) - value)
      else
        send("coz_ebishod_gmactr_item_effect_recover_#{stat}".to_sym, user, item, effect)        
      end
    }
  }
 
end

#==============================================================================
# ** Game_Enemy
#==============================================================================

class Game_Enemy
 
  def execute_damage(user)
    on_damage(@result.hp_damage) if @result.hp_damage > 0
    self.hp -= @result.hp_damage
    self.mp -= @result.mp_damage
    user.odometer_hp -= @result.hp_drain
    user.odometer_mp -= @result.mp_drain
  end
 
end

#==============================================================================
# ** Window_BattleStatus
#==============================================================================

class Window_BattleStatus
 
  def refresh_hpmp(actor, index)
    rect = item_rect(index)
    if gauge_area_rect(index) == item_rect(index)
      rect.y += line_height * 2
      rect.height -= line_height * 2
      contents.clear_rect(rect)
    else
      contents.clear_rect(gauge_area_rect(index))
    end
    draw_gauge_area(gauge_area_rect(index), actor)
  end
 
  [:hp, :mp].each { |stat|
    define_method("draw_actor_#{stat}".to_sym) { |actor, x, y, width|
      change_color(system_color)
      draw_text(x, y, 30, line_height, Vocab.send("#{stat}_a"))
      od_x = x + contents.text_size(Vocab.send("#{stat}_a")).width + 4
      actor_hp = actor.send("#{stat}".to_sym)
      actor_od_hp = actor.send("odometer_#{stat}".to_sym)
      draw_odometer(od_x, y, stat, actor_hp, actor_od_hp)
    }
  }
 
  def draw_odometer(x, y, type, value, od_value)
    bitmap = Cache.system("Odometer_#{type.upcase}")
    places = [1000, 100, 10, 1]
    od_ary = value.to_s.split("").collect { |str| str.to_i }
    (4 - od_ary.size).times { od_ary.unshift(0) }
    od_ary.each_index { |i|
      src_y = (9 - od_ary) * 20
      if (od_ary.join.to_i) % places == 0 and od_value != 0
        src_y += 20 / Earthboundish::odometer_Roll_Speed * (Graphics.frame_count % Earthboundish::odometer_Roll_Speed)
      end
      contents.blt(x + i * 24, y + 2, bitmap, Rect.new(0, src_y, 24, 20))
    }
  end
 
end

#==============================================================================
# ** Scene_Battle
#==============================================================================

class Scene_Battle
 
  alias coz_ebishod_scbtl_update_basic update_basic
  def update_basic(*args)
    coz_ebishod_scbtl_update_basic(*args)
    update_odometer
  end
 
  def update_odometer
    $game_party.members.each { |actor|
      if actor.odometer_hp != 0 or actor.odometer_mp != 0
        if actor.odometer_hp != 0 and Graphics.frame_count % Earthboundish::odometer_Roll_Speed == 0
          damage = actor.odometer_hp > 0 ? 1 : - 1
          actor.hp -= damage
          actor.odometer_hp -= damage
        end
        if actor.odometer_mp != 0 and Graphics.frame_count % Earthboundish::odometer_Roll_Speed == 0
          damage = actor.odometer_mp > 0 ? 1 : - 1
          actor.mp -= damage
          actor.odometer_mp -= damage
        end
        @status_window.refresh_hpmp(actor, actor.index)
      end
    }
  end
 
end
 

#==============================================================================
# ** Earthbound-Ish Sprite Display
#------------------------------------------------------------------------------
# Version: 1.0
# Author: cozziekuns
# Date: February 17, 2013
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# This script attempts to emulate the battle system of the Earthbound/Mother
# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3). This
# certain addon addresses the character sprite movements found in Mother 3,
# where active actors bobbed up and down the screen.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials.
#==============================================================================

#==============================================================================
# ** BattleManager
#==============================================================================

class << BattleManager
 
  alias coz_ebishspd_btlmngr_init_members init_members
  def init_members(*args)
    coz_ebishspd_btlmngr_init_members(*args)
    @dummy_battler = nil
  end
 
  def dummy_battler
    @dummy_battler
  end
 
  def next_subject
    loop do
      battler = @action_battlers.shift
      unless battler
        @dummy_battler = nil
        return nil
      end
      next unless battler.index && battler.alive?
      @dummy_battler = battler
      return battler
    end
  end
 
end

#==============================================================================
# ** Game_Actor
#==============================================================================

class Game_Actor
 
  def use_sprite?
    true
  end
 
end

#==============================================================================
# ** Sprite_BattlerCharacter
#==============================================================================

class Sprite_BattlerCharacter < Sprite_Battler
 
  def initialize(viewport, battler = nil)
    super(viewport, battler)
    @y_offset = 0
  end
 
  def make_animation_sprites
    @ani_sprites = []
    @ani_duplicated = @@ani_checker.include?(@animation)
    if !@ani_duplicated && @animation.position == 3
      @@ani_checker.push(@animation)
    end
  end
 
  def update
    super
    update_position
    update_zoom
    update_y_offset
  end
 
  def update_bitmap
    new_bitmap = set_character_bitmap
    if bitmap != new_bitmap
      self.bitmap = new_bitmap
      init_visibility
    end
    update_src_rect
  end
 
  def set_character_bitmap
    bitmap = Cache.character(@battler.character_name)
    sign = @battler.character_name[/^[\!\$]./]
    if sign && sign.include?('$')
      @cw = bitmap.width / 3
      @ch = bitmap.height / 4
    else
      @cw = bitmap.width / 12
      @ch = bitmap.height / 8
    end
    self.ox = @cw / 2
    self.oy = @ch
    bitmap
  end
 
  def update_origin
    if bitmap
      self.ox = @cw / 2
      self.oy = 0
    end
  end
 
  def update_src_rect
    index = @battler.character_index
    sx = (index % 4 * 3 + 1) * @cw
    sy = (index / 4 * 4) * @ch
    self.src_rect.set(sx, sy, @cw, @y_offset)
  end
 
  def update_position
    width = Graphics.width / ( 4 / $game_party.members.size.to_f )
    sx = (Graphics.width - width) / 2 + 128
    self.x = @battler.index * 128 + sx / 2 + 12 + 32 * (4 - $game_party.members.size)
    self.y = 296 - @y_offset * 2
  end
 
  def update_zoom
    self.zoom_x = 2.0
    self.zoom_y = 2.0
  end
 
  def update_y_offset
    if BattleManager.actor == @battler or BattleManager.dummy_battler == @battler
      @y_offset = [@y_offset + 4, 32].min
    else
      @y_offset = [@y_offset - 4, 0].max
    end
  end
 
end

#==============================================================================
# ** Spriteset_Battle
#==============================================================================

class Spriteset_Battle
 
  def create_actors
    @actor_sprites = $game_party.members.collect { |actor|
      Sprite_BattlerCharacter.new(@viewport3, actor)
    }
  end
 
end
 

You need these too~

Odometer_HP.png

Odometer_MP.png

 

I saved it when I found it somewhere on the net, knew it would come in handy someday. :D ~
 

RandomIdoit

Legendary Bird
Veteran
Joined
Aug 12, 2013
Messages
38
Reaction score
2
First Language
English
Primarily Uses
Wow... er, sorry I wasn't actually the one who started this topic, but I've been looking for pretty much exactly this script for a while, THANK YOU.

Also, thanks to cozziekuns for actually making this. Also, sorry, but I've got no means of helping the original poster of this thread.
 

R-Soul

Battle Sonata
Veteran
Joined
May 22, 2013
Messages
56
Reaction score
12
First Language
Spanish
Primarily Uses
Wow... er, sorry I wasn't actually the one who started this topic, but I've been looking for pretty much exactly this script for a while, THANK YOU.

Also, thanks to cozziekuns for actually making this. Also, sorry, but I've got no means of helping the original poster of this thread.
I suggest you to mess up with it a little, just expand the window in which the actor stats show, because it gets cut if you only use one actor, not that hard to change tho.
 

RandomIdoit

Legendary Bird
Veteran
Joined
Aug 12, 2013
Messages
38
Reaction score
2
First Language
English
Primarily Uses
Well, I was thinking of messing with the script (mainly to make the numbers drain more slowly, and slower still when an actor has high luck, if that's possible.) So, I'll probably do that, then.
 

ToyBonBon

Warper
Member
Joined
Apr 18, 2015
Messages
3
Reaction score
1
First Language
English
Primarily Uses
Something like this I suppose?

Put these scripts in order:

#==============================================================================

# ** Earthbound-Ish Battle Core

#------------------------------------------------------------------------------

# Version: 1.0

# Author: cozziekuns

# Date: February 17, 2013

#==============================================================================

# Description:

#------------------------------------------------------------------------------

# This script attempts to mimic the battle system of the Earthbound/Mother

# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3).

#==============================================================================

# Instructions:

#------------------------------------------------------------------------------

# Paste this script into its own slot in the Script Editor, above Main but

# below Materials. Edit the modules to your liking.

#==============================================================================

#==============================================================================

# ** Cozziekuns

#==============================================================================

module Cozziekuns

  module Earthboundish

    ActorIcons ={

      # Command Name => IconID

      "Attack" => 116,

      "Magic" => 152,

      "Special" => 128,

      "Guard" => 161,

      "Items" => 260,

      "Escape" => 474,

    }

  end

end

include Cozziekuns

#==============================================================================

# ** Sprite Battler

#==============================================================================

class Sprite_Battler

  alias coz_ebish_spbtlr_update_effect update_effect

  def update_effect(*args)

    update_select_whiten if @effect_type == :select_white

    if @battler.sprite_effect_type == :select_white_to_normal

      revert_to_normal

      @battler.sprite_effect_type = nil

    end

    coz_ebish_spbtlr_update_effect(*args)

  end

  def update_select_whiten

    self.color.set(255, 255, 255, 0)

    self.color.alpha = 128

  end

end

#==============================================================================

# ** Window_ActorCommand

#==============================================================================

class Window_ActorCommand

  def visible_line_number

    return 1

  end

  def col_max

    return 6

  end

  def contents_height

    item_height

  end

  def top_col

    ox / (item_width + spacing)

  end

  def top_col=(col)

    col = 0 if col < 0

    col = col_max - 1 if col > col_max - 1

    self.ox = col * (item_width + spacing)

  end

  def bottom_col

    top_col + col_max - 1

  end

  def bottom_col=(col)

    self.top_col = col - (col_max - 1)

  end

  def ensure_cursor_visible

    self.top_col = index if index < top_col

    self.bottom_col = index if index > bottom_col

  end

  def item_rect(index)

    rect = super

    rect.x = index * (item_width + spacing)

    rect.y = 0

    rect

  end

  def window_width

    Graphics.width - 224

  end

  def open

    @help_window.open

    super

  end

  def close

    @help_window.close

    super

  end

  def update

    super

    @help_window.update

  end

  def draw_item(index)

    rect = item_rect_for_text(index)

    x = rect.x + rect.width / 2 - 12

    y = item_rect_for_text(index).y

    draw_icon(Earthboundish::ActorIcons[command_name(index)], x, y, command_enabled?(index))

  end

  alias coz_ebish_waccmd_make_command_list make_command_list

  def make_command_list(*args)

    coz_ebish_waccmd_make_command_list(*args)

    add_escape_command

  end

  def add_escape_command

    add_command(Vocab::escape, :escape, BattleManager.can_escape?)

  end

  def update_help

    @help_window.set_text(command_name(index))

  end

end

#==============================================================================

# ** Window_BattleStatus

#==============================================================================

class Window_BattleStatus

  [:basic_area_rect, :gauge_area_rect].each { |method|

    define_method(method) { |index|

      rect = item_rect(index)

      rect

    }

  }

  def col_max

    $game_party.members.size

  end

  def window_width

    Graphics.width / ( 4 / $game_party.members.size.to_f )

  end

  def window_height

    fitting_height($data_system.opt_display_tp ? 5 : 4)

  end

  def item_width

    (window_width - standard_padding * 2) / $game_party.members.size

  end

  def item_height

    (window_height - standard_padding * 2)

  end

  def draw_basic_area(rect, actor)

    draw_actor_name(actor, rect.x, rect.y, rect.width)

    draw_actor_icons(actor, rect.x + 4, rect.y + line_height, rect.width)

  end

  def draw_gauge_area_with_tp(rect, actor)

    draw_gauge_area_without_tp(rect, actor)

    draw_actor_tp(actor, rect.x + 4, rect.y + line_height * 4, rect.width - 8)

  end

  def draw_gauge_area_without_tp(rect, actor)

    draw_actor_hp(actor, rect.x + 4, rect.y + line_height * 2, rect.width - 8)

    draw_actor_mp(actor, rect.x + 4, rect.y + line_height * 3, rect.width - 8)

  end

  def draw_actor_name(actor, x, y, width = 112)

    change_color(hp_color(actor))

    draw_text(x, y, width, line_height, actor.name, 1)

  end

  alias coz_ebish_wbtlsts_item_rect item_rect

  def item_rect(index, *args)

    rect = coz_ebish_wbtlsts_item_rect(index, *args)

    rect.x = index % col_max * item_width

    rect

  end

  def update

    super

    update_position

  end

  def update_position

    self.x = (Graphics.width - window_width) / 2 + 128

  end

end

#==============================================================================

# ** Window_BattleActor

#==============================================================================

class Window_BattleActor

  def update_position

    self.x = (Graphics.width - window_width) / 2

  end

end

#==============================================================================

# ** Window_BattleEnemy

#==============================================================================

class Window_BattleEnemy

  def cursor_left(wrap)

    select((index - 1 + item_max) % item_max)

  end

  def cursor_right(wrap)

    select((index + 1) % item_max)

  end

  def cursor_up(wrap)

    cursor_left(true)

  end

  def cursor_down(wrap)

    cursor_right(true)

  end

  def show

    select(0)

    self

  end

  def update_help

    @help_window.set_text(enemy.name)

  end

end

#==============================================================================

# ** Window_BattleSkill + Window_BattleItem

#==============================================================================

[:Window_BattleSkill, :Window_BattleItem].each { |klass|

  Object.const_get(klass).send:)define_method, :show) {

    select_last

    super()

  }

  Object.const_get(klass).send:)define_method, :hide) { super() }

}

#==============================================================================

# ** Window_ActorHelp

#==============================================================================

class Window_ActorHelp < Window_Help

  def initialize

    super(1)

    self.openness = 0

    update_position

  end

  def update_position

    self.x = Graphics.width - 224

    self.width = 224

    create_contents

  end

  def refresh

    contents.clear

    draw_text(4, 0, 224 - standard_padding * 2, line_height, @text, 1)

  end

end

#==============================================================================

# ** Scene_Battle

#==============================================================================

class Scene_Battle

  def start_party_command_selection

    unless scene_changing?

      @status_window.open

      @status_window.refresh

      if BattleManager.input_start

        next_command

        start_actor_command_selection

      else

        @party_command_window.deactivate

        turn_start

      end

    end

  end

  def create_actor_command_window

    @actor_command_window = Window_ActorCommand.new

    @actor_command_window.set_handler:)attack, method:)command_attack))

    @actor_command_window.set_handler:)skill,  method:)command_skill))

    @actor_command_window.set_handler:)guard,  method:)command_guard))

    @actor_command_window.set_handler:)item,   method:)command_item))

    @actor_command_window.set_handler:)escape, method:)command_escape))

    @actor_command_window.set_handler:)cancel, method:)prior_command))

    @actor_command_window.help_window = Window_ActorHelp.new

  end

  def create_help_window

    @help_window = Window_Help.new(1)

    @help_window.visible = false

  end

  alias coz_ebish_scbtl_create_enemy_window create_enemy_window

  def create_enemy_window(*args)

    coz_ebish_scbtl_create_enemy_window(*args)

    @enemy_window.help_window = @actor_command_window.help_window

  end

  alias coz_ebish_scbtl_update_basic update_basic

  def update_basic(*args)

    old_enemy = @enemy_window.active ? @enemy_window.enemy : nil

    coz_ebish_scbtl_update_basic(*args)

    update_enemy_whiten(old_enemy)

  end

  def update_enemy_whiten(old_enemy)

    if !@enemy_window.active or old_enemy != @enemy_window.enemy

      old_enemy.sprite_effect_type = :select_white_to_normal if old_enemy && !old_enemy.dead?

    end

    @enemy_window.enemy.sprite_effect_type = :select_white if @enemy_window.active

  end

  def update_info_viewport

    move_info_viewport(128)

  end

end
#==============================================================================

# ** Earthbound-Ish Odometer Roll

#------------------------------------------------------------------------------

# Version: 1.0

# Author: cozziekuns

# Date: February 17, 2013

#==============================================================================

# Description:

#------------------------------------------------------------------------------

# This script attempts to emulate the battle system of the Earthbound/Mother

# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3). This

# certain addon addresses the infamous HP/MP scrolling system that made battles

# that much more intense.

#==============================================================================

# Instructions:

#------------------------------------------------------------------------------

# Paste this script into its own slot in the Script Editor, above Main but

# below Materials. Edit the modules to your liking.

#==============================================================================

# Graphics:

#------------------------------------------------------------------------------

# You must have two Odometer pictures in your Graphics/System folder. One of

# them must be named "Odometer_HP", and the other one must be named

# "Odometer_MP". Obviously, they represent the odometer for HP and MP values,

# respectively

#==============================================================================

#==============================================================================

# ** Cozziekuns

#==============================================================================

module Cozziekuns

  module Earthboundish

    Odometer_Roll_Speed = 4 # Smaller speeds are faster than larger speeds.

  end

end

include Cozziekuns

#==============================================================================

# ** Game_Actor

#==============================================================================

class Game_Actor

  attr_accessor :odometer_hp

  attr_accessor :odometer_mp

  alias coz_ebisohd_gmactr_setup setup

  def setup(actor_id, *args)

    coz_ebisohd_gmactr_setup(actor_id, *args)

    @odometer_hp = 0

    @odometer_mp = 0

  end

  alias coz_ebishod_gmactr_execute_damage execute_damage

  def execute_damage(user, *args)

    if $game_party.in_battle

      on_damage(@result.hp_damage) if @result.hp_damage > 0

      @odometer_hp += @result.hp_damage

      @odometer_mp += @result.mp_damage

      user.hp += @result.hp_drain

      user.mp += @result.mp_drain

    else

      coz_ebishod_gmactr_execute_damage(user, *args)

    end

  end

  [:hp, :mp].each { |stat|

    alias_method("coz_ebishod_gmactr_item_effect_recover_#{stat}".to_sym, "item_effect_recover_#{stat}".to_sym)

    define_method("item_effect_recover_#{stat}".to_sym) { |user, item, effect|

      if $game_party.in_battle

        value = (send("m#{stat}".to_sym) * effect.value1 + effect.value2) * rec

        value *= user.pha if item.is_a?(RPG::Item)

        value = value.to_i

        @result.send("#{stat}_damage=".to_sym, @result.send("#{stat}_damage".to_sym) - value)

        @result.success = true

        send("odometer_#{stat}=".to_sym, send("odometer_#{stat}".to_sym) - value)

      else

        send("coz_ebishod_gmactr_item_effect_recover_#{stat}".to_sym, user, item, effect)        

      end

    }

  }

end

#==============================================================================

# ** Game_Enemy

#==============================================================================

class Game_Enemy

  def execute_damage(user)

    on_damage(@result.hp_damage) if @result.hp_damage > 0

    self.hp -= @result.hp_damage

    self.mp -= @result.mp_damage

    user.odometer_hp -= @result.hp_drain

    user.odometer_mp -= @result.mp_drain

  end

end

#==============================================================================

# ** Window_BattleStatus

#==============================================================================

class Window_BattleStatus

  def refresh_hpmp(actor, index)

    rect = item_rect(index)

    if gauge_area_rect(index) == item_rect(index)

      rect.y += line_height * 2

      rect.height -= line_height * 2

      contents.clear_rect(rect)

    else

      contents.clear_rect(gauge_area_rect(index))

    end

    draw_gauge_area(gauge_area_rect(index), actor)

  end

  [:hp, :mp].each { |stat|

    define_method("draw_actor_#{stat}".to_sym) { |actor, x, y, width|

      change_color(system_color)

      draw_text(x, y, 30, line_height, Vocab.send("#{stat}_a"))

      od_x = x + contents.text_size(Vocab.send("#{stat}_a")).width + 4

      actor_hp = actor.send("#{stat}".to_sym)

      actor_od_hp = actor.send("odometer_#{stat}".to_sym)

      draw_odometer(od_x, y, stat, actor_hp, actor_od_hp)

    }

  }

  def draw_odometer(x, y, type, value, od_value)

    bitmap = Cache.system("Odometer_#{type.upcase}")

    places = [1000, 100, 10, 1]

    od_ary = value.to_s.split("").collect { |str| str.to_i }

    (4 - od_ary.size).times { od_ary.unshift(0) }

    od_ary.each_index { |i|

      src_y = (9 - od_ary) * 20

      if (od_ary.join.to_i) % places == 0 and od_value != 0

        src_y += 20 / Earthboundish::odometer_Roll_Speed * (Graphics.frame_count % Earthboundish::odometer_Roll_Speed)

      end

      contents.blt(x + i * 24, y + 2, bitmap, Rect.new(0, src_y, 24, 20))

    }

  end

 

end

#==============================================================================

# ** Scene_Battle

#==============================================================================

class Scene_Battle

 

  alias coz_ebishod_scbtl_update_basic update_basic

  def update_basic(*args)

    coz_ebishod_scbtl_update_basic(*args)

    update_odometer

  end

 

  def update_odometer

    $game_party.members.each { |actor|

      if actor.odometer_hp != 0 or actor.odometer_mp != 0

        if actor.odometer_hp != 0 and Graphics.frame_count % Earthboundish::odometer_Roll_Speed == 0

          damage = actor.odometer_hp > 0 ? 1 : - 1

          actor.hp -= damage

          actor.odometer_hp -= damage

        end

        if actor.odometer_mp != 0 and Graphics.frame_count % Earthboundish::odometer_Roll_Speed == 0

          damage = actor.odometer_mp > 0 ? 1 : - 1

          actor.mp -= damage

          actor.odometer_mp -= damage

        end

        @status_window.refresh_hpmp(actor, actor.index)

      end

    }

  end

 

end
 

#==============================================================================

# ** Earthbound-Ish Sprite Display

#------------------------------------------------------------------------------

# Version: 1.0

# Author: cozziekuns

# Date: February 17, 2013

#==============================================================================

# Description:

#------------------------------------------------------------------------------

# This script attempts to emulate the battle system of the Earthbound/Mother

# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3). This

# certain addon addresses the character sprite movements found in Mother 3,

# where active actors bobbed up and down the screen.

#==============================================================================

# Instructions:

#------------------------------------------------------------------------------

# Paste this script into its own slot in the Script Editor, above Main but

# below Materials.

#==============================================================================

#==============================================================================

# ** BattleManager

#==============================================================================

class << BattleManager

 

  alias coz_ebishspd_btlmngr_init_members init_members

  def init_members(*args)

    coz_ebishspd_btlmngr_init_members(*args)

    @dummy_battler = nil

  end

 

  def dummy_battler

    @dummy_battler

  end

 

  def next_subject

    loop do

      battler = @action_battlers.shift

      unless battler

        @dummy_battler = nil

        return nil

      end

      next unless battler.index && battler.alive?

      @dummy_battler = battler

      return battler

    end

  end

 

end

#==============================================================================

# ** Game_Actor

#==============================================================================

class Game_Actor

 

  def use_sprite?

    true

  end

 

end

#==============================================================================

# ** Sprite_BattlerCharacter

#==============================================================================

class Sprite_BattlerCharacter < Sprite_Battler

 

  def initialize(viewport, battler = nil)

    super(viewport, battler)

    @y_offset = 0

  end

 

  def make_animation_sprites

    @ani_sprites = []

    @ani_duplicated = @@ani_checker.include?(@animation)

    if !@ani_duplicated && @animation.position == 3

      @@ani_checker.push(@animation)

    end

  end

 

  def update

    super

    update_position

    update_zoom

    update_y_offset

  end

 

  def update_bitmap

    new_bitmap = set_character_bitmap

    if bitmap != new_bitmap

      self.bitmap = new_bitmap

      init_visibility

    end

    update_src_rect

  end

 

  def set_character_bitmap

    bitmap = Cache.character(@battler.character_name)

    sign = @battler.character_name[/^[\!\$]./]

    if sign && sign.include?('$')

      @cw = bitmap.width / 3

      @ch = bitmap.height / 4

    else

      @cw = bitmap.width / 12

      @ch = bitmap.height / 8

    end

    self.ox = @cw / 2

    self.oy = @ch

    bitmap

  end

 

  def update_origin

    if bitmap

      self.ox = @cw / 2

      self.oy = 0

    end

  end

 

  def update_src_rect

    index = @battler.character_index

    sx = (index % 4 * 3 + 1) * @cw

    sy = (index / 4 * 4) * @ch

    self.src_rect.set(sx, sy, @cw, @y_offset)

  end

 

  def update_position

    width = Graphics.width / ( 4 / $game_party.members.size.to_f )

    sx = (Graphics.width - width) / 2 + 128

    self.x = @battler.index * 128 + sx / 2 + 12 + 32 * (4 - $game_party.members.size)

    self.y = 296 - @y_offset * 2

  end

 

  def update_zoom

    self.zoom_x = 2.0

    self.zoom_y = 2.0

  end

 

  def update_y_offset

    if BattleManager.actor == @battler or BattleManager.dummy_battler == @battler

      @y_offset = [@y_offset + 4, 32].min

    else

      @y_offset = [@y_offset - 4, 0].max

    end

  end

 

end

#==============================================================================

# ** Spriteset_Battle

#==============================================================================

class Spriteset_Battle

 

  def create_actors

    @actor_sprites = $game_party.members.collect { |actor|

      Sprite_BattlerCharacter.new(@viewport3, actor)

    }

  end

 

end
 

You need these too~

Odometer_HP.png

Odometer_MP.png

 

I saved it when I found it somewhere on the net, knew it would come in handy someday. :D ~

How do i place the files?

Do i place them all as Battle Manger? Or name then separately?
 

wonderjosh

Warper
Member
Joined
Jun 11, 2015
Messages
1
Reaction score
0
First Language
English
Primarily Uses
I'm at work right now, so I can't check the script to see if this is what I'm looking for... But can any of you tell me if this one has individual battle status windows for the actors? Like the Mother games have? I've been scouring around for a script that does pretty much only that and nothing else. More difficult to find that I imagined, unless I'm just looking in the wrong places.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top