Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Zare on February 13, 2010, 11:26:16 am

Title: Animated Title Edit (2 Request already solved, 1 left)
Post by: Zare on February 13, 2010, 11:26:16 am
Hello guys^^ I had 3 requests, 2 are already solved (many thx to lilbrudder917 and Jaberwocky) so just this request is left:


I have 2 different versions of mogs animated title.
The first one works properly and gives no errors but the second one rewrites the new game class so it gives me an error. Could someone edit the second one so it works like the first one and doesn't rewrite one of the classes? The first one does not aliase the new_game_command or anything, and this is what I want the second one to work like.


1. One (works properly)
#============================================================================
# ** Moghunter's Animated Title (Celes)
#----------------------------------------------------------------------------
# Moghunter : Kurisu
# 10/5/2007
# Version: 1.01
# SDK Version : (2.2) - Part 3
#---
# Intructions:
# ~ COMMANDFILENAME :The filename   (Commands)
# ~ COMMAND_X       :The X Position (Commands)
# ~ COMMAND_Y       :The Y Position (Commands)
# ~ COMMAND_Z       :The Z Position (Commands)
# ~ TITLEFILENAME   :The Filename   (TitleBack)
# ~ TITLEFRAMES     :Total Frames   (TitleBack)
# ~ TITLESPEED      :Frames Speed   (TitleBack)
#---
# Credits:
# ~ Originally Created by      : Moghunter
# ~ Rewrote by                 : Kurisu
# ~ Many Thanks to             : Trickster
#============================================================================

#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Mog Animated Title', 'Moghunter / Kurisu', 2.2, '10/5/07')
#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.2, [3])
#--------------------------------------------------------------------------
# * Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enabled?('Mog Animated Title')
 
#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
COMMANDFILENAME = 'Com'
COMMAND_X       = 0
COMMAND_Y       = 0
COMMAND_Z       = 100
TITLEFILENAME   = 'Title'
TITLEFRAMES     = 0
TITLESPEED      = 3

class Scene_Title
 #--------------------------------------------------------------------------
 # * Aliases
 #--------------------------------------------------------------------------
 alias_method :mog_animated_title_title_main_sprite, :main_sprite
 alias_method :mog_animated_title_title_main_window, :main_window
 alias_method :mog_animated_title_title_update,      :update
 #--------------------------------------------------------------------------
 # * Main_Sprite
 #--------------------------------------------------------------------------
 def main_sprite
   mog_animated_title_title_main_sprite
   # Animated Background
   @mog_animated_title         = Sprite.new
   @mog_animated_title.bitmap  = RPG::Cache.title('')
   @mog_animated_title_frames  = 0
   @mog_animated_title_speed   = 0
   # Command Sprites
   @mog_sprite_command = Sprite.new
   @mog_sprite_command.bitmap = RPG::Cache.title(COMMANDFILENAME + '_01')
   @mog_sprite_command.x = COMMAND_X
   @mog_sprite_command.y = COMMAND_Y
   @mog_sprite_command.z = COMMAND_Z
 end
 #--------------------------------------------------------------------------
 # * Main_Window
 #--------------------------------------------------------------------------
 def main_window
   mog_animated_title_title_main_window
   @command_window.visible = false
 end
 #--------------------------------------------------------------------------
 # * Update
 #--------------------------------------------------------------------------
 def update
   mog_animated_title_title_update
   case @command_window.index
   when 0
     @mog_sprite_command.bitmap = RPG::Cache.title(COMMANDFILENAME + '_01')      
   when 1
     @mog_sprite_command.bitmap = RPG::Cache.title(COMMANDFILENAME + '_02')      
   when 2
     @mog_sprite_command.bitmap = RPG::Cache.title(COMMANDFILENAME + '_03')
   end
   @mog_animated_title_speed    += 1
   if @mog_animated_title_speed > TITLESPEED
     @mog_animated_title_frames += 1
     @mog_animated_title_speed   = 0
   end
   if @mog_animated_title_frames > TITLEFRAMES
     @mog_animated_title_frames  = 0
   end  
   @mog_animated_title.bitmap  = RPG::Cache.title(TITLEFILENAME + @mog_animated_title_frames.to_s)
 end
end
#--------------------------------------------------------------------------
# * End SDK Enabled Check
#--------------------------------------------------------------------------
end


