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.

Little Custom battle system request

Hi dunno if this exists or not but ive searched for it and can not find it.
Im Just Looking for a simple atb System which lay out is similar to Final Fantasy 9,

I dont want a side view battle system or anything. the standard xp battle will do. just the Atb, Layout for characters names and status's and stuff.

for those who dont know what the layout is apicture can be found here

http://img182.imageshack.us/my.php?image=ff92jpgfn6.jpg

I have made this to guide what i would like.

http://img182.imageshack.us/my.php?image=mybattlemk4.jpg
 
right then ive edited it so its in the place i want it. it looks like this now (sorry i dont know how you hide it) could someone tell me how you put "name" above the characters names "hp" above the hp ect and also how to get it so hp and sp is just a number and not "hp 746" thank you
#===============================================================================
# ** BattleStatus Modification (RTAB Version) Credits
# by DerVVulfman
# Version 2.1
# 02-18-07
#
#-------------------------------------------------------------------------------
# ** A MODIFICATION OF
# ** Real time active battle (RTAB) Ver 1.12-1.16
# ** RTAB engine available at...
# ** http://members.jcom.home.ne.jp/cogwheel/
#-------------------------------------------------------------------------------
# This script is a response to a friend who wanted the battle status window to
# display the hero(s) information in a different manner. Instead of displaying
# each hero's information directly underneath of them, it displays it along a
# single horizontal line in the style of the Final Fantasy games.
#
# EX: ARSHES HP 204 / SP 199 [Normal ] [=========]
# BASIL HP 184 / SP 49 [Knockout] [=========]
# GLORIA HP 234 / SP 299 [Normal ] [=========]
# HILDA HP 214 / SP 129 [Normal ] [=========]
#
# As a bonus, the system can Right-Justify the display and set the transparency
# of the status window. The only caveat of this is that it doesn't highlight
# the name of the hero in action. But, I have altered the battle command window
# to change its height to appear just over the name (or atb bar) of the current
# hero in action (instead of moving left to right).

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

# Configuration Section

# Behavior Controls
$bstat_align = 1 # Left/Right alignment of text (either 0 or 1)
$bstat_cmnd = 1 # Type of Command Window (0 = Original / 1 = New)
$bstat_min_size = 4 # Minimum # of slots in the window

# Positioning System
$bstat_cmnd_ht = 184 # Height of the default 'Command' window
$bstat_top = 480 # Bottom most position of the window (480 is default)
$bstat_dist = 44 # Vertical distance between actors (24 is tight)
$bstat_marg = 26 # Margin distance from top (12 is pretty tight)

# Opacity settings
$bstat_opa = 0 # Opacity of the window's border
$bstat_b_opa = 0 # Opacity of the window's background
$bcmnd_opa = 205 # Opacity of the Command window's border
$bcmnd_b_opa = 205 # Opacity of the Command window's background


#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Name (battler)
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_battler_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name, 2)
end
end


#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
#  It is the window which indicates the status of the party member in the
# battle picture.
#==============================================================================

class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@oldsize = $game_party.actors.size
y = $game_party.actors.size * (64 - $bstat_dist)
height = ($game_party.actors.size * (64 - $bstat_dist))
if $bstat_min_size > $game_party.actors.size
y = $bstat_min_size * (64 - $bstat_dist)
height = ($bstat_min_size * (64 - $bstat_dist))
end
super(0, $bstat_top - y, 640, height)
self.back_opacity = $bstat_b_opa
self.opacity = $bstat_opa
@actor_window = []
offset = $bstat_top - height - $bstat_marg
for i in 0...$game_party.actors.size
@actor_window.push(Window_ActorStatus.new(i, (i * (64-$bstat_dist)) + offset ))
end
@level_up_flags = [false, false, false, false]
refresh
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
for window in @actor_window
window.dispose
end
super
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(number = 0)
if number == 0
cnt = 0
for window in @actor_window
window.refresh(@level_up_flags[cnt])
cnt += 1
end
else
@actor_window[number - 1].refresh(@level_up_flags[number - 1])
end
end
#--------------------------------------------------------------------------
# * AT gauge refreshment
#--------------------------------------------------------------------------
def at_refresh(number = 0)
if number == 0
for window in @actor_window
window.at_refresh
end
else
@actor_window[number - 1].at_refresh
end
end
#--------------------------------------------------------------------------
# * Frame Renewal
#--------------------------------------------------------------------------
def update
super
# Establish if using a set window size, or expandable
checkvalue = $game_party.actors.size
if $bstat_min_size > $game_party.actors.size
checkvalue = $bstat_min_size
end
# See if the window size is altered
if self.y != $bstat_top - (checkvalue * (64 - $bstat_dist)) or
$game_party.actors.size != @oldsize
self.y = $bstat_top - (checkvalue * (64 - $bstat_dist))
self.height = (checkvalue * (64 - $bstat_dist))
for window in @actor_window
window.dispose
end
@actor_window = []
for i in 0...$game_party.actors.size
@actor_window.push(Window_ActorStatus.new(i, y + i * (64 - $bstat_dist)- $bstat_marg))
end
@oldsize = $game_party.actors.size
refresh
end
for window in @actor_window
window.update
end
end
end

#==============================================================================
# ** Window_ActorStatus
#------------------------------------------------------------------------------
#  It is the window which indicates the status of the party member respectively
# in the battle picture.
#==============================================================================

