Kingartur2 Posted September 6, 2013 Share Posted September 6, 2013 (edited) Crea Percorso Evento DescrizioneE per la serie, script che sembrano utili ma che in realtà non lo sono, abbiamo uno script che permette di creare su mappa i percorsi evento. La sua utilità in ambito pratico è totalmente nulla se non per quei percorsi evento molto complessi e difficili da realizzare solo col tool. Autorekingartur2(3) Allegati Video :http://www.youtube.com/watch?v=cLFs4fofluQ Istruzioni per l'usoInserire in un muovi evento un call script con: passa_il_testimonequindi il controllo passerà all'evento che potrà essere mosso con le freccie direzionali, ogni movimento fatto sarà registrato, premendo ESC si accederà a un menù per accedere a funzioni tipo : salto, animazione aspetta, cambia switch. Per tutte le funzioni non elencate si potrà inserire un promemoria così da ricordare di inserirle successivamente.Dopo aver fatto tutto ciò è consigliabile riavviare RPG maker e andare a modificare il muovi evento dell'evento e magicamente appariranno tutti i comandi inseriti.PS : se dopo aver inserito un animazione si aggiunge un aspetta verranno suggerito come numero il numero di frame di durata dell'animazionePS2 : dopo aver completato è possibile provare il tutto facendo partire l'evento. Script #=============================================================================== # Autore : kingartur2(3) # Versione : 1.0 # Nome : Crea Movimenti Eventi #=============================================================================== # Questo script nasce dall'esigenza di migliorare il comando muovi evento visto # che in primis non permette di vedere in tempo reale il movimento del # personaggio e ciò rende scomodo l'utilizzo di muovi evento. Tecnicamente e # praticamente questo script però è inutile in quanto per quanto difficoltoso # settare i movimenti a mano non è molto laborioso. Bhè se qualcuno è pigro o # deve fare percorsi molto complicati ecco lo script che fa per lui. #------------------------------------------------------------------------------- # UTILIZZO : # Inserire in un muovi evento un call script con scritto: # passa_il_testimone # il controllo passerà all'evento e ogni cosa fatta verrà registrata, è possibile # premere ESC per accedere a un menù con più opzioni. Quando il tutto è completo # selezionare completato dal menu di ESC. Per ulteriori delucidazioni ti invito # a guardare questo video: # http://www.youtube.com/watch?v=cLFs4fofluQ&feature=youtu.be #=============================================================================== DIMENSIONE_MAX_CRONOLOGIA = 99 class Game_Event < Game_Character attr_accessor :evento_da_cambiare attr_reader :percorso_da_creare attr_reader :cronologia def passa_il_testimone @fotografia = $game_map.events[@id].clone @cronologia = [] $game_player.testimone_passato = true $game_player.testimone = @id @ricorda_posizione = [x, y] @switch_cambiate = {} @percorso_da_creare = RPG::MoveRoute.new @percorso_da_creare.list = [] @window_cronologia = Window_Cronologia.new @help = Window_Help.new @help.x = @window_cronologia.width @help.width = Graphics.width - @window_cronologia.width @help.create_contents @help.set_text("CTRL : Annulla ultima azione\nESC : Menu azioni") end def crea_percorso @window_cronologia.update @help.update unless moving? if Input.dir4 > 0 aggiungi_cronologia move_straight(Input.dir4) if @move_succeed comando = RPG::MoveCommand.new case Input.dir4 when 2 comando.code = ROUTE_MOVE_DOWN when 4 comando.code = ROUTE_MOVE_LEFT when 6 comando.code = ROUTE_MOVE_RIGHT when 8 comando.code = ROUTE_MOVE_UP end aggiungi_comando(comando) end end if Input.trigger?(:CTRL) if torna_indietro Sound.play_cancel else Sound.play_buzzer end end if Input.trigger?(:B) @window = Window_ScegliComandi.new(0, 0) @window.x = (Graphics.width / 2) - (@window.width / 2) @window.y = (Graphics.height / 2) - (@window.height / 2) @window.set_handler(:girati, method(:gira_verso)) @window.set_handler(:aspetta, method(:aggiungi_un_aspetta)) @window.set_handler(:salta, method(:aggiungi_un_salto)) @window.set_handler(:dati_vari, method(:cambia_dati_vari)) @window.set_handler(:animazione, method(:aggiungi_un_animazione)) @window.set_handler(:switch, method(:aggiungi_un_cambia_switch)) @window.set_handler(:promemoria, method(:aggiungi_promemoria)) @window.set_handler(:completo, method(:completato_tutto)) until @window.disposed? Graphics.update Input.update @window.update end @window = nil end end end alias testimone_update update def update if $game_player.testimone == @id last_real_x = @real_x last_real_y = @real_y end testimone_update if $game_player.testimone == @id and last_real_x update_scroll(last_real_x, last_real_y) end end def update_scroll(last_real_x, last_real_y) ax1 = $game_map.adjust_x(last_real_x) ay1 = $game_map.adjust_y(last_real_y) ax2 = $game_map.adjust_x(@real_x) ay2 = $game_map.adjust_y(@real_y) $game_map.scroll_down (ay2 - ay1) if ay2 > ay1 && ay2 > center_y $game_map.scroll_left (ax1 - ax2) if ax2 < ax1 && ax2 < center_x $game_map.scroll_right(ax2 - ax1) if ax2 > ax1 && ax2 > center_x $game_map.scroll_up (ay1 - ay2) if ay2 < ay1 && ay2 < center_y end def center_x (Graphics.width / 32 - 1) / 2.0 end def center_y (Graphics.height / 32 - 1) / 2.0 end def name return @event.name end def costante(str) return eval(str) end def aggiungi_comando(comando) @percorso_da_creare.list.push(comando) @window_cronologia.refresh end def aggiungi_cronologia(switch_cambiate = {}) if @cronologia.size >= DIMENSIONE_MAX_CRONOLOGIA @cronologia.delete_at(0) end @cronologia.push([$game_map.events[@id].clone, switch_cambiate]) end def torna_indietro return false if @cronologia.empty? @percorso_da_creare.list.pop copia = @cronologia.pop $game_map.events[@id] = copia[0] $game_map.events[@id].moveto(copia[0].x, copia[0].y) for i in copia[1] $game_switches[i[0]] = i[1] end $game_map.need_refresh = true SceneManager.goto(Scene_Map) @window_cronologia.refresh return true end alias testimone_collide collide_with_player_characters? def collide_with_player_characters?(x, y) return false if $game_player.testimone == @id testimone_collide(x, y) end def finisci_il_tutto event = @event.clone for page in event.pages if page == @page da_cambiare = page.list[@evento_da_cambiare] @percorso_da_creare.repeat = da_cambiare.parameters[1].repeat @percorso_da_creare.skippable = da_cambiare.parameters[1].skippable @percorso_da_creare.wait = da_cambiare.parameters[1].wait da_cambiare.parameters[1] = @percorso_da_creare end end nome_file_mappa = (sprintf("Data/Map%03d.rvdata2", $game_map.map_id)) dati = load_data(nome_file_mappa) dati.events[@id] = event save_data(dati, nome_file_mappa) msgbox "I dati sono stati salvati, per vedere i risultati riavviare RPG Maker" end def aggiungi_un_salto @sub_window = Window_NumeriSalto.new x = @window.x + (@window.width / 2) - (@sub_window.width / 2) y = @window.y - @sub_window.height @sub_window.x = x @sub_window.y = y bitmap = Bitmap.new(32, 32) bitmap.fill_rect(0, 0, 32, 32, Color.new(255, 0, 0, 100)) sprite = Sprite.new sprite.bitmap = bitmap until @sub_window.disposed? Graphics.update Input.update @sub_window.update sprite.x = (self.x + @sub_window.adding_x) * 32 sprite.y = (self.y + @sub_window.adding_y) * 32 if Input.trigger?(:C) adding_x = @sub_window.adding_x adding_y = @sub_window.adding_y @sub_window.dispose end if Input.trigger?(:B) Sound.play_cancel Input.update sprite.dispose @window.dispose @sub_window.dispose sprite = nil @sub_window = nil return end end sprite.dispose sprite = nil @sub_window = nil aggiungi_cronologia jump(adding_x, adding_y) if @move_succeed comando = RPG::MoveCommand.new comando.code = ROUTE_JUMP comando.parameters[0] = adding_x comando.parameters[1] = adding_y aggiungi_comando(comando) end @window.dispose end def gira_verso @solo_girare = true @window.dispose rompi = false until rompi Graphics.update Input.update if Input.dir4 > 0 aggiungi_cronologia set_direction(Input.dir4) comando = RPG::MoveCommand.new case Input.dir4 when 2 comando.code = ROUTE_TURN_DOWN when 4 comando.code = ROUTE_TURN_LEFT when 6 comando.code = ROUTE_TURN_RIGHT when 8 comando.code = ROUTE_TURN_UP end aggiungi_comando(comando) rompi = true end end while Input.dir4 > 0 Graphics.update Input.update end end def aggiungi_un_aspetta n = 0 sp = Sprite_Base.new ani_rate = sp.ani_rate sp.dispose sp = nil code = @percorso_da_creare.list[@percorso_da_creare.list.size - 1] if code.code == ROUTE_SCRIPT if code.parameters[0][/\$game_map.events\[\d+\].animation_id = (\d+)/] n = $data_animations[$1.to_i].frame_max * ani_rate + 1 end if code.parameters[0][/\$game_player.animation_id = (\d+)/] n = $data_animations[$1.to_i].frame_max * ani_rate + 1 end end @sub_window = Window_NumeriUno.new("N° Frame", n) x = @window.x + (@window.width / 2) - (@sub_window.width / 2) y = @window.y - @sub_window.height @sub_window.x = x @sub_window.y = y until @sub_window.disposed? Graphics.update Input.update @sub_window.update if Input.trigger?(:C) value = @sub_window.value @sub_window.dispose end if Input.trigger?(:B) Sound.play_cancel Input.update @window.dispose @sub_window.dispose @sub_window = nil return end end @sub_window = nil comando = RPG::MoveCommand.new comando.code = ROUTE_WAIT comando.parameters[0] = value aggiungi_cronologia aggiungi_comando(comando) @window.dispose end def aggiungi_un_animazione @sub_window = Window_NumeriAnimazioni.new(@id) self.animation_id = 1 x = @window.x + (@window.width / 2) - (@sub_window.width / 2) y = @window.y - @sub_window.height @sub_window.x = x @sub_window.y = y val1 = @sub_window.id_animazione val2 = @sub_window.id_personaggio until @sub_window.disposed? Graphics.update Input.update SceneManager.scene.spriteset.update @sub_window.update if val1 != @sub_window.id_animazione or val2 != @sub_window.id_personaggio val1 = @sub_window.id_animazione val2 = @sub_window.id_personaggio if @sub_window.id_personaggio == 0 $game_player.animation_id = @sub_window.id_animazione else char = $game_map.events[@sub_window.id_personaggio] char.animation_id = @sub_window.id_animazione end end if Input.trigger?(:C) pg = @sub_window.id_personaggio animazione = @sub_window.id_animazione @sub_window.dispose end if Input.trigger?(:B) Sound.play_cancel Input.update @window.dispose @sub_window.dispose @sub_window = nil return end end @sub_window = nil comando = RPG::MoveCommand.new comando.code = ROUTE_SCRIPT if pg == 0 $game_player.animation_id = animazione comando.parameters[0] = "$game_player.animation_id = #{animazione}" else char = $game_map.events[pg] char.animation_id = animazione text = "$game_map.events[#{pg}].animation_id = #{animazione}" comando.parameters[0] = text end aggiungi_cronologia aggiungi_comando(comando) @window.dispose end def aggiungi_un_cambia_switch @sub_window = Window_NumeriSwitch.new x = @window.x + (@window.width / 2) - (@sub_window.width / 2) y = @window.y - @sub_window.height @sub_window.x = x @sub_window.y = y until @sub_window.disposed? Graphics.update Input.update @sub_window.update if Input.trigger?(:C) switch_id = @sub_window.switch_id state = @sub_window.state @sub_window.dispose end if Input.trigger?(:B) Sound.play_cancel Input.update @window.dispose @sub_window.dispose @sub_window = nil return end end @sub_window = nil if !@switch_cambiate.has_key?(switch_id) @switch_cambiate[switch_id] = $game_switches[switch_id] end aggiungi_cronologia({switch_id => $game_switches[switch_id]}) $game_switches[switch_id] = state comando = RPG::MoveCommand.new if state comando.code = ROUTE_SWITCH_ON else comando.code = ROUTE_SWITCH_OFF end comando.parameters[0] = switch_id aggiungi_comando(comando) @window.dispose end def cambia_dati_vari @sub_window = Window_NumeriDatiVari.new( @move_speed, @move_frequency, @walk_anime, @step_anime, @direction_fix, @through, @transparent,@opacity, @blend_type) x = @window.x + (@window.width / 2) - (@sub_window.width / 2) y = @window.y - @sub_window.height @sub_window.x = x @sub_window.y = y until @sub_window.disposed? Graphics.update Input.update @sub_window.update if Input.trigger?(:C) index = @sub_window.index speed = @sub_window.speed frequency = @sub_window.frequency walk_anime = @sub_window.walk_anime step_anime = @sub_window.step_anime direction_fix = @sub_window.direction_fix through = @sub_window.through transparent = @sub_window.transparent opacity = @sub_window.opacity blend_type = @sub_window.blend_type @sub_window.dispose end if Input.trigger?(:B) Sound.play_cancel Input.update @window.dispose @sub_window.dispose return end end @sub_window = nil aggiungi_cronologia comando = RPG::MoveCommand.new case index when 0 comando.code = ROUTE_CHANGE_SPEED comando.parameters[0] = speed @move_speed = speed when 1 comando.code = ROUTE_CHANGE_FREQ comando.parameters[0] = frequency @move_frequency = frequency when 2 if walk_anime comando.code = ROUTE_WALK_ANIME_ON else comando.code = ROUTE_WALK_ANIME_OFF end @walk_anime = walk_anime when 3 if step_anime comando.code = ROUTE_STEP_ANIME_ON else comando.code = ROUTE_STEP_ANIME_OFF end @step_anime = step_anime when 4 if direction_fix comando.code = ROUTE_DIR_FIX_ON else comando.code = ROUTE_DIR_FIX_OFF end @direction_fix = direction_fix when 5 if through comando.code = ROUTE_THROUGH_ON else comando.code = ROUTE_THROUGH_OFF end @through = through when 6 if transparent comando.code = ROUTE_TRANSPARENT_ON else comando.code = ROUTE_TRANSPARENT_OFF end @transparent = transparent when 7 comando.code = ROUTE_CHANGE_OPACITY comando.parameters[0] = opacity @opacity = opacity when 8 comando.code = ROUTE_CHANGE_BLENDING comando.parameters[0] = blend_type @blend_type = blend_type end aggiungi_comando(comando) @window.dispose end def aggiungi_promemoria comando = RPG::MoveCommand.new comando.code = ROUTE_SCRIPT comando.parameters[0] = "msgbox \"Questo è un promemoria\"" aggiungi_cronologia aggiungi_comando(comando) @window.dispose end def completato_tutto @window.dispose comando = RPG::MoveCommand.new comando.code = ROUTE_END aggiungi_comando(comando) $game_player.testimone_passato = false $game_player.testimone = 0 for i in @switch_cambiate $game_switches[i[0]] = i[1] end finisci_il_tutto moveto(@ricorda_posizione[0], @ricorda_posizione[1]) $game_map.events[@id] = @fotografia $game_map.events[@id].restore_move_route $game_map.need_refresh = true SceneManager.goto(Scene_Map) @fotografia = nil @switchs = nil @cronologia = nil @percorso_da_creare = nil @ricorda_posizione = nil @window_cronologia.dispose @window_cronologia = nil @help.dispose @help = nil end end class Game_Player < Game_Character attr_accessor :testimone_passato attr_accessor :testimone alias testimone_passabilità movable? def movable? return false if testimone_passato return testimone_passabilità end alias testimone_update update def update testimone_update $game_map.events[@testimone].crea_percorso if testimone_passato end alias testimone_scroll update_scroll def update_scroll(last_real_x, last_real_y) return if testimone_passato testimone_scroll(last_real_x, last_real_y) end end class Game_Interpreter alias testimone_205 command_205 def command_205 $game_map.refresh if $game_map.need_refresh character = get_character(@params[0]) if character character.evento_da_cambiare = @index end testimone_205 end end class Scene_Map < Scene_Base attr_reader :spriteset end class Game_System alias testimone_menu menu_disabled def menu_disabled return true if $game_player.testimone_passato return testimone_menu end end class Sprite_Base < Sprite def ani_rate set_animation_rate return @ani_rate end end class Window_ScegliComandi < Window_Command def visible_line_number item_max / 2 + item_max % 2 end def col_max return 2 end def window_width return 320 end def make_command_list add_command("Gira", :girati) add_command("Aspetta", :aspetta) add_command("Salta", :salta) add_command("Dati Vari", :dati_vari) add_command("Animazione", :animazione) add_command("Cambia Switch", :switch) add_command("Promemoria", :promemoria) add_command("Completato", :completo) end def cancel_enabled? true end def process_cancel Sound.play_cancel Input.update self.dispose end end class Window_NumeriSalto < Window_Selectable attr_accessor :adding_x attr_accessor :adding_y def initialize @adding_x = 0 @adding_y = 0 super(0, 0, Graphics.width / 4, fitting_height(2)) @index = 0 activate refresh end def item_max return 2 end def draw_item(index) if index == 0 draw_text(item_rect_for_text(index), "X") draw_text(item_rect_for_text(index), @adding_x, 2) else draw_text(item_rect_for_text(index), "Y") draw_text(item_rect_for_text(index), @adding_y, 2) end end def cursor_left(wrap = false) if @index == 0 @adding_x -= 1 else @adding_y -= 1 end redraw_current_item end def cursor_right(wrap = false) if @index == 0 @adding_x += 1 else @adding_y += 1 end redraw_current_item end end class Window_NumeriDatiVari < Window_Selectable attr_accessor :speed attr_accessor :frequency attr_accessor :walk_anime attr_accessor :step_anime attr_accessor :direction_fix attr_accessor :through attr_accessor :transparent attr_accessor :opacity attr_accessor :blend_type def initialize(speed, frequency, walk_anime, step_anime, direction_fix, through, transparent, opacity, blend_type) @speed = speed @frequency = frequency @walk_anime = walk_anime @step_anime = step_anime @direction_fix = direction_fix @through = through @transparent = transparent @opacity = opacity @blend_type = blend_type super(0, 0, Graphics.width / 2, fitting_height(4)) @index = 0 activate refresh end def item_max return 9 end def draw_item(index) case index when 0 draw_text(item_rect_for_text(index), "Velocità") draw_text(item_rect_for_text(index), @speed, 2) when 1 draw_text(item_rect_for_text(index), "Frequenza") draw_text(item_rect_for_text(index), @frequency, 2) when 2 text = @walk_anime ? "ON" : "OFF" draw_text(item_rect_for_text(index), "Animazione Passi") draw_text(item_rect_for_text(index), text, 2) when 3 text = @step_anime ? "ON" : "OFF" draw_text(item_rect_for_text(index), "Cammina Sempre") draw_text(item_rect_for_text(index), text, 2) when 4 text = @direction_fix ? "ON" : "OFF" draw_text(item_rect_for_text(index), "Direzione Fissa") draw_text(item_rect_for_text(index), text, 2) when 5 text = @through ? "ON" : "OFF" draw_text(item_rect_for_text(index), "Passabilità") draw_text(item_rect_for_text(index), text, 2) when 6 text = @transparent ? "ON" : "OFF" draw_text(item_rect_for_text(index), "Trasparenza") draw_text(item_rect_for_text(index), text, 2) when 7 draw_text(item_rect_for_text(index), "Opacità") draw_text(item_rect_for_text(index), @opacity, 2) when 8 case @blend_type when 0 text = "Normale" when 1 text = "Aggiungi" when 2 text = "Sottrai" end draw_text(item_rect_for_text(index), "Blending") draw_text(item_rect_for_text(index), text, 2) end end def cursor_left(wrap = false) case @index when 0 @speed -= 1 if @speed > 0 when 1 @frequency -= 1 if @frequency > 0 when 2 @walk_anime = !@walk_anime when 3 @step_anime = !@step_anime when 4 @direction_fix = !@direction_fix when 5 @through = !@through when 6 @transparent = !@transparent when 7 @opacity -= 1 if @opacity > 0 when 8 @blend_type -= 1 if @blend_type > 0 end redraw_current_item end def cursor_right(wrap = false) case @index when 0 @speed += 1 when 1 @frequency += 1 when 2 @walk_anime = !@walk_anime when 3 @step_anime = !@step_anime when 4 @direction_fix = !@direction_fix when 5 @through = !@through when 6 @transparent = !@transparent when 7 @opacity += 1 if @opacity < 255 when 8 @blend_type += 1 if @blend_type < 2 end redraw_current_item end def cursor_pageup case @index when 0 @speed = [@speed - 2, 0].max when 1 @frequency = [@frequency - 2, 0].max when 2 @walk_anime = !@walk_anime when 3 @step_anime = !@step_anime when 4 @direction_fix = !@direction_fix when 5 @through = !@through when 6 @transparent = !@transparent when 7 @opacity = [@opacity - 10, 0].max when 8 @blend_type -= 1 if @blend_type > 0 end redraw_current_item end def cursor_pagedown case @index when 0 @speed += 2 when 1 @frequency += 2 when 2 @walk_anime = !@walk_anime when 3 @step_anime = !@step_anime when 4 @direction_fix = !@direction_fix when 5 @through = !@through when 6 @transparent = !@transparent when 7 @opacity = [@opacity + 10, 255].min when 8 @blend_type += 1 if @blend_type < 2 end redraw_current_item end end class Window_NumeriAnimazioni < Window_Selectable attr_accessor :id_personaggio attr_accessor :id_animazione def initialize(id_personaggio) @id_personaggio = id_personaggio @id_animazione = 1 super(0, 0, Graphics.width / 2.5, fitting_height(3)) @index = 0 activate refresh end def item_max return 2 end def refresh super text = "Nome Pg : " if @id_personaggio == 0 text += "Eroe" else text += $game_map.events[id_personaggio].name end draw_text(0, 0, contents.width, line_height, text, 1) end def draw_item(index) if index == 0 draw_text(item_rect_for_text(index), "ID pg" ) draw_text(item_rect_for_text(index), @id_personaggio, 2) else draw_text(item_rect_for_text(index), "Animazione") draw_text(item_rect_for_text(index), @id_animazione, 2) end end def cursor_left(wrap = false) if index == 0 @id_personaggio -= 1 if @id_personaggio > 0 else @id_animazione -= 1 if @id_animazione > 1 end refresh end def cursor_right(wrap = false) if index == 0 @id_personaggio += 1 if @id_personaggio < $game_map.events.size else @id_animazione += 1 if @id_animazione < ($data_animations.size - 1) end refresh end def cursor_pageup if index == 0 @id_personaggio = [@id_personaggio - 10, 0].max else @id_animazione = [@id_animazione - 10, 1].max end refresh end def cursor_pagedown if index == 0 @id_personaggio = [@id_personaggio + 10, $game_map.events.size].min else @id_animazione = [@id_animazione + 10, ($data_animations.size - 1)].min end refresh end def item_rect(index) rect = super(index) rect.y += line_height return rect end end class Window_NumeriUno < Window_Selectable attr_accessor :value def initialize(testo, n) @value = n @testo = testo super(0, 0, Graphics.width / 3, fitting_height(1)) @index = 0 activate refresh end def item_max return 1 end def draw_item(index) draw_text(item_rect_for_text(index), @testo) draw_text(item_rect_for_text(index), @value, 2) end def cursor_left(wrap = false) @value -= 1 if @value > 1 redraw_current_item end def cursor_right(wrap = false) @value += 1 redraw_current_item end def cursor_pageup @value = [@value - 10, 1].max redraw_current_item end def cursor_pagedown @value += 10 redraw_current_item end end class Window_NumeriSwitch < Window_Selectable attr_accessor :switch_id attr_accessor :state def initialize @switch_id = 1 @state = 0 super(0, 0, Graphics.width / 2, fitting_height(3)) @index = 0 activate refresh end def item_max return 2 end def refresh super text = "Nome Switch : " + $data_system.switches[switch_id] draw_text(0, 0, contents.width, line_height, text, 1) end def draw_item(index) if index == 0 draw_text(item_rect_for_text(index), "ID Switch") draw_text(item_rect_for_text(index), @switch_id, 2) else draw_text(item_rect_for_text(index), "Stato") text = @state ? "ON" : "OFF" draw_text(item_rect_for_text(index), text, 2) end end def cursor_left(wrap = false) if @index == 0 @switch_id -= 1 if @switch_id > 1 else @state = !state end refresh end def cursor_right(wrap = false) if @index == 0 @switch_id += 1 else @state = !@state end refresh end def cursor_pageup if index == 0 @switch_id = [@switch_id - 10, 1].max else @state = !state end refresh end def cursor_pagedown if index == 0 @switch_id += 10 else @state = !state end refresh end def item_rect(index) rect = super(index) rect.y += line_height return rect end end class Window_Cronologia < Window_Base def initialize super(0, 0, 220, fitting_height(5)) @event = $game_map.events[$game_player.testimone] refresh end def refresh create_contents change_color(crisis_color) draw_text(0, 0, contents.width, line_height, "Cronologia", 1) change_color(normal_color) array = @event.percorso_da_creare.list.reverse[0...4].reverse y = line_height * 4 n = 1 for i in array.reverse if n <= @event.cronologia.size change_color(normal_color) else change_color(power_down_color) end text = "#{@event.percorso_da_creare.list.size - n}. " + generate_text(i) draw_text(0, y, contents.width, line_height, text) n += 1 y -= line_height end end def generate_text(comando) if comando.code == @event.costante("ROUTE_MOVE_DOWN") return "Muovi in Basso" end if comando.code == @event.costante("ROUTE_MOVE_LEFT") return "Muovi a Sinistra" end if comando.code == @event.costante("ROUTE_MOVE_RIGHT") return "Muovi a Destra" end if comando.code == @event.costante("ROUTE_MOVE_UP") return "Muovi in Alto" end if comando.code == @event.costante("ROUTE_TURN_DOWN") return "Gira in Basso" end if comando.code == @event.costante("ROUTE_TURN_LEFT") return "Gira a Sinistra" end if comando.code == @event.costante("ROUTE_TURN_RIGHT") return "Gira a Destra" end if comando.code == @event.costante("ROUTE_TURN_UP") return "Gira in Alto" end if comando.code == @event.costante("ROUTE_WAIT") return "Aspetta " + comando.parameters[0].to_s + " Frame" end if comando.code == @event.costante("ROUTE_JUMP") x = comando.parameters[0] > -1 ? "+" : "" x += comando.parameters[0].to_s y = comando.parameters[1] > -1 ? "+" : "" y += comando.parameters[1].to_s return "Salto X" + x + " Y" + y end if comando.code == @event.costante("ROUTE_CHANGE_SPEED") return "Velocità = " + comando.parameters[0].to_s end if comando.code == @event.costante("ROUTE_CHANGE_FREQ") return "Frequenza = " + comando.parameters[0].to_s end if comando.code == @event.costante("ROUTE_WALK_ANIME_ON") return "Animazione Passi ON" end if comando.code == @event.costante("ROUTE_WALK_ANIME_OFF") return "Animazione Passi OFF" end if comando.code == @event.costante("ROUTE_STEP_ANIME_ON") return "In Movimento ON" end if comando.code == @event.costante("ROUTE_STEP_ANIME_OFF") return "In Movimento OFF" end if comando.code == @event.costante("ROUTE_DIR_FIX_ON") return "Direzione Fissa ON" end if comando.code == @event.costante("ROUTE_DIR_FIX_OFF") return "Direzione Fissa OFF" end if comando.code == @event.costante("ROUTE_THROUGH_ON") return "Passaggio ON" end if comando.code == @event.costante("ROUTE_THROUGH_OFF") return "Passaggio OFF" end if comando.code == @event.costante("ROUTE_TRANSPARENT_ON") return "Trasparenza ON" end if comando.code == @event.costante("ROUTE_TRANSPARENT_OFF") return "Trasparenza OFF" end if comando.code == @event.costante("ROUTE_CHANGE_OPACITY") return "Opacità = " + comando.parameters[0].to_s end if comando.code == @event.costante("ROUTE_CHANGE_BLENDING") case comando.parameters[0] when 0 x = "Normale" when 1 x = "Aggiungi" else x = "Sottrai" end return "Blending = " + x end if comando.code == @event.costante("ROUTE_SWITCH_ON") return "Switch [#{comando.parameters[0]}] ON" end if comando.code == @event.costante("ROUTE_SWITCH_OFF") return "Switch [#{comando.parameters[0]}] OFF" end if comando.code == @event.costante("ROUTE_END") return "FINE" end if comando.code == @event.costante("ROUTE_SCRIPT") if comando.parameters[0] == "msgbox \"Questo è un promemoria\"" return "Promemoria" end if comando.parameters[0][/\$game_map.events\[(\d+)\].animation_id = (\d+)/] return "Anim. #{$2} su Evento[#{$1}]" end if comando.parameters[0][/\$game_player.animation_id = (\d+)/] return "Anim. #{$1} sul giocatore" end end return "Codice #{comando.code}" end end Bugs e Conflitti NotiProbabilmente lo script va in conflitto con gli script che danno più funzioni su mappa, ma non credo ci siano problemi visto che questo è uno script solo per lo sviluppo e non andrà aggiunto nella release finale del gioco. Anzi, consiglio vivamente di toglierlo prima di distribuire il gioco. Altri dettagliDove scrivere le varie ed eventuali. Facoltativo. Edited September 7, 2013 by kingartur2 Per qualsiasi motivo non aprite questo spoiler. Ho detto di non aprirlo ! Se lo apri ancora esplode il mondo. Aaaaaa è un vizio. Contento? Il mondo è esploso, sono tutti morti per colpa della tua curiosità . Vuoi che ti venga anche il morbillo, la varicella e l'AIDS??? O bravo ora sei un malato terminale e nessuno ti puo curare, sono tutti morti ! Se clicchi ancora una volta il PC esplode. E dai smettila !! Uff!! Hai cliccato tante volte che ho dovuto sostituirlo con un codebox. http://s8.postimg.org/yntv9nxld/Banner.png http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif Link to comment Share on other sites More sharing options...
Guardian of Irael Posted September 7, 2013 Share Posted September 7, 2013 Ah ah ma è bellissimo! Puoi creare il percorso su campo per vedere come si comporta! XD^ ^ (\_/)(^ ^) <----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...
Alexander81 Posted September 7, 2013 Share Posted September 7, 2013 Dopo aver creato il movimento, l'evento in questione deve rimanere sempre con lo script: passa_il_testimone ? Link to comment Share on other sites More sharing options...
Kingartur2 Posted September 7, 2013 Author Share Posted September 7, 2013 No dopo che hai creato il movimento, vai nel tool, apri l'evento, clicchi destro sul muovi evento dove c'è scritto passa_il_testimone e fai modifica. Se hai riavviato RPG maker dovrebbe comparire la lista dei movimenti salvata. Per qualsiasi motivo non aprite questo spoiler. Ho detto di non aprirlo ! Se lo apri ancora esplode il mondo. Aaaaaa è un vizio. Contento? Il mondo è esploso, sono tutti morti per colpa della tua curiosità . Vuoi che ti venga anche il morbillo, la varicella e l'AIDS??? O bravo ora sei un malato terminale e nessuno ti puo curare, sono tutti morti ! Se clicchi ancora una volta il PC esplode. E dai smettila !! Uff!! Hai cliccato tante volte che ho dovuto sostituirlo con un codebox. http://s8.postimg.org/yntv9nxld/Banner.png http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif Link to comment Share on other sites More sharing options...
Alexander81 Posted September 7, 2013 Share Posted September 7, 2013 C'è un problemino riguardante il salto, praticamente compare un quadratino rosso penso per indicare dove arriverà l'evento dopo il salto ma invece il salto ovviamente considera le coordinate inserite nella x e nella y ma il quadratino rosso se ne và per conto suo :D Link to comment Share on other sites More sharing options...
Kingartur2 Posted September 7, 2013 Author Share Posted September 7, 2013 @Alex : cosa? Non ho capito il problema, quando si modificano i valori del salto quelle non sono le coordinate di dove va ad atterrare l'evento ma di i numeri che verranno aggiunti alle coordinate X e Y dell'evento, praticamente come quando si configura l'evento. Il quadratino rosso serve appunto per indicare l'atterraggio.Per il tuo problema non ho ben capito cosa non va, potresti fare uno screen del problema? Per qualsiasi motivo non aprite questo spoiler. Ho detto di non aprirlo ! Se lo apri ancora esplode il mondo. Aaaaaa è un vizio. Contento? Il mondo è esploso, sono tutti morti per colpa della tua curiosità . Vuoi che ti venga anche il morbillo, la varicella e l'AIDS??? O bravo ora sei un malato terminale e nessuno ti puo curare, sono tutti morti ! Se clicchi ancora una volta il PC esplode. E dai smettila !! Uff!! Hai cliccato tante volte che ho dovuto sostituirlo con un codebox. http://s8.postimg.org/yntv9nxld/Banner.png http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now