2. One (doesn't work properly)

#_________________________________________________
# MOG_Animated Title Sofia V1.1            
#_________________________________________________
# By Moghunter  
# http://www.atelier-rgss.com
#_________________________________________________
module MOG
#Auto Fullscreen.  
FULL_SCREEN = true
#Logo Picture Name.
LOGO_PIC = "logo"
#Logo Time.
LOGO_TIME = 220
#Logo ME.
LOGO_ME = "003-victory03"
#Set Game Frame Rate (Default 40FPS).
PER = 40
#Random Music.
RAND_MUSIC = true
#Set Random Music.
MUSIC1 = "062-Slow05"
MUSIC2 = "058-Slow01"
MUSIC3 = "030-Town08"
#Active Title BGS.  
BGS_ON = false
#Set Title BGS.  
BGS = "004-Wind04"
#Set BGS volume.  
BGS_VOL = 10
#Transition Type.
TRANS_TITLE = "020-flat01"
#Transition Time.
TRANS_TIME = 60
#Texto para acessar o menu de opções(Press any Key)
T_B = "Press any key"
#Tamanho da fonte(Press any Key).
T_B_FONT = 28
#Posição do texto na horizontal.(Press any Key)
T_B_X = 250
#Posição do texto na vertical.(Press any Key)
T_B_Y = 300
#Som ao apertar a tecla.(Press any Key)
T_B_SE = "105-Heal01"
#Ativar Zoom reverso na imagem de fundo.
BACK_ZOOM = true
#Nome da picture de opções de comando.
#É necessário ter 3 picures nomeadas com
#o nome abaixo mais o prefixo _01 , _02 e _03.
COM = "Com"
#-----------------
# Imagem de Fundo
#-----------------
PIC_FD = "Back"#Nome da imagem.
PIC_FD_OX = 1  #Velocidade de movimento na horizontal.
PIC_FD_OY = 0  #Velocidade de movimento na vertical.
PIC_FD_PRIOR = 1 #Prioridade da imagem.
PIC_FD_OPA = 255 #Transparência da imagem.
PIC_FD_BLEND = 0 #Tipo de Blend.
#-----------------
# Letras do Titulo
#-----------------
PIC_TEXTO = "Texto"#Nome da imagem.
PIC_TEXTO_OX = 0  #Velocidade de movimento na horizontal.
PIC_TEXTO_OY = 0  #Velocidade de movimento na vertical.
PIC_TEXTO_OPA = 0 #Transparência Inicial da imagem.
PIC_TEXTO_PRIOR = 9 #Prioridade da imagem.
PIC_TEXTO_BLEND = 0 #Tipo de Blend.
#-----------------
# Imagem Camada 1
#-----------------
PIC_FOG1 = "Fog01" #Nome da imagem.
PIC_FOG_RAND = true #Ativar Sistema de Vento.
PIC_FOG_MOV = 100  #Time para mudar de direção.
PIC_FOG_OX_01 = 2  #Velocidade de movimento na horizontal.
PIC_FOG_OY_01 = 2  #Velocidade de movimento na vertical.
PIC_FOG_OX_02 = 3  #Velocidade de movimento na horizontal.
PIC_FOG_OY_02 = -3 #Velocidade de movimento na vertical.
PIC_FOG1_PRIOR = 3 #Prioridade da imagem.
PIC_FOG1_BLEND = 1 #Tipo de Blend.
PIC_FOG1_ZOOMX = 2 #Zoom da imagem na horizontal.
PIC_FOG1_ZOOMY = 2 #Zoom da imagem na vertical.
PIC_FOG1_OPA = 255 #Transparência da imagem.
#-----------------
# Imagem Camada 2
#-----------------
PIC_FOG2 = "Fog02" #Nome da imagem.
PIC_FOG2_RAND = true #Ativar Sistema de Vento.
PIC_FOG2_MOV = 100 #Time para mudar de direção.  
PIC_FOG2_PRIOR = 2 #Prioridade da imagem.
PIC_FOG2_BLEND = 1 #Tipo de Blend.
PIC_FOG2_ZOOMX = 1 #Zoom da imagem na horizontal.
PIC_FOG2_ZOOMY = 1 #Zoom da imagem na vertical.
PIC_FOG2_OX_01 = 3 #Velocidade de movimento na horizontal.
PIC_FOG2_OY_01 = 3 #Velocidade de movimento na vertical.
PIC_FOG2_OX_02 = -3 #Velocidade de movimento na horizontal.
PIC_FOG2_OY_02 = 3 #Velocidade de movimento na vertical.
PIC_FOG2_OPA = 50  #Transparência da imagem.
#-----------------
# Imagem Camada 3
#-----------------
PIC_FOG3 = "Tree"  #Nome da imagem.
PIC_FOG3_RAND = false #Ativar Sistema de Vento.
PIC_FOG3_MOV = 100 #Time para mudar de direção.  
PIC_FOG3_PRIOR = 7 #Prioridade da imagem.
PIC_FOG3_BLEND = 0 #Tipo de Blend.
PIC_FOG3_ZOOMX = 1 #Zoom da imagem na horizontal.
PIC_FOG3_ZOOMY = 1 #Zoom da imagem na vertical.
PIC_FOG3_OX_01 = 3 #Velocidade de movimento na horizontal.
PIC_FOG3_OY_01 = 0 #Velocidade de movimento na vertical.
PIC_FOG3_OX_02 = -3 #Velocidade de movimento na horizontal.
PIC_FOG3_OY_02 = 3 #Velocidade de movimento na vertical.
PIC_FOG3_OPA = 255 #Transparência da imagem.
#-----------------
# Imagem LEAF - 01
#-----------------
PIC_LEAF1 = "Leaf01" #Nome da imagem.
PIC_LEAF1_RAND = true #Ativar Sistema de Vento.
PIC_LEAF1_MOV = 200  #Time para mudar de direção.
PIC_LEAF1_PRIOR = 10 #Prioridade da imagem.
PIC_LEAF1_BLEND = 0 #Tipo de Blend.
PIC_LEAF1_ZOOMX = 1 #Zoom da imagem na horizontal.
PIC_LEAF1_ZOOMY = 1 #Zoom da imagem na vertical.
PIC_LEAF1_OX1 = 1 #Velocidade de movimento na horizontal.
PIC_LEAF1_OY1 = 1 #Velocidade de movimento na vertical.
PIC_LEAF1_OX2 = 1 #Velocidade de movimento na horizontal.
PIC_LEAF1_OY2 = 1 #Velocidade de movimento na vertical.
PIC_LEAF1_OPA = 255 #Transparência da imagem.
#-----------------
# Imagem LEAF - 02
#-----------------
PIC_LEAF2 = "Leaf02" #Nome da imagem.
PIC_LEAF2_RAND = true #Ativar Sistema de Vento.
PIC_LEAF2_MOV = 150 #Time para mudar de direção.
PIC_LEAF2_PRIOR = 8 #Prioridade da imagem.
PIC_LEAF2_BLEND = 0 #Tipo de Blend.
PIC_LEAF2_ZOOMX = 1 #Zoom da imagem na horizontal.
PIC_LEAF2_ZOOMY = 1 #Zoom da imagem na vertical.
PIC_LEAF2_OX1 = 2 #Velocidade de movimento na horizontal.
PIC_LEAF2_OY1 = 2 #Velocidade de movimento na vertical.
PIC_LEAF2_OX2 = 2 #Velocidade de movimento na horizontal.
PIC_LEAF2_OY2 = 2 #Velocidade de movimento na vertical.
PIC_LEAF2_OPA = 255 #Transparência da imagem.
#-------------------------------------------------------------------------------
#Movimento de Dispose.
#-------------------------------------------------------------------------------
#Alterar movimento ao escolher uma opção de comando.
DIS_MOV = true
#Tempo do movimento
DIS_TIME = 80
#Redução da Transparência imagem.
DIS_PIC1_OPA = 0
DIS_PIC2_OPA = 5
DIS_PIC3_OPA = 0
DIS_PIC4_OPA = 0
DIS_PIC5_OPA = 0
DIS_PIC6_OPA = 0
DIS_PIC_LEAF1_OPA = 5
DIS_PIC_LEAF2_OPA = 5
#Movimento da imagem
DIS_PIC1_OX = -6
DIS_PIC1_OY = 0
DIS_PIC2_OX = 0
DIS_PIC2_OY = 0
DIS_PIC3_OX = 0
DIS_PIC3_OY = 0
DIS_PIC4_OX = 0
DIS_PIC4_OY = 0
DIS_PIC5_OX = 4
DIS_PIC5_OY = 0
DIS_PIC6_OX = 0
DIS_PIC6_OY = 0
DIS_PIC_LEAF1_OX = 0
DIS_PIC_LEAF1_OY = 0
DIS_PIC_LEAF2_OX = 0
DIS_PIC_LEAF2_OY = 0
#Zoom da imagem
DIS_PIC1_ZOOMX = 0.02
DIS_PIC1_ZOOMY = 0.02
DIS_PIC2_ZOOMX = 0
DIS_PIC2_ZOOMY = 0
DIS_PIC3_ZOOMX = 0
DIS_PIC3_ZOOMY = 0
DIS_PIC4_ZOOMX = 0
DIS_PIC4_ZOOMY = 0
DIS_PIC5_ZOOMX = 0.004
DIS_PIC5_ZOOMY = 0.004
DIS_PIC6_ZOOMX = 0
DIS_PIC6_ZOOMY = 0
DIS_PIC_LEAF1_ZOOMX = 0
DIS_PIC_LEAF1_ZOOMY = 0
DIS_PIC_LEAF2_ZOOMX = 0
DIS_PIC_LEAF2_ZOOMY = 0
end
$mogscript = {} if $mogscript == nil
$mogscript["title_sofia"] = true
#-------------------------------------------------------------------------------
# Scene_Title
#-------------------------------------------------------------------------------
$full_screen = 0
class Scene_Title  
 def main
   if $BTEST
     battle_test
     return
   end
   $full_screen += 1
   if MOG::FULL_SCREEN == true and $full_screen == 1
   $showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ' '
   $showm.call(18,0,0,0)
   $showm.call(13,0,0,0)
   $showm.call(13,0,2,0)
   $showm.call(18,0,2,0)
   end        
   $data_actors        = load_data("Data/Actors.rxdata")
   $data_classes       = load_data("Data/Classes.rxdata")
   $data_skills        = load_data("Data/Skills.rxdata")
   $data_items         = load_data("Data/Items.rxdata")
   $data_weapons       = load_data("Data/Weapons.rxdata")
   $data_armors        = load_data("Data/Armors.rxdata")
   $data_enemies       = load_data("Data/Enemies.rxdata")
   $data_troops        = load_data("Data/Troops.rxdata")
   $data_states        = load_data("Data/States.rxdata")
   $data_animations    = load_data("Data/Animations.rxdata")
   $data_tilesets      = load_data("Data/Tilesets.rxdata")
   $data_common_events = load_data("Data/CommonEvents.rxdata")
   $data_system        = load_data("Data/System.rxdata")
   $game_system = Game_System.new
   s1 = ""
   s2 = ""
   s3 = ""
   @command_window = Window_Command.new(160, [s1, s2, s3])
   @command_window.opacity = 0
   @command_window.x = 0 - @command_window.width / 2
   @command_window.y = 0
   @command_window.visible = false
   @command_window.active = false    
   @mb01 = Plane.new
   @mb01.bitmap = RPG::Cache.title(MOG::PIC_FD)
   @mb01.opacity = MOG::PIC_FD_OPA
   @mb01.z = MOG::PIC_FD_PRIOR
   @mb01.blend_type = MOG::PIC_FD_BLEND
   @mb02 = Plane.new
   @mb02.bitmap = RPG::Cache.title(MOG::PIC_TEXTO)
   @mb02.z = MOG::PIC_TEXTO_PRIOR
   @mb02.opacity = MOG::PIC_TEXTO_OPA
   @mb02.blend_type = MOG::PIC_TEXTO_BLEND    
   @mb03 = Plane.new
   @mb03.bitmap = RPG::Cache.title(MOG::PIC_FOG1)
   @mb03.z = MOG::PIC_FOG1_PRIOR
   @mb03.zoom_x = MOG::PIC_FOG1_ZOOMX
   @mb03.zoom_y = MOG::PIC_FOG1_ZOOMY
   @mb03.blend_type = MOG::PIC_FOG1_BLEND
   @mb03.opacity = MOG::PIC_FOG1_OPA
   @mb04 = Plane.new
   @mb04.bitmap = RPG::Cache.title(MOG::PIC_FOG2)
   @mb04.z = MOG::PIC_FOG2_PRIOR
   @mb04.zoom_x = MOG::PIC_FOG2_ZOOMX
   @mb04.zoom_y = MOG::PIC_FOG2_ZOOMY
   @mb04.blend_type = MOG::PIC_FOG2_BLEND
   @mb04.opacity = MOG::PIC_FOG2_OPA
   @mb05 = Plane.new
   @mb05.bitmap = RPG::Cache.title(MOG::PIC_FOG3)
   @mb05.z = MOG::PIC_FOG3_PRIOR
   @mb05.zoom_x = MOG::PIC_FOG3_ZOOMX
   @mb05.zoom_y = MOG::PIC_FOG3_ZOOMY
   @mb05.blend_type = MOG::PIC_FOG3_BLEND
   @mb05.opacity = MOG::PIC_FOG3_OPA
   @mb07 = Plane.new
   @mb07.bitmap = RPG::Cache.title(MOG::PIC_LEAF1)
   @mb07.z = MOG::PIC_LEAF1_PRIOR
   @mb07.zoom_x = MOG::PIC_LEAF1_ZOOMX
   @mb07.zoom_y = MOG::PIC_LEAF1_ZOOMY    
   @mb07.blend_type = MOG::PIC_LEAF1_BLEND  
   @mb07.opacity = MOG::PIC_LEAF1_OPA
   @mb08 = Plane.new
   @mb08.bitmap = RPG::Cache.title(MOG::PIC_LEAF2)
   @mb08.z = MOG::PIC_LEAF2_PRIOR
   @mb08.zoom_x = MOG::PIC_LEAF2_ZOOMX
   @mb08.zoom_y = MOG::PIC_LEAF2_ZOOMY    
   @mb08.blend_type = MOG::PIC_LEAF2_BLEND      
   @mb08.opacity = MOG::PIC_LEAF2_OPA    
   @bot = Sprite.new
   @bot.bitmap = Bitmap.new(160,100)
   @bot.x = MOG::T_B_X
   @bot.y = MOG::T_B_Y
   @bot.z = 9999
   @bot.opacity = 0
   @bot.bitmap.font.size = MOG::T_B_FONT
   @bot.bitmap.font.bold = true
   @bot.bitmap.draw_text(0, 20, 160, 64, MOG::T_B)
   @bot2 = Sprite.new
   @bot2.bitmap = Bitmap.new(160,100)
   @bot2.x = MOG::T_B_X
   @bot2.y = MOG::T_B_Y
   @bot2.z = 9998
   @bot2.opacity = 0
   @bot2.bitmap.font.size = MOG::T_B_FONT
   @bot2.bitmap.font.bold = true
   @bot2.color.set(0,0,0)
   @bot2.bitmap.draw_text(2, 22, 160, 64, MOG::T_B)
   @com = Sprite.new
   @com.bitmap = RPG::Cache.title(MOG::COM + "_01")
   @com.z = 10000
   @com.opacity = 0
   @com.y = 300
   @logo = Plane.new
   @logo.bitmap = RPG::Cache.title(MOG::LOGO_PIC)
   @logo.z = 999999
   @logo.opacity = 0    
   @time = 0
   @time_zoom = 0
   @time_music = 0
   @time_logo = MOG::LOGO_TIME
   @logo_r = 0
   @rs = 0
   @mb01.visible = false      
   @mb02.visible = false  
   @mb03.visible = false  
   @mb04.visible = false  
   @mb05.visible = false  
   @mb07.visible = false  
   @mb08.visible = false  
   @com.visible = false  
   @logo.visible = true
   @continue_enabled = false
   for i in 0..3
     if FileTest.exist?("Save#{i+1}.rxdata")
       @continue_enabled = true
     end
   end
   if @continue_enabled
     @command_window.index = 1
   else
     @command_window.disable_item(1)
   end
   Audio.bgm_stop
   Audio.me_stop
   Audio.bgs_stop
   if MOG::BGS_ON == true
   Audio.bgs_play("Audio/BGS/" + MOG::BGS, MOG::BGS_VOL, 100)
   end
   Graphics.transition(MOG::TRANS_TIME, "Graphics/Transitions/" + MOG::TRANS_TITLE )
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   if MOG::DIS_MOV == true
   for i in 1..MOG::DIS_TIME
   @mb01.opacity -= MOG::DIS_PIC1_OPA      
   @mb02.opacity -= MOG::DIS_PIC2_OPA
   @mb03.opacity -= MOG::DIS_PIC3_OPA
   @mb04.opacity -= MOG::DIS_PIC4_OPA
   @mb05.opacity -= MOG::DIS_PIC5_OPA
   @mb07.opacity -= MOG::DIS_PIC_LEAF1_OPA
   @mb08.opacity -= MOG::DIS_PIC_LEAF2_OPA
   @com.opacity -= MOG::DIS_PIC2_OPA
   @mb01.ox += MOG::DIS_PIC1_OX
   @mb01.oy += MOG::DIS_PIC1_OY
   @mb02.ox += MOG::DIS_PIC2_OX
   @mb02.oy += MOG::DIS_PIC2_OY
   @mb03.ox += MOG::DIS_PIC3_OX
   @mb03.oy += MOG::DIS_PIC3_OY
   @mb04.ox += MOG::DIS_PIC4_OX
   @mb04.oy += MOG::DIS_PIC4_OY
   @mb05.ox += MOG::DIS_PIC5_OX
   @mb05.oy += MOG::DIS_PIC5_OY
   @mb07.ox += MOG::DIS_PIC_LEAF1_OX
   @mb07.oy += MOG::DIS_PIC_LEAF1_OY
   @mb08.ox += MOG::DIS_PIC_LEAF2_OX
   @mb08.oy += MOG::DIS_PIC_LEAF2_OY
   @mb01.zoom_x += MOG::DIS_PIC1_ZOOMX
   @mb01.zoom_y += MOG::DIS_PIC1_ZOOMY
   @mb02.zoom_x += MOG::DIS_PIC2_ZOOMX
   @mb02.zoom_y += MOG::DIS_PIC2_ZOOMY
   @mb03.zoom_x += MOG::DIS_PIC3_ZOOMX
   @mb03.zoom_y += MOG::DIS_PIC3_ZOOMY
   @mb04.zoom_x += MOG::DIS_PIC4_ZOOMX
   @mb04.zoom_y += MOG::DIS_PIC4_ZOOMY
   @mb05.zoom_x += MOG::DIS_PIC5_ZOOMX
   @mb05.zoom_y += MOG::DIS_PIC5_ZOOMY
   @mb07.zoom_x += MOG::DIS_PIC_LEAF1_ZOOMX
   @mb07.zoom_y += MOG::DIS_PIC_LEAF1_ZOOMY
   @mb08.zoom_x += MOG::DIS_PIC_LEAF2_ZOOMX
   @mb08.zoom_y += MOG::DIS_PIC_LEAF2_ZOOMY
   @bot.opacity -= 10
   @bot2.opacity -= 10
   Graphics.update
   end
   end
   Graphics.freeze
   @command_window.dispose
   @mb01.dispose
   @mb02.dispose
   @mb03.dispose
   @mb04.dispose
   @mb05.dispose
   @mb07.dispose
   @mb08.dispose
   @bot.dispose
   @bot2.dispose
   @com.dispose
   @logo.dispose
 end
 def update
   @time_logo -= 1
   if @time_logo <= 0
      @time_logo = 0
   end  
   if @logo.opacity < 30 and @logo_r == 1
      @logo.visible = false
      @logo.opacity = 0
      @logo.bitmap = RPG::Cache.title("")
   end
   if @bot.opacity < 30 and @command_window.active == true
      @bot.visible = false
      @bot2.visible = false
      @bot.bitmap.draw_text(0, 0, 32, 32,"")
      @bot2.bitmap.draw_text(0, 0, 32, 32,"")
   end  
   if @logo_r == 0 and @logo.opacity <= 250
   @logo.opacity += 2  
   elsif @time_logo <= 0  
   @logo_r = 1
   @logo.opacity -= 2
   @mb01.visible = true    
   @mb02.visible = true  
   @mb03.visible = true  
   @mb04.visible = true  
   @mb05.visible = true  
   @mb07.visible = true  
   @mb08.visible = true
   @com.visible = true
   @bot.opacity += 2
   @bot2.opacity +=  2
   Audio.me_fade(500)
   if @bot.opacity >= 255
      @bot.opacity = 255
      @bot2.opacity = 255        
   end  
   end  
   if MOG::RAND_MUSIC == true and @logo_r == 1 and @rs == 1
   @rs += 1
   case rand(3)
   when 0
   Audio.bgm_play("Audio/BGM/" + MOG::MUSIC1, 100, 100)
   when 1
   Audio.bgm_play("Audio/BGM/" + MOG::MUSIC2, 100, 100)
   when 2  
   Audio.bgm_play("Audio/BGM/" + MOG::MUSIC3, 100, 100)
   end
   else    
   if @logo_r == 1 and @rs == 1
   $game_system.bgm_play($data_system.title_bgm)
   @rs += 1
   end  
   end      
   if @command_window.active == true
   @bot.opacity -= 5
   @bot2.opacity -=  5
   @bot.x -= 5
   @bot2.x += 5
   @com.opacity += 2
   if @com.y > 0
      @com.y -= 5      
   elsif @com.y < 0
      @com.y = 0
      @com.opacity = 255
   end
   end
   r = rand(100) + 150
   g = rand(100) + 150
   b = rand(100) + 150
   @command_window.update
   @time += 2
   @time_zoom += 1
   if @time_zoom > 1000
      @time_zoom = 0
   end
   if @time_zoom > 500 and MOG::BACK_ZOOM == true
   @mb01.zoom_x += 0.004
   @mb01.zoom_y += 0.004
   if @mb01.zoom_x >= 2
      @mb01.zoom_x = 2
      @mb01.zoom_y = 2  
   end
   elsif MOG::BACK_ZOOM == true
   @mb01.zoom_x -= 0.004
   @mb01.zoom_y -= 0.004
   if @mb01.zoom_x <= 1
      @mb01.zoom_x = 1
      @mb01.zoom_y = 1  
   end
   end  
   @mb01.ox -= MOG::PIC_FD_OX
   @mb01.oy -= MOG::PIC_FD_OY
   @mb02.ox -= MOG::PIC_TEXTO_OX
   @mb02.oy -= MOG::PIC_TEXTO_OY
   @mb02.opacity += 2
   Graphics.frame_rate = MOG::PER
   if  @time < MOG::PIC_LEAF1_MOV and  MOG::PIC_LEAF1_RAND == true
   @mb07.ox += MOG::PIC_LEAF1_OX2
   @mb07.oy -= MOG::PIC_LEAF1_OY2
   else
   @mb07.ox -= MOG::PIC_LEAF1_OX1
   @mb07.oy -= MOG::PIC_LEAF1_OY1
   end  
   if  @time < MOG::PIC_LEAF2_MOV and  MOG::PIC_LEAF2_RAND == true
   @mb08.ox -= MOG::PIC_LEAF2_OX2
   @mb08.oy -= MOG::PIC_LEAF2_OY2
   else
   @mb08.ox += MOG::PIC_LEAF2_OX1
   @mb08.oy -= MOG::PIC_LEAF2_OY1
   end  
   if @time < MOG::PIC_FOG_MOV and  MOG::PIC_FOG_RAND == true
   @mb03.ox -= MOG::PIC_FOG_OX_02
   @mb03.oy -= MOG::PIC_FOG_OY_02  
   else
   @mb03.ox += MOG::PIC_FOG_OX_01
   @mb03.oy -= MOG::PIC_FOG_OY_01    
   end    
   if @time < MOG::PIC_FOG2_MOV and  MOG::PIC_FOG2_RAND == true
   @mb04.ox -= MOG::PIC_FOG2_OX_02
   @mb04.oy -= MOG::PIC_FOG2_OY_02
   else
   @mb04.ox -= MOG::PIC_FOG2_OX_01
   @mb04.oy -= MOG::PIC_FOG2_OY_01
   end
   if @time < MOG::PIC_FOG3_MOV and  MOG::PIC_FOG3_RAND == true
   @mb05.ox -= MOG::PIC_FOG3_OX_02
   @mb05.oy -= MOG::PIC_FOG3_OY_02
   else
   @mb05.ox -= MOG::PIC_FOG3_OX_01
   @mb05.oy -= MOG::PIC_FOG3_OY_01
   end
   @bot.color.set(r,g,b)    
   if @time > 400
      @time = 0
   end        
   if @rs == 0
   Audio.me_play("Audio/ME/" + MOG::LOGO_ME, 100, 100)
   @rs += 1
   end
   if @logo.opacity <= 100 and @logo_r == 1
   if Input.trigger?(Input::C) and @command_window.active == true
     case @command_window.index
     when 0  
       command_new_game
     when 1
       command_continue
     when 2  
       command_shutdown
     end
   elsif Input.trigger?(Input::C) and @command_window.active == false or
     Input.trigger?(Input::B) and @command_window.active  == false
     Audio.se_play("Audio/SE/" + MOG::T_B_SE)
     @command_window.active = true
   end
   end
   case @command_window.index
    when 0      
    @com.bitmap = RPG::Cache.title(MOG::COM + "_01")    
    when 1      
    @com.bitmap = RPG::Cache.title(MOG::COM + "_02")
    when 2      
    @com.bitmap = RPG::Cache.title(MOG::COM + "_03")    
    end
 end
 def command_new_game
   Audio.bgs_fade(800)
   $game_system.se_play($data_system.decision_se)
   Audio.bgm_stop
   Graphics.frame_count = 0
   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new
   $game_party.setup_starting_members
   $game_map.setup($data_system.start_map_id)
   $game_player.moveto($data_system.start_x, $data_system.start_y)
   $game_player.refresh
   $game_map.autoplay
   $game_map.update
   $scene = Scene_Map.new
 end
 def command_continue
   unless @continue_enabled
     $game_system.se_play($data_system.buzzer_se)
     return
   end
   Audio.bgs_fade(800)
   $game_system.se_play($data_system.decision_se)
   $scene = Scene_Load.new
 end
 def command_shutdown
   $game_system.se_play($data_system.decision_se)
   Audio.bgm_fade(800)
   Audio.bgs_fade(800)
   Audio.me_fade(800)
   $scene = nil
 end
 def battle_test
   $data_actors        = load_data("Data/BT_Actors.rxdata")
   $data_classes       = load_data("Data/BT_Classes.rxdata")
   $data_skills        = load_data("Data/BT_Skills.rxdata")
   $data_items         = load_data("Data/BT_Items.rxdata")
   $data_weapons       = load_data("Data/BT_Weapons.rxdata")
   $data_armors        = load_data("Data/BT_Armors.rxdata")
   $data_enemies       = load_data("Data/BT_Enemies.rxdata")
   $data_troops        = load_data("Data/BT_Troops.rxdata")
   $data_states        = load_data("Data/BT_States.rxdata")
   $data_animations    = load_data("Data/BT_Animations.rxdata")
   $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
   $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
   $data_system        = load_data("Data/BT_System.rxdata")
   Graphics.frame_count = 0
   $game_temp          = Game_Temp.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_screen        = Game_Screen.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new
   $game_party.setup_battle_test_members
   $game_temp.battle_troop_id = $data_system.test_troop_id
   $game_temp.battle_can_escape = true
   $game_map.battleback_name = $data_system.battleback_name
   $game_system.se_play($data_system.battle_start_se)
   $game_system.bgm_play($game_system.battle_bgm)
   $scene = Scene_Battle.new
 end
end


-----------------------------------------------------------------------------------------

Any questions left? Don't mind asking me.^^
Title: Re: 3 Requests :3
Post by: lilbrudder917 on February 13, 2010, 01:56:57 pm
I don't see anything wrong with the first two, so I'll do the 3rd request.

#==============================================================================
# Sphere Grid System
#==============================================================================
# SephirothSpawn
# Version 1
# 1.20.06
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Sphere Grid System', 'SephirothSpawn', 1, '1.21.06')

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------

if SDK.state('Sphere Grid System') == true

#==============================================================================
# ** Sphere Grid Sytem
#==============================================================================

module Sphere_Grid_System
 #--------------------------------------------------------------------------
 # * Constants
 #     sphere_type :[character_name, character_hue, direction, pattern]
 #--------------------------------------------------------------------------
 # When Spheres Locks
   HP_SPHERE_GRAPHIC_ON = ['178-Switch01', 150, 4, 0]
   SP_SPHERE_GRAPHIC_ON = ['178-Switch01', 210, 4, 0]
   STR_SPHERE_GRAPHIC_ON = ['178-Switch01', 30, 4, 0]
   DEX_SPHERE_GRAPHIC_ON = ['178-Switch01', 0, 4, 1]
   AGI_SPHERE_GRAPHIC_ON = ['178-Switch01', 0, 4, 0]
   INT_SPHERE_GRAPHIC_ON = ['178-Switch01', 0, 4, 2]
   ABILITIY_SPHERE_GRAPHIC_ON = ['178-Switch01', 0, 4, 3]
   LOCKA_GRAPHIC_ON = ['183-Rock02', 0, 4, 0]
   LOCKB_GRAPHIC_ON = ['183-Rock02', 0, 4, 0]
   LOCKC_GRAPHIC_ON = ['183-Rock02', 0, 4, 0]
   LOCKD_GRAPHIC_ON = ['183-Rock02', 0, 4, 0]
 # When Spheres Unlocked
   HP_SPHERE_GRAPHIC_OFF = ['178-Switch01', 150, 8, 0]
   SP_SPHERE_GRAPHIC_OFF = ['178-Switch01', 210, 8, 0]
   STR_SPHERE_GRAPHIC_OFF = ['178-Switch01', 30, 8, 0]
   DEX_SPHERE_GRAPHIC_OFF = ['178-Switch01', 0, 8, 1]
   AGI_SPHERE_GRAPHIC_OFF = ['178-Switch01', 0, 8, 0]
   INT_SPHERE_GRAPHIC_OFF = ['178-Switch01', 0, 8, 2]
   ABILITIY_SPHERE_GRAPHIC_OFF = ['178-Switch01', 0, 8, 3]
   LOCKA_GRAPHIC_OFF = ['', 0, 8, 0]
   LOCKB_GRAPHIC_OFF = ['', 0, 8, 0]
   LOCKC_GRAPHIC_OFF = ['', 0, 8, 0]
   LOCKD_GRAPHIC_OFF = ['', 0, 8, 0]
end

#==============================================================================
# ** Game_Temp
#==============================================================================

class Game_Temp
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :spheregrid_return_map_id
 attr_accessor :spheregrid_return_map_coordinates
 attr_accessor :spheregrid_return_actor_graphic
 attr_accessor :spheregrid_map_id
end

#==============================================================================
# ** Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :sphere_grid_event_list
 attr_accessor :sphere_grid_skills
 attr_accessor :sphere_grid_position
 attr_accessor :character_name
 attr_accessor :character_hue
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias seph_spheregridsystem_gameactor_init initialize
 alias seph_spheregridsystem_gameactor_skills skills
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(actor_id)
   # Orginal Initialization Method
   seph_spheregridsystem_gameactor_init(actor_id)
   # Sets Skill Grid Events List
   @sphere_grid_event_list = {}
   # Sets Skill Grid Skills
   @sphere_grid_skills = []
   # Sets Skill Grid Position
   @sphere_grid_position = [2, 1]
 end
 #--------------------------------------------------------------------------
 # * Gets Skills
 #--------------------------------------------------------------------------
 def skills
   # Adds Skill Grid Skills
   for id in @sphere_grid_skills
     learn_skill(id)
   end
   # Orginal Skills Method
   seph_spheregridsystem_gameactor_skills
 end
end


#==============================================================================
# ** Game_Party
#==============================================================================

class Game_Party
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :sphere_grid_hp_spheres
 attr_accessor :sphere_grid_sp_spheres
 attr_accessor :sphere_grid_str_spheres
 attr_accessor :sphere_grid_dex_spheres
 attr_accessor :sphere_grid_agi_spheres
 attr_accessor :sphere_grid_int_spheres
 attr_accessor :sphere_grid_ability_spheres
 attr_accessor :sphere_grid_level_a_locks
 attr_accessor :sphere_grid_level_b_locks
 attr_accessor :sphere_grid_level_c_locks
 attr_accessor :sphere_grid_level_d_locks
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias seph_spheregridsystem_gameparty_init initialize
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   # Orginal Initialization Method
   seph_spheregridsystem_gameparty_init
   # Sets Skill Grid Spheres
   @sphere_grid_hp_spheres = 0
   @sphere_grid_sp_spheres = 0
   @sphere_grid_str_spheres = 0
   @sphere_grid_dex_spheres = 0
   @sphere_grid_agi_spheres = 0
   @sphere_grid_int_spheres = 0
   @sphere_grid_ability_spheres = 0
   @sphere_grid_level_a_locks = 0
   @sphere_grid_level_b_locks = 0
   @sphere_grid_level_c_locks = 0
   @sphere_grid_level_d_locks = 0
 end
end

#==============================================================================
# ** Game_Map
#==============================================================================

class Game_Map
 #--------------------------------------------------------------------------
 # * Get RPG::Map
 #--------------------------------------------------------------------------
 def map
   return @map
 end
end

#==============================================================================
# ** Game_Event
#==============================================================================

class Game_Event < Game_Character
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :character_name
 attr_accessor :character_hue
 attr_accessor :direction
 attr_accessor :pattern
 attr_accessor :through
end

#==============================================================================
# ** Game_Player
#==============================================================================

class Game_Player
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor   :character_name
 attr_accessor   :character_hue
end

#==============================================================================
# ** Scene_Title
#==============================================================================

class Scene_Title
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias seph_spheregridsystem_scenetitle_commandnewgame command_new_game
 #--------------------------------------------------------------------------
 # * Command: New Game
 #--------------------------------------------------------------------------
 def command_new_game
   # Orignal Command: New Game
   seph_spheregridsystem_scenetitle_commandnewgame
   # Collects Map Data
   mapinfo = load_data("Data/MapInfos.rxdata")
   mapinfo.each {|map_id, map|
     # Finds Sphere Grid Map
     if map.name == 'Sphere Grid'
       # Collects Sphere Grid Map Data
       @skill_map = load_data(sprintf("Data/Map%03d.rxdata", map_id))

       # Sets Sphere Grid Map Id
       $game_temp.spheregrid_map_id = map_id
     end }
   # Sphere Grid Events (For each actor access)
   grid_events = {}
   # Collects Events
   for event in @skill_map.events.values
     if event.name == 'Skill Grid Event'
       grid_events[event.id] = false
     end
   end
   # Sets All Actors Grid Event List
   for i in 1...$data_actors.size
     $game_actors[i].sphere_grid_event_list = grid_events.dup
   end
 end
 alias seph_spheregridsystem_scenetitle_commandcontinue command_continue
 def command_continue
   seph_spheregridsystem_scenetitle_commandcontinue
   # Orignal Command: New Game
   # Collects Map Data
   mapinfo = load_data("Data/MapInfos.rxdata")
   mapinfo.each {|map_id, map|
     # Finds Sphere Grid Map
     if map.name == 'Sphere Grid'
       # Collects Sphere Grid Map Data
       @skill_map = load_data(sprintf("Data/Map%03d.rxdata", map_id))

       # Sets Sphere Grid Map Id
       $game_temp.spheregrid_map_id = map_id
     end }
   # Sphere Grid Events (For each actor access)
   grid_events = {}
   # Collects Events
   for event in @skill_map.events.values
     if event.name == 'Skill Grid Event'
       grid_events[event.id] = false
     end
   end
 end
end

#==============================================================================
# ** Window_SkillGridSpheres
#==============================================================================

class Window_SkillGridSpheres < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(400, 236, 236, 240)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.back_opacity = 125
   refresh
   @stat_flag = false
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   # Draws Sphere Heading
   self.contents.font.size, self.contents.font.color = 22, system_color
   self.contents.draw_text(4, 0, contents.width - 8, 32, 'Collected Spheres', 1)
   # Draws Sphere Totals
   self.contents.font.size, self.contents.font.color = 16, normal_color
   sphere_names = ['Hp', 'Sp', 'Strength', 'Dexterity', 'Agility',
     'Intellect', 'Ability'].collect! {|x| x + ' Spheres'}
   sphere_names << ['a', 'b', 'c', 'd'].collect! {|x| "Grid Locks Level #{x.upcase}"}
   sphere_totals = ['hp', 'sp', 'str', 'dex', 'agi', 'int', 'ability'].collect! {|x|
     eval "$game_party.sphere_grid_#{x}_spheres"}
   sphere_totals << ['a', 'b', 'c', 'd'].collect! {|x| eval "$game_party.sphere_grid_level_#{x}_locks"}
   sphere_totals.flatten!
   for i in 0...sphere_names.flatten!.size
     self.contents.draw_text(8, 32 + i * 16, contents.width - 16, 16, sphere_names[i])
     self.contents.draw_text(8, 32 + i * 16, contents.width - 16, 16, sphere_totals[i].to_s, 2)
   end
 end
 #--------------------------------------------------------------------------
 # * Set Required Sphere
 #--------------------------------------------------------------------------
 def set_required_sphere(sphere)
   # Sets Stat Flag
   @stat_flag = true
   # Collects Change Parameters
   case sphere
   when 'Hp'
     y, sphere, total = 32, 'Hp Sphere', $game_party.sphere_grid_hp_spheres
   when 'Sp'
     y, sphere, total = 48, 'Sp Sphere', $game_party.sphere_grid_sp_spheres
   when 'Str'
     y, sphere, total = 64, 'Strength Sphere', $game_party.sphere_grid_str_spheres
   when 'Dex'
     y, sphere, total = 80, 'Dexterity Sphere', $game_party.sphere_grid_dex_spheres
   when 'Agi'
     y, sphere, total = 96, 'Agility Sphere', $game_party.sphere_grid_agi_spheres
   when 'Int'
     y, sphere, total = 112, 'Intellect Sphere', $game_party.sphere_grid_int_spheres
   when 'Ability'
     y, sphere, total = 128, 'Ability Sphere', $game_party.sphere_grid_ability_spheres
   when 'LockA'
     y, sphere, total = 144, 'Grid Locks Level A', $game_party.sphere_grid_level_a_locks
   when 'LockB'
     y, sphere, total = 160, 'Grid Locks Level B', $game_party.sphere_grid_level_b_locks
   when 'LockC'
     y, sphere, total = 176, 'Grid Locks Level C', $game_party.sphere_grid_level_c_locks
   when 'LockD'
     y, sphere, total = 192, 'Grid Locks Level D', $game_party.sphere_grid_level_d_locks
   end
   # Clear Contents
   self.contents.fill_rect(0, y, contents.width, 16, Color.new(0, 0, 0, 0))
   # Redraws Spheres
   self.contents.font.color = total > 0 ? Color.new(0, 200, 0) : Color.new(200, 0, 0)
   self.contents.draw_text(8, y, contents.width - 16, 16, sphere)
   self.contents.draw_text(8, y, contents.width - 16, 16, (total - 1).to_s, 2)
 end
 #--------------------------------------------------------------------------
 # * Reset Contents
 #--------------------------------------------------------------------------
 def reset_contents
   if @stat_flag
     @stat_flag = false
     refresh
   end
 end
end

#==============================================================================
# ** Window_SkillGridStatus
#==============================================================================

class Window_SkillGridStatus < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(actor_index)
   super(4, 68, 236, 112)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.back_opacity = 125
   @actor = $game_party.actors[actor_index]
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   # Collects Skill Grid Totals
   skills, stats, locks = 0, 0, 0
   unlocked_skills, unlocked_stats, unlocked_locks = 0, 0, 0
   for event in $game_map.events.values
     if event.list[0].code == 108
       if event.list[0].parameters[0].include?('Skill')
         skills += 1
         if @actor.sphere_grid_event_list[event.id]
           unlocked_skills += 1
         end
       elsif event.list[0].parameters[0].dup.sub!(/\d/, '')
         stats += 1
         if @actor.sphere_grid_event_list[event.id]
           unlocked_stats += 1
         end
       elsif event.list[0].parameters[0].include?('Lock')
         locks += 1
         if @actor.sphere_grid_event_list[event.id]
           unlocked_locks += 1
         end
       end
     end
   end
   # Draws Sphere Totals Headings
   self.contents.font.size, self.contents.font.color = 22, system_color
   self.contents.draw_text(0, 0, contents.width, 32, "Grid Totals For #{@actor.name}", 1)
   # Draws Skill Totals
   self.contents.font.size, self.contents.font.color = 16, unlocked_skills ==
     skills ? Color.new(0, 255, 0) : normal_color
   self.contents.draw_text(8, 32, contents.width - 16, 16, 'Skill Spheres Unlocked')
   self.contents.draw_text(8, 32, contents.width - 16, 16, "#{unlocked_skills} / #{skills}", 2)
   # Draws Stat Totals
   self.contents.font.size, self.contents.font.color = 16, unlocked_stats ==
     stats ? Color.new(0, 255, 0) : normal_color
   self.contents.draw_text(8, 48, contents.width - 16, 16, 'Stat Spheres Unlocked')
   self.contents.draw_text(8, 48, contents.width - 16, 16, "#{unlocked_stats} / #{stats}", 2)
   # Draws Lock Totals
   self.contents.font.size, self.contents.font.color = 16, unlocked_locks ==
     locks ? Color.new(0, 255, 0) : normal_color
   self.contents.draw_text(8, 64, contents.width - 16, 16, 'Grid Locks Unlocked')
   self.contents.draw_text(8, 64, contents.width - 16, 16, "#{unlocked_locks} / #{locks}", 2)
 end
end

#==============================================================================
# ** Window_SkillGridActorStatus
#==============================================================================

class Window_SkillGridActorStatus < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(actor_index)
   super(4, 332, 392, 144)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.back_opacity = 125
   @actor = $game_party.actors[actor_index]
   @page = 1
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   @page == 1 ? draw_status : draw_skills
 end
 #--------------------------------------------------------------------------
 # * Draw Status
 #--------------------------------------------------------------------------
 def draw_status
   # Draws Actor Heading
   self.contents.font.size, self.contents.font.color = 22, system_color
   self.contents.draw_text(0, 0, contents.width, 32, @actor.name + ' Stastics')
   # Draws Stats
   stat_words = ['hp', 'sp', 'str', 'dex', 'agi', 'int', 'atk', 'pdef' , 'mdef'].collect! {|x|
     eval "$data_system.words.#{x}"} << 'Evasion'
   stat_amounts = ["#{@actor.hp} / #{@actor.maxhp}", "#{@actor.sp} / #{@actor.maxsp}"]
   stat_amounts << ['str', 'dex' , 'agi', 'int', 'atk' , 'pdef' , 'mdef', 'eva'].collect! {|x|
     eval "@actor.#{x}"}
   self.contents.font.size, self.contents.font.color = 16, normal_color
   for i in 0...stat_amounts.flatten!.size
     x, y = (i % 2) * contents.width / 2 + 8, 32 + 16 * (i / 2)
     self.contents.draw_text(x, y, contents.width / 2 - 16, 16, stat_words[i])
     self.contents.draw_text(x, y, contents.width / 2 - 16, 16, stat_amounts[i].to_s, 2)
   end
 end
 #--------------------------------------------------------------------------
 # * Draw Skills
 #--------------------------------------------------------------------------
 def draw_skills
   # Draws Actor Heading
   self.contents.font.size, self.contents.font.color = 22, system_color
   self.contents.draw_text(0, 0, contents.width, 32, @actor.name + ' Skills')
   # Draws Skill
   self.contents.font.size, self.contents.font.color = 16, normal_color
   for i in 0...@actor.sphere_grid_skills.size
     x, y = (i % 3) * contents.width / 3, 32 + 16 * (i / 3)
     skill_name = $data_skills[@actor.sphere_grid_skills[i]].name
     self.contents.draw_text(x + 4, y, contents.width / 3 - 8, 16, skill_name)
   end
 end
 #--------------------------------------------------------------------------
 # * Next Page
 #--------------------------------------------------------------------------
 def next_page
   @page = @page == 1 ? 2 : 1
   refresh
 end
end

#==============================================================================
# ** Scene_SphereGrid
#==============================================================================

class Scene_SphereGrid
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(actor_index, setup_return_id = false)
   # Actor Index from Game Party
   @actor_index = actor_index
   # Sets Actor
   @actor = $game_party.actors[@actor_index]
   # Sets Return Coordinates
   if setup_return_id
     $game_temp.spheregrid_return_map_id = $game_map.map_id
     $game_temp.spheregrid_return_map_coordinates = [$game_player.x, $game_player.y]
     actor = $game_party.actors[0]
     $game_temp.spheregrid_return_actor_graphic = [actor.character_name, actor.character_hue]
   end
   # Changes Character Graphic
   $game_player.character_name = @actor.character_name
   $game_player.character_hue = @actor.character_hue
   # Moves to Skill Map
   $game_map.setup($game_temp.spheregrid_map_id)
   coordinates = @actor.sphere_grid_position
   $game_player.moveto(coordinates[0], coordinates[1])
   # Update Events
   update_events
 end
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Make sprite set
   @spriteset = Spriteset_Map.new
   # Make message window
   @message_window = Window_Message.new
   # Make Help Window
   @help_window = Window_Help.new
     @help_window.back_opacity = 125
   # Make Spheres Window
   @sphere_totals = Window_SkillGridSpheres.new
   # Make Actor Status Window
   @actor_status = Window_SkillGridActorStatus.new(@actor_index)
   # Make Grid Stats Window
   @grid_status = Window_SkillGridStatus.new(@actor_index)
   # Conformation Window
   @confim_window = Window_Command.new(100, ['Yes', 'No'])
     @confim_window.x, @confim_window.y = 270, 192
     @confim_window.active = @confim_window.visible = false
     @confim_window.back_opacity = 125
   # Advancement Parameters
   @parameters = []
   # Transition run
   Graphics.transition(40, "Graphics/Transitions/#{$data_system.battle_transition}")
   # Main loop
   while $scene == self
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of sprite set
   @spriteset.dispose
   # Dispose of windows
   @message_window.dispose
   @help_window.dispose
   @sphere_totals.dispose
   @actor_status.dispose
   @grid_status.dispose
   @confim_window.dispose
   # Resets Map Information
   if $scene.is_a?(Scene_Menu)
     $game_map.setup($game_temp.spheregrid_return_map_id)
     $game_player.moveto($game_temp.spheregrid_return_map_coordinates[0],
       $game_temp.spheregrid_return_map_coordinates[1])
     $game_player.character_name = $game_temp.spheregrid_return_actor_graphic[0]
     $game_player.character_hue = $game_temp.spheregrid_return_actor_graphic[1]
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # If A button was pressed
   if Input.trigger?(Input::A)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Moves to Menu Scene
     @actor_status.next_page
   end
   # If X button was pressed
   if Input.trigger?(Input::X)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # Toggle Sphere Totals Window
     @sphere_totals.visible = @sphere_totals.visible ? false : true
   end
   # If Y button was pressed
   if Input.trigger?(Input::Y)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # Toggle Sphere Totals Window
     @actor_status.visible = @actor_status.visible ? false : true
   end
   # If Z button was pressed
   if Input.trigger?(Input::Z)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # Toggle Sphere Totals Window
     @grid_status.visible = @grid_status.visible ? false : true
   end
   # Conformation Method
   if @confim_window.active
     update_confirm
     return
   end
   # Clears Help Window Text
   @help_window.set_text('', 1)
   # Loop
   loop do
     # Update map, interpreter, and player order
     # (this update order is important for when conditions are fulfilled
     # to run any event, and the player isn't provided the opportunity to
     # move in an instant)
     $game_map.update
     $game_system.map_interpreter.update
     $game_player.update
     # Update system (timer), screen
     $game_system.update
     $game_screen.update
     # Abort loop if player isn't place moving
     unless $game_temp.player_transferring
       break
     end
     # Run place move
     transfer_player
     # Abort loop if transition processing
     if $game_temp.transition_processing
       break
     end
   end
   # Update sprite set
   @spriteset.update
   # Update message window
   @message_window.update
   # If showing message window
   if $game_temp.message_window_showing
     return
   end
   # Clears Learning Variables
   event_id, unlocked, parameters = nil, false, nil
   # Checks Each Event
   for event in $game_map.events.values
     # If Player is In Range
     if check_range(event, $game_player)
       # Sets Event Id Flag
       event_id = event.id
       # If Event Unlocked
       if @actor.sphere_grid_event_list[event_id]
         # Sets Help Window Text to Unlocked
         @help_window.set_text('Grid Unlocked', 1)
         # Sets unlocked Flag
         unlocked = true
       else
         # Sets Help Window Text to Skill Grid Type
         if event.list[0].code == 108
           # Gets Stat
           stat = event.list[0].parameters[0]
           # Skill Learning
           if stat.include?('Skill')
             for i in 1...$data_skills.size
               if stat.include?($data_skills[i].name)
                 parameters = ["Learn Skill #{$data_skills[i].name}", i]
               end
             end
           # Stat Learning
           elsif stat.dup.sub!(/(\d+)/, '')
             # Gets Value
             c = $1
             # Gets Parameter Type
             stat.dup.sub!(/(\w+)/, '')
             b = $1
             parameters = ["Increase #{b} by #{c}", b, c]
           # Grid Lock
           elsif stat.include?('Lock')
             parameters = ["Grid #{stat}"]
           end
           # Draws Help Text
           @help_window.set_text((parameters.nil? ? event.list[0].parameters[0] : parameters[0]), 1)
         end
       end
     end
   end
   # Updates Sphere Totals Window
   if parameters.nil?
     @sphere_totals.reset_contents
   else
     @sphere_totals.set_required_sphere(parameters.size == 2 ? 'Ability' :
       parameters.size == 3 ? parameters[1] : parameters[0].delete!('Grid '))
   end
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Changes Actors Skill Grid Coordinates
     @actor.sphere_grid_position = [$game_player.x, $game_player.y]
     # Moves to Menu Scene
     $scene = Scene_Menu.new
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     return if parameters.nil?
     # Learn Skills
     if parameters.size == 2
       # Checks to Make Sure Enough Ability Spheres
       if $game_party.sphere_grid_ability_spheres < 1
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Sets Parameters
       @parameters = ["Are you sure you want to #{parameters[0]}?",
         parameters[1], event_id]
       # Makes Conformation Window Active
       @confim_window.index = 0
       @confim_window.active = @confim_window.visible = true
       return
     # Increase Stats
     elsif parameters.size == 3
       # Checks for Spheres
       case parameters[1]
       when 'Hp'
         check = $game_party.sphere_grid_hp_spheres
       when 'Sp'
         check = $game_party.sphere_grid_sp_spheres
       when 'Str'
         check = $game_party.sphere_grid_str_spheres
       when 'Dex'
         check = $game_party.sphere_grid_dex_spheres
       when 'Agi'
         check = $game_party.sphere_grid_agi_spheres
       when 'Int'
         check = $game_party.sphere_grid_int_spheres
       end
       if check < 1
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Sets Parameters
       @parameters = ["Are you sure you want to #{parameters[0]}?",
         parameters[1], parameters[2].to_i, event_id]
       # Makes Conformation Window Active
       @confim_window.index = 0
       @confim_window.active = @confim_window.visible = true
       return
     # Grid Locks
     elsif parameters.size == 1
       # Help Text
       text = 'Are you sure you want to '
       # Checks Lock Amounts
       case parameters[0]
       when 'LockA'
         check = $game_party.sphere_grid_level_a_locks
         text += 'Unlock Grid Lock A'
       when 'LockB'
         check = $game_party.sphere_grid_level_b_locks
         text += 'Unlock Grid Lock B'
       when 'LockC'
         check = $game_party.sphere_grid_level_c_locks
         text += 'Unlock Grid Lock C'
       when 'LockD'
         check = $game_party.sphere_grid_level_d_locks
         text += 'Unlock Grid Lock D'
       end
       if check < 1
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Sets Parameters
       @parameters = [text, event_id]
       # Makes Conformation Window Active
       @confim_window.index = 0
       @confim_window.active = @confim_window.visible = true
       return
     end
   end
   # If L button was pressed
   if Input.trigger?(Input::L)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # To previous actor
     @actor_index += $game_party.actors.size - 1
     @actor_index %= $game_party.actors.size
     # Changes Actors Skill Grid Coordinates
     @actor.sphere_grid_position = [$game_player.x, $game_player.y]
     # Moves to New Actor
     $scene = Scene_SphereGrid.new(@actor_index)
   end
   # If R button was pressed
   if Input.trigger?(Input::R)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # To next actor
     @actor_index += 1
     @actor_index %= $game_party.actors.size
     # Changes Actors Skill Grid Coordinates
     @actor.sphere_grid_position = [$game_player.x, $game_player.y]
     # Moves to New Actor
     $scene = Scene_SphereGrid.new(@actor_index)
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update : Conformation
 #--------------------------------------------------------------------------
 def update_confirm
   # Updates Confirm Window
   @confim_window.update
   # Sets Help Window
   @help_window.set_text(@parameters[0])
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Turns off Confirm Window
     @confim_window.visible = @confim_window.active = false
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     if @confim_window.index == 1
       # Play cancel SE
       $game_system.se_play($data_system.cancel_se)
       # Turns off Confirm Window
       @confim_window.visible = @confim_window.active = false
     else
       # Skill Learning
       if @parameters.size == 3
         # Lowers Abilitiy Spheres
         $game_party.sphere_grid_ability_spheres -= 1
         # Turns Off Grid Event For Actor
         @actor.sphere_grid_event_list[@parameters[2]] = true
         # Learns Skill
         @actor.sphere_grid_skills << @parameters[1]
         # Refreshes Total Window
         @sphere_totals.refresh
         # Refreshs Skills Window
         @actor_status.refresh
         # Refreshes Grid Status Window
         @grid_status.refresh
         # Turns off Confirm Window
         @confim_window.visible = @confim_window.active = false
         # Gets Event ID
         event_id = @parameters[2]
       elsif @parameters.size == 4
         case @parameters[1]
         when 'Hp'
           # Lowers Spheres
           $game_party.sphere_grid_hp_spheres -= 1
           # Raises Stat
           @actor.maxhp += @parameters[2]
         when 'Sp'
           # Lowers Spheres
           $game_party.sphere_grid_sp_spheres -= 1
           # Raises Stat
           @actor.maxsp += @parameters[2]
         when 'Str'
           # Lowers Spheres
           $game_party.sphere_grid_str_spheres -= 1
           # Raises Stat
           @actor.str += @parameters[2]
         when 'Dex'
           # Lowers Spheres
           $game_party.sphere_grid_dex_spheres -= 1
           # Raises Stat
           @actor.dex += @parameters[2]
         when 'Agi'
           # Lowers Spheres
           $game_party.sphere_grid_agi_spheres -= 1
           # Raises Stat
           @actor.agi += @parameters[2]
         when 'Int'
           # Lowers Spheres
           $game_party.sphere_grid_int_spheres -= 1
           # Raises Stat
           @actor.int += @parameters[2]
         end
         # Turns Off Grid Event For Actor
         @actor.sphere_grid_event_list[@parameters[3]] = true
         # Refreshes Total Window
         @sphere_totals.refresh
         # Refreshs Skills Window
         @actor_status.refresh
         # Refreshes Grid Status Window
         @grid_status.refresh
         # Turns off Confirm Window
         @confim_window.visible = @confim_window.active = false
         # Gets Event ID
         event_id = @parameters[3]
       elsif @parameters.size == 2
         # Lowers Lock Spheres
         case @parameters[0].reverse[0, 1]
         when 'A'
           $game_map.events[@parameters[1]].character_name =
             Sphere_Grid_System::LOCKA_GRAPHIC_OFF[0]
           $game_party.sphere_grid_level_a_locks -= 1
         when 'B'
           $game_map.events[@parameters[1]].character_name =
             Sphere_Grid_System::LOCKB_GRAPHIC_OFF[0]
           $game_party.sphere_grid_level_b_locks -= 1
         when 'C'
           $game_map.events[@parameters[1]].character_name =
             Sphere_Grid_System::LOCKC_GRAPHIC_OFF[0]
           $game_party.sphere_grid_level_c_locks -= 1
         when 'D'
           $game_map.events[@parameters[1]].character_name =
             Sphere_Grid_System::LOCKD_GRAPHIC_OFF[0]
           $game_party.sphere_grid_level_d_locks -= 1
         end
         # Turns Off Grid Event For Actor
         @actor.sphere_grid_event_list[@parameters[1]] = true
         # Changes Events Graphic
         $game_map.events[@parameters[1]].character_name = ''
         # Refreshes Total Window
         @sphere_totals.refresh
         # Refreshs Skills Window
         @actor_status.refresh
         # Refreshes Grid Status Window
         @grid_status.refresh
         # Turns off Confirm Window
         @confim_window.visible = @confim_window.active = false
         # Gets Event ID
         event_id = @parameters[1]
       end
       # Updates Events
       $game_map.events[event_id].direction = 8
       $game_map.events[event_id].through = true
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Check Range
 #--------------------------------------------------------------------------
 def check_range(element, object, range = 1)
   x = (element.x - object.x) * (element.x - object.x)
   y = (element.y - object.y) * (element.y - object.y)
   r = x + y
   return r <= (range * range)
 end
 #--------------------------------------------------------------------------
 # * Update Events
 #--------------------------------------------------------------------------
 def update_events
   # Sets Event Graphics
   for event in $game_map.events.values
     if @actor.sphere_grid_event_list.has_key?(event.id)
       if event.list[0].code == 108
         stat = event.list[0].parameters[0]
         # Grid Locks
         if stat.include?('Lock')
           unless @actor.sphere_grid_event_list[event.id]
             case stat.reverse[0, 1]
             when 'A'
               graphic_parameters = Sphere_Grid_System::LOCKA_GRAPHIC_ON
             when 'B'
               graphic_parameters = Sphere_Grid_System::LOCKB_GRAPHIC_ON
             when 'C'
               graphic_parameters = Sphere_Grid_System::LOCKC_GRAPHIC_ON
             when 'D'
               graphic_parameters = Sphere_Grid_System::LOCKD_GRAPHIC_ON
             end
           else
             case stat.reverse[0, 1]
             when 'A'
               graphic_parameters = Sphere_Grid_System::LOCKA_GRAPHIC_OFF
             when 'B'
               graphic_parameters = Sphere_Grid_System::LOCKB_GRAPHIC_OFF
             when 'C'
               graphic_parameters = Sphere_Grid_System::LOCKC_GRAPHIC_OFF
             when 'D'
               graphic_parameters = Sphere_Grid_System::LOCKD_GRAPHIC_OFF
             end
           end
         # Skill Sphere
         elsif stat.include?('Skill')
           unless @actor.sphere_grid_event_list[event.id]
             graphic_parameters = Sphere_Grid_System::ABILITIY_SPHERE_GRAPHIC_ON
           else
             graphic_parameters = Sphere_Grid_System::ABILITIY_SPHERE_GRAPHIC_OFF
           end
         # Stat Spheres
         elsif stat.dup.sub!(/(\d+)/, '')
           stat.dup.sub(/(\w+)/, '')
           unless @actor.sphere_grid_event_list[event.id]
             case $1
             when 'Hp'
               graphic_parameters = Sphere_Grid_System::HP_SPHERE_GRAPHIC_ON
             when 'Sp'
               graphic_parameters = Sphere_Grid_System::SP_SPHERE_GRAPHIC_ON
             when 'Str'
               graphic_parameters = Sphere_Grid_System::STR_SPHERE_GRAPHIC_ON
             when 'Dex'
               graphic_parameters = Sphere_Grid_System::DEX_SPHERE_GRAPHIC_ON
             when 'Agi'
               graphic_parameters = Sphere_Grid_System::AGI_SPHERE_GRAPHIC_ON
             when 'Int'
               graphic_parameters = Sphere_Grid_System::INT_SPHERE_GRAPHIC_ON
             end
           else
             case $1
             when 'Hp'
               graphic_parameters = Sphere_Grid_System::HP_SPHERE_GRAPHIC_OFF
             when 'Sp'
               graphic_parameters = Sphere_Grid_System::SP_SPHERE_GRAPHIC_OFF
             when 'Str'
               graphic_parameters = Sphere_Grid_System::STR_SPHERE_GRAPHIC_OFF
             when 'Dex'
               graphic_parameters = Sphere_Grid_System::DEX_SPHERE_GRAPHIC_OFF
             when 'Agi'
               graphic_parameters = Sphere_Grid_System::AGI_SPHERE_GRAPHIC_OFF
             when 'Int'
               graphic_parameters = Sphere_Grid_System::INT_SPHERE_GRAPHIC_OFF
             end
           end
         end
         # Changes event graphics
         event.character_hue = graphic_parameters[1]
         event.direction = graphic_parameters[2]
         event.pattern = graphic_parameters[3]
         event.character_name = graphic_parameters[0]
         event.through = @actor.sphere_grid_event_list[event.id]
       end
     end
   end
 end
end

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end


Just had to alias command_continue as well.  :P
Title: Re: 3 Requests :3
Post by: Zare on February 13, 2010, 02:22:14 pm
awesome, thy so much! :D

yeah the prob of the second request is, that the second script is written without the sdk and it's aliased differently, means that the part with

def command_new_game

and the part with
$data_actors        = load_data("Data/Actors.rxdata")
$data_classes       = load_data("Data/Classes.rxdata")
....

is aliased, but in the first one it isn't. Now I want the second one to aliase everything like the first one^^ (reason is, that the second one overwrites something and produces an error)

And the 1. Request I think is a whole script request, because I don't think there is a script like that (maybe it is but I didn't find it)

