Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
AdvancedApply

Need a side way battle system with hp bars at the bottom of the screen..

Recommended Posts

Hi i need a side way battle system that has the hp bars + character pic at the bottom of the screen.

Instead of battlers i want to use the characters movement pictures, so that they move when they attack.

Also i would like to have icons in the menu when you choose what you want to attack with, attack, skill, and so on.. on top of the character that is choosing the attack with a clear background.

 

I hope it might kinda look like this:

post-15931-0-97752800-1334180311_thumb.png

Sorry for the bad q. but it's an example of how i would like it to look like..

 

If anyone knows of a similar script that i want please post a link to it!! most appreciated!

 

i am already using this: The RM2K Faceset System by DerVVulfman

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

# ** FaceSet

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

# This class allows Faceset graphics to appear in Text Boxes.

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

class FaceSet

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

# * Object Initialization

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

def initialize (file = "", number = nil, right_side = false)

# Assume no faceset file being loaded

$game_temp.message_box_image = ""

# Make sure it is a valid picture (in 1 of 3 formats...)

# and load faceset from Pictures directory

if FileTest.exist?("Graphics/Pictures/" + file + ".bmp")

$game_temp.message_box_image = file

end

if FileTest.exist?("Graphics/Pictures/" + file + ".jpg")

$game_temp.message_box_image = file

end

if FileTest.exist?("Graphics/Pictures/" + file + ".png")

$game_temp.message_box_image = file

end

# if no valid number, erase loaded faceset file

if number == nil

$game_temp.message_box_image = ""

end

# Set number of faceset in image

$game_temp.message_box_image_index = number

# Set location of faceset in message box & inn

$game_temp.message_box_image_right = right_side

end

end

 

 

 

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

# ** Game_Temp

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

# This class handles temporary data that is not included with save data.

# Refer to "$game_temp" for the instance of this class.

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

class Game_Temp

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

# * Public Instance Variables

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

attr_accessor :faceset_system

attr_accessor :faceset_file

attr_accessor :message_box_image

attr_accessor :message_box_image_index

attr_accessor :message_box_image_right

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

# * Object Initialization

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

alias faceset_i initialize

def initialize

faceset_i

@faceset_file = $facesets

@message_box_image = ""

@message_box_image_index = nil

@message_box_image_right = false

end

end

 

 

 

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

# ** Window_Base

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

# This class is for all in-game windows.

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

class Window_Base

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

# * Draw Portrait

# number : image number in file

# x : draw spot x-coordinate

# y : draw spot y-coordinate

# hue : hue (range from 0 to 180)

# opacity : opacity (0-255)

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

def draw_actor_portrait(number, x, y, hue=0, opacity=255)

filename = $game_temp.faceset_file

# Obtain faceset bitmap from Picture directory

bitmap = RPG::Cache.picture(filename)

# Obtain number of images in bitmap (96 x 96 frames)

cw = bitmap.width

ch = bitmap.height

x_pic = cw / 96

y_pic = ch / 96

# Begin Loop to obtain image location from faceset

i = 0

xpos = 0

ypos = 0

for i in 1..number

xpos = xpos + 1

if xpos > x_pic

xpos = 1

ypos = ypos + 1

if ypos > y_pic

ypos = 1

end

end

end

# Calculate pixel coordinates of image

xpos = xpos - 1

xpos = xpos * 96

ypos = ypos * 96

# Display desired image at location

src_rect = Rect.new(xpos, ypos, 96, 96)

self.contents.blt(x, y, bitmap, src_rect, opacity)

self.contents.hue_change(hue)

end

end

 

 

 

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

# ** Window_Message

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

# This message window is used to display text.

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

class Window_Message < Window_Selectable

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

# * Refresh

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

def refresh

self.contents.clear

self.contents.font.color = normal_color

x = y = 0

@cursor_width = 0

# Indent if choice

if $game_temp.choice_start == 0

x = 8

end

# If waiting for a message to be displayed

if $game_temp.message_text != nil

text = $game_temp.message_text

# Calculate margin if using a Faceset (Default = No Faceset = 0)

@face_indent = 0

if $game_temp.message_box_image != ""

if $game_temp.message_box_image_right

@face_indent = 0

else

@face_indent = 128

end

end

# Control text processing

begin

last_text = text.clone

text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }

end until text == last_text

text.gsub!(/\\[Nn]\[([0-9]+)\]/) do

$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""

end

