#===============================================================================
#
# Full Animated Side View Battle System (CBS) (v2.5) by cybersam
#
#
#
# Modified version for the JAP Level Up Script...
# the level up script is modified too
# so be sure to use that one too...
# else you want have a winning pose or you'll get an error...
#
#===============================================================================
#
#
# here we go...
# this makes the script very easy to implement
# just add a new script above the "Main" script
# and insert this whole thing in there
#
# as you can see the sprite changing code is from the japanese script
# so the credits for the sprite changin goes to them....
# i edit it a little so it can show more sprites and sprite animations
# and added some other stuff... the next things are player movement...
#
#
#
# i got the battler changing script in this script...
# the credits for this goes to the guy who made this...
#
# ▼▲▼ XRXS11. 戦闘・バトラーモーション ver.0 ▼▲▼
#
# since this isnt used anymore... it isnt need for credit anymore...
# but i'll let it here since it helped me a lot...
#
#
# as for the ideas... missy provided me with realy good ideas
# that helped me alot when i didnt find a way to some of these features...
#
# here one more Credit to place...
# its RPG's script...
# not the whole thing here...
# but some snipplet you'll know witch one when read the comments
#
#
# if you want some more explaines about this script...
# the most stuff are commented... but if you still have questions or
# sugestions then you can contact me
#
#-------------------------------------------------------------------------------
#
# how or where you can contact me...
# at the http://www.rmxp.net forum via pm, email:
cybersam@club-anime.de# or via AIM: cych4n or ICQ: 73130840
#
# remember this is still in testing phase...
# and i'm trying to work on some other additions... like character movements...
# but that wont be added now... couse i need to figure it out first...
#
#
#
# oh hehe.... before i forget...
# sorry for the bad english... ^-^''''
#
#
#-------------------------------------------------------------------------------
#
# ok... here... since i'm using RPG's movement script...
# there are a lot of changes...
#
# when you look at the script you'll find line with "pose(n)" or "enemy_pose(n)"
# since i want my sprites have different sprites... i added one more option
# to these...
# so now if you add a number after the n (the n stands for witch sprite is used)
# fo example 8... ("pose(4, 8)") this will tell the script that the 4th animation
# have 8 frames...
# pose is used for the player... and enemy_pose for the enemy...
# there is nothing more to this...
# i used my old sprite numbers... (this time in only one sprite...)
#
# explains about the animation sprites... (the digits)
#
#
# 0 = move (during battle)
# 1 = standby
# 2 = defend
# 3 = hit (being attacked)
# 4 = attack
# 5 = skill use
# 6 = dead
# 7 = winning pose... this idea is from RPG....
#
#
# of course this is just the begining of the code...
# so more animations can be implemented...
# but for now this should be enough...
#
# alot has changed here... and now it looks like it is done...
# of course the fine edit needs to be done so it looks and works great with your
# game too...
#
#
#
# 1st character movement... done
# 2rd character apears at the enemy while attacking... done / replaced with movement animation
# 3nd character movement during attack... done
#
# 4th enemies movement... done
# 5th enemy apears at the enemy while attacking... done / replaced with movement animation
# 6th enemy movement during attack... done
#
# 7th each weapon has its own animation... done
# 8th each skill has its own animation... done
# 9th different poses for sickness or low hp done
#
# 10th automaticly select the sprite... done
# 11th Fullbackground implemented (done)
#
#
# bugfixes and code cleaning/improvements.... ----
#
#
#
# for some customfixes look in the rmxp.net forum...
#===============================================================================
class Game_Actor < Game_Battler
# you dont have to change your game actor to let the characters schows
# from the side...
# this will do it for you... ^-^
def screen_x
if self.index != nil
return self.index * 40 + 460
else
return 0
end
end
def screen_y
return self.index * 20 + 220
end
def screen_z
if self.index != nil
return self.index
else
return 0
end
end
end
class Spriteset_Battle
#RPG's stuff...
attr_accessor :actor_sprites
attr_accessor :enemy_sprites
# ends here... ^-^
def initialize
@viewport0 = Viewport.new(0, 0, 640, 480)
@viewport1 = Viewport.new(0, 0, 640, 480)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport4 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 101
@viewport3.z = 200
@viewport4.z = 5000
@battleback_sprite = Sprite.new(@viewport0)
# fix for reversed enemies... so it wont attack the wrong enemy...
# this one was fixed long time ago but i added this comment
# so you guys know about it... ^-^''
@enemy_sprites = []
for enemy in $game_troop.enemies#.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@weather = RPG::Weather.new(@viewport0)
@picture_sprites = []
for i in 51..100
@picture_sprites.push(Sprite_Picture.new(@viewport3,
$game_screen.pictures[i]))
end
@timer_sprite = Sprite_Timer.new
update
end
def dispose
if @battleback_sprite.bitmap != nil
@battleback_sprite.bitmap.dispose
end
@battleback_sprite.dispose
for sprite in @enemy_sprites + @actor_sprites
sprite.dispose
end
@weather.dispose
for sprite in @picture_sprites
sprite.dispose
end
@timer_sprite.dispose
@viewport0.dispose
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
@viewport4.dispose
end
def update
# this fix let the active character be on top... (by Missy)
@viewport1.z = 50 and @viewport2.z = 51 if $actor_on_top == true
@viewport1.z = 51 and @viewport2.z = 50 if $actor_on_top == false
@actor_sprites[0].battler = $game_party.actors[0]
@actor_sprites[1].battler = $game_party.actors[1]
@actor_sprites[2].battler = $game_party.actors[2]
@actor_sprites[3].battler = $game_party.actors[3]
if @battleback_name != $game_temp.battleback_name
@battleback_name = $game_temp.battleback_name
if @battleback_sprite.bitmap != nil
@battleback_sprite.bitmap.dispose
end
@battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
@battleback_sprite.src_rect.set(0, 0, 640, 480)
if @battleback_sprite.bitmap.height == 320
@battleback_sprite.zoom_x = 1.5
@battleback_sprite.zoom_y = 1.5
@battleback_sprite.x = 320
@battleback_sprite.y = 480
@battleback_sprite.ox = @battleback_sprite.bitmap.width / 2
@battleback_sprite.oy = @battleback_sprite.bitmap.height
else
@battleback_sprite.x = 0
@battleback_sprite.y = 0
@battleback_sprite.ox = 0
@battleback_sprite.oy = 0
@battleback_sprite.zoom_x = 1
@battleback_sprite.zoom_y = 1
end
end
for sprite in @enemy_sprites + @actor_sprites
sprite.update
end
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.update
for sprite in @picture_sprites
sprite.update
end
@timer_sprite.update
@viewport0.tone = $game_screen.tone
@viewport0.ox = $game_screen.shake
@viewport4.color = $game_screen.flash_color
@viewport0.update
@viewport1.update
@viewport2.update
@viewport4.update
end
end
#===============================================================================
# Sprite Battler for the Costum Battle System
#===============================================================================
# here we are making some animations and stuff...
# i know its not the best way...
# but this is the first working way that i found....
# this needs propper understanding how the animation works...
# if you want to change some stuff...
# in this i'll not explain much couse its realy easy if you know what you do
# otherwise it will take you time to understand it, but i think the one who
# is trying to edit this will know what he/she do... ^-^
#
#
#
# here i'll completely replace the "Sprite_Battler" class...
# so if you've changed something in there you need to change it here as well
# (i think... i didnt tested it... so its up to you)
# i'll mark the stuff i added just with --> #
# something that need to be explained have a comment...
# but its not all commented...
# so if you dont know what it means or you just want to know why it is there and
# what it does then you need to contact me or anyone who understand this... ^-^
# how you can contact me see above... at the top of this script...
class Sprite_Battler < Animated_Sprite
attr_accessor :battler
attr_reader :index
attr_accessor :target_index
attr_accessor :frame_width
def initialize(viewport, battler = nil)
super(viewport)
@battler = battler
@pattern_b = 0 #
@counter_b = 0 #
@index = 0 #
# this is for the state animation...
# dont change unless you know what this do...
# you can find further infomation on the rmxp.net forum
$noanimation = false
@frame_width, @frame_height = 64, 64
# start sprite
@battler.is_a?(Game_Enemy) ? enemy_pose(1) : pose(1)
@battler_visible = false
if $target_index == nil
$target_index = 0
end
end
def index=(index) #
@index = index #
update #
end #
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
def enemy #
$target_index += $game_troop.enemies.size
$target_index %= $game_troop.enemies.size
return $game_troop.enemies[$target_index] #
end #
def actor #
$target_index += $game_party.actors.size
$target_index %= $game_party.actors.size
return $game_party.actors[$target_index] #
end
#===============================================================================
# here is a snipplet from RPG's script...
# i changed only to lines from this...
#
# here you can add more sprite poses... if you have more... ^-^
#===============================================================================
def pose(number, frames = 4)
case number
when 0 # run
change(frames, 5, 0, 0, 0)
when 1 # standby
change(frames, 5, 0, @frame_height)
when 2 # defend
change(frames, 5, 0, @frame_height * 2)
when 3 # Hurt, loops
change(frames, 5, 0, @frame_height * 3)
when 4 # attack no loop
change(frames, 5, 0, @frame_height * 4, 0, true)
when 5 # skill
change(frames, 5, 0, @frame_height * 5)
when 6 # death
change(frames, 5, 0, @frame_height * 6)
when 7 # no sprite
change(frames, 5, 0, @frame_height * 7)
#when 8
# change(frames, 5, 0, @frame_height * 9)
# ...etc.
else
change(frames, 5, 0, 0, 0)
end
end