Sleeping Leonhart Posted November 7, 2007 Share Posted November 7, 2007 (edited) UCM - Universal Customizable MenuDescrizioneUn menu modificabile in molti aspetti.Ovviamente lo script è rivolto a coloro che non sanno programmare. AutoreThe Sleeping Leonhart ScriptUCM Configurazione #============================================================================== # ** Universal Customizable Menu #============================================================================== # The Sleeping Leonhart # Versione 1.9 # 22.1.08 #============================================================================== # Con questo script puoi personalizzare il tuo main menu, rivolto soprattutto a # chi non sa programmare. Per qualsiasi aggiunta, suggerimento o altro postate # nel topic di riferimento http://www.rpg2s.net/forum/index.php?showtopic=2636. #============================================================================== # Feature: # * Possibilità di creare menu con le picture(quando viene usata una picture per una finestra la # trasparenza di quest'ultima è settata a 0. Le picture vanno inPictures/Menu) # * Animazione finestra In e Out # * Abilita/Disabiltà l'animazione delle finestre # * Imposta la posizione, la trasparenza e il verso di animazione di ciascuna finestra # * Puoi nascondere le finestre # * Puoi visualizzare la mappa in background # * 3 differenti status window # * Puoi mettere i comandi orizzontalmente o verticalmente # * Puoi mostrare la faccia del personaggio invece che il suo pupazzo (Le faccie vanno in Characters/Face e devono essere nominate come il corrispettivo characters) # * Puoi aggiungere/rimuovere i comandi # * Puoi inserire le icone di fianco ai comandi (le icone devono avere lo stesso nome del comando) # * Finestra del Progresso di gioco (per incrementare il progresso: $game_system.progress += value) # * Finestra con il nome della mappa # * Finestra del numero di mostri uccisi # * Puoi ridimanesionare alcune finestre # * Puoi cambiare la grandezza font per alcune finestre # * Puoi aggiungere un icona per alcune finestre # * Puoi eseguire un BGM durante la visualizzazione del menu # * Puoi scegliere la windowskin di ciascuna finestra # * Puoi scegliere il colore della barra del progresso di gioco # * Puoi cambiare l'altezza dello status window basandoti sul numero attuale dei membri of member in party o sul numero massimo di membri. #============================================================================== # Configurazione #============================================================================== #----------------SFONDO--------------------------------------------------------- BG_MAP = true #Rende la mappa visibile inbackground BG_PICTURE = "" #nome della picture di background #----------------PICTURE-------------------------------------------------------- STATUS_PICTURE = "" #nome della picture della finestra di status STEP_PICTURE = "" #nome della picture della finestra dei passi LOCATION_PICTURE = "" #nome della picture della finestra di locazione GOLD_PICTURE = "" #nome della picture della finestra dei soldi TIME_PICTURE = "" #nome della picture della finestra del tempo PROGRESS_PICTURE = "" #nome della picture della finestra di progresso KILLED_PICTURE = "" #nome della picture della finestra dei mostri uccisi COMMAND_PICTURE = "" #nome della picture della finestra di comandi #---------------NOME COMANDI--------------------------------------------------- COMMAND_ITEM = "Oggetti" #nome del comando oggetti COMMAND_SKILL = "Abilità" #nome del comando skill COMMAND_EQUIP = "Equip." #nome del comando equipaggiamento COMMAND_STATUS = "Status" #nome del comando status COMMAND_SAVE = "Salva" #nome del comando salva COMMAND_EXIT = "Esci" #nome del comando esci #------------------ICONE------------------------------------------------------- GOLD_ICON = "" #nome dell'icona dell'oro STEP_ICON = "" #nome dell'icona dei passi TIME_ICON = "" #nome dell'icona del tempo PROGRESS_ICON = "" #nome dell'icona del progresso KILLED_ICON = "" #nome dell'icona dei mostri uccisi ICON = false #abilita le icone #-------------------ALTRO------------------------------------------------------ ANIMATION = true #abilita l'animazione #------------------------------------------------------------------------------- #Sintassi: MENU_BGM = [nome del bgm, volume, timbro] #------------------------------------------------------------------------------- MENU_BGM = ["007-Boss03", 75, 100] #Cambia la musica durante la visualizzazione del menu #------------------------------------------------------------------------------- #Sintassi: PROGRESS_BAR_etc.. = Color.new(rosso, verde, blu[, alpha]), alpha è opzionale #------------------------------------------------------------------------------- PROGRESS_BAR_COLOR_1 = Color.new(255, 0, 0, 255) #Imposta il colore primario della barra del progresso PROGRESS_BAR_COLOR_2 = Color.new(125, 0, 0, 255) #Imposta il colore secondario della barra del progresso PROGRESS_BAR_FILLED_COLOR_1 = Color.new(0, 255, 255, 255) #Imposta il colore primario della barra del progresso quando è piena PROGRESS_BAR_FILLED_COLOR_2 = Color.new(0, 125, 125, 255) #Imposta il colore secondario della barra del progresso quando è piena STATUS_WINDOW_PARTY_DEPENDENCY = true #Se true l'altezza delle status window 1 & 2 è adatteta al numero attuale dei membri nel party STATUS_WINDOW_MAX_PARTY = 3 #numero massimo dei membri in party, questo è usato per adattare l'altezza delle status window 1 & 2 #se STATUS_WINDOW_PARTY_DEPENDENCY è impostato su true questa opzione non viene usata #=============================================================================== # Window Setup #=============================================================================== # COMMAND_WINDOW Syntax: [Type of command Window, x, y, opacity, animation, windowskin] # LOCATION_WINDOW, STEP_WINDOW, GOLD_WINDOW, TIME_WINDOW Syntax: [Visible?, x, y, opacity, animation, width, height, fontsize, windowskin] # STATUS_WINDOW Syntax: [Type of status Window, x, y, opacity, graphic, animation, windowskin] #------------------------------------------------------------------------------- # Type of command Window = Setta la Command Window in "Horizzontal" o "Vertical" # Visible? = inserire true se la finestra è visibile # x = Setta la positzione x della fnestra # y = Setta la positzione y della fnestra # opacity = Setta la trasparenza della finestra # animation = Setta il verso dell'animazione. "Down", "Up", "Left" o "Right" # Type of status Window = Scegli il tipo di status window # graphic = scegli tra "Character" o "Face" # width = setta la larghezza della finestra # height = setta l'altezza della finestra # fontsize = setta la grandezza del font della finestra # windowskin = nome della skin della finestra #============================================================================== COMMAND_WINDOW = ["Horizzontal", 0, 0, 160, "Right", "001-Blue01"] STEP_WINDOW = [true, 0, 320-32, 160, "Up", 160, 96, 24, "001-Blue01"] LOCATION_WINDOW = [true, 160, 480-96, 160, "Left", 480, 96, 24, "001-Blue01"] GOLD_WINDOW = [true, 0, 64, 160, "Left", 160, 64, 24, "001-Blue01"] TIME_WINDOW = [true, 0, 128, 160, "Up", 160, 96, 24, "001-Blue01"] PROGRESS_WINDOW = [true, 0, 128+96, 160, "Up", 160, 64, 24, "001-Blue01"] KILLED_WINDOW = [true, 0, 480-96, 160, "Up", 160, 96, 24, "001-Blue01"] STATUS_WINDOW = [2, 160, 64, 160, "Character", "Down", "001-Blue01"] COMMAND_SETUP = [COMMAND_ITEM, COMMAND_SKILL, COMMAND_EQUIP, COMMAND_STATUS,COMMAND_SAVE, COMMAND_EXIT] UCM Finestre class Game_Actor < Game_Battler def now_exp return @exp - @exp_list[@level] end def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 end end class Window_Base < Window def draw_actor_face(actor, x, y) bitmap = RPG::Cache.character("Face/"+actor.character_name, actor.character_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end def draw_actor_battler(actor, x, y) bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x, y, bitmap, src_rect) end def draw_actor_battler_trunc(actor, x, y) bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0+cw/8, 0, 80, ch) self.contents.blt(x, y, bitmap, src_rect) end def draw_actor_exps(actor, x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 28, 32, "Exp") self.contents.font.color = normal_color if actor.now_exp != 0 text = (actor.now_exp.to_f / actor.next_exp.to_f)*100.00 text = text.round else text = 0 end self.contents.draw_text(x + 40, y, 84, 32, text.to_s+"%") end def draw_actor_parameter(actor, x, y, type) case type when 0 parameter_name = $data_system.words.atk parameter_value = actor.atk when 1 parameter_name = $data_system.words.pdef parameter_value = actor.pdef when 2 parameter_name = $data_system.words.mdef parameter_value = actor.mdef when 3 parameter_name = $data_system.words.str parameter_value = actor.str when 4 parameter_name = $data_system.words.dex parameter_value = actor.dex when 5 parameter_name = $data_system.words.agi parameter_value = actor.agi when 6 parameter_name = $data_system.words.int parameter_value = actor.int when 7 parameter_name = "Evasione" parameter_value = actor.eva end self.contents.font.color = system_color self.contents.draw_text(x, y, 120, 32, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 88, y, 36, 32, parameter_value.to_s, 2) end end class Window_Selectable < Window_Base def command(index = self.index) return @commands[index] end def commands=(commands) return if @commands == commands @commands = commands item_max = @item_max @item_max = @commands.size @column_max = @item_max unless item_max == @item_max unless self.contents.nil? self.contents.dispose self.contents = nil end self.contents = Bitmap.new(@item_max * (width - 32), height - 32) end refresh end end class Window_MenuCommandVert < Window_Selectable def initialize super(0, 0, 160, COMMAND_SETUP.size * 32 + 32) @item_max = COMMAND_SETUP.size @commands = COMMAND_SETUP self.contents = Bitmap.new(width - 32, @item_max * 32) if COMMAND_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + COMMAND_PICTURE) @picture.x = 480 @picture.y = 640 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = COMMAND_WINDOW[3] end refresh self.index = 0 end def refresh self.contents.clear for i in 0...@item_max draw_item(i, normal_color) end end alias tslums_menucmdv_update update def update if COMMAND_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_menucmdv_update end def draw_item(index, color) self.contents.font.color = color if ICON rect = Rect.new(24, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(18, 0, 0, 0)) bitmap = RPG::Cache.icon(COMMAND_SETUP[index]) self.contents.blt(0, 32*index, bitmap, Rect.new(0, 0, 24, 24)) else rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) end self.contents.draw_text(rect, @commands[index]) end def disable_item(index) draw_item(index, disabled_color) end end class Window_MenuCommandHoriz < Window_Selectable def initialize if COMMAND_SETUP.size > 6 super(COMMAND_WINDOW[1], COMMAND_WINDOW[2], 640, 96) else super(COMMAND_WINDOW[1], COMMAND_WINDOW[2], 640, 64) end self.contents = Bitmap.new(width - 32, height - 32) @item_max = COMMAND_SETUP.size if COMMAND_SETUP.size > 6 @column_max = 6 @row_max = 2 else @column_max = COMMAND_SETUP.size @row_max = 1 end @commands = COMMAND_SETUP @c_spacing = (640 - 32) if COMMAND_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + COMMAND_PICTURE) @picture.x = 480 @picture.y = 640 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = COMMAND_WINDOW[3] end refresh self.index = 0 end alias tslums_menucmd_update update def update if COMMAND_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_menucmd_update end def refresh self.contents.clear for i in 0...@item_max draw_item(i, system_color) end end def draw_item(index, color) cursor_width = self.width / @column_max - 32 x = 4 + index % @column_max * (cursor_width + 32) y = index / @column_max * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) if ICON bitmap = RPG::Cache.icon(COMMAND_SETUP[index]) self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24)) self.contents.draw_text(16+x, y, cursor_width, 32, @commands[index], 0) else self.contents.draw_text(x, y, cursor_width, 32, @commands[index], 0) end end def disable_item(index) draw_item(index, disabled_color) end end class Window_Steps < Window_Base def initialize super(STEP_WINDOW[1], STEP_WINDOW[2], STEP_WINDOW[5], STEP_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = STEP_WINDOW[7] if STEP_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + STEP_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = STEP_WINDOW[3] end refresh if STEP_ICON != "" bitmap = RPG::Cache.icon(STEP_ICON) self.contents.blt(0, STEP_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24)) end end alias tslums_step_update update def update if STEP_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_step_update end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, STEP_WINDOW[5]-40, 32, "Passi") self.contents.font.color = normal_color self.contents.draw_text(4, STEP_WINDOW[7], STEP_WINDOW[5]-40, 32, $game_party.steps.to_s, 2) end end class Game_Map def name $map_infos[@map_id] end end class Scene_Title $map_infos = load_data("Data/MapInfos.rxdata") for key in $map_infos.keys $map_infos[key] = $map_infos[key].name end end class Window_Location < Window_Base def initialize super(LOCATION_WINDOW[1], LOCATION_WINDOW[2], LOCATION_WINDOW[5], LOCATION_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = LOCATION_WINDOW[7] if LOCATION_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + LOCATION_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = LOCATION_WINDOW[3] end refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0 , 0, LOCATION_WINDOW[5], 32, "Luogo") self.contents.font.color = normal_color self.contents.draw_text(0 , LOCATION_WINDOW[7], LOCATION_WINDOW[5], 32, $game_map.name) end alias tslums_loc_update update def update if LOCATION_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_loc_update end end class Window_Gold < Window_Base def initialize super(GOLD_WINDOW[1], GOLD_WINDOW[2], GOLD_WINDOW[5], GOLD_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = GOLD_WINDOW[7] if GOLD_PICTURE != "" @picture = Sprite.new @picture.bitmap = Bitmap.new("Graphics/Pictures/Menu/" + GOLD_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue.to_i) self.opacity = 0 else self.opacity = GOLD_WINDOW[3] end refresh if GOLD_ICON != "" bitmap = RPG::Cache.icon(GOLD_ICON) self.contents.blt(0, 0 + 4, bitmap, Rect.new(0, 0, 24, 24)) end end alias tslums_gold_update update def update if GOLD_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_gold_update end end class Window_PlayTime < Window_Base def initialize super(TIME_WINDOW[1], TIME_WINDOW[2], TIME_WINDOW[5], TIME_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = TIME_WINDOW[7] if TIME_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + TIME_PICTURE) @picture.x = 480 @picture.y = 640 @picture.bitmap.hue_change($game_system.skin_hue) self.opacity = 0 else self.opacity = TIME_WINDOW[3] end refresh if TIME_ICON != "" bitmap = RPG::Cache.icon(TIME_ICON) self.contents.blt(0, TIME_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24)) end end alias tslums_time_update update def update if TIME_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_time_update end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, TIME_WINDOW[5]-40, 32, "Tempo di Gioco") @total_sec = Graphics.frame_count / Graphics.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 text = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = normal_color self.contents.draw_text(4, TIME_WINDOW[7], TIME_WINDOW[5]-40, 32, text, 2) end end class Window_MenuStatus < Window_Selectable def initialize super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 96*STATUS_WINDOW_MAX_PARTY+32) if STATUS_WINDOW_PARTY_DEPENDENCY self.height = 96*$game_party.actors.size+32 end self.contents = Bitmap.new(width - 32, height - 32) if STATUS_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE) @picture.x = 640 @picture.y = 480 self.opacity = 0 else self.opacity = STATUS_WINDOW[3] end refresh self.active = false self.index = -1 end alias tslums_stat_update update def update if STATUS_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_stat_update end def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 64 y = i * 96 actor = $game_party.actors[i] if STATUS_WINDOW[4] == "Character" draw_actor_graphic(actor, x - 40, y + 80) elsif STATUS_WINDOW[4] == "Face" draw_actor_face(actor, x-20, y + 80) end draw_actor_name(actor, x, y) draw_actor_class(actor, x + 144, y) draw_actor_level(actor, x, y + 32) draw_actor_state(actor, x + 90, y + 32) draw_actor_exp(actor, x, y + 64) draw_actor_hp(actor, x + 236, y + 32) draw_actor_sp(actor, x + 236, y + 64) end end def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(0, @index * 96, self.width - 32, 96) end end end class Window_MenuStatus2 < Window_Selectable def initialize super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 96*STATUS_WINDOW_MAX_PARTY+32) if STATUS_WINDOW_PARTY_DEPENDENCY self.height = 96*$game_party.actors.size+32 end self.contents = Bitmap.new(width - 32, height - 32) if STATUS_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE) @picture.x = 640 @picture.y = 480 self.opacity = 0 else self.opacity = STATUS_WINDOW[3] end refresh self.active = false self.index = -1 end alias tslums_stat2_update update def update if STATUS_PICTURE != "" @picture.x = self.x @picture.y = self.y end tslums_stat2_update end def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 64 y = i * 96 actor = $game_party.actors[i] if STATUS_WINDOW[4] == "Character" draw_actor_graphic(actor, x - 40, y + 80) elsif STATUS_WINDOW[4] == "Face" draw_actor_face(actor, x-10, y + 80) end self.contents.font.size = 18 draw_actor_name(actor, x, y) draw_actor_hp(actor, x + 92, y) draw_actor_sp(actor, x + 236, y) draw_actor_state(actor, x, y + 18) draw_actor_level(actor, x, y + 36) draw_actor_exps(actor, x, y + 54) draw_actor_parameter(actor, x + 92, y + 16, 0) draw_actor_parameter(actor, x + 92, y + 32, 1) draw_actor_parameter(actor, x + 92, y + 48, 2) draw_actor_parameter(actor, x + 92, y + 64, 6) draw_actor_parameter(actor, x + 236, y + 16, 3) draw_actor_parameter(actor, x + 236, y + 32, 4) draw_actor_parameter(actor, x + 236, y + 48, 5) draw_actor_parameter(actor, x + 236, y + 64, 7) end end def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(0, @index * 96, self.width - 32, 96) end end end class Window_MenuStatus3 < Window_Selectable def initialize super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 416) if STATUS_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE) @picture.x = 640 @picture.y = 480 self.opacity = 0 else self.opacity = STATUS_WINDOW[3] end @column_max = 1 refresh self.index = -1 end alias tslums_stat2_update update def update if STATUS_PICTURE != "" @picture.x = self.x @picture.y = self.y end if self.index == -1 self.oy = 0 else self.oy = self.index*416 end tslums_stat2_update end def refresh if self.contents != nil self.contents.dispose self.contents = nil end @item_max = $game_party.actors.size if @item_max > 0 self.contents = Bitmap.new(448, 416*@item_max) for i in 0...@item_max y = i * 416 actor = $game_party.actors[i] if STATUS_WINDOW[4] == "Character" draw_actor_graphic(actor, x - 40, y + 80) elsif STATUS_WINDOW[4] == "Face" draw_actor_face(actor, x-80, y+80) end draw_actor_name(actor, 4, y + 0) draw_actor_class(actor, 4 + 144, y + 0) draw_actor_level(actor, 0, y + 32) draw_actor_state(actor, 0, y + 64) draw_actor_hp(actor, 0 + 144, y + 32, 172) draw_actor_sp(actor, 0 + 144, y + 64, 172) draw_actor_parameter(actor, 0, y + 160, 0) draw_actor_parameter(actor, 0, y + 192, 1) draw_actor_parameter(actor, 0, y + 224, 2) draw_actor_parameter(actor, 0, y + 256, 3) draw_actor_parameter(actor, 0, y + 288, 4) draw_actor_parameter(actor, 0, y + 320, 5) draw_actor_parameter(actor, 0, y + 352, 6) self.contents.font.color = system_color self.contents.draw_text(0, y + 96, 80, 32, "EXP") self.contents.draw_text(144, y + 96, 80, 32, "NEXT") self.contents.font.color = normal_color self.contents.draw_text(0 + 60, y + 96, 84, 32, actor.exp_s, 2) self.contents.draw_text(144 + 60, y + 96, 84, 32, actor.next_rest_exp_s, 2) self.contents.font.color = system_color self.contents.draw_text(192, y + 160, 96, 32, "Equipaggiamento") draw_item_name($data_weapons[actor.weapon_id], 192 + 16, y + 208) draw_item_name($data_armors[actor.armor1_id], 192 + 16, y + 256) draw_item_name($data_armors[actor.armor2_id], 192 + 16, y + 304) draw_item_name($data_armors[actor.armor3_id], 192 + 16, y + 352) draw_item_name($data_armors[actor.armor4_id], 192 + 16, y + 400) end end end def update_cursor_rect self.cursor_rect.empty end end class Window_Base < Window def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255)) if type == "horizontal" width = length height = thick self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255)) self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255)) w = width * e1 / e2 for i in 0..height r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a)) end elsif type == "vertical" width = thick height = length self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255)) self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255)) h = height * e1 / e2 for i in 0..width r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a)) end end end end class Game_System alias squall_leonhart_game_system_initialize initialize attr_accessor :skin_hue attr_accessor :progress attr_accessor :killed_monster def initialize @skin_hue = 0 @progress = 0.00 @killed_monster = 0 squall_leonhart_game_system_initialize end end class Window_Progress < Window_Base def initialize super(PROGRESS_WINDOW[1], PROGRESS_WINDOW[2], PROGRESS_WINDOW[5], PROGRESS_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = PROGRESS_WINDOW[7] if PROGRESS_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + PROGRESS_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue) self.opacity = 0 else self.opacity = PROGRESS_WINDOW[3] end update end def update self.contents.clear if PROGRESS_PICTURE != "" @picture.x = self.x @picture.y = self.y end if PROGRESS_ICON != "" bitmap = RPG::Cache.icon(PROGRESS_ICON) self.contents.blt(0, 4, bitmap, Rect.new(0, 0, 24, 24)) end self.contents.font.color = system_color @largezzatesto = self.contents.text_size("Progresso").width self.contents.draw_text(80 - (@largezzatesto/2)- 16, -8, @largezzatesto, 32, "Progresso") if $game_system.progress >= 100 self.contents.font.color = crisis_color draw_normal_barz(80-((128/2)+15), PROGRESS_WINDOW[7], "horizontal", PROGRESS_WINDOW[5]-34, 6, $game_system.progress, 100, PROGRESS_BAR_FILLED_COLOR_1, PROGRESS_BAR_FILLED_COLOR_2) else self.contents.font.color = normal_color draw_normal_barz(80-((128/2)+15), PROGRESS_WINDOW[7], "horizontal", PROGRESS_WINDOW[5]-34, 6, $game_system.progress, 100, PROGRESS_BAR_COLOR_1, PROGRESS_BAR_COLOR_2) end @largezzatesto2 = self.contents.text_size("#{$game_system.progress.to_f} %").width self.contents.draw_text(80 - (@largezzatesto2/2) - 16, PROGRESS_WINDOW[7] - 16, 128, 32, "#{$game_system.progress.to_f} %") end end class Game_Enemy alias tsl_ums_enemy_add_state add_state def add_state(*args) tsl_ums_enemy_add_state(*args) $game_system.killed_monster += 1 if dead? end end class Window_Killed < Window_Base def initialize super(KILLED_WINDOW[1], KILLED_WINDOW[2], KILLED_WINDOW[5], KILLED_WINDOW[6]) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = KILLED_WINDOW[7] if KILLED_PICTURE != "" @picture = Sprite.new @picture.bitmap = RPG::Cache.picture("Menu/" + KILLED_PICTURE) @picture.x = 640 @picture.y = 480 @picture.bitmap.hue_change($game_system.skin_hue) self.opacity = 0 else self.opacity = KILLED_WINDOW[3] end update end def update self.contents.clear if KILLED_PICTURE != "" @picture.x = self.x @picture.y = self.y end if KILLED_ICON != "" bitmap = RPG::Cache.icon(KILLED_ICON) self.contents.blt(0, KILLED_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24)) end self.contents.font.color = system_color self.contents.draw_text(0, 0, 128, 32, "Mostri Uccisi:") self.contents.font.color = normal_color self.contents.draw_text(0, KILLED_WINDOW[7], 128, 32, "#{$game_system.killed_monster.to_s}",2) end end UCM Menu class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index end def main if BG_MAP == true @spritesetmap = Spriteset_Map.new end if BG_PICTURE != "" @bg = Sprite.new @bg.bitmap = RPG::Cache.picture("Menu/" + BG_PICTURE) end if COMMAND_WINDOW[0] == "Vertical" @command_window = Window_MenuCommandVert.new elsif COMMAND_WINDOW[0] == "Horizzontal" @command_window = Window_MenuCommandHoriz.new end @command_window.index = @menu_index if $game_party.actors.size == 0 for i in 0..COMMAND_SETUP.size @command_window.disable_item(i) end end $game_system.bgm_memorize Audio.bgm_play("Audio/BGM/" + MENU_BGM[0], MENU_BGM[1], MENU_BGM[2]) if MENU_BGM[0] != "" @location_window = Window_Location .new @playtime_window = Window_PlayTime.new @steps_window = Window_Steps.new @gold_window = Window_Gold.new @progress_window = Window_Progress.new @killed_window = Window_Killed.new case STATUS_WINDOW[0] when 2 @status_window = Window_MenuStatus2.new when 3 @status_window = Window_MenuStatus3.new else @status_window = Window_MenuStatus.new end @playtime_window.visible = TIME_WINDOW[0] @location_window.visible = LOCATION_WINDOW[0] @gold_window.visible = GOLD_WINDOW[0] @steps_window.visible = STEP_WINDOW[0] @progress_window.visible = PROGRESS_WINDOW[0] @killed_window.visible = KILLED_WINDOW[0] @command_window.windowskin = RPG::Cache.windowskin(COMMAND_WINDOW[5]) @playtime_window.windowskin = RPG::Cache.windowskin(TIME_WINDOW[8]) @location_window.windowskin = RPG::Cache.windowskin(LOCATION_WINDOW[8]) @gold_window.windowskin = RPG::Cache.windowskin(GOLD_WINDOW[8]) @steps_window.windowskin = RPG::Cache.windowskin(STEP_WINDOW[8]) @progress_window.windowskin = RPG::Cache.windowskin(PROGRESS_WINDOW[8]) @killed_window.windowskin = RPG::Cache.windowskin(KILLED_WINDOW[8]) @status_window.windowskin = RPG::Cache.windowskin(STATUS_WINDOW[6]) if ANIMATION == true case COMMAND_WINDOW[4] when "Up" @command_window.y = 480 + COMMAND_WINDOW[2] when "Down" @command_window.y = -COMMAND_WINDOW[2] when "Left" @command_window.x = 640 + COMMAND_WINDOW[1] when "Right" @command_window.x = -COMMAND_WINDOW[1].to_f end case TIME_WINDOW[4] when "Up" @playtime_window.y = 480 + TIME_WINDOW[2] when "Down" @playtime_window.y = -480 - TIME_WINDOW[2] when "Left" @playtime_window.x = 640 + TIME_WINDOW[1] when "Right" @playtime_window.x = -640 - TIME_WINDOW[1] end case LOCATION_WINDOW[4] when "Up" @location_window.y = 480 + LOCATION_WINDOW[2] when "Down" @location_window.y = -LOCATION_WINDOW[2] when "Left" @location_window.x = 640 + LOCATION_WINDOW[1] when "Right" @location_window.x = -LOCATION_WINDOW[1].to_f end case STEP_WINDOW[4] when "Up" @steps_window.y = 480 + STEP_WINDOW[2] when "Down" @steps_window.y = -480 - STEP_WINDOW[2] when "Left" @steps_window.x = 640 + STEP_WINDOW[1] when "Right" @steps_window.x = -640 - STEP_WINDOW[1] end case GOLD_WINDOW[4] when "Up" @gold_window.y = 480 + GOLD_WINDOW[2] when "Down" @gold_window.y = -480 - GOLD_WINDOW[2] when "Left" @gold_window.x = 640 + GOLD_WINDOW[1] when "Right" @gold_window.x = -640 - GOLD_WINDOW[1] end case STATUS_WINDOW[5] when "Up" @status_window.y = 480 + STATUS_WINDOW[2] when "Down" @status_window.y = -480 - STATUS_WINDOW[2] when "Left" @status_window.x = 640 + STATUS_WINDOW[1] when "Right" @status_window.x = -640 - STATUS_WINDOW[1] end case PROGRESS_WINDOW[4] when "Up" @progress_window.y = 480 + PROGRESS_WINDOW[2] when "Down" @progress_window.y = -480 - PROGRESS_WINDOW[2] when "Left" @progress_window.x = 640 + PROGRESS_WINDOW[1] when "Right" @progress_window.x = -640 - PROGRESS_WINDOW[1] end case KILLED_WINDOW[4] when "Up" @killed_window.y = 480 + KILLED_WINDOW[2] when "Down" @killed_window.y = -480 - KILLED_WINDOW[2] when "Left" @killed_window.x = 640 + KILLED_WINDOW[1] when "Right" @killed_window.x = -640 - KILLED_WINDOW[1] end end Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze dispose end def dispose if BG_MAP == true @spritesetmap.dispose end @command_window.dispose if BG_PICTURE != "" @bg.dispose end @location_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose @status_window.dispose @progress_window.dispose @killed_window.dispose end def delay(seconds) for i in 0...(seconds * 1) sleep 0.01 Graphics.update end end def update windows_update if ANIMATION == true animate_window end if @command_window.active update_command return end if @status_window.active update_status return end end def windows_update @command_window.update @location_window.update @playtime_window.update @steps_window.update @gold_window.update @status_window.update @progress_window.update @killed_window.update end def animate_window case COMMAND_WINDOW[4] when "Up" if @command_window.y > COMMAND_WINDOW[2] @command_window.y -= ((480 + COMMAND_WINDOW[2]) / 10).to_f end if @command_window.y < COMMAND_WINDOW[2] @command_window.y = COMMAND_WINDOW[2] end when "Down" if @command_window.y < COMMAND_WINDOW[2] @command_window.y += (COMMAND_WINDOW[2] / 10).to_f end if @command_window.y > COMMAND_WINDOW[2] @command_window.y = COMMAND_WINDOW[2] end when "Left" if @command_window.x > COMMAND_WINDOW[1] @command_window.x -= ((640 + COMMAND_WINDOW[1]) / 10).to_f end if @command_window.x < COMMAND_WINDOW[1] @command_window.x = COMMAND_WINDOW[1] end when "Right" if @command_window.x < COMMAND_WINDOW[1] @command_window.x += (COMMAND_WINDOW[1] / 10).to_f end if @command_window.x > COMMAND_WINDOW[1] @command_window.x= COMMAND_WINDOW[1] end end case TIME_WINDOW[4] when "Up" if @playtime_window.y > TIME_WINDOW[2] @playtime_window.y -= ((480 + TIME_WINDOW[2]) / 10).to_f end if @playtime_window.y < TIME_WINDOW[2] @playtime_window.y = TIME_WINDOW[2] end when "Down" if @playtime_window.y < TIME_WINDOW[2] @playtime_window.y += ((480 + TIME_WINDOW[2]) / 10).to_f end if @playtime_window.y > TIME_WINDOW[2] @playtime_window.y = TIME_WINDOW[2] end when "Left" if @playtime_window.x > TIME_WINDOW[1] @playtime_window.x -= ((640 + TIME_WINDOW[1]) / 10).to_f end if @playtime_window.x < TIME_WINDOW[1] @playtime_window.x = TIME_WINDOW[1] end when "Right" if @playtime_window.x < TIME_WINDOW[1] @playtime_window.x += ((640 + TIME_WINDOW[1]) / 10).to_f end if @playtime_window.x > TIME_WINDOW[1] @playtime_window.x = TIME_WINDOW[1] end end case LOCATION_WINDOW[4] when "Up" if @location_window.y > LOCATION_WINDOW[2] @location_window.y -= ((480 + LOCATION_WINDOW[2]) / 10).to_f end if @location_window.y < LOCATION_WINDOW[2] @location_window.y = LOCATION_WINDOW[2] end when "Down" if @location_window.y < LOCATION_WINDOW[2] @location_window.y += (LOCATION_WINDOW[2] / 10).to_f end if @location_window.y > LOCATION_WINDOW[2] @location_window.y = LOCATION_WINDOW[2] end when "Left" if @location_window.x > LOCATION_WINDOW[1] @location_window.x -= ((640 + LOCATION_WINDOW[1]) / 10).to_f end if @location_window.x < LOCATION_WINDOW[1] @location_window.x = LOCATION_WINDOW[1] end when "Right" if @location_window.x < LOCATION_WINDOW[1] @location_window.x += (LOCATION_WINDOW[1] / 10).to_f end if @location_window.x > LOCATION_WINDOW[1] @location_window.x= LOCATION_WINDOW[1] end end case STEP_WINDOW[4] when "Up" if @steps_window.y > STEP_WINDOW[2] @steps_window.y -= ((480 + STEP_WINDOW[2]) / 10).to_f end if @steps_window.y < STEP_WINDOW[2] @steps_window.y = STEP_WINDOW[2] end when "Down" if @steps_window.y < STEP_WINDOW[2] @steps_window.y += ((480 + STEP_WINDOW[2]) / 10).to_f end if @steps_window.y > STEP_WINDOW[2] @steps_window.y = STEP_WINDOW[2] end when "Left" if @steps_window.x > STEP_WINDOW[1] @steps_window.x -= ((640 + GOLD_WINDOW[1]) / 10).to_f end if @steps_window.x < STEP_WINDOW[1] @steps_window.x = STEP_WINDOW[1] end when "Right" if @steps_window.x < STEP_WINDOW[1] @steps_window.x += ((640 + STEP_WINDOW[1]) / 10).to_f end if @steps_window.x > STEP_WINDOW[1] @steps_window.x = STEP_WINDOW[1] end end case GOLD_WINDOW[4] when "Up" if @gold_window.y > GOLD_WINDOW[2] @gold_window.y -= ((480 + GOLD_WINDOW[2]) / 10).to_f end if @gold_window.y < GOLD_WINDOW[2] @gold_window.y = GOLD_WINDOW[2] end when "Down" if @gold_window.y < GOLD_WINDOW[2] @gold_window.y += ((480 + GOLD_WINDOW[2]) / 10).to_f end if @gold_window.y > GOLD_WINDOW[2] @gold_window.y = GOLD_WINDOW[2] end when "Left" if @gold_window.x > GOLD_WINDOW[1] @gold_window.x -= ((640 + GOLD_WINDOW[1]) / 10).to_f end if @gold_window.x < GOLD_WINDOW[1] @gold_window.x = GOLD_WINDOW[1] end when "Right" if @gold_window.x < GOLD_WINDOW[1] @gold_window.x += ((640 + GOLD_WINDOW[1]) / 10).to_f end if @gold_window.x > GOLD_WINDOW[1] @gold_window.x = GOLD_WINDOW[1] end end case STATUS_WINDOW[5] when "Up" if @status_window.y > STATUS_WINDOW[2] @status_window.y -= ((480 + STATUS_WINDOW[2]) / 10).to_f end if @status_window.y < STATUS_WINDOW[2] @status_window.y = STATUS_WINDOW[2] end when "Down" if @status_window.y < STATUS_WINDOW[2] @status_window.y += ((480 + STATUS_WINDOW[2]) / 10).to_f end if @status_window.y > STATUS_WINDOW[2] @status_window.y = STATUS_WINDOW[2] end when "Left" if @status_window.x > STATUS_WINDOW[1] @status_window.x -= ((640 + STATUS_WINDOW[1]) / 10).to_f end if @status_window.x < STATUS_WINDOW[1] @status_window.x = STATUS_WINDOW[1] end when "Right" if @status_window.x < STATUS_WINDOW[1] @status_window.x += ((640 + STATUS_WINDOW[1]) / 10).to_f end if @status_window.x > STATUS_WINDOW[1] @status_window.x = STATUS_WINDOW[1] end end case PROGRESS_WINDOW[4] when "Up" if @progress_window.y > PROGRESS_WINDOW[2] @progress_window.y -= ((480 + PROGRESS_WINDOW[2]) / 10).to_f end if @progress_window.y < PROGRESS_WINDOW[2] @progress_window.y = PROGRESS_WINDOW[2] end when "Down" if @progress_window.y < PROGRESS_WINDOW[2] @progress_window.y += ((480 + PROGRESS_WINDOW[2]) / 10).to_f end if @progress_window.y > PROGRESS_WINDOW[2] @progress_window.y = PROGRESS_WINDOW[2] end when "Left" if @progress_window.x > PROGRESS_WINDOW[1] @progress_window.x -= ((640 + PROGRESS_WINDOW[1]) / 10).to_f end if @progress_window.x < PROGRESS_WINDOW[1] @progress_window.x = PROGRESS_WINDOW[1] end when "Right" if @progress_window.x < PROGRESS_WINDOW[1] @progress_window.x += ((640 + PROGRESS_WINDOW[1]) / 10).to_f end if @progress_window.x > PROGRESS_WINDOW[1] @progress_window.x = PROGRESS_WINDOW[1] end end case KILLED_WINDOW[4] when "Up" if @killed_window.y > KILLED_WINDOW[2] @killed_window.y -= ((480 + KILLED_WINDOW[2]) / 10).to_f end if @killed_window.y < KILLED_WINDOW[2] @killed_window.y = KILLED_WINDOW[2] end when "Down" if @killed_window.y < KILLED_WINDOW[2] @killed_window.y += ((480 + KILLED_WINDOW[2]) / 10).to_f end if @killed_window.y > KILLED_WINDOW[2] @killed_window.y = KILLED_WINDOW[2] end when "Left" if @killed_window.x > KILLED_WINDOW[1] @killed_window.x -= ((640 + KILLED_WINDOW[1]) / 10).to_f end if @killed_window.x < KILLED_WINDOW[1] @killed_window.x = KILLED_WINDOW[1] end when "Right" if @killed_window.x < KILLED_WINDOW[1] @killed_window.x += ((640 + KILLED_WINDOW[1]) / 10).to_f end if @killed_window.x > KILLED_WINDOW[1] @killed_window.x = KILLED_WINDOW[1] end end end def delete_window i=0 loop do windows_update case COMMAND_WINDOW[4] when "Up" if @command_window.y < 480 + COMMAND_WINDOW[2] @command_window.y += ((480 + COMMAND_WINDOW[2]) / 10).to_f end when "Down" if @command_window.y > -480 - COMMAND_WINDOW[2] @command_window.y -= ((480 + COMMAND_WINDOW[2]) / 10).to_f end when "Left" if @command_window.x < 640 + COMMAND_WINDOW[1] @command_window.x += ((640 + COMMAND_WINDOW[1]) / 10).to_f end when "Right" if @command_window.x > -640 - COMMAND_WINDOW[1] @command_window.x -= ((640 + COMMAND_WINDOW[1]) / 10).to_f end end case LOCATION_WINDOW[4] when "Up" if @location_window.y < 480 + LOCATION_WINDOW[2] @location_window.y += ((480 + LOCATION_WINDOW[2]) / 10).to_f end when "Down" if @location_window.y > -480 - LOCATION_WINDOW[2] @location_window.y -= ((480 + LOCATION_WINDOW[2]) / 10).to_f end when "Left" if @location_window.x < 640 + LOCATION_WINDOW[1] @location_window.x += ((640 + LOCATION_WINDOW[1]) / 10).to_f end when "Right" if @location_window.x > -640 - LOCATION_WINDOW[1] @location_window.x -= ((640 + LOCATION_WINDOW[1]) / 10).to_f end end case TIME_WINDOW[4] when "Up" if @playtime_window.y < 480 + TIME_WINDOW[2] @playtime_window.y += ((480 + TIME_WINDOW[2]) / 10).to_f end when "Down" if @playtime_window.y > -480 - TIME_WINDOW[2] @playtime_window.y -= ((480 + TIME_WINDOW[2]) / 10).to_f end when "Left" if @playtime_window.x < 640 + TIME_WINDOW[1] @playtime_window.x += ((640 + TIME_WINDOW[1]) / 10).to_f end when "Right" if @playtime_window.x > -640 - TIME_WINDOW[1] @playtime_window.x -= ((640 + TIME_WINDOW[1]) / 10).to_f end end case STEP_WINDOW[4] when "Up" if @steps_window.y < 480 + STEP_WINDOW[2] @steps_window.y += ((480 + STEP_WINDOW[2]) / 10).to_f end when "Down" if @steps_window.y > -480 - STEP_WINDOW[2] @steps_window.y -= ((480 + STEP_WINDOW[2]) / 10).to_f end when "Left" if @steps_window.x < 640 + STEP_WINDOW[1] @steps_window.x += ((640 + STEP_WINDOW[1]) / 10).to_f end when "Right" if @steps_window.x > -640 - STEP_WINDOW[1] @steps_window.x -= ((640 + STEP_WINDOW[1]) / 10).to_f end end case GOLD_WINDOW[4] when "Up" if @gold_window.y < 480 + GOLD_WINDOW[2] @gold_window.y += ((480 + GOLD_WINDOW[2]) / 10).to_f end when "Down" if @gold_window.y > -480 - GOLD_WINDOW[2] @gold_window.y -= ((480 + GOLD_WINDOW[2]) / 10).to_f end when "Left" if @gold_window.x < 640 + GOLD_WINDOW[1] @gold_window.x += ((640 + GOLD_WINDOW[1]) / 10).to_f end when "Right" if @gold_window.x > -640 - GOLD_WINDOW[1] @gold_window.x -= ((640 + GOLD_WINDOW[1]) / 10).to_f end end case STATUS_WINDOW[5] when "Up" if @status_window.y < 480 + STATUS_WINDOW[2] @status_window.y += ((480 + STATUS_WINDOW[2]) / 10).to_f end when "Down" if @status_window.y > -480 - STATUS_WINDOW[2] @status_window.y -= ((480 + STATUS_WINDOW[2]) / 10).to_f end when "Left" if @status_window.x < 640 + STATUS_WINDOW[1] @status_window.x += ((640 + STATUS_WINDOW[1]) / 10).to_f end when "Right" if @status_window.x > -640 - STATUS_WINDOW[1] @status_window.x -= ((640 + STATUS_WINDOW[1]) / 10).to_f end end case PROGRESS_WINDOW[4] when "Up" if @progress_window.y < 480 + PROGRESS_WINDOW[2] @progress_window.y += ((480 + PROGRESS_WINDOW[2]) / 10).to_f end when "Down" if @progress_window.y > -480 - PROGRESS_WINDOW[2] @progress_window.y -= ((480 + PROGRESS_WINDOW[2]) / 10).to_f end when "Left" if @progress_window.x < 640 + PROGRESS_WINDOW[1] @progress_window.x += ((640 + PROGRESS_WINDOW[1]) / 10).to_f end when "Right" if @progress_window.x > -640 - PROGRESS_WINDOW[1] @progress_window.x -= ((640 + PROGRESS_WINDOW[1]) / 10).to_f end end case KILLED_WINDOW[4] when "Up" if @killed_window.y < 480 + KILLED_WINDOW[2] @killed_window.y += ((480 + KILLED_WINDOW[2]) / 10).to_f end when "Down" if @killed_window.y > -480 - KILLED_WINDOW[2] @killed_window.y -= ((480 + KILLED_WINDOW[2]) / 10).to_f end when "Left" if @killed_window.x < 640 + KILLED_WINDOW[1] @killed_window.x += ((640 + KILLED_WINDOW[1]) / 10).to_f end when "Right" if @killed_window.x > -640 - KILLED_WINDOW[1] @killed_window.x -= ((640 + KILLED_WINDOW[1]) / 10).to_f end end delay(1) i += 1 if i == 10 break end end end def update_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) delete_window if ANIMATION $game_system.bgm_restore $scene = Scene_Map.new return end if Input.trigger?(Input::C) if $game_party.actors.size == 0 and @command_window.index < 4 $game_system.se_play($data_system.buzzer_se) return end case @command_window.command when COMMAND_ITEM $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when COMMAND_SKILL $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when COMMAND_EQUIP $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when COMMAND_STATUS $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when COMMAND_SAVE if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when COMMAND_EXIT $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end def update_status if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @status_window.active = false @status_window.index = -1 return end if Input.trigger?(Input::C) case @command_window.command when COMMAND_SKILL if $game_party.actors[@status_window.index].restriction >= 2 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@status_window.index) when COMMAND_EQUIP $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@status_window.index) when COMMAND_STATUS $game_system.se_play($data_system.decision_se) $scene = Scene_Status.new(@status_window.index) end return end end end Screenshot http://img233.imageshack.us/img233/4884/ucm19no9.pngEsempio del menu cosi come è configurato Istruzioni per l'usoAll'interno Edited August 27, 2011 by Flame http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
Djak87 Posted November 7, 2007 Share Posted November 7, 2007 Sembra bello... Sta sera lo provo ed edito... My Video OnLineIl portale dove tutti possono essere degli artisti e da oggi, puoi fare l'upload di video, musica o immagini e gestire un blogNokkioloIl blog adatto a tutti gli amanti dei nokia s60http://img527.imageshack.us/img527/850/user1agn9.png Link to comment Share on other sites More sharing options...
Timisci Posted November 7, 2007 Share Posted November 7, 2007 Davvero un ottimo ed utile lavoro, bravo Sleeping Leonhart :rovatfl: Appena trovo un attimo di tempo lo provo Progetto in corso: "Hero Walking: Toward Another Life" Video Old Intro su Youtube Visite: 11.896! http://img212.imageshack.us/img212/1060/logheryb0.jpg *Posizioni raggiunte nei contest* http://www.rpg2s.net/awards/bestuser1.jpghttp://www.rpg2s.net/awards/beststaff1.jpg http://www.rpg2s.net/awards/bestmaker3.jpghttp://www.rpg2s.net/awards/bestcritical1.jpghttp://www.rpg2s.net/awards/mostcharismatic2.jpg http://www.rpg2s.net/awards/mosthelpful1.jpghttp://www.rpg2s.net/awards/mostpolite1.jpghttp://www.rpg2s.net/awards/mostpresent1.jpg http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img118.imageshack.us/img118/181/sccontest1octdt9.gif http://img230.imageshack.us/img230/1273/sccontest1batio5.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img143.imageshack.us/img143/3755/destroyae4.png http://img141.imageshack.us/img141/3081/comics3od3.gif http://img118.imageshack.us/img118/181/sccontest1octdt9.gif SE VUOI AVERE RENS PER RISORSE, TUTORIAL, DEMO, ECC... LEGGI QUI Link to comment Share on other sites More sharing options...
TNK Posted November 7, 2007 Share Posted November 7, 2007 (edited) Bello. E' uno dei pochi menù che unisce varie ed utili funzionalità (come il kill counter o la barra di completamento del gioco) ad un'ampia personalizzazione. Grande Sleep. :rovatfl: Edit: Provandolo mi sono accorto di una piccola imperfezione: nella finsetra principale del menù tra le statistiche del personaggio manca l'intelligenza... Edited November 8, 2007 by TNK Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted January 23, 2008 Author Share Posted January 23, 2008 In questi giorni stavo rivedendo i miei script vecchi e mi è venuta voglia di modificarne qualcuno, perciò ho aggiornato un po lo script. Ecco le modifiche:- Ho aggiunto le statistiche intelligenza(grazie a TNK per avermelo fatto notare) e evasione nel 2° tipo di window status.- La barra del progresso di gioco si adatta alla dimensione della sua fonestra ed i suoi colori possono essere cambiati.- Il nome della mappa non viene piu tagliato alla fine della finaestra ma viene adattato alla sua dimensione.- L'altezza delle status window 1 e 2 può essere adattata al numero attuale dei membri nel party o al numero massimo dei membri nel party(se è + di 4 esce fuori dallo schermo, ma gia mi è venuta in mente una cosa). Inoltre ho diviso lo script in 3 parti così che per me è un po piu comodo modificarlo, e per voi è più facile da configurare dato che la configurazione è separata dal resto dello script. Sono bene accetti consigli su possibili aggiunte di feature, inoltre in questi giorni inizierò a fare altri script customizzabili come ad esempio il titolo o altri sottomenu. http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
kekkorider Posted February 25, 2008 Share Posted February 25, 2008 Ma non si può modificare il font?ho guardato 3 volte tutto lo script ma niente Bisogno di creare un sito internet?Vai a visitare il White Rabbit ;DScreen contest #23http://rpg2s.net/gif/SCContest3Oct.gifPartecipante al Rpg2s.net Game Contest 2008/2009http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpgGioco in Sviluppo: Restricted : Project 15 Link to comment Share on other sites More sharing options...
Sylaer Posted February 25, 2008 Share Posted February 25, 2008 Per cambiare il font basta che tu scriva dove lo vuoi cambiare:self.contents.font.name = 'NOMEFONT'con NOMEFONT, ovviamente il nome del font tra apici. http://www.rpg2s.net/awards/bestscripter1.jpgSe avete bisogno di modifiche, correzioni o creazioni da zero di script RGSS, allora visitate la mia bottega.La bottega di Sylaer Link to comment Share on other sites More sharing options...
kekkorider Posted February 25, 2008 Share Posted February 25, 2008 io lo volevo vambiare nella status window,perchè è diverso da quello che uso,ma ho provato e mi da errore alla riga dove ho inserito quello che mi hai detto tu,alla riga 346 subito dopo case STATUS_WINDOW[5] l'ho inserito li perchè mi sembrava il posto giusto (lo so sono un niubbo nello script) Bisogno di creare un sito internet?Vai a visitare il White Rabbit ;DScreen contest #23http://rpg2s.net/gif/SCContest3Oct.gifPartecipante al Rpg2s.net Game Contest 2008/2009http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpgGioco in Sviluppo: Restricted : Project 15 Link to comment Share on other sites More sharing options...
Sylaer Posted February 25, 2008 Share Posted February 25, 2008 Non fa perché l'hai messo all'interno di una Scene invece di una finestra.Se guardi bene in cima allo script ci dovrebbe essere scritto questo:class Scene_Menuse metti roba all'interno di questi li metti all'interno di una Scene, in realtà dovresti metterle all'interno di una Window.Cerca le Window all'interno del secondo spoiler si riconoscono perché hanno scritto prima:class Window_QUALCOSA < Window_Baseclass Window_QUALCOSA < Window_Selectabledove QUALCOSA può essere per esempio Status, Playtime o Gold o altri.Comunque prova ad aggiungere quella roba di prima sul font nel metodo initialize della Window_Status1 o Window_Status2 o Window_Status1, insomma prova.Ah, un metodo si riconosce perché è definito dalla parola chiave 'def', ad esempio:def initializeProva e dimmi che succede. http://www.rpg2s.net/awards/bestscripter1.jpgSe avete bisogno di modifiche, correzioni o creazioni da zero di script RGSS, allora visitate la mia bottega.La bottega di Sylaer Link to comment Share on other sites More sharing options...
kekkorider Posted February 26, 2008 Share Posted February 26, 2008 (edited) grazie,adesso non ho tempo e sono riuscito solo a fare una visitina veloce,stasera provo e poi edito il messaggio per dirti com'è andata :smile: EDIT:se per "aggiungere nel metodo" def initialize vuoi dire mettere subito sotto non mi va ancora ho aggiunto questo self.contents.font.name = 'Arial' sotto i def initialize di Window_MenuStatus e Window_MenuStatus3 e non fa niente,mentre sotto Window_MenuStatus2 appena apro il menù mi da errore,boh Edited February 26, 2008 by kekkorider Bisogno di creare un sito internet?Vai a visitare il White Rabbit ;DScreen contest #23http://rpg2s.net/gif/SCContest3Oct.gifPartecipante al Rpg2s.net Game Contest 2008/2009http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpgGioco in Sviluppo: Restricted : Project 15 Link to comment Share on other sites More sharing options...
athreus Posted August 3, 2010 Share Posted August 3, 2010 Mi spiace dover necropostare, ma ho un problema con il face nel menu. Pur creando la cartella Face in Characters e inserendo la figura da mostrare, il programma xontiuna imperterrito a dire di non trovarla. Ho chiamato il face esattamente come nel database è chiamato il PG. Adesso, capisco che potrei essere un idiota io e che sono decisamente nuovo a questo programma, ma vorrei sapere se il problema è risolvibile.Perchè ho seguito le istruzioni per filo e per segno, e non so più cosa fare... Link to comment Share on other sites More sharing options...
MasterSion Posted August 3, 2010 Share Posted August 3, 2010 Deve avere il nome del chara nella cartella chara appunto. http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
athreus Posted August 3, 2010 Share Posted August 3, 2010 Grazie, non l'avevo capito :smile: Link to comment Share on other sites More sharing options...
Lucated94 Posted August 5, 2010 Share Posted August 5, 2010 E' possibile aggiungere altri comandi in questo menù oltre a oggetti,magie ecc..? Nel menù standar il settimo comando mi usciva dalla schermata. Link to comment Share on other sites More sharing options...
tidus26 Posted August 5, 2010 Share Posted August 5, 2010 è possibile rimpicciolire la grandezza della finestra del party? se metto 4 eroi nel party il 4° eroe esce fuori dalla schermata e va a spiaccicarsi nella finestra del luogo. è possibile rimpicciolire?. http://i47.tinypic.com/245zg48.jpgEpic win:A nessuno è mai successo di fare sogni lucidi?Ne faccio solo opachi... =(Progetto in corso: Lands SiegeLands Siege, il destino è nelle tue mani. Se volete vedere un gioco degno del suo nome cliccate sul banner. Il gioco è ancora in via di sviluppo. Collaborazione speciale al progetto Lands Siege:Valentino Avon (Scripter)http://i33.tinypic.com/112fq1l.jpg Storia l l l l l l l l l lGrafica l l l l l l l l l lSonoro l l l l l l l l l lEventi l l l l l l l l l lScript l l l l l l l l l l Completamento gioco l l l l l l l l l l Contesthttp://i52.tinypic.com/2lazfpg.jpg Link to comment Share on other sites More sharing options...
Lucated94 Posted August 5, 2010 Share Posted August 5, 2010 è possibile rimpicciolire la grandezza della finestra del party? se metto 4 eroi nel party il 4° eroe esce fuori dalla schermata e va a spiaccicarsi nella finestra del luogo. è possibile rimpicciolire?.Penso che cambiando dallo script il numero massimo di Personaggi risolvi il problema...Prova a cambiare questa riga da così: STATUS_WINDOW_MAX_PARTY = 3a così: STATUS_WINDOW_MAX_PARTY = 4(e la riga 78 della configurazione) Link to comment Share on other sites More sharing options...
tidus26 Posted August 5, 2010 Share Posted August 5, 2010 già provato, quello serve ad un'altra cosa, non le fà diventare più piccole le finestre, ma dimnuisce il numero visibile del party. http://i47.tinypic.com/245zg48.jpgEpic win:A nessuno è mai successo di fare sogni lucidi?Ne faccio solo opachi... =(Progetto in corso: Lands SiegeLands Siege, il destino è nelle tue mani. Se volete vedere un gioco degno del suo nome cliccate sul banner. Il gioco è ancora in via di sviluppo. Collaborazione speciale al progetto Lands Siege:Valentino Avon (Scripter)http://i33.tinypic.com/112fq1l.jpg Storia l l l l l l l l l lGrafica l l l l l l l l l lSonoro l l l l l l l l l lEventi l l l l l l l l l lScript l l l l l l l l l l Completamento gioco l l l l l l l l l l Contesthttp://i52.tinypic.com/2lazfpg.jpg Link to comment Share on other sites More sharing options...
gianlu Posted December 31, 2010 Share Posted December 31, 2010 ciao bellissimo menu ma oltre ad avere il problema di tidus volevo sapere come togliere il comando salva.. http://mypsn.eu.playstation.com/psn/profile/gianlu9767.png Il mio progetto personale: (Sospeso) http://img833.imageshack.us/img833/3821/progresso.png <-------Clicca sul banner per vedere il mio sitoCercasi personale (anche alle prime armi) possibilmente grafico e storyboarder Link to comment Share on other sites More sharing options...
yugi90 Posted December 31, 2010 Share Posted December 31, 2010 Alla linea 108 basta che cancelli la scritta COMMAND_SAVE. Ho però un problema con questo menu: inserisco i face ma viene messa la scritta del nome, del livello e dell'esperienza sopra di essi, come risolvo il problema? All'inizio li ho messi in formato 96x96 pixel, poi ho provato a ridurli a 64x64 e in questo modo la scritta del nome si vede, ma continuano a vedersi le scritte di esp e livello, qualcuno sa come risolvere questo problema?Grazie in anticipo! PROGETTI COMPLETATI: Arenthal, The Curse of ObliviaLink al gioco: https://www.rpg2s.net/forum/index.php/topic/22935-full-arenthal-the-curse-of-oblivia/ Scroll of MagishaLink al gioco: Scroll of Magisha - Release MV - Rpg²S Forum (rpg2s.net) The Last TelethLink al gioco: The Last Teleth by Hyuugis (itch.io) PROGETTO IN CORSO: Blaze of Ire Demo disponibile!https://www.rpg2s.net/forum/index.php/topic/22828-blaze-of-ire/page-1 "Il cammino dell'uomo timorato è minacciato da ogni parte dalle iniquità degli esseri egoisti e dalla tirannia degli uomini malvagi. Benedetto sia colui che nl nome della carità e della buona volontà conduce i deboli attraverso la valle delle tenebre, perchè egli è in verità il pastore di suo fratello e il ricercatore dei figli smarriti e la mia giustizia calerà sopra di loro con grandissima vendetta e furiosissimo sdegno su coloro che si proveranno ad ammorbare e infine a distruggere i miei fratelli. E tu saprai che il mio nome è quello del Signore, quando farò calare la mia vendetta sopra di te!" http://img717.imageshack.us/img717/9554/thewatchingportablegif1.gif Link to comment Share on other sites More sharing options...
Squall_Leonheart Posted December 31, 2010 Share Posted December 31, 2010 (edited) Le vuoi togliere o semplicemente spostarle?Ah scrivi anche le righe che hai modificato per inserire il face..Probabilmente hai utilizzato il draw_face in maniera sbagiata Edited December 31, 2010 by Squall_Leonheart Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
yugi90 Posted January 1, 2011 Share Posted January 1, 2011 Se metto i face in formato 64x64 continuano a vedersi le scritte di esperienza e livello sopra il face, ciò che vorrei sapere è se si possono spostare i face o no. PROGETTI COMPLETATI: Arenthal, The Curse of ObliviaLink al gioco: https://www.rpg2s.net/forum/index.php/topic/22935-full-arenthal-the-curse-of-oblivia/ Scroll of MagishaLink al gioco: Scroll of Magisha - Release MV - Rpg²S Forum (rpg2s.net) The Last TelethLink al gioco: The Last Teleth by Hyuugis (itch.io) PROGETTO IN CORSO: Blaze of Ire Demo disponibile!https://www.rpg2s.net/forum/index.php/topic/22828-blaze-of-ire/page-1 "Il cammino dell'uomo timorato è minacciato da ogni parte dalle iniquità degli esseri egoisti e dalla tirannia degli uomini malvagi. Benedetto sia colui che nl nome della carità e della buona volontà conduce i deboli attraverso la valle delle tenebre, perchè egli è in verità il pastore di suo fratello e il ricercatore dei figli smarriti e la mia giustizia calerà sopra di loro con grandissima vendetta e furiosissimo sdegno su coloro che si proveranno ad ammorbare e infine a distruggere i miei fratelli. E tu saprai che il mio nome è quello del Signore, quando farò calare la mia vendetta sopra di te!" http://img717.imageshack.us/img717/9554/thewatchingportablegif1.gif Link to comment Share on other sites More sharing options...
Squall_Leonheart Posted January 2, 2011 Share Posted January 2, 2011 Cerca questa riga draw_actor_face(actor, x-20, y + 80) Modifica i numeri vicino x e y per ottenere le coordinate che desideri. Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
yugi90 Posted January 2, 2011 Share Posted January 2, 2011 Purtroppo non conosco bene come sono impostate le ccordinate dello schermo, perciò se qualcuno lo sa potrebbe per favore postare uno screen in cui si vede un face disposto bene e postare anche le coordinate che bisogna mettere per rendere lo screen così? altrimenti cercherò di arrangiarmi da solo, grazie a tutti in anticipo cmunque. PROGETTI COMPLETATI: Arenthal, The Curse of ObliviaLink al gioco: https://www.rpg2s.net/forum/index.php/topic/22935-full-arenthal-the-curse-of-oblivia/ Scroll of MagishaLink al gioco: Scroll of Magisha - Release MV - Rpg²S Forum (rpg2s.net) The Last TelethLink al gioco: The Last Teleth by Hyuugis (itch.io) PROGETTO IN CORSO: Blaze of Ire Demo disponibile!https://www.rpg2s.net/forum/index.php/topic/22828-blaze-of-ire/page-1 "Il cammino dell'uomo timorato è minacciato da ogni parte dalle iniquità degli esseri egoisti e dalla tirannia degli uomini malvagi. Benedetto sia colui che nl nome della carità e della buona volontà conduce i deboli attraverso la valle delle tenebre, perchè egli è in verità il pastore di suo fratello e il ricercatore dei figli smarriti e la mia giustizia calerà sopra di loro con grandissima vendetta e furiosissimo sdegno su coloro che si proveranno ad ammorbare e infine a distruggere i miei fratelli. E tu saprai che il mio nome è quello del Signore, quando farò calare la mia vendetta sopra di te!" http://img717.imageshack.us/img717/9554/thewatchingportablegif1.gif Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted January 2, 2011 Author Share Posted January 2, 2011 Dipende la Window_Status che sta usando, comunque come ti ha suggerito Squall_Leonheart devi modificare il draw_actor_faceti consiglio una cosa del tipo draw_actor_face(actor, x - 32, y + 80)Fai esperimenti con quel 32 e quello 80 finchè non trovi la combinazione che più ti aggrada. http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
yugi90 Posted January 2, 2011 Share Posted January 2, 2011 Ho provato a sostituire, ma mi rimaneva sempre uguale, come faccio? Per caso c'entrano anche le righe dopo in cui c'è scritto draw_actor_exp, draw_actor_level, draw_actor_class, ecc.? PROGETTI COMPLETATI: Arenthal, The Curse of ObliviaLink al gioco: https://www.rpg2s.net/forum/index.php/topic/22935-full-arenthal-the-curse-of-oblivia/ Scroll of MagishaLink al gioco: Scroll of Magisha - Release MV - Rpg²S Forum (rpg2s.net) The Last TelethLink al gioco: The Last Teleth by Hyuugis (itch.io) PROGETTO IN CORSO: Blaze of Ire Demo disponibile!https://www.rpg2s.net/forum/index.php/topic/22828-blaze-of-ire/page-1 "Il cammino dell'uomo timorato è minacciato da ogni parte dalle iniquità degli esseri egoisti e dalla tirannia degli uomini malvagi. Benedetto sia colui che nl nome della carità e della buona volontà conduce i deboli attraverso la valle delle tenebre, perchè egli è in verità il pastore di suo fratello e il ricercatore dei figli smarriti e la mia giustizia calerà sopra di loro con grandissima vendetta e furiosissimo sdegno su coloro che si proveranno ad ammorbare e infine a distruggere i miei fratelli. E tu saprai che il mio nome è quello del Signore, quando farò calare la mia vendetta sopra di te!" http://img717.imageshack.us/img717/9554/thewatchingportablegif1.gif Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now