This is where I'll post the completed version of the CMS.
This is a planned layout for it and may change.
It's animated, etc. And is using the the SDK, however I will show how to use without the SDK.
The code will be mostly for me until it is completed and I have informed you of its completion.
Screenshots won't come that often seeing as I get one day a week to do such.
Here's the layout (may change).
The script (will be followed with 3 .rb files [SDK 1.3, Tsuno Tech, Cursor Menu])
#==============================================================================
# ** Tsuno Tech CMS
#------------------------------------------------------------------------------
# Tsunokiette
# ?
# ??/??/??
#==============================================================================
SDK.log('Tsuno Tech CMS', 'Tsunokiette', ?, ?)
#--------------------------------------------------------------------------
# Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.state('Tsuno Tech CMS') == true
#------------------------------------------------------------------------------
# Begin RPG::Cache Edit
#------------------------------------------------------------------------------
module RPG
#---
module Cache
#---
#--------------------------------------------------------------------------
# * Return a bitmap from the Faces graphical folder
#--------------------------------------------------------------------------
def self.face(filename)
self.load_bitmap('Graphics/Faces/', filename)
end
#---
end
#---
end
#------------------------------------------------------------------------------
# End RPG::Cache Edit
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Begin Game_Map Edit
#------------------------------------------------------------------------------
class Game_Map
#--------------------------------------------------------------------------
# * Return the current map's name
#--------------------------------------------------------------------------
def name
$map_infos[@map_id]
end
end
#------------------------------------------------------------------------------
# End Game_Map Edit
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Begin Scene_Title Edit
#------------------------------------------------------------------------------
class Scene_Title
#load map data to be used
$map_infos = load_data("Data/MapInfos.rxdata")
#for loop (key in $map_infos.keys)
for key in $map_infos.keys
#save map names
$map_infos[key] = $map_infos[key].name
end
end
#------------------------------------------------------------------------------
# End Scene_Title Edit
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Begin Game_Actor Edit
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Return the exp needed to reach the next level
#--------------------------------------------------------------------------
def needed_exp(current_lvl)
return @exp_list[current_lvl + 1]
end
#--------------------------------------------------------------------------
# * Return the currently gained exp
#--------------------------------------------------------------------------
def gained_exp(current_lvl,current_exp)
return (current_exp - @exp_list[current_lvl])
end
end
#------------------------------------------------------------------------------
# End Game_Actor Edit
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Begin Game_Party Edit
#------------------------------------------------------------------------------
class Game_Party
attr_accessor :chapter
#alias Initialize
alias :tsunokiette_TsunoTechCMS_GameParty_Init :initialize
#--------------------------------------------------------------------------
# * Initialization
#--------------------------------------------------------------------------
def initialize
@chapter = 'Chapter'
tsunokiette_TsunoTechCMS_GameParty_Init
end
#--------------------------------------------------------------------------
# * Return the chapter
#--------------------------------------------------------------------------
def chapter
return @chapter
end
end
#------------------------------------------------------------------------------
# End Game_Party Edit
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Begin Window_Base Edit
#------------------------------------------------------------------------------
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw HP Bar
#--------------------------------------------------------------------------
def draw_hp_bar(actor,x,y,w = 202)
#get hp and max hp
hp = actor.hp
max_hp = actor.maxhp
#define colors to be used
border_color = Color.new(0,0,0,255)
line1_color = Color.new(0,145,0,255)
line2_color = Color.new(0,176,0,255)
line3_color = Color.new(0,215,0,255)
line4_color = Color.new(0,253,0,255)
line5_color = Color.new(0,215,0,255)
line6_color = Color.new(0,176,0,255)
line7_color = Color.new(0,145,0,255)
line8_color = Color.new(0,120,0,255)
empty_color = Color.new(75,75,75,255)
#get widths and x's
line_width = (((hp * 1.0) / max_hp) * (w - 2))
empty_width = ((w - 2) - line_width)
empty_x = ((x + 1) + line_width)
#make border Rects
border1 = Rect.new(x, y, w, 1)
border2 = Rect.new(x, y + 9, w, 1)
border3 = Rect.new(x, y + 1, 1, 8)
border4 = Rect.new(x + (w - 1), y + 1, 1, 8)
#make line Rects
line1 = Rect.new(x + 1, y + 1, line_width, 1)
line2 = Rect.new(x + 1, y + 2, line_width, 1)
line3 = Rect.new(x + 1, y + 3, line_width, 1)
line4 = Rect.new(x + 1, y + 4, line_width, 1)
line5 = Rect.new(x + 1, y + 5, line_width, 1)
line6 = Rect.new(x + 1, y + 6, line_width, 1)
line7 = Rect.new(x + 1, y + 7, line_width, 1)
line8 = Rect.new(x + 1, y + 8, line_width, 1)
#make empty Rect
empty = Rect.new(empty_x, 1, empty_width, 8)
#fill border Rects
self.contents.fill_rect(border_1,border_color)
self.contents.fill_rect(border_2,border_color)
self.contents.fill_rect(border_3,border_color)
self.contents.fill_rect(border_4,border_color)
#fill line Rects
self.contents.fill_rect(line1,line1_color)
self.contents.fill_rect(line2,line2_color)
self.contents.fill_rect(line3,line3_color)
self.contents.fill_rect(line4,line4_color)
self.contents.fill_rect(line5,line5_color)
self.contents.fill_rect(line6,line6_color)
self.contents.fill_rect(line7,line7_color)
self.contents.fill_rect(line8,line8_color)
#fill empty Rect
self.contents.fill_rect(empty,empty_color)
end
#--------------------------------------------------------------------------
# * Draw SP Bar
#--------------------------------------------------------------------------
def draw_sp_bar(actor,x,y,w = 202)
#get sp and max sp
sp = actor.sp
max_sp = actor.maxsp
#get percentage width
percentage_width = ((w - 2) / 100)
#define colors to be used
border_color = Color.new(0,0,0,255)
line1_color = Color.new(112,0,223,255)
line2_color = Color.new(130,4,255,255)
line3_color = Color.new(155,55,255,255)
line4_color = Color.new(170,85,255,255)
line5_color = Color.new(155,55,255,255)
line6_color = Color.new(130,4,255,255)
line7_color = Color.new(112,0,223,255)
line8_color = Color.new(88,0,176,255)
empty_color = Color.new(75,75,75,255)
#get widths and x's
line_width = (((sp * 1.0) / max_sp) * (w - 2))
empty_width = ((w - 2) - line_width)
empty_x = ((x + 1) + line_width)
#make border Rects
border1 = Rect.new(x, y, w, 1)
border2 = Rect.new(x, y + 9, w, 1)
border3 = Rect.new(x, y + 1, 1, 8)
border4 = Rect.new(x + (w - 1), y + 1, 1, 8)
#make line Rects
line1 = Rect.new(x + 1, y + 1, line_width, 1)
line2 = Rect.new(x + 1, y + 2, line_width, 1)
line3 = Rect.new(x + 1, y + 3, line_width, 1)
line4 = Rect.new(x + 1, y + 4, line_width, 1)
line5 = Rect.new(x + 1, y + 5, line_width, 1)
line6 = Rect.new(x + 1, y + 6, line_width, 1)
line7 = Rect.new(x + 1, y + 7, line_width, 1)
line8 = Rect.new(x + 1, y + 8, line_width, 1)
#make empty Rect
empty = Rect.new(empty_x, 1, empty_width, 8)
#fill border Rects
self.contents.fill_rect(border_1,border_color)
self.contents.fill_rect(border_2,border_color)
self.contents.fill_rect(border_3,border_color)
self.contents.fill_rect(border_4,border_color)
#fill line Rects
self.contents.fill_rect(line1,line1_color)
self.contents.fill_rect(line2,line2_color)
self.contents.fill_rect(line3,line3_color)
self.contents.fill_rect(line4,line4_color)
self.contents.fill_rect(line5,line5_color)
self.contents.fill_rect(line6,line6_color)
self.contents.fill_rect(line7,line7_color)
self.contents.fill_rect(line8,line8_color)
#fill empty Rect
self.contents.fill_rect(empty,empty_color)
end
#--------------------------------------------------------------------------
# * Draw EXP Bar
#--------------------------------------------------------------------------
def draw_exp_bar(actor,x,y,w = 202)
#get exp and needed exp
exp = actor.exp
gained_exp = actor.gained_exp(actor.lvl,exp)
needed_exp = actor.needed_exp(actor.lvl)
#define colors to be used
border_color = Color.new(0,0,0,255)
line1_color = Color.new(140,140,0,255)
line2_color = Color.new(157,157,0,255)
line3_color = Color.new(170,170,0,255)
line4_color = Color.new(196,196,0,255)
line5_color = Color.new(170,170,0,255)
line6_color = Color.new(157,157,0,255)
line7_color = Color.new(140,140,0,255)
line8_color = Color.new(128,128,0,255)
empty_color = Color.new(75,75,75,255)
#get widths and x's
line_width = (((gained_exp * 1.0) / needed_exp) * (w - 2))
empty_width = ((w - 2) - line_width)
empty_x = ((x + 1) + line_width)
#make border Rects
border1 = Rect.new(x, y, w, 1)
border2 = Rect.new(x, y + 9, w, 1)
border3 = Rect.new(x, y + 1, 1, 8)
border4 = Rect.new(x + (w - 1), y + 1, 1, 8)
#make line Rects
line1 = Rect.new(x + 1, y + 1, line_width, 1)
line2 = Rect.new(x + 1, y + 2, line_width, 1)
line3 = Rect.new(x + 1, y + 3, line_width, 1)
line4 = Rect.new(x + 1, y + 4, line_width, 1)
line5 = Rect.new(x + 1, y + 5, line_width, 1)
line6 = Rect.new(x + 1, y + 6, line_width, 1)
line7 = Rect.new(x + 1, y + 7, line_width, 1)
line8 = Rect.new(x + 1, y + 8, line_width, 1)
#make empty Rect
empty = Rect.new(empty_x, 1, empty_width, 8)
#fill border Rects
self.contents.fill_rect(border_1,border_color)
self.contents.fill_rect(border_2,border_color)
self.contents.fill_rect(border_3,border_color)
self.contents.fill_rect(border_4,border_color)
#fill line Rects
self.contents.fill_rect(line1,line1_color)
self.contents.fill_rect(line2,line2_color)
self.contents.fill_rect(line3,line3_color)
self.contents.fill_rect(line4,line4_color)
self.contents.fill_rect(line5,line5_color)
self.contents.fill_rect(line6,line6_color)
self.contents.fill_rect(line7,line7_color)
self.contents.fill_rect(line8,line8_color)
#fill empty Rect
self.contents.fill_rect(empty,empty_color)
end
#--------------------------------------------------------------------------
# * Draw Actor's Face Graphic
#--------------------------------------------------------------------------
def draw_actor_face(actor,x,y)
#if face graphic for the actor does not exist
if file.exist?("Graphics/Faces/#{actor.name}") != true
#make face rect
face = Rect.new(x,y,100,100)
#get bitmap
bitmap = RPG::Cache.face('Frame')
#fill face rect with bitmap
self.contents.blt(0,0,bitmap,face)
else
#make face rect
face = Rect.new(x,y,100,100)
#get bitmap
bitmap = RPG::Cache.face('Frame')
#fill face rect with bitmap
self.contents.blt(0,0,bitmap,face)
#get face_bitmap
face_bitmap = RPG::Cache.face("#{actor.name}")
#fill face rect with face_bitmap
self.contents.blt(5,4,face_bitmap,face)
end
end
end
#------------------------------------------------------------------------------
# End Window_Base Edit
#------------------------------------------------------------------------------
#==============================================================================
# * CMS_Windows
#------------------------------------------------------------------------------
# This module contains all the windows the CMS uses.
#==============================================================================
module CMS_Windows
#------------------------------------------------------------------------------
# Window_Description
#------------------------------------------------------------------------------
class Window_Description < Window_Base
#--------------------------------------------------------------------------
# * Initialization
#--------------------------------------------------------------------------
def initialize(x,y,w,h)
super(x,y,w,h)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 22
end
#--------------------------------------------------------------------------
# * Set_Text
#--------------------------------------------------------------------------
def set_text(text = '')
self.contents.clear
w = self.contents.width
h = self.contents.height
self.contents.font.color = normal_color
self.contents.draw_text(0,0,w,h,text,1)
end
end
#------------------------------------------------------------------------------
# End Window_Description
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Window_MenuStatus
#------------------------------------------------------------------------------
class Window_Menustatus < Window_Selectable
[contents]
end
#------------------------------------------------------------------------------
# End Window_MenuStatus
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Window_CursorCommand
#------------------------------------------------------------------------------
class Window_CursorCommand < Window_Selectable
[contents]
end
#------------------------------------------------------------------------------
# End Window_CursorCommand
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Window_FakeCommand
#------------------------------------------------------------------------------
class Window_FakeCommand < Window_Base
#--------------------------------------------------------------------------
# * Initialization
#--------------------------------------------------------------------------
def initialize(x,y,w,h,command = '',index = 0)
@command = command
@index = 0
super(x,y,w,h)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 22
refresh
self.opacity = 0
self.back_opacity = 0
self.contents_opacity = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
x = 24
y = (@index * 32)
self.contents.draw_text(x,y,self.contents.width - 24,32,@command)
end
end
#------------------------------------------------------------------------------
# End Window_FakeCommand
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Window_Gold
#------------------------------------------------------------------------------
class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# * Initialization
#--------------------------------------------------------------------------
def initialize(x,y,w,h)
super(x,y,w,h)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 11
set_comma
refresh
end
#--------------------------------------------------------------------------
# * Set_Comma
#--------------------------------------------------------------------------
def set_comma
var = $game_party.gold.to_s
g = var.split(//)
case $game_party.gold
when 0..9999
@gold = $game_party.gold.to_s
when 10000..99999
@gold = "#{g[0]}#{g[1]},#{g[2]}#{g[3]}#{g[4]}"
when 100000..999999
@gold = "#{g[0]}#{g[1]}#{g[2]},#{g[3]}#{g[4]}#{g[5]}"
when 1000000..9999999
@gold = "#{g[0]},#{g[1]}#{g[2]}#{g[3]},#{g[4]}#{g[5]}#{g[6]}"
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
w = self.contents.width
h = (self.contents.height / 2)
self.contents.font.color = system_color
self.contents.draw_text(0,0,w,h,$data_system.words.gold + ' :',0)
self.contents.font.color = normal_color
self.contents.draw_text(0,16,w,h,@gold,2)
end
end
#------------------------------------------------------------------------------
# End Window_Gold
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Window_ElapsedTime
#------------------------------------------------------------------------------
class Window_ElapsedTime < Window_Base
#--------------------------------------------------------------------------
# * Initialization
#--------------------------------------------------------------------------
def initialize(x,y,w,h)
super(x,y,w,h)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 11
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
w = self.contents.width
h = (self.contents.height / 2)
@total_s = (Graphics.frame_count / Graphics.frame_rate)
h = ((@total_s / 60) / 60)
m = ((@total_s / 60) % 60)
s = (@total_s % 60)
text = "#{h}.#{m}.#{s}"
self.contents.font.color = system_color
self.contents.draw_text(0,0,w,h,'Elapsed Time :',0)
self.contents.font.color = normal_color
self.contents.draw_text(0,16,w,h,text, 2)
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#------------------------------------------------------------------------------
# End Window_ElapsedTime
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Window_Location
#------------------------------------------------------------------------------
class Window_Location < Window_Base
#--------------------------------------------------------------------------
# * Initialization
#--------------------------------------------------------------------------
def initialize(x,y,w,h)
super(x,y,w,h)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 11
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
w = self.contents.width
h = (self.contents.height / 2)
self.contents.font.color = system_color
self.contents.draw_text(0,0,w,h,'Location :',0)
self.contents.font.color = normal_color
self.contents.draw_text(0,16,w,h,$game_map.name,2)
end
end
#------------------------------------------------------------------------------
# End Window_Location
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Window_Chapter
#------------------------------------------------------------------------------
class Window_Chapter < Window_Base
#--------------------------------------------------------------------------
# * Initialization
#--------------------------------------------------------------------------
def initialize(x,y,w,h)
super(x,y,w,h)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 11
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
w = self.contents.width
h = (self.contents.height / 2)
self.contents.font.color = system_color
self.contents.draw_text(0,0,w,h,'Chapter :',0)
self.contents.font.color = normal_color
self.contents.draw_text(0,16,w,h,$game_party.chapter,2)
end
end
#------------------------------------------------------------------------------
# End Window_Chapter
#------------------------------------------------------------------------------
end
#------------------------------------------------------------------------------
# End CMS_Windows
#------------------------------------------------------------------------------
#==============================================================================
# * Scene_Menu
#------------------------------------------------------------------------------
# This class performs menu screen processing.
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
commands_primary_init
commands_secondary_init
animated_intro
end
#--------------------------------------------------------------------------
# * Set Primary Commands
#--------------------------------------------------------------------------
def commands_primary_init
@commands = []
s1 = 'Bag'
s2 = 'Party'
s3 = 'Records'
s4 = 'End'
@commands.push(s1, s2, s3, s4).flatten!
end
#--------------------------------------------------------------------------
# * Set Secondary Commands
#--------------------------------------------------------------------------
def commands_secondary_init
@party_commands = []
@record_commands = []
s1 = 'Spells'
s2 = 'Equip'
s3 = 'Status'
s4 = 'Save'
s5 = 'Load'
@party_commands.push(s1, s2, s3).flatten!
@record_commands.push(s4,s5).flatten!
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
main_command_window
main_windows
# Execute transition
Graphics.transition
# Main loop
loop do
main_loop
break if main_scenechange?
end
# Refresh map
$game_map.refresh
# Prepare for transition
Graphics.freeze
main_dispose
end
#--------------------------------------------------------------------------
# * Animated Intro
#--------------------------------------------------------------------------
def animated_intro
#create fake command windows for fade in animation
fake1 = Window_FakeCommand.new(501,0,140,160)
fake2 = Window_FakeCommand.new(501,0,140,160,'Bag',0)
fake3 = Window_FakeCommand.new(501,0,140,160,'Party',1)
fake4 = Window_FakeCommand.new(501,0,140,160,'Records',2)
fake5 = Window_FakeCommand.new(501,0,140,160,'End',3)
#fade in
fake2.contents_opacity = 15
fake4.contents_opacity = 10
fake2.contents_opacity = 7
fake1.opacity = 5
fake1.back_opacity = 5
fake5.contents_opacity = 8
fake2.contents_opacity = 23
fake4.contents_opacity = 14
fake2.contents_opacity = 12
fake1.opacity = 7
fake1.back_opacity = 7
fake5.contents_opacity = 13
fake2.contents_opacity = 30
fake4.contents_opacity = 16
fake2.contents_opacity = 17
fake1.opacity = 15
fake1.back_opacity = 15
fake5.contents_opacity = 20
fake2.contents_opacity = 50
fake4.contents_opacity = 30
fake2.contents_opacity = 35
fake1.opacity = 25
fake1.back_opacity = 25
fake5.contents_opacity = 40
fake2.contents_opacity = 70
fake4.contents_opacity = 50
fake2.contents_opacity = 60
fake1.opacity = 50
fake1.back_opacity = 50
fake5.contents_opacity = 60
fake2.contents_opacity = 90
fake4.contents_opacity = 70
fake2.contents_opacity = 80
fake1.opacity = 70
fake1.back_opacity = 70
fake5.contents_opacity = 80
fake2.contents_opacity = 110
fake4.contents_opacity = 90
fake2.contents_opacity = 100
fake1.opacity = 90
fake1.back_opacity = 90
fake5.contents_opacity = 100
fake2.contents_opacity = 140
fake4.contents_opacity = 120
fake2.contents_opacity = 130
fake1.opacity = 120
fake1.back_opacity = 120
fake5.contents_opacity = 130
fake2.contents_opacity = 170
fake4.contents_opacity = 150
fake2.contents_opacity = 130
fake1.opacity = 150
fake1.back_opacity = 150
fake5.contents_opacity = 180
fake2.contents_opacity = 210
fake4.contents_opacity = 190
fake2.contents_opacity = 170
fake1.opacity = 190
fake1.back_opacity = 190
fake5.contents_opacity = 220
fake2.contents_opacity = 250
fake4.contents_opacity = 230
fake2.contents_opacity = 210
fake1.opacity = 230
fake1.back_opacity = 230
fake5.contents_opacity = 255
fake2.contents_opacity = 255
fake4.contents_opacity = 240
fake2.contents_opacity = 230
fake1.opacity = 240
fake1.back_opacity = 240
fake5.contents_opacity = 255
fake2.contents_opacity = 255
fake4.contents_opacity = 240
fake2.contents_opacity = 230
fake1.opacity = 240
fake1.back_opacity = 240
fake5.contents_opacity = 255
fake2.contents_opacity = 255
fake4.contents_opacity = 245
fake2.contents_opacity = 235
fake1.opacity = 245
fake1.back_opacity = 245
fake5.contents_opacity = 255
fake2.contents_opacity = 255
fake4.contents_opacity = 250
fake2.contents_opacity = 240
fake1.opacity = 250
fake1.back_opacity = 250
fake5.contents_opacity = 255
fake2.contents_opacity = 255
fake4.contents_opacity = 255
fake2.contents_opacity = 245
fake1.opacity = 255
fake1.back_opacity = 255
fake5.contents_opacity = 255
fake2.contents_opacity = 255
fake4.contents_opacity = 255
fake2.contents_opacity = 250
fake1.opacity = 255
fake1.back_opacity = 255
fake5.contents_opacity = 255
fake2.contents_opacity = 255
fake4.contents_opacity = 255
fake2.contents_opacity = 255
fake1.opacity = 255
fake1.back_opacity = 255
fake5.contents_opacity = 255
#create fake cursor for blinking fade in
fake_cursor = Sprite.new
fake_cursor.bitmap = RPG::Cache.icon('hand')
fake_cursor.opacity = 0
fake_cursor.x = 517
fake_cursor.y = 20
#blinking fade in
loop do
fake_cursor.opacity += 5
increased_count += 1
if increased_count == 5
decrease_ammount = (fake_cursor.opacity / 5)
for i in 1..5
fake_cursor.opacity -= decrease_ammount
end
for i in 1..5
fake_cursor.opacity += decrease_ammount
end
increased_count = 0
end
if fake_cursor.opacity == 255
break
end
end
end
#--------------------------------------------------------------------------
# * Main Command Window
#--------------------------------------------------------------------------
def main_command_window
@command_window = Window_CursorCommand.new(160, @commands)
@command_window.index = @menu_index
@command_window.height = 224
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(4)
end
end
#--------------------------------------------------------------------------
# * Main Command Window
#--------------------------------------------------------------------------
def main_windows
# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 224
# Make steps window
@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 320
# Make gold window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
end
#--------------------------------------------------------------------------
# * Main Loop
#--------------------------------------------------------------------------
def main_loop
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
end
#--------------------------------------------------------------------------
# * Scene Change
#--------------------------------------------------------------------------
def main_scenechange?
# Abort loop if screen is changed
if $scene != self
return true
end
return false
end
#--------------------------------------------------------------------------
# * Main Dispose
#--------------------------------------------------------------------------
def main_dispose
# Dispose of windows and sprites
automatic_dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
@playtime_window.update
@steps_window.update
@gold_window.update
@status_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
# If status window is active: call update_status
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# * Frame 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)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
update_command_check
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when status window is active)
#--------------------------------------------------------------------------
def update_status
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Make command window active
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# If C button was pressed
if Input.trigger?(Input::C)
buzzer_check
update_status_check unless buzzer_check
return
end
end
#--------------------------------------------------------------------------
# * Buzzer Check
#--------------------------------------------------------------------------
def buzzer_check
# If command other than save or end game, and party members = 0
if $game_party.actors.size == 0 and @command_window.index < 4
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return true
end
end
#--------------------------------------------------------------------------
# * Update Command Check
#--------------------------------------------------------------------------
def update_command_check
# Loads Current Command
command = @commands[@command_window.index]
# Checks Commands
if command == $data_system.words.item
command_item
elsif command == $data_system.words.skill
command_start_skill
elsif command == $data_system.words.equip
command_start_equip
elsif command == 'Status'
command_start_status
elsif command == 'Save'
command_save
elsif command == 'End Game'
command_endgame
end
end
#--------------------------------------------------------------------------
# * Update Status Check
#--------------------------------------------------------------------------
def update_status_check
# Loads Current Command
command = @commands[@command_window.index]
# Checks Command By Name
if command == $data_system.words.skill
command_skill
elsif command == $data_system.words.equip
command_equip
elsif command == 'Status'
command_status
end
end
#--------------------------------------------------------------------------
# * Command Item
#--------------------------------------------------------------------------
def command_item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Item.new
end
#--------------------------------------------------------------------------
# * Command Start Skill
#--------------------------------------------------------------------------
def command_start_skill
activate_status
end
#--------------------------------------------------------------------------
# * Command Skill
#--------------------------------------------------------------------------
def command_skill
# If this actor's action limit is 2 or more
if $game_party.actors[@status_window.index].restriction >= 2
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to skill screen
$scene = Scene_Skill.new(@status_window.index)
end
#--------------------------------------------------------------------------
# * Command Start Equip
#--------------------------------------------------------------------------
def command_start_equip
activate_status
end
#--------------------------------------------------------------------------
# * Command Equip
#--------------------------------------------------------------------------
def command_equip
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(@status_window.index)
end
#--------------------------------------------------------------------------
# * Command Start Status
#--------------------------------------------------------------------------
def command_start_status
activate_status
end
#--------------------------------------------------------------------------
# * Command Status
#--------------------------------------------------------------------------
def command_status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(@status_window.index)
end
#--------------------------------------------------------------------------
# * Command Save
#--------------------------------------------------------------------------
def command_save
# If saving is forbidden
if $game_system.save_disabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to save screen
$scene = Scene_Save.new
end
#--------------------------------------------------------------------------
# * Command End Game
#--------------------------------------------------------------------------
def command_endgame
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
end
#--------------------------------------------------------------------------
# * Activate Status Window
#--------------------------------------------------------------------------
def activate_status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Make status window active
@command_window.active = false
@status_window.active = true
@status_window.index = 0
end
end
#------------------------------------------------------------------------------
# End Scene_Menu
#------------------------------------------------------------------------------
end
#--------------------------------------------------------------------------
# End SDK Enabled Test
#--------------------------------------------------------------------------
SDK 1.3 .rbTsuno Tech .rbCursor MenuI apoligize for any inconvenience although I did put a warning *points at title*. I got the cursor menu working completely but I can't get it to work separately because it's stubborn...