Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Super Simple Sideview Battle VX [& ACE]

Super Simple Sideview Battle VX - Version: 1.0
By: Brewmeister

Introduction

Inspired by Amanda's (aka Amaranth / Lambchop) system for RMXP. In response to several requests.

Features
  • Add Actor Battlers
  • Move Actor Battlers to right side of battlefield
  • Actor & Enemy Battlers Blink to aid selection

Screenshots

sssvx_screenshot.png


Demo

http://www.hbgames.org/user_files/Super_Simple_Sideview_VX.exe

Script

Code:
#==============================================================================

# ** Super_Simple_Sideview_Battle_VX - Brewmeister

# Inspired by Amanda's (aka Amaranth / Lambchop) system for RMXP

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

#  Turns on battler sprites for actors.

#  Moves actor sprites to the right side of screen

#  Blinking Active Actor & Enemy sprites to aid selection

#

#  You need to add the battlers in the /Graphics/Battlers folder

#  Use the enemy/actor name. i.e. Ralph.png, Slime.png, etc...

#  (Right facing character for enemies, left facing for actors)

#  You will also need to move the enemy battlers in the Troops tab to the

#  left side of the battlefield.

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

 

class Game_Actor

  alias sss_initialize initialize

  

  def initialize(actor_id)

    sss_initialize(actor_id)

    @battler_name = actor.name

  end

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

  # * Use Sprites?

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

  def use_sprite?

    return true

  end

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

  # * Get Battle Screen X-Coordinate

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

  def screen_x

    # Return after calculating x-coordinate by order of members in party

    if self.index != nil

      return self.index * 16 + 432

    else

      return 0

    end

  end

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

  # * Get Battle Screen Y-Coordinate

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

  def screen_y

    return self.index * 64 + 64

  end

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

  # * Get Battle Screen Z-Coordinate

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

  def screen_z

    # Return after calculating z-coordinate by order of members in party

    if self.index != nil

      return 4 - self.index

    else

      return 0

    end

  end

end

 

class Scene_Battle

  alias sss_start_actor_command_selection start_actor_command_selection

  alias sss_start_target_enemy_selection start_target_enemy_selection

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

  # * Start Actor Command Selection

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

  def start_actor_command_selection

    sss_start_actor_command_selection

    for i in 0..$game_party.members.size - 1

      $game_party.members[i].blink = false

    end

    if @actor_index > -1

      @active_battler.blink = true

    end

  end

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

  # * Start Target Enemy Selection

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

  def start_target_enemy_selection

    sss_start_target_enemy_selection

    @target_enemy = -1

  end

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

  # * Update Target Enemy Selection

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

  def update_target_enemy_selection

    @target_enemy_window.update

    if @target_enemy != @target_enemy_window.enemy.index   ###BREW

      @target_enemy = @target_enemy_window.enemy.index

      @target_enemy_window.enemy.blink = true

    end

    if Input.trigger?(Input::B)

      Sound.play_cancel

      end_target_enemy_selection

    elsif Input.trigger?(Input::C)

      Sound.play_decision

      @active_battler.action.target_index = @target_enemy_window.enemy.index

      end_target_enemy_selection

      end_skill_selection

      end_item_selection

      next_actor

    end

  end

end

Script - ACE version (no guarantees)

Code:
#==============================================================================

# ** Super_Simple_Sideview_Battle_VX_ACE - Brewmeister

# Inspired by Amanda's (aka Amaranth / Lambchop) system for RMXP

# 21JUN12 - updated from VX to ACE. (no guarantees)

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

#  Turns on battler sprites for actors.

#  Moves actor sprites to the right side of screen

#  Blinking Active Actor & Enemy sprites to aid selection

#

#  You need to add the battlers in the /Graphics/Battlers folder

#  Use the enemy/actor name. i.e. Ralph.png, Slime.png, etc...

#  (Right facing character for enemies, left facing for actors)

#  You will also need to move the enemy battlers in the Troops tab to the

#  left side of the battlefield.

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

 

class Game_Actor

  alias sss_initialize initialize

 

  def initialize(actor_id)

    sss_initialize(actor_id)

    @battler_name = actor.name

  end

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

  # * Use Sprites?

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

  def use_sprite?

    return true

  end

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

  # * Get Battle Screen X-Coordinate

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

  def screen_x

    # Return after calculating x-coordinate by order of members in party

    if self.index != nil

      return self.index * 16 + 432

    else

      return 0

    end

  end

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

  # * Get Battle Screen Y-Coordinate

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

  def screen_y

    return self.index * 40 + 172

  end

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

  # * Get Battle Screen Z-Coordinate

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

  def screen_z

    # Return after calculating z-coordinate by order of members in party

    if self.index != nil

      return 4 - self.index

    else

      return 0

    end

  end