# Change "\\\\" to "\000" for convenience

text.gsub!(/\\\\/) { "\000" }

# Change "\\C" to "\001" and "\\G" to "\002"

text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }

text.gsub!(/\\[Gg]/) { "\002" }

# Get 1 text character in c (loop until unable to get text)

while ((c = text.slice!(/./m)) != nil)

# If \\

if c == "\000"

# Return to original text

c = "\\"

end

# If \C[n]

if c == "\001"

# Change text color

text.sub!(/\[([0-9]+)\]/, "")

color = $1.to_i

if color >= 0 and color <= 7

self.contents.font.color = text_color(color)

end

# go to next text

next

end

# If \G

if c == "\002"

# Make gold window

if @gold_window == nil

@gold_window = Window_Gold.new

@gold_window.x = 560 - @gold_window.width

if $game_temp.in_battle

@gold_window.y = 192

else

@gold_window.y = self.y >= 128 ? 32 : 384

end

@gold_window.opacity = self.opacity

@gold_window.back_opacity = self.back_opacity

end

# go to next text

next

end

# If new line text

if c == "\n"

# Update cursor width if choice

if y >= $game_temp.choice_start

@cursor_width = [@cursor_width, x].max

end

# Add 1 to y

y += 1

x = 0

# Indent if choice

if y >= $game_temp.choice_start

x = 8

end

# go to next text

next

end

# Draw text

self.contents.draw_text(4 + x + @face_indent, 32 * y, 40, 32, c)

# Add x to drawn text width

x += self.contents.text_size©.width

end

end

# Save menu faceset

@tempfile = $game_temp.faceset_file

$game_temp.faceset_file = $game_temp.message_box_image

# Draw portrait

if $game_temp.message_box_image != ""

if $game_temp.message_box_image_right

draw_actor_portrait($game_temp.message_box_image_index, self.width - 136, 16)

else

draw_actor_portrait($game_temp.message_box_image_index, 8, 16)

end

end

# Reset menu faceset

$game_temp.faceset_file = @tempfile

# If choice

if $game_temp.choice_max > 0

@item_max = $game_temp.choice_max

self.active = true

self.index = 0

end

# If number input

if $game_temp.num_input_variable_id > 0

digits_max = $game_temp.num_input_digits_max

number = $game_variables[$game_temp.num_input_variable_id]

@input_number_window = Window_InputNumber.new(digits_max)

@input_number_window.number = number

@input_number_window.x = self.x + 8

@input_number_window.y = self.y + $game_temp.num_input_start * 32

end

end

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

# * Set Window Position and Opacity Level

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

alias fs_rw reset_window

def reset_window

fs_rw

# Increase Message Box size if using faceset

if $game_temp.message_box_image != ""

self.x = 16

self.width = 608

self.contents = Bitmap.new(width - 32, height - 32)

# Else, restore the default size

else

self.x = 80

self.width = 480

self.contents = Bitmap.new(width - 32, height - 32)

end

end

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

# * Cursor Rectangle Update

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

def update_cursor_rect

if @index >= 0

n = $game_temp.choice_start + @index

self.cursor_rect.set(8 + @face_indent, n * 32, @cursor_width, 32)

else

self.cursor_rect.empty

end

end

end

 

 

 

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

# ** Window_MenuStatus

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

# This window displays party member status on the menu screen.

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

class Window_MenuStatus < Window_Selectable

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

# * Refresh

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

def refresh

self.contents.clear

@item_max = $game_party.actors.size

for i in 0...$game_party.actors.size

x = 64

y = i * 116

actor = $game_party.actors

draw_actor_portrait(actor.id, x - 64, y, 0, 255)

draw_actor_name(actor, x + 32, y)

draw_actor_class(actor, x + 154, y)

draw_actor_level(actor, x + 32, y + 32)

draw_actor_state(actor, x + 108, y + 32)

draw_actor_exp(actor, x + 32, y + 64)

draw_actor_hp(actor, x + 241, y + 32)

draw_actor_sp(actor, x + 241, y + 64)

end

end

end

 

 

 

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

# ** Window_Status

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

# This window displays full status specs on the status screen.

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

class Window_Status < Window_Base

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

# * Refresh

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

def refresh

self.contents.clear

draw_actor_portrait(@actor.id, 0, 32 ,0 ,255)

draw_actor_name(@actor, 12, 0)

draw_actor_class(@actor, 156, 0)

draw_actor_level(@actor, 104, 32)

