Jump to content
Rpg²S Forum

giver

Utenti
  • Posts

    1,288
  • Joined

  • Last visited

Posts posted by giver

  1. Prima di tutto, ti consiglio di cambiare l'estremo superiore del range usato per scegliere quale id usare.

    Per due motivi: i tre punti lo escludono dal conteggio e dovrebbe essere meglio impostarlo all quantità massima di eventi mappa inseribili od anche più.

    Poi, mi sembra che anche pages sia un Hash, che ha molte cose in comune con gli array tradizionali, ma che in realtà è composto da due array paralleli, keys e values.

    L'istanziazione di un Hash si può fare in diversi modi.

    h = {}

    h = Hash[]

    h = Hash.new

     

    Le keys possono essere qualunque cosa, basta che non siano doppioni, ovvero devono essere uniche.

    Attenzione, quindi, che h[0] = "ok1"

    equivale a h.keys = 0 e h.values = "ok!", con valore di i che è uguale a h.keys.size o h.size prima dell'inserimento di tale coppia, se non era già presente nell'Hash, naturalmente.

    hasharlecchinato = {nil => 78,

    false => "vero!",

    "OMG!" => true,

    Game_Character => "oggetto personaggi su mappa",

    6 => true,

    [5, "no", true] => Game_SelfSwitches

    }

     

    Se vuoi tenerti uniformato a come l'editor aggiunge pagine all'evento, la prima pagina deve essere 1 e quindi dovresti scrivere qualcosa di simile a

    event.pages = {1 => RPG::Event::Page.new}

     

    Infine, mi sembra che prima di aggiungerlo alla lista degli eventi della mappa, tali dati vadano associati ad un'istanza di Game_Event.

    Più di così non posso dire.

    Buon Making!!

  2. E' da parecchio che non posso usare RPG Maker XP, nè accedere all'help file (rpgxp.chm), quindi non posso analizzare quanto hai scritto.

     

    Posso però dirti, ho appena ricontrollato in un vecchio script postato in questo forum, che la lista degli eventi sembra essere un hash, ossia un array associativo "chiave => valore", e perciò l'id che setti uguale a size potrebbe essere già tra le chiavi utilizzate.

    un check di tipo

    events.keys.include?(id)

    dovrebbe assicurare di non sovrascrivere un evento già esistente.

    Mi spiace di non poter fare di più.

  3. Innanzitutto chiedo scusa per questo bump, in quanto lo snippet è tuttora NON TESTATO.

     

    Mi sono accorto di non aver rimosso nell'istruzione della creazione della finestra con i comandi di Scene_End il passaggio di alcuni parametri legati ad una versione modificata di Window_Command utilizzata nel mio progetto da cui, come detto precedentemente, l'avevo estartto.

    # Scene_End Remover 1.0 f , by giver j20181115
    # This Add-on inserts the Scene_End options in the Game Scene_Menu
    
    module SER_CFG
    	# Write here the name of the command related to Scene_End, usually assigned
    	#   to the local variable s6 in def main of Scene_Menu
    	END_COMMAND_NAME = "Exit"
    	# If a particular windowskin is desired, different from the other windows in the
    	#   (C)MS, write its file name here
    	END_WINDOW_WSKIN = ""
    	# To lift the end window above all other content in the Menu scene, set the value below
    	END_WINDOW_OFFZ = 100
    	# Command names for the end window
    	TO_TITLE = "To Title"
    	SHUTDOWN = "Shutdown"
    	CANCEL = "Cancel"
    end
    
    class Window_Command < Window_Selectable
    	attr_reader :commands
    end
    
    class Scene_Menu
    	unless $@
    		alias giver_seremove_scemen_main	main
    	end
      def main
        @end_command = Window_Command.new(160, [SER_CFG::TO_TITLE, SER_CFG::SHUTDOWN, SER_CFG::CANCEL])
    	if SER_CFG::END_WINDOW_WSKIN != ""
    		@end_command.windowskin = RPG::Cache.windowskin(SER_CFG::END_WINDOW_WSKIN)
    	end
        @end_command.x = 320 - @end_command.width / 2
        @end_command.y = 240 - @end_command.height / 2
        @end_command.z +=  SER_CFG::END_WINDOW_OFFZ
        @end_command.visible = false
        @end_command.active = false
    
    	  giver_seremove_scemen_main
    
        @end_command.dispose
        if $scene.is_a?(Scene_Title)
          Graphics.transition
          Graphics.freeze
        end
      end
    
    	unless $@
    		alias giver_seremove_scemen_updt update
    	end
      def update
        @end_command.update
    	  giver_seremove_scemen_updt
        if @end_command.active
          update_end
          return
        end
      end
    
     	unless $@
    		alias giver_seremove_scemen_updtcmd update_command
    	end
     def update_command
            if Input.trigger?(Input::C) and @command_window.commands[@command_window.index] == SER_CFG::END_COMMAND_NAME
              $game_system.se_play($data_system.decision_se)
              @command_window.active = false
              @end_command.visible = true
              @end_command.active = true
              @end_command.index = 1
              return
            end
    	 giver_seremove_scemen_updtcmd
      end
    
      def update_end
        if Input.trigger?(Input::C)
          case @end_command.index
          when 0
            $game_system.se_play($data_system.decision_se)
            Audio.bgm_fade(800)
            Audio.bgs_fade(800)
            Audio.me_fade(800)
            $scene = Scene_Title.new
          when 1
            $game_system.se_play($data_system.decision_se)
            Audio.bgm_fade(800)
            Audio.bgs_fade(800)
            Audio.me_fade(800)
            $scene = nil
          when 2
            $game_system.se_play($data_system.cancel_se)
            @end_command.visible = false
            @end_command.active = false
            @command_window.active = true
          end
          return
        end
      end
    end
    

    Nei links sottostanti trovate i due script necessari ad usare la versione con i parametri aggiuntivi. Le istruzioni per l'uso sono al momento solo in inglese. Non sono le versioni originali, ma ho tentato di ricostruirli partendo dalle versioni modificate presenti nel mio progetto. Creditare Vincent Law se li usate, ma non date la colpa a lui se ci sono problemi di funzionamento.

    http://afantasymachine.altervista.org/CodiceRGSS/vintage/revive2008_windowselectable.rb

    http://afantasymachine.altervista.org/CodiceRGSS/vintage/revive2008_WindowCommand.rb

  4. La classe Window, come altre classi RGSS, non Ruby, si trova nella RGSS202.DLL, ed i suoi metodi e proprietà dovrebbero essere esposti nell'help file rpgvx.chm, mi pare . . . Se cerchi in rete, dovresti trovare ricostruzioni di quello che dovrebbe essere il suo codice sorgente, in quanto non è mai stato rilasciato in chiaro.

  5. Tale Chapters Save System v 2.0



    Descrizione

    Sostituisce la schermata di default per salvare la partita o caricarla, mettendo lo sviluppatore in condizione di personalizzarla ampiamente tramite immagini. Come originariamente progettato, ideale per integrare il look-n-feel di questo sistema con Title e Menù creati su mappa tramite comandi evento e pictures. E' stato creato e usato, in variante molto ridotta e su misura in versione 1.0, nel gioco "Restricted: Project 15" di kekkorider.
    SCREENSHOTS


    TUTTI RELATIVI ALLA CONFIGURAZIONE D'ESEMPIO (DEFAULT)
    Schermata Salvataggio Slot 1 (già usato)
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/TCSS/defaultTCSS_save1.png

    Schermata Caricamento Slot 2 (già usato)
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/TCSS/defaultTCSS_load2.png

    Schermata Salvataggio Slot 3 (già usato)
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/TCSS/defaultTCSS_save3.png

    Schermata Caricamento Slot 4 (inutilizzato)
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/TCSS/defaultTCSS_load4.png







    Autore

    giver, di RPG2S. Vedere la sezione Altri Dettagli per il CHANGELOG.




    Allegati

    Essendo uno script particolarmente esoso in termini di risorse personalizzate, è stato realizzato un pacchetto con tutte le risorse necessarie a vederlo in azione, con la configurazione di default, e comprendere meglio la relazione tra le risorse e quanto scritto nelle impostazioni (soprattutto per quel concerne l'immagine con i SIMBOLI per disegnare il tempo di gioco).
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/TCSSv200_DefaultCfgCartellaGraphics.zip

    Inoltre, i due background sono riproposti qui sotto senza le scritte nell'intestazione. Per poterle usare dopo la modifica bisogna rinominarle eliminando "_noLabels" dai loro nomi e metterle nella cartella Titles.


    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Titles/LoadBG_noLabels.png

    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Titles/SaveBG_noLabels.png






    Istruzioni per l'uso

    Lo script si compone di due parti, ed è meglio inserire ciascuna in uno spazio differente dello script editor, per evitare confusione: la sezione di configurazione, che va messa sopra l'altra, e l'engine che è lo script vero e proprio. Come sempre, vanno inserite al di sotto di Scene_Debug ed al di sopra di altri script personalizzati che potrebbero appoggiarsi alle scene Load e Save.

    Cosa si può personalizzare senza mettere le mani nel codice dello script principale:


    module TCSS_CFG è la sezione di configurazione.
    SLOT_W è la larghezza di ciascuna immagine associata agli slot di salvataggio.
    SLOT_H è l'altezza di ciascuna immagine associata agli slot di salvataggio.
    SLOTS_XY_LIST è un array di arrays con le coordinate dell'angolo superiore sinistro delle immagini associate a ciascuno slot. Es. [[8, 256], [96, 64], [192, 96], [224, 256], [320, 192], [416, 176], [600, 152]] dispone SETTE slots ad imitare vagamente l'Orsa Maggiore . . .
    SLOT_BASE_NAME è il nome base delle immagini rappresentanti gli slot vuoti. Se si decide di non usare immagini identiche per tutti gli slots, vedere più sotto, il nome completo di tali immagini avrà l'indice dello slot in coda al nome base, partendo da 1, senza zeri davanti. Es. Con nome base "slot", il primo slot, se vuoto mostrerà l'immagine slot1.png, il secondo slot mostrerà, se vuoto, l'immagine slot2.png, ecc.
    SLOT_FULL_SUFFIX è il suffisso che viene applicato ai nomi delle immagini che rappresentano slot pieni. Es. impostandolo a "_pieno", con nome base "slot", le immagini per gli slot pieni dovranno chiamarsi slotN_pieno.png, oppure slot_pieno, se si imposta a true la costante appena più sotto.
    USE_SAME_GRAPHIC_FOR_ALL_SLOTS serve ad indicare se si vuole usare solo una coppia di immagini per tutti gli slot (slot vuoto e slot pieno), impostandolo a true, invece che usare due immagini per ogni slot di salvataggio nella schermata (8 immagini per 4 slots).
    SLOTS_IN_ASCENDING_Z serve ad indicare se si vuole che lo slot successivo possa coprire in parte quello precedente, impostandolo a true.
    CHAPTERS_SCREEN_LIST è un array con l'elenco dei nomi, ciascuno tra virgolette, delle immagini associate ai vari capitoli previsti nel gioco. Es. ["capitolo01", "capitolo02", "capitolo03", "capitolo04", "capitolo05", "capitolo06", "capitolo07", "capitolo08", "capitolo09", "capitolo10", "capitolo11"] è una lista di immagini associate ad 11 capitoli. Ovviamente si possono scegliere nomi più intuitivi per tali immagini . . .
    SCREEN_W è la larghezza delle immagini legate ai capitoli.
    SCREEN_H è l'altezza delle immagini legate ai capitoli.
    SCREEN_XY è un array con le coordinate dell'angolo superiore sinistro dell'immagine rappresentativa del capitolo, memorizzato nella variabile evento apposita, vedere sotto, al momento del salvataggio.
    NO_SCREEN_NAME è l'immagine che viene mostrata quando un capitolo non ha un'immagine associata, come quello 0 [o 12+, nel caso dell'esempio fatto sopra].
    FACE_W è la larghezza delle immagini usate come "faces".
    FACE_H è l'altezza delle immagini usate come "faces".
    FACES_XY_LIST è un array di arrays, ciascuno contenente le coordinate dell'angolo superiore sinistro di ogni face di membro del party che si vuole visualizzare. Es. [[192, 68], [192, 168]] mostrerà i faces dei primi due membri del party, il primo alle coordinate x=192 e y=68, ed il secondo alle coordinate x=192 ed y=168 ("incolonnati").
    FACE_NAME_SUFFIX è il suffisso aggiunto al nome dell'immagine del character dei personaggi per sapere qual è l'immagine da usare come suo face.
    FACE_EMPTYSLOT_SAVE è il nome base, a cui viene aggiunto il suffisso impostato, dell'immagine da usare per riempire i faces vuoti nella schermata di salvataggio.
    FACE_EMPTYSLOT_LOAD è il nome base, a cui viene aggiunto il suffisso impostato, dell'immagine da usare per riempire i faces vuoti nella schermata di caricamento.
    FACES_IN_DESCENDING_Z serve ad indicare se si vuole che, in caso di sovrapposizioni tra faces, quello successivo venga coperto da quello precedente, impostando a true.
    DISABLE_TIME serve ad indicare se non si vuole mostrare il Tempo di Gioco nelle schermate di salvataggio e caricamento, impostandolo a true.
    DIGITS_STRIP_NAME è il nome dell'immagine contenente le cifre ed i separatori usati per scrivere il Tempo di Gioco. Deve essere composta da una serie di 12 riquadri consecutivi della stessa dimensione, ognuno dei quali deve contenere una cifra o simbolo da utilizzare, obbligatoriamente in sequenza 0123456789-: .
    TIME_W è la larghezza della sezione dedicata ad indicare il Tempo di Gioco.
    TIME_H è l'altezza della sezione dedicata ad indicare il Tempo di Gioco. Tenere conto che le cifre ed i separatori vengono disegnati con la base attaccata al lato inferiore di questa area.
    TIME_XY sono le coordinate dell'angolo superiore sinistro della sezione dedicata al Tempo di Gioco.
    TIME_BG_NAME è il nome dell'etichetta e fondale della sezione relativa al tempo di Gioco.
    TIME_DIGITS_OFFX è la distanza in pixel dal lato sinistro del contenuto relativo al Tempo di Gioco a cui cominciare a disegnare ore, minuti e secondi.
    DISABLE_MAP_NAME serve ad indicare se non si vuole mostrare il nome delle mappe nelle schermate di salvataggio e caricamento, impostandolo a true.
    MAP_NAME_W è la larghezza delle immagini con il nome delle mappe da mostrare.
    MAP_NAME_H è l'altezza delle immagini con il nome delle mappe da mostrare.
    MAP_NAME_XY è l'array dove sono indicate le coordinate dell'angolo superiore sinistro delle immagini con il nome della mappa da indicare.
    UNKNOWN_NAME è il nome dell'immagine da mostrare quando non è disponibile il nome di quella da mostrare, nella schermata di caricamento.
    SAVE_BG_NAME è il nome del Title usato come background nella schermata di salvataggio.
    LOAD_BG_NAME è il nome del Title usato come background nella schermata di caricamento.
    CURSOR_NAME è il nome dell'immagine da usare come cursore.
    CURSOR_OFFXY è l'indicazione della posizione relativa dell'angolo superiore sinistro del cursore rispetto a quello della finestra dello slot. Se lasciato come impostato di default, tale angolo corrisponderà a quello della grafica dello slot.
    CURSOR_BLINK è l'opzione per indicare se si vuole che il cursore lampeggi o resti fisso.
    UPDOWN_STEP è la quantità di slots di spostamento del cursore se si preme FRECCIA SU o GIù. Questa opzione serve per gestire meglio un layout con più righe formate da più slots di salvataggio.
    CHAPTER_GVAR_ID è l'id della variabile in cui lo sviluppatore indica qual è il capitolo corrente, ricordandosi che il numero identificativo dei capitoli parte comunque dal valore 1.







    Script

    CONFIGURAZIONE (prima parte del sistema)

     


    #******************************************************************************
    #   TALE CHAPTERS SAVE SYSTEM v 2.0 by giver (RPG2S) - PART 1: CONFIGURATION
    #******************************************************************************
    #
    #     CONFIGURATION START     ===============================================
    #
    #******************************************************************************
    #
    # NOTES: ALL images go in the Pictures folder, with the exception of the Load
    #          and Save scene BackGrounds, that go in the Titles folder
    #        As noted in the Changelog section, ALL windows show only their
    #          contents, thus the coordinates to be set in the configuration
    #          are those of the top left corner of the graphics used in them.
    #          The script will automatically adjust the windows position correctly
    #------------------------------------------------------------------------------
    
    module TCSS_CFG
      # Settings for the SLOT windows CONTENTS
      SLOT_W = 96
      SLOT_H = 96
      # List of SLOTS coordinates, to be written as   [coord_x, coord_y]
      #   followed by a comma if not related to the LAST slot
      SLOTS_XY_LIST = [
      [4, 68],
      [4, 172],
      [4, 276],
      [4, 380]
      ]
      # SLOT IMAGE names PARTS (name+index+suffix) [1st INDEX is 1, not 0]
      SLOT_BASE_NAME = "slot"
      SLOT_FULL_SUFFIX = "_full"
      # 3rd Slot complete images name are   slot3.png   and   slot3_full.png
      # OR, to spare on graphics needed for the Slots, set this to   true
      #   the slots images name become   slot.png   and   slot_full.png
      USE_SAME_GRAPHIC_FOR_ALL_SLOTS = false
      # Overlaying of SLOTS. Default (true) means slot_2 would overlaps slot_1
      SLOTS_IN_ASCENDING_Z = true
      #
      # List of images related to each CHAPTER
      CHAPTERS_SCREEN_LIST = [
      "ch01",
      "ch02",
      "ch03",
      "ch04",
      "ch05",
      "ch06",
      "ch07",
      "ch08",
      "ch09",
      "ch10",
      "ch11",
      "ch12"
      ]
      # Settings for the CHAPTER SCREEN window CONTENTS
      SCREEN_W = 320
      SCREEN_H = 180
      # Image top left corner COORDINATES
      SCREEN_XY = [120, 132]
      # Image name if there is no SCREEN for the current CHAPTER ID (minus 1)
      NO_SCREEN_NAME = "gamelife"
      #
      # Settings for the actors "FACES" windows CONTENTS
      FACE_W = 96
      FACE_H = 144
      # List of "FACES" coordinates, to be written as   [coord_x, coord_y]
      #   followed by a comma if not related to the LAST "face"
      FACES_XY_LIST = [
      [144, 328],
      [264, 328],
      [384, 328],
      [504, 328]
      ]
      # The "face" image should have a name made by its Character graphics name
      #   plus the suffix set below. E.G. An actor with a Character image name
      #   of   001-Fighter01   must have a face image named 001-Fighter01_saveface
      FACE_NAME_SUFFIX = "_saveface"
      # The image base name if the FACE window has no actor assigned to it
      #   The image file should include the SUFFIX indicated above
      FACE_EMPTYSLOT_SAVE = "shadow"      # shadow_saveface.png
      FACE_EMPTYSLOT_LOAD = "nobody"      # nobody_saveface.png
      # Overlayering of FACES. Default (true) means the 1st Face would overlap,
      #   cover, the 2nd Face
      FACES_IN_DESCENDING_Z = true
      #
      # Settings for the GAMETIME window CONTENTS
      # To not show the GAMETIME in the Load and Save scenes, set it to   true
      DISABLE_TIME = false
      # A 12 MONOSPACED characters line-up IMAGE "0123456789-:"
      DIGITS_STRIP_NAME = "savedigits"
      TIME_W = 128
      TIME_H = 96
      # Coordinates of the top left corner of the GAMETIME contents
      TIME_XY = [472, 160]
      # (BG with the) LABEL for the GAMETIME section of the scene screen
      TIME_BG_NAME = "savetimeBG"
      # Distance of the first GAMETIME digit from the left side of the contents
      TIME_DIGITS_OFFX = 8
      #
      # Settings for the MAP NAME window CONTENTS
      # To not show the MAP NAME in the Load and Save scenes, set it to   true
      DISABLE_MAP_NAME = false
      MAP_NAME_W = 512
      MAP_NAME_H = 40
      # Coordinates of the top left corner of the MAP NAME contents
      MAP_NAME_XY = [116, 76]
      # Map Name IMAGE NAME for Empty SLOTS in the LOAD scene. Otherwise
      #   (usually) the Map Name in the MAP EDITOR is used as name for the
      #   IMAGE FILE with the Map Name to SHOW
      UNKNOWN_NAME = "unknown"
      #
      # Settings for the Scene Load/Save BackGrounds
      SAVE_BG_NAME = "SaveBG"
      LOAD_BG_NAME = "LoadBG"
      #
      # Settings for the sprite used as SLOTS cursor in the scenes
      # The image, if the offsets aren't changed, should have the SAME
      #   size as the SLOTS CONTENTS set above, and OVERLAPS them
      CURSOR_NAME = "saveslots_cursor"
      # CURSOR top Left corner offsets from SLOT WINDOWS top left corner
      CURSOR_OFFXY = [16, 16]
      # To enable cursor blinking, set it to true
      CURSOR_BLINK = true
      # The quantity of SLOTS of cursor movement when pressing UP or DOWN
      #   LEFT and RIGHT always have a STEP of 1
      UPDOWN_STEP = 1
      # ID of the game variable where the current chapter number is stored
      # 1st CHAPTER has value 1, 2nd CHAPTER has value 2, and so on
      CHAPTER_GVAR_ID = 100
      #
    end
    
    #******************************************************************************
    #
    #     CONFIGURATION END     =================================================
    #
    #******************************************************************************
    
    

     



    ENGINE (seconda parte del sistema)

     

    #==============================================================================
    #   TALE CHAPTERS SAVE SYSTEM v 2.0 by giver (RPG2S) - PART 2: ENGINE 
    #==============================================================================
    #
    #  ReRevised Scene Save"N"Load by giver [Tale Chapters Save System]
    #     CHANGELOG
    #
    #  v. 2.0 Flexi MED (Customizable Layout) datecode 20180329-20180406
    #     * Configuration moved in   module TCSS_CFG
    #       Restored some options not needed by Kekkorider
    #     * All TEXT elements use IMAGES, including TIME and MAP NAMES if enabled
    #       [i.e. Originally developed to merge in a project that has both
    #       Title and Menu created using maps, with Pictures and Characters]
    #     * TAG images used in the save slots are defined by Chapter ID instead
    #       of current MAP (no more Save Points), indicated in a Game Variable
    #     * Save slots quantity can be different from the default 4, but all of
    #       them must be visible in the 640x480 screen area
    #     * Any desired frame must be drawn in the Graphics used for the
    #       system, because its windows have opacity 0, hiding both their
    #       frame and their background completely
    #
    #  v. 1.01 (Basic Old Way) UltraLITE Redux it2/9/2009
    #     * Developed as requested by Kekkorider for his game Restricted - Project 15
    #
    #==============================================================================
    # EDITING THE CODE BELOW THIS LINE IS AT YOUR OWN RISK
    #------------------------------------------------------------------------------
    
    class Scene_Title
      map_infos = load_data("Data/MapInfos.rxdata")
      $map_names = []
      for key in map_infos.keys
        $map_names[key] = map_infos[key].name
      end
      #
      unless $@
        alias giver_talesave_scetitle_updt update
      end
      def update
        unless @rechecked_continue
          for i in 0...TCSS_CFG::SLOTS_XY_LIST.size
            if FileTest.exist?("Save#{i+1}.rxdata")
              @continue_enabled = true
            end
          end
          if @command_window != nil
            if @continue_enabled
              @command_window.index = 1
            else
              @command_window.disable_item(1)
            end
          end
          @rechecked_continue = true
        end
        giver_talesave_scetitle_updt
      end
    end
    
    class Game_Map
      def map_name(map_id = @map_id)
        return $map_names[map_id]
      end
    end
    
    class Game_Party
      def refresh(actors_db = $game_actors)
        new_actors = []
        for i in 0...@actors.size
          if $data_actors[@actors[i].id] != nil
            new_actors.push(actors_db[@actors[i].id])
          end
        end
        @actors = new_actors
      end
    end
    
    class Window_SaveFile < Window_Base
      #
      def initialize(file_index)
        super(0, 0, TCSS_CFG::SLOT_W + 32, TCSS_CFG::SLOT_H + 32)
        self.contents = Bitmap.new(width - 32, height - 32)
        zorder = (TCSS_CFG::SLOTS_IN_ASCENDING_Z == true) ? file_index :
            -file_index
        self.z += (100 + zorder)
        self.opacity = 0
        @file_index = file_index
        @file_name = $scene.make_filename(@file_index)
        @file_exist = FileTest.exist?(@file_name)
        refresh
      end
      #
      def refresh
        slot_pic_name = TCSS_CFG::SLOT_BASE_NAME
        unless TCSS_CFG::USE_SAME_GRAPHIC_FOR_ALL_SLOTS
          slot_pic_name += (@file_index+1).to_s
        end
        unless @file_exist
          self.contents = RPG::Cache.picture(slot_pic_name)
        else
          self.contents = RPG::Cache.picture(slot_pic_name + TCSS_CFG::SLOT_FULL_SUFFIX)
        end
      end
      #
    end
    
    class Window_SaveScreen < Window_Base
      #
      def initialize
        super(TCSS_CFG::SCREEN_XY[0] - 16, TCSS_CFG::SCREEN_XY[1] - 16, TCSS_CFG::SCREEN_W +
            32, TCSS_CFG::SCREEN_H + 32)
        self.contents = Bitmap.new(width - 32, height - 32)
        self.opacity = 0
      end
      #
      def set_data(chapter_index)
        unless chapter_index.nil? or chapter_index == -1 or TCSS_CFG::CHAPTERS_SCREEN_LIST[chapter_index].nil?
          chapter_name = TCSS_CFG::CHAPTERS_SCREEN_LIST[chapter_index]
        else
          chapter_name = TCSS_CFG::NO_SCREEN_NAME
        end
        self.contents = RPG::Cache.picture(chapter_name)
      end
      #
    end
    
    class Window_SaveFace < Window_Base
      #
      def initialize(actor_index)
        super(0, 0, TCSS_CFG::FACE_W + 32, TCSS_CFG::FACE_H + 32)
        @actor_index = actor_index
        self.contents = Bitmap.new(width - 32, height - 32)
        zorder = (TCSS_CFG::FACES_IN_DESCENDING_Z == true) ? -@actor_index :
            @actor_index
        self.z += (100 + zorder)
        self.opacity = 0
      end
      #
      def set_data(save_party)
        if save_party != nil and save_party[@actor_index] != nil
          facename = save_party[@actor_index].character_name
        else
          if $scene.is_a?(Scene_Save)
            facename = TCSS_CFG::FACE_EMPTYSLOT_SAVE
          else
            facename = TCSS_CFG::FACE_EMPTYSLOT_LOAD
          end
        end
        self.contents = RPG::Cache.picture(facename + TCSS_CFG::FACE_NAME_SUFFIX)
      end
      #
    end
    
    class Window_SaveTime < Window_Base
      #
      def initialize
        super(TCSS_CFG::TIME_XY[0] - 16, TCSS_CFG::TIME_XY[1] - 16, TCSS_CFG::TIME_W + 32,
            TCSS_CFG::TIME_H + 32)
        self.contents = Bitmap.new(width - 32, height - 32)
        self.opacity = 0
      end
      #
      def set_data(saveplaytime)
        self.contents.clear
        unless TCSS_CFG::DISABLE_TIME
          label = RPG::Cache.picture(TCSS_CFG::TIME_BG_NAME)
          self.contents.blt(0, 0, label, label.rect)
          label.dispose
          if saveplaytime != nil
            total_secs = saveplaytime / Graphics.frame_rate
            hours = total_secs / 60 / 60
            hr_1s = hours % 10
            hr_10s = hours / 10
            mins = total_secs / 60 % 60
            m_1s = mins % 10
            m_10s = mins / 10
            secs = total_secs % 60
            s_1s = secs % 10
            s_10s = secs / 10
            time = [hr_10s, hr_1s, 11, m_10s, m_1s, 11, s_10s, s_1s]
          else
            time = [10, 10, 11, 10, 10, 11, 10, 10]
          end
          draw_time(time)
        end
      end
      #
      def draw_time(digits_list)
        digits = RPG::Cache.picture(TCSS_CFG::DIGITS_STRIP_NAME)
        for i in 0...8
          src_rect = Rect.new(digits_list[i] * (digits.width / 12), 0,
              digits.width / 12, digits.height)
          self.contents.blt((digits.width / 12) * i + TCSS_CFG::TIME_DIGITS_OFFX,
              self.contents.height - digits.height, digits, src_rect)
        end
        digits.dispose
      end
      #
    end
    
    class Window_SaveMapName < Window_Base
      #
      def initialize
        super(TCSS_CFG::MAP_NAME_XY[0] - 16, TCSS_CFG::MAP_NAME_XY[1] - 16, TCSS_CFG::MAP_NAME_W +
            32, TCSS_CFG::MAP_NAME_H + 32)
        self.opacity = 0
      end
      #
      def set_data(mapid)
        unless TCSS_CFG::DISABLE_MAP_NAME
          if mapid.to_i > 0
            mapname = $game_map.map_name(mapid)
          else
            mapname = TCSS_CFG::UNKNOWN_NAME
          end
          self.contents = RPG::Cache.picture(mapname)
        end
      end
      #
    end
    
    class Scene_Save < Scene_File
      #
      def get_scene_bg
        return TCSS_CFG::SAVE_BG_NAME
      end
      #
    end
    
    class Scene_Load < Scene_File
      #
      def get_scene_bg
        return TCSS_CFG::LOAD_BG_NAME
      end
      #
      unless $@
        alias giver_talesave_sceload_init initialize
      end
      def initialize
        giver_talesave_sceload_init
        latest_time = Time.at(0)
        for i in 0...TCSS_CFG::SLOTS_XY_LIST.size
          filename = make_filename(i)
          if FileTest.exist?(filename)
            file = File.open(filename, "r")
            if file.mtime > latest_time
              latest_time = file.mtime
              $game_temp.last_file_index = i
            end
            file.close
          end
        end
      end
      #
    end
    
    class Scene_File
      #
      def initialize(help_text)
      end
      #
      def main
        @scene_bg = Sprite.new
        bg_label = RPG::Cache.title( (get_scene_bg.to_s) )
        @scene_bg.bitmap = bg_label
        @savefile_windows = []
        @savedata = []
        for i in 0...TCSS_CFG::SLOTS_XY_LIST.size
          name = make_filename(i)
          @savefile_windows.push( Window_SaveFile.new(i) )
          @savefile_windows[i].x = TCSS_CFG::SLOTS_XY_LIST[i][0] - 16
          @savefile_windows[i].y = TCSS_CFG::SLOTS_XY_LIST[i][1] - 16
          @savedata[i] = make_slot_data(name)
        end
        @cursor = RPG::Sprite.new
        @cursor.bitmap = RPG::Cache.picture(TCSS_CFG::CURSOR_NAME)
        @cursor.blink_on if TCSS_CFG::CURSOR_BLINK
        @cursor.blend_type = 1
        @time_window = Window_SaveTime.new
        @mapname_window = Window_SaveMapName.new
        @screen_window = Window_SaveScreen.new
        @face_windows = []
        for i in 0...TCSS_CFG::FACES_XY_LIST.size
          face_window = Window_SaveFace.new(i)
          face_window.x = TCSS_CFG::FACES_XY_LIST[i][0] - 16
          face_window.y = TCSS_CFG::FACES_XY_LIST[i][1] - 16
          @face_windows.push(face_window)
        end
        @file_index = $game_temp.last_file_index
        update_cursor
        update_slot_data
        Graphics.transition(20)
        loop do
          Graphics.update
          Input.update
          update
          if $scene != self
            break
          end
        end
        Graphics.freeze
        @time_window.dispose
        @mapname_window.dispose
        @screen_window.dispose
        for i in @face_windows
          i.dispose
        end
        @face_windows.clear
        @face_windows = nil
        @savedata.clear
        @savedata = nil
        @cursor.bitmap.dispose
        @cursor.dispose
        for i in @savefile_windows
          i.dispose
        end
        @savefile_windows.clear
        @savefile_windows = nil
        @scene_bg.bitmap.dispose
        @scene_bg.dispose
      end
      #
      def update
        @time_window.update
        @mapname_window.update
        @screen_window.update
        for f in @face_windows
          f.update
        end
        for s in @savefile_windows
          s.update
        end
        @cursor.update
        if Input.trigger?(Input::C)
          on_decision(make_filename(@file_index))
          $game_temp.last_file_index = @file_index
          return
        elsif Input.trigger?(Input::B)
          on_cancel
          return
        end
        if Input.repeat?(Input::DOWN)
          if Input.trigger?(Input::DOWN) or
              @file_index < (TCSS_CFG::SLOTS_XY_LIST.size - TCSS_CFG::UPDOWN_STEP)
            $game_system.se_play($data_system.cursor_se)
            @file_index = (@file_index + TCSS_CFG::UPDOWN_STEP) % TCSS_CFG::SLOTS_XY_LIST.size
            update_cursor
            update_slot_data
            return
          end
        elsif Input.repeat?(Input::UP)
          if Input.trigger?(Input::UP) or @file_index > (TCSS_CFG::UPDOWN_STEP - 1)
            $game_system.se_play($data_system.cursor_se)
            @file_index = (@file_index + TCSS_CFG::SLOTS_XY_LIST.size -
                TCSS_CFG::UPDOWN_STEP) % TCSS_CFG::SLOTS_XY_LIST.size
            update_cursor
            update_slot_data
            return
          end
        end
        if Input.repeat?(Input::RIGHT)
          if Input.trigger?(Input::RIGHT) or
              @file_index < (TCSS_CFG::SLOTS_XY_LIST.size - 1)
            $game_system.se_play($data_system.cursor_se)
            @file_index = (@file_index + 1) % TCSS_CFG::SLOTS_XY_LIST.size
            update_cursor
            update_slot_data
            return
          end
        elsif Input.repeat?(Input::LEFT)
          if Input.trigger?(Input::LEFT) or @file_index > 0
            $game_system.se_play($data_system.cursor_se)
            @file_index = (@file_index + TCSS_CFG::SLOTS_XY_LIST.size - 1) %
                TCSS_CFG::SLOTS_XY_LIST.size
            update_cursor
            update_slot_data
            return
          end
        end
      end
      #
      def make_filename(file_index)
        return "Save#{file_index + 1}.rxdata"
      end
      #
      def make_slot_data(filename)
        save_info = []
        if FileTest.exist?(filename)
          file = File.open(filename, "r")
          Marshal.load(file)
          frame_count = Marshal.load(file)
          Marshal.load(file)    # game_system = Marshal.load(file)
          Marshal.load(file)
          game_variables = Marshal.load(file)
          Marshal.load(file)
          Marshal.load(file)
          game_actors = Marshal.load(file)
          game_party = Marshal.load(file)
          Marshal.load(file)
          game_map  = Marshal.load(file)
          file.close
          game_party.refresh(game_actors)
          save_info[0] = frame_count
          save_info[1] = game_party.actors
          save_info[2] = game_variables[TCSS_CFG::CHAPTER_GVAR_ID] - 1
          save_info[3] = game_map.map_id
        end
        return save_info
      end
      #
      def update_cursor
        @cursor.z = @savefile_windows[@file_index].z + 3
        @cursor.x = @savefile_windows[@file_index].x + TCSS_CFG::CURSOR_OFFXY[0]
        @cursor.y = @savefile_windows[@file_index].y + TCSS_CFG::CURSOR_OFFXY[1]
      end
      #
      def update_slot_data
        save_info = @savedata[@file_index]
        @mapname_window.set_data(save_info[3])
        @screen_window.set_data(save_info[2])
        @time_window.set_data(save_info[0])
        for f in @face_windows
          f.set_data(save_info[1])
        end
      end
      #
    end
    
    

     



    Versioni in testo semplice delle due parti del sistema (come sempre, per via dell'anti-leeching di altervista, è necessario raggiungere le pagine prima di poterle salvare in locale):
    CONFIGURAZIONE
    http://afantasymachine.altervista.org/CodiceRGSS/vintage/rgss_TaleChaptersSaveSystem_p1-configuration_rpg2s.rb
    ENGINE
    http://afantasymachine.altervista.org/CodiceRGSS/vintage/rgss_TaleChaptersSaveSystem_p2-engine_rpg2s.rb






    Bugs e Conflitti Noti

    Essendo un sistema a sè stante, non dovrebbero esserci conflitti particolari, a meno di avere script che NON inseriscono e caricano nuovi dati dopo quelli di default, in quanto, per disegnare il contenuto dello slot che ha il cursore sopra, deve leggere le informazioni presenti nei salvataggi.
    Vedere anche Una Scelta Discutibile, più sotto, nella sezione Altri Dettagli.





    Altri dettagli

    Come evidenziato nelle sezioni precedenti, il sistema è stato pensato per chi vorrebbe creare un save system con comandi evento ma ha notato quanto sia complicato emulare quelle funzioni su mappa, perciò lo script NON scrive assolutamente niente, ed ogni scritta va inserita come immagine o parte di un'immagine.

    CONFIGURAZIONE (ESEMPIO 2, senza risorse allegate. Potete provare a crearle Voi per vedere se avete capito come funzionano le impostazioni dello script). Appartiene a quella che doveva essere una demo sotto forma di breve gioco incentrato su "salvataggi", ma purtroppo Vincent ci sta mettendo troppo per completarla, da cui desumo che non sia poi così breve come desideravo. La schermata è stata congeniata per avere l'intestazione, una finestra di file manager/explorer con 16 slots sulla metà sinistra, e "l'Anteprima del File" sulla metà destra . . .
    TCSS2 - Configurazione de "Il Viaggino dell'Eroe (Una Storia di Salvataggi)"

     

    #******************************************************************************
    #   TALE CHAPTERS SAVE SYSTEM v 2.0 by giver (RPG2S) - PART 1: CONFIGURATION
    #******************************************************************************
    #
    #     CONFIGURATION START     ===============================================
    #
    #******************************************************************************
    #
    # NOTES: ALL images go in the Pictures folder, with the exception of the Load
    #          and Save scene BackGrounds, that go in the Titles folder
    #        As noted in the Changelog section, ALL windows show only their
    #          contents, thus the coordinates to be set in the configuration
    #          are those of the top left corner of the graphics used in them.
    #          The script will automatically adjust the windows position correctly
    #------------------------------------------------------------------------------
    
    module TCSS_CFG
      # Settings for the SLOT windows CONTENTS
      SLOT_W = 64
      SLOT_H = 84
      # List of SLOTS coordinates, to be written as   [coord_x, coord_y]
      #   followed by a comma if not related to the LAST slot
      SLOTS_XY_LIST = [
      [12, 80],
      [84, 80],
      [156, 80],
      [228, 80],
      [12, 176],
      [84, 176],
      [156, 176],
      [228, 176],
      [12, 272],
      [84, 272],
      [156, 272],
      [228, 272],
      [12, 368],
      [84, 368],
      [156, 368],
      [228, 368]
      ]
      # SLOT IMAGE names PARTS (name+index+suffix) [1st INDEX is 1, not 0]
      SLOT_BASE_NAME = "save"
      SLOT_FULL_SUFFIX = "_full"
      # 3rd Slot complete images name are   file3.png   and   file3_full.png
      # OR, to spare on graphics needed for the Slots, set this to   true
      #   the slots images name become   file.png   and   file_full.png
      USE_SAME_GRAPHIC_FOR_ALL_SLOTS = false
      # Overlaying of SLOTS. Default (true) means slot_2 would overlaps slot_1
      SLOTS_IN_ASCENDING_Z = true
      #
      # List of images related to each CHAPTER
      CHAPTERS_SCREEN_LIST = [
      "1st",
      "2nd",
      "3rd",
      "4th",
      "5th",
      "6th",
      "7th"
      ]
      # Settings for the CHAPTER SCREEN window CONTENTS
      SCREEN_W = 256
      SCREEN_H = 192
      # Image top left corner COORDINATES
      SCREEN_XY = [344, 58]
      # Image name if there is no SCREEN for the current CHAPTER ID (minus 1)
      NO_SCREEN_NAME = "everyday"
      #
      # Settings for the actors "FACES" windows CONTENTS
      FACE_W = 256
      FACE_H = 96
      # List of "FACES" coordinates, to be written as   [coord_x, coord_y]
      #   followed by a comma if not related to the LAST "face"
      FACES_XY_LIST = [
      [344, 258]
      ]
      # The "face" image should have a name made by its Character graphics name
      #   plus the suffix set below. E.G. An actor with a Character image name
      #   of   001-Fighter01   must have a face image named 001-Fighter01_saveface
      FACE_NAME_SUFFIX = "_saveface"
      # The image base name if the FACE window has no actor assigned to it
      #   The image file should include the SUFFIX indicated above
      FACE_EMPTYSLOT_SAVE = "shadow"      # shadow_saveface.png
      FACE_EMPTYSLOT_LOAD = "shadow"      # nobody_saveface.png
      # Overlayering of FACES. Default (true) means the 1st Face would overlap,
      #   cover, the 2nd Face
      FACES_IN_DESCENDING_Z = true
      #
      # Settings for the GAMETIME window CONTENTS
      # To not show the GAMETIME in the Load and Save scenes, set it to   true
      DISABLE_TIME = false
      # A 12 MONOSPACED characters line-up IMAGE "0123456789-:"
      DIGITS_STRIP_NAME = "savesdigits"
      TIME_W = 256
      TIME_H = 48
      # Coordinates of the top left corner of the GAMETIME contents
      TIME_XY = [344, 362]
      # (BG with the) LABEL for the GAMETIME section of the scene screen
      TIME_BG_NAME = "savetimesBG"
      # Distance of the first GAMETIME digit from the left side of the contents
      TIME_DIGITS_OFFX = 140
      #
      # Settings for the MAP NAME window CONTENTS
      # To not show the MAP NAME in the Load and Save scenes, set it to   true
      DISABLE_MAP_NAME = false
      MAP_NAME_W = 256
      MAP_NAME_H = 48
      # Coordinates of the top left corner of the MAP NAME contents
      MAP_NAME_XY = [344, 418]
      # Map Name IMAGE NAME for Empty SLOTS in the LOAD scene. Otherwise
      #   (usually) the Map Name in the MAP EDITOR is used as name for the
      #   IMAGE FILE with the Map Name to SHOW
      UNKNOWN_NAME = "nights"
      #
      # Settings for the Scene Load/Save BackGrounds
      SAVE_BG_NAME = "saveBG"
      LOAD_BG_NAME = "loadBG"
      #
      # Settings for the sprite used as SLOTS cursor in the scenes
      # The image, if the offsets aren't changed, should have the SAME
      #   size as the SLOTS CONTENTS set above, and OVERLAPS them
      CURSOR_NAME = "saves_cursor"
      # CURSOR top Left corner offsets from SLOT WINDOWS top left corner
      CURSOR_OFFXY = [16, 16]
      # To enable cursor blinking, set it to true
      CURSOR_BLINK = false
      # The quantity of SLOTS of cursor movement when pressing UP or DOWN
      #   LEFT and RIGHT always have a STEP of 1
      UPDOWN_STEP = 4
      # ID of the game variable where the current chapter number is stored
      # 1st CHAPTER has value 1, 2nd CHAPTER has value 2, and so on
      CHAPTER_GVAR_ID = 100
      #
    end
    
    #******************************************************************************
    #
    #     CONFIGURATION END     =================================================
    #
    #******************************************************************************
    
    

     


    Per la versione testo semplice di questa configurazione:
    http://afantasymachine.altervista.org/CodiceRGSS/vintage/rgss_TaleChaptersSaveSystem_p1-configuration_viaggino_rpg2s.rb

    CHANGELOG della versione 2.0 (Flexi MED), con datecode jp20180404

    • Configurazione spostata in module TCSS_CFG.
      Ripristinato opzioni che non servivano a Kekkorider.
    • TUTTI gli elementi di TESTO sono da inserire come IMMAGINI, incluso il Tempo di Gioco e i Nomi delle Mappe, se abilitati.
    • TUTTE le immagini rappresentative sono determinate dal valore di ID Capitolo, da indicare in una variabile evento, invece che dalla mappa in cui si effettua il salvataggio.
    • La quantità di slots per salvare può essere diversa da 4, ma TUTTI gli slots devono essere inclusi nella schermata di 640x480. Ovviamente non è previsto l'AutoSave, in quanto contrario al creare un'interfaccia ad alto impatto grafico.
    • TUTTE le finestre nascondono la propria cornice ed il proprio fondale, perciò qualunque cornice deve essere inclusa nelle immagini in cui li si desidera.

    Una Scelta Discutibile: Ho fatto in modo che il controllo di presenza di salvataggi da eventualmente caricare sia effettuato nell'update di Scene_Title invece che nel suo metodo main. La ragione è relativamente stupida, e ne avevo già accennato quando ho postato la mia riscrittura del Constance CMS, solo che questa volta non ho voluto obbligare gli utilizzatori dello script a mettere le mani nel codice Ruby associato a questa verifica. Dove sta il problema, allora? Che il tipo di Title che ben si sposa con questo save system ha sicuramente il metodo main, ma non è garantito che abbia anche il metodo update . . . Cosa può comportare? Tanto per cominciare, se non è presente il metodo update e non è stato mantenuto lo Scene_Title di default, questo script dovrebbe dare un errore di No Method quando cerca di fare l'alias per estendere il metodo update. Ma se anche fosse stato mantenuto lo Scene_Title di default in assenza di metodo update nel Title "personalizzato", ovviamente il metodo non verrebbe chiamato da quest'ultimo e risulterebbe sempre che non ci sono salvataggi presenti . . .
    Non era meglio appoggiarsi al metodo main, allora? Come ho detto prima la ragione per cui non l'ho fatto è abbastanza "stupida": Se il Title personalizzato si appoggia a quello di default, la "flag" (una specie di switch) che segnala la presenza dei salvataggi viene messa su false (OFF), all'interno del metodo main, proprio prima di fare tale controllo per i primi 4 slots, quindi la verifica potrebbe dare esito negativo qualora siano presenti più di quattro slots ed il primo save presente sia il QUINTO o superiore . . . Stupido, sì, vista la scarsa probabilità che ciò avvenga, ma a me dà comunque fastidio . . .


  6. Dummy Title v. 2.2u (update) Lite




    Descrizione

    Permette di far cominciare il gioco direttamente in una di due Mappe (vedere Istruzioni per l'Uso) invece che in un Title Screen scriptato. Principalmente permette di creare un Title Screen, e/o una Intro, ed/od un "Livello" Iniziale Segreto/Speciale, usando tutti i comandi evento disponibili.

    Non ci sono screenshots in quanto lo script lavora in background, inizializzando il DataBase ed istanziando gli objects necessari a far funzionare il gioco, di fatto RESETTANDO la partita eventualmente in corso, per arrivare direttamente alla Mappa Iniziale del gioco, senza cioè passare per la schermata con la finestrella "Gioca, Carica, Chiudi".



    Autore

    giver, di RPG2S, su "richiesta" di Kekkorider, verso la fine del 2008 (ci stava provando da solo, ma non riusciva a farlo funzionare).



    Allegati

    Niente Risorse nè Demo, per le stesse ragioni enunciate sopra, in Descrizione.



    Istruzioni per l'uso

    Lo script va come al solito inserito in uno spazio dello script editor creato al di sotto di Scene_Debug.
    Ci sono cinque valori configurabili, subito sotto la scritta class Scene_Title:
    SAVES_PRESENT_SWCID serve ad indicare una switch che verrà messa ON quando ci sono salvataggi disponibili e decidere se permettere l'accesso o meno a Scene_Load.
    ALTERNATE_START_MAP_ID, ALTERNATE_START_MAP_X, e ALTERNATE_START_MAP_Y servono ad indicare un punto di partenza alternativo a quello marcato dal simbolo dell'evento Posizione Di Partenza Del Party [ S ], passando da Scene_Title. Più sotto i dettagli relativi a come mandare qui il Giocatore.
    ALTERNATE_START_PARTY_ACTORS è una lista di ID degli actors, tra parentesi quadre e separati da virgole, che compongono il party disponibile nella Mappa di Partenza Alternativa, passando da Scene_Title.
    Poichè tale destinazione è una normale mappa di gioco, è possibile cambiare/aggiungere membri usando il comando evento Change Party Members, dopo che il giocatore l'ha raggiunta.

    IMPORTANTE: Passare da Scene_Title fa RESETTARE tutti i dati della partita eventualmente in corso, ossia è la stessa cosa che avviene con un Title "normale" scegliendo Gioca/Nuova Partita . . .
    Ovviamente, una volta nel gioco, è possibile raggiungere le mappe coinvolte dall'uso di questo script, senza perdita di dati, usando il comando evento Transfer Player.
    Tutte le Scene che inviano a Scene_Title arriveranno alla mappa contrassegnata dal simbolo Posizione Di Partenza Del Party [ S ].

    Codice eventualmente necessario agli utilizzatori del Dummy Title, solitamente all'interno del comando evento (Call) Script, ossia l'ultimo del terzo tab dei comandi evento.
    Per andare alla mappa del "Title Screen":
    comando evento @> Go To Title Screen
    OPPURE
    $scene = Scene_Title.new
    Per andare al pannello di Caricamento di partite salvate:
    $scene = Scene_Load.new
    Per Chiudere il Gioco:
    $scene = nil
    Per far partire il gioco nella Mappa Alternativa:
    $scene = Scene_Title.new(true)

    Non posso spiegare qui come creare un Title Screen o una Intro usando comandi evento, anche perchè non è strettamente correlato con l'uso di questo script . . .
    Nella sezione Tutorial di RPG2S dovrebbero essere comunque disponibili delle guide per creare questi elementi, magari per versioni più vecchie di RPG Maker, che vanno comunque bene.
    Il gioco di Kekkorider, Restricted: Project 15, per cui era stato originariamente creato questo script, ha un eccellente e curato Title fatto su mappa, ma purtroppo è (giustamente) criptato.




    Script

     


    
    =begin
    
        Dummy Title v 2.2u (update) Lite by giver (jp20181128)
    
        Differences from previous version (2.2 Lite, it12/8/2010):
          - Insert as a normal script instead of replacing completely the original Scene_Title script
          - Added a dummy    update   method, to make it compatible with one of my
            other scripts, the Tale Chapters Save System v. 2.0
          - Moved the user instructions inside the script
    
        Features: Allows to use the starting game MAP as title screen (all Scenes sending to the Title Screen will reach this map)
                  Allows to start the game in a different MAP, with different party members if needed, usually to show
                    an Intro or Tutorial or Secret Starting Level
                  Sets a game switch to true if there are save files present
    
        REMINDER: Accessing to Scene_Title ALWAYS resets ALL the game data !!!
    
        Instructions:
          Configurable values.
            SAVES_PRESENT_SWCID is the number of the game switch that will be set ON if there are saves for loading
            ALTERNATE_START_MAP_ID, ALTERNATE_START_MAP_X, and ALTERNATE_START_MAP_Y are used to indicate a different starting
              point, if needed/desired, RESETTING ALL game data (!!!), in place of the starting party position indicated by the
              related event marker. See below for informations on how to send the player here.
            ALTERNATE_START_PARTY_ACTORS is a list of the DataBase IDs of the party members that will reach the ALTERNATE start.
              Because it happens in a MAP, the party may be later changed nor set by using the Change Party Members event command
    
        Scripting code the developer will eventually need to use (usually as SCRIPT event command, the last one in the 3rd TAB).
          To send to the Load Screen:
                  $scene = Scene_Load.new
          To shutdown the game:
                  $scene = nil
          To start the game in the alternate map, RESETTING ALL game data:
                  $scene = Scene_Title.new(true)
            Of course, one can access this map, and the Title Screen MAP, after game start, without losing any game data,
              by using the Transfer Player event command
    
    =end
    
    #==============================================================================
    # - Scene_Title
    #==============================================================================
    class Scene_Title
      #
      SAVES_PRESENT_SWCID = 100
      #
      ALTERNATE_START_MAP_ID = 4
      ALTERNATE_START_MAP_X = 9
      ALTERNATE_START_MAP_Y = 7
      #
      ALTERNATE_START_PARTY_ACTORS = [1, 6]
      #
      def initialize(alternatestart = false)
        @alternate_start = alternatestart
      end
      #
      def main
        if $BTEST
          battle_test
          return
        end
        $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")
        Graphics.frame_count = 0
        $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
        $game_party.setup_starting_members
        update
        if @continue_enabled
          $game_switches[SAVES_PRESENT_SWCID] = true
        end
        for i in 0..3
          if FileTest.exist?("Save#{i+1}.rxdata")
            $game_switches[SAVES_PRESENT_SWCID] = true
          end
        end
        if @alternate_start
          $game_party.actors.clear
          unless ALTERNATE_START_PARTY_ACTORS == []
            for actorid in ALTERNATE_START_PARTY_ACTORS
              $game_party.add_actor(actorid)
            end
          end
          $game_map.setup(ALTERNATE_START_MAP_ID)
          $game_player.moveto(ALTERNATE_START_MAP_X, ALTERNATE_START_MAP_Y)
        else
          $game_map.setup($data_system.start_map_id)
          $game_player.moveto($data_system.start_x, $data_system.start_y)
        end
        $game_player.refresh
        $game_map.autoplay
        $game_map.update
        $scene = Scene_Map.new
      end
      #
      def update
        
      end
      #
    end
    
    

     



    Per la versione in testo semplice dello script:
    http://afantasymachine.altervista.org/CodiceRGSS/vintage/rgss_DummyTitle_rpg2s.rb
    E' necessario andare alla pagina linkata per salvarla in locale, per via dell'anti-leeching di altervista.



    Bugs e Conflitti Noti

    Lo script è ovviamente incompatibile con tutti gli add on che aggiungono cose a Title Screen scriptati, e potrebbe risultare incompatibile con script che si appoggiano a Scene_Title "tradizionali" per ottenere la generazione di dati utili al loro funzionamento.
    Non dovrebbe comunque essere un problema, visto che questo script è stato pensato per eventers che amano arrangiarsi per l'appunto usando comandi evento.



    Altri dettagli

    CHANGELOG (Rispetto alla versione 2.2 Lite del 12 agosto 2010)

    • Va inserito come script normale invece che sostituire la Scene_Title di default nello script editor
    • Aggiunto un metodo update per aumentarne la compatibilità in generale, e garantire il corretto funzionamento di un altro script di giver, il Tale Chapters Save System v. 2.0
    • Spostato le Istruzioni, in Inglese, all'interno dello script

    La versione 2.2 Lite, può essere trovata al topic nel seguente link:
    http://www.rpg2s.net/forum/index.php/topic/6030-saltare-il-main-menu/?hl=%2Bdummy+%2Btitle&do=findComment&comment=90043

  7. Scene End Remover v. 1.0f



    Descrizione

    Trasferisce le opzioni di Scene_End all'interno del Menù di Gioco, Scene_Menu, eliminando la necessità di uscire da quest'ultimo per selezionarle.



    Autore

    giver di RPG2S, ma non è necessario creditarlo.



    Allegati

    Trattandosi di uno snippet, non sono necessarie risorse esterne, a meno di voler assegnare alla finestrella inserita una windowskin diversa da quella del resto del Menu System (vedere Istruzioni per l'Uso).
    Per la stessa ragione, non ho ritenuto necessario realizzare una demo.

    Per quello che riguarda uno screenshot, sono impossibilitato ad usare rpg maker xp, quindi farò una breve descrizione di cosa accade quando lo si usa.
    Quando si seleziona il comando "Esci" nel Menu di Gioco, invece di uscire dal Menu e mostrare una schermata nera con al centro le opzioni di "uscita", la finestrella con tali comandi appare al centro del Menù di Gioco; per il resto, le sue opzioni fanno le stesse identiche cose.



    Istruzioni per l'uso

    Premessa: L'ho scritto diverse volte per diversi miei progetti ed ha sempre funzionato. Questa volta l'ho estrapolato da un vecchio CMS che avevo realizzato in modo che sia utilizzabile con facilità in qualunque CMS, e non posso testarlo, quindi non garantisco che fili tutto liscio. Per favore testatelo voi e fatemi sapere.

    Per l'inserimento nello script editor è sempre la solita procedura: si crea una nuova voce nella lista degli script, almeno al di sotto di Scene_Debug, le si assegna un nome appropriato, e si incolla lo snippet nell'area adibita al codice.

    La configurazione è naturalmente molto semplice, ed è composta da sei valori impostabili, all'interno del module SER_CFG.
    END_COMMAND_NAME è il nome che è stato assegnato per l'uscita dal gioco, solitamente indicato come s6 = "Esci" , ossia l'ultimo dei comandi disponibili nel def main della Scene_Menu.
    END_WINDOW_WSKIN è il nome dell'immagine nella cartella Windowskins usata come windowskin specifica per la finestrella con i comandi di uscita, in caso la si voglia far spiccare ulteriormente dal resto della schermata principale del ©MS. Se lasciato "" verrà usata la stessa skin settata in quella parte del gioco.
    END_WINDOW_OFFZ è il valore di cui viene incrementata la coordinata z della finestrella con i comandi di uscita per farla risultare in primo piano rispetto al resto. Con la maggior parte dei ©MS non dovrebbe essere necessario modificarlo.
    TO_TITLE, SHUTDOWN e CANCEL sono i nomi dei comandi che verranno usati nella finestrella d'uscita, rispettivamente per tornare al title, per chiudere il gioco, e per annullare l'uscita.



    Script

    # Scene_End Remover 1.0 f , by giver j20181115
    # This Add-on inserts the Scene_End options in the Game Scene_Menu
    
    module SER_CFG
        # Write here the name of the command related to Scene_End, usually assigned
        # to the local variable s6 in def main of Scene_Menu
        END_COMMAND_NAME = "Exit"
        # If a particular windowskin is desired, different from the other windows in the
        # (C)MS, write its file name here
        END_WINDOW_WSKIN = ""
        # To lift the end window above all other content in the Menu scene, set the value below
        END_WINDOW_OFFZ = 100
        # Command names for the end window
        TO_TITLE = "To Title"
        SHUTDOWN = "Shutdown"
        CANCEL = "Cancel"
    end
    
    class Window_Command < Window_Selectable
        attr_reader :commands
    end
    
    class Scene_Menu
        unless $@
            alias giver_seremove_scemen_main    main
        end
    def main
    @end_command = Window_Command.new(160, [SER_CFG::TO_TITLE, SER_CFG::SHUTDOWN, SER_CFG::CANCEL],
    3, 32, [1])
        if SER_CFG::END_WINDOW_WSKIN != ""
            @end_command.windowskin = RPG::Cache.windowskin(SER_CFG::END_WINDOW_WSKIN)
        end
    @end_command.x = 320 - @end_command.width / 2
    @end_command.y = 240 - @end_command.height / 2
    @end_command.z += SER_CFG::END_WINDOW_OFFZ
    @end_command.visible = false
    @end_command.active = false
    
         giver_seremove_scemen_main
    
    @end_command.dispose
    if $scene.is_a?(Scene_Title)
    Graphics.transition
    Graphics.freeze
    end
    end
    
        unless $@
            alias giver_seremove_scemen_updt update
        end
    def update
    @end_command.update
         giver_seremove_scemen_updt
    if @end_command.active
    update_end
    return
    end
    end
    
        unless $@
            alias giver_seremove_scemen_updtcmd update_command
        end
    def update_command
    if Input.trigger?(Input::C) and @command_window.commands[@command_window.index] == SER_CFG::END_COMMAND_NAME
    $game_system.se_play($data_system.decision_se)
    @command_window.active = false
    @end_command.visible = true
    @end_command.active = true
    @end_command.index = 1
    return
    end
         giver_seremove_scemen_updtcmd
    end
    
    def update_end
    if Input.trigger?(Input::C)
    case @end_command.index
    when 0
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = Scene_Title.new
    when 1
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = nil
    when 2
    $game_system.se_play($data_system.cancel_se)
    @end_command.visible = false
    @end_command.active = false
    @command_window.active = true
    end
    return
    end
    end
    end
    


    Lo trovate in formato testo semplice al seguente link:
    http://afantasymachine.altervista.org/CodiceRGSS/vintage/rgss_Scene_End_Remover100f_rpg2s.rb
    E' necessario andare alla pagina dello script e salvarlo con nome, per via del sistema anti-leeching di altervista.




    Bugs e Conflitti Noti

    Come ho già anticipato, non ho testato questa versione universale dello snippet, essendo costretto in questo periodo ad usare una linuxbox priva di WINE e Play On Linux. Dovrebbe comunque funzionare.
    Eventuali inconvenienti potrebbero derivare dalla finestrella per uscire dalla partita che potrebbe non sparire subito all'uscita dal menù.
    Per semplificare la configurabilità, ho adottato un escamotage utilizzato anche da altri scripters, che consiste nell'usare i nomi dei comandi invece dei loro indici. Non è detto che vi siano conflitti o simili, ma in caso notiate comportamenti anomali dopo aver inserito lo snippet nel vostro progetto, dovreste provare ad usare la ricerca globale dello script editor per individuare il termine commands. Se nel farlo trovate al di fuori dello snippet scritture tipo attr_reader :commands o attr_accessor :commands oppure def commands, mettete sotto commento, aggiungendo # all'inizio della riga "incriminata", la linea dello snippet con scritto attr_reader :commands.
    Esistono poi degli script che rimpiazzano @commands con @data , o altro termine simile, anche nella Window_Command: dovrete cercare all'interno dello snippet l'istruzione @command_window.commands[@command_window.index] e sostituire la parola commands con data o altro termine sostitutivo utilizzato da tali Window_Command.
    Non mi viene in mente altro eventuale problema.



    Altri dettagli

    Avevo pensato di non postare questo add-on come parte degli script personalizzati da me, ma la lettura di un paio di post relativamente recenti nella sezione RGSS mi ha fatto cambiare idea. Chiedo scusa per non essere attualmente nella possibilità di testarlo.

    Perchè creare questo add-on? E' una cosa che mi sempre lasciato perplesso, dover uscire dal gioco passando da una scene esterna al menù, per poi ritornarci se si cambia idea. Tra l'altro, per come è strutturata la finestrella, era praticamente già utilizzabile all'interno del Menù di Gioco. Tutto qui . . .

  8. Il ritorno al massimo del valore di HP senza interventi di cura o simili è anomalo. Come mostra il codice del comando evento che hai postato, infatti, sottrarre un valore direttamente dagli HP, pur ignorando states ed elements, non è una strada sbagliata. Il motivo più probabile per cui capita è la reinizializzazione delle statistiche degli enemies in seguito ad una chiamata fuori luogo di troop_update.

    Il sistema ufficiale per gestire gli effetti delle azioni è molto più complicato e flessibile.

    Facendo riferimento al codice nel primo post della discussione, ti consiglio di guardare meglio le classi Game_BattleAction, Game_Battler (soprattutto i metodi attack_effect, skill_effect ed item_effect), e Window_BattleStatus, e come vengono sfruttate all'interno di Scene_Battle.

  9. Far rottamare quello script e passare ad iHUD (integrated Heads Up Display) !


    Una possibile ricerca, con Google, per vedere esempi:

    rpg maker rgss hud script


    Oppure, sempre per avere esempi, accontentarsi di questo paio di HUD in cui ho messo le mani io.

    Sono entrambe per VX, però, ed almeno uno contiene codice supportato solo dal VX e non dall'XP.

    Finestra del gold aggiornata in RT, completamente "mio":


    Soma HUD (rewrite by giver, quindi confrontabile con la versione originale):





    Nel caso si fosse della mentalità "Ogni scarrafone è bello a mamma suoia!", mi vengono in mente due vie da seguire . . .

    1) Brutale e a dir poco raffazzonata:

    Mettere all'inizio del def main della classe che è stata creata l'istruzione RPG::Cache.clear # Equivalente a GC.start in RMXP

    La versione del Ruby usata da RMXP, ovvero la 1.8.1, non prevede il destroy() mirato, che non si potrebbe comunque usare trattandosi di una variabile di istanza, nè lo si può nemmeno aiutare a notare l'inutilità dell'oggetto con @window1 = nil

    2) Un pelino migliore, ma comunque abbastanza "trasandata":

    Rendere GLOBALE la variabile in cui si memorizza la finestra, quindi dovrebbe diventare qualcosa del tipo $miafinestra1. Poi spostare il codice che ne costruisce sia l'istanza che i contents all'interno di una "if" che controlla se è stata definita, con un else che include $miafinestra.contents.clear. Il tutto ovviamente PRIMA di scrivere il valore di $a al suo interno. Più o meno così.

    unless $miafinestra.nil?

    $miafinestra.contents.clear

    else

    $miafinestra = Window_Base.new(0, 0, 70, 55)

    $miafinestra.contents = Bitmap.new(35, 20)

    end

    $miafinestra.contents.draw_text(*params) . . .



    Non prendersela a male. Un ultimo consiglio: Anche se le parentesi tonde non sono obbligatorie, è sempre meglio metterle. Sia per mantenere il codice più leggibile per gli esseri umani, ma anche per aiutare l'interprete (o il compilatore) a compiere correttamente il proprio lavoro. La fiducia cieca in tali meccanismi è sempre "pericolosa" e può causare comportamenti anomali in fase d'esecuzione.

    Un paio di piccoli esempi:



    # Scrivere così, nella versione 1.02a di rpg maker xp, dà errore
    if 1..8.include?(intn)
    # Mentre così NO.
    if (1...9).include?(intn)

    # Scrivere così, nella 1.02a, dà errore.
    alias metodoribattezzato metodo unless $@
    # mentre così NO.
    (alias metodoribattezzato metodo) unless $@



    Non dimenticare che il Ruby chiuso usato per RMXP è stato scarnificato di tutto quello che normalmente può fare ma che non serve per fare i giochi così come è stato ideato dalla Enterbrain. Non c'è la gestione del traffico di rete e neppure la creazione al volo di pagine web interattive, tra le altre cose . . .

  10. Ci sono informazioni utili a riguardo in questi post elencati sotto, tutti appartenenti allo stesso topic.

     

    http://www.rpg2s.net/forum/index.php/topic/6531-script-piu-di-50-picture/?do=findComment&comment=97890

     

    http://www.rpg2s.net/forum/index.php/topic/6531-script-piu-di-50-picture/?do=findComment&comment=98009

     

    http://www.rpg2s.net/forum/index.php/topic/6531-script-piu-di-50-picture/?do=findComment&comment=98139

     

    E per altri eventi, oltre questi, tutto il Ruby che li gestisce si trova nella class(e) Interpreter, a partire dalla parte 3 (Interpreter 3, 4, 5, 6, 7 nello script editor)

     

    Knowledge is powa!!! Bwahwahwah!

  11. Enhanced (Re-)Revised Victory Screen, v. 3.5
    Descrizione
    Lo script sostituisce la finestra che elenca Tesori, Esperienza e Oro ottenuto vincendo la battaglia con una scheda più leggermente più dettagliata e colorata.
    SCREENSHOTS

    Battaglia secondaria al cui nome viene aggiunto il prefisso "Encounter with ".
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/VSCRN/VSCRN_MOOKwithPREFIX.png
    Battaglia secondaria con prefisso lasciato "".
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/VSCRN/VSCRN_MOOKwithoutPREFIX.png
    Boss Battle, di cui appare il nome senza prefisso in quanto inclusa nella lista dei BOSS.
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/VSCRN/VSCRN_BOSSwithMOOKPREFIX.png
    Schermata che usa una windowskin diversa da quella delle altre finestre di gioco.
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/VSCRN/VSCRN_DifferentVictoryWSkin.png
    La schermata è definita da un background che sostituisce la grafica della windowskin.
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/VSCRN/VSCRN_BGnPictureMugshots.png

    Autore
    giver, di RPG2S, per la versione 3.5. CHANGELOG nella sezione Altri Dettagli di questo post.
    'Versioni Precedenti' (vedi Altri Dettagli):
    3-man Victory Screen, by Prexus.
    4-man Victory Screen, by Walkingman.
    Revised Victory Screen, by an unknown spanish guy. Postata da Tio in RPG2S. La versione di giver è basata su questa.
    FF8 Battle Report, di cui non sono riuscito a scovare l'autore.
    Allegati
    Non sono realmente necessarie risorse esterne a quelle normalmente usate nel progetto, ma sono qui incluse alcune risorse d'esempio per chi è disposto a crearsi della grafica apposita solo per questo script. Se si esclude la prima, quella del treasure slot, talmente banale e niubba che mi vergogno a dire di averla realizzata, sono tutte risorse rippate dalla versione PC del videogioco Puzzle Quest 2, quindi non posso autorizzarvi a usarle liberamente. Il VictoryBG è stato realizzato con la collaborazione di Vincent Law. La windowskin alternativa mi pare di averla trovata sul sito di Inquisitor, e sicuramente si chiamava in un altro modo (non posso essere più preciso poichè è passato troppo tempo da quando l'ho raccattata in rete).

    Grafica al cui interno viene scritto il nome di uno dei tesori ottenuti. Anche se ci sono meno di 6 tesori, viene comunque disegnato 6 volte, se impostato nella configurazione.
    Pictures da usare come mezzobusti degli actors di default di rpg maker xp, al posto dei rispettivi battlers. Non ci somigliano neanche un po', ma è solo per fare un esempio di grafica alternativa.http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Windowskins/treasure_slot.png
    Alusex
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Pictures/001-Fighter01.png
    Basil (ha il peggior battler per questa funzione)
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Pictures/010-Lancer02.png
    Cyrus
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Pictures/013-Warrior01.png
    Dorothy
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Pictures/019-Thief04.png
    Estelle
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Pictures/022-Hunter03.png
    Felix
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Pictures/023-Gunner01.png
    Gloria
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Pictures/029-Cleric05.png
    Hilda
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Pictures/038-Mage06.png
    Windowskin Alternativa
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Windowskins/inferno.png
    BG opzionale, per grafica difficile da ottenere tramite windowskin o per sostituire le minischede del terzo e quarto actor quando il party è al massimo composto da 2 personaggi nell'intera partita.
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Titles/VictoryBG.png

    Istruzioni per l'uso
    Da inserire in uno spazio dello script editor al di sopra dello script Main ed al di sotto del Battle System Utilizzato, che deve utilizzare Scene_Battle (Non su mappa, dunque).
    Cosa si può configurare senza mettere mani all'interno del codice dello script:
    module VictoryScreen è la sezione di configurazione dello script
    HEADING è una frase fissa usata come titolo della schermata per tutte le battaglie, come avviene nella versione 3.0. Da lasciare vuoto se si preferisce utilizzare i nomi delle battaglie come intestazione.
    HEADING_FONT è il nome del font, obbligatorio, usato per scrivere il titolo della schermata.
    HEADING_FSIZE è la grandezza del font, obbligatoria, usata per scrivere il titolo della schermata.
    MOOK_PREFIX è un prefisso che appare prima del nome della battaglia se si vuole distinguere tra boss battles e battaglie "secondarie".
    BOSS è una lista degli ID delle battaglie che non devono usare il prefisso nel proprio titolo. Può essere lasciata vuota se non si è impostato alcun prefisso ("").
    WSKIN è il nome di una windowskin da usare al posto di quella impostata per le altre finestre di gioco. Non verrà comunque utilizzata se si imposta un background personalizzato.
    BG è il nome di un'immagine da usare al posto della grafica delle finestre, grande 640x480, da mettere nella cartella Titles.
    BATTLER_IS_PICTURE va impostata a true se si desidera che i mugshots degli actors siano presi dalla cartella Pictures invece di ricavarli dai loro Battlers. Si sconsiglia di usare immagini più grandi di 96x72, anche se possono essere di 288x72.
    LEVEL_UP_ICON è il nome dell'icona che viene usata per indicare che un actor ha ottenuto il Level Up!.
    BATTLE_EXP_LABEL, CURRENT_EXP_LABEL, LEVEL_UP_EXP_LABEL sono brevi frasi per indicare quale valore di esperienza è indicato in quella riga (guadagnata in battaglia, totale attuale, e totale per il level up).
    EXP_LABELS_COLOR è il colore usato per scrivere le succitate etichette dell'esperienza. Si consiglia di limitarsi a cambiare solo i valori tra le parentesi tonde.
    GOLD_ICON è il nome dell'icona usata accanto ai valori di Oro ottenuto e già posseduto prima della battaglia.
    SLOT_BG è il nome di un'immagine da usare come background del nome di ciascun tesoro ottenuto. Deve essere inserita nella cartella Windowskins ed avere una dimensione di 256x32, incluse le parti trasparenti. Tenere conto che i nomi dei tesori vengono centrati invece che giustificati a sinistra come succede normalmente.
    V_SWC è l'ID di uno Game_Switches che viene messo ON ogni volta che la Battaglia viene vinta. Utile per legare eventi post vittoria, su Mappa, per le battaglie che non si attivano col comando evento Battle Processing. Non dimenticare che lo switch va messo OFF all'inizio di ogni Battaglia.
    WIN_Z è il valore di z usato dalla grafica della schermata. Se non ci sono esigenze particolari, lasciarlo a 5000, oppure aumentarlo.
    Script


    
    # Enhanced by giver (datecode 2017-03-16)
    #
    # Original versions List
    #   1.x: "3-man Victory Screen", by Prexus
    #   2.x: Remake by Walkingman
    #   3.0: "Revised Victory Screen", by an Unknown "Spanish" guy (Tio,
    #         who posted it in his website, didn"t tell neither the game"s
    #         Title nor the Name of its Author, and I haven"t found
    #         informations on this variant of the script elsewhere)
    #         You can find this variant posted at RPG2S:
    #   http://www.rpg2s.net/forum/index.php/topic/1498-schermata-di-vittoria-dopo-la-battaglia/
    #   IMPORTANT NOTE: There is a script that looks almost identical to v3.0
    #     of this script, titled FF8 Battle Report. I'm not an expert of that videogame series,
    #     so I can't tell if they are related in some way.
    #
    #   This version (3.5) CHANGELOG:
    #     * Converted for the Default BS with up to 4 party members
    #     * Rewritten most of the code, without changing the overall layout
    #     * Added a Configuration Section (see   module VictoryScreen)
    #     * Can use the Troop name in the DataBase as Heading
    #     * Gained Gold and Owned Gold are shown separately
    #     * Added a Mugshot of each PC (from default Battler or a Picture) and
    #       a Level Up icon in the EXP summary windows
    #     * Added an Empty Treasure Slot (BG) graphics in Result window, and the
    #       Treasure Names are centered in each line
    #     * Possible use of an alternate WindowSkin
    #     * Added an Animation where the Party Members walk in a shrinked
    #       version of the BattleBack graphics
    #
    module VictoryScreen
      # Write something inside the quotes if You want a FIXED heading
      #   for the Victory Screen in all Battles. If You leave them empty,
      #   the Name of the Battle in the DataBase will be used instead
      HEADING = ""
      # The NAME and SIZE of the Font used to write the Heading content
      HEADING_FONT = "Tahoma"
      HEADING_FSIZE = 24
      # The PREFIX will be added before the Battle Name for the battles not
      #   listed in the BOSS array. Leave both empty to show only the battle
      #   name or if You want an IDENTICAL Heading content for all battles
      MOOK_PREFIX = "Encounter with "
      # Battle IDs in the DataBase, separated by a comma (e.g. [23, 56, ...])
      BOSS = [
      ]
      # To use a different windowskin for the Victory Screen windows
      #   It won"t be used if You set a BG image for the Screen
      WSKIN = ""
      # A 640x480 image to be put in the Titles folder. All windows opacity
      #   will be automatically set to 0, hiding their windowskin
      BG = ""
      # To draw the mugshot from a Picture instead of a default Battler
      BATTLER_IS_PICTURE = false
      # An icon (24x24) used to show if the PC has Leveled Up
      LEVEL_UP_ICON = "048-Skill05"
      # Labels used before the experience data values
      BATTLE_EXP_LABEL = "Battle Exp."
      CURRENT_EXP_LABEL = "Current Exp."
      LEVEL_UP_EXP_LABEL = "Next Level Exp."
      # Color of the Labels content. (255,255,128) is dark yellow
      EXP_LABELS_COLOR = Color.new(255, 255, 128)
      # The icon drawn at the side of the gold summary
      GOLD_ICON = "034-Item03"
      # An image used for each of the 6 treasure slots. It will be drawn even
      #   when there is no treasure dropped in that slot. 256x32 in size,
      #   to be put in the Windowskins folder. If You include the slots
      #   directly in the BG image, You can leave the quotes empty
      SLOT_BG = "treasure_slot"
      # A game_switch set ON (true) each time the Party wins, to allow the
      #   Triggering of Map Events (Remember to set it OFF after the Event)
      V_SWC = 0
      # The base "layer" value (z "axis") for the graphics of the screen
      WIN_Z = 5000
      #
    end
    
    class Window_EXPTitle < Window_Base
      def initialize
        super(0, 0, 640, 64)
        if VictoryScreen::BG == "" and VictoryScreen::WSKIN != ""
          self.windowskin = RPG::Cache.windowskin(VictoryScreen::WSKIN)
        elsif VictoryScreen::BG != ""
          self.opacity = 0
        end
        self.z = VictoryScreen::WIN_Z
        self.contents = Bitmap.new(width - 32, height - 32)
        self.contents.font.name = VictoryScreen::HEADING_FONT
        self.contents.font.size = VictoryScreen::HEADING_FSIZE
        self.visible = false
        refresh
      end
      def refresh
        self.contents.clear
        trooid = $game_temp.battle_troop_id
        unless VictoryScreen::HEADING != ""
          text = VictoryScreen::BOSS.include?(trooid) ? "" : VictoryScreen::MOOK_PREFIX
          text += $data_troops[trooid].name
        else
          text = VictoryScreen::HEADING
        end
        self.contents.draw_text(4, 0, 600, 32, text, 1)
      end
    end
    
    class Window_PCExp < Window_Base
      def initialize(actor, exp)
        @actor = actor
        @exp = exp
        super(0, 64, 320, 104)
        if VictoryScreen::BG == "" and VictoryScreen::WSKIN != ""
          self.windowskin = RPG::Cache.windowskin(VictoryScreen::WSKIN)
        elsif VictoryScreen::BG != ""
          self.opacity = 0
        end
        self.contents = Bitmap.new(width - 32, height - 32)
        self.z = VictoryScreen::WIN_Z
        self.visible = false
        refresh
      end
      def refresh
        self.contents.clear
        draw_actor_mugshot
        self.contents.font.bold = true
        draw_actor_name(@actor, 4, -4)
        if $scene.level_up_flags[@actor.index]
          icon = RPG::Cache.icon(VictoryScreen::LEVEL_UP_ICON)
          self.contents.blt(52, 36, icon, Rect.new(0, 0, 24, 24))
        end
        draw_actor_level(@actor, 20, 44)
        self.contents.font.bold = false
        self.contents.font.size = 17
        draw_actor_rcvexp(@actor, 116, 0)
        draw_actor_curexp(@actor, 116, 22)
        draw_actor_nxtexp(@actor, 116, 44)
      end
      def draw_actor_rcvexp(actor,x,y)
        self.contents.font.color = VictoryScreen::EXP_LABELS_COLOR
        self.contents.draw_text(x,y,288,32,VictoryScreen::BATTLE_EXP_LABEL)
        text = actor.cant_get_exp? ? "0" : @exp.to_s
        self.contents.font.color = normal_color
        self.contents.draw_text(x+60,y,104,32,text,2)
      end
      def draw_actor_curexp(actor,x,y)
        self.contents.font.color = VictoryScreen::EXP_LABELS_COLOR
        self.contents.draw_text(x,y,288,32,VictoryScreen::CURRENT_EXP_LABEL)
        self.contents.font.color = normal_color
        self.contents.draw_text(x+60,y,104,32,actor.exp_s,2)
      end
      def draw_actor_nxtexp(actor,x,y)
        self.contents.font.color = VictoryScreen::EXP_LABELS_COLOR
        self.contents.draw_text(x,y,288,32,VictoryScreen::LEVEL_UP_EXP_LABEL)
        self.contents.font.color = normal_color
        self.contents.draw_text(x+60,y,104,32,actor.next_exp_s,2)
      end
      #
      def draw_actor_mugshot
        unless VictoryScreen::BATTLER_IS_PICTURE
          bitmap = RPG::Cache.battler(@actor.battler_name, @actor.battler_hue)
        else
          bitmap = RPG::Cache.picture(@actor.battler_name)
        end
        src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
        opacity = (@actor.dead?) ? 80 : 160
        self.contents.blt(0, 0, bitmap, src_rect, opacity)
      end
    end
    
    class Window_BlankExp < Window_Base
      def initialize
        super(0, 168, 320, 104)
        if VictoryScreen::BG == "" and VictoryScreen::WSKIN != ""
          self.windowskin = RPG::Cache.windowskin(VictoryScreen::WSKIN)
        elsif VictoryScreen::BG != ""
          self.opacity = 0
        end
        self.contents = Bitmap.new(width - 32, height - 32)
        self.z = VictoryScreen::WIN_Z
        self.visible = false
      end
    end
    
    class Window_Background < Window_Base
      def initialize
        super(-16,-16, 672, 512)
        self.z = VictoryScreen::WIN_Z - 3
        self.visible = false
        if VictoryScreen::BG != ""
          self.contents = RPG::Cache.title(VictoryScreen::BG)
        end
      end
    end
    
    class Window_BattleStatus < Window_Base
      unless $@
        alias giverdesignontiorip_winv_winbstats_init initialize
      end
      def initialize
        giverdesignontiorip_winv_winbstats_init
        $scene.level_up_flags = @level_up_flags
      end
    end
    
    class Scene_Battle
      attr_accessor :exp
      attr_accessor :level_up_flags
      unless $@
        alias giverdesignontiorip_winv_scnbatl_main main
      end
      def main
        giverdesignontiorip_winv_scnbatl_main
        if @titleresult_window != nil
          @titleresult_window.dispose
          for exp_win in @pc_exp_windows
            exp_win.dispose
          end
          @background_window.dispose
        end
        if $scene.is_a?(Scene_Title)
          Graphics.transition
          Graphics.freeze
        end
        if $BTEST and not $scene.is_a?(Scene_Gameover)
          $scene = nil
        end
      end
    
      unless $@
        alias giverdesignontiorip_winv_scnbatl_sph5 start_phase5
      end
      def start_phase5
        giverdesignontiorip_winv_scnbatl_sph5
        @titleresult_window = Window_EXPTitle.new
        @pc_exp_windows = []
        for i in 0..3
          actor = $game_party.actors[i]
          unless actor.nil?
            @pc_exp_windows.push(Window_PCExp.new(actor, $scene.exp))
          else
            @pc_exp_windows.push(Window_BlankExp.new)
          end
        end
        @pc_exp_windows[1].y = 168
        @pc_exp_windows[2].y = 272
        @pc_exp_windows[3].y = 376
        @background_window = Window_Background.new
        @phase5_wait_count = 60
      end
    
      unless $@
        alias giverdesignontiorip_winv_scnbatl_updtph5 update_phase5
      end
      def update_phase5
        intercept_old = giverdesignontiorip_winv_scnbatl_updtph5
        if @phase5_wait_count > 0
          return
        end
        if (@phase5_wait_count == 0) and (@result_show == nil)
          @titleresult_window.visible = true
          for exp_win in @pc_exp_windows
            exp_win.visible = true
          end
          @background_window.visible = true
          @result_show = true
          return
        end
        @result_window.update
        if Input.trigger?(Input::C)
          $game_switches[VictoryScreen::V_SWC] = true
          battle_end(0)
        end  
      end
    end
    
    class Window_BattleResult < Window_Base
      def initialize(exp, gold, treasures)
        $scene.exp = exp
        @gold = gold
        @treasures = treasures
        super(320, 64, 320, 416)
        if VictoryScreen::BG == "" and VictoryScreen::WSKIN != ""
          self.windowskin = RPG::Cache.windowskin(VictoryScreen::WSKIN)
        elsif VictoryScreen::BG != ""
          self.opacity = 0
        end
        self.contents = Bitmap.new(width - 32, height - 32)
        self.z = VictoryScreen::WIN_Z
        self.visible = false
        @frame = 0
        refresh
      end
      def refresh
        self.contents.clear
        draw_gold_and_party
        y = 136
        for i in 0..5
          draw_treasure(@treasures[i], 16, y)
          y += 40
        end
      end
      #
      def draw_treasure(item, x, y)
        ibg = RPG::Cache.windowskin(VictoryScreen::SLOT_BG)
        self.contents.blt(x, y, ibg, Rect.new(0, 0, 256, 32))
        return if item.nil?
        inw = self.contents.text_size(item.name).width
        nox = (212 - inw) / 2 + 8
        bitmap = RPG::Cache.icon(item.icon_name)
        self.contents.blt(x + nox, y + 4, bitmap, Rect.new(0, 0, 24, 24))
        self.contents.font.color = normal_color
        self.contents.draw_text(x + nox + 28, y, inw, 32, item.name)
      end
      #
      def draw_gold_and_party
        self.contents.fill_rect(0, 0, 288, 128, Color.new(0,0,0,0))
        mbback = RPG::Cache.battleback($game_temp.battleback_name)
        self.contents.stretch_blt(Rect.new(0, 16, 288, 112), mbback, mbback.rect)
        for i in 0...$game_party.actors.size
          actor = $game_party.actors[i]
          uframe = (actor.dead?) ? 0 : @frame
          x = 144 - ($game_party.actors.size - 1) * 20 + i * 40
          name = actor.character_name
          hue = actor.character_hue
          draw_walking_character(x, 120, name, hue, uframe)
        end
        gico = RPG::Cache.icon(VictoryScreen::GOLD_ICON)
        self.contents.blt(264, 4, gico, Rect.new(0, 0, 24, 24))
        gold_name = $data_system.words.gold
        cx = contents.text_size(gold_name).width + 4
        self.contents.font.color = system_color
        self.contents.draw_text(272 - cx, 0, cx, 32, gold_name, 2)
        party_gold = $game_party.gold - @gold
        gold_text = party_gold.to_s + " + " + @gold.to_s
        self.contents.font.color = normal_color
        self.contents.draw_text(4, 0, 268 - cx, 32, gold_text, 2)
      end
      #
      def draw_walking_character(x, y, name, hue, frame)
        bitmap = RPG::Cache.character(name, hue)
        cw = bitmap.width / 4
        ch = bitmap.height / 4
        src_rect = Rect.new(cw * frame, ch, cw, ch)
        self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
      end
      #
      def update
        super
        if self.visible
          if (Graphics.frame_count % 8) == 0
            @frame = (@frame + 1) % 4
            draw_gold_and_party
          end
        end
      end
      #
    end
    
    #=============================================================================
    #     REVISED VICTORY SCREEN
    
    
    
    #=============================================================================
    

    Al link sottostante è disponibile una versione testo semplice, con estensione .rb. Come al solito, per evitare problemi con l'anti-leeching di Altervista, occorre visitare la pagina e salvarla con nome solo dopo averla raggiunta.
    Bugs e Conflitti Noti
    Non dovrebbero esserci bug. Per i conflitti, le probabilità sono relativamente basse grazie all'uso di alias per estendere i metodi interessati e metodi dedicati per le funzioni aggiunte.
    Altri dettagli
    La storia di questo script è piuttosto ampia e fumosa. E' stato difficile reperire informazioni precise su quale versione sia stata fatta prima e da chi. Per di più è passato diverso tempo da quando erano state reperite, ed in parte sono andate smarrite. Mi spiace non poter fornire dettagli più approfonditi a riguardo.
    La versione che ho realizzato si basa su quella postata da Tio, che trovate al seguente link:
    CHANGELOG per la versione "3.5":
    • Convertito per la Battle View frontale, come quella del Battle System di default.
    • Riscritta gran parte del codice, senza allontanarsi troppo dall'apparenza originale.
    • Aggiunta una sezione di configurazione.
    • Il titolo della schermata può essere il nome della Battaglia nel DataBase invece che restare fissa per tutti gli scontri.
    • Oltre all'oro ottenuto viene indicato anche quello già posseduto.
    • La minischeda dell'esperienza di ogni actor adesso include un mezzobusto dell'actor, ricavato dal Battler o da Picture, un'icona per segnalare il Level Up!, e scegliere il colore e nome delle etichette dei dati.
    • I nomi dei tesori possono avere una grafica di background su cui essere scritti, e vengono centrati nella riga in cui sono scritti.
    • Aggiunta la possibilità di usare una windowskin alternativa al resto del gioco.
    • Inserita un'animazione degli actors nel party che camminano su una versione rimpicciolita del BattleBack
  12. Simple Last Battle Events Fix v 3.0


    Descrizione

    Consente di eseguire eventi di battaglia legati all'eliminazione dell'ultimo avversario o membro del party, cosa non possibile con il codice di default sulle condizioni di vittoria. L'esempio più classico in cui può servire è un kill count gestito ad eventi senza ricorrere a workarounds come il sacrificare la possibilità di drop di tesori o a script dedicati. Altri esempi sono la chiamata ad un evento comune PRIMA di uscire dalla Battaglia, o far sbucare dai loro nascondigli degli alleati della fazione perdente, o modificare l'inventario del party, aggiungendo o togliendo oggetti a seconda di come si sta concludendo lo scontro. Serve, insomma, ad aprire nuove possibilità agli eventers per le questioni legate all'epilogo delle battaglie od al rimandarlo.

    SCREENSHOTS


    Turno 0 della Battaglia.
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/BEVFX/BEVT_TURN0.png
    Dopo l'eliminazione del primo dei DUE fantasmi.
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/BEVFX/BEVT_TURN2.png
    Dopo l'eliminazione del secondo e ultimo fantasma.

    EDIT (2018-03-16) - Questo evento solitamente viene saltato se non si usa questo snippet.
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/BEVFX/BEVT_TURN4.png
    Fine della Battaglia.
    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/BEVFX/BEVT_END.png





    Autore

    Snippet sviluppato da giver, di RPG2S. EDIT (2018-03-16) - DEMO progettata da Vincent Law.



    Allegati

    Non necessita di elementi esterni al codice.
    E' disponibile una piccolissima demo. Lanciare il Battle Test della prima battaglia, Ghost*2, nel DataBase. Da notare che gli eventi di esempio fanno uso di (call) script, di diversi codici messaggio e di variabili con IDs vicini al massimo (5000), quindi, anche perchè svolti in modalità di test, dovrebbero risultare meno reattivi rispetto a quelli di una battaglia ingame in un normale progetto.

    EDIT (2018-03-16) - Sostituita la demo con una versione estesa, dove ci sono eventi legati alla morte dei membri del party, e pertanto alla loro sconfitta. Poichè gli avversari sono comunque deboli, è preferibile testarla con solo 1 o 2 personaggi di primo livello e dando il tempo ai fantasmi di uccidere l'intero party, inclusi eventuali rinforzi (caldamente consigliato di esaminare gli eventi di battaglia).
    DEMO
    http://afantasymachine.altervista.org/_altervista_ht/forums/SimpleLastBattleEventsFix_DEMO.zip



    Istruzioni per l'uso

    Al solito, creare uno spazio nello script editor, al di sotto di quello Scene_Debug o del Battle System non di default, se utilizzato, ed al di sopra dello script Main. Vedere Bugs e Conflitti Noti e Altri Dettagli per come adattarlo quando il Battle System usa un metodo (def) judge con condizioni differenti da quelle di default.




    Script

    EDIT (2018-03-16) - Dopo un anno che lo snippet era stato completato con successo, ho avventatamente aggiunto una riga di codice che fa congelare la battaglia in caso di sconfitta del party. Nell'estendere la demo, me ne sono accorto, e tale riga è stata rimossa. Chiedo scusa per il disguido.

     

     

    
    # Simple Last Battle Events v 3.0, by giver (RPG2S.it) datecode 20170316
    
    class Scene_Battle
      #--------------------------------------------------------------------------
      # * Determine Battle Win/Loss Results
      #--------------------------------------------------------------------------
      def default_judge
        # If all dead determinant is true, or number of members in party is 0
        if $game_party.all_dead? or $game_party.actors.size == 0
          # If possible to lose
          if $game_temp.battle_can_lose
            # Return to BGM before battle starts
            $game_system.bgm_play($game_temp.map_bgm)
            # Battle ends
            battle_end(2)
            # Return true
            return true
          end
          # Set game over flag
          $game_temp.gameover = true
          # Return true
          return true
        end
        # Return false if even 1 enemy exists
        for enemy in $game_troop.enemies
          if enemy.exist?
            return false
          end
        end
        # Start after battle phase (win)
        start_phase5
        # Return true
        return true
      end
      # DUMMY JUDGE
      def judge
        unless @bend
          if $game_party.all_dead? or $game_party.actors.size == 0
            if $game_temp.battle_can_lose
              @bend = true
            end
            @bend = true
          end
          for enemy in $game_troop.enemies
            if enemy.exist?
              return false
            end
          end
          @bend = true
          return false
        else
          setup_battle_event
          unless $game_system.battle_interpreter.running?
            @bend = false
            default_judge
          else
            return false
          end
        end
      end
    end
    
    

     

     

     

    Qui trovate la versione testo semplice, con estensione .rb, dello snippet. Come sempre, per evitare che l'anti-leeching di altervista ne impedisca il download, è necessario visitare la pagina e salvarla dopo averla visualizzata.
    http://afantasymachine.altervista.org/CodiceRGSS/vintage/rgss_SimpleLastBattleEventsFix_rpg2s.rb


    Bugs e Conflitti Noti

    Lo script 'sovrascrive(rebbe)' il metodo (def) judge di Scene_Battle, ma lo 'mantiene' rinominandolo default_judge, trascritto apposta come parte di questo script per evitare agli utilizzatori di dover toccare il codice e per facilitare il confronto tra le due versioni del metodo in caso si debba adattare ad esigenze diverse da quelle di default. Il nuovo judge mente sul raggiungimento delle condizioni di vittoria da parte delle due fazioni finchè esistono eventi di battaglia che sono attivati dall'eliminazione dell'ultimo combattente di una delle due fazioni, per poi chiamare in causa lo judge originale affinchè chiuda la battaglia se sono ancora valide le condizioni per farlo.
    Non dovrebbe interferire con alcun Battle System basato su Scene_Battle, che gestisca Vittoria e Sconfitta del party allo stesso modo di quello di default, ossia la battaglia termina quando non ci sono più combattenti "abili" in una delle due fazioni, in quanto tali Battle Systems modificano le modalità di svolgimento dello scontro, ma non le condizioni per determinare quando termina.
    Non è detto, inoltre, che un Battle System diverso da quello di default ne abbia bisogno. Se non si è ancora provato a creare le condizioni per eventi speciali di fine battaglia, è possibile, prima di inserire questo script, usare la battaglia inclusa nella demo inserendola nel proprio progetto ed attivare il Battle Test: qualora appaia solo uno dei due rantoli dei fantasmi, vuol dire che questo script può tornare utile, altrimenti è già tutto a posto.
    Nella sezione più sotto viene accennato come 'creare' una variante che funzioni con uno judge dalle caratteristiche differenti rispetto a quello di default.




    Altri dettagli

    Dovrebbero esistere fix a questo problema fatti da altri scripters. Se il mio non viene trovato soddisfacente, è possibile provare a cercarli. E smettere di leggere questo post, in quanto la parte successiva riguarda solo coloro che lo vogliono usare ma il Battle System inserito nel loro progetto ha delle condizioni di vittoria differenti od estese. Purtroppo io non posso stare ad adattarlo ad ogni Battle System disponibile.
    Se viene usato un Battle System diverso da quello di default, bisogna andare a controllare se al suo interno c'è un metodo def judge nella sua classe Scene_Battle. Trovarlo può significare che è stato esteso, avendo un alias nelle vicinanze includente la parola judge, o sostituito, ossia c'è solo def judge senza alias.
    In entrambe i casi questo fix va modificato opportunamente per supportare le cambiate possibilità di gestione d'epilogo dello scontro. Osservando attentamente il codice del mio mini-script è facile notare che il nuovo metodo ha diverse cose in comune con quello originale, in quanto deve comunque verificare se lo scontro sarebbe da considerare concluso, ma ritornare false e controllare che non ci siano eventi di battaglia da eseguire prima di chiamare quello originale. Purtroppo non ho la possibilità di creare un vero e proprio tutorial a riguardo, perciò in questa sede darò solo qualche suggerimento sul come fare in modo che il fix funzioni anche con judge relativamente diversi da quello di default. E' più facile a dirsi che a farsi, comunque, e le probabilità che si debba procedere in tal senso dovrebbero essere poche.

    A) Se il metodo viene completamente sovrascritto, ossia non vi è il relativo alias, la cosa è abbastanza intuitiva.

    • Si comincia col fare un copia ed incolla dello judge non standard subito sotto lo stesso.

    • Si rinomina la versione sopra, quella originale, come default_judge.

    • Si modifica la copia sotto, che si chiama ancora judge, facendo riferimento agli judge presenti nel mio fix.

    • EDIT (2018-03-16) - Ovvero:

    • Eliminare tutti i settaggi e chiamate a metodo che non c'entrano con la verifica delle condizioni di vittoria.
    • Inserire una riga prima di ciascun return true, con scritto @bend = true.
    • Sostituire tutti i return true con dei return false (ma NON viceversa!).
    • Inserire il codice così modificato al posto di quello dello snippet, tra unless @bend ed il relativo else.

    B) Se è presente un alias al metodo judge, ossia l'autore del Battle System ha aggiunto condizioni di vittoria senza sostituirle a quelle di default, c'è meno da dover modificare, ma bisogna agire con maggiore cautela.

    • - Ovviamente, per prima cosa, è necessario incollare questo mini-script subito sopra quello del Battle System dove compare lo judge non standard.
    • Si procede poi col copiare il metodo judge non standard inclusa la sua dichiarazione di alias, ed incollarlo subito sotto quello originale del Battle System custom.
    • Si rinomina lo judge non standard che sta sopra come default_judge.
    • Ritornare all'alias originale, quello che si trova sopra il nuovo default_judge, e cambiare il nome di entrambe i parametri, il cui secondo deve essere, 'ovviamente', default_judge, invece che semplicemente judge, mentre il primo può essere cambiato a piacimento. Tale primo parametro andrà sostituito anche dove compare all'interno dell'ora metodo default_judge.
    • Modificare il nuovo judge, ossia quello sotto, facendo riferimento ai due judge presenti nel mio fix.

    In entrambe le occasioni, non è il caso di scoraggiarsi se bisogna fare più tentativi per ottenere il risultato desiderato. Buono Scripting!

    CHANGELOG della Versione 3.0 di questo snippet:
    Non c'è perchè si tratta della prima versione rilasciata in pubblico.

  13. Ahem !

     

    C non è orientato agli oggetti! Ruby può essere sì usato in procedurale, come il C, ma RPG Maker non è appropriato per questo . . .

     

    Prova C++ oppure Objective-C se vuoi cominciare a programmare ad Oggetti. O meglio ancora Java.

     

    Il problema del procedurale è che per vedere risultati simili a quelli di RPG Maker devi appoggiarti a Librerie e/o scrivere decine di migliaia di righe di codice.

     

    Good Luck. You are on your own !

  14. Grazie, Guardian! Non credevo che qualcuno si ricordasse di me. Sono passati quasi 5 anni oramai. Comunque non sono esattamente tornato. Come ho scritto anche nella sezione Altri Dettagli del post per questo script, sono solo di passaggio, almeno per adesso. Il progetto che sto sviluppando è temporaneamente 'On Hold' per via della salute altalenante sia fisica che economica di Vincent Law, che mi sta aiutando a crearlo.

    Quando sarà il momento, presto spero (anche per Vincent), aprirò il topic del progetto qui su RPG2S, trattando però i dettagli più tecnici sui nostri siti, in italiano nel mio ed in inglese in quello di Vincent.

    Nel frattempo, di tanto in tanto, posterò altri script 'vintage', alcune rewrites di script altrui ma anche revisioni di alcuni originali miei, comunque nulla che ha a che vedere con il progetto che voglio completare: sono fatti un po' per creare hype, vabbè scherzo, un po' per far vedere che l'xp ha un passato che non sfigura con l'MV attuale, ed un po' per dare una mano ad abbellire il proprio progetto a chi ancora crede in questo tool.

    Chiedo scusa se passerà diverso tempo prima del mio prossimo post. Grazie ancora.

  15. Il mio tempo online sta per scadere per questa giornata, quindi ti propongo una possibile soluzione, ma fino a domani non potrò eventualmente sentire il tuo responso a riguardo.

     

    Premessa: se usi un save system diverso da quello di default controlla se cambia il metodo read_save_data di Scene_Load e quello write_save_data di Scene_Save, perchè dovresti agire in essi, a mio parere.

     

    Nel metodo read_save_data, sotto la riga dove sta scritto

    $game_party = Marshal.load(file)

    inserisci

    $battle_party = Marshal.load(file)

     

    mentre nel metodo write_save_data, sotto la riga dove sta scritto

    Marshal.dump($game_party, file)

    inserisci

    Marshal.dump($battle_party, file)

     

    My time is up!! See Ya!!

  16. Constance Menu Screen (versione "4 Lame Wannabe Grown Ups Explicit Party", a.k.a. v. 18.0 giver's rewrite)




    Descrizione


    Personalizza la grafica della schermata principale del menu di gioco, come mostrato negli screenshots.

    Questa versione rimpiazza quasi completamente il codice della versione originale, rendendolo più leggibile, aggiungendo configurabilità di molti componenti pur mantanendo il layout complessivo, e rende espliciti gli status di altri due personaggi del party (i primi 4 invece che i primi 2, insomma)


    SCREENSHOTS


    SLOTS VUOTI

    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/OCCMS/OCCMS_emptypair.png

    SLOTS PIENI

    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/OCCMS/OCCMS_fullpair.png

    SELEZIONE NON POSSIBILE

    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/OCCMS/OCCMS_selectionnotpossible.png

    SELEZIONE POSSIBILE

    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/OCCMS/OCCMS_selectionpossible.png

    TERZO SLOT PIENO E QUARTO VUOTO

    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_screens/OCCMS/OCCMS_thirdmember.png




    Autore/i


    Indicati anche nello script, sia quelli della versione originale che quelli di questa riscrittura.

    Della versione Originale, 2.0 del 26 dicembre 2005, sono autori (il team) 'Constance', che vede la collaborazione di Sephiroth Spawn, Acedent Prone, Dubealex, e Diego

    Di questa riscrittura, 18.0 del 4 novembre 2017, è autore giver, con qualche dritta da parte di Vincent Law. 'Changelog' nella sezione Altri Dettagli.




    Allegati


    Risorse necessarie per vedere lo script in azione usando la configurazione di default:

    Da mettere nella cartella Characters del Progetto, rinominandola [NOBODY].png (come indicato in module OtherConstance, parametro NOBODY)

    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Characters/_NOBODY_.png

    Da mettere nella cartella Battlers del Progetto, rinominandola [NOBODY].png (come indicato in module OtherConstance, parametro NOBODY)

    http://afantasymachine.altervista.org/_altervista_ht/forums/vintage_resources/Battlers/_NOBODY_.png




    Istruzioni per l'uso


    Lo script va inserito come al solito in uno spazio dello script editor, possibilmente al di sotto di Scene_Debug ed al di sopra di Main. Occorre creare due immagini per riempire gli slot del party quando non sono occupati da un actor, seguendo gli esempi linkati in Allegati, ma si può indicare di non usarne lasciando le virgolette vuote nel parametro NOBODY del module OtherConstance. La grafica in stile battler da visuale frontale per gli tutti gli slots del party, occupati e non, può essere messa nella cartella Pictures invece che nella cartella Battlers, configurando opportunamente il parametro BATTLER_IS_PICTURE (= true), mantenendo il nome originale del Battler degli actors.


    Cosa si può configuarare dello script, senza mettere le mani nel codice:

    module OtherConstance è il nome della sezione di Configurazione.

    XYOK, V_MIDDLE_TEXT, e H_CENTER_CMDS non vanno toccati da chi vuole solo usare lo script nel proprio progetto.

    COMMANDS_LIST è l'elenco dei nomi dei sei comandi previsti dal menu, che non vengono letti dal DataBase.

    CMD_ICONS_LIST è l'elenco dei nomi delle icone associate ai sei comandi del menu.

    PLAYTIME_LABEL è la parola che appare nell'area dove viene indicato il tempo di gioco.

    GOLD_ICON è il nome dell'icona usata per il denaro del party.

    LOCATION_LABEL è la parola che precede il nome della Mappa in cui si trova il party.

    CLASS_LABEL è la parola che precede il nome della classe dell'actor.

    NAME_LABEL è la parola che precede il nome dell'actor.

    NAME_COLOR è il colore usato per scrivere il nome dell'actor. Cambiare solo i numeri dentro le parentesi tonde.

    STATE_LABEL è la parola che precede lo State dell'actor.

    BARZ_COLORS è l'elenco dei colori usati per disegnare le barre associate ad ogni parametro dell'actor. Come per quello del nome, limitarsi a cambiare solo i valori tra parentesi tonde.

    ALT_PARAMS_NAMING è l'elenco dei nomi alternativi dei parametri, che verranno usati al posto di quelli indicati nel DataBase se le virgolette non vengono lasciate vuote.

    EXP_LABEL è la parola usata come nome del parametro Esperienza, che non è presente nel DataBase.

    FONT_NAME è il nome del font usato per quasi tutto il testo del Menu.

    BASE_FONT_SIZE è la dimensione base del testo nel Menu, modificata in alcuni suoi punti.

    NOBODY è il nome delle immagini, character e battler, usata per gli slot non occupati da actors, ma viene usata anche come nome e state in tali slots, quindi va scelta con cura.

    BATTLER_IS_PICTURE è una 'flag' che indica se usare immagini nella cartella Pictures invece che in quella Battlers. Serve principalmente per usare ritratti grandi a chi ha una battle view tipo Minkoff o Tankentai.

    end




    Script


    EDIT: Scrivendo una variante di questo script affinchè supportasse 8 personaggi, mi sono accorto di un bug veramente strano: se una delle coppie risulta spaiata e si cerca di passare all'altra, il gioco crasha. L'ho prontamente risolto, comunque, usando delle istruzioni che secondo me eseguono la stessa identica cosa, quindi la cosa mi ha lasciato perplesso. Se pensate di usarlo e riscontrate errori, per favore non esitate a comunicarlo. Grazie, e scusatemi . . .






    # Rewritten by giver (without author permission),
    # with some wisecracks from Vincent Law
    # datecode 20171027-20171104
    #
    # This version (18.0, "4 Lame Wannabe Grown Ups Explicit Party") CHANGELOG
    # * Messed up with the original script (v. 2.0) code goal(s)
    # * Added a Configuration Section (see module OtherConstance)
    # * Made explicit the Status and USE of the 3rd and 4th party members
    # (toggle the pair shown using Buttons L/R, like in similar Scenes)
    # * Trimmed most of original and useless duplicate code
    # * Cloned some original and useful duplicate code
    # * Moved almost all "conflictual" methods to 'new' derived classes

    module OtherConstance
    XYOK = true
    V_MIDDLE_TEXT = true
    H_CENTER_CMDS = true
    # The words associated to the commands . . .
    COMMANDS_LIST = ["Item", "Skill", "Equip",
    "Load", "Save", "Exit"]
    # . . . and the Icons related to them
    CMD_ICONS_LIST = ["034-Item03", "050-Skill07", "013-Body01",
    "033-Item02", "037-Item06", "039-Item08"]
    PLAYTIME_LABEL = "Playtime:"
    GOLD_ICON = "032-Item01"
    LOCATION_LABEL = "Place:"
    CLASS_LABEL = "Class:"
    NAME_LABEL = ""
    NAME_COLOR = Color.new(204, 153, 0)
    STATE_LABEL = "State:"
    # DO NOT CHANGE THE HASH KEYS, only the Color.new values!!
    BARZ_COLORS = {
    'hp' => [Color.new(102, 200, 160, 0), Color.new(0, 0, 0, 0)], # Used for HPs
    'sp' => [Color.new(0, 0, 0, 0), Color.new(-102, 160, -200, 0)], # Used for SPs
    0 => [Color.new(242, 2, 6, 255), Color.new(253, 53, 56, 255)], # Used for ATK
    1 => [Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255)], # Used for PDEF
    2 => [Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255)], # Used for MDEF
    3 => [Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255)], # Used for STR
    4 => [Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255)], # Used for DEX
    5 => [Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255)], # Used for AGI
    6 => [Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255)], # Used for INT
    'xp' => [Color.new(-255, 200, -86, 255), Color.new(-168, -157, 184, 255)] # Used for EXP
    }
    # For parameter Labels a bit longer than allowed in the DataBase
    # If left EMPTY (""), the script will use the name in the DataBase
    # Configured to resemble the Original v 2.0 parameter names
    ALT_PARAMS_NAMING = [
    "", # for "atk"
    "", # for "pdef"
    "Magic Defense", # for "mdef"
    "", # for "str"
    "", # for "dex"
    "", # for "agi"
    "" # for "int"
    ]
    EXP_LABEL = "Experience"
    # Base font name and text size
    FONT_NAME = "Tahoma"
    BASE_FONT_SIZE = 22
    # Actor and Graphics NAME when there is no actor in a party position
    # NOBODY graphic files must be added in the appropriate folders using
    # the name set below (Characters and Battlers OR Pictures, see below)
    # e.g. Default NOBODY graphics MUST be named [NOBODY].png
    NOBODY = "[NOBODY]"
    # If the Battler Graphic is in the Picture folder, set this to true
    # Primarly for those who use a character-based (animated) Battle View
    BATTLER_IS_PICTURE = false
    end

    class Game_Party
    def family
    return @actors
    end
    def friends
    return @actors
    end
    def team
    return @actors
    end
    end

    # ORIGINAL VERSION CREDITS
    #============================================================
    # Custom Menu System
    # created by: Constance
    # created on: Dec. 26, 2005
    # version: 2.0
    # credits: Acedent Prone, Diego, Dubealex
    # special thanks credits goes to: SephirothSpawn,
    # couldn't have done it without you
    # RMXP - Underground - The Underground Gaming Zone
    #============================================================
    class Window_Base < Window
    # Used in class Window_PCAnimation
    def draw_sprite(x, y, name, hue, pose, frame)
    bitmap = RPG::Cache.character(name, hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    case pose
    when 0
    a = 0
    when 1
    a = ch
    when 2
    a = ch * 3
    when 3
    a = ch * 2
    end
    case frame
    when 0
    b = 0
    when 1
    b = cw
    when 2
    b = cw * 2
    when 3
    b = cw * 3
    end
    src_rect = Rect.new(b, a, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
    end
    # Used in Window_PCCard and Window_PCStatus
    def draw_actor_barz(actor, x, y, show, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
    self.contents.fill_rect(x-1, y - 1, length + 1, thick + 3, Color.new(0, 0, 0, 255))
    self.contents.fill_rect(x, y, length + 1, thick + 1, Color.new(0, 0, 0, 255))
    w = length * e1.to_f / e2.to_f
    for i in 0..thick
    r = c1.red + (c2.red - c1.red) * (thick -i)/thick
    g = c1.green + (c2.green - c1.green) * (thick -i)/thick
    b = c1.blue + (c2.blue - c1.blue) * (thick -i)/thick
    a = c1.alpha + (c2.alpha - c1.alpha) * (thick -i)/thick + 255 * i/thick
    self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
    end
    end
    end

    class Game_Actor < Game_Battler
    def now_exp
    return @exp - @exp_list[@level]
    end
    def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
    end
    end

    class Scene_Title
    map_infos = load_data("Data/MapInfos.rxdata")
    $map_infos = []
    for key in map_infos.keys
    $map_infos[key] = map_infos[key].name
    end
    end

    class Game_Map
    def name
    $map_infos[@map_id]
    end
    end

    class Window_Command2 < Window_Selectable
    def initialize(commands)
    super(0, 0, 270, 101)
    @item_max = 6
    @column_max = 3
    self.opacity = 0
    self.index = 0
    end
    def update_cursor_rect
    if @index < 0
    self.cursor_rect.empty
    return
    end
    row = @index / 3
    if row < self.top_row
    self.top_row = row
    end
    if row > self.top_row + (self.page_row_max - 1)
    self.top_row = row - (self.page_row_max - 1)
    end
    x = @index % 3 * (self.width / 3)
    y = @index / 3 * 32 - self.oy
    self.cursor_rect.set(x, y, 65, 32)
    end
    end

    class Dummy_Window_Command < Window_Base
    def initialize
    super(0, 0, 270, 101)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = OtherConstance::FONT_NAME
    self.contents.font.size = OtherConstance::BASE_FONT_SIZE
    self.opacity = 0
    refresh
    end
    def refresh
    self.contents.clear
    self.contents.draw_text(
    -35, 0, 124, 32, OtherConstance::COMMANDS_LIST[0], 1)
    self.contents.draw_text(
    50, 0, 124, 32, OtherConstance::COMMANDS_LIST[1], 1)
    self.contents.draw_text(
    145, 0, 124, 32, OtherConstance::COMMANDS_LIST[2], 1)
    self.contents.draw_text(
    -35, 35, 124, 32, OtherConstance::COMMANDS_LIST[3], 1)
    self.contents.draw_text(
    50, 35, 124, 32, OtherConstance::COMMANDS_LIST[4], 1)
    self.contents.draw_text(
    140, 35, 124, 32, OtherConstance::COMMANDS_LIST[5], 1)
    end
    def disable_command(cindex)
    self.contents.font.color = Color.new(128, 128, 128)
    case cindex
    when 0
    self.contents.draw_text(
    -35, 0, 124, 32, OtherConstance::COMMANDS_LIST[0], 1)
    when 1
    self.contents.draw_text(
    50, 0, 124, 32, OtherConstance::COMMANDS_LIST[1], 1)
    when 2
    self.contents.draw_text(
    145, 0, 124, 32, OtherConstance::COMMANDS_LIST[2], 1)
    when 3
    self.contents.draw_text(
    -35, 35, 124, 32, OtherConstance::COMMANDS_LIST[3], 1)
    when 4
    self.contents.draw_text(
    50, 35, 124, 32, OtherConstance::COMMANDS_LIST[4], 1)
    when 5
    self.contents.draw_text(
    140, 35, 124, 32, OtherConstance::COMMANDS_LIST[5], 1)
    end
    self.contents.font.color = normal_color
    end
    end

    class Dummy_Window_Command2 < Window_Base
    def initialize
    super(0, 0, 270, 101)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents_opacity = 176
    self.z = 99
    refresh
    end
    def refresh
    self.contents.clear
    bitmap = RPG::Cache.icon(OtherConstance::CMD_ICONS_LIST[0])
    self.contents.blt(35, 4, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon(OtherConstance::CMD_ICONS_LIST[1])
    self.contents.blt(115, 4, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon(OtherConstance::CMD_ICONS_LIST[2])
    self.contents.blt(205, 4, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon(OtherConstance::CMD_ICONS_LIST[3])
    self.contents.blt(35, 39, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon(OtherConstance::CMD_ICONS_LIST[4])
    self.contents.blt(115, 39, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon(OtherConstance::CMD_ICONS_LIST[5])
    self.contents.blt(205, 39, bitmap, Rect.new(0, 0, 24, 24))
    end
    end

    class Window_PCSelection1 < Window_Selectable
    def initialize
    super(-8, 50, 656, 50)
    self.contents = Bitmap.new(width - 32, height - 32)
    @pair = 0
    get_commands
    @column_max = 2
    self.visible = false
    self.active = false
    self.z = 200
    refresh
    end
    def get_commands
    izero = @pair * 2
    @commands = []
    @commands.push($game_party.friends[izero])

    @commands.push($game_party.friends[izero + 1])

    @item_max = 0 @item_max += 1 unless @commands[1].nil? @item_max += 1 unless @commands[0].nil? self.index = @item_max == 0 ? -1 : 0 end def refresh self.contents.clear self.contents.font.color = system_color pair_s = @pair == 0 ? "[1st Pair]" : "[2nd Pair]" self.contents.draw_text(4, -6, 112, 32, pair_s) self.contents.font.color = OtherConstance::NAME_COLOR case @item_max when 0 name1 = OtherConstance::NOBODY name2 = OtherConstance::NOBODY when 1 name1 = @commands[0].name name2 = OtherConstance::NOBODY when 2 name1 = @commands[0].name name2 = @commands[1].name end self.contents.draw_text(120, -6, 144, 32, name1, 1) self.contents.draw_text(276, -6, 144, 32, name2, 1) end def pair=(current_pair) @pair = current_pair get_commands refresh end def pc_index return @pair * 2 + self.index end def update_cursor_rect if @index < 0 self.cursor_rect.empty return end row = 0 self.cursor_rect.set(116 + @index * 156, 0, 156, 20) end end class Window_PCSelection2 < Window_Base def initialize super(-8, 0, 656, 51) self.contents = Bitmap.new(width - 32, height - 32) self.visible = false self.z = 200 refresh end def refresh self.contents.clear self.contents.font.color = system_color cx = contents.text_size("Which PC would You like to select?").width self.contents.draw_text(4, -6, cx + 4, 32, "Which PC would You like to select?") self.contents.font.color = crisis_color self.contents.draw_text(cx + 12, -6, 612 - cx, 32, "[buttons L/R to toggle pair]", 2) end end class Window_PlayTime < Window_Base def initialize super(0, 0, 150, 101) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.font.name = OtherConstance::FONT_NAME self.contents.font.size = OtherConstance::BASE_FONT_SIZE - 2 self.contents.draw_text(4, 0, 120, 32, OtherConstance::PLAYTIME_LABEL) @total_sec = Graphics.frame_count / Graphics.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 text = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = normal_color self.contents.draw_text(-15, 32, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end class Window_LocationAndGold < Window_Base def initialize super(0, 0, 220, 101) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = OtherConstance::FONT_NAME self.contents.font.size = OtherConstance::BASE_FONT_SIZE - 2 refresh end def refresh bitmap = RPG::Cache.icon(OtherConstance::GOLD_ICON) self.contents.blt(165, y + 40, bitmap, Rect.new(0, 0, 24, 24)) cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(44, 40, 118-cx, 32, $game_party.gold.to_s, 2) self.contents.font.color = system_color self.contents.draw_text(164-cx, 40, cx, 32, $data_system.words.gold, 2) lx = contents.text_size(OtherConstance::LOCATION_LABEL).width self.contents.draw_text(4, -55, lx, 144, OtherConstance::LOCATION_LABEL) self.contents.font.color = normal_color self.contents.draw_text(10 + lx, 1, width - 48 - lx, 32, $game_map.name, 2) end end class Window_PCCard < Window_Base def initialize(pc_index) h = (pc_index % 2) == 1 ? 200 : 180 super(0, 0, 200, h) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = OtherConstance::FONT_NAME self.contents.font.size = OtherConstance::BASE_FONT_SIZE @pc = $game_party.friends[pc_index] refresh end def refresh self.contents.clear e1 = (@pc.nil?) ? 0 : @pc.hp e2 = (@pc.nil?) ? 1 : @pc.maxhp draw_actor_barz(@pc, x + 4, y + 81, true, 160, 4, e1, e2, OtherConstance::BARZ_COLORS['hp'][0],OtherConstance::BARZ_COLORS['hp'][1]) draw_actor_hp(@pc, x + 4, y + 55, 144) e1 = (@pc.nil?) ? 0 : @pc.sp e2 = (@pc.nil?) ? 1 : @pc.maxsp draw_actor_barz(@pc, x + 4, y + 136, true, 160, 4, e1, e2, OtherConstance::BARZ_COLORS['sp'][0], OtherConstance::BARZ_COLORS['sp'][1]) draw_actor_sp(@pc, x + 4, y + 110, 144) self.contents.font.size = OtherConstance::BASE_FONT_SIZE - 2 self.contents.draw_text(x + 50, y - 55, 144, 144, OtherConstance::CLASS_LABEL) unless @pc.nil? draw_actor_class(@pc, x + 100, y + 1) else self.contents.draw_text(x + 100, y + 1, 236, 32, " N/A") end self.contents.draw_text(x + 50, y - 62, 144, 170, "_____________________") self.contents.draw_text(x + 80, y - 30, 144, 144, "Lv:") self.contents.font.color = normal_color level_s = (@pc.nil?) ? "N/A" : @pc.level.to_s self.contents.draw_text(x + 99, y + 26, 24, 32, level_s, 2) end def draw_actor_hp(actor, x, y, width = 144) self.contents.font.name = OtherConstance::FONT_NAME self.contents.font.size = OtherConstance::BASE_FONT_SIZE - 2 self.contents.draw_text(x, y, 32, 32, $data_system.words.hp) if width - 32 >= 108 hp_x = x + width - 108 flag = true elsif width - 32 >= 48 hp_x = x + width - 48 flag = false end if actor.nil? self.contents.font.color = system_color self.contents.draw_text(hp_x + 30, y, 48, 32, "N/A") return end self.contents.font.color = actor.hp == 0 ? knockout_color : actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color self.contents.draw_text(hp_x + 30, y, 48, 32, actor.hp.to_s, 2) if flag self.contents.draw_text(hp_x + 78, y, 12, 32, "/", 1) self.contents.draw_text(hp_x + 90, y, 48, 32, actor.maxhp.to_s) end end def draw_actor_sp(actor, x, y, width = 144) self.contents.font.name = OtherConstance::FONT_NAME self.contents.font.size = OtherConstance::BASE_FONT_SIZE - 2 self.contents.draw_text(x, y, 32, 32, $data_system.words.sp) self.contents.font.color = Color.new(74, 230, 51, 225) if width - 32 >= 108 sp_x = x + width - 108 flag = true elsif width - 32 >= 48 sp_x = x + width - 48 flag = false end if actor.nil? self.contents.font.color = system_color self.contents.draw_text(sp_x + 30, y, 48, 32, "N/A") return end self.contents.font.color = actor.sp == 0 ? knockout_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color self.contents.draw_text(sp_x + 30, y, 48, 32, actor.sp.to_s, 2) if flag self.contents.draw_text(sp_x + 78, y, 12, 32, "/", 1) self.contents.draw_text(sp_x + 90, y, 48, 32, actor.maxsp.to_s) end end end class Window_PCAnimation < Window_Base def initialize(pc_index) h = (pc_index % 2) == 1 ? 200 : 180 super(0, 0, 200, h) self.contents = Bitmap.new(width - 32, height - 32) @pc = $game_party.friends[pc_index] @pose, @frame = 0, 0 self.opacity = 0 refresh end def refresh self.contents.clear unless @pc.nil? draw_sprite(25, 55, @pc.character_name, @pc.character_hue, @pose, @frame) else draw_sprite(25, 55, OtherConstance::NOBODY, 0, @pose, @frame) end end def frame_update return if (@pc.nil? or @pc.dead?) @frame == 3 ? @frame = 0 : @frame += 1 refresh end end class Window_PCStatus < Window_Base def initialize(pc_index) h = (pc_index % 2) == 1 ? 200 : 180 super(0, 0, 440, h) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = OtherConstance::FONT_NAME self.contents.font.size = OtherConstance::BASE_FONT_SIZE - 2 @pc = $game_party.friends[pc_index] refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(215, -63, 144, 144, OtherConstance::STATE_LABEL) self.contents.draw_text(0, -7, 120, 32, OtherConstance::NAME_LABEL) draw_actor_name(@pc, x + 55, y - 8) unless @pc.nil? draw_actor_state(@pc, 325, -7, 144) else draw_actor_name(@pc, 325, -7, true) end e1 = (@pc.nil?) ? 0 : @pc.atk draw_actor_barz(@pc, 0, 52, true, 168, 1, e1, 999, OtherConstance::BARZ_COLORS[0][0], OtherConstance::BARZ_COLORS[0][1]) draw_actor_parameter(@pc, 0, 25, 0) e1 = (@pc.nil?) ? 0 : @pc.pdef draw_actor_barz(@pc, 0, 82, true, 168, 1, e1, 999, OtherConstance::BARZ_COLORS[1][0], OtherConstance::BARZ_COLORS[1][1]) draw_actor_parameter(@pc, 0, 55, 1) e1 = (@pc.nil?) ? 0 : @pc.mdef draw_actor_barz(@pc, 0, 112, true, 168, 1, e1, 999, OtherConstance::BARZ_COLORS[2][0], OtherConstance::BARZ_COLORS[2][1]) draw_actor_parameter(@pc, 0, 85, 2) e1 = (@pc.nil?) ? 0 : @pc.str draw_actor_barz(@pc, 0, 142, true, 168, 1, e1, 999, OtherConstance::BARZ_COLORS[3][0], OtherConstance::BARZ_COLORS[3][1]) draw_actor_parameter(@pc, 0, 115, 3) e1 = (@pc.nil?) ? 0 : @pc.dex draw_actor_barz(@pc, 190, 52, true, 168, 1, e1, 999, OtherConstance::BARZ_COLORS[4][0], OtherConstance::BARZ_COLORS[4][1]) draw_actor_parameter(@pc, 190, 25, 4) e1 = (@pc.nil?) ? 0 : @pc.agi draw_actor_barz(@pc, 190, 82, true, 168, 1, e1, 999, OtherConstance::BARZ_COLORS[5][0], OtherConstance::BARZ_COLORS[5][1]) draw_actor_parameter(@pc, 190, 55, 5) e1 = (@pc.nil?) ? 0 : @pc.int draw_actor_barz(@pc, 190, 112, true, 168, 1, e1, 999, OtherConstance::BARZ_COLORS[6][0], OtherConstance::BARZ_COLORS[6][1]) draw_actor_parameter(@pc, 190, 85, 6) e1 = (@pc.nil?) ? 0 : @pc.now_exp.to_f e2 = (@pc.nil?) ? 1 : @pc.next_exp == 0 ? 1 : @pc.next_exp draw_actor_barz(@pc, 190, 142, true, 168, 1, e1, e2, OtherConstance::BARZ_COLORS['xp'][0], OtherConstance::BARZ_COLORS['xp'][1]) self.contents.draw_text(190, 114, 120, 32, OtherConstance::EXP_LABEL) end def draw_actor_name(actor, x, y, state = false) unless state self.contents.font.color = OtherConstance::NAME_COLOR self.contents.font.bold = true else self.contents.font.color = normal_color end pcname = (actor.nil?) ? OtherConstance::NOBODY : actor.name self.contents.draw_text(x, y, 144, 32, pcname) self.contents.font.bold = false end def draw_actor_parameter(actor, x, y, type) case type when 0 if OtherConstance::ALT_PARAMS_NAMING[0] == "" parameter_name = $data_system.words.atk else parameter_name = OtherConstance::ALT_PARAMS_NAMING[0] end parameter_value = (actor.nil?) ? "N/A" : actor.atk when 1 if OtherConstance::ALT_PARAMS_NAMING[1] == "" parameter_name = $data_system.words.pdef else parameter_name = OtherConstance::ALT_PARAMS_NAMING[1] end parameter_value = (actor.nil?) ? "N/A" : actor.pdef when 2 if OtherConstance::ALT_PARAMS_NAMING[2] == "" parameter_name = $data_system.words.mdef else parameter_name = OtherConstance::ALT_PARAMS_NAMING[2] end parameter_value = (actor.nil?) ? "N/A" : actor.mdef when 3 if OtherConstance::ALT_PARAMS_NAMING[3] == "" parameter_name = $data_system.words.str else parameter_name = OtherConstance::ALT_PARAMS_NAMING[3] end parameter_value = (actor.nil?) ? "N/A" : actor.str when 4 if OtherConstance::ALT_PARAMS_NAMING[4] == "" parameter_name = $data_system.words.dex else parameter_name = OtherConstance::ALT_PARAMS_NAMING[4] end parameter_value = (actor.nil?) ? "N/A" : actor.dex when 5 if OtherConstance::ALT_PARAMS_NAMING[5] == "" parameter_name = $data_system.words.agi else parameter_name = OtherConstance::ALT_PARAMS_NAMING[5] end parameter_value = (actor.nil?) ? "N/A" : actor.agi when 6 if OtherConstance::ALT_PARAMS_NAMING[6] == "" parameter_name = $data_system.words.int else parameter_name = OtherConstance::ALT_PARAMS_NAMING[6] end parameter_value = (actor.nil?) ? "N/A" : actor.int end self.contents.font.color = system_color self.contents.font.size = 20 self.contents.draw_text(x, y, 120, 32, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2) end end class Window_Battler < Window_Base def initialize(pc_index) h = (pc_index % 2) == 1 ? 220 : 200 super(0, 0, 280, h) self.contents = Bitmap.new(width - 32, height - 32) @pc = $game_party.friends[pc_index] self.z = 99 self.opacity = 0 self.contents_opacity = 128 refresh end def refresh self.contents.clear draw_actor_battler(@pc, x + 130, y + 200) end def draw_actor_battler(actor, x, y) unless actor.nil? unless OtherConstance::BATTLER_IS_PICTURE bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue) else bitmap = RPG::Cache.picture(actor.battler_name) end else unless OtherConstance::BATTLER_IS_PICTURE bitmap = RPG::Cache.battler(OtherConstance::NOBODY, 0) else bitmap = RPG::Cache.picture(OtherConstance::NOBODY) end end cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end end class Scene_Load2 < Scene_Load def on_cancel $game_system.se_play($data_system.cancel_se) $scene = Scene_Menu.new(3) end end class Window_EquipLeft < Window_Base def draw_actor_name(actor, x, y) self.contents.font.color = normal_color self.contents.draw_text(x, y, 144, 32, actor.name) end end class Window_SkillStatus < Window_Base def refresh self.contents.clear draw_actor_name(@actor, 0, 0, 144) draw_actor_state(@actor, 150, 0) draw_actor_hp(@actor, 270, 0) draw_actor_sp(@actor, 440, 0) end def draw_actor_name(actor, x, y, w) self.contents.font.color = OtherConstance::NAME_COLOR self.contents.draw_text(x, y, w, 32, actor.name) end end class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index end def main @pair = 1 @update_frame = 0 @location_and_gold_window = Window_LocationAndGold.new @location_and_gold_window.x = 420 @pc_selection_window1 = Window_PCSelection1.new @pc_selection_window1.y = 50 @pc_selection_window2 = Window_PCSelection2.new @pc1_animation = Window_PCAnimation.new(0) @pc3_animation = Window_PCAnimation.new(2) @pc1_animation.y = @pc3_animation.y = 100 @pc1_animation.frame_update @pc3_animation.frame_update @pc2_animation = Window_PCAnimation.new(1) @pc4_animation = Window_PCAnimation.new(3) @pc2_animation.y = @pc4_animation.y = 280 @pc2_animation.frame_update @pc4_animation.frame_update @pc1 = Window_PCCard.new(0) @pc3 = Window_PCCard.new(2) @pc1.y = @pc3.y = 100 @pc2 = Window_PCCard.new(1) @pc4 = Window_PCCard.new(3) @pc2.y = @pc4.y = 280 @pc_status1 = Window_PCStatus.new(0) @pc_status3 = Window_PCStatus.new(2) @pc_status1.x = @pc_status3.x = 200 @pc_status1.y = @pc_status3.y = 100 @pc_status2 = Window_PCStatus.new(1) @pc_status4 = Window_PCStatus.new(3) @pc_status2.x = @pc_status4.x = 200 @pc_status2.y = @pc_status4.y = 280 @playtime_window = Window_PlayTime.new @playtime_window.x = 270 @battler1 = Window_Battler.new(0) @battler3 = Window_Battler.new(2) @battler1.x = @battler3.x = 240 @battler1.y = @battler3.y = 92 @battler2 = Window_Battler.new(1) @battler4 = Window_Battler.new(3) @battler2.x = @battler4.x = 240 @battler2.y = @battler4.y = 272 update_toggle @cursor_window = Window_Command2.new(["", "", "", "", "", ""]) @cursor_window.index = @menu_index @commands_window = Dummy_Window_Command.new if $game_party.friends.size == 0 @commands_window.disable_command(0) @commands_window.disable_command(1) @commands_window.disable_command(2) end for i in 0...4 if FileTest.exist?("Save#{i+1}.rxdata") @load_enabled = true end end unless @load_enabled @commands_window.disable_command(3) end if $game_system.save_disabled @commands_window.disable_command(4) end @icons_window = Dummy_Window_Command2.new Graphics.transition loop do Graphics.update Input.update @update_frame += 1 if @update_frame == 7 and $game_party.friends.size > 0 @update_frame = 0 @pc1_animation.frame_update @pc2_animation.frame_update @pc3_animation.frame_update @pc4_animation.frame_update end update if $scene != self break end end Graphics.freeze @location_and_gold_window.dispose @pc1.dispose @pc_status1.dispose @pc2.dispose @pc_status2.dispose @pc3.dispose @pc_status3.dispose @pc4.dispose @pc_status4.dispose @playtime_window.dispose @cursor_window.dispose @battler1.dispose @battler2.dispose @battler3.dispose @battler4.dispose @commands_window.dispose @icons_window.dispose @pc1_animation.dispose @pc2_animation.dispose @pc3_animation.dispose @pc4_animation.dispose @pc_selection_window1.dispose @pc_selection_window2.dispose end def update if Input.trigger?(Input::L) or Input.trigger?(Input::R) update_toggle return end @playtime_window.update @cursor_window.update @pc_selection_window1.update if @cursor_window.active update_command return end if @pc_selection_window1.active update_selection return end end def update_toggle @pair = (@pair + 1) % 2 @pc_selection_window1.pair = @pair if @pair == 0 @pc1.visible = true @pc_status1.visible = true @pc2.visible = true @pc_status2.visible = true @battler1.visible = true @battler2.visible = true @pc1_animation.visible = true @pc2_animation.visible = true @pc3.visible = false @pc_status3.visible = false @pc4.visible = false @pc_status4.visible = false @battler3.visible = false @battler4.visible = false @pc3_animation.visible = false @pc4_animation.visible = false else @pc1.visible = false @pc_status1.visible = false @pc2.visible = false @pc_status2.visible = false @battler1.visible = false @battler2.visible = false @pc1_animation.visible = false @pc2_animation.visible = false @pc3.visible = true @pc_status3.visible = true @pc4.visible = true @pc_status4.visible = true @battler3.visible = true @battler4.visible = true @pc3_animation.visible = true @pc4_animation.visible = true end end def update_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) if $game_party.friends.size == 0 and @cursor_window.index < 3 $game_system.se_play($data_system.buzzer_se) return end case @cursor_window.index when 0 $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1, 2 $game_system.se_play($data_system.decision_se) @pc_selection_window1.visible = true @pc_selection_window2.visible = true @pc_selection_window1.active = true @pc_selection_window1.index = @pc_selection_window1.index @cursor_window.active = false when 3 unless @load_enabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Load2.new when 4 if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when 5 $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end def update_selection if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @cursor_window.active = true @pc_selection_window1.visible = false @pc_selection_window1.active = false @pc_selection_window2.visible = false @pc_selection_window1.index = @pc_selection_window1.index return end if Input.trigger?(Input::C) case @cursor_window.index when 1 $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@pc_selection_window1.pc_index) when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@pc_selection_window1.pc_index) end return end end end



    Seguendo il link sottostante si raggiunge una versione testo semplice, con estensione .rb rinominabile in .txt, di questo script. Avvertenza: Tentando di fare Salva Link con Nome potrebbe essere scaricato un file html invece dello script, per via del sistema anti-leeching di Altervista. E' consigliabile aprire il link in un altro tab e fare Salva Pagina con Nome, invece. La pagina in questione contiene solo lo script, non ci sono altri contenuti, soprattutto di tipo pubblicitario.




    Per chi vuole vedere la Versione Originale dello script in formato solo testo


    ed il Topic Originale in RPG2S





    Bugs e Conflitti Noti


    Come indicato nello script, quasi tutte le parti che potrebbero generare conflitti sono state spostate nelle classi derivate che sono specifiche del Menu, e di conseguenza non usate da altre parti del gioco. Per quello che non è stato spostato, è stato comunque indicato quali classi del Menu ne fanno uso. Sono funzioni abbastanza comuni introdotte da molti script, ma solitamente con nomenclatura differente. Qualora vi fossero sovrapposizioni è consigliabile che tali contenuti siano spostati nelle classi che ne fanno uso, cosa che creerà ridondanza di codice ma ridurrà drasticamente la possibilità di ulteriori conflitti.

    Un problema legato ai comandi è la non espandibilità a più di 6 comandi, ossia quelli di default di questo Menu. Si può aggirare il problema inserendo nel gioco degli oggetti, non consumabili, nel cui evento comune chiamano la Scene appropriata in un comando evento (call) script, oppure si può sacrificare probabilmente il Load da Menù, comando 3 (il quarto di quelli di default). A proposito del comando Load, esso viene disabilitato se non risultano salvataggi presenti, esattamente come Continue nel Title. Anche se è poco probabile che un giocatore, pur avendo a disposizione più dei normali 4 slot per salvare, cominci a usare gli slot dopo il quarto, è meglio, avendo nel gioco un numero di slot diverso da quello di default, andare a cambiare il valore 4 con quello del proprio save system, nel ciclo for i in 0...4 dove viene settato @load_enabled, all'interno della classe Scene_Menu, def main.




    Altri dettagli


    Pur dopo oltre 12 anni, il Constance Menu resta uno dei più pregevoli in circolazione, non solo per l'impatto grafico ma anche come esempio di offuscamento del codice mirato a narrare l'enigma che ne ha portato alla realizzazione. Confrontare questa versione con quella originale potrebbe quindi risultare una lettura interessante, almeno per coloro che masticano un minimo di programmazione . . . Agli interessati suggerisco di usare WinMerge.


    'Changelog' (dall'Originale a questa versione)


    • Storpiato il significato originale del codice dello script.



    • Aggiunta una sezione di configurazione.



    • Resa esplicita la presenza del terzo e quarto membro del party. Per cambiare COPPIA visualizzata si usano i Buttons L ed R (Tasti Q e W), come normalmente si fa in Skill, Equip, Status.



    • Gli slot vuoti non sono più delle semplici finestre spoglie con la parola EMPTY.



    • Eliminato un sacco di codice inutilmente ridondante (da 1600+ righe a 940+ righe).



    • Mantenuti, ma modificato, alcuni pezzi ridondanti.



    • Spostato nelle classi specifiche dello script quasi tutto il codice che poteva causare conflitti.



    P.S.: lo script è stato postato en passant, quindi non potrò dare supporto frequente a coloro che dovessero avere richieste relative ad esso . . .
  17. In effetti si possono sovrascrivere, ma, giver, dove sono 'ste chiamate? Non mi pare che tra gli script comuni siano tanto visibili ° °

    C'è da cerare altrove? Mi limitano troppo la personalizzazione è____é

    ^ ^

    Però come si fa a scoprire qual è la funzione che chiama? Come avevano fatto su XP per F12?

    Non lo ha detto, come l'ha scoperta, ma suppongo abbia usato uno script di tracing dell'elaborazione (mi pare che clyde ne abbia postato uno per VX o ACE, ma è ruby quindi potrebbe funzionare anche con XP), e/o un debugger RAM, e/o, meno probabile, un decompilatore su exe e dll del tool . . .

     

    Personalmente, se devo andare in mare, mi compro una barca piuttosto che comprarmi una macchina e trasformarla in un mezzo di navigazione . . .

  18. Il bug vecchio consisteva nel fatto che pur indicando uno Switch per attivare/disattivare il salto, non veniva controllato da nessuna parte se è ON o OFF . . .

    Nel fix, quindi, è necessario scegliere uno switch diverso da 0 (non usato da altro) e metterlo ON per attivare il salro, o metterlo OFF quando si vuole che non si salti . . .

  19. http://yanflychannel.files.wordpress.com/2011/12/ame-041.jpg?w=593

     

    Dallo screen si evince che il terzo parametro della configurazione dei comandi ad eventi comuni si chiama HIDE Switch, quindi dovresti fare in modo di indicarne uno e metterlo ON quando ottieni l'oggetto necessario . . .

  20. Vai a vedere lo script Game_Map della demo, metodo (def) update, che dovrebbe avere (unavarlocale = valore), ed aggiungi alla riga 39 dello script di Dilos, subito dopo update, le parentesi tonde con all'interno il valore letto lì . . .

    $game_map.update(valore)
    

×
×
  • Create New...