Vai al contenuto

Rilevato Ad-Blocker. Per favore disabilita il tuo adblocker quando navighi su makerando.com - Non c'è nessun annuncio invasivo.

  • Chatbox

    You don't have permission to chat.
    Load More
  • Contenuti simili

    • Da Ally
      Nome Script: MSX - Animation Player
      Versione: 1.0
      Autore/i: Melosx
       
      Informazioni:
      Lo script permette di inserire un animazione tipo GIF partendo dai singoli fotogrammi.
       
      Features:
      E' possibile impostare:
      coordinate; numero di fotogrammi; tempo di attesa tra un fotogramma e l'altro. Istruzioni:Inserire lo script sotto Materials e sopra Main. Ulteriori istruzioni sono contenute nello script.
       
      Script
       
       
      Note dell'autore:
      N/A
    • Da Ally
      Nome Script: RM2k/2k3 Graphics (320x240)
      Versione: 1.4
      Autore/i: mikb89 & 255

      Informazioni:



      Versione per il VX Ace di questo script . Rende possibile l'utilizzo di grafica old style (RPG Maker 2000/2003), tileset 16x16 anziché 32x32. Lancia il gioco in risoluzione 320x240 ma con la finestra allargata a 640x480.
      È possibile sia mantenere i font del VX Ace sia avere quelli "old style".

      Screenshots:


      Istruzioni:



      Il contenuto del file zip è un template, ovvero un progetto da cui è possibile partire per creare il proprio gioco.

      Il modo di organizzare il vostro progetto è quello che segue.
      Su Graphics ci vanno le immagini ingrandite (dimensione normale di VX Ace), mentre su MidGraphics ci vanno le immagini in risoluzione RM2k/2k3 (dimezzate).
      Le immagini su Graphics servono solo all'editor per visualizzare correttamente i tileset, mentre testando il gioco l'EXE userà le immagini a dimensione ridotta che si trovano su MidGraphics.

      Lanciando il gioco fuori dal programma, al contrario, l'EXE andrà a leggere la cartella Graphic. Quindi quando volete fare la release del vostro gioco eliminate la cartella Graphics (magari backuppandola prima), e rinominate la cartella MidGraphics in Graphics.

      Per ridimensionare automaticamente le risorse (e altre comodità) potete utilizzare il fantastico Rumurumu .

      Per importare direttamente i charset del 2k/2k3 potete inserire il simbolo # davanti al nome del file. Esempio: '#Chara1'. Così facendo lo script mostrerà correttamente le direzioni dei charset (i charset del 2k/2k3 hanno infatti posizioni diverse).
      Questa funzione è però DEPRECATA e infatti verrà rimossa al prossimo aggiornamento. Rumurumu invece si occuperà anche di questa conversione e, in futuro, della conversione dei chipset.

      Per il font , dentro System, c'è un file chiamato Font.png contenente i caratteri del testo. FontB.png sono i caratteri in grassetto, FontI.png quelli in corsivo e FontBI.png lo lascio alla vostra immaginazione.
      In alternativa , va creata una cartella Font dentro System, contenente le cartelle B, I e BI, e i file nel formato f + numero carattere. Ad esempio "f49.png" è lo zero. Le cartelle B, I e BI conterranno i file allo stesso modo.
      Allegato c'è un pacchetto con font fatti da me.

      Script:


      Visibile su Pastebin .

      Demo:


      Template:
      http://www.mediafire.com/?xdba49176p12w

      Pacchetto Bitmap font v1.0:
      http://www.mediafire...ilzfyysj21m1syv

      Note dell'Autore:


      Consiglio di scaricare il template anziché copiaincollare il codice in quanto vi evitate di dover sistemare le cartelle.
    • Da Ally
      Nome Script: Transizioni Battaglie
      Versione: 1.0
      Autore/i: FlipelyFlip
       
      Informazioni:
      Permette di inserire transizioni per battaglie specifiche oppure di lasciarle casuali ad ogni battaglia.
       
      Istruzioni:
      Inserite lo script sotto Material.
       
      Le istruzioni sono all'interno dello script.
       
      Script:
       

      #=============================================================================== # * Battle Transistion System V1.0 #------------------------------------------------------------------------------- # By FlipelyFlip #=============================================================================== =begin With this script you can change the battle transition to randomize the transition for random battles. Also you can set random transition for boss battles or set a specified transition for battles. Everything is possible (: =end module Flip TransitTypVarID = 1 # Variable ID for defining if it's a normal, special or # boss battle transition. BossDuratVarID = 2 # Variable ID for the duration of the transition # standard is 60. The higher the number, the longer the transition would take. BossDirect = "Graphics/System/" # sets the direction where the graphics are BossTransit = [ # <-- do not remove this!! "BossStart", # set up the graphics name for boss transition "BossBattle2", "BossBattle3", ] # <-- do not remove this!! SpecialDuratVarID = 3 # Variable ID for the duration of the transition # no standard. The higher the number, the longer the transition would take. SpecialDirect = "Graphics/System/" # sets the direction where the graphics are SpecialTransit = [ # <-- do not remove this!! "BattleStart5", # set up the graphics name for special "BattleStart6", # transition "BattleStart7", ] # <-- do not remove this!! CustomDuratVarID = 4 # Variable ID for the duration of the transition # standard is 60. The higher the number, the longer the transition would take. CustomDirect = "Graphics/System/" # sets the direction where the graphics are. CustomTransitVarID = 5 # Variable ID to save the name of the transition. # to set the name of transition in a variable, you have to use the call script # command. Write then in: # $game_variables[Flip] = "TransitionName" RandomDuratVarID = 6 # Variable ID for the Duration of the transition # standard is 60. The higher the number, the longer the transition would take. RandomDirect = "Graphics/System/" # sets the direction where the graphics are RandomTransit = [ # <-- do not remove this!! "BattleStart1", # set up the graphics name for random "BattleStart2", # transitions. "BattleStart3", "BattleStart4", "BattleStart", ] # <-- do not remove this!! end #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # This class performs the map screen processing. #============================================================================== class Scene_Map #-------------------------------------------------------------------------- # ● Execute Pre-battle Transition #-------------------------------------------------------------------------- def perform_battle_transition if $game_variables[Flip] == 1 # check if variable == 1 for # Bossbattletransition (: Graphics.transition($game_variables[BossDuratVarID], Flip::BossDirect+Flip::BossTransit[rand(Flip::BossTransit.size)], 100) elsif $game_variables[Flip] == 2 # check if variable == 2 for # Specialtransition. Used for Transitions which are not for random battles, # also not for boss battles. Graphics.transition($game_variables[Flip], Flip::SpecialDirect+Flip::SpecialTransit[rand(Flip::SpecialTransit.size)], 100) elsif $game_variables[Flip] == 3 # check if variable == 3 for # Customtransition. Used to specify one transition for a battle. Graphics.transition($game_variables[Flip], Flip::CustomDirect+$game_variables[Flip], 100) else # Used for random battles Graphics.transition($game_variables[Flip], Flip::RandomDirect+Flip::RandomTransit[rand(Flip::RandomTransit.size)], 100) end Graphics.freeze end end class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # ● Command New Game #-------------------------------------------------------------------------- alias flip_transition_default_command_new_game command_new_game def command_new_game flip_transition_default_command_new_game $game_variables[Flip] = 60 # sets the BossDurationVarID to 60 $game_variables[Flip] = 60 # sets the CustomDurationVarID to # 60 $game_variables[Flip] = 60 # sets the RandomDuratVarID to 60 end end Note dell'Autore:Lo script è di libero utilizzo.
      Se dovesse venire utilizzato per scopi commerciali, contattate l'Autore.
    • Da Ally
      Nome Script: Set Transizioni
      Versione: 1.0
      Autore/i: Rafael Sol Maker
       
      Informazioni:
      Può sembrare uguale all'altro script per impostare le transition, ma non è così http://rpgmkr.net/forum/public/style_emoticons/default/xd.gif
      Infatti in questo è possibile modificare quello per il trasporto su una mappa, quello per iniziare la battaglia, e così via...
       
      Istruzioni:
      Inserite lo script sotto Material.
      Le immagini delle Transition, dovranno essere inserite nella rispettiva cartella.
       
      Script:
       

      #=============================================================================== # RAFAEL_SOL_MAKER's ACE TRANSITION SET v1.0 #------------------------------------------------------------------------------- # Description | With this script you can use a set of multiple customized # | transitions in the teleport, or at the beginning or end of # | battles. You can configure in and out transitions, so a total # | of six different transitions can be used within your game. #------------------------------------------------------------------------------- # Script Usage | To change the transitions in-game use the following command: # | # -> | set_transition (transition, filename) # | # | Where 'transition' accepts the following values: MAP_IN, # | MAP_OUT, BATTLE_IN, BATTLE_OUT, BATTLE_END_IN, BATTLE_END_OUT; # | And 'filename' is the name of the bitmap used for transition, # | which should be in the folder 'Graphics/Transitions/'. # | If you prefer to use the fade effect instead, just use a blank # | filename, a empty quote: "" ; # | # -> | set_transition_wait (duration) # | # | To set the transition's delay time, in frames. # | # -> | OBS.: Also uses a teleport sound effect that can be configured # | by Sound module. The settings and default values can be found # | in the configurable module. #------------------------------------------------------------------------------- # Special Thanks: Angel Ivy-chan #------------------------------------------------------------------------------- #=============================================================================== #=============================================================================== # VERSION HISTORY #------------------------------------------------------------------------------- # ACE TRANSITION SET v1.0 - 04/12/2011(dd/mm/yyyy) # * Initial release (and my very first script in RGSS3!) #------------------------------------------------------------------------------- #=============================================================================== module PPVXAce_General_Configs # TRANSITION BETWEEN THE SCENES Transition_In = 'Blind01' # Map Transition (in) Transition_Out = 'Blind02' # Map Transition (out) Battle_In = 'Blind03' # Battle Transition (in) Battle_Out = 'Blind04' # Battle Transition (out) Battle_End_In = 'Brick01' # Battle End Transition (in) Battle_End_Out = 'Brick02' # Battle End Transition (out) Transition_Wait = 60 # Transition Delay, in Frames end module Cache # Preparation of Transitions in Cache def self.transition(filename) load_bitmap('Graphics/Transitions/', filename) end end module Sound # Teleport's Sound Effect def self.play_teleport Audio.se_play('Audio/SE/Run', 25, 50) end end class Game_Interpreter include PPVXAce_General_Configs MAP_IN = 1 #Transition: Map In MAP_OUT = 2 #Transition: Map Out BATTLE_IN = 3 #Transition: Battle In BATTLE_OUT = 4 #Transition: Battle Out BATTLE_END_IN = 5 #Transition: End of Battle In BATTLE_END_OUT = 6 #Transition: End of Battle Out #-------------------------------------------------------------------------- # Change Transitions Between Scenes #-------------------------------------------------------------------------- def set_transition (transition = MAP_IN, filename = '') # Selects which transition will be changed case transition when MAP_IN $game_system.map_in = filename when MAP_OUT $game_system.map_out = filename when BATTLE_IN $game_system.battle_in = filename when BATTLE_OUT $game_system.battle_out = filename when BATTLE_END_IN $game_system.battle_end_in = filename when BATTLE_END_OUT $game_system.battle_end_out = filename end end #-------------------------------------------------------------------------- # Change the Transition Delay #-------------------------------------------------------------------------- def set_transition_wait (duration = 45) $game_system.transition_wait = duration end end class Game_System include PPVXAce_General_Configs attr_accessor :map_in attr_accessor :map_out attr_accessor :battle_in attr_accessor :battle_out attr_accessor :battle_end_in attr_accessor :battle_end_out attr_accessor :transition_wait attr_accessor :was_in_battle alias solmaker_transition_initialize initialize def initialize solmaker_transition_initialize load_transitions end def load_transitions @map_in = Transition_In @map_out = Transition_Out @battle_in = Battle_In @battle_out = Battle_Out @battle_end_in = Battle_End_In @battle_end_out = Battle_End_Out @transition_wait = Transition_Wait @was_in_battle = false end end class Scene_Map < Scene_Base def pre_transfer @map_name_window.close case $game_temp.fade_type when 0 perform_map_transition_out when 1 white_fadeout(fadeout_speed) end end def post_transfer case $game_temp.fade_type when 0 perform_map_transition_in when 1 white_fadein(fadein_speed) end @map_name_window.open end def perform_transition if Graphics.brightness == 0 Graphics.transition(0) fadein(fadein_speed) else $game_system.was_in_battle ? perform_battle_end_transition : super end end def perform_battle_transition filename = "" if $game_system.battle_out != "" filename = 'Graphics/Transitions/'+ $game_system.battle_out end Graphics.transition($game_system.transition_wait, filename) Graphics.freeze end def perform_battle_end_transition $game_system.was_in_battle = false filename = "" if $game_system.battle_end_in != "" filename = 'Graphics/Transitions/' + $game_system.battle_end_in end Graphics.transition($game_system.transition_wait, filename) end def perform_map_transition_out Graphics.freeze @spriteset.dispose filename = "" if $game_system.map_out != "" filename = 'Graphics/Transitions/' + $game_system.map_out end Graphics.transition($game_system.transition_wait, filename) end def perform_map_transition_in Graphics.wait($game_system.transition_wait / 2) Graphics.freeze @spriteset = Spriteset_Map.new filename = "" if $game_system.map_in != "" filename = 'Graphics/Transitions/' + $game_system.map_in end Graphics.transition($game_system.transition_wait, filename) end end class Scene_Battle < Scene_Base def perform_transition filename = "" if $game_system.battle_in != "" filename = 'Graphics/Transitions/'+ $game_system.battle_in end Graphics.transition($game_system.transition_wait, filename) end def pre_terminate super $game_system.was_in_battle = true perform_map_transition if SceneManager.scene_is?(Scene_Map) Graphics.fadeout(60) if SceneManager.scene_is?(Scene_Title) end def perform_map_transition Graphics.freeze @spriteset.dispose filename = "" if $game_system.battle_end_out != "" filename = 'Graphics/Transitions/' + $game_system.battle_end_out end Graphics.transition($game_system.transition_wait, filename) end end Note dell'Autore:Per un uso commerciale, contattate l'Autore.
    • Da Ally
      Nome Script: Video Player
      Versione: N/D
      Autore/i: SuperOverlord

      Informazioni:
      Pare che questo sia l'unico script in grado di far funzionare i video su VX.

      Features:
      Le features sono scritte all'interno dello script, ma riportiamole in italiano:
      - Utilizzare il video su mappa o in battaglia richiamando un comando
      - Pausa o uscita dal video mentre si gioca
      - Video in risoluzione 544x416 o in full screen
      - Video nelle Skill

      Istruzioni:
      All'interno dello script.

      Script:


      #============================================================================== # # SOV ~ Videos # #============================================================================== # Author: SuperOverlord #============================================================================== # Features: #------------------------------------------------------------------------------ # o Play video's on the map or in battle using a simple script event command. # # o Optionally pause or exit video's while they play. # # o View the video in the game window or in fullscreen. # # o Setup video skills, which show the video before damage effects. #============================================================================== # Instructions: #------------------------------------------------------------------------------ # o Place all videos in a folder with the same name as in configuration. #   This folder is created automatically the first time the game is played if #   it doesn't already exist. # # o Playing Videos when on the map. # #   - See script calls below. # # o Playing videos in battle. # #   - As when on the map the script event command can be used in battle also. # #   - As well as this you can setup skills as video skills which display #     a video before damaging the enemy. # #     To do this the following tags can be used in the skills notebox: #     1) <video_name = "filename"> #        ~ name is the name of the video file. If the filename extension is #          missing the first file matching that name is used. #          (Quotes are necessary around the filename) # #      As well as the first tag 2 others are available. These tags will only #      take effect if placed on a line below the first tag. #      If these don't exist they are assumed true. # #      2) <video_exitable = n>   ~ Can the video be exited by the exit input? #      3) <video_pausable = n>   ~ Can the video be paused? #         ~ n is replaced with either t or f (t : true, f : false) # #      For other Video properties (x,y,width,height,fullscreen) the default #      settings are used. (See script calls below) #============================================================================== # Script Calls: #------------------------------------------------------------------------------ # Commands (From the script call command on page three of event commands) #------------------------------------------------------------------------------ # o To change default values for video properties. # #  1) Video.default_x = n #  2) Video.default_y = n #  3) Video.default_width  = n #  4) Video.default_height = n #  5) Video.fullscreen = bool #   #  In all 5 commands above: #  ~ n is an integer value #  ~ bool is either true or false # # o To play videos # #   play_video(filename,exitable,pausable) #   ~ filename : name of video file             (Must be in quotes) #   ~ exitable : Can the video be exited?       (When left out = true) #   ~ pausable : Can the video be paused?       (When left out = true) #   #   For all other values the default's are used. #============================================================================== # Compatibility: #------------------------------------------------------------------------------ # o Skill videos will depend on the battle system but sould work. #============================================================================== # Credit: #------------------------------------------------------------------------------ # o Credit goes to Trebor and Berka whose scripts helped be figure out the #   mci_send_stringA function. #============================================================================== module SOV   module Video   #--------------------------------------------------------------------------   # Configuration   #--------------------------------------------------------------------------     # Name of folder for videos to be held in.     DIR_NAME = "Videos"     # Exit video input     EXIT_INPUT  = Input::B     # Pause video input     PAUSE_INPUT = Input::R   #--------------------------------------------------------------------------   # End Configuration   #--------------------------------------------------------------------------   end end #============================================================================== # Import #------------------------------------------------------------------------------ $imported = {} if $imported == nil $imported['Videos'] = true #============================================================================== #============================================================================== # ** SOV::Video::Commands #============================================================================== module SOV::Video::Commands   #--------------------------------------------------------------------------   # * Play a video   #  filename : video's filename (with or without extension)   #  exitable : Can the video be exited   #  pausable : Can the video be paused   #--------------------------------------------------------------------------   def play_video(filename,exitable=true,pausable=true)     video = Cache.video(filename)     video.exitable = exitable     video.pausable = pausable     if $game_temp.in_battle    # In battle       $scene.play_video(video)     else                       # On map       $game_map.video = video     end   end   #---------------------------------------------------------------------------   # Define as module function   #---------------------------------------------------------------------------   module_function :play_video end #============================================================================== # ** SOV::Video::Regexp #============================================================================== module SOV::Video::Regexp   #--------------------------------------------------------------------------   # * Skill   #--------------------------------------------------------------------------   module Skill     FILENAME   = /<video[_ ]?(?:file)?name = "(.+)">/i     PAUSABLE   = /<video[_ ]?paus(?:e|able) = (t|f)>/i     EXITABLE   = /<video[_ ]?exit(?:able)? = (t|f)>/i   end end #============================================================================== # ** SOV::Game #============================================================================== module SOV::Game   #--------------------------------------------------------------------------   # Constants   #--------------------------------------------------------------------------   INI = 'Game'   #--------------------------------------------------------------------------   # * Get the game windows handle   #--------------------------------------------------------------------------   def self.hwnd     unless defined?(@@hwnd)       find_window = Win32API.new('user32','FindWindow','pp','i')       @@hwnd = find_window.call('RGSS Player',title)       end     return @@hwnd   end   #--------------------------------------------------------------------------   # * Get game title   #--------------------------------------------------------------------------   def self.title     unless defined?(@@title)       @@title = read_ini('title')     end     return @@title   end   #--------------------------------------------------------------------------   # * Read ini (Returns nil or match)   #--------------------------------------------------------------------------   def self.read_ini(variable,filename=INI)     reg = /^#{variable}=(.*)$/     File.foreach(filename+'.ini') { |line| break($1) if line =~ reg }   end end #============================================================================== # ** Cache #============================================================================== module Cache   #--------------------------------------------------------------------------   # Class Variables   #--------------------------------------------------------------------------   @@vcache = {}   #--------------------------------------------------------------------------   # Define as class methods   #--------------------------------------------------------------------------   class << self     #------------------------------------------------------------------------     # Alias List     #------------------------------------------------------------------------     alias sov_video_clear clear unless $@     #------------------------------------------------------------------------     # * Get a video object     #  filename : basename of file     #------------------------------------------------------------------------     def video(filename)       # Get full filename if extension is missing       if File.extname(filename) == ''         files = Dir["#{SOV::Video::DIR_NAME}/#{filename}.*"]         filename = File.basename(files[0]) # Set as first matching file       end       # Create or get the video object.       if @@vcache.has_key?(filename)         @@vcache[filename]       else         @@vcache[filename] = Video.new(filename)       end     end     #------------------------------------------------------------------------     # * Clear     #------------------------------------------------------------------------     def clear       @@vcache.clear       sov_video_clear     end   end end #============================================================================== # ** RPG::Skill #============================================================================== class RPG::Skill < RPG::UsableItem   #--------------------------------------------------------------------------   # * Determine if skill has a video skill   #--------------------------------------------------------------------------   def video     if @video == nil       @note.each_line { |line|         if @video == nil           @video = Cache.video($1) if line =~ SOV::Video::Regexp::Skill::FILENAME         else           @video.pausable = ($1 == 't') if line =~ SOV::Video::Regexp::Skill::PAUSABLE           @video.exitable = ($1 == 't') if line =~ SOV::Video::Regexp::Skill::EXITABLE         end       }       @video = :invalid if @video == nil     end     return @video   end end #============================================================================== # ** Video #------------------------------------------------------------------------------ #  Class handling playing videos. #============================================================================== class Video   #--------------------------------------------------------------------------   # Constants   #--------------------------------------------------------------------------   TYPE_AVI  = 'avivideo'   TYPE_MPEG = 'mpegvideo'   #--------------------------------------------------------------------------   # Class Variables   #--------------------------------------------------------------------------   @@default_x = 0   @@default_y = 0   @@default_width  = Graphics.width   @@default_height = Graphics.height   @@fullscreen = false   #--------------------------------------------------------------------------   # * Get and Set default_x/y/width/height   #--------------------------------------------------------------------------   for d in %w(x y width height)     # Define setter method     module_eval(%Q(def self.default_#{d}=(i); @@default_#{d} = i; end))     # Define getter method     module_eval(%Q(def self.default_#{d}; @@default_#{d}; end))   end   #--------------------------------------------------------------------------   # * Get fullscreen   #--------------------------------------------------------------------------   def self.fullscreen     @@fullscreen   end     #--------------------------------------------------------------------------   # * Set fullscreen   #--------------------------------------------------------------------------   def self.fullscreen=(val)     @@fullscreen = val   end   #--------------------------------------------------------------------------   # * Win32API   #--------------------------------------------------------------------------   @@mciSendStringA = Win32API.new('winmm','mciSendStringA','pplp','i')   #--------------------------------------------------------------------------   # * Video Command   #  command_string : string following mci_command_string format   #  buffer : string to retrieve return data   #  buffer_size : number of characters in buffer   #  callback_handle : handle of window to callback to. Used if notify is used   #                    in the command string. (Not supported by game window)   #--------------------------------------------------------------------------   def self.send_command(cmnd_string,buffer='',buffer_size=0,callback_handle=0)     # Returns error code. No error if NULL     err = @@mciSendStringA.call(cmnd_string,buffer,buffer_size,callback_handle)     if err != 0       buffer = ' ' * 255       Win32API.new('winmm','mciGetErrorString','LPL','V').call(err,buffer,255)       raise(buffer.squeeze(' ').chomp('000'))     end   end   #--------------------------------------------------------------------------   # * Play a video   #--------------------------------------------------------------------------   def self.play(video)     # Make path and buffer     path = "#{SOV::Video::DIR_NAME}/#{video.filename}"     buffer = ' ' * 255     # Initialize device and dock window with game window as parent.     type = " type #{video.type}" if video.type != ''     send_command("open #{path}#{type} alias VIDEO style child parent #{SOV::Game.hwnd}")     # Display video in client rect at x,y with width and height.     x = video.x     y = video.y     width  = video.width     height = video.height     send_command("put VIDEO window at #{x} #{y} #{width} #{height}")     # Begin playing video     screen = @@fullscreen ? 'fullscreen' : 'window'     send_command("play VIDEO #{screen}")     # Start Input and status processing loop     while buffer !~ /^stopped/       # Idle processing for a frame       sleep(1.0/Graphics.frame_rate)       # Get mode string       send_command('status VIDEO mode',buffer,255)       Input.update       if Input.trigger?(SOV::Video::PAUSE_INPUT) and video.pausable?         Sound.play_cursor         if buffer =~ /^paused/                 # If already paused           send_command("resume VIDEO")         # Resume video         else                                   # Otherwise           send_command("pause VIDEO")          # Pause video         end       elsif Input.trigger?(SOV::Video::EXIT_INPUT) and video.exitable?         Sound.play_cancel         # Terminate loop on exit input         break       end     end     # Terminate the device     send_command('close VIDEO')   end   #--------------------------------------------------------------------------   # Public Instance Variables   #--------------------------------------------------------------------------   attr_accessor :x   attr_accessor :y   attr_accessor :width   attr_accessor :height   attr_writer :exitable   attr_writer :pausable   attr_reader :filename   #--------------------------------------------------------------------------   # * Initialize   #--------------------------------------------------------------------------   def initialize(filename)     unless FileTest.file?("#{SOV::Video::DIR_NAME}/#{filename}")       raise(Errno::ENOENT,filename)     end     @filename = filename     @x = @@default_x     @y = @@default_y     @width  = @@default_width     @height = @@default_height     @exitable = true     @pausable = true   end   #--------------------------------------------------------------------------   # * Get Type   #--------------------------------------------------------------------------   def type     if @type == nil       case File.extname(@filename)       when '.avi'; @type = TYPE_AVI       when '.mpeg'||'.mpg'; @type = TYPE_MPEG       else         @type = ''       end     end     @type   end   #--------------------------------------------------------------------------   # * Is the video exitable?   #--------------------------------------------------------------------------   def exitable?     @exitable   end   #--------------------------------------------------------------------------   # * Is the video pausable?   #--------------------------------------------------------------------------   def pausable?     @pausable   end   #--------------------------------------------------------------------------   # Access   #--------------------------------------------------------------------------   private_class_method :send_command   end #============================================================================== # ** Game_Interpreter #============================================================================== class Game_Interpreter   #--------------------------------------------------------------------------   # Import   #--------------------------------------------------------------------------   include(SOV::Video::Commands) end #============================================================================== # ** Game_Map #============================================================================== class Game_Map   #--------------------------------------------------------------------------   # Public Instance Variables   #--------------------------------------------------------------------------   attr_accessor :video   end #============================================================================== # ** Scene_Map #============================================================================== class Scene_Map   #--------------------------------------------------------------------------   # Alias List   #--------------------------------------------------------------------------   alias sov_video_update update unless $@   #--------------------------------------------------------------------------   # * Play Video   #--------------------------------------------------------------------------   def play_video(video)     # Memorize and stop current bgm and bgs     bgm = RPG::BGM.last     bgs = RPG::BGS.last     RPG::BGM.stop     RPG::BGS.stop     # Play video     Video.play(video)     # Restart bgm and bgs     bgm.play     bgs.play   end   #--------------------------------------------------------------------------   # * Update   #--------------------------------------------------------------------------   def update     if $game_map.video != nil       play_video($game_map.video)       $game_map.video = nil       Input.update     else       sov_video_update     end   end end #============================================================================== # ** Scene_Battle #============================================================================== class Scene_Battle   #--------------------------------------------------------------------------   # * Alias list   #--------------------------------------------------------------------------   alias sov_video_execute_action_skill execute_action_skill unless $@   #--------------------------------------------------------------------------   # * Play Video   #--------------------------------------------------------------------------   def play_video(video)     # Memorize and stop current bgm     bgm = RPG::BGM.last     RPG::BGM.stop     # Play video     Video.play(video)     # Restart bgm     bgm.play   end   #--------------------------------------------------------------------------   # * Execute Action Skill   #--------------------------------------------------------------------------   def execute_action_skill     skill = @active_battler.action.skill         if skill.video.is_a?(Video)       execute_action_video(skill)     else       sov_video_execute_action_skill     end   end   #--------------------------------------------------------------------------   # * Execute Action Video   #--------------------------------------------------------------------------   def execute_action_video(skill)     text = @active_battler.name + skill.message1     @message_window.add_instant_text(text)     unless skill.message2.empty?       wait(10)       @message_window.add_instant_text(skill.message2)     end     wait(20)     @message_window.clear     # Fadout to black screen     br = Graphics.brightness     120.times { |i| Graphics.brightness = 255 - 255/60 * i; Graphics.update }     # Play video     play_video(skill.video)     # Reset brightness     Graphics.brightness = br     targets = @active_battler.action.make_targets     display_animation(targets, skill.animation_id)     @active_battler.mp -= @active_battler.calc_mp_cost(skill)     $game_temp.common_event_id = skill.common_event_id     for target in targets       target.skill_effect(@active_battler, skill)       display_action_effects(target, skill)     end   end end #============================================================================== # Pre-Main Processing #============================================================================== unless FileTest.directory?(SOV::Video::DIR_NAME) # If directory doesn't exist.   Dir.mkdir(SOV::Video::DIR_NAME)                # Make the directory end Incompatibilità:
      All'interno dello script.
×