class Window_ActorStatus < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(id, y)
@actor_num = id
super(0, $bstat_top - y, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.back_opacity = 0
actor = $game_party.actors[@actor_num]
@actor_nm = actor.name
@actor_mhp = actor.maxhp
@actor_msp = actor.maxsp
@actor_hp = actor.hp
@actor_sp = actor.sp
@actor_st = make_battler_state_text(actor, 120, true)
@status_window = []
for i in 0...5
@status_window.push(Window_DetailsStatus.new(actor, i, y))
end
refresh(false)
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
for i in 0...5
@status_window.dispose
end
super
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(level_up_flags)
self.contents.clear
actor = $game_party.actors[@actor_num]
@status_window[0].refresh(actor) if @actor_nm != actor.name
@status_window[1].refresh(actor) if
@actor_mhp != actor.maxhp or @actor_hp != actor.hp
@status_window[2].refresh(actor) if
@actor_msp != actor.maxsp or @actor_sp != actor.sp
@status_window[3].refresh(actor, level_up_flags) if
@actor_st != make_battler_state_text(actor, 120, true) or level_up_flags
@actor_nm = actor.name
@actor_mhp = actor.maxhp
@actor_msp = actor.maxsp
@actor_hp = actor.hp
@actor_sp = actor.sp
@actor_st = make_battler_state_text(actor, 120, true)
end
#--------------------------------------------------------------------------
# * AT gauge refreshment
#--------------------------------------------------------------------------
def at_refresh
@status_window[4].refresh($game_party.actors[@actor_num])
end
#--------------------------------------------------------------------------
# * Frame Renewal
#--------------------------------------------------------------------------
def update
for window in @status_window
window.update
end
end
end

#==============================================================================
# ** Window_DetailsStatus
#------------------------------------------------------------------------------
#  It is the window which indicates the status of the actor in individually in the battle picture.
#==============================================================================

class Window_DetailsStatus < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(actor, id, y)
@status_id = id
super(0 , y , 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.back_opacity = 0
refresh(actor, false)
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
super
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(actor, level_up_flags = false)
self.contents.clear
if $bstat_align == 0
# Draw Name/Hp etc left to right
case @status_id
when 0
draw_actor_name(actor, 4, -8)
when 1
draw_actor_hp(actor, 152, -8, 80)
when 2
draw_actor_sp(actor, 248, -8, 80)
when 3
if level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(344, -8, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, 344, -8)
end
when 4
draw_actor_atg(actor, 488, -8, 120)
end
else
# Draw Name/Hp etc right to left
case @status_id
when 0
draw_battler_name(actor, 160, -8)
when 1
draw_actor_hp(actor, 296, -8, 80)
when 2
draw_actor_sp(actor, 392, -8, 80)
when 3
if level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(160, -8, 120, 32, "LEVEL UP!")
else
end
when 4
draw_actor_atg(actor, 488, -8, 120)
end
end
end
#--------------------------------------------------------------------------
# * Frame renewal
#--------------------------------------------------------------------------
def update
#At the time of main phase opacity is lowered a little
if $game_temp.battle_main_phase
self.contents_opacity -= 4 if self.contents_opacity > 191
else
self.contents_opacity += 4 if self.contents_opacity < 255
end
end
end



#==============================================================================
# ** Scene_Battle (Division definition 3)
#------------------------------------------------------------------------------
# * It is the class which processes the battle picture.
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Setup of actor command window
#--------------------------------------------------------------------------
def phase3_setup_command_window
offset = $bstat_top - ($game_party.actors.size * 64)
# Nullifying the party command window
@party_command_window.active = false
@party_command_window.visible = false
# Enabling the actor command window
@actor_command_window.active = true
@actor_command_window.visible = true
if $bstat_cmnd == 0
# Get relative position of window in percentages
x_perc = ((@actor_index +1) * 100) / $game_party.actors.size
# Apply position to 640 width of screen
xpos = ((640 * x_perc) / 100)
# Get window width difference in percentages
wperc = (($game_party.actors.size - 1) * 100) / $game_party.actors.size
# Get amount of window to remove
wperc2 = @actor_command_window.width
if $game_party.actors.size > 4
wperc2 = (@actor_command_window.width * wperc) / 100
end
if xpos - wperc2 <0
wperc2 = xpos
end
if xpos - wperc2 > (640 - @actor_command_window.width)
wperc2 = @actor_command_window.width
end
# Apply command window difference
xpos = xpos - wperc2
#(@actor_command_window.width)
# Set position
@actor_command_window.x = xpos
@actor_command_window.y = $bstat_cmnd_ht
#print wperc
else
@actor_command_window.x = 0
if $bstat_align != 0
@actor_command_window.x = 640 - @actor_command_window.width
end
checkvalue = ($game_party.actors.size * (64 - $bstat_dist))
if $bstat_min_size > $game_party.actors.size
checkvalue = $bstat_min_size * (64 - $bstat_dist)
end
@actor_command_window.y = ($bstat_top - (checkvalue)) -
(@actor_command_window.height - (@actor_index * (64 - $bstat_dist)))
end
@actor_command_window.back_opacity = $bcmnd_b_opa
@actor_command_window.opacity = $bcmnd_opa
@actor_command_window.z = 125
@actor_command_window.index = 0
end
end
 

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