draw_actor_state(@actor, 104, 64)

draw_actor_hp(@actor, 104, 112, 172)

draw_actor_sp(@actor, 104, 144, 172)

# Remaining Unedited Data

draw_actor_parameter(@actor, 96, 192, 0)

draw_actor_parameter(@actor, 96, 224, 1)

draw_actor_parameter(@actor, 96, 256, 2)

draw_actor_parameter(@actor, 96, 304, 3)

draw_actor_parameter(@actor, 96, 336, 4)

draw_actor_parameter(@actor, 96, 368, 5)

draw_actor_parameter(@actor, 96, 400, 6)

self.contents.font.color = system_color

self.contents.draw_text(320, 48, 80, 32, "EXP")

self.contents.draw_text(320, 80, 80, 32, "NEXT")

self.contents.font.color = normal_color

self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)

self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)

self.contents.font.color = system_color

self.contents.draw_text(320, 160, 96, 32, "equipment")

draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)

draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)

draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)

draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)

draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)

end

end

 

 

 

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

# ** Window_NameEdit

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

# This window is used to edit your name on the input name screen.

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

class Window_NameEdit < Window_Base

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

# * Refresh

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

def refresh

self.contents.clear

self.contents.font.color = normal_color

# Draw name

name_array = @name.split(//)

for i in 0...@max_char

c = name_array

if c == nil

c = "_"

end

x = 320 - @max_char * 14 + i * 28

self.contents.draw_text(x, 32, 28, 32, c, 1)

end

# Draw faceset

draw_actor_portrait(@actor.id, 260 - @max_char * 14 - 40, 8 ,0 ,255)

end

end

 

 

 

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

# ** Window_SaveFile

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

# This window displays save files on the save and load screens.

# Window resized to handle a Faceset instead of the default charset image.

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

class Window_SaveFile < Window_Base

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

# * Object Initialization

# file_index : save file index (0-3)

# filename : file name

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

def initialize(file_index, filename)

# Set save blocks to 3 screens

super(0, 64 + file_index % 3 * 138, 640, 138)

self.contents = Bitmap.new(width - 32, height - 32)

@file_index = file_index

@filename = "Save#{@file_index + 1}.rxdata"

@time_stamp = Time.at(0)

@file_exist = FileTest.exist?(@filename)

if @file_exist

file = File.open(@filename, "r")

@time_stamp = file.mtime

# extra line for character faces

@actors = Marshal.load(file)

@characters = Marshal.load(file)

@frame_count = Marshal.load(file)

@game_system = Marshal.load(file)

@game_switches = Marshal.load(file)

@game_variables = Marshal.load(file)

@total_sec = @frame_count / Graphics.frame_rate

file.close

end

refresh

@selected = false

end

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

# * Refresh

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

def refresh

self.contents.clear

# Draw file number

self.contents.font.color = normal_color

name = "File#{@file_index + 1}"

self.contents.draw_text(4, 0, 600, 32, name)

@name_width = contents.text_size(name).width

# If save file exists

if @file_exist

# Draw Portrait

for i in 0...@actors.size

actor = @actors[0]

x = 68 + ((108) * i )

draw_actor_portrait(actor, x, 4 , 0, 255)

end

# Draw text in modified locations

# Draw play time

hour = @total_sec / 60 / 60

min = @total_sec / 60 % 60

sec = @total_sec % 60

time_string = sprintf("%02d:%02d:%02d", hour, min, sec)

self.contents.font.color = normal_color

self.contents.draw_text(4, 8, 600, 32, time_string, 2)

# Draw timestamp

self.contents.font.color = normal_color

time_string = @time_stamp.strftime("%H:%M")

self.contents.draw_text(4, 40, 600, 32, time_string, 2)

time_string = @time_stamp.strftime("%Y/%m/%d")

self.contents.draw_text(4, 72, 600, 32, time_string, 2)

end

end

end

 

 

 

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

# ** Scene_File

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

# This is a superclass for the save screen and load screen.

# Edited to use a larger Save/Load window to display the Faceset images.

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

class Scene_File

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

# * Main Processing

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

def main

# Make help window

@help_window = Window_Help.new

@help_window.set_text(@help_text)

# Make save file window

@savefile_windows = []

# To scroll between 3 screens

for i in 0..2

@savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))

end

# Select last file to be operated

@file_index = $game_temp.last_file_index

@savefile_windows[@file_index].selected = true

