lupins Posted March 23, 2010 Share Posted March 23, 2010 (edited) Girovagando in internet ho trovato questo script per un diario questAutore: Leon (Tradotto da me)Istruzioni: all'internoper richiamare lo script usare questa stringa : $scene = Scene_MissionMenu.new #=================================== # Leon's Mission Script v2.0 #---------------------------------------------------------------------- # 2006-09-22 #=================================== =begin Description: Script per creare un diario Missioni. Caratteristiche: 1. Le missioni completate saranno visualizzate in verde. 2. Le missioni sono numerate per ordinarle come meglio si crede Istruzioni: Inserire sopra il main Per attivare una missione usare questa stringa $game_party.mission[mission_id] = x Sostituire Mission_id con il numero della missione da attivare sostituire la X con: 1 = la missione è conosciuta ma non appare nella lista 2 = la missione è conosciuta e appare sulla lista 3 = la missione è completa. Ho me delle missioni defaud come esempio =end #================================== # ** Mission_Menu #================================== module Mission_Menu #-------------------------------------------------------------------- # # ~ mission_id => "nome missione" #-------------------------------------------------------------------- Mission_Name = { 0 => "Lost Cat", 1 => "Old Blade", 2 => "Seize Sentries", 3 => "Hidden Heirloom", 4 => "A Gooey Mess.", 5 => "Hidden Horror" } #-------------------------------------------------------------------- # # ~ mission_id => ["nome dell perosnaggio", hue, nome del personaggio, luogo, ricompensa] #-------------------------------------------------------------------- Mission_Sprite = { 0 => ["113-Civilian13", 330, "Amy", "Logres", "Potion x 3"], 1 => ["005-Fighter05", 0, "L'eric", "Logres", "Rusty Sword"], 2 => ["002-Fighter02", 0, "Wallace", "Resistance H.Q.", "500 Gold"], 3 => ["122-Civilian22", 30, "Old Woman", "Cyris Home", "Sound Effect"], 4 => ["011-Lancer03", 0, "Soldier", "Cyris Barracks", "Kite Shield"], 5 => ["006-Fighter06", 0, "Lady", "Cyris", "Lion's Head Earring"] } #-------------------------------------------------------------------- # * descrizione missione, non superare i caretteri della missione 4 ho nn entrerà nella finestra, # ~ mission_id => "linea 1" #-------------------------------------------------------------------- Mission_L1 = { 0 => "Amy has lost her cat and needs help", 1 => "Somebody said they saw L'eric's blade", 2 => "Head north toward enemy territory, and", 3 => "Seek out the caverns south of Cyris. There", 4 => "A monster to the west of the town every", 5 => "Somewhere in the Belin Caverns, there is a" } #-------------------------------------------------------------------- # * di seguito alla 1 # ~ mission_id => "linea 2" #-------------------------------------------------------------------- Mission_L2 = { 0 => "finding him. He likes to play in the", 1 => "just south of here by the river. He ", 2 => "capture two sentry towers. Be careful ", 3 => "you will find a blue chest. Retrieve its", 4 => "now and then terrorizes the caravans.", 5 => "creature holding an item the lady in" } #-------------------------------------------------------------------- # ~ mission_id => "Linea 3" #-------------------------------------------------------------------- Mission_L3 = { 0 => " North East side of Tiberian Plains.", 1 => "wants Will to confirm the story, and", 2 => "and don't get caught. Return to Wallace", 3 => "contents and bring it back to the old", 4 => "A soldier in the barracks has asked you", 5 => "Cyris is looking for. She said the monster" } #-------------------------------------------------------------------- # * Same as the above one. # ~ mission_id => "Linea 4" #-------------------------------------------------------------------- Mission_L4 = { 1 => "if it is true, bring back the sword.", 2 => "once this job is complete.", 3 => "woman.", 4 => "to exterminate it.", 5 => "would be hiding." } #-------------------------------------------------------------------- # * Same as the above one. # ~ mission_id => "Linea 5" #-------------------------------------------------------------------- Mission_L5 = { } #-------------------------------------------------------------------- # * Same as the above one. # ~ mission_id => "Linea 6" #-------------------------------------------------------------------- Mission_L6 = { } #-------------------------------------------------------------------- # * Same as the above one. # ~ mission_id => "Linea 7" #-------------------------------------------------------------------- Mission_L7 = { } #-------------------------------------------------------------------- # * Same as the above one. # ~ mission_id => "Linea 8" #-------------------------------------------------------------------- Mission_L8 = { } #-------------------------------------------------------------------- # * Mission Set-up #-------------------------------------------------------------------- Mission_Setup = true end #---------------------------------------------------------------------- # * Game_Party #---------------------------------------------------------------------- class Game_Party #-------------------------------------------------------------------- # * Attributes #-------------------------------------------------------------------- attr_accessor :mission #-------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------- alias leon_gp_mission_initialize initialize #-------------------------------------------------------------------- # * Object initialization #-------------------------------------------------------------------- # usare queste opsione se si vuole far apparire alcune missione subito senza attivarle tramite call script # [mission_id, 1] #-------------------------------------------------------------------- def initialize leon_gp_mission_initialize @mission = { 0 => 1, 1 => 2, 2 => 3, 3 => 2 } end end #-------------------------------------------------------------------- # * Ends Game_Party #-------------------------------------------------------------------- #---------------------------------------------------------------------- # * Window_Missionhelp #---------------------------------------------------------------------- class Window_Missionhelp < Window_Base #-------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------- def initialize super(0, 0, 400, 60) self.contents = Bitmap.new(width - 32, height - 32) end #-------------------------------------------------------------------- # * Update #-------------------------------------------------------------------- def update(help_text) self.contents.clear self.contents.draw_text(0, 0, 440, 32, help_text) end end #---------------------------------------------------------------------- # * End Window_Missionhelp #---------------------------------------------------------------------- #---------------------------------------------------------------------- # Window_MissionNum #---------------------------------------------------------------------- class Window_MissionNum < Window_Base #-------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------- def initialize super(400, 0, 240, 64) self.contents = Bitmap.new(width - 32, height - 32) refresh end #-------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------- def refresh self.contents.clear mis = Mission_Menu self.contents.font.color = system_color self.contents.draw_text(0, 0, 120, 32, "Missions:") self.contents.font.color = normal_color @mission_comp = [] @mission_know = [] #Calls Mission number of completed missions for i in 0...$game_party.mission.keys.size if $game_party.mission[$game_party.mission.keys[i]] == 3 @mission_comp.push(i) end end #Calls Mission number of missions for j in 0...$game_party.mission.keys.size if $game_party.mission[$game_party.mission.keys[j]] > 1 @mission_know.push(j) end end #if Mission_Setup is false... if mis::Mission_Setup == false if @mission_comp.size == $game_party.mission.size self.contents.font.color = Color.new(40, 250, 40, 255) self.contents.draw_text(0, 0, 208, 32, @mission_comp.size.to_s + "/" + $game_party.mission.size.to_s, 2) self.contents.font.color = normal_color else self.contents.draw_text(0, 0, 208, 32, @mission_comp.size.to_s + "/" + $game_party.mission.size.to_s, 2) end #if Mission_Setup is true... elsif mis::Mission_Setup == true if @mission_comp.size == @mission_know.size self.contents.font.color = Color.new(40, 250, 40, 255) self.contents.draw_text(0, 0, 208, 32, @mission_comp.size.to_s + "/" + @mission_know.size.to_s, 2) self.contents.font.color = normal_color else self.contents.draw_text(0, 0, 208, 32, @mission_comp.size.to_s + "/" + @mission_know.size.to_s, 2) end end end end #---------------------------------------------------------------------- # * End Window_Missionnum #---------------------------------------------------------------------- #---------------------------------------------------------------------- # Window_Missionlist #---------------------------------------------------------------------- class Window_Missionlist < Window_Selectable #-------------------------------------------------------------------- # * Attribute listings #-------------------------------------------------------------------- attr_accessor :mission #-------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------- def initialize super(0, 60, 260, 420) self.contents = Bitmap.new(width - 32, height - 32) self.index = 0 refresh end #-------------------------------------------------------------------- # * Mission #-------------------------------------------------------------------- def mission return @data[self.index] end #-------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end mis = Mission_Menu @data = [] for i in 0...$game_party.mission.keys.size if $game_party.mission[$game_party.mission.keys[i]] > 1 @data.push($game_party.mission.keys[i]) end end @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end end #-------------------------------------------------------------------- # * Draw_Item #-------------------------------------------------------------------- def draw_item(index) mis = Mission_Menu mission_name = @data[index] x = 4 y = index * 32 rect = Rect.new(x, y, self.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) if $game_party.mission[mission_name] == 3 self.contents.font.color = Color.new(40, 250, 40, 255) self.contents.draw_text(x, y, 228, 32, mis::Mission_Name[mission_name]) else self.contents.font.color = normal_color self.contents.draw_text(x, y, 228, 32, mis::Mission_Name[mission_name]) end end end #---------------------------------------------------------------------- # * End Window_Missionlist #---------------------------------------------------------------------- #---------------------------------------------------------------------- # Window_Missioncomp #---------------------------------------------------------------------- class Window_Missioncomp < Window_Base #-------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------- def initialize(mission) super(260, 365, 380, 115) self.contents = Bitmap.new(width - 32, height - 32) refresh(mission) end #-------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------- def refresh(mission) self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, 52, 440, 32, "Status:") self.contents.draw_text(170, 52, 440, 32, "Reward:") self.contents.font.color = normal_color #person place status reward mis = Mission_Menu if mis::Mission_Sprite.has_key?(mission) if $game_party.mission[mission] > 1 self.contents.draw_text(36, 6, 440, 32, mis::Mission_Sprite[mission][2] + ", " + mis::Mission_Sprite[mission][3]) case $game_party.mission[mission] when 1 self.contents.draw_text(62, 52, 400, 32, "") when 2 self.contents.draw_text(62, 52, 400, 32, "Incomplete") self.contents.draw_text(242, 52, 138, 32, "Unknown") when 3 self.contents.font.color = Color.new(40, 250, 40, 255) self.contents.draw_text(62, 52, 400, 32, "Complete") self.contents.draw_text(242, 52, 138, 32, mis::Mission_Sprite[mission][4]) end bitmap = RPG::Cache.character(mis::Mission_Sprite[mission][0], mis::Mission_Sprite[mission][1]) cw = bitmap.width / 4 ch = bitmap.height / 4 facing = 0 src_rect = Rect.new(0, facing * ch, cw, ch) self.contents.blt(0, 0, bitmap, src_rect) end end end def clear self.contents.clear end end #-------------------------------------------------------------------- # * Ends Window_Missioncomp #-------------------------------------------------------------------- #---------------------------------------------------------------------- # Window_Missiondesc #---------------------------------------------------------------------- class Window_Missiondesc < Window_Base #-------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------- def initialize(mission) super(260, 60, 380, 305) self.contents = Bitmap.new(width - 32, height - 32) end #-------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------- def refresh(mission) self.contents.clear mis = Mission_Menu self.contents.draw_text(0, 0, 348, 32, mis::Mission_L1[mission].to_s) self.contents.draw_text(0, 32, 348, 32, mis::Mission_L2[mission].to_s) self.contents.draw_text(0, 64, 348, 32, mis::Mission_L3[mission].to_s) self.contents.draw_text(0, 96, 348, 32, mis::Mission_L4[mission].to_s) self.contents.draw_text(0, 128, 348, 32, mis::Mission_L5[mission].to_s) self.contents.draw_text(0, 160, 348, 32, mis::Mission_L6[mission].to_s) self.contents.draw_text(0, 192, 348, 32, mis::Mission_L7[mission].to_s) self.contents.draw_text(0, 224, 348, 32, mis::Mission_L8[mission].to_s) end end #-------------------------------------------------------------------- # * Ends Window_Missiondesc #-------------------------------------------------------------------- #==================================== # Scene_MissionMenu #==================================== class Scene_MissionMenu #-------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------- # * Main #-------------------------------------------------------------------- def main @missionhelp_window = Window_Missionhelp.new @missionlist_window = Window_Missionlist.new @missionnum_window = Window_MissionNum.new @missioncomp_window = Window_Missioncomp.new(@missionlist_window.mission) @missiondesc_window = Window_Missiondesc.new(@missionlist_window.mission) @mission = @missionlist_window.mission @missiondesc_window.refresh(@missionlist_window.mission) @missioncomp_window.refresh(@missionlist_window.mission) Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @missionhelp_window.dispose @missiondesc_window.dispose @missioncomp_window.dispose @missionlist_window.dispose @missionnum_window.dispose end #-------------------------------------------------------------------- # * Update #-------------------------------------------------------------------- def update mis = Mission_Menu @missionlist_window.update @missionnum_window.update @missionhelp_window.update("Select a mission to see details.") if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) or Input.repeat?(Input::DOWN) or Input.repeat?(Input::UP) @missiondesc_window.refresh(@missionlist_window.mission) @missioncomp_window.refresh(@missionlist_window.mission) end if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new end end end #-------------------------------------------------------------------- # * Ends Scene_Missionmenu #-------------------------------------------------------------------- Demo: http://www.mediafire.com/?kyhmnbmulkjBug e conflitti noti: NA Edited April 26, 2013 by Dilos Applicato tag code. SE LA MEMORIA NON MI INGANNA, E MI INGANNA SPESSO... Link to comment Share on other sites More sharing options...
GeRrK Posted March 23, 2010 Share Posted March 23, 2010 Qualche screen no? E magari anche una demo non guasta! Link to comment Share on other sites More sharing options...
stefa168 Posted June 5, 2010 Share Posted June 5, 2010 (edited) Grazie! è utilissimo!! :smile: Solo che servirebbero un paio di spiegazioni in più sul funzionamento... Edited June 5, 2010 by stefa168 http://img14.imageshack.us/img14/9595/obbiettivogiocaconnoi.png Link to comment Share on other sites More sharing options...
Guardian of Irael Posted June 5, 2010 Share Posted June 5, 2010 Cosa non ti è chiaro? Non ho scaricato la demo, ma nello script vedo abbastanza istruzioni, ci sono anche esempi=beginDescription:Script per creare un diario Missioni. Caratteristiche: 1. Le missioni completate saranno visualizzate in verde.2. Le missioni sono numerate per ordinarle come meglio si crede Istruzioni:Inserire sopra il main Per attivare una missione usare questa stringa $game_party.mission[mission_id] = x Sostituire Mission_id con il numero della missione da attivare sostituire la X con:1 = la missione è conosciuta ma non appare nella lista2 = la missione è conosciuta e appare sulla lista3 = la missione è completa. Ho me delle missioni defaud come esempio^ ^ (\_/)(^ ^) <----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...
stefa168 Posted June 9, 2010 Share Posted June 9, 2010 Mi da errore sulla linea 343 de tipo 'TypeError'cannot convert nil into String http://img14.imageshack.us/img14/9595/obbiettivogiocaconnoi.png Link to comment Share on other sites More sharing options...
lupins Posted June 15, 2010 Author Share Posted June 15, 2010 Mi da errore sulla linea 343 de tipo 'TypeError'cannot convert nil into Stringa me funziona benissimo SE LA MEMORIA NON MI INGANNA, E MI INGANNA SPESSO... Link to comment Share on other sites More sharing options...
dark-heart Posted June 15, 2010 Share Posted June 15, 2010 Ho aggiunto questo utilissimo script che tra l'altro cercavo ^^ Ma unico problema è che non c'è una finestra per le missioni e perciò come le vedo? Link to comment Share on other sites More sharing options...
Guardian of Irael Posted June 15, 2010 Share Posted June 15, 2010 Non ho provato, ma credo che per far apparire la finestra delle missioni devi richiamare lo script in questo modo (dal comando evento script, l' ultimo dei comandi evnto):per richiamare lo script usare questa stringa : $scene = Scene_MissionMenu.new^ ^ (\_/)(^ ^) <----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...
dark-heart Posted June 19, 2010 Share Posted June 19, 2010 Ho bisogno di un aiuto... Ho fatto in modo che usando un libro dal inventario si accede al diario delle missioni. Faccio un test e quasi tutto va bene, ossia lo script in se per se sembra funzionare ma le scritte non ci sono. (Infatti lo script non specifica l'utilizzo di nessuna font) Allora cosa ho fatto, ho aggiunto una font io dato che è una cosa che penso mi riesca il risultato alla fine è che se metto: self.contents.font.name = "Monotype Corsiva" nelle rispettive parti testuali tranne che nella seguente parte: #--------------------------------------------------------------------# * Refresh#--------------------------------------------------------------------def refresh(mission)self.contents.clearmis = Mission_Menuself.contents.draw_text(0, 0, 348, 32, mis::Mission_L1[mission].to_s)self.contents.draw_text(0, 32, 348, 32, mis::Mission_L2[mission].to_s)self.contents.draw_text(0, 64, 348, 32, mis::Mission_L3[mission].to_s)self.contents.draw_text(0, 96, 348, 32, mis::Mission_L4[mission].to_s)self.contents.draw_text(0, 128, 348, 32, mis::Mission_L5[mission].to_s)self.contents.draw_text(0, 160, 348, 32, mis::Mission_L6[mission].to_s)self.contents.draw_text(0, 192, 348, 32, mis::Mission_L7[mission].to_s)self.contents.draw_text(0, 224, 348, 32, mis::Mission_L8[mission].to_s)endend provando quindi SENZA il codice riguardante la font funziona tutto tranne che le line che descrivono la quest non si vedono proprio perché non ho messo la font. Se pero provo a mettere la font Anche li o crasha tutto subito oppure crasha dopo aver cambiato per la seconda volta la quest selezionata. Come posso fare? lo provate tutte :'( Link to comment Share on other sites More sharing options...
dark-heart Posted June 21, 2010 Share Posted June 21, 2010 (edited) Nessun aiuto? Edited June 21, 2010 by dark-heart Link to comment Share on other sites More sharing options...
Aidan Posted June 21, 2010 Share Posted June 21, 2010 (edited) scusa ma te hai scaricato la demo ma non ti si vedono comunque le scritte? io mi chiedo invece come fare per togliere del tutto le quest completate, senza farle diventare verdi o cose del genere Edited June 21, 2010 by Aidan Link to comment Share on other sites More sharing options...
dark-heart Posted June 22, 2010 Share Posted June 22, 2010 Sia che nella demo sia che nel gioco le scritte non si vedono tranne che io metta le mani sul codice inserendo self.contents.font.name = "Monotype Corsiva". Pero come ho detto prima se metto questa riga nella parte che interessa le scritte della descrizione il gioco crasha con un errore non inerente al codice. Link to comment Share on other sites More sharing options...
Aidan Posted June 22, 2010 Share Posted June 22, 2010 mmm....per caso adoperi il main di Dad o quello standard? Link to comment Share on other sites More sharing options...
Aliuzz96 Posted June 22, 2010 Share Posted June 22, 2010 (edited) Questo script permette di avere un sistema locanda,ma permette anche di aggiornare tutte le classi presenti e diadattare la libreria RGSS a tutti i giochi,Dark herat,sicuramente ti sarà successo di non trovare font in giochi in cui avevi cambiato libreria,ora basta solo incollare questo script per risolvere questi problemi,io lo uso sempre e essendo un makeratore a livelli discreti io ne ho fatto uso per ben due anni. #======================================================================# ** The Complete Windowskin Color, Faceset & Inn System#-------------------------------------------------------------------------------# by DerVVulfman# Version 2# 01-17-06#------------------------------------------------------------------------------# ** Script Modules Added:# Module RPG(Bitmap) .. Editable: For default Font & Font Size## ** Script Pages Modified:# Game_Temp .. Editable: For all custom systems# Window_Base .. added draw_actor_portrait & edited draw_class# modified get_text_color 'n etc. for windowskin system# Window_Selectable .. added draw_actor_portrait for Window_Message# Window_MenuStatus .. edited refresh to include facesets# Window_Status .. edited refresh to include facesets# Window_SaveFile .. edited initialize & refresh to include facesets # Window_NameEdit .. edited refresh to include facesets# Window_Message .. edited refresh & reset_window for faceset system# Scene_File .. edited main and update for faceset system# Scene_Save .. edited write_save_data to include facesets# Scene_Load .. edited read_save_data to include facesets## ** Script Pages Added:# Faceset .. called routine to display facesets in messages & inn# Scene_Inn .. called routine to recreate the RM2K inn# Window_Inn .. window screens for the inn system##------------------------------------------------------------------------------## * WINDOWSKIN COLORS *## By using my script, and a suitably modified windowskin, you can have sixteen# preset colors in your game. You can also SWITCH between your color schemes# by switching windowskins.## Because the system now allows for 16 colors, so too does the message system.# Instead of /c being a range of 0-7, it now allows values from 0-15!## NOTE: While I designed the system, I did adapt a couple of color value defs# so my windowskins system is compatable with RPG Advocate's Advanced# Equipment, Cursed Items, etc. systems.## Though, making a couple of specifically named defs that return colors# isn't hard at all. I just like the way he made those systems. :)## Let us review, using my base windowskin's colorset - made w/ default colors:## Colors 0 to 7# #1) ( /c[0]) White (Normal)# #2) ( /c[1]) Bluish # #3) ( /c[2]) Pinkish# #4) ( /c[3]) SeaGreen# #5) ( /c[4]) SkyBlue# #6) ( /c[5]) Lavender# #7) ( /c[6]) Off-White Gold# #8) ( /c[7]) Light Gray# Colors 8 to 15 (not originally available in the message system)# #9) ( /c[8]) Cloud Gray (System)# #10) ( /c[9]) Yellow (Distress)# #11) (/c[10]) Red (Knockout)# #12) (/c[11]) Gold/Orange (Required)# #13) (/c[12]) Purple (Cursed)# #14) (/c[13]) Green (Attr. Up)# #15) (/c[14]) Dark Gray (Attr. Down & Disabled) # #16) (/c[15]) Black ##------------------------------------------------------------------------------## * FACESET *## This script allows you to display facesets in message boxes in roughly the # same manner as in RM2K / RM2K3. You do so by calling a script:## Script: FaceSet.new(filename,index)# filename = bmp, jpg, or png filename in pictures directory holding images# index = index number of image in file## EXAMPLE: Faceset.new("portrait",6)# # This command actually does a number of things:# 1) It checks and makes sure that a graphic image named "Portrait" is in the# Graphics\Pictures directory# 2) It saves that filename into the value "message_box_image" in Game_Temp# 3) It saves that you, the scripter, has chosen image #6 in the image file.## After that, when you make a message box, the box will display the 6th image# from the "portrait" file. It will widen to accept both the image AND the# accompanying text. IF there is no "portrait" file, IF there is no 6th image,# or IF you run the command...## Faceset.new()## ... then, you erase the Faceset from memory, and the message box returns to# it's normal default size.# # NOTE: The faceset images must be exactly 96 x 96 in size. That is exactly# double the size of the old RM2K faceset size. It does NOT matter if# the image stores them in in a single row of five, two rows of 20, or# ten rows of 20! It counts how many rows and how many columns. Your# faceset image can be any size!## NOTE: This system is being designed for Faceset Styled Menus (like RM2K),# with the idea of utilizing a default faceset. In it, the first hero's# image will be index #1, the second's will be #2, etc.##------------------------------------------------------------------------------## * INN SYSTEM *## This script allows you to bring up inns in almost the same manner as those # in RM2K / RM2K3. You do so by calling a script:## Script: $scene = Scene_Inn.new()## But, it also relies on values stored in Game_Temp in order to operate:# (inn_message1 to inn_message7, inn_price, inn_music AND inn_switch)## Descriptions: inn_message1: The welcoming message when first turned on.# inn_message2: A text string showing how much it costs.# inn_message3: This holds the "Not enough money!" string# inn_message4: Here, you taunt the customer to staying.# inn_message5: The ever popular "Have a pleasant stay."# inn_message6: Your character can say "Sure, why not?"# inn_message7: Here, your character refuses to stay.# inn_price: This is the value taken from the party.# inn_music: A light ME (music effect) file for staying.# inn_switch: You can specify a switch here, so you can# make a decision if the hero stayed at an inn.## NOTE: This system ALSO works with the FACESET system, so you can utilize# facesets with it, or not!## NOTE: In order to make line breaks (multiple lines) in the inn_messages, # the special RMXP code "\n" is the key. As an example:## $game_temp.inn_message4 = "You gotta be kidding!/nYou wanna stay, right?"## would display.## You gotta be kidding!# You wanna stay, right?##============================================================================== #==============================================================================# ** Module RPG (Editable Portion)#------------------------------------------------------------------------------# This class handles the default font settings for all window screens that are# not modified by any other code. As it begins before Game_Temp, the Fontname# and Fontsize of the Title Screen is controlled here, as well as all of the# unmodified menus.#============================================================================== module RPG class Bitmap < ::Bitmap Font.default_name = "Comic Sans MS" Font.default_size = 24 Font.default_bold = false Font.default_italic = false Font.default_color = Color.new(255,255,255,255) endend # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- #==============================================================================# ** Game_Temp (Script Edit / Editable Portion)#------------------------------------------------------------------------------# This class handles temporary data that is not included with save data.# Refer to "$game_temp" for the instance of this class.#------------------------------------------------------------------------------# This edit allows the scripts to control the size & typeface of the script's# menu screens. If other menus are added, you may wish to refer to the values# recorded here.## It also stores the values used in the faceset system.#============================================================================== class Game_Temp #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :faceset_system attr_accessor :faceset_file attr_accessor :message_box_image attr_accessor :message_box_image_index # CUSTOM: For Inn System attr_accessor :inn_message1 attr_accessor :inn_message2 attr_accessor :inn_message3 attr_accessor :inn_message4 attr_accessor :inn_message5 attr_accessor :inn_message6 attr_accessor :inn_message7 attr_accessor :inn_price attr_accessor :inn_music attr_accessor :inn_switch #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias initialize_game_temp initialize def initialize initialize_game_temp # Custom Screen Font (if used) $fontname = "Comic Sans MS" $fontsize = 24 # Faceset System @faceset_system = true # If menus use facesets (true) @faceset_file = "Actors" # Faceset file for heroes in menu. @message_box_image = "" # File for non-menu windows (leave empty) @message_box_image_index = nil # Index of image IN picture file # Inn System @inn_message1 = "Benvenuti nella mia locanda!." @inn_message2 = "Il costo è di 50 Gladon." @inn_message3 = "Non hai abbastanza Gladon." @inn_message4 = "Sicuro?." @inn_message5 = "Buonanotte!." @inn_message6 = "Resto." @inn_message7 = "Non resto." @inn_price = 50 @inn_music = "014-Inn01" @inn_switch = 0 end #-------------------------------------------------------------------------- # * End of Class #-------------------------------------------------------------------------- end # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- #==============================================================================# ** FaceSet#------------------------------------------------------------------------------# This class allows Faceset graphics to appear in Text Boxes.#============================================================================== class FaceSet #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize (file = "", number = nil) # Assume no faceset file being loaded $game_temp.message_box_image = "" # Make sure it is a valid picture (in 1 of 3 formats...) # and load faceset from Pictures directory if FileTest.exist?("Graphics/Pictures/" + file + ".bmp") $game_temp.message_box_image = file end if FileTest.exist?("Graphics/Pictures/" + file + ".jpg") $game_temp.message_box_image = file end if FileTest.exist?("Graphics/Pictures/" + file + ".png") $game_temp.message_box_image = file end # if no valid number, erase loaded faceset file if number == nil $game_temp.message_box_image = "" end # Set number of faceset in image $game_temp.message_box_image_index = number end #-------------------------------------------------------------------------- # * End of Class #-------------------------------------------------------------------------- end # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- #==============================================================================# ** Window_Base (Reduced Actor class text width)#------------------------------------------------------------------------------# This class is for all in-game windows.#============================================================================== #==============================================================================# ** Window_Selectable (Added draw_actor_portrait)#------------------------------------------------------------------------------# This window class contains cursor movement and scroll functions.#============================================================================== class Window_Selectable < Window_Base #-------------------------------------------------------------------------- # * Draw Portrait # number : image number in file # x : draw spot x-coordinate # y : draw spot y-coordinate #-------------------------------------------------------------------------- def draw_actor_portrait(number, x, y, hue=0, opacity=255) filename = $game_temp.faceset_file # Obtain faceset bitmap from Picture directory bitmap = RPG::Cache.picture(filename) # Obtain number of images in bitmap (96 x 96 frames) cw = bitmap.width ch = bitmap.height x_pic = cw / 96 y_pic = ch / 96 # Begin Loop to obtain image location from faceset i = 0 xpos = 0 ypos = 0 for i in 1..number xpos = xpos + 1 if xpos > x_pic xpos = 1 ypos = ypos + 1 if ypos > y_pic ypos = 1 end end end # Calculate pixel coordinates of image xpos = xpos - 1 xpos = xpos * 96 ypos = ypos * 96 # Display desired image at location src_rect = Rect.new(xpos, ypos, 96, 96) self.contents.font.name = "Comic Sans MS" self.contents.font.size = 24 self.contents.blt(x , y, bitmap, src_rect,opacity) self.contents.hue_change(hue) end #-------------------------------------------------------------------------- # * End of Class #-------------------------------------------------------------------------- end # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- #==============================================================================# ** Window_Inn#------------------------------------------------------------------------------# This window shows the bartering message of innkeepers#============================================================================== class Window_Inn < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 160) @face_indent = 0 self.contents = Bitmap.new(width - 192, height - 32) if $game_temp.message_box_image != "" @x = @face_indent = 128 end end #-------------------------------------------------------------------------- # * Set Text # text : text string displayed in window # # NOTE: As each letter is drawn, it removed and erased "text" and any # value linked to it. Strange as it seemed, I had to use another # value @text2 and build it up, piece by piece from the dismantled # text, and had to include any line breaks (\n) that it encountered. #-------------------------------------------------------------------------- def set_text(text, index = 1) # Clear window self.contents.font.name = "Comic Sans MS" self.contents.font.size = 24 self.contents.clear # Save menu faceset @tempfile = $game_temp.faceset_file $game_temp.faceset_file = $game_temp.message_box_image # Draw portrait if $game_temp.message_box_image != "" draw_actor_portrait($game_temp.message_box_image_index, 8, 16) end # Reset menu faceset $game_temp.faceset_file = @tempfile # Set empty space for temp string @text2 = "" # Text Position Reset x = y = 0 # Get 1 text character in c (loop until unable to get text) while ((c = text.slice!(/./m)) != nil) # If new line text if c == "\n" # Add line break to @text2 @text2.concat("\n") # Add 1 to y y += 1 # Reset x to 0 x = 0 # go to next text next end # Draw text #---------------------------------------------------------------------- # * Draw text using the calculated margin #---------------------------------------------------------------------- self.contents.font.name = "Comic Sans MS" self.contents.font.size = 24 self.contents.draw_text(4 + x + @face_indent, 32 * y, 40, 32, c) #---------------------------------------------------------------------- # * End #---------------------------------------------------------------------- # Add x to drawn text width x += self.contents.text_size©.width # Add sliced character to @text2 @text2.concat© end # Show inn message window self.visible = true # Which message case index when 1 # Restore message to welcome $game_temp.inn_message1 = @text2 when 2 # Restore message to price $game_temp.inn_message2 = @text2 when 3 # Restore message to no sale $game_temp.inn_message3 = @text2 when 4 # Restore message to hard sale $game_temp.inn_message4 = @text2 when 5 # Restore message to goodnight $game_temp.inn_message5 = @text2 end end #-------------------------------------------------------------------------- # * End of Class #--------------------------------------------------------------------------end # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- #---------------------------------------------------------- # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- # # -----------------------------------------------------------------------------# -----------------------------------------------------------------------------# ----------------------------------------------------------------------------- #==============================================================================# ** Scene_Inn (NEW SCRIPT)#------------------------------------------------------------------------------# This class performs inn screen processing.#==============================================================================class Scene_Inn #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize() # Load values stored in $Game_Temp # That way, you can change 'em or store 'em @welcome = $game_temp.inn_message1 @the_price = $game_temp.inn_message2 @no_rest = $game_temp.inn_message3 @hard_sale = $game_temp.inn_message4 @goodnight = $game_temp.inn_message5 @command1 = $game_temp.inn_message6 @command2 = $game_temp.inn_message7 @price = $game_temp.inn_price @music = $game_temp.inn_music @switch_id = $game_temp.inn_switch end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Set game switch to inn's switch id # (Turned on if inn is used, off if not) $game_switches[@switch_id] = false # Copy the background map @spriteset = Spriteset_Map.new # Make the inn window @inn_window = Window_Inn.new # Display the welcome text @inn_window.set_text(@welcome, 1) # Make a decision window (set to visible / active) @selection= Window_Command.new(160, [@command1, @command2]) @selection.back_opacity = 0 @selection.visible = true @selection.active = true # Make an options window (set to invisible / inactive) @option = Window_Command.new(160, ["Si", "No"]) @option.back_opacity = 0 @option.visible = false @option.active = false # Make the gold window @money = Window_Gold.new @money.x = 480 # Set inn window vertically case $game_system.message_position when 0 @inn_window.y = 0 when 1 @inn_window.y = 160 when 2 @inn_window.y = 320 end # Set decision, options & money windows based on inn window @selection.y = @inn_window.y + 64 @money.y = @inn_window.y @selection.x = @inn_window.width - @selection.width @option.y = @inn_window.y + 64 @option.x = @inn_window.width - @option.width @option.y = @selection.y # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Refresh map $game_map.refresh # Prepare for transition Graphics.freeze # Dispose of spriteset background @spriteset.dispose # Dispose of windows @inn_window.dispose @selection.dispose @option.dispose @money.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update spriteset @spriteset.update # Update windows @inn_window.update @selection.update @option.update @money.update # If selection window is active: update_selection if @selection.active update_selection return end # If option window is active: update_options if @option.active update_options return end end #-------------------------------------------------------------------------- # * Selection Update #-------------------------------------------------------------------------- def update_selection # If B button is pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Pause for some time delay(25) # Switch to map $scene = Scene_Map.new return end # If C button is pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Choose based on decision case @selection.index # If choice is True / Yes when 0 # Disable the selection window @selection.visible = false @selection.active = false # Enable the option menu @option.active = true @option.visible = true # Display the price text @inn_window.set_text(@the_price,2) @the_price = $game_temp.inn_message2 # If choice is False / No when 1 # Pause for some time delay(25) # Switch to map $scene = Scene_Map.new end end end #-------------------------------------------------------------------------- # * Options Update #-------------------------------------------------------------------------- def update_options # Get current gold @value = $game_party.gold # If B button is pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Disable option menu @option.active = false @option.visible = false # Enable selection menu @selection.active = true @selection.visible = true # Return to inn menu return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Choose based on decision case @option.index # If choice is true / Yes when 0 # If gold is not enough if @value < @price # Play buzzer SE $game_system.se_play($data_system.buzzer_se) # Display money short message @inn_window.set_text(@no_rest,3) @no_rest = $game_temp.inn_message3 # Pause for some time delay(25) # Switch to map screen $scene = Scene_Map.new return end # If gold is enough # Pay the inn $game_party.lose_gold(@price) @money.refresh # Play inn melody Audio.me_play("Audio/ME/" + $game_temp.inn_music, 80, 80) # Pay the inn $game_party.lose_gold(@price) @money.refresh # Restore actors at the inn for i in 0...$game_party.actors.size @actor = $game_party.actors @actor.hp = @actor.maxhp @actor.sp = @actor.maxsp end # Pause for some time delay(15) # Prepare for transition Graphics.transition(40) # Display goodnight message @inn_window.set_text(@goodnight, 50) # Pause for some time delay(25) # Switch to map scene $scene = Scene_Map.new # Success: Flag the inn's switch ON $game_switches[@switch_id] = true # If choice is false / No when 1 # Display hard sale message @inn_window.set_text(@hard_sale,4) @hard_sale = $game_temp.inn_message4 # Disable option menu @option.active = false @option.visible = false # Enable selection menu @selection.active = true @selection.visible = true end end end #-------------------------------------------------------------------------- # * Delay System #-------------------------------------------------------------------------- def delay(wait) count = Graphics.frame_count while wait + count >= Graphics.frame_count Graphics.update end end #-------------------------------------------------------------------------- # * End of Class #--------------------------------------------------------------------------end P.S.Scusate se ho sondato il layout... Edited June 22, 2010 by Aliuzz96 PROGETTI IN CORSO: http://img88.imageshack.us/img88/8484/bannerfirmabetatester.jpg ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------In chat il mio nickname sarà Aleks o Al, mi pento ancora di essermi messo il nick tamarro di Aliuzz.ç_ç http://img571.imageshack.us/img571/6659/alicei.pngmembro ufficiale fondatore n4 di mrfruffolobatuffolohttp://img717.imageshack.us/img717/4789/mrfruffolobanner.jpg Rudo:Ti ringrazio. Ci misi tutto me stesso diversi anni fa per realizzare CrystalQuest. Sebbene la mia visione sia cambiata con il passare del tempo, ci sono molti aspetti che manterrei se dovessi (per assurdo) realizzare una nuova avventura oggi. Questo non accade tutti i giorni,sono commosso.ç_ç Orgoglioso membro del trio *o* Link to comment Share on other sites More sharing options...
Pech Posted August 28, 2011 Share Posted August 28, 2011 Scusate ma come si fa a fare apparire nel menù la scritta missioni oppure più semplicemente richiamarle con un tasto? Votaci su GAMEJOLT Seguici su Facebook, Twitter e sul nostro Canale Youtube per tenerti costantemente aggiornato 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