XP 스크립트

RTAB과 사이드뷰 배틀러를 사용할 경우 전투상태창을 사이드뷰에 맞게 수정한 것입니다.(FF시리즈처럼?) 어떻게 되는지는 첨부된 데모(RTAB+애니메이션 배틀러+RTAB 애드온)를 참조하세요.


#===============================================================================
# ** BattleStatus Modification (RTAB Version) Credits
# by DerVVulfman
# Version 1.1
# 06-22-06
#
#-------------------------------------------------------------------------------
# ** A MODIFICATION OF
# ** Real time active battle (RTAB) Ver 1.12
# ** RTAB engine available at...
# ** http://members.jcom.home.ne.jp/cogwheel/
#
#-------------------------------------------------------------------------------
# This script-x is a reponse 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).
#
#-------------------------------------------------------------------------------
# There are two editable values:
#
# BATTLESTATUS_LEFTJUSTIFY Controls whether the display shows the hero's
# data left to right, or right to left. It is a
# boolean value (either true or false).
#
# true - This setting will display the data just
# like the above example.
#
# false - This reverses the display so the name
# of the hero is on the right, and the
# ATB bar is on the left.
#
#
# BATTLESTATUS_OPACITY Controls the transparency of the display and
# of the battle command window. The value ranges
# from 0 to 2...
#
# 0 - The display and command windows are set to
# a totally solid display.
#
# 1 - This is the 'semi-transparent' look of the
# RTAB system, with the exception that the
# battle command window is more solid so it
# will show up over the battlestatus window.
#
# 2 - This setting will make the battle status
# window totally invisible. Only the battle
# command window will be visible, though it
# will be semi-transparent for effect.
#
# BATTLESTATUS_FULLWINDOW Controls whether the display resizes itself to
# fit the total number of heroes in the party.
# It's a boolean value (either true or false).
#
# true - This setting will increase or decrease
# the height of the window itself as well
# as adjust its position on the screen.
#
# false - This keeps the battlestatus window in
# the same position and size regardless
# of the number of party members.
#
#
#-------------------------------------------------------------------------------
#
# * Script-xs Added
# Window_Base - draw_battler_name
#
# * Script-xs Edited
# Window_BattleStatus - initialize (RTAB version Edit)
# Window_BattleStatus - update (RTAB version Edit)
# Window_ActorStatus - initialize (RTAB version Edit)
# Window_DetailsStatus - initialize (RTAB version Edit)
# Window_DetailsStatus - refresh (RTAB version Edit)
# Window_DetailsStatus - update (RTAB version Edit)
# Scene_Battle (part 3) - initialize (Default Edit)
#
#-------------------------------------------------------------------------------
# * Bug Fixes
# System was designed to ensure that 4 characters were playable. However, it
# screwed up the display's vertical position when less than 4 characters were
# in the party. This has been fixed.
#
#-------------------------------------------------------------------------------


#==============================================================================
# ** EDITABLE CONSTANTS
#==============================================================================
BATTLESTATUS_LEFTJUSTIFY = false
BATTLESTATUS_OPACITY = 2
BATTLESTATUS_FULLWINDOW = true


#==============================================================================
# ** 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

if BATTLESTATUS_FULLWINDOW
y = 320
super(0, y, 640, 160)
else
y = 480 - ($game_party.actors.size * 40)
height = $game_party.actors.size * 40
super(0, y, 640, height)
end

case BATTLESTATUS_OPACITY
when 0
self.back_opacity = 255
self.opacity = 255
when 1
self.back_opacity = 160
self.opacity = 255
when 2
self.back_opacity = 0
self.opacity = 0
end

@actor_window = []
for i in 0...$game_party.actors.size
@actor_window.push(Window_ActorStatus.new(i, y + i * 40))
end
@level_up_flags = [false, false, false, false]
refresh
end
#--------------------------------------------------------------------------
# * Frame Renewal
#--------------------------------------------------------------------------
def update
super
if BATTLESTATUS_FULLWINDOW
if self.y != 320
self.y = 320
self.height = 320
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 * 40))
end
refresh
end
else
if self.y != 480 - ($game_party.actors.size * 40)
self.y = 480 - ($game_party.actors.size * 40)
self.height = $game_party.actors.size * 40
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 * 40))
end
refresh
end
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, y, 640, 160)
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
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
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(actor, level_up_flags = false)
self.contents.clear
if BATTLESTATUS_LEFTJUSTIFY
# 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, 488, -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
draw_actor_state(actor, 160, -8)
end
when 4
draw_actor_atg(actor, 0, -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

#==============================================================================
# ** 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


#==============================================================================
# ** 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
# 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

# My corrections to set the Command window & transparency effect
# Setting the position of the actor command window
if BATTLESTATUS_FULLWINDOW
@actor_command_window.y = (160 + (@actor_index * 40))
else
@actor_command_window.y = (320 - ($game_party.actors.size * 40)) +
(@actor_index * 40)
end


case BATTLESTATUS_OPACITY
when 0
@actor_command_window.back_opacity = 255
@actor_command_window.opacity = 255
when 1
@actor_command_window.back_opacity = 255
@actor_command_window.opacity = 191
when 2
@actor_command_window.back_opacity = 255
@actor_command_window.opacity = 160
end
@actor_command_window.z=125
# End of corrections

# Setting the index to 0
@actor_command_window.index = 0
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Atachment
첨부 '1'