# Execute transition

Graphics.transition

# Main loop

loop do

# Update game screen

Graphics.update

# Update input information

Input.update

# Frame update

update

# Abort loop if screen is changed

if $scene != self

break

end

end

# Prepare for transition

Graphics.freeze

# Dispose of windows

@help_window.dispose

for i in @savefile_windows

i.dispose

end

end

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

# * Frame Update

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

def update

# Update windows

@help_window.update

for i in @savefile_windows

i.update

end

# If C button was pressed

if Input.trigger?(Input::C)

# Call method: on_decision (defined by the subclasses)

on_decision(make_filename(@file_index))

$game_temp.last_file_index = @file_index

return

end

# If B button was pressed

if Input.trigger?(Input::B)

# Call method: on_cancel (defined by the subclasses)

on_cancel

return

end

# If the down directional button was pressed

if Input.repeat?(Input::DOWN)

# If the down directional button pressed down is not a repeat,

# or cursor position is more in front than 3

# Decision to use faceset system

if Input.trigger?(Input::DOWN) or @file_index < 2

# Play cursor SE

$game_system.se_play($data_system.cursor_se)

# Move cursor down

@savefile_windows[@file_index].selected = false

@file_index = (@file_index + 1) % 3

@savefile_windows[@file_index].selected = true

return

end

end

# If the up directional button was pressed

if Input.repeat?(Input::UP)

# If the up directional button pressed down is not a repeat,

# or cursor position is more in back than 0

# Decision to use faceset system

if Input.trigger?(Input::UP) or @file_index > 0

# Play cursor SE

$game_system.se_play($data_system.cursor_se)

# Move cursor up

@savefile_windows[@file_index].selected = false

@file_index = (@file_index + 2) % 3

@savefile_windows[@file_index].selected = true

return

end

end

end

end

 

 

 

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

# ** Scene_Save

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

# This class performs save screen processing.

# Edited so it can save and show the 'Faces' in the revised 'Scene_Load'

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

class Scene_Save < Scene_File

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

# * Write Save Data

# file : write file object (opened)

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

def write_save_data(file)

# Make actor data for drawing save file

actors = []

for i in 0...$game_party.actors.size

actor = $game_party.actors

actors.push([actor.id])

end

Marshal.dump(actors, file)

# Make character data for drawing save file

characters = []

for i in 0...$game_party.actors.size

actor = $game_party.actors

characters.push([actor.character_name, actor.character_hue])

end

# Write character data for drawing save file

Marshal.dump(characters, file)

# Wrire frame count for measuring play time

Marshal.dump(Graphics.frame_count, file)

# Increase save count by 1

$game_system.save_count += 1

# Save magic number

# (A random value will be written each time saving with editor)

$game_system.magic_number = $data_system.magic_number

# Write each type of game object

Marshal.dump($game_system, file)

Marshal.dump($game_switches, file)

Marshal.dump($game_variables, file)

Marshal.dump($game_self_switches, file)

Marshal.dump($game_screen, file)

Marshal.dump($game_actors, file)

Marshal.dump($game_party, file)

Marshal.dump($game_troop, file)

Marshal.dump($game_map, file)

Marshal.dump($game_player, file)

end

end

 

 

 

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

# ** Scene_Load

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

# This class performs load screen processing.

# Edited so it can show the 'Faces' now recorded in the revised 'Scene_Save'

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

class Scene_Load < Scene_File

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

# * Read Save Data

# file : file object for reading (opened)

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

def read_save_data(file)

# Read actor data for drawing save file portraits

actors = Marshal.load(file)

# Read character data for drawing save file

characters = Marshal.load(file)

# Read frame count for measuring play time

Graphics.frame_count = Marshal.load(file)

# Read each type of game object

$game_system = Marshal.load(file)

$game_switches = Marshal.load(file)

$game_variables = Marshal.load(file)

$game_self_switches = Marshal.load(file)

$game_screen = Marshal.load(file)

$game_actors = Marshal.load(file)

$game_party = Marshal.load(file)

$game_troop = Marshal.load(file)

$game_map = Marshal.load(file)

$game_player = Marshal.load(file)

# If magic number is different from when saving

# (if editing was added with editor)

if $game_system.magic_number != $data_system.magic_number

# Load map

$game_map.setup($game_map.map_id)

$game_player.center($game_player.x, $game_player.y)

end

# Refresh party members

$game_party.refresh

end

end

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...