end

 

class Scene_Battle

  alias sss_start_actor_command_selection start_actor_command_selection

  alias sss_start_target_enemy_selection select_enemy_selection

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

  # * Start Actor Command Selection

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

  def start_actor_command_selection

    sss_start_actor_command_selection

    for i in 0..$game_party.members.size - 1

      $game_party.members[i].sprite_effect_type = nil

    end

    if BattleManager.actor.index > -1

      BattleManager.actor.sprite_effect_type = :blink

    end

  end

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

  # * Start Target Enemy Selection

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

  def select_enemy_selection

    sss_start_target_enemy_selection

    @target_enemy = -1

  end

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

  # * Update Target Enemy Selection

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

  def update_target_enemy_selection

    @target_enemy_window.update

    if @target_enemy != @target_enemy_window.enemy.index   ###BREW

      @target_enemy = @target_enemy_window.enemy.index

      @target_enemy_window.enemy.sprite_effect_type = :blink

    end

    if Input.trigger?(Input::B)

      Sound.play_cancel

      end_target_enemy_selection

    elsif Input.trigger?(Input::C)

      Sound.play_decision

      @active_battler.action.target_index = @target_enemy_window.enemy.index

      end_target_enemy_selection

      end_skill_selection

      end_item_selection

      next_actor

    end

  end

end

Instructions

  • Copy the script and insert below "(Insert Here)" in the "Materials" section of the script editor.
  • Add a battler for each actor & enemy to the \Graphics\Battlers folder in your game project
    Use the actor's/enemy's name for battlers. (i.e. Ralph.png, Ulrika.png, Slime.png, etc..)
  • In the database, under the Troops tab, move the enemy battlers to the left side of the battlefield

FAQ

NA

Compatibility

No known issues

Credits and Thanks

Based on Amanda's Super Simple Sideview script for XP

Author's Notes

In response to several requests.

Terms and Conditions

Do with it whatever your little heart desires. Give credit where credit is due.
I would prefer updates / improvements happen here so I can keep the script up to date.
 
I just extracted one cell (Left facing for actors, right facing for enemies) from the character sets. Then save the extracted image in the battlers folder. I don't see a character set for Slime, for that one you'll have to wing it. (or just shrink the slime battler to match.)
 
Thanks,but I have question.I'm going to make party selection thing at the beginning of the game and theres is problem.

You can chosze from difirent classes for example:

Knight I chose Knight and give him name LOL.So if I'm gonna run in yhe battle it will work or not??
Because his oryginal name was Knight .

Help

Sorry for english
 
In XP, the system used the .character_name (name of the character set file) property, so you'd have a 001-Fighter01.png file in both the Characters & Battlers folders.
In VX, the character sets have multiple characters in one file, and we want to associate a single battler with each character, so we used the .name property.
If you want to associate the battler graphic with the character graphic, you'll need to modify this to use the .character_name & .character_index properties, and create a matching battler for each character graphic.
If you want to associate the battler graphic with a class, change line 21 in the Sideview script to:

@battler_name = actor.class_id

Then create a battler graphic for each class. (1.png, 2.png, etc...)

Another option would be to copy the appropriate graphic during your party selection script. If the player selects Knight & the name "Mjack", copy the Knight battler to Mjack.png.
 
I don't know how many people are still following this thread but the script works great from the "battle test" button under the troop tab of the database but when I start a playtest I get this message:

"Script 'Super_Simple_Sideview' line20: SystemStackError occurred.
stack level too deep"

Any ideas on how to fix this?

Thank you!!
 
Added an "ACE" version per a request. A few minor tweaks & I got it to work.
I didn't spend a lot of time familiarizing myself with RGSS3, but it seems to work for me in test mode.
If I have time, I'll give it a good runthrough to make sure it won't puke.
Otherwise, "Sold - As Is, no guarantees"
 
Is there a way to get each individual battler position with this script? So that I have coordinates to place something over a battler's head?
 
krazykat1980":1exextt2 said:
Is there a way to get each individual battler position with this script? So that I have coordinates to place something over a battler's head?

The Game_Actor.screen_x & screen_y methods should return the position
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top