Guest gino Posted February 24, 2011 Share Posted February 24, 2011 Il protagonista a cui puoi cambiare il nome in quale posizione sta nel database? Link to comment Share on other sites More sharing options...
Guardian of Irael Posted February 24, 2011 Share Posted February 24, 2011 Ops scusa avevo visto solo la prima parte del messaggio XD2. mmmh (Mo che mi fallisce in basi di dati! XD) non so il comando preciso, ma potresti risolvere sapendo appunto come invece del nome richiamare l'associazione tramite l'ID del database.^ ^(Per quale strano motivo non lo mette sotto spoil?)Se lo script in code è troppo lungo lo spoiler non funziona ;____ ;3. ^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
Roxas94 Posted February 24, 2011 Author Share Posted February 24, 2011 Ovviamente è il primo! ^^Nel database ha ID 1 infatti per richiamare il nome nel gioco uso \N[1] ma come vi ho detto nel menù c'è il face ... PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted February 24, 2011 Share Posted February 24, 2011 (edited) Ovviamente è il primo! ^^Nel database ha ID 1 infatti per richiamare il nome nel gioco uso \N[1] ma come vi ho detto nel menù c'è il face ... Mi serviva saperlo perché praticamente dovrebbe bastare una piccola modifica nello script per risolvere il problema. Dovrei riuscire a farcela stasera stessa. EDIT: Sostituisci con il codice qui sotto e per l'eroe sarà sufficiente che crei un file chiamato "Hero_fc". Il problema dovrebbe sparire. ## ATTENZIONE IL SEGUENTE SCRIPT NON È L'ORIGINALE MA È UNA VERSIONE LIEVEMENTE# MODIFICATA. NON USARE SE NON SIETE SICURI DI COME FUNZIONA!# ## WARNING! THIS AIN'T THE ORIGINAL SCRIPT, BUT A MODIFIED VERSION. IF YOU AIN'T# SURE 'BOUT HOW IT WORKS DON'T USE IT!# #_________________________________________________# MOG_SceneMenu Itigo V1.0 #_________________________________________________# By Moghunter #_________________________________________________# Menu com movimento e layout de pictures.# Para nomear as imagens das faces dos personagens# nomeie com o nome do personagem + o sufixo _FC# Exemplo -> Ashe_Fc.png#_________________________________________________module MOG#Tempo de transição ao ativar o menu. MNTT = 30#Tipo de transição ao ativar o menu.MNTP = "006-Stripe02"#Tempo de transição ao desativar o menu. MNTT2 = 20#Tipo de transição ao desativar o menu.MNTP2 = "005-Stripe01"end ############### Game_Actor ###############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 ################ Window_Base ################class Window_Base < Window def drw_face(actor,x,y,ID) if ID == 0 then face = RPG::Cache.picture("Hero_fc") else face = RPG::Cache.picture(actor.name + "_fc") end cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end def draw_maphp3(actor, x, y) back = RPG::Cache.picture("BAR0") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = RPG::Cache.picture("HP_Bar") cw = meter.width * actor.hp / actor.maxhp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = RPG::Cache.picture("HP_Tx") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2) end def draw_mapsp3(actor, x, y) back = RPG::Cache.picture("BAR0") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = RPG::Cache.picture("SP_Bar") cw = meter.width * actor.sp / actor.maxsp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = RPG::Cache.picture("SP_Tx") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2) end def draw_mexp2(actor, x, y) bitmap2 = RPG::Cache.picture("Exp_Back") cw = bitmap2.width ch = bitmap2.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect) rate = actor.now_exp.to_f / actor.next_exp bitmap = RPG::Cache.picture("Exp_Meter") if actor.level < 99 cw = bitmap.width * rate else cw = bitmap.width end ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect) exp_tx = RPG::Cache.picture("Exp_tx") cw = exp_tx.width ch = exp_tx.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 55 , y - ch + 30, exp_tx, src_rect) lv_tx = RPG::Cache.picture("LV_tx") cw = lv_tx.width ch = lv_tx.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 125 , y - ch + 35, lv_tx, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 161, y + 7, 24, 32, actor.level.to_s, 1) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 160, y + 6, 24, 32, actor.level.to_s, 1) end def draw_actor_state2(actor, x, y, width = 120) text = make_battler_state_text(actor, width, true) self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color self.contents.draw_text(x, y, width, 32, text,1) end end ####################### Window_MenuStatus2 #######################class Window_MenuStatus2 < Window_Selectable def initialize super(0, 0, 415, 280) self.contents = Bitmap.new(width - 32, height - 32) refresh self.active = false self.opacity = 0 self.index = -1 end def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 20 y = i * 62 actor = $game_party.actors[i] self.contents.font.name = "Kristen ITC" drw_face(actor,x,y + 50,i) draw_maphp3(actor,x + 40, y - 5) draw_mapsp3(actor,x + 40, y + 20 ) draw_mexp2(actor,x + 140, y + 15 ) draw_actor_state2(actor ,x + 220, y - 5) end end def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(5, @index * 62, self.width - 32, 50) end end end ################# Window_Gold2 #################class Window_Gold2 < Window_Base def initialize super(0, 0, 160, 64) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = system_color self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2) endend ##################### Window_PlayTime2 #####################class Window_PlayTime2 < Window_Base def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear @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, 32, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end ################## Window_Steps2 ##################class Window_Steps2 < Window_Base def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2) end end ############### Scene_Menu ###############class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index end def main s1 = "" s2 = "" s3 = "" s4 = "" s5 = "" s6 = "" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index if $game_party.actors.size == 0 @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end @command_window.visible = false @command_window.x = -640 @mnlay = Sprite.new @mnlay.bitmap = RPG::Cache.picture("Mn_lay") @mnlay.z = 10 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture("Mn_back") @mnback.blend_type = 0 @mnback.z = 5 @mnback2 = Plane.new @mnback2.bitmap = RPG::Cache.picture("Mn_back") @mnback2.blend_type = 0 @mnback2.z = 5 @mnback2.opacity = 60 @mnsel = Sprite.new @mnsel.bitmap = RPG::Cache.picture("Mn_Sel") @mnsel.z = 20 @mnsel.x = 0 @mnsel.y = 110 @mnop = 150 if $game_system.save_disabled @command_window.disable_item(4) end @playtime_window = Window_PlayTime2.new @playtime_window.x = -45 @playtime_window.y = 405 @playtime_window.opacity = 0 @playtime_window.z = 15 @steps_window = Window_Steps2.new @steps_window.x = 1500 @steps_window.y = 1500 @steps_window.opacity = 0 @steps_window.z = 15 @gold_window = Window_Gold2.new @gold_window.x = -45 @gold_window.y = 384 @gold_window.opacity = 0 @gold_window.z = 15 @status_window = Window_MenuStatus2.new @status_window.x = 195 @status_window.y = 110 @status_window.opacity = 0 @status_window.z = 15 Graphics.transition(MOG::MNTT, "Graphics/Transitions/" + MOG::MNTP) loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose @status_window.dispose @mnlay.dispose @mnback.dispose @mnback2.dispose @mnsel.dispose Graphics.transition(MOG::MNTT2, "Graphics/Transitions/" + MOG::MNTP2) Graphics.update end def update @command_window.update @playtime_window.update @steps_window.update @gold_window.update @status_window.update @mnback.oy += 1 @mnback.ox += 1 @mnback2.oy += 1 @mnback2.ox -= 1 @mnop += 5 if @command_window.active == true @mnsel.bitmap = RPG::Cache.picture("Mn_Sel") else @mnsel.bitmap = RPG::Cache.picture("Mn_Sel_off") @mnsel.zoom_x = 1 @mnsel.opacity = 255 end if @mnop >= 255 @mnop = 120 end if @command_window.active update_command return end if @status_window.active update_status return end end def update_command if @mnsel.zoom_x <= 1.6 @mnsel.zoom_x += 0.03 @mnsel.opacity -= 10 elsif @mnsel.zoom_x > 1.6 @mnsel.zoom_x = 1.0 @mnsel.opacity = 255 end case @command_window.index when 0 @mnsel.x = 0 @mnsel.y = 110 when 1 @mnsel.x = 0 @mnsel.y = 155 when 2 @mnsel.x = 0 @mnsel.y = 197 when 3 @mnsel.x = 0 @mnsel.y = 242 when 4 @mnsel.x = 0 @mnsel.y = 285 when 5 @mnsel.x = 0 @mnsel.y = 325 end if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) if $game_party.actors.size == 0 and @command_window.index < 4 $game_system.se_play($data_system.buzzer_se) return end case @command_window.index when 0 $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when 5 $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end def update_status if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @status_window.active = false @status_window.index = -1 return end if Input.trigger?(Input::C) case @command_window.index when 1 if $game_party.actors[@status_window.index].restriction >= 2 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@status_window.index) when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@status_window.index) when 3 $game_system.se_play($data_system.decision_se) $scene = Scene_Status.new(@status_window.index) end return end end end Perché il tag spoiler non funziona più? Edited February 24, 2011 by gino Link to comment Share on other sites More sharing options...
Roxas94 Posted February 25, 2011 Author Share Posted February 25, 2011 (edited) Grazie mille gino, quindi mi basta chiamare l'immagine Hero e non importa il nome che si sceglie pe ril pg. Se funziona sei un mito! Provo subito! Nel caso funzionasse (non ne dubito) si può usare la stessa modifica nello script per il salvataggio perchè in quello (come in stile KH) cambia il face del pg in base a chi sei? EDIT: uff, purtroppo dice syntax error alla riga 52, credo sia per via dell'aggiunta di "ID" Edited February 25, 2011 by Roxas94 PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted February 25, 2011 Share Posted February 25, 2011 (edited) Grazie mille gino, quindi mi basta chiamare l'immagine Hero e non importa il nome che si sceglie pe ril pg. Se funziona sei un mito! Provo subito! Nel caso funzionasse (non ne dubito) si può usare la stessa modifica nello script per il salvataggio perchè in quello (come in stile KH) cambia il face del pg in base a chi sei? EDIT: uff, purtroppo dice syntax error alla riga 52, credo sia per via dell'aggiunta di "ID" Nel mio codice la riga 52 è:class Window_Base < Window Non vedo come possa esserci errore visto che questa riga non l'ho toccata per niente! :P EDIT: Uff, piccolo errore. Ho scritto ID maiuscolo e ruby non ha apprezzato. Dovrei riuscire ad applicare una modifica simile anche allo script per il salvataggio, basta che mi fai avere il codice. ## ATTENZIONE IL SEGUENTE SCRIPT NON È L'ORIGINALE MA È UNA VERSIONE LIEVEMENTE# MODIFICATA. NON USARE SE NON SIETE SICURI DI COME FUNZIONA!# ## WARNING! THIS AIN'T THE ORIGINAL SCRIPT, BUT A MODIFIED VERSION. IF YOU AIN'T# SURE 'BOUT HOW IT WORKS DON'T USE IT!# #_________________________________________________# MOG_SceneMenu Itigo V1.0 #_________________________________________________# By Moghunter #_________________________________________________# Menu com movimento e layout de pictures.# Para nomear as imagens das faces dos personagens# nomeie com o nome do personagem + o sufixo _FC# Exemplo -> Ashe_Fc.png#_________________________________________________module MOG#Tempo de transição ao ativar o menu. MNTT = 30#Tipo de transição ao ativar o menu.MNTP = "006-Stripe02"#Tempo de transição ao desativar o menu. MNTT2 = 20#Tipo de transição ao desativar o menu.MNTP2 = "005-Stripe01"end ############### Game_Actor ###############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 ################ Window_Base ################class Window_Base < Window def drw_face(actor,x,y,id) if id == 0 then face = RPG::Cache.picture("Hero_fc") else face = RPG::Cache.picture(actor.name + "_fc") end cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end def draw_maphp3(actor, x, y) back = RPG::Cache.picture("BAR0") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = RPG::Cache.picture("HP_Bar") cw = meter.width * actor.hp / actor.maxhp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = RPG::Cache.picture("HP_Tx") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2) end def draw_mapsp3(actor, x, y) back = RPG::Cache.picture("BAR0") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = RPG::Cache.picture("SP_Bar") cw = meter.width * actor.sp / actor.maxsp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = RPG::Cache.picture("SP_Tx") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2) end def draw_mexp2(actor, x, y) bitmap2 = RPG::Cache.picture("Exp_Back") cw = bitmap2.width ch = bitmap2.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect) rate = actor.now_exp.to_f / actor.next_exp bitmap = RPG::Cache.picture("Exp_Meter") if actor.level < 99 cw = bitmap.width * rate else cw = bitmap.width end ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect) exp_tx = RPG::Cache.picture("Exp_tx") cw = exp_tx.width ch = exp_tx.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 55 , y - ch + 30, exp_tx, src_rect) lv_tx = RPG::Cache.picture("LV_tx") cw = lv_tx.width ch = lv_tx.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 125 , y - ch + 35, lv_tx, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 161, y + 7, 24, 32, actor.level.to_s, 1) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 160, y + 6, 24, 32, actor.level.to_s, 1) end def draw_actor_state2(actor, x, y, width = 120) text = make_battler_state_text(actor, width, true) self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color self.contents.draw_text(x, y, width, 32, text,1) end end ####################### Window_MenuStatus2 #######################class Window_MenuStatus2 < Window_Selectable def initialize super(0, 0, 415, 280) self.contents = Bitmap.new(width - 32, height - 32) refresh self.active = false self.opacity = 0 self.index = -1 end def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 20 y = i * 62 actor = $game_party.actors[i] self.contents.font.name = "Kristen ITC" drw_face(actor,x,y + 50,i) draw_maphp3(actor,x + 40, y - 5) draw_mapsp3(actor,x + 40, y + 20 ) draw_mexp2(actor,x + 140, y + 15 ) draw_actor_state2(actor ,x + 220, y - 5) end end def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(5, @index * 62, self.width - 32, 50) end end end ################# Window_Gold2 #################class Window_Gold2 < Window_Base def initialize super(0, 0, 160, 64) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = system_color self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2) endend ##################### Window_PlayTime2 #####################class Window_PlayTime2 < Window_Base def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear @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, 32, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end ################## Window_Steps2 ##################class Window_Steps2 < Window_Base def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2) end end ############### Scene_Menu ###############class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index end def main s1 = "" s2 = "" s3 = "" s4 = "" s5 = "" s6 = "" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index if $game_party.actors.size == 0 @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end @command_window.visible = false @command_window.x = -640 @mnlay = Sprite.new @mnlay.bitmap = RPG::Cache.picture("Mn_lay") @mnlay.z = 10 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture("Mn_back") @mnback.blend_type = 0 @mnback.z = 5 @mnback2 = Plane.new @mnback2.bitmap = RPG::Cache.picture("Mn_back") @mnback2.blend_type = 0 @mnback2.z = 5 @mnback2.opacity = 60 @mnsel = Sprite.new @mnsel.bitmap = RPG::Cache.picture("Mn_Sel") @mnsel.z = 20 @mnsel.x = 0 @mnsel.y = 110 @mnop = 150 if $game_system.save_disabled @command_window.disable_item(4) end @playtime_window = Window_PlayTime2.new @playtime_window.x = -45 @playtime_window.y = 405 @playtime_window.opacity = 0 @playtime_window.z = 15 @steps_window = Window_Steps2.new @steps_window.x = 1500 @steps_window.y = 1500 @steps_window.opacity = 0 @steps_window.z = 15 @gold_window = Window_Gold2.new @gold_window.x = -45 @gold_window.y = 384 @gold_window.opacity = 0 @gold_window.z = 15 @status_window = Window_MenuStatus2.new @status_window.x = 195 @status_window.y = 110 @status_window.opacity = 0 @status_window.z = 15 Graphics.transition(MOG::MNTT, "Graphics/Transitions/" + MOG::MNTP) loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose @status_window.dispose @mnlay.dispose @mnback.dispose @mnback2.dispose @mnsel.dispose Graphics.transition(MOG::MNTT2, "Graphics/Transitions/" + MOG::MNTP2) Graphics.update end def update @command_window.update @playtime_window.update @steps_window.update @gold_window.update @status_window.update @mnback.oy += 1 @mnback.ox += 1 @mnback2.oy += 1 @mnback2.ox -= 1 @mnop += 5 if @command_window.active == true @mnsel.bitmap = RPG::Cache.picture("Mn_Sel") else @mnsel.bitmap = RPG::Cache.picture("Mn_Sel_off") @mnsel.zoom_x = 1 @mnsel.opacity = 255 end if @mnop >= 255 @mnop = 120 end if @command_window.active update_command return end if @status_window.active update_status return end end def update_command if @mnsel.zoom_x <= 1.6 @mnsel.zoom_x += 0.03 @mnsel.opacity -= 10 elsif @mnsel.zoom_x > 1.6 @mnsel.zoom_x = 1.0 @mnsel.opacity = 255 end case @command_window.index when 0 @mnsel.x = 0 @mnsel.y = 110 when 1 @mnsel.x = 0 @mnsel.y = 155 when 2 @mnsel.x = 0 @mnsel.y = 197 when 3 @mnsel.x = 0 @mnsel.y = 242 when 4 @mnsel.x = 0 @mnsel.y = 285 when 5 @mnsel.x = 0 @mnsel.y = 325 end if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) if $game_party.actors.size == 0 and @command_window.index < 4 $game_system.se_play($data_system.buzzer_se) return end case @command_window.index when 0 $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when 5 $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end def update_status if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @status_window.active = false @status_window.index = -1 return end if Input.trigger?(Input::C) case @command_window.index when 1 if $game_party.actors[@status_window.index].restriction >= 2 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@status_window.index) when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@status_window.index) when 3 $game_system.se_play($data_system.decision_se) $scene = Scene_Status.new(@status_window.index) end return end end end Edited February 25, 2011 by gino Link to comment Share on other sites More sharing options...
Roxas94 Posted February 25, 2011 Author Share Posted February 25, 2011 (edited) Ok, grazie, adesso funziona tutto alla perfezione!Beh, se vuoi essere così gentile da fare lo stesso questo è lo script del salvataggio (qui l'immagine del face si chiama Nome_Fl):#==============================================================================# ORIGINAL# ** MOG Scene File Ayumi V1.2# By Moghunter #------------------------------------------------------------------------------# NEW# *KH SAVE by Zexion/Linkyboy15#============================================================================== module MOG # BASIC MENU CONFIGURATION # File Graphics Used FILE_LAYOUT = "Layout-File" # File Menu Graphics FILE_BACKGROUND = "Back-Other" # Animated background graphic FILE_STATUS = "Status-File" # File Window Graphic FACE_LARGE = "_Fl" # Suffix for large face graphics Map_end = "_mgfx" # Suffix for map graphics # File Effects FILE_MOVE_FX = false # If savefile moves side-to-side FILE_OPACITY_FX = false # If savefile changes opacity # Menu FILE_FX = 0 # Back FX (0=Moving/ 1=Still/ 2=Map) FILE_TRAN_TIME = 10 # Transition Time FILE_TRAN_TYPE = "013-Square01" # Transition Type (Name) # Font Used FILE_FONT = "Kristen ITC" # Font used in file menu end # Mogscript global$mogscript = {} if $mogscript == nil$mogscript["menu_ayumi"] = true #==============================================================================# ** Game_Map#------------------------------------------------------------------------------# This class handles the map. It includes scrolling and passable determining# functions. Refer to "$game_map" for the instance of this class.#============================================================================== class Game_Map #-------------------------------------------------------------------------- # * Get Map Name #-------------------------------------------------------------------------- def map_name @mapinfo = load_data("Data/MapInfos.rxdata") if @mapinfo == nil return @mapinfo[@map_id].name endend #==============================================================================# ** Window_Base#------------------------------------------------------------------------------# This class is for all in-game windows.#============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # * Draw File Window # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def drw_win_file(x, y) dwf = RPG::Cache.picture(MOG::FILE_STATUS) cw = dwf.width ch = dwf.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, dwf, src_rect) end #-------------------------------------------------------------------------- # * Draw Empty Face #-------------------------------------------------------------------------- def nada face = RPG::Cache.picture("") end #-------------------------------------------------------------------------- # * Draw Face #3 (Larger face) # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_heroface3(actor, x, y) face = RPG::Cache.picture(actor.name + MOG::FACE_LARGE) rescue nada cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end def draw_map3(actor, x, y) face = RPG::Cache.picture(actor.map_name + MOG::Map_end) rescue nada cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end #-------------------------------------------------------------------------- # * Draw Actor Level #6 # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_level6(actor, x, y) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv") self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 17, y + 1, 24, 32, actor.level.to_s, 2) end #-------------------------------------------------------------------------- # * Draw Actor Name #6 # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_name6(actor, x, y) self.contents.font.color = Color.new(0, 0, 0, 255) self.contents.draw_text(x + 1, y + 1, 100, 32, actor.name, 1) self.contents.font.color = normal_color self.contents.draw_text(x, y, 100, 32, actor.name, 1)end #-------------------------------------------------------------------------- # * Draw Actor Gold # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_gold(x, y) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 1, y + 1, 80, 32, $data_system.words.gold) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 70, y + 1, 80, 32, @game_party.gold.to_s) endend #==============================================================================# ** Window_SaveFile#------------------------------------------------------------------------------# This window displays save files on the save and load screens.#============================================================================== class Window_SaveFile < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # file_index : save file index (0-3) # filename : file name #-------------------------------------------------------------------------- def initialize(file_index, filename) super(0, 64 + file_index * 138, 640, 240) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 @file_index = file_index @filename = "Save#{@file_index + 1}.rxdata" @time_stamp = Time.at(0) @file_exist = FileTest.exist?(@filename) if @file_exist file = File.open(@filename, "r") @time_stamp = file.mtime @characters = Marshal.load(file) @frame_count = Marshal.load(file) @game_system = Marshal.load(file) @game_switches = Marshal.load(file) @game_variables = Marshal.load(file) @game_self_switches = Marshal.load(file) @game_screen = Marshal.load(file) @game_actors = Marshal.load(file) @game_party = Marshal.load(file) @game_troop = Marshal.load(file) @game_map = Marshal.load(file) @total_sec = @frame_count / Graphics.frame_rate file.close end @wiref = 0 refresh @selected = false end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.name = MOG::FILE_FONT drw_win_file(0,190) name = "#{@file_index + 1}" self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(44, 61, 600, 72, name) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(43, 60, 600, 72, name) @name_width = contents.text_size(name).width if @file_exist for i in 0...@characters.size x = 116 actors = @game_party.actors for i in 0...[actors.size, 4].min x = i * 60 actor = actors[i] self.contents.font.size = 20 draw_actor_level6(actor, 250, 60) draw_gold(310,60) actor = actors[0] map = @game_map draw_heroface3(actor,404,142) draw_map3(map,100,130) self.contents.font.size = 22 end end hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 time_string = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(5, 55, 550, 32, time_string, 2) self.contents.draw_text(5 , 35, 368 , 167, @game_map.map_name.to_s, 2) end end #-------------------------------------------------------------------------- # * Set Selected # selected : new selected (true = selected, false = unselected) #-------------------------------------------------------------------------- def selected=(selected) @selected = selected endend #==============================================================================# ** Scene_Save#------------------------------------------------------------------------------# This class performs save screen processing.#============================================================================== class Scene_Save < Scene_File #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias mog_init initialize def initialize mog_init $mog_scene_filesave_flag = 1 endend #==============================================================================# ** Scene_File#------------------------------------------------------------------------------# This is a superclass for the save screen and load screen.#============================================================================== class Scene_File #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main if $mog_scene_filesave_flag != 1 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 else if MOG::FILE_FX == 0 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 elsif MOG::FILE_FX == 1 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 else @spriteset = Spriteset_Map.new end end @mnlay = Sprite.new @mnlay.bitmap = RPG::Cache.picture(MOG::FILE_LAYOUT) @mnlay.z = 2 @help_window = Window_Help.new @help_window.set_text(@help_text) @help_window.opacity = 0 @savefile_windows = [] @cursor_displace = 0 for i in 0..2 @savefile_windows.push(Window_SaveFile.new(i, make_filename(i))) end @savefile_windows[0] @file_index = $game_temp.last_file_index @savefile_windows[@file_index].selected = true @savefile_windows[0].y = 40 @savefile_windows[1].y = 140 @savefile_windows[2].y = 240 @win_move_time = 0 @win_move = 0 @win_dire = 0 @win_opac = 255 @win1_y = 0 @win2_y = 0 @win3_y = 0 unless MOG::FILE_FX == 2 Graphics.transition(MOG::FILE_TRAN_TIME, "Graphics/Transitions/" + MOG::FILE_TRAN_TYPE) else Graphics.transition end loop do Graphics.update Input.update update if $scene != self break end end for i in 0..50 @mnback.ox += 1 if MOG::FILE_FX == 0 @savefile_windows[0].x += 10 @savefile_windows[1].x -= 10 @savefile_windows[2].x += 10 for i in @savefile_windows i.contents_opacity -= 5 end Graphics.update end Graphics.freeze @help_window.dispose @mnback.dispose if MOG::FILE_FX == 0 @mnback.dispose if MOG::FILE_FX == 1 @mnback.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag != 1 @spriteset.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag == 1 $mog_scene_filesave_flag = 0 @mnlay.dispose for i in @savefile_windows ; i.dispose ; end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @mnback.ox += 1 if MOG::FILE_FX == 0 if MOG::FILE_OPACITY_FX @win_opac += 3 @win_opac = 150 if @win_opac > 254 else @win_opac = 255 end @win_move_time += 1 if @win_move_time > 60 @win_dire += 1 @win_move_time = 0 end @win_dire = 0 if @win_dire > 1 if @win_dire == 0 @win_move += 1 else @win_move -= 1 end # Update File Windows update_window_z update_moving_window if MOG::FILE_MOVE_FX update_window_opacity @help_window.update for i in @savefile_windows ; i.update ; end if Input.trigger?(Input::C) on_decision(make_filename(@file_index)) $game_temp.last_file_index = @file_index return end if Input.trigger?(Input::B) on_cancel return end if Input.repeat?(Input::DOWN) if Input.trigger?(Input::DOWN) or @file_index < 3 $game_system.se_play($data_system.cursor_se) @savefile_windows[@file_index].selected = false @file_index = (@file_index + 1) % 3 @savefile_windows[@file_index].selected = true return end end if Input.repeat?(Input::UP) if Input.trigger?(Input::UP) or @file_index > 0 $game_system.se_play($data_system.cursor_se) @savefile_windows[@file_index].selected = false @file_index = (@file_index - 1) % 3 @savefile_windows[@file_index].selected = true return end end end #-------------------------------------------------------------------------- # * Frame Update (Reposition File Window) #-------------------------------------------------------------------------- def update_window_z if @file_index == 0 @savefile_windows[0].z = 2 @savefile_windows[1].z = 1 @savefile_windows[2].z = 0 elsif @file_index == 1 @savefile_windows[0].z = 1 @savefile_windows[1].z = 2 @savefile_windows[2].z = 1 else @savefile_windows[0].z = 0 @savefile_windows[1].z = 1 @savefile_windows[2].z = 2 end end #-------------------------------------------------------------------------- # * Frame Update (Moving File Window) #-------------------------------------------------------------------------- def update_moving_window if @file_index == 0 @savefile_windows[0].x = @win_move @savefile_windows[1].x = 0 @savefile_windows[1].x = 0 @savefile_windows[2].x = 0 elsif @file_index == 1 @savefile_windows[0].x = 0 @savefile_windows[1].x = @win_move @savefile_windows[2].x = 0 else @savefile_windows[0].x = 0 @savefile_windows[1].x = 0 @savefile_windows[2].x = @win_move end end #-------------------------------------------------------------------------- # * Frame Update (File Window Opacity) #-------------------------------------------------------------------------- def update_window_opacity if @file_index == 0 @savefile_windows[0].contents_opacity = @win_opac @savefile_windows[1].contents_opacity = 130 @savefile_windows[2].contents_opacity = 130 elsif @file_index == 1 @savefile_windows[0].contents_opacity = 130 @savefile_windows[1].contents_opacity = @win_opac @savefile_windows[2].contents_opacity = 130 else @savefile_windows[0].contents_opacity = 130 @savefile_windows[1].contents_opacity = 130 @savefile_windows[2].contents_opacity = @win_opac end endend Edited February 25, 2011 by Roxas94 PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted February 25, 2011 Share Posted February 25, 2011 Ma no che non ti ammazzo! Semmai dovresti ammazzarmi tu perché le cose non tornano! In effetti quello che ho fatto è molto stupido perché il file hero_fc lo usa non per il primo personaggio del database ma per il primo personaggio del party! urge correzione! Link to comment Share on other sites More sharing options...
Roxas94 Posted February 25, 2011 Author Share Posted February 25, 2011 Ma no che non ti ammazzo! Semmai dovresti ammazzarmi tu perché le cose non tornano! In effetti quello che ho fatto è molto stupido perché il file hero_fc lo usa non per il primo personaggio del database ma per il primo personaggio del party! urge correzione!No no, invece hai fatto giusto, funziona tutto alla perfezione, il problema è che c'era id =0, basta mettere id=1 e tutto torna (infatti come puoi vedere ho modificato il messaggio); quindi ancora grazie mille, spero riuscirai a farel a stessa cosa anche con lo script del save ma non avere fretta tanto non è urgente. PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted February 25, 2011 Share Posted February 25, 2011 No no, invece hai fatto giusto, funziona tutto alla perfezione, il problema è che c'era id =0, basta mettere id=1 e tutto torna (infatti come puoi vedere ho modificato il messaggio); quindi ancora grazie mille, spero riuscirai a farel a stessa cosa anche con lo script del save ma non avere fretta tanto non è urgente. Se mi dici che funziona, meglio così!Dopo averci rimesso mano oggi non sono del tutto sicuro che lo script sia perfettamente funzionante, ma se più avanti dovessi riscontrare errori fammelo sapere, ho già creato una seconda versione. Allora lo script per il salvataggio dovrebbe risolversi allo stesso modo. NOTA BENE: Riga 99 ho messo come prima "id ==0", ma se mi dici che a te torna con "id == 1" cambialo. ## ATTENZIONE IL SEGUENTE SCRIPT NON È L'ORIGINALE MA È UNA VERSIONE LIEVEMENTE# MODIFICATA. NON USARE SE NON SIETE SICURI DI COME FUNZIONA!# ## WARNING! THIS AIN'T THE ORIGINAL SCRIPT, BUT A MODIFIED VERSION. IF YOU AIN'T# SURE 'BOUT HOW IT WORKS DON'T USE IT!# #==============================================================================# ORIGINAL# ** MOG Scene File Ayumi V1.2# By Moghunter #------------------------------------------------------------------------------# NEW# *KH SAVE by Zexion/Linkyboy15#============================================================================== module MOG # BASIC MENU CONFIGURATION # File Graphics Used FILE_LAYOUT = "Layout-File" # File Menu Graphics FILE_BACKGROUND = "Back-Other" # Animated background graphic FILE_STATUS = "Status-File" # File Window Graphic FACE_LARGE = "_Fl" # Suffix for large face graphics Map_end = "_mgfx" # Suffix for map graphics # File Effects FILE_MOVE_FX = false # If savefile moves side-to-side FILE_OPACITY_FX = false # If savefile changes opacity # Menu FILE_FX = 0 # Back FX (0=Moving/ 1=Still/ 2=Map) FILE_TRAN_TIME = 10 # Transition Time FILE_TRAN_TYPE = "013-Square01" # Transition Type (Name) # Font Used FILE_FONT = "Kristen ITC" # Font used in file menu end # Mogscript global$mogscript = {} if $mogscript == nil$mogscript["menu_ayumi"] = true #==============================================================================# ** Game_Map#------------------------------------------------------------------------------# This class handles the map. It includes scrolling and passable determining# functions. Refer to "$game_map" for the instance of this class.#============================================================================== class Game_Map #-------------------------------------------------------------------------- # * Get Map Name #-------------------------------------------------------------------------- def map_name @mapinfo = load_data("Data/MapInfos.rxdata") if @mapinfo == nil return @mapinfo[@map_id].name endend #==============================================================================# ** Window_Base#------------------------------------------------------------------------------# This class is for all in-game windows.#============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # * Draw File Window # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def drw_win_file(x, y) dwf = RPG::Cache.picture(MOG::FILE_STATUS) cw = dwf.width ch = dwf.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, dwf, src_rect) end #-------------------------------------------------------------------------- # * Draw Empty Face #-------------------------------------------------------------------------- def nada face = RPG::Cache.picture("") end #-------------------------------------------------------------------------- # * Draw Face #3 (Larger face) # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_heroface3(actor, x, y, id) if id == 0 then face = RPG::Cache.picture("Hero" + MOG::FACE_LARGE) rescue nada else face = RPG::Cache.picture(actor.name + MOG::FACE_LARGE) rescue nada end cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end def draw_map3(actor, x, y) face = RPG::Cache.picture(actor.map_name + MOG::Map_end) rescue nada cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end #-------------------------------------------------------------------------- # * Draw Actor Level #6 # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_level6(actor, x, y) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv") self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 17, y + 1, 24, 32, actor.level.to_s, 2) end #-------------------------------------------------------------------------- # * Draw Actor Name #6 # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_name6(actor, x, y) self.contents.font.color = Color.new(0, 0, 0, 255) self.contents.draw_text(x + 1, y + 1, 100, 32, actor.name, 1) self.contents.font.color = normal_color self.contents.draw_text(x, y, 100, 32, actor.name, 1)end #-------------------------------------------------------------------------- # * Draw Actor Gold # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_gold(x, y) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 1, y + 1, 80, 32, $data_system.words.gold) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 70, y + 1, 80, 32, @game_party.gold.to_s) endend #==============================================================================# ** Window_SaveFile#------------------------------------------------------------------------------# This window displays save files on the save and load screens.#============================================================================== class Window_SaveFile < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # file_index : save file index (0-3) # filename : file name #-------------------------------------------------------------------------- def initialize(file_index, filename) super(0, 64 + file_index * 138, 640, 240) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 @file_index = file_index @filename = "Save#{@file_index + 1}.rxdata" @time_stamp = Time.at(0) @file_exist = FileTest.exist?(@filename) if @file_exist file = File.open(@filename, "r") @time_stamp = file.mtime @characters = Marshal.load(file) @frame_count = Marshal.load(file) @game_system = Marshal.load(file) @game_switches = Marshal.load(file) @game_variables = Marshal.load(file) @game_self_switches = Marshal.load(file) @game_screen = Marshal.load(file) @game_actors = Marshal.load(file) @game_party = Marshal.load(file) @game_troop = Marshal.load(file) @game_map = Marshal.load(file) @total_sec = @frame_count / Graphics.frame_rate file.close end @wiref = 0 refresh @selected = false end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.name = MOG::FILE_FONT drw_win_file(0,190) name = "#{@file_index + 1}" self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(44, 61, 600, 72, name) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(43, 60, 600, 72, name) @name_width = contents.text_size(name).width if @file_exist for i in 0...@characters.size x = 116 actors = @game_party.actors for i in 0...[actors.size, 4].min x = i * 60 actor = actors[i] self.contents.font.size = 20 draw_actor_level6(actor, 250, 60) draw_gold(310,60) actor = actors[0] map = @game_map draw_heroface3(actor,404,142,i) draw_map3(map,100,130) self.contents.font.size = 22 end end hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 time_string = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(5, 55, 550, 32, time_string, 2) self.contents.draw_text(5 , 35, 368 , 167, @game_map.map_name.to_s, 2) end end #-------------------------------------------------------------------------- # * Set Selected # selected : new selected (true = selected, false = unselected) #-------------------------------------------------------------------------- def selected=(selected) @selected = selected endend #==============================================================================# ** Scene_Save#------------------------------------------------------------------------------# This class performs save screen processing.#============================================================================== class Scene_Save < Scene_File #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias mog_init initialize def initialize mog_init $mog_scene_filesave_flag = 1 endend #==============================================================================# ** Scene_File#------------------------------------------------------------------------------# This is a superclass for the save screen and load screen.#============================================================================== class Scene_File #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main if $mog_scene_filesave_flag != 1 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 else if MOG::FILE_FX == 0 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 elsif MOG::FILE_FX == 1 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 else @spriteset = Spriteset_Map.new end end @mnlay = Sprite.new @mnlay.bitmap = RPG::Cache.picture(MOG::FILE_LAYOUT) @mnlay.z = 2 @help_window = Window_Help.new @help_window.set_text(@help_text) @help_window.opacity = 0 @savefile_windows = [] @cursor_displace = 0 for i in 0..2 @savefile_windows.push(Window_SaveFile.new(i, make_filename(i))) end @savefile_windows[0] @file_index = $game_temp.last_file_index @savefile_windows[@file_index].selected = true @savefile_windows[0].y = 40 @savefile_windows[1].y = 140 @savefile_windows[2].y = 240 @win_move_time = 0 @win_move = 0 @win_dire = 0 @win_opac = 255 @win1_y = 0 @win2_y = 0 @win3_y = 0 unless MOG::FILE_FX == 2 Graphics.transition(MOG::FILE_TRAN_TIME, "Graphics/Transitions/" + MOG::FILE_TRAN_TYPE) else Graphics.transition end loop do Graphics.update Input.update update if $scene != self break end end for i in 0..50 @mnback.ox += 1 if MOG::FILE_FX == 0 @savefile_windows[0].x += 10 @savefile_windows[1].x -= 10 @savefile_windows[2].x += 10 for i in @savefile_windows i.contents_opacity -= 5 end Graphics.update end Graphics.freeze @help_window.dispose @mnback.dispose if MOG::FILE_FX == 0 @mnback.dispose if MOG::FILE_FX == 1 @mnback.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag != 1 @spriteset.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag == 1 $mog_scene_filesave_flag = 0 @mnlay.dispose for i in @savefile_windows ; i.dispose ; end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @mnback.ox += 1 if MOG::FILE_FX == 0 if MOG::FILE_OPACITY_FX @win_opac += 3 @win_opac = 150 if @win_opac > 254 else @win_opac = 255 end @win_move_time += 1 if @win_move_time > 60 @win_dire += 1 @win_move_time = 0 end @win_dire = 0 if @win_dire > 1 if @win_dire == 0 @win_move += 1 else @win_move -= 1 end # Update File Windows update_window_z update_moving_window if MOG::FILE_MOVE_FX update_window_opacity @help_window.update for i in @savefile_windows ; i.update ; end if Input.trigger?(Input::C) on_decision(make_filename(@file_index)) $game_temp.last_file_index = @file_index return end if Input.trigger?(Input::B) on_cancel return end if Input.repeat?(Input::DOWN) if Input.trigger?(Input::DOWN) or @file_index < 3 $game_system.se_play($data_system.cursor_se) @savefile_windows[@file_index].selected = false @file_index = (@file_index + 1) % 3 @savefile_windows[@file_index].selected = true return end end if Input.repeat?(Input::UP) if Input.trigger?(Input::UP) or @file_index > 0 $game_system.se_play($data_system.cursor_se) @savefile_windows[@file_index].selected = false @file_index = (@file_index - 1) % 3 @savefile_windows[@file_index].selected = true return end end end #-------------------------------------------------------------------------- # * Frame Update (Reposition File Window) #-------------------------------------------------------------------------- def update_window_z if @file_index == 0 @savefile_windows[0].z = 2 @savefile_windows[1].z = 1 @savefile_windows[2].z = 0 elsif @file_index == 1 @savefile_windows[0].z = 1 @savefile_windows[1].z = 2 @savefile_windows[2].z = 1 else @savefile_windows[0].z = 0 @savefile_windows[1].z = 1 @savefile_windows[2].z = 2 end end #-------------------------------------------------------------------------- # * Frame Update (Moving File Window) #-------------------------------------------------------------------------- def update_moving_window if @file_index == 0 @savefile_windows[0].x = @win_move @savefile_windows[1].x = 0 @savefile_windows[1].x = 0 @savefile_windows[2].x = 0 elsif @file_index == 1 @savefile_windows[0].x = 0 @savefile_windows[1].x = @win_move @savefile_windows[2].x = 0 else @savefile_windows[0].x = 0 @savefile_windows[1].x = 0 @savefile_windows[2].x = @win_move end end #-------------------------------------------------------------------------- # * Frame Update (File Window Opacity) #-------------------------------------------------------------------------- def update_window_opacity if @file_index == 0 @savefile_windows[0].contents_opacity = @win_opac @savefile_windows[1].contents_opacity = 130 @savefile_windows[2].contents_opacity = 130 elsif @file_index == 1 @savefile_windows[0].contents_opacity = 130 @savefile_windows[1].contents_opacity = @win_opac @savefile_windows[2].contents_opacity = 130 else @savefile_windows[0].contents_opacity = 130 @savefile_windows[1].contents_opacity = 130 @savefile_windows[2].contents_opacity = @win_opac end endend Link to comment Share on other sites More sharing options...
Roxas94 Posted February 26, 2011 Author Share Posted February 26, 2011 Mi spiace dirtelo ma come ti aspettavi entrambi gli script hanno qualcosa che non va:Il primo, quello del menu,funziona come quello originale cioè quando lo apro mi dice che nel menù non è presente l'immagine "nome_Fc" e quindi crasha mentre nel secondo non crasha ma non mostra il face del personaggio anche se ha id=1 e l'immagine si chiama Hero (nel caso il personaggio ha un altro id funziona normalmente come l'originale). PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted February 26, 2011 Share Posted February 26, 2011 Mi spiace dirtelo ma come ti aspettavi entrambi gli script hanno qualcosa che non va:Il primo, quello del menu,funziona come quello originale cioè quando lo apro mi dice che nel menù non è presente l'immagine "nome_Fc" e quindi crasha mentre nel secondo non crasha ma non mostra il face del personaggio anche se ha id=1 e l'immagine si chiama Hero (nel caso il personaggio ha un altro id funziona normalmente come l'originale). Quella cosa di mettere id==1 a me non torna. Considerando lo script come l'ho fatto io, e cioè con id==0, per come ho strutturato lo script l'immagine hero_fc è associata solo al personaggio che ha id == 0, cioè il primo nel database, mentre per tutti gli altri devi comunque avere un file nome_fc. Se per esempio nel database hai:AluxesBasilGiadaHilda Dovrai avere tutti i rispettivi file, che saranno:Aluxes Hero_fcBasil Basil_fcGiada Giada_fcHilda Hilda_fc Per quanto riguarda lo script per il salvataggio:Aluxes Hero_FLBasil Basil_FLGiada Giada_FLHilda Hilda_FL Link to comment Share on other sites More sharing options...
Roxas94 Posted February 26, 2011 Author Share Posted February 26, 2011 (edited) Hai ragione tu, è giusto mettere come id 0 e non 1 ma comunque mettendo id==0 nello script del salvataggio mette sempre il face "Hero_Fl" qualunque sia l'id del pg e nello script del menu è uguale, il face è sempre "Hero_Fc" anche se sto usando Sora (che ha id 4).Comunque abbiamo fatto un passo avanti perchè a me interessava poter usare i face anche cambiando nome al pg ma per i primi 5 minuti di gioco (nei quali interpreti Sora) dovrebbero cambiare i due face se possibile. Edited February 27, 2011 by Roxas94 PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted February 27, 2011 Share Posted February 27, 2011 Appena torno a casa ti invio la nuova versione dello script, però si tratta di attendere fino a lunedì sera. Nel frattempo buon lavoro! Link to comment Share on other sites More sharing options...
Roxas94 Posted February 27, 2011 Author Share Posted February 27, 2011 Non c'è problema, fallo quando puoi, non è urgente e anche se lo fosse non potrei che ringraziarti lo stesso.Mi stai aiutando un sacco e ti dovrei nche mettere fretta? ^^.Beh, comunque io vado avanti con il progetto. PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted March 1, 2011 Share Posted March 1, 2011 (edited) Anche se in ritardo di un giorno ecco la seconda versione della modifica allo script Mog Menu: ## ATTENZIONE IL SEGUENTE SCRIPT NON È L'ORIGINALE MA È UNA VERSIONE LIEVEMENTE# MODIFICATA. NON USARE SE NON SIETE SICURI DI COME FUNZIONA!# ## WARNING! THIS AIN'T THE ORIGINAL SCRIPT, BUT A MODIFIED VERSION. IF YOU AIN'T# SURE 'BOUT HOW IT WORKS DON'T USE IT!# #_________________________________________________# MOG_SceneMenu Itigo V1.0 #_________________________________________________# By Moghunter #_________________________________________________# Menu com movimento e layout de pictures.# Para nomear as imagens das faces dos personagens# nomeie com o nome do personagem + o sufixo _FC# Exemplo -> Ashe_Fc.png#_________________________________________________module MOG#Tempo de transição ao ativar o menu. MNTT = 30#Tipo de transição ao ativar o menu.MNTP = "006-Stripe02"#Tempo de transição ao desativar o menu. MNTT2 = 20#Tipo de transição ao desativar o menu.MNTP2 = "005-Stripe01"end ############### Game_Actor ###############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 ################ Window_Base ################class Window_Base < Window def drw_face(actor,x,y) if actor.name == $game_actors[1].name then face = RPG::Cache.picture("Hero_fc") else face = RPG::Cache.picture(actor.name + "_fc") end cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end def draw_maphp3(actor, x, y) back = RPG::Cache.picture("BAR0") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = RPG::Cache.picture("HP_Bar") cw = meter.width * actor.hp / actor.maxhp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = RPG::Cache.picture("HP_Tx") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2) end def draw_mapsp3(actor, x, y) back = RPG::Cache.picture("BAR0") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = RPG::Cache.picture("SP_Bar") cw = meter.width * actor.sp / actor.maxsp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = RPG::Cache.picture("SP_Tx") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2) end def draw_mexp2(actor, x, y) bitmap2 = RPG::Cache.picture("Exp_Back") cw = bitmap2.width ch = bitmap2.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect) rate = actor.now_exp.to_f / actor.next_exp bitmap = RPG::Cache.picture("Exp_Meter") if actor.level < 99 cw = bitmap.width * rate else cw = bitmap.width end ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect) exp_tx = RPG::Cache.picture("Exp_tx") cw = exp_tx.width ch = exp_tx.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 55 , y - ch + 30, exp_tx, src_rect) lv_tx = RPG::Cache.picture("LV_tx") cw = lv_tx.width ch = lv_tx.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 125 , y - ch + 35, lv_tx, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 161, y + 7, 24, 32, actor.level.to_s, 1) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 160, y + 6, 24, 32, actor.level.to_s, 1) end def draw_actor_state2(actor, x, y, width = 120) text = make_battler_state_text(actor, width, true) self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color self.contents.draw_text(x, y, width, 32, text,1) end end ####################### Window_MenuStatus2 #######################class Window_MenuStatus2 < Window_Selectable def initialize super(0, 0, 415, 280) self.contents = Bitmap.new(width - 32, height - 32) refresh self.active = false self.opacity = 0 self.index = -1 end def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 20 y = i * 62 actor = $game_party.actors[i] self.contents.font.name = "Kristen ITC" drw_face(actor,x,y + 50) draw_maphp3(actor,x + 40, y - 5) draw_mapsp3(actor,x + 40, y + 20 ) draw_mexp2(actor,x + 140, y + 15 ) draw_actor_state2(actor ,x + 220, y - 5) end end def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(5, @index * 62, self.width - 32, 50) end end end ################# Window_Gold2 #################class Window_Gold2 < Window_Base def initialize super(0, 0, 160, 64) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = system_color self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2) endend ##################### Window_PlayTime2 #####################class Window_PlayTime2 < Window_Base def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear @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, 32, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end ################## Window_Steps2 ##################class Window_Steps2 < Window_Base def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2) end end ############### Scene_Menu ###############class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index end def main s1 = "" s2 = "" s3 = "" s4 = "" s5 = "" s6 = "" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index if $game_party.actors.size == 0 @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end @command_window.visible = false @command_window.x = -640 @mnlay = Sprite.new @mnlay.bitmap = RPG::Cache.picture("Mn_lay") @mnlay.z = 10 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture("Mn_back") @mnback.blend_type = 0 @mnback.z = 5 @mnback2 = Plane.new @mnback2.bitmap = RPG::Cache.picture("Mn_back") @mnback2.blend_type = 0 @mnback2.z = 5 @mnback2.opacity = 60 @mnsel = Sprite.new @mnsel.bitmap = RPG::Cache.picture("Mn_Sel") @mnsel.z = 20 @mnsel.x = 0 @mnsel.y = 110 @mnop = 150 if $game_system.save_disabled @command_window.disable_item(4) end @playtime_window = Window_PlayTime2.new @playtime_window.x = -45 @playtime_window.y = 405 @playtime_window.opacity = 0 @playtime_window.z = 15 @steps_window = Window_Steps2.new @steps_window.x = 1500 @steps_window.y = 1500 @steps_window.opacity = 0 @steps_window.z = 15 @gold_window = Window_Gold2.new @gold_window.x = -45 @gold_window.y = 384 @gold_window.opacity = 0 @gold_window.z = 15 @status_window = Window_MenuStatus2.new @status_window.x = 195 @status_window.y = 110 @status_window.opacity = 0 @status_window.z = 15 Graphics.transition(MOG::MNTT, "Graphics/Transitions/" + MOG::MNTP) loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose @status_window.dispose @mnlay.dispose @mnback.dispose @mnback2.dispose @mnsel.dispose Graphics.transition(MOG::MNTT2, "Graphics/Transitions/" + MOG::MNTP2) Graphics.update end def update @command_window.update @playtime_window.update @steps_window.update @gold_window.update @status_window.update @mnback.oy += 1 @mnback.ox += 1 @mnback2.oy += 1 @mnback2.ox -= 1 @mnop += 5 if @command_window.active == true @mnsel.bitmap = RPG::Cache.picture("Mn_Sel") else @mnsel.bitmap = RPG::Cache.picture("Mn_Sel_off") @mnsel.zoom_x = 1 @mnsel.opacity = 255 end if @mnop >= 255 @mnop = 120 end if @command_window.active update_command return end if @status_window.active update_status return end end def update_command if @mnsel.zoom_x <= 1.6 @mnsel.zoom_x += 0.03 @mnsel.opacity -= 10 elsif @mnsel.zoom_x > 1.6 @mnsel.zoom_x = 1.0 @mnsel.opacity = 255 end case @command_window.index when 0 @mnsel.x = 0 @mnsel.y = 110 when 1 @mnsel.x = 0 @mnsel.y = 155 when 2 @mnsel.x = 0 @mnsel.y = 197 when 3 @mnsel.x = 0 @mnsel.y = 242 when 4 @mnsel.x = 0 @mnsel.y = 285 when 5 @mnsel.x = 0 @mnsel.y = 325 end if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) if $game_party.actors.size == 0 and @command_window.index < 4 $game_system.se_play($data_system.buzzer_se) return end case @command_window.index when 0 $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when 5 $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end def update_status if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @status_window.active = false @status_window.index = -1 return end if Input.trigger?(Input::C) case @command_window.index when 1 if $game_party.actors[@status_window.index].restriction >= 2 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@status_window.index) when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@status_window.index) when 3 $game_system.se_play($data_system.decision_se) $scene = Scene_Status.new(@status_window.index) end return end end end Edited March 1, 2011 by gino Link to comment Share on other sites More sharing options...
Guest gino Posted March 1, 2011 Share Posted March 1, 2011 Perdono per il doppio post ma scrivendo tutto in uno solo mi scriveva un messaggio vuoto. Ed ecco quello per il salvataggio: ## ATTENZIONE IL SEGUENTE SCRIPT NON È L'ORIGINALE MA È UNA VERSIONE LIEVEMENTE# MODIFICATA. NON USARE SE NON SIETE SICURI DI COME FUNZIONA!# ## WARNING! THIS AIN'T THE ORIGINAL SCRIPT, BUT A MODIFIED VERSION. IF YOU AIN'T# SURE 'BOUT HOW IT WORKS DON'T USE IT!# #==============================================================================# ORIGINAL# ** MOG Scene File Ayumi V1.2# By Moghunter #------------------------------------------------------------------------------# NEW# *KH SAVE by Zexion/Linkyboy15#============================================================================== module MOG # BASIC MENU CONFIGURATION # File Graphics Used FILE_LAYOUT = "Layout-File" # File Menu Graphics FILE_BACKGROUND = "Back-Other" # Animated background graphic FILE_STATUS = "Status-File" # File Window Graphic FACE_LARGE = "_Fl" # Suffix for large face graphics Map_end = "_mgfx" # Suffix for map graphics # File Effects FILE_MOVE_FX = false # If savefile moves side-to-side FILE_OPACITY_FX = false # If savefile changes opacity # Menu FILE_FX = 0 # Back FX (0=Moving/ 1=Still/ 2=Map) FILE_TRAN_TIME = 10 # Transition Time FILE_TRAN_TYPE = "013-Square01" # Transition Type (Name) # Font Used FILE_FONT = "Kristen ITC" # Font used in file menu end # Mogscript global$mogscript = {} if $mogscript == nil$mogscript["menu_ayumi"] = true #==============================================================================# ** Game_Map#------------------------------------------------------------------------------# This class handles the map. It includes scrolling and passable determining# functions. Refer to "$game_map" for the instance of this class.#============================================================================== class Game_Map #-------------------------------------------------------------------------- # * Get Map Name #-------------------------------------------------------------------------- def map_name @mapinfo = load_data("Data/MapInfos.rxdata") if @mapinfo == nil return @mapinfo[@map_id].name endend #==============================================================================# ** Window_Base#------------------------------------------------------------------------------# This class is for all in-game windows.#============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # * Draw File Window # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def drw_win_file(x, y) dwf = RPG::Cache.picture(MOG::FILE_STATUS) cw = dwf.width ch = dwf.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, dwf, src_rect) end #-------------------------------------------------------------------------- # * Draw Empty Face #-------------------------------------------------------------------------- def nada face = RPG::Cache.picture("") end #-------------------------------------------------------------------------- # * Draw Face #3 (Larger face) # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_heroface3(actor, x, y, id) if actor.name == $game_actors[1].name then face = RPG::Cache.picture("Hero" + MOG::FACE_LARGE) rescue nada else face = RPG::Cache.picture(actor.name + MOG::FACE_LARGE) rescue nada end cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end def draw_map3(actor, x, y) face = RPG::Cache.picture(actor.map_name + MOG::Map_end) rescue nada cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end #-------------------------------------------------------------------------- # * Draw Actor Level #6 # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_level6(actor, x, y) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv") self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 17, y + 1, 24, 32, actor.level.to_s, 2) end #-------------------------------------------------------------------------- # * Draw Actor Name #6 # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_name6(actor, x, y) self.contents.font.color = Color.new(0, 0, 0, 255) self.contents.draw_text(x + 1, y + 1, 100, 32, actor.name, 1) self.contents.font.color = normal_color self.contents.draw_text(x, y, 100, 32, actor.name, 1)end #-------------------------------------------------------------------------- # * Draw Actor Gold # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_gold(x, y) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 1, y + 1, 80, 32, $data_system.words.gold) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 70, y + 1, 80, 32, @game_party.gold.to_s) endend #==============================================================================# ** Window_SaveFile#------------------------------------------------------------------------------# This window displays save files on the save and load screens.#============================================================================== class Window_SaveFile < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # file_index : save file index (0-3) # filename : file name #-------------------------------------------------------------------------- def initialize(file_index, filename) super(0, 64 + file_index * 138, 640, 240) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 @file_index = file_index @filename = "Save#{@file_index + 1}.rxdata" @time_stamp = Time.at(0) @file_exist = FileTest.exist?(@filename) if @file_exist file = File.open(@filename, "r") @time_stamp = file.mtime @characters = Marshal.load(file) @frame_count = Marshal.load(file) @game_system = Marshal.load(file) @game_switches = Marshal.load(file) @game_variables = Marshal.load(file) @game_self_switches = Marshal.load(file) @game_screen = Marshal.load(file) @game_actors = Marshal.load(file) @game_party = Marshal.load(file) @game_troop = Marshal.load(file) @game_map = Marshal.load(file) @total_sec = @frame_count / Graphics.frame_rate file.close end @wiref = 0 refresh @selected = false end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.name = MOG::FILE_FONT drw_win_file(0,190) name = "#{@file_index + 1}" self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(44, 61, 600, 72, name) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(43, 60, 600, 72, name) @name_width = contents.text_size(name).width if @file_exist for i in 0...@characters.size x = 116 actors = @game_party.actors for i in 0...[actors.size, 4].min x = i * 60 actor = actors[i] self.contents.font.size = 20 draw_actor_level6(actor, 250, 60) draw_gold(310,60) actor = actors[0] map = @game_map draw_heroface3(actor,404,142,i) draw_map3(map,100,130) self.contents.font.size = 22 end end hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 time_string = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(5, 55, 550, 32, time_string, 2) self.contents.draw_text(5 , 35, 368 , 167, @game_map.map_name.to_s, 2) end end #-------------------------------------------------------------------------- # * Set Selected # selected : new selected (true = selected, false = unselected) #-------------------------------------------------------------------------- def selected=(selected) @selected = selected endend #==============================================================================# ** Scene_Save#------------------------------------------------------------------------------# This class performs save screen processing.#============================================================================== class Scene_Save < Scene_File #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias mog_init initialize def initialize mog_init $mog_scene_filesave_flag = 1 endend #==============================================================================# ** Scene_File#------------------------------------------------------------------------------# This is a superclass for the save screen and load screen.#============================================================================== class Scene_File #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main if $mog_scene_filesave_flag != 1 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 else if MOG::FILE_FX == 0 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 elsif MOG::FILE_FX == 1 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 else @spriteset = Spriteset_Map.new end end @mnlay = Sprite.new @mnlay.bitmap = RPG::Cache.picture(MOG::FILE_LAYOUT) @mnlay.z = 2 @help_window = Window_Help.new @help_window.set_text(@help_text) @help_window.opacity = 0 @savefile_windows = [] @cursor_displace = 0 for i in 0..2 @savefile_windows.push(Window_SaveFile.new(i, make_filename(i))) end @savefile_windows[0] @file_index = $game_temp.last_file_index @savefile_windows[@file_index].selected = true @savefile_windows[0].y = 40 @savefile_windows[1].y = 140 @savefile_windows[2].y = 240 @win_move_time = 0 @win_move = 0 @win_dire = 0 @win_opac = 255 @win1_y = 0 @win2_y = 0 @win3_y = 0 unless MOG::FILE_FX == 2 Graphics.transition(MOG::FILE_TRAN_TIME, "Graphics/Transitions/" + MOG::FILE_TRAN_TYPE) else Graphics.transition end loop do Graphics.update Input.update update if $scene != self break end end for i in 0..50 @mnback.ox += 1 if MOG::FILE_FX == 0 @savefile_windows[0].x += 10 @savefile_windows[1].x -= 10 @savefile_windows[2].x += 10 for i in @savefile_windows i.contents_opacity -= 5 end Graphics.update end Graphics.freeze @help_window.dispose @mnback.dispose if MOG::FILE_FX == 0 @mnback.dispose if MOG::FILE_FX == 1 @mnback.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag != 1 @spriteset.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag == 1 $mog_scene_filesave_flag = 0 @mnlay.dispose for i in @savefile_windows ; i.dispose ; end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @mnback.ox += 1 if MOG::FILE_FX == 0 if MOG::FILE_OPACITY_FX @win_opac += 3 @win_opac = 150 if @win_opac > 254 else @win_opac = 255 end @win_move_time += 1 if @win_move_time > 60 @win_dire += 1 @win_move_time = 0 end @win_dire = 0 if @win_dire > 1 if @win_dire == 0 @win_move += 1 else @win_move -= 1 end # Update File Windows update_window_z update_moving_window if MOG::FILE_MOVE_FX update_window_opacity @help_window.update for i in @savefile_windows ; i.update ; end if Input.trigger?(Input::C) on_decision(make_filename(@file_index)) $game_temp.last_file_index = @file_index return end if Input.trigger?(Input::B) on_cancel return end if Input.repeat?(Input::DOWN) if Input.trigger?(Input::DOWN) or @file_index < 3 $game_system.se_play($data_system.cursor_se) @savefile_windows[@file_index].selected = false @file_index = (@file_index + 1) % 3 @savefile_windows[@file_index].selected = true return end end if Input.repeat?(Input::UP) if Input.trigger?(Input::UP) or @file_index > 0 $game_system.se_play($data_system.cursor_se) @savefile_windows[@file_index].selected = false @file_index = (@file_index - 1) % 3 @savefile_windows[@file_index].selected = true return end end end #-------------------------------------------------------------------------- # * Frame Update (Reposition File Window) #-------------------------------------------------------------------------- def update_window_z if @file_index == 0 @savefile_windows[0].z = 2 @savefile_windows[1].z = 1 @savefile_windows[2].z = 0 elsif @file_index == 1 @savefile_windows[0].z = 1 @savefile_windows[1].z = 2 @savefile_windows[2].z = 1 else @savefile_windows[0].z = 0 @savefile_windows[1].z = 1 @savefile_windows[2].z = 2 end end #-------------------------------------------------------------------------- # * Frame Update (Moving File Window) #-------------------------------------------------------------------------- def update_moving_window if @file_index == 0 @savefile_windows[0].x = @win_move @savefile_windows[1].x = 0 @savefile_windows[1].x = 0 @savefile_windows[2].x = 0 elsif @file_index == 1 @savefile_windows[0].x = 0 @savefile_windows[1].x = @win_move @savefile_windows[2].x = 0 else @savefile_windows[0].x = 0 @savefile_windows[1].x = 0 @savefile_windows[2].x = @win_move end end #-------------------------------------------------------------------------- # * Frame Update (File Window Opacity) #-------------------------------------------------------------------------- def update_window_opacity if @file_index == 0 @savefile_windows[0].contents_opacity = @win_opac @savefile_windows[1].contents_opacity = 130 @savefile_windows[2].contents_opacity = 130 elsif @file_index == 1 @savefile_windows[0].contents_opacity = 130 @savefile_windows[1].contents_opacity = @win_opac @savefile_windows[2].contents_opacity = 130 else @savefile_windows[0].contents_opacity = 130 @savefile_windows[1].contents_opacity = 130 @savefile_windows[2].contents_opacity = @win_opac end endend Link to comment Share on other sites More sharing options...
Roxas94 Posted March 2, 2011 Author Share Posted March 2, 2011 (edited) Scusa se continuo a rompere ^^ ma per lo script del salvataggio, non so per quale strano motivo, appena di accende il gioco e si preme "Continua" dice "errore alla riga 98", però durante il gioco permette di salvare e se esco da gioco tramite il il menu con "Torna Ai Titoli" premendo "Continua" il menu di salvataggio si apre normalmente ... boh.Comunque funziona e anche il menu normale, ma non so perchè si presenti questo problema alla normale accensione del gioco. EDIT: com'è che mi sono dimenticato di ringraziarti? Scusa ... Edited March 2, 2011 by Roxas94 PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted March 2, 2011 Share Posted March 2, 2011 Scusa se continuo a rompere ^^ ma per lo script del salvataggio, non so per quale strano motivo, appena di accende il gioco e si preme "Continua" dice "errore alla riga 98", però durante il gioco permette di salvare e se esco da gioco tramite il il menu con "Torna Ai Titoli" premendo "Continua" il menu di salvataggio si apre normalmente ... boh.Comunque funziona e anche il menu normale, ma non so perchè si presenti questo problema alla normale accensione del gioco. EDIT: com'è che mi sono dimenticato di ringraziarti? Scusa ... Ho peccato di superbia. E non ho minimamente pensato che quando inizi il gioco per la prima volta non ha idea di cosa sia $game_actors! Dai che questa dovrebbe essere l'ultima volta che riposto il codice! E lo spoiler ancora non funziona... ## ATTENZIONE IL SEGUENTE SCRIPT NON È L'ORIGINALE MA È UNA VERSIONE LIEVEMENTE# MODIFICATA. NON USARE SE NON SIETE SICURI DI COME FUNZIONA!# ## WARNING! THIS AIN'T THE ORIGINAL SCRIPT, BUT A MODIFIED VERSION. IF YOU AIN'T# SURE 'BOUT HOW IT WORKS DON'T USE IT!# #==============================================================================# ORIGINAL# ** MOG Scene File Ayumi V1.2# By Moghunter #------------------------------------------------------------------------------# NEW# *KH SAVE by Zexion/Linkyboy15#============================================================================== module MOG # BASIC MENU CONFIGURATION # File Graphics Used FILE_LAYOUT = "Layout-File" # File Menu Graphics FILE_BACKGROUND = "Back-Other" # Animated background graphic FILE_STATUS = "Status-File" # File Window Graphic FACE_LARGE = "_Fl" # Suffix for large face graphics Map_end = "_mgfx" # Suffix for map graphics # File Effects FILE_MOVE_FX = false # If savefile moves side-to-side FILE_OPACITY_FX = false # If savefile changes opacity # Menu FILE_FX = 0 # Back FX (0=Moving/ 1=Still/ 2=Map) FILE_TRAN_TIME = 10 # Transition Time FILE_TRAN_TYPE = "013-Square01" # Transition Type (Name) # Font Used FILE_FONT = "Kristen ITC" # Font used in file menu end # Mogscript global$mogscript = {} if $mogscript == nil$mogscript["menu_ayumi"] = true #==============================================================================# ** Game_Map#------------------------------------------------------------------------------# This class handles the map. It includes scrolling and passable determining# functions. Refer to "$game_map" for the instance of this class.#============================================================================== class Game_Map #-------------------------------------------------------------------------- # * Get Map Name #-------------------------------------------------------------------------- def map_name @mapinfo = load_data("Data/MapInfos.rxdata") if @mapinfo == nil return @mapinfo[@map_id].name endend #==============================================================================# ** Window_Base#------------------------------------------------------------------------------# This class is for all in-game windows.#============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # * Draw File Window # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def drw_win_file(x, y) dwf = RPG::Cache.picture(MOG::FILE_STATUS) cw = dwf.width ch = dwf.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, dwf, src_rect) end #-------------------------------------------------------------------------- # * Draw Empty Face #-------------------------------------------------------------------------- def nada face = RPG::Cache.picture("") end #-------------------------------------------------------------------------- # * Draw Face #3 (Larger face) # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_heroface3(actor, x, y, id) begin if actor.name == $game_actors[1].name then face = RPG::Cache.picture("Hero" + MOG::FACE_LARGE) rescue nada else face = RPG::Cache.picture(actor.name + MOG::FACE_LARGE) rescue nada end rescue face = RPG::Cache.picture(actor.name + MOG::FACE_LARGE) rescue nada end cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end def draw_map3(actor, x, y) face = RPG::Cache.picture(actor.map_name + MOG::Map_end) rescue nada cw = face.width ch = face.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x , y - ch, face, src_rect) end #-------------------------------------------------------------------------- # * Draw Actor Level #6 # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_level6(actor, x, y) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv") self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 17, y + 1, 24, 32, actor.level.to_s, 2) end #-------------------------------------------------------------------------- # * Draw Actor Name #6 # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_name6(actor, x, y) self.contents.font.color = Color.new(0, 0, 0, 255) self.contents.draw_text(x + 1, y + 1, 100, 32, actor.name, 1) self.contents.font.color = normal_color self.contents.draw_text(x, y, 100, 32, actor.name, 1)end #-------------------------------------------------------------------------- # * Draw Actor Gold # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_gold(x, y) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 1, y + 1, 80, 32, $data_system.words.gold) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(x + 70, y + 1, 80, 32, @game_party.gold.to_s) endend #==============================================================================# ** Window_SaveFile#------------------------------------------------------------------------------# This window displays save files on the save and load screens.#============================================================================== class Window_SaveFile < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # file_index : save file index (0-3) # filename : file name #-------------------------------------------------------------------------- def initialize(file_index, filename) super(0, 64 + file_index * 138, 640, 240) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = 0 @file_index = file_index @filename = "Save#{@file_index + 1}.rxdata" @time_stamp = Time.at(0) @file_exist = FileTest.exist?(@filename) if @file_exist file = File.open(@filename, "r") @time_stamp = file.mtime @characters = Marshal.load(file) @frame_count = Marshal.load(file) @game_system = Marshal.load(file) @game_switches = Marshal.load(file) @game_variables = Marshal.load(file) @game_self_switches = Marshal.load(file) @game_screen = Marshal.load(file) @game_actors = Marshal.load(file) @game_party = Marshal.load(file) @game_troop = Marshal.load(file) @game_map = Marshal.load(file) @total_sec = @frame_count / Graphics.frame_rate file.close end @wiref = 0 refresh @selected = false end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.name = MOG::FILE_FONT drw_win_file(0,190) name = "#{@file_index + 1}" self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(44, 61, 600, 72, name) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(43, 60, 600, 72, name) @name_width = contents.text_size(name).width if @file_exist for i in 0...@characters.size x = 116 actors = @game_party.actors for i in 0...[actors.size, 4].min x = i * 60 actor = actors[i] self.contents.font.size = 20 draw_actor_level6(actor, 250, 60) draw_gold(310,60) actor = actors[0] map = @game_map draw_heroface3(actor,404,142,i) draw_map3(map,100,130) self.contents.font.size = 22 end end hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 time_string = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = Color.new(255,138,0,255) self.contents.draw_text(5, 55, 550, 32, time_string, 2) self.contents.draw_text(5 , 35, 368 , 167, @game_map.map_name.to_s, 2) end end #-------------------------------------------------------------------------- # * Set Selected # selected : new selected (true = selected, false = unselected) #-------------------------------------------------------------------------- def selected=(selected) @selected = selected endend #==============================================================================# ** Scene_Save#------------------------------------------------------------------------------# This class performs save screen processing.#============================================================================== class Scene_Save < Scene_File #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias mog_init initialize def initialize mog_init $mog_scene_filesave_flag = 1 endend #==============================================================================# ** Scene_File#------------------------------------------------------------------------------# This is a superclass for the save screen and load screen.#============================================================================== class Scene_File #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main if $mog_scene_filesave_flag != 1 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 else if MOG::FILE_FX == 0 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 elsif MOG::FILE_FX == 1 @mnback = Plane.new @mnback.bitmap = RPG::Cache.picture(MOG::FILE_BACKGROUND) @mnback.z = 1 else @spriteset = Spriteset_Map.new end end @mnlay = Sprite.new @mnlay.bitmap = RPG::Cache.picture(MOG::FILE_LAYOUT) @mnlay.z = 2 @help_window = Window_Help.new @help_window.set_text(@help_text) @help_window.opacity = 0 @savefile_windows = [] @cursor_displace = 0 for i in 0..2 @savefile_windows.push(Window_SaveFile.new(i, make_filename(i))) end @savefile_windows[0] @file_index = $game_temp.last_file_index @savefile_windows[@file_index].selected = true @savefile_windows[0].y = 40 @savefile_windows[1].y = 140 @savefile_windows[2].y = 240 @win_move_time = 0 @win_move = 0 @win_dire = 0 @win_opac = 255 @win1_y = 0 @win2_y = 0 @win3_y = 0 unless MOG::FILE_FX == 2 Graphics.transition(MOG::FILE_TRAN_TIME, "Graphics/Transitions/" + MOG::FILE_TRAN_TYPE) else Graphics.transition end loop do Graphics.update Input.update update if $scene != self break end end for i in 0..50 @mnback.ox += 1 if MOG::FILE_FX == 0 @savefile_windows[0].x += 10 @savefile_windows[1].x -= 10 @savefile_windows[2].x += 10 for i in @savefile_windows i.contents_opacity -= 5 end Graphics.update end Graphics.freeze @help_window.dispose @mnback.dispose if MOG::FILE_FX == 0 @mnback.dispose if MOG::FILE_FX == 1 @mnback.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag != 1 @spriteset.dispose if MOG::FILE_FX == 2 && $mog_scene_filesave_flag == 1 $mog_scene_filesave_flag = 0 @mnlay.dispose for i in @savefile_windows ; i.dispose ; end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @mnback.ox += 1 if MOG::FILE_FX == 0 if MOG::FILE_OPACITY_FX @win_opac += 3 @win_opac = 150 if @win_opac > 254 else @win_opac = 255 end @win_move_time += 1 if @win_move_time > 60 @win_dire += 1 @win_move_time = 0 end @win_dire = 0 if @win_dire > 1 if @win_dire == 0 @win_move += 1 else @win_move -= 1 end # Update File Windows update_window_z update_moving_window if MOG::FILE_MOVE_FX update_window_opacity @help_window.update for i in @savefile_windows ; i.update ; end if Input.trigger?(Input::C) on_decision(make_filename(@file_index)) $game_temp.last_file_index = @file_index return end if Input.trigger?(Input::B) on_cancel return end if Input.repeat?(Input::DOWN) if Input.trigger?(Input::DOWN) or @file_index < 3 $game_system.se_play($data_system.cursor_se) @savefile_windows[@file_index].selected = false @file_index = (@file_index + 1) % 3 @savefile_windows[@file_index].selected = true return end end if Input.repeat?(Input::UP) if Input.trigger?(Input::UP) or @file_index > 0 $game_system.se_play($data_system.cursor_se) @savefile_windows[@file_index].selected = false @file_index = (@file_index - 1) % 3 @savefile_windows[@file_index].selected = true return end end end #-------------------------------------------------------------------------- # * Frame Update (Reposition File Window) #-------------------------------------------------------------------------- def update_window_z if @file_index == 0 @savefile_windows[0].z = 2 @savefile_windows[1].z = 1 @savefile_windows[2].z = 0 elsif @file_index == 1 @savefile_windows[0].z = 1 @savefile_windows[1].z = 2 @savefile_windows[2].z = 1 else @savefile_windows[0].z = 0 @savefile_windows[1].z = 1 @savefile_windows[2].z = 2 end end #-------------------------------------------------------------------------- # * Frame Update (Moving File Window) #-------------------------------------------------------------------------- def update_moving_window if @file_index == 0 @savefile_windows[0].x = @win_move @savefile_windows[1].x = 0 @savefile_windows[1].x = 0 @savefile_windows[2].x = 0 elsif @file_index == 1 @savefile_windows[0].x = 0 @savefile_windows[1].x = @win_move @savefile_windows[2].x = 0 else @savefile_windows[0].x = 0 @savefile_windows[1].x = 0 @savefile_windows[2].x = @win_move end end #-------------------------------------------------------------------------- # * Frame Update (File Window Opacity) #-------------------------------------------------------------------------- def update_window_opacity if @file_index == 0 @savefile_windows[0].contents_opacity = @win_opac @savefile_windows[1].contents_opacity = 130 @savefile_windows[2].contents_opacity = 130 elsif @file_index == 1 @savefile_windows[0].contents_opacity = 130 @savefile_windows[1].contents_opacity = @win_opac @savefile_windows[2].contents_opacity = 130 else @savefile_windows[0].contents_opacity = 130 @savefile_windows[1].contents_opacity = 130 @savefile_windows[2].contents_opacity = @win_opac end endend Link to comment Share on other sites More sharing options...
Roxas94 Posted March 2, 2011 Author Share Posted March 2, 2011 (edited) Si funziona tutto alla perfezione grazie mille gino, ti devo un favore (anzi, un po' di più ^^) EDIT: credo che lo spoiler non funzioni per il semplice fatto che il codice è troppo lungo e non per un malfunzionamento. Edited March 2, 2011 by Roxas94 PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guest gino Posted March 3, 2011 Share Posted March 3, 2011 Si funziona tutto alla perfezione grazie mille gino, ti devo un favore (anzi, un po' di più ^^) EDIT: credo che lo spoiler non funzioni per il semplice fatto che il codice è troppo lungo e non per un malfunzionamento. Funziona tutto alla perfezione? Che cul... ehm certo che funziona tutto a dovere! Ci mancherebbe!! Link to comment Share on other sites More sharing options...
Matty95 Posted March 7, 2011 Share Posted March 7, 2011 Wow, un altro progetto di KH, il mio RPG preferito !!! ^ ^ Bhe, non c'è molto da dire: la storia perdonami ma non è per niente innovativa nel senso che è identica a KH , penso che la cosa migliore sia creare uno spin-off. Potresti inventare di sicuro qualcosa di meglio per quanto riguarda la storia. Per il BS ti consiglio o un ABS o un BS Frontale Alternativo (come sto facendo io ^ ^).Mi piace molto il fatto che farai tu tutti i tileset (eccetto Destiny Island come hai detto)Continua a makerare Roxas! E continua ad informarci sul progetto!^ ^ http://img821.imageshack.us/img821/962/bannerfirmaprogrammazio.jpg Link del progetto di Kingdom Hearts: http://www.rpg2s.net...showtopic=13529 Partecipante al Rpg2s.net Game Contest #3http://www.rpg2s.net/images/gc3/gc3_firma.pngGioco in Sviluppo: Detective Trap http://img97.imageshack.us/img97/5674/idriu.png XDXD^ ^ ^ ^SUPERBIA SUDORE FORTUNAGrandi sogni supportati da una grande passione!! Link to comment Share on other sites More sharing options...
Roxas94 Posted March 8, 2011 Author Share Posted March 8, 2011 Rieccomi qui al lavoro dopo tre fantastici giorni passati a Londra.Non ti preoccupare Matty ogni critica è ben accetta, per il BS per ora non mi sento pronto per farne uno in tempo reale o comunque uno troppo complicato sia perchè sono ancora un principiante e sia perchè i personaggi buoni sono gia 4 poi se ci aggiungi anche i nemici si crea un casino ^^.Ma andando avanti col tempo chissà che non si potrà fare, per ora preferisco tenere questo BS Laterale. PROGETTI IN CORSO: Detective Conan Story Kingdom Hearts - The Twin Keyblade Link to comment Share on other sites More sharing options...
Guardian of Irael Posted March 8, 2011 Share Posted March 8, 2011 Bentornato ^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
Matty95 Posted March 9, 2011 Share Posted March 9, 2011 Non dico che l'ABS è obbligatorio.Anzi un BS laterale va più che bene come battle system! Non vedo l'ora di vedere qualche nuova screenshot! :3Continua a makerare! http://img821.imageshack.us/img821/962/bannerfirmaprogrammazio.jpg Link del progetto di Kingdom Hearts: http://www.rpg2s.net...showtopic=13529 Partecipante al Rpg2s.net Game Contest #3http://www.rpg2s.net/images/gc3/gc3_firma.pngGioco in Sviluppo: Detective Trap http://img97.imageshack.us/img97/5674/idriu.png XDXD^ ^ ^ ^SUPERBIA SUDORE FORTUNAGrandi sogni supportati da una grande passione!! 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