Alato Posted December 16, 2007 Share Posted December 16, 2007 In questo laboratorio non spiegher? nulla, o meglio, vi proporr? degli script da fare e in generale degli esercizi e se avrete problemi vi dar? una mano.Non c'? limite di gradi o quant'altro, potete partecipare tutti.Ovviamente potete partecipare anche ai laboratori pi? vecchi e riceverete comunque risposta.Questo laboratorio ? stato diviso in "Esercizio base" e "Variante difficile" in modo tale da permettere anche a chi non ha mai trafficato con l'rgss di partecipare. Almeno spero.Laboratorio 2Esercizio FacileCambia il nome dei comandi nella schermata del titolo da [Nuovo, Carica, Esci] a [Nuovo, Esci, Carica].Se riesci inverti anche l'effetto oltre al nome (in modo che se il giocatore preme su Esci, esce, e se preme su Carica carica una partita).Variante DifficileAggiungi il comando "Extra" tra Carica e Esci. Questo comando aprir? una nuova scena (Scene_Extra) in cui sar? possibile visualizzare immagini del gioco (ovviamente metti immagini a caso).Scene_extra dovr? essere impostata in modo tale da:? Mostrare le immagini al centro dello schermo? Cambiare immagine premendo Destra o Sinistra? Premendo esc si torna al menu? Premendo invio si ottiene un effetto sonoro di erroreSe riesci fai in modo che alcune immagini siano visualizzabili e altre no, in base a ci? che viene fatto nel gioco. Per mostrare l'immagine "non visualizzabile" utilizzate un immagine fissa con scritto BLOCCATO per esempio.Ulteriore Variante Perchihavogliadiesercitarsi?Fare la stessa cosa della variante difficile, senza creare una nuova scena (tutto all'interno di Scene_title insomma).Soluzione Variante Difficile Spoiler Questa ? una possibile soluzione alla Variante Difficile. Sottolineo che per ora ho ignorato la parte del "visualizzabili o no" perch? aspetto che qualcuno almeno provi a farla.Cominciamo andando a inserire in Scene_Title quelle parti necessarie a richiamare Scene_Extra.In main: # Creazione testi s1 = "Nuovo" s2 = "Carica" s3 = "Extra" s4 = "Esci" @command_window = Window_Command.new(164, [s1, s2, s3, s4])In update: if Input.trigger?(Input::C) # I vari casi a seconda della posizione del cursore case @command_window.index when 0 # Nuovo Gioco command_new_game when 1 # Carica command_continue when 2 # Extra command_extra when 3 # Esci command_shutdown end endDopo command_continue: #-------------------------------------------------------------------------- # - Comando: Extra #-------------------------------------------------------------------------- def command_extra # Suona SE azione $game_system.se_play($data_system.decision_se) # Passa alla scena extra $scene = Scene_Extra.new endE infine la nostra Scene_Extra: #============================================================================== # - Scene_Extra #------------------------------------------------------------------------------ # La scena coi contenuti extra #============================================================================== class Scene_Extra #-------------------------------------------------------------------------- # - Processo Principale #-------------------------------------------------------------------------- def main # Inizializza l'indice @pic_index = 0 # Inizializza la picture @picture = Sprite.new @picture.bitmap = Bitmap.new(640,480) @picture.x = 320 @picture.y = 240 # Fade Graphics.transition loop do # Aggiornamento Grafica Graphics.update # Aggiornamento Input Input.update # Aggiornamento Frame update # Quando cambia la scena blocca il loop if $scene != self break end end # Preparazione Fade Graphics.freeze # Eliminazione picture @picture.dispose end #-------------------------------------------------------------------------- # - Aggiornamento Frame #-------------------------------------------------------------------------- def update # Quando SX ? premuto if Input.repeat?(Input::LEFT) # Se l'indice ? 0 deve ritornare # al valore 4 if Input.trigger?(Input::LEFT) or @pic_index > 0 # Suona SE Cursore $game_system.se_play($data_system.cursor_se) # Riduci l'indice @pic_index = (@pic_index - 1) % 5 return end end # Quando DX ? premuto if Input.repeat?(Input::RIGHT) # Se l'indice ? 4 deve ritornare # al valore 0 if Input.trigger?(Input::RIGHT) or @pic_index < 4 # Suona SE Cursore $game_system.se_play($data_system.cursor_se) # Aumenta l'indice @pic_index = (@pic_index + 1) % 5 return end end # Quando B ? premuto if Input.trigger?(Input::B) # Suona SE Annulla $game_system.se_play($data_system.cancel_se) # Torna alla mappa $scene = Scene_Title.new return end # Quando C ? premuto if Input.trigger?(Input::C) # Suona SE Azione Impossibile $game_system.se_play($data_system.buzzer_se) return end # Seleziona l'immagine pic = @pic_index + 1 @picture.bitmap= RPG::Cache.picture(pic.to_s+".png") # Centra l'immagine @picture.ox = @picture.bitmap.width / 2 @picture.oy = @picture.bitmap.height / 2 @picture.update return end endSta parte si poteva fare meglio, per esempio facendo in modo che le nuove coordinate della pic e il relativo update vengano calcolate solo quando si entra nella scena o viene cambiato l'indice. o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Khan Posted December 16, 2007 Share Posted December 16, 2007 Eseguito l'esercizio facile Nel main della scene title s1 = "Nuovo" s2 = "Esci" s3 = "Carica" @command_window = Window_Command.new(192, [s1, s2, s3]) [...] if @continue_enabled @command_window.index = 2 else @command_window.disable_item(2) end E nell'update def update @command_window.update if Input.trigger?(Input::C) case @command_window.index when 0 command_new_game when 2 command_continue when 1 command_shutdown end end end Appena ho tempo mi metto a fare l'esercizio difficile It's online... It's Endless... And It's an RPG...OERPG PROJECT by http://rpgart.org/ Link to comment Share on other sites More sharing options...
marigno Posted December 17, 2007 Share Posted December 17, 2007 Ecco l'esercizio facile: #============================================================================== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs title screen processing. #============================================================================== class Scene_Title #-------------------------------------------------------------------------- # * Main Processing # * Modifica nell'ordine dei nomi #-------------------------------------------------------------------------- def main # If battle test if $BTEST battle_test return end # Load database $data_actors = load_data("Data/Actors.rxdata") $data_classes = load_data("Data/Classes.rxdata") $data_skills = load_data("Data/Skills.rxdata") $data_items = load_data("Data/Items.rxdata") $data_weapons = load_data("Data/Weapons.rxdata") $data_armors = load_data("Data/Armors.rxdata") $data_enemies = load_data("Data/Enemies.rxdata") $data_troops = load_data("Data/Troops.rxdata") $data_states = load_data("Data/States.rxdata") $data_animations = load_data("Data/Animations.rxdata") $data_tilesets = load_data("Data/Tilesets.rxdata") $data_common_events = load_data("Data/CommonEvents.rxdata") $data_system = load_data("Data/System.rxdata") # Make system object $game_system = Game_System.new # Make title graphic @sprite = Sprite.new @sprite.bitmap = RPG::Cache.title($data_system.title_name) # Make command window s1 = "Nuovo" s2 = "Esci" s3 = "Carica" @command_window = Window_Command.new(192, [s1, s2, s3]) @command_window.back_opacity = 160 @command_window.x = 320 - @command_window.width / 2 @command_window.y = 288 # Continue enabled determinant # Check if at least one save file exists # If enabled, make @continue_enabled true; if disabled, make it false @continue_enabled = false for i in 0..3 if FileTest.exist?("Save#{i+1}.rxdata") @continue_enabled = true end end # If continue is enabled, move cursor to "Continue" # If disabled, display "Continue" text in gray if @continue_enabled @command_window.index = 1 else @command_window.disable_item(1) end # Play title BGM $game_system.bgm_play($data_system.title_bgm) # Stop playing ME and BGS Audio.me_stop Audio.bgs_stop # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of command window @command_window.dispose # Dispose of title graphic @sprite.bitmap.dispose @sprite.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update command window @command_window.update # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 0 # Nuovo command_new_game when 1 # Esci command_shutdown when 2 # Carica command_continue end end end #-------------------------------------------------------------------------- # * Command: New Game #-------------------------------------------------------------------------- def command_new_game # Play decision SE $game_system.se_play($data_system.decision_se) # Stop BGM Audio.bgm_stop # Reset frame count for measuring play time Graphics.frame_count = 0 # Make each type of game object $game_temp = Game_Temp.new $game_system = Game_System.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.new $game_screen = Game_Screen.new $game_actors = Game_Actors.new $game_party = Game_Party.new $game_troop = Game_Troop.new $game_map = Game_Map.new $game_player = Game_Player.new # Set up initial party $game_party.setup_starting_members # Set up initial map position $game_map.setup($data_system.start_map_id) # Move player to initial position $game_player.moveto($data_system.start_x, $data_system.start_y) # Refresh player $game_player.refresh # Run automatic change for BGM and BGS set with map $game_map.autoplay # Update map (run parallel process event) $game_map.update # Switch to map screen $scene = Scene_Map.new end #-------------------------------------------------------------------------- # * Command: Continue #-------------------------------------------------------------------------- def command_continue # If continue is disabled unless @continue_enabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to load screen $scene = Scene_Load.new end #-------------------------------------------------------------------------- # * Command: Shutdown #-------------------------------------------------------------------------- def command_shutdown # Play decision SE $game_system.se_play($data_system.decision_se) # Fade out BGM, BGS, and ME Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) # Shutdown $scene = nil end #-------------------------------------------------------------------------- # * Battle Test #-------------------------------------------------------------------------- def battle_test # Load database (for battle test) $data_actors = load_data("Data/BT_Actors.rxdata") $data_classes = load_data("Data/BT_Classes.rxdata") $data_skills = load_data("Data/BT_Skills.rxdata") $data_items = load_data("Data/BT_Items.rxdata") $data_weapons = load_data("Data/BT_Weapons.rxdata") $data_armors = load_data("Data/BT_Armors.rxdata") $data_enemies = load_data("Data/BT_Enemies.rxdata") $data_troops = load_data("Data/BT_Troops.rxdata") $data_states = load_data("Data/BT_States.rxdata") $data_animations = load_data("Data/BT_Animations.rxdata") $data_tilesets = load_data("Data/BT_Tilesets.rxdata") $data_common_events = load_data("Data/BT_CommonEvents.rxdata") $data_system = load_data("Data/BT_System.rxdata") # Reset frame count for measuring play time Graphics.frame_count = 0 # Make each game object $game_temp = Game_Temp.new $game_system = Game_System.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.new $game_screen = Game_Screen.new $game_actors = Game_Actors.new $game_party = Game_Party.new $game_troop = Game_Troop.new $game_map = Game_Map.new $game_player = Game_Player.new # Set up party for battle test $game_party.setup_battle_test_members # Set troop ID, can escape flag, and battleback $game_temp.battle_troop_id = $data_system.test_troop_id $game_temp.battle_can_escape = true $game_map.battleback_name = $data_system.battleback_name # Play battle start SE $game_system.se_play($data_system.battle_start_se) # Play battle BGM $game_system.bgm_play($game_system.battle_bgm) # Switch to battle screen $scene = Scene_Battle.new end end Ho una domanda, Alato, cambiando l'ordine dei nomi, dove prima c'era carica ora c'è Esci, ma con lo stesso effetto del testo. Mi spiego meglio con uno screen: Come posso correggere questo errore? Grazie. Link to comment Share on other sites More sharing options...
Alato Posted December 17, 2007 Author Share Posted December 17, 2007 Guarda questo pezzo del main:if @continue_enabled @command_window.index = 1 else @command_window.disable_item(1) enddovresti riuscire a capire il senso, dal nome delle variabili (l'inglese è fondamentale).Se capisci il senso capisci anche cosa modificare. Se proprio non ti viene in mente guarda il post di Khan che ha fatto tutto giusto. p.s. se modificate uno script esistente evitate di incollare tutta la classe, scrivete invece le aggiunte/modifiche fatte. o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
marigno Posted December 17, 2007 Share Posted December 17, 2007 Ma certo! Mi bastava sapere dov'era la parte che mi interessava.Comunque ho modificato i numeri a due, e funziona. :D# If continue is enabled, move cursor to "Continue" # If disabled, display "Continue" text in gray if @continue_enabled @command_window.index = 2 else @command_window.disable_item(2) end Grazie Ala. Farò in modo di postare, d'ora in poi, solo le parti modificate e aggiunte. ^^ Link to comment Share on other sites More sharing options...
Alato Posted December 19, 2007 Author Share Posted December 19, 2007 Per gli interessati: ci sono problemi per la variante difficile? Se ci sono non esitate a parlare, mi pare strano che finora sia filato tutto liscio (senza offesa eh XD). o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Khan Posted December 19, 2007 Share Posted December 19, 2007 Direi alto mare. Non mi fa vedere le immagini che le ho chiamate 1 e 2 class Scene_Extra def main @picture=Sprite.new @picture.bitmap=Bitmap.new(640,320) @imm=1 loop do Graphics.update Input.update aggiorna if $scene!=self break end end @picture.dispose Graphics.freeze end def aggiorna if Input.trigger?(Input::LEFT) @imm-=1 end if Input.trigger?(Input::RIGHT) @imm+=1 end @picture.bitmap= RPG::Cache.picture(@imm.to_s) @picture.update return end endSapresti illuminarmi? XD It's online... It's Endless... And It's an RPG...OERPG PROJECT by http://rpgart.org/ Link to comment Share on other sites More sharing options...
Alato Posted December 19, 2007 Author Share Posted December 19, 2007 Una cosa carina del ruby è che puoi gestirti in modo abbastanza immediato le stringhe di caratteri... nello specifico puoi sommare diverse stringhe o variabili direttamente utilizzando +. Per farti un esempio se tu scrivi:text1 = "Ciao, io sono" nome = "Manuel" text2 = text1 + " " + nome + "."All'interno di @text2 sarà memorizzata la stringa "Ciao, io sono Manuel." Ora andiamo a vedere nella riga in cui scrivi@picture.bitmap= RPG::Cache.picture(@imm.to_s)All'interno delle parentesi è come se stessi scrivendo "1", oppure "2" etc. Quindi il programma andrà a cercare nella cartella Picture un file chiamato "1", per esempio. Noterai che questo sicuramente non esiste, perché al massimo esisterà un "1.png" (o "1.jpg").Non ho guardato bene il resto del codice quindi potrebbero esserci altri errori però lì sicuramente c'è qulacosa che non va.Consiglio: visto che puoi unire vari nomi, prova a mettere tra le parentesi..("immagine"+@imm.to_s+".png")e potrai definire un po' meglio i nomi dei tuoi file (anche immagine è molto generico, puoi inventarti di meglio). Per il resto mi pare a posto, prosegui su sta strada che completi lo script di sicuro! ò_ò p.s. Occhio a dare dei limiti all'indice (@imm è un indice se ci fai caso) altrimenti potrai andare oltre il numero di immagini disponibili e per esempio verrà cercato un "Immagine15.png" che non esiste facendo impallare tutto. :P o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
André LaCroix Posted December 19, 2007 Share Posted December 19, 2007 Posso postare un file .txt con dentro l'esercizio svolto (ovvero solo la classe Scene_Title?) oppure devo postare un progetto di RPG Maker? (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
Tio Posted December 19, 2007 Share Posted December 19, 2007 Il primo è abbastanza facile e non ho problemi a farlo.. (non ho neanche voglia di postarlo XD )Per il secondo poi mi metto d'impegno e provo a fare qualcosa Nel mentre ho una domanda, che può essere collegata al primo esercizio: è possibile fare che una stringa mostri qualcosa solamente sotto una determinata condizione?Ad esempio nei comandi di battaglia:(il nome giusto delle variabile per gestire gli id non lo so xD )se eroe.partyid ==2 s2="Magie bianche"se eroe.partyid ==3 s2="Tecniche spada"perchè io avevo provato una volta tempo fa ma non c'ero riuscito :/ "Dopo gli ultimi Final Fantasy, ho capito solamente una cosa: che il gioco è bello quando Nomura poco."Making is not dead. You are dead.RELEASE: La Bussola d'Oro | Download | Video di anteprima - La Partenza di Hanna http://i.imgur.com/cFgc2lW.png Prova Standrama! Link to comment Share on other sites More sharing options...
André LaCroix Posted December 19, 2007 Share Posted December 19, 2007 Secondo me converrebbe farlo con la classe, non con l'ID del personaggio. (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
Alato Posted December 19, 2007 Author Share Posted December 19, 2007 Certo che è possibile, basta trovare la giusta condizione. :P @Axel: se me lo scrivi in uno spoiler son più contento, che non ho voglia di scaricare roba.. vale sempre la regola del "scrivi solo le aggiunte/modifiche che fai, non tutta la classe" per questo laboratorio. Se serve aiuto sono su mIRC nel canale del sito in questo momento. #rpg2s o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
André LaCroix Posted December 19, 2007 Share Posted December 19, 2007 Solo le modifiche? ç_____ç (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
Alato Posted December 19, 2007 Author Share Posted December 19, 2007 Se metti tutta la classe non lo leggo. XD o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Khan Posted December 20, 2007 Share Posted December 20, 2007 Questo è quello che sono riuscito a fare -_-Peccato che non funga class Scene_Extra def main @picture=Sprite.new @picture.bitmap=Bitmap.new(640,320) @imm=1 loop do Graphics.update Input.update update if $scene!=self break end end @picture.dispose Graphics.freeze end def update if Input.trigger?(Input::LEFT) @imm-=1 end if Input.trigger?(Input::RIGHT) @imm+=1 end if Input.trigger?(Input::B) $scene=Scene_Title.new end if Input.trigger?(Input::C) $game_system.se_play($data_system.buzzer_se) end if @imm<1 @imm=5 end if @imm>5 @imm=1 end @picture.bitmap= RPG::Cache.picture(@imm.to_s+".png") @picture.update return end end It's online... It's Endless... And It's an RPG...OERPG PROJECT by http://rpgart.org/ Link to comment Share on other sites More sharing options...
Alato Posted December 20, 2007 Author Share Posted December 20, 2007 Aggiungi un Graphics.transition all'inizio del main altrimenti non ti pulisce la vecchia grafica. ^^ Per il resto funge, ho provato. :P o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Khan Posted December 20, 2007 Share Posted December 20, 2007 Ecco perchè non funzionava XDGrazie mille! It's online... It's Endless... And It's an RPG...OERPG PROJECT by http://rpgart.org/ Link to comment Share on other sites More sharing options...
André LaCroix Posted December 21, 2007 Share Posted December 21, 2007 Ho fatto l'esercizio facile e solo la prima parte di quello difficile (mettere il comando "Extra" tra Esci e Carica). Righe 37-41: s1 = "New Game" s2 = "Shutdown" s3 = "Extra" s4 = "Continue" @command_window = Window_Command.new(192, [s1, s2, s3, s4]) Righe 56-60: if @continue_enabled @command_window.index = 3 else @command_window.disable_item(3) end Righe 92-109: def update # Update command window @command_window.update # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 0 # New game command_new_game when 1 # Continue command_shutdown when 2 command_extra when 3 # Shutdown command_continue end end end Righe 220 - 227 def command_extra $game_system.se_play($data_system.decision_se) Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) $scene = Scene_Extra.new end E visto che ti voglio bene ti posto anche la classe completa, così se non ci capisci nulla puoi controllare l'intero codice: #====================================================================== ======== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs title screen processing. #============================================================================== class Scene_Title #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # If battle test if $BTEST battle_test return end # Load database $data_actors = load_data("Data/Actors.rxdata") $data_classes = load_data("Data/Classes.rxdata") $data_skills = load_data("Data/Skills.rxdata") $data_items = load_data("Data/Items.rxdata") $data_weapons = load_data("Data/Weapons.rxdata") $data_armors = load_data("Data/Armors.rxdata") $data_enemies = load_data("Data/Enemies.rxdata") $data_troops = load_data("Data/Troops.rxdata") $data_states = load_data("Data/States.rxdata") $data_animations = load_data("Data/Animations.rxdata") $data_tilesets = load_data("Data/Tilesets.rxdata") $data_common_events = load_data("Data/CommonEvents.rxdata") $data_system = load_data("Data/System.rxdata") # Make system object $game_system = Game_System.new # Make title graphic @sprite = Sprite.new @sprite.bitmap = RPG::Cache.title($data_system.title_name) # Make command window s1 = "New Game" s2 = "Shutdown" s3 = "Extra" s4 = "Continue" @command_window = Window_Command.new(192, [s1, s2, s3, s4]) @command_window.back_opacity = 160 @command_window.x = 320 - @command_window.width / 2 @command_window.y = 288 # Continue enabled determinant # Check if at least one save file exists # If enabled, make @continue_enabled true; if disabled, make it false @continue_enabled = false for i in 0..3 if FileTest.exist?("Save#{i+1}.rxdata") @continue_enabled = true end end # If continue is enabled, move cursor to "Continue" # If disabled, display "Continue" text in gray if @continue_enabled @command_window.index = 3 else @command_window.disable_item(3) end # Play title BGM $game_system.bgm_play($data_system.title_bgm) # Stop playing ME and BGS Audio.me_stop Audio.bgs_stop # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of command window @command_window.dispose # Dispose of title graphic @sprite.bitmap.dispose @sprite.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update command window @command_window.update # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 0 # New game command_new_game when 1 # Continue command_shutdown when 2 command_extra when 3 # Shutdown command_continue end end end #-------------------------------------------------------------------------- # * Command: New Game #-------------------------------------------------------------------------- def command_new_game # Play decision SE $game_system.se_play($data_system.decision_se) # Stop BGM Audio.bgm_stop # Reset frame count for measuring play time Graphics.frame_count = 0 # Make each type of game object $game_temp = Game_Temp.new $game_system = Game_System.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.new $game_screen = Game_Screen.new $game_actors = Game_Actors.new $game_party = Game_Party.new $game_troop = Game_Troop.new $game_map = Game_Map.new $game_player = Game_Player.new # Set up initial party $game_party.setup_starting_members # Set up initial map position $game_map.setup($data_system.start_map_id) # Move player to initial position $game_player.moveto($data_system.start_x, $data_system.start_y) # Refresh player $game_player.refresh # Run automatic change for BGM and BGS set with map $game_map.autoplay # Update map (run parallel process event) $game_map.update # Switch to map screen $scene = Scene_Map.new end #-------------------------------------------------------------------------- # * Command: Continue #-------------------------------------------------------------------------- def command_continue # If continue is disabled unless @continue_enabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to load screen $scene = Scene_Load.new end #-------------------------------------------------------------------------- # * Command: Shutdown #-------------------------------------------------------------------------- def command_shutdown # Play decision SE $game_system.se_play($data_system.decision_se) # Fade out BGM, BGS, and ME Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) # Shutdown $scene = nil end #-------------------------------------------------------------------------- # * Battle Test #-------------------------------------------------------------------------- def battle_test # Load database (for battle test) $data_actors = load_data("Data/BT_Actors.rxdata") $data_classes = load_data("Data/BT_Classes.rxdata") $data_skills = load_data("Data/BT_Skills.rxdata") $data_items = load_data("Data/BT_Items.rxdata") $data_weapons = load_data("Data/BT_Weapons.rxdata") $data_armors = load_data("Data/BT_Armors.rxdata") $data_enemies = load_data("Data/BT_Enemies.rxdata") $data_troops = load_data("Data/BT_Troops.rxdata") $data_states = load_data("Data/BT_States.rxdata") $data_animations = load_data("Data/BT_Animations.rxdata") $data_tilesets = load_data("Data/BT_Tilesets.rxdata") $data_common_events = load_data("Data/BT_CommonEvents.rxdata") $data_system = load_data("Data/BT_System.rxdata") # Reset frame count for measuring play time Graphics.frame_count = 0 # Make each game object $game_temp = Game_Temp.new $game_system = Game_System.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.new $game_screen = Game_Screen.new $game_actors = Game_Actors.new $game_party = Game_Party.new $game_troop = Game_Troop.new $game_map = Game_Map.new $game_player = Game_Player.new # Set up party for battle test $game_party.setup_battle_test_members # Set troop ID, can escape flag, and battleback $game_temp.battle_troop_id = $data_system.test_troop_id $game_temp.battle_can_escape = true $game_map.battleback_name = $data_system.battleback_name # Play battle start SE $game_system.se_play($data_system.battle_start_se) # Play battle BGM $game_system.bgm_play($game_system.battle_bgm) # Switch to battle screen $scene = Scene_Battle.new end def command_extra $game_system.se_play($data_system.decision_se) Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) $scene = Scene_Extra.new end end (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
Alato Posted December 21, 2007 Author Share Posted December 21, 2007 Mi pare tutto a posto (anzi sono abbastanza sicuro che sia tutto a posto): ora devi fare Scene_Extra però. P.s. togli i vari fade che poi la scene extra tutta silenziosa è brutta.. o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
André LaCroix Posted December 21, 2007 Share Posted December 21, 2007 Mi pare tutto a posto (anzi sono abbastanza sicuro che sia tutto a posto): ora devi fare Scene_Extra però. P.s. togli i vari fade che poi la scene extra tutta silenziosa è brutta.. Scene_Extra ho provato a farla ma non funziona. (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
Alato Posted December 22, 2007 Author Share Posted December 22, 2007 Se mi dici solo che non funziona non posso aiutarti... ^^ o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
André LaCroix Posted December 22, 2007 Share Posted December 22, 2007 No vabbè, se mi aiuti tu che senso avrebbe svolgere l'esercizio? (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
Alato Posted December 22, 2007 Author Share Posted December 22, 2007 Se sei totalmente bloccato è altrettanto insensato: tieni conto che io non ti butto aiuti a caso, ma ti spiego per bene dove sta l'errore e ti indirizzo sul metodo per correggerlo. Poi fai te, secondo me è meglio se esponi il problema. o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
lorenman Posted December 24, 2007 Share Posted December 24, 2007 Da 36 a 39 # Make command window s1 = "Nuovo gioco" s2 = "Esci" s3 = "Continua" Da 97 a 103 case @command_window.index when 0 # Nuovo gioco command_new_game when 1 # Esci command_shutdown when 2 # Continua command_continue Ho modificato anche i commenti per facilitare la lettura... Esercizio facile svolto ;)ora aspetto di capire di piu per fare il difficile ;) I mei premi su RPG2s2o posto nel Xmas contesti 2007Appena lo ho visto lo ho dovuto mettere in firma ;): <div style="margin:20px;margin-top:5px" "=""> Il Manifesto del Making ItalianoSALVIAMO IL MAKING ITALIANO!!Dopo un test dei nostri esperti (Alato, Blake e havana24) abbiamo scoperto che ad interesse risponde interesse: cio� se voi dimostrate di essere interessati a ci� che creano gli altri, questi saranno stimolati a continuare a creare! E' un concetto semplice ma estremamente sottovalutato, basta vedere quanti topic di bei giochi sono caduti nel dimenticatoio e sono stati cagati solo da poche persone (prendiamo per esempio il fantastico gioco di Vech che vi invito a vedere nella sezione RM2k).Perci� quello che dobbiamo fare �: leggere, leggere, leggere, postare, postare, postare! E questo non significa postare a caso, ma leggere per bene il progetto di qualcuno, le domande poste, le creazioni grafiche e musicali, e fare dei post in cui si propongano miglioramenti, si critichino le brutture, si esaltino le bellezze, si aiutino gli oppressi etc etcBASTA AL MAKING ITALIANO CHE VA A ROTOLI! DIAMOCI UNA SVEGLIATA!!Per dimostrarvi ci� che sto esponendo vi riporto che la volta in cui abbiamo provato (Alato, Blake e havana24) a fare una cosa di questo genere, c'� costata un pomeriggio ma il giorno dopo abbiamo ottenuto il numero massimo di utenti online mai raggiunto!!! Ma soprattutto ci� significa che l'interesse riguardo al making era stato, almeno momentaneamente, risvegliato!!Voi pensate che eravamo solo in 3 a cercare tutti i topic e ravvivarli (con sincerit� e senza i soliti falsi "Oh che bello.", ma anche con critiche per lavori incompleti o assurdi) e abbiamo ottenuto quel grande risultato: se lo facessimo tutti non sarebbe una cosa potentissima?!?BASTA ALLE SOLITE BANALI DISCUSSIONI SULLA DECADENZA DEI GIOCHI!! FACCIAMOLI STI GIOCHI!!!Chi � contrario a questa cosa, pu� pure continuare cos� ma � una persona che col making non ha nulla a che fare, ma chi crede nel making inizi ora, immediatamente a seguire questa linea di pensiero!Ma chi � d'accordo, chi davvero ci tiene al making, incolli questo Manifesto nella propria firma!! Mettete anche voi questa firma!! Link to comment Share on other sites More sharing options...
Alato Posted December 24, 2007 Author Share Posted December 24, 2007 Se ti serve una spintarella per iniziare con la variante difficile basta chiedere. *Comunicazione di servizio: Aggiunta soluzione Variante Difficile* o•°' - '°•oHei, mitä kuuluu? http://imagegen.last.fm/winterheadphones/recenttracks/5/Alato.gif Link to comment Share on other sites More sharing options...
Recommended Posts