ty, Zare
Title: Re: 3 Requests :3
Post by: lilbrudder917 on February 13, 2010, 02:36:33 pm
Quote from: Zare on February 13, 2010, 02:22:14 pm
awesome, thy so much! :D

yeah the prob of the second request is, that the second script is written without the sdk and it's aliased differently, means that the part with

def command_new_game

and the part with
$data_actors        = load_data("Data/Actors.rxdata")
$data_classes       = load_data("Data/Classes.rxdata")
....

is aliased, but in the first one it isn't. Now I want the second one to aliase everything like the first one^^ (reason is, that the second one overwrites something and produces an error)

And the 1. Request I think is a whole script request, because I don't think there is a script like that (maybe it is but I didn't find it)

ty, Zare


No problem at all.  :P

I'm not entirely sure what the issue is with the Scene_Title, but it might be incompatibility with one of your other scripts. It's working just fine for me. The second one actually IS a Scene_Title. The first only adds to it (from what I can see anyway).

And the first request I didn't even notice up until you brought it up now.  :^_^': I probably can't help with that, I'm terrible when it comes to Scene_Battle, sorry.
Title: Re: 3 Requests :3
Post by: Zare on February 15, 2010, 09:20:59 am
bump! anyone else? please ?  :naughty:
Title: Re: Animated Title Edit (2 Request already solved)
Post by: Zare on February 17, 2010, 02:29:15 pm
Bump again, first Post has been updated since 2 requests have been solved, so just one left :D Please help with that^^