Baniff's DMS Edit
Version: 0.1
Introduction
Well, I finally wrote my first script. It's nothing special, just an edit of the menu system. I also added some things of my own.
Features
Demo
Not needed. Just insert above Main
Script
Instructions
Make a new script above Main. *IMPORTANT* : You need 2 pictures in your pictures folder. Make one 640x480 and name it World Map . The other is 125x125 and call it Logo .
Compatibility
Probably won't work with a CMS. But you can try.
Credits and Thanks
Thanks to Mr.Mo for his tutorial. And thank you to FF4 for its wolrd map!:thumb:
Terms and Conditions
Use it however you want. I don't need credit, but please don't say you made it.
Version: 0.1
Introduction
Well, I finally wrote my first script. It's nothing special, just an edit of the menu system. I also added some things of my own.
Features
- Moved and rearranged the command window
- Rearranged the menu status
- Added a spot for your logo/game title
- Added a Map option
Main Menu
Spoiler
http://img219.imageshack.us/img219/9306/mainmenuxa5.png[/IMG]
Map
Spoiler
http://img217.imageshack.us/img217/1904/mapscenera7.png[/IMG]
Demo
Not needed. Just insert above Main
Script
script
Spoiler
#==========================================================================
#==========================================================================
#====Baniff's Menu V 0.1===================================================
#==========================================================================
#==========================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#---------------------------------------------------------------------------
#----Main Processing--------------------------------------------------------
#---------------------------------------------------------------------------
def main
#Make command window
s0 = "Equpiment" #Edit the names of the commands
s1 = "Skills"
s2 = "Status"
s3 = "Items"
s4 = "Map"
s5 = "Save"
s6 = "Exit"
@command_window = Window_Command.new(160, [s0, s1, s2, s3, s4, s5, s6])
@command_window.x = 480
@command_window.y = 0
@command_window.index = @menu_index
# If number of party members is 0
if $game_party.actors.size == 0
# Disable equip, skill, status, item
@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
@command_window.disable_item(5)
end
#Make gold Window
@gold_window = Window_Gold.new
@gold_window.x = 480
@gold_window.y = 256
# Make logo window
@logo_window = Window_Logo.new
@logo_window.x = 480
@logo_window.y = 320
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 0
@status_window.y = 0
# 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
@command_window.dispose
@gold_window.dispose
@logo_window.dispose
@status_window.dispose
end
#-----------------------------------------------------------
#----Frame Update-------------------------------------------
#-----------------------------------------------------------
def update
# Update windows
@command_window.update
@gold_window.update
@logo_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 is pushed
if Input.trigger?(Input::B)
$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)
# 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
end
# Branch by command window cursor position
case @command_window.index
when 0 # equipment
# 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
when 1 # skill
# 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
when 2 # 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
when 3 # item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Item.new
when 4 # world map
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_World_Map.new
when 5 # 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
when 6 # end game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
end
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)
# Branch by command window cursor position
case @command_window.index
when 0 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(@status_window.index)
when 1 # 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)
when 2 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
#---------------------------------------
#Window_Logo----------------------------
#Created by Baniff----------------------
#---------------------------------------
class Window_Logo < Window_Base
#----------------------------------------------------------------------
# * Object Initialization
#----------------------------------------------------------------------
def initialize
super(0, 0, 160, 160)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
#Shows 125 x 125 picture on the menu
@bitmap = RPG::Cache.picture("Logo")# Name of logo picture
self.contents.blt(0, 0, @bitmap, Rect.new(0, 0, @bitmap.width, @bitmap.height), 255)
end
end
#---------------------------------------------------------------------
# Scene_World_Map-----------------------------------------------------
# Created by Baniff---------------------------------------------------
#---------------------------------------------------------------------
class Scene_World_Map
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#call the window
@window = Window_World_Map.new
# 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
@window.dispose
end
#--------------------------------------------------------------------------
#----Frame Update----------------------------------------------------------
#--------------------------------------------------------------------------
def update
# Update windows
@window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to Menu screen
$scene = Scene_Menu.new(4)
return
end
end
end
#--------------------------------------------------
#----Window_World_Map------------------------------
#----Created by Baniff-----------------------------
#--------------------------------------------------
class Window_World_Map < Window_Base
#----------------------------------------------------------------------
#----Object Initialization
#----------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
#----Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Shows the picture on the window
@bitmap = RPG::Cache.picture("World Map")# Name of picture
self.contents.blt(0, 0, @bitmap, Rect.new(0, 0, @bitmap.width, @bitmap.height), 255)
end
end
#==============================================================================
#----Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
#----Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
#----Refresh---------------------------------------------------------------
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 116
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 236, y)#144
draw_actor_level(actor, x + 236, y + 32)#, 32
draw_actor_state(actor, x + 90, y)#90, 32
draw_actor_exp(actor, x + 236, y + 64)#, 64
draw_actor_hp(actor, x, y + 32)#236, 32
draw_actor_sp(actor, x, y + 64)#236, 32
end
end
#--------------------------------------------------------------------------
#----Cursor Rectangle Update-----------------------------------------------
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#==========================================================================
#====Baniff's Menu V 0.1===================================================
#==========================================================================
#==========================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#---------------------------------------------------------------------------
#----Main Processing--------------------------------------------------------
#---------------------------------------------------------------------------
def main
#Make command window
s0 = "Equpiment" #Edit the names of the commands
s1 = "Skills"
s2 = "Status"
s3 = "Items"
s4 = "Map"
s5 = "Save"
s6 = "Exit"
@command_window = Window_Command.new(160, [s0, s1, s2, s3, s4, s5, s6])
@command_window.x = 480
@command_window.y = 0
@command_window.index = @menu_index
# If number of party members is 0
if $game_party.actors.size == 0
# Disable equip, skill, status, item
@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
@command_window.disable_item(5)
end
#Make gold Window
@gold_window = Window_Gold.new
@gold_window.x = 480
@gold_window.y = 256
# Make logo window
@logo_window = Window_Logo.new
@logo_window.x = 480
@logo_window.y = 320
# Make status window
@status_window = Window_MenuStatus.new
@status_window.x = 0
@status_window.y = 0
# 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
@command_window.dispose
@gold_window.dispose
@logo_window.dispose
@status_window.dispose
end
#-----------------------------------------------------------
#----Frame Update-------------------------------------------
#-----------------------------------------------------------
def update
# Update windows
@command_window.update
@gold_window.update
@logo_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 is pushed
if Input.trigger?(Input::B)
$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)
# 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
end
# Branch by command window cursor position
case @command_window.index
when 0 # equipment
# 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
when 1 # skill
# 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
when 2 # 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
when 3 # item
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_Item.new
when 4 # world map
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to item screen
$scene = Scene_World_Map.new
when 5 # 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
when 6 # end game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
end
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)
# Branch by command window cursor position
case @command_window.index
when 0 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(@status_window.index)
when 1 # 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)
when 2 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
#---------------------------------------
#Window_Logo----------------------------
#Created by Baniff----------------------
#---------------------------------------
class Window_Logo < Window_Base
#----------------------------------------------------------------------
# * Object Initialization
#----------------------------------------------------------------------
def initialize
super(0, 0, 160, 160)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
#Shows 125 x 125 picture on the menu
@bitmap = RPG::Cache.picture("Logo")# Name of logo picture
self.contents.blt(0, 0, @bitmap, Rect.new(0, 0, @bitmap.width, @bitmap.height), 255)
end
end
#---------------------------------------------------------------------
# Scene_World_Map-----------------------------------------------------
# Created by Baniff---------------------------------------------------
#---------------------------------------------------------------------
class Scene_World_Map
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#call the window
@window = Window_World_Map.new
# 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
@window.dispose
end
#--------------------------------------------------------------------------
#----Frame Update----------------------------------------------------------
#--------------------------------------------------------------------------
def update
# Update windows
@window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to Menu screen
$scene = Scene_Menu.new(4)
return
end
end
end
#--------------------------------------------------
#----Window_World_Map------------------------------
#----Created by Baniff-----------------------------
#--------------------------------------------------
class Window_World_Map < Window_Base
#----------------------------------------------------------------------
#----Object Initialization
#----------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
#----Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Shows the picture on the window
@bitmap = RPG::Cache.picture("World Map")# Name of picture
self.contents.blt(0, 0, @bitmap, Rect.new(0, 0, @bitmap.width, @bitmap.height), 255)
end
end
#==============================================================================
#----Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
#----Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
#----Refresh---------------------------------------------------------------
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 116
actor = $game_party.actors[i]
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 236, y)#144
draw_actor_level(actor, x + 236, y + 32)#, 32
draw_actor_state(actor, x + 90, y)#90, 32
draw_actor_exp(actor, x + 236, y + 64)#, 64
draw_actor_hp(actor, x, y + 32)#236, 32
draw_actor_sp(actor, x, y + 64)#236, 32
end
end
#--------------------------------------------------------------------------
#----Cursor Rectangle Update-----------------------------------------------
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
Expand to see the code.
Instructions
Make a new script above Main. *IMPORTANT* : You need 2 pictures in your pictures folder. Make one 640x480 and name it World Map . The other is 125x125 and call it Logo .
Compatibility
Probably won't work with a CMS. But you can try.
Credits and Thanks
Thanks to Mr.Mo for his tutorial. And thank you to FF4 for its wolrd map!:thumb:
Terms and Conditions
Use it however you want. I don't need credit, but please don't say you made it.