Indie_Goblin

Villager
Member
Joined
May 8, 2023
Messages
19
Reaction score
1
First Language
English
Primarily Uses
RMMZ
Hello, This's my first post, i just need someone to modify this script. Replace the character sprite with a modifiable sprite sheet, 106 by 106 in size, 3 frames across, 12 frames down, I'd also like for status effects to change the portraits. Make the sprites come up before the turn starts, and pop down after actions are selected. Here's the script for you to modify;
Ruby:
#==============================================================================
# ** 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 * 1.5 # changes sprite height.
  end
  # Changes sprite zoom
  def update_zoom
    self.zoom_x = 2
    self.zoom_y = 2
  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
Thanks in advance.
 
Last edited:

Mattsuharu

Regular
Regular
Joined
Apr 15, 2022
Messages
174
Reaction score
47
First Language
English
Primarily Uses
RMVXA
I'm not a coder, but wouldn't just work if you change the 128 in these lines to 106?

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

Indie_Goblin

Villager
Member
Joined
May 8, 2023
Messages
19
Reaction score
1
First Language
English
Primarily Uses
RMMZ
Nope, i need to assign the battler a special spritesheet, that would just zoom the existing sprite in.
 
Last edited:

Roninator2

Gamer
Regular
Joined
May 22, 2016
Messages
5,122
Reaction score
1,505
First Language
English
Primarily Uses
RMVXA
modifiable sprite sheet, 106 by 106 in size, 3 frames across, 12 frames down
Are you referring to using multiple different sheet sizes?
The method in the script on line 99 is where it gets the sprite dimensions.
It's based on the single sprite sheet with 12 frames at 3x4 or a standard character sheet of 96 frames at 12x8.
If other options were to be added, are they to be gathered from a note tag in the actor note box or directly configured or pre defined in a variable?

I'd also like for status effects to change the portraits
Change the sprite sheet if poisoned and such?

That's getting into extensive rewriting.
That's why no one has been helping you yet.
You would easily get this done with a commission request.
 

Indie_Goblin

Villager
Member
Joined
May 8, 2023
Messages
19
Reaction score
1
First Language
English
Primarily Uses
RMMZ
I think i'll just get this commisioned, Thanks for the help though.
Can a mod close this thread?
 

Latest Threads

Latest Posts

Latest Profile Posts

I HATE SEOs! I do not want to add Reddit to every single search in order to find helpful content posted by actual humans.
bandicam 2023-10-02 09-53-18-106.png
Yanka is one of my dearly loved characters. And not only because she can perform the look of "puss in boots")))) Spy, infiltrator, kind-hearted with a soft spot for one Crimson Knight.
Just completed another cutscene. Huge one for the story. I'm so enthusiastic about where this game is going.
Man, the enemies in the new Sonic Frontiers update are totally roided up. I wanted a little more difficulty myself, but Sonic Team turned the dial a bit too far.

At least the new tracks for roaming Ouranos Island as Amy, Knuckles, and Tails slap hard.
mz_quest_victory_scene.gif


This battle victory screen has been pretty fun to work on. Not only can party members set new personal records for their contributions to the fight, but when they do, the party remarks on the accomplishment!

Forum statistics

Threads
134,985
Messages
1,252,617
Members
177,874
Latest member
Dayis
Top