Well, here is the post that I put up on another forum:
Okay, just need some help here.
I have been designing a CMS, but I'm having a LOT of difficulty.
First, here is my current CMS:
Now, I want to change my CMS to something more like:
Where-
1=Menu Selection (Items, Equip, Status, Save, etc.)
2=Player Info (Basically the character's picture (In this case, the battler as seen in the current CMS)
3=Player's Gold Total
4=Play Time
5=Real Time
6=Location
7=Chapter
8=Game Title
9=The word "Menu"
I just need the default selections, I can add the rest that I need myself.
Also, an Options menu like the one in ChaosProject-Nemesis-Wrath would be useful.
Thanks to anyone who can help me out, below is the script for my current CMS, the RTAB configuration Script (Since it is part of my selections), and the work I was able to complete so far with Dubealex's Window_Scene maker for the CMS.
Once again, thank you in advanced to anyone who can offer assistance!
CMS
class Window_Base < Window
def draw_actor_battler(actor, x, y)
face = RPG::Cache.battler(actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(3, -1, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect, opacity)
end
end
class Window_Location < Window_Base
def initialize
super(0, 0, 322, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
$data_map_infos = load_data("Data/MapInfos.rxdata")
self.contents.draw_text(150, 0, 124, 32, $data_map_infos[$game_map.map_id].name, 2)
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 120, 32, "Location")
end
end
class Window_Title < Window_Base
def initialize
super(0, 0, 322, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 120, 32, 'Chaotic Fury')
end
end
class Window_Chapter < Window_Base
def initialize
super(0, 0, 322, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 120, 32, 'Chapter')
self.contents.font.color = normal_color
self.contents.draw_text(250, 0, 120, 32, $game_variables[1].to_s)
end
end
class Window_PlayTime < Window_Base
def initialize
super(0, 0, 160, 129)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, -10, 120, 32, "Play Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 10, 120, 32, text, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 38, 120, 32, "Real Time")
@time_string = Time.now
text = @time_string.strftime("%A %H:%M:%S")
self.contents.font.color = normal_color
self.contents.draw_text(4, 60, 120, 32, text, 2)
end
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
class Window_MenuStatus < Window_Selectable
def initialize
super(0, 0, 640, 289)
@column_max = 4
bw = 152 * @column_max
bh = (($game_party.actors.size - 1) / @column_max + 1) * 256
self.contents = Bitmap.new(bw, bh)
refresh
self.active = false
self.index = - 1
end
def refresh
self.contents.clear
self.contents.font.size = 20
self.contents.font.name = $defaultfonttype
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = i % @column_max * 152 + 8
y = i / @column_max * 256 + 96
actor = $game_party.actors[i]
draw_actor_battler(actor, x, y + 100)
draw_actor_name(actor, x, y - 100)
draw_actor_level(actor, x, y + 46)
draw_actor_state(actor, x + 64, y + 46)
self.contents.font.color = system_color
self.contents.draw_text(x, y + 130, 32, 32, "Next")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y + 130, 100, 32, actor.next_rest_exp_s, 2)
draw_actor_hp(actor, x, y + 74)
draw_actor_sp(actor, x, y + 102)
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
cursor_width = 152
x = @index % @column_max * 152
y = @index / @column_max * 256 - self.oy
self.cursor_rect.set(x, y, cursor_width, 256)
self.oy = @index / @column_max * 256
end
end
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "Battle Options"
s7 = "Exit"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.height = 5 * 32 + 32
@command_window.x = 480
@command_window.y = 288
@command_window.index = @menu_index
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 288
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
@location_window = Window_Location.new
@location_window.x = 159
@location_window.y = 416
@chapter_window = Window_Chapter.new
@chapter_window.x = 159
@chapter_window.y = 352
@title_window = Window_Title.new
@title_window.x = 159
@title_window.y = 288
@status_window = Window_MenuStatus.new
@status_window.x = 0
@status_window.y = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@playtime_window.dispose
@gold_window.dispose
@location_window.dispose
@chapter_window.dispose
@title_window.dispose
@status_window.dispose
end
def update
@command_window.update
@playtime_window.update
@gold_window.update
@location_window.update
@chapter_window.update
@title_window.update
@status_window.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 5
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
$scene = Scene_Customize.new
when 6
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
return
end
end
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1
if $game_party.actors[@status_window.index].restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
My Window_Scene so far
#===================================================
# - CLASS Your_Scene Begins
#===================================================
class Your_Scene
#---------------------------------------------------------------------------------
def initialize
end
#---------------------------------------------------------------------------------
def main
@window1 = Window1.new
@window1.x =476
@window1.y =254
@window1.height = 174
@window1.width = 165
#@window1.z = 200
@window2 = Window2.new
@window2.x =0
@window2.y =0
@window2.height = 377
@window2.width = 479
#@window2.z = 200
@window3 = Window3.new
@window3.x =476
@window3.y =425
@window3.height = 56
@window3.width = 165
#@window3.z = 200
@window4 = Window4.new
@window4.x =476
@window4.y =53
@window4.height = 96
@window4.width = 165
#@window4.z = 200
@window5 = Window5.new
@window5.x =476
@window5.y =146
@window5.height = 111
@window5.width = 165
#@window5.z = 200
@window6 = Window6.new
@window6.x =0
@window6.y =425
@window6.height = 56
@window6.width = 479
#@window6.z = 200
@window7 = Window7.new
@window7.x =285
@window7.y =374
@window7.height = 55
@window7.width = 194
#@window7.z = 200
@window8 = Window8.new
@window8.x =0
@window8.y =374
@window8.height = 55
@window8.width = 289
#@window8.z = 200
@window9 = Window9.new
@window9.x =476
@window9.y =0
@window9.height = 56
@window9.width = 165
#@window9.z = 200
Graphics.transition
loop do
Graphics.update
Input.update
#update
if $scene != self
break
end
end
Graphics.freeze
@window1.dispose
@window2.dispose
@window3.dispose
@window4.dispose
@window5.dispose
@window6.dispose
@window7.dispose
@window8.dispose
@window9.dispose
end
#---------------------------------------------------------------------------------
#---------------------------------------------------------------------------------
def update
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Your_Scene Ends
#===================================================
#===================================================
# - CLASS Window1 Begins
#===================================================
class Window1 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 165,174)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "1")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window1 Ends
#===================================================
#===================================================
# - CLASS Window2 Begins
#===================================================
class Window2 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 479,377)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "2")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window2 Ends
#===================================================
#===================================================
# - CLASS Window3 Begins
#===================================================
class Window3 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 165,56)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "3")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window3 Ends
#===================================================
#===================================================
# - CLASS Window4 Begins
#===================================================
class Window4 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 165,96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "4")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window4 Ends
#===================================================
#===================================================
# - CLASS Window5 Begins
#===================================================
class Window5 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 165,111)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "5")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window5 Ends
#===================================================
#===================================================
# - CLASS Window6 Begins
#===================================================
class Window6 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 479,56)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "6")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window6 Ends
#===================================================
#===================================================
# - CLASS Window7 Begins
#===================================================
class Window7 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 194,55)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "7")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window7 Ends
#===================================================
#===================================================
# - CLASS Window8 Begins
#===================================================
class Window8 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 289,55)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "8")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window8 Ends
#===================================================
#===================================================
# - CLASS Window9 Begins
#===================================================
class Window9 < Window_Base
#---------------------------------------------------------------------------------
def initialize
super(0, 0, 165,56)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = text_color(0)
self.contents.draw_text(0, 0, 33, 33, "9")
end
#---------------------------------------------------------------------------------
end
#===================================================
# - CLASS Window9 Ends
#===================================================
The RTAB Configuration Script
# RTAB Configuration System
# Support bulletin board http: //www2.ezbbs.net/21/minto-aaa/
#
# Updated for use with:
# Real time active battle (RTAB) Ver 1.12
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/
=begin
REVISED:
This script brings up an options menu geared to handle the speed, action and
camera functions of Cogwheel's RTAB CBS.
Originally designed and encorporated in a working main menu, you will note on
line 368 of this script that the designer intended the menu to return to menu
option #6 ( $scene = Scene_Menu.new(6) ).
As $scene = Scene_Menu.new(5) would have returned to the menu, highlighting the
"End Game" option, the designer's menu obviously had more than the default num-
ber of options.
Obviously for anyone designing their own menu, this system is already set up
to be encorporated into your own menu. But for those who want a system where
an event (such as a savepoint-like object) brings up the RTAB configuration
menu, you merely need to alter line #368 as such:
$scene = Scene_Map.new
-------------------------------------------------------------------------------
To call this script, use:
$scene = Scene_Customize.new
=end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles data surrounding the system. Backround music, etc.
# is managed here as well. Refer to "$game_system" for the instance of
# this class.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :battle_speed # 퓬‘¬“x
attr_accessor :battle_active # ƒAƒNƒeƒBƒu
attr_accessor :battle_camera # ƒJƒƒ‰‰Ò“®
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias initialize_MINT_RTAB_Customize initialize
def initialize
# Call original initialization process
initialize_MINT_RTAB_Customize
@battle_speed = 150 # Default: RTAB speed
@battle_active = 2 # Default: Wait during Item/Skill Select
@battle_camera = false # Default: Camera turned off
end
end
#==============================================================================
# ** Window_Customize
#==============================================================================
class Window_Customize < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(160, 92, 320, 288)
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
@element = []
#Acquiring the skill which you have acquired
get_data
get_element
# If the number of items is not 0, drawing item
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# * Acquire the menu option items
#--------------------------------------------------------------------------
def get_data
data = [
"Battle speed",
"Active",
"Camera work"]
@data = data
end
#--------------------------------------------------------------------------
# * Acquire the menu option settings
#--------------------------------------------------------------------------
def get_element
case $game_system.battle_active
when 1
active = "Wait"
when 2
active = "Semi active"
else
active = "Full active"
end
if $game_system.battle_camera
camera = "ON"
else
camera = "OFF"
end
data = [$game_system.battle_speed.to_s, active, camera]
@element = data
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
deta = @element[index]
x = 0
y = index * 32
self.contents.draw_text(x + 4, y, 140, 32, item, 0)
self.contents.draw_text(x + 144, y, 140, 32, deta, 2)
end
#--------------------------------------------------------------------------
# * Set Help Text
#--------------------------------------------------------------------------
def help_text(index)
case index
when 0
text = "Modifies the combat speed. Lower numbers increases combat speed."
when 1
text = "Modifies the flow of time in battle"
else
text = "Sets whether the camera follows the moving battler."
end
end
#--------------------------------------------------------------------------
# * Update Help Text
#--------------------------------------------------------------------------
def update_help
text = help_text(self.index)
@help_window.set_text(text)
end
end
#==============================================================================
# ** Window_Command2
#------------------------------------------------------------------------------
# This window deals with new command choices.
#==============================================================================
class Window_Command2 < Window_Selectable
#--------------------------------------------------------------------------
# * Object initilization
#--------------------------------------------------------------------------
def initialize(width, commands)
# Calculating the height of the window from the quantity of command
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
# color : text color
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
self.contents.font.size = 20
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
#--------------------------------------------------------------------------
# * Disable Item
# index : item number
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
#--------------------------------------------------------------------------
# * Set Help Text
#--------------------------------------------------------------------------
def help_text(index)
case index
when 0
text = "Pauses when choosing a Skill, an Item or an Enemy. (Beginners)"
when 1
text = "Pauses when the Skill or Item windows are active. (Recommended)"
else
text = "Action never pauses. (Expert-mode)"
end
end
#--------------------------------------------------------------------------
# * Update Help Text
#--------------------------------------------------------------------------
def update_help
text = help_text(self.index)
@help_window.set_text(text)
end
end
#==============================================================================
# ** Window_Help2
#------------------------------------------------------------------------------
# This window shows explanations for new options.
#==============================================================================
class Window_Help2 < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 420, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.pause = false
end
#--------------------------------------------------------------------------
# * Set Text
# text : text string displayed in window
# align : alignment (0..flush left, 1..center, 2..flush right)
#--------------------------------------------------------------------------
def set_text(text, align = 1)
# If at least one part of text and alignment differ from last time
if text != @text or align != @align
# Redraw text
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
end
#==============================================================================
# ** Scene_Customize
#------------------------------------------------------------------------------
# This class performs RTAB Player Options decisions
#==============================================================================
class Scene_Customize
#--------------------------------------------------------------------------
# * Main processing
#--------------------------------------------------------------------------
def main
# Make help window, main window
@help_window = Window_Help2.new
@main_window = Window_Customize.new
@main_window.refresh
@dummy_window = Window_Base.new(480,92,100,64)
@dummy_window.visible = false
@number_window = Window_InputNumber.new(3)
@number_window.x = 480
@number_window.y = 92
@number_window.visible = false
@number_window.active = false
command = ["Wait", "Semi-Active", "Fully-Active"]
camera_command = ["On", "Off"]
@command_window = Window_Command2.new(120, command)
@command_window.x = 480
@command_window.y = 136
@command_window.visible = false
@command_window.active = false
@camera_window = Window_Command.new(120, camera_command)
@camera_window.x = 480
@camera_window.y = 172
@camera_window.visible = false
@camera_window.active = false
# Associate help window
@main_window.help_window = @help_window
@command_window.help_window = @help_window
# 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
@main_window.dispose
@number_window.dispose
@dummy_window.dispose
@command_window.dispose
@camera_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# If main window is active: call update_main
if @main_window.active
@main_window.update
update_main
return
end
if @number_window.active
@number_window.update
update_number
return
end
if @command_window.active
@command_window.update
update_command
return
end
if @camera_window.active
@camera_window.update
update_camera
return
end
end
#--------------------------------------------------------------------------
# * Main Update (when main window is active)
#--------------------------------------------------------------------------
def update_main
# If B Button is pressed
if Input.trigger?(Input::B)
# Play Cancel SE
$game_system.se_play($data_system.cancel_se)
# Return to Menu (THIS is where you return from an options menu)
#$scene = Scene_Menu.new(6)
$scene = Scene_Map.new
return
end
# If C Button was pressed
if Input.trigger?(Input::C)
# Branch by main command decision
@index = @main_window.index
# Play decision SE
$game_system.se_play($data_system.decision_se)
case @index
when 0
@number_window.active = true
@number_window.visible = true
@dummy_window.visible = true
@main_window.active = false
when 1
@command_window.active = true
@command_window.visible = true
@main_window.active = false
when 2
@camera_window.active = true
@camera_window.visible = true
@main_window.active = false
when 3
@camera_window.active = true
@camera_window.visible = true
@main_window.active = false
end
return
end
end
#--------------------------------------------------------------------------
# * Number Update (when number window is active)
#--------------------------------------------------------------------------
def update_number
# If B Button was pressed
if Input.trigger?(Input::B)
# Play Cancel SE
$game_system.se_play($data_system.cancel_se)
@number_window.active = false
@number_window.visible = false
@dummy_window.visible = false
@main_window.active = true
return
end
# If C Button was Pressed
if Input.trigger?(Input::C)
# Obtain Current RTAB Battle Speed
$game_system.battle_speed = @number_window.number
$game_system.battle_speed = 1 if @number_window.number == 0
# Play Decision SE
$game_system.se_play($data_system.decision_se)
@number_window.active = false
@number_window.visible = false
@dummy_window.visible = false
@main_window.active = true
@main_window.refresh
return
end
end
#--------------------------------------------------------------------------
# * Command Update (when command window is active)
#--------------------------------------------------------------------------
def update_command
# If B Button was pressed
if Input.trigger?(Input::B)
# Play Cancel SE
$game_system.se_play($data_system.cancel_se)
@command_window.active = false
@command_window.visible = false
@main_window.active = true
return
end
# If C Button was pressed
if Input.trigger?(Input::C)
# Branch by "Active" window cursor position
case @command_window.index
when 0
$game_system.battle_active = 1
when 1
$game_system.battle_active = 2
when 2
$game_system.battle_active = 3
end
# Play Decision SE
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@command_window.visible = false
@main_window.active = true
@main_window.refresh
return
end
end
#--------------------------------------------------------------------------
# * Camera Update (when camera window is active)
#--------------------------------------------------------------------------
def update_camera
# If B button was pressed
if Input.trigger?(Input::B)
# Play Cancel SE
$game_system.se_play($data_system.cancel_se)
@camera_window.active = false
@camera_window.visible = false
@main_window.active = true
return
end
# If C Button was pressed
if Input.trigger?(Input::C)
# Branch by camera window cursor position
case @camera_window.index
when 0
$game_system.battle_camera = true
when 1
$game_system.battle_camera = false
end
# Play Decision SE
$game_system.se_play($data_system.decision_se)
@camera_window.active = false
@camera_window.visible = false
@main_window.active = true
@main_window.refresh
return
end
end
end
#==============================================================================
# Real time active battle (RTAB) Ver 1.12
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * ATB fundamental setup
#--------------------------------------------------------------------------
def atb_setup
# ATB initialization
#
# speed : Battle speed decision. The lower the value, the faster the system
#
# @active : Degree of active setting
# 3 : Always active state
# 2 : ATB pauses when selecting skill/item
# 1 : Same as 2, but pauses during target selection
# 0 : Same as 1, but pauses during command window selection.
#
# @action : Others while acting is the fact that by their causes conduct permitted?
# 3 : If by his is not incapacitation, limited to you permit
# 2 : If by his has not received the damage, you permit
# 1 : In addition to the state of 2, if the target has not acted, you permit
# 0 : Conduct is not permitted. Until it finishes to act in order, it waits
#
# @anime_wait : When it makes true, during battle animation damage indicating wait catches
# @damage_wait : Damage indicatory waiting (as for unit frame)
#
# @after_wait : At the time of ally enemy total loss, until moves to next processing, waiting
# [a, b] a) At the time of party total loss, b) At time of enemy total loss (unit frame)
#
# @enemy_speed : Thought speed of enemy. If 1 immediately conduct.
# In every frame, conduct is caused with the probability of 1/@enemy_speed
#
# @force : With forced action forced condition at time of skill use
# 2: As for skill everything not to reside permanently, by all means immediately execution
# 1: As for independent skill to reside permanently, only cooperation skill immediately execution
# 0: All the skill permanent residence just are done
#
# ($scene.force = Usually by making x, from the script of the event modification possibility)
#
# CAMERA DRIVE SYSTEM: This system moves the Camera POV to the currently moving battler
# @drive : Camera drive system ON/OFF. When true, drive ON, when false drive OFF
# @scroll_time : Time it takes to scroll/move the camera POV during battle
#
# @zoom_rate = [i, j] : Zoom Rate (Changes the size of the enemy based on perspective)
# i) When arranging in the picture first section, enlargement ratio
# j) When arranging in the picture lowest section, enlargement ratio
# 1 When liking to make time, 1.0 be sure to set with decimal
speed = $game_system.battle_speed # IN FRAMES / FOR ATB SYSTEM
@active = $game_system.battle_active # Active Setting (Range of 0 - 3)
@action = 2 # Action Setting (Range of 0 - 3)
@anime_wait = false #
@damage_wait = 10 #
@after_wait = [80, 0] #
@enemy_speed = 40 #
@force = 0 #
@drive = $game_system.battle_camera # Turns camera system on/off
@scroll_time = 15 # Speed of camera system
@zoom_rate = [1.0, 1.0] # Change size of battler based on perspective
@help_time = 40
@escape == false
@camera = nil
@max = 0
@turn_cnt = 0
@help_wait = 0
@action_battlers = []
@synthe = []
@spell_p = {}
@spell_e = {}
@command_a = false
@command = []
@party = false
for battler in $game_party.actors + $game_troop.enemies
spell_reset(battler)
battler.at = battler.agi * rand(speed / 2)
battler.damage_pop = {}
battler.damage = {}
battler.damage_sp = {}
battler.critical = {}
battler.recover_hp = {}
battler.recover_sp = {}
battler.state_p = {}
battler.state_m = {}
battler.animation = []
if battler.is_a?(Game_Actor)
@max += battler.agi
end
end
@max *= speed
@max /= $game_party.actors.size
for battler in $game_party.actors + $game_troop.enemies
battler.atp = 100 * battler.at / @max
end
end
end