Jump to content
Rpg²S Forum

Artia

Utenti
  • Posts

    119
  • Joined

  • Last visited

Posts posted by Artia

  1. Lo script a 10 pose è molto molto vecchio ed ormai è quasi fuori dal giro perchè con le nuove versioni si sono corretti una miriade di bug che minavano il funzionamento del vecchio BS. Dunque è più conveniente adattare i battler a 10 pose a 11 pose.

     

    P.S. Non bumpare un topic a distanza di un ora, se qualcuno disponibile poteva aiutarti lo faceva anche senza il secondo messaggio ^^

  2. Allora devi sapere innanzitutto che del minkoff stesso esistono due versioni: 11 pose e 10 pose, dunque se i battler sono a 10 pose e li usi nella 11 pose già vengono tagliate. Quindi accertati di avere i battler per lo script giusto. Inoltre molti battler vengono "spacciati" per minkoff pur se hanno solo 7 pose, dunque sono adatti al Cybersam. Dacci qualche specifica ulteriore sui battler e sulla versione dello script e potremo aiutarti
  3. Il vero problema non credo sia la risoluzione (che è uguale a quella del gba o quasi, sicuro non 640*480, se ho inteso bene quello che intendevi) quanto, a mio avviso, l'aprire le rom per prenderne i files grafici o il farle partire da emulatore per ripparle, almeno credo.
  4. Titolo del Tutorial: Allineamento

     

    Autore: Artia (Io)

     

    Finalità del Tutorial: Insegnare a creare un sistema di allineamento abbastanza personabilizzabile e nello stesso tempo semplice.

     

    Il tutorial è sotto forma di Demo - Tutorial. Prima giocate la demo per vederne le funzionalità, dunque aprite il progetto e seguendo i commenti che ho inserito negli eventi. Visionare prima l'evento comune, dunque i due eventi che alterano l'allineamento e in fine l'evento di controllo.

     

    Per qualsiasi spiegazione chiedetemi pure qui. :tongue:

     

    http://rapidshare.com/files/77178949/Tutor...amento.rar.html

     

    :wink:

  5. Io di micky mouse ho la Cartucciona Originale @_@

     

    Per megadrive ti consiglio Altered Beasts, un gioco a mio avviso divertentissimo *_*

     

    Roms del Ds da provare secondo me:

     

    Brain Training e More brain training:

    Aiutano un sacco la mente, dico sul serio

     

    Under The Knife:

    Operare i pazienti virtuali è una esperienza piuttosto fiqua

     

    Luminous Arc:

    uno dei gdr con la più bella ed emozionante (in tutti i sensi) storia che abbia mai giocato, veramente consigliato.

  6. Questo ? un insieme di tutorials fatti da RpgMakerMaster, un utente dell'asylum di dubealex, che io ho tradotto e postato qui, con il suo permesso

     

    Ridurre il Lag da Eventi

     

     

     

     

     

    Questa ? una guida no-script per una copy skill come FF7

     

    Crea il tuo personaggio

    Crea la tua Classe

    Crea la tua Skill (per scopi di tutorial) "Copia Heal"

    Crea un evento comune affine alla skill. Per convenienza chiamer? il mio "Copia Heal".

    Nel setup delle skill a "Copia Heal" imposta come evento comune richiamato quello appena creato

    Tornate ad eventi comuni e create una if che controlla se il pg ? nel gruppo

    >Conditional Branch: Hero [Char. Name] in the party

    >

    >Else

    >

    >End

     

    Dentro quella stessa if create una if che controlla se il pg ? morto

    >Conditional Branch: Hero [Char. Name] in the party

    >Conditional Branch: Hero [Char. Name] [death] status

    >

    ->Else

    >

    >

    >Else

    >

    >End

    >End

     

    A questo punto potete rendere tutto pi? realistico creando if di controllo per gli status del pg, ma per ragioni di tempo prenderemo una via pi? breve :rolleyes:

     

    Aggiungete una if che controlla se il pg pu? usare la skill

    >Conditional Branch: Hero [Char. Name] in the party

    >Conditional Branch: Hero [Char. Name] [death] status

    >

    ->Else

    >Conditional Branch: Hero [Char. Name] [skill] usable

    >

    >Else

    >

    >

    >End

    >End

    >End

     

     

    Lasciate l'esle attivato, e mettete nell'else il comando cambia skill.

    Aggiungete la skill che volete copiare

     

    Potete anche aggiungere un messaggio che segnala l'apprendimento della skill

     

    >Conditional Branch: Hero [Char. Name] in the party

    >Conditional Branch: Hero [Char, Name] [death] status

    >

    >Else

    >Conditional Branch: Hero [Char. Name] [skill] usable

    >

    >Else

    >Change Skills: [Char. Name], + [skill]

    >Message: name learned skill!

    >End

    >End

    >End

     

     

     

     

     

    Skills in base all'arma equipaggiata

     

     

     

     

     

    Create un nuovo evento chiamato PESCA

    Pu? essere fatto varie volte per diversi tipi di pesce

    Pagina 1:

    Il codice ? il seguente

     

    <>Conditional Branch: [Fishing Rod] possessed

    <>Variable: [001: Intelligence] = [Hero Name] intelligence

    <>Conditional Branch: Variable [oo1: Intelligence] = = 60

    <>Variable: [002: Fishing] = Random (0..20)

    <>Conditional Branch: Variable [002: Fishing] = = 20

    <>Wait 60 frames

    <>Play SE: ‘022-Dive02’, 75, 100

    <>Message: Hai pescato un Pesce!!

    <>Change Items: [*il pesce va qui*]+1

    <>

    Else Handler

    <>Wait: 60 frames

    <>Play SE: ‘022-Dive02’, 75, 100

    <>Message: E? Scappato

    <>Local Switch:[?] = ON

    <>

    : End

    <>

    Else Handler

    <>Message: Non so ancora come posso pescare

    <>

    : End

    <>

    Else Handler

    <>Message: Ci sono sicuramente un sacco di pesci qui.. devo provare a pescare

    <>

    : End

     

    Facile Eh?

     

     

     

     

    Ciclo Notte-Giorno Basilare

     

     

     

     

     

    1. Create una Skill chiamata Drain

    2. Create un evento comune

    3. Create due variabili (1. Drain Heal, 2.Drain Damage)

    4. Settate le variabili= Drain Heal, Random 200-100, Drain Damage, Random 100-200

    5. Tutti i nemici:[scegliere animazione d?attacco] tutti i nemici [scetgliere animazione di cura] Deal Damage: Tutti i nemici, Variabile Drain Damage

    Fai danno: Eroe Variabile Drain Heal

    6. Impostare come funzione della skill l?evento comune

     

     

     

     

    Skill in base al possedimento d'un oggetto

    <div style="margin:20px;margin-top:5px" "="">

     

     

     

     

    Questo tutorial ? molto simile a quello precedente. Ecco qui:

    Prima di tutto create un oggetto

     

    Chiameremo l?oggetto Sfera del Taglio

    Mettete icona descrizione eccetera.

     

    Andate a skill e create una skill che volete che si possa utilizzare solo con quel dato oggetto.

    Esempio Taglio

    Mettete le preferenze (danni o simili ecc) che volete.

     

    Andate ad eventi comuni e chiamate un evento Skills, in processo parallelo e che si attivi con uno switch che sia attivo praticamente sempre

     

    Alla prima mappa del progetto mettete un evento che attivi questo switch e se volete che si possono usare skills non mettetelo mai su OFF

     

    Ora andate all?evento comune e mettete il seguente codice

     

    Conditional Branch [Oggetto creato] in inventory

    @> Change Skills [Hero Name] + [skill name]

    @>

    else

    @> Change Skills [Hero Name] - [skill name]

    @>

    End Condition

     

     

    Cos? ogni qualvolta un pg ha un oggetto in inventario avr? la skill, se non l?ha la skill viene rimossa.

     

    Sperando che sia utile

     

     

     

    [06/05/2007] Aggiunti Pesca ad Eventi e Skills da Equipaggiamento

    [15/12/2007] Ebbene si... torno a postare su questo forum dopo tempo immemorabile. Grazie Kanta che chiacchierando mi ha fatto tornare voglia di far qualcosa. Due nuovi tutorials: Sistema di Drain e Giorno-Notte basilare

    [16/12/2007]Skills in base ad oggetti posseduti

    P.S. Notare che io ho solo tradotto, ci tengo a sottolinearlo; e ho il permesso di rpgmakermaster, l'autore

  7. Uau... è la prima volta che rispondo a un topic con potenzialità flame enorme come questo non subito, ma leggendo prima le opinioni degli altri.. strano ehXD?

     

    Comunque Lestat... strano ma vero a dirsi... per una volta sono d'accordissimo con te... hai avuto ragione su tutto il fronte o quasi...

     

    Inoltre dico anche un altra cosa... che non conta niente sbattersi tanto tempo su sto topic perchè havana se ne va... aho saranno pure cavoli suoi se la chitarra ha la precedenza sul making... le passioni vanno e vengono, e se ogni tanto nn si cambia si rischia di diventare pure monotoni :chirol_as:

     

    Inoltre credo di aver capito che Havana non è che abbandona la community per sempre bla bla bla, ma si dimette solo da mod perchè non può dedicarci tutto il tempo che dovrebbe e perchè è rimasto deluso dallo spreco del suo lavoro (vedi la grafica del sito...)

     

    In linea di massima credo che la teoria da applicare sia una: meno parole più giochi

  8. uhm carino si.... solo l'idea di usare i battler di naramura è un po' audace... in questo modo ti costringi ad usare solo una cerchia ristretta di mostri (quelli fatti da naramura) o rischiare di dare un cazzotto in faccia al giocatore usando per i mostri un altro stile.... uhm.... sennò potresti imparare a disegnare come naramura :D XD ma credo sia molto difficile XD

     

    cmq carino continua

  9. Nome Script

    Descrizione

    E' un menu... niente di che

    Autore

    Tibuda


    Istruzioni per l'uso

    Avete bisogno dell'SDK 2.2 e del Advanced Command Window di Tibuda, che fra poco posto. Mettetelo come sempre sopra a main.. credo che vada

     

    #============================================================================
    # ** Tibuda CMS
    #----------------------------------------------------------------------------
    # Tibuda
    # 1.00
    # 04.11.07
    # SDK Version : 2.20 full
    #============================================================================
    
    #------------------------------------------------------------------------------
    # * SDK Log Script
    #------------------------------------------------------------------------------
    SDK.log('Tibuda CMS 01', 'Tibuda', 1.00, '04.11.07')
    
    #--------------------------------------------------------------------------
    # SDK Requirement Check
    #--------------------------------------------------------------------------
    SDK.check_requirements(2.2, [1, 2, 3, 4], ['Map Info', 'Adv Command Window'])
    #--------------------------------------------------------------------------
    # Begin SDK Enabled Check : Tibuda CMS
    #--------------------------------------------------------------------------
    
    if SDK.enabled?('Tibuda CMS 01')
        #==============================================================================
        module CMS
            #--------------------------------------------------------------------------
            # 2: Bottom
            # 4: Left
            # 6: Right
            # 8: Top
            #--------------------------------------------------------------------------
            Position = 8
            #--------------------------------------------------------------------------
            #
            #--------------------------------------------------------------------------
            Data = {}
            if SDK.enabled?('Time System')
                Data['Time'] = proc { $game_time.time }
            else
                Data['Elapsed'] = proc { total_sec = Graphics.frame_count / Graphics.frame_rate
                sprintf("%02d:%02d", total_sec / 60 / 60, total_sec / 60 % 60) }
            end
            Data['Gold'] = proc { $game_party.gold }
            Data['Location'] = proc { $game_map.name }
            #--------------------------------------------------------------------------
        end
        #==============================================================================
        class Window_Base
            #----------------------------------------------------------------------------
            def clear_sprites
                if SDK.enabled?('Window Sprites')
                    while @window_sprites.size > 0
                    @window_sprites[0].dispose
                    @window_sprites.delete_at(0)
                end
                if SDK.enabled?('Animated Chars')
                    @actor_sprites.each { |id, sprite| @actor_sprites[id] = nil }
                end
                if SDK.enabled?('Animated Gradient Bars')
                    @hp_bar_sprites.each { |id, sprite| @hp_bar_sprites[id] = nil }
                    @sp_bar_sprites.each { |id, sprite| @sp_bar_sprites[id] = nil }
                    @exp_bar_sprites.each { |id, sprite| @exp_bar_sprites[id] = nil }
                end
            end
        end
        #----------------------------------------------------------------------------
        def draw_actor_battler(actor, x, y, opacity = 255, h = nil)
            bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
            return if bitmap.nil?
            src_rect = Rect.new(0, 0, bitmap.width, h.nil? ? bitmap.height : h)
            self.contents.blt(x, y, bitmap, src_rect, opacity)
        end
        #----------------------------------------------------------------------------
    end
    #==========================================================================
    class Window_Data < Window_Base
        #--------------------------------------------------------------------------
        def initialize(label, value)
            width, height = 160, 64
            if label == 'Location'
                if [2,8].include?(CMS::Position)
                    height += 32
                else
                    width += 96
                    label = ''
                end
            end
            super(0, 0, width, height)
            self.contents = Bitmap.new(width - 32, height - 32)
            @label = label
            @value = value
            refresh
        end
        #--------------------------------------------------------------------------
        def refresh
            self.contents.clear
            cx = [contents.text_size(@label).width, (width-32)/2].min
            self.contents.font.color = normal_color
            cx = 0 if height > 64
            @text = @value.call.to_s
            self.contents.draw_text(4+cx, height > 64 ? 32 : 0, width-40-cx, 32, @text, @label == '' ? 1 : 2)
            cx = width - 40 if height > 64
            self.contents.font.color = system_color
            self.contents.draw_text(4, 0, cx, 32, @label, 0)
        end
        #--------------------------------------------------------------------------
        def update
            super
            refresh unless @text == @value.call.to_s
        end
        #--------------------------------------------------------------------------
    end
    #==============================================================================
    class Window_Gold < Window_Data
        def initialize
            super($data_system.words.gold, proc { $game_party.gold })
        end
    end
    #==============================================================================
    class Game_Map
        def name
            $data_mapinfos[@map_id].name
        end
    end
    #==============================================================================
    class Window_MenuStatus
        #--------------------------------------------------------------------------
        def oh
            64
        end
        #--------------------------------------------------------------------------
        SDK.log_overwrite(:Window_MenuStatus, :initialize)
        def initialize
            super(0, 0, 480, 288)
            self.contents = Bitmap.new(width - 32, $game_party.actors.size * oh)
            refresh
            self.active = false
            self.index = -1
        end
        #--------------------------------------------------------------------------
        SDK.log_overwrite(:Window_MenuStatus, :refresh)
        def refresh
            self.contents.clear
            clear_sprites
            @item_max = $game_party.actors.size
            for i in 0...$game_party.actors.size
                x = 64
                y = i * oh
                actor = $game_party.actors[i]
                draw_actor_battler(actor, x, y, 128, oh)
                draw_actor_graphic(actor, x - 40, y + 60)
                draw_actor_level(actor, x + 144, y)
                draw_actor_name(actor, x, y)
                draw_actor_exp(actor, x, y + 32)
                draw_actor_hp(actor, x + 236, y)
                draw_actor_sp(actor, x + 236, y + 32)
            end
        end
        #--------------------------------------------------------------------------
        SDK.log_overwrite(:Window_MenuStatus, :update_cursor_rect)
        def update_cursor_rect
            super
        end
        #--------------------------------------------------------------------------
    end
    #==============================================================================
    class Window_Target < Window_Selectable
        #----------------------------------------------------------------------------
        def oh
            return 64
        end
        #----------------------------------------------------------------------------
        SDK.log_overwrite(:Window_Target, :initialize)
        def initialize
            super(0, 160, 320, 288)
            self.contents = Bitmap.new(width - 32, $game_party.actors.size * oh)
            @item_max = $game_party.actors.size
            @column_max = 1
            refresh
        end
        #----------------------------------------------------------------------------
        def actor
            return $game_party.actors[@index]
        end
        #----------------------------------------------------------------------------
        SDK.log_overwrite(:Window_Target, :refresh)
        def refresh
            self.contents.clear
            clear_sprites
            for i in 0...$game_party.actors.size
                x = 64
                y = i * oh
                actor = $game_party.actors[i]
                x = 64 + i % @column_max * self.width / @column_max
                y = i * oh / @column_max
                draw_actor_battler(actor, x, y, 128, oh)
                draw_actor_graphic(actor, x - 40, y + 60)
                draw_actor_name(actor, x - 16, y)
                draw_actor_level(actor, x - 16, y + 32)
                draw_actor_hp(actor, x + 80, y)
                draw_actor_sp(actor, x + 80, y + 32)
            end
        end
        #----------------------------------------------------------------------------
        SDK.log_overwrite(:Window_Target, :update_cursor_rect)
        def update_cursor_rect
            if self.index <= -2
                self.cursor_rect.set(0, (self.index + 10) * oh, self.width - 32, 96)
            elsif self.index == -1
                self.cursor_rect.set(-16, -16, self.width, self.height)
            else
                super
            end
        end
        #----------------------------------------------------------------------------
    end
    #==========================================================================
    class Window_Help
        #--------------------------------------------------------------------------
        SDK.log_overwrite(:Window_Help, :initialize)
        def initialize
            super(32, 0, 640-64, 64)
            self.contents = Bitmap.new(width - 32, height - 32)
        end
        #--------------------------------------------------------------------------
    end
    #==========================================================================
    class Scene_Menu
        #--------------------------------------------------------------------------
        SDK.log_overwrite(:Scene_Menu, :main_command_window)
        def main_command_window
            # Make command window
            if [8,2].include?(CMS::Position)
                width, height, column_max = 640, 96, 4
            else
                width, height, column_max = 160, 32*9, 1
            end
            commands = SDK::Scene_Commands::Scene_Menu::Commands.dup
            @command_window = Window_Command.new(width, commands, column_max)
            @command_window.index = $menu_index.is_a?(Numeric) ? $menu_index : 0
            @command_window.height = height
            @command_window.text_align = 0
            @command_window.icon_align = 0
            @command_window.x = [8,2,4].include?(CMS::Position) ? 0 : 640-160
            case CMS::Position
            when 2
                @command_window.y = 480 - 128
            when 4
                @command_window.y = 96
            when 6
                @command_window.y = 96
            when 8
                @command_window.y = 32
            end
        end
        #--------------------------------------------------------------------------
        SDK.log_overwrite(:Scene_Menu, :main_window)
        def main_window
            super
            # Make main command window
            main_command_window
            # Make help window
            if [4,6].include?(CMS::Position)
                @help_window = Window_Help.new
                @help_window.y = 32
                @command_window.help_window = @help_window
            end
            # Make status window
            @status_window = Window_MenuStatus.new
            @status_window.x = CMS::Position == 6 ? 0 : 160
            @status_window.y = @command_window.y
            if CMS::Position == 8
                @status_window.y += @command_window.height
            elsif CMS::Position == 2
                @status_window.y -= @status_window.height
            end
            # Make data windows
            i = 0
            @data_windows = []
            CMS::Data.each do |key, value|
                window = Window_Data.new(key, value)
                if [2,8].include?(CMS::Position)
                    window.x, window.y = 0, i + @status_window.y
                    i += window.height
                else
                    window.x, window.y = 32 + i, 480-96
                    i += window.width
                end
                @data_windows << window
            end
        end
        #--------------------------------------------------------------------------
    end
    #==========================================================================
    class Scene_Item
        #--------------------------------------------------------------------------
        alias_method :tibuda_cms_scnitem_main_window, :main_window
        def main_window
            tibuda_cms_scnitem_main_window
            @item_window.height -= 64
            @item_window.y += 32
            @help_window.y += 32 if @help_window.y >= 0
            if @group_window.is_a?(Window)
                @group_window.y += 32
                @group_window.x += 32
                @group_window.width -= 64
                @group_window.c_spacing = (@group_window.width - 32) / @group_window.commands.size
                @group_window.refresh
            end
            if @detail_window.is_a?(Window)
                @detail_window.y += 32
                @detail_window.height -= 64
            end
        end
        #--------------------------------------------------------------------------
    end
    #==========================================================================
    class Scene_Skill
        #--------------------------------------------------------------------------
        alias_method :tibuda_cms_scnskill_main_window, :main_window
        def main_window
            tibuda_cms_scnskill_main_window
            @skill_window.height -= 64
            @skill_window.y -= 32
            @status_window.y = 480 - 96
            @help_window.y += 32 if @help_window.y >= 0
            if @group_window.is_a?(Window)
                @group_window.y += 32
                @group_window.x += 32
                @group_window.width -= 64
                @group_window.c_spacing = (@group_window.width - 32) / @group_window.commands.size
                @group_window.refresh
            end
            if @detail_window.is_a?(Window)
                @detail_window.y -= 32
                @detail_window.height -= 64
            end
        end
        #--------------------------------------------------------------------------
    end
    #==========================================================================
    class Scene_Shop
        #--------------------------------------------------------------------------
        alias_method :tibuda_cms_scnshop_main_window, :main_window
        def main_window
            tibuda_cms_scnshop_main_window
            @buy_window.height -= 64
            @buy_window.y += 32
            @sell_window.height -= 64
            @sell_window.y += 32
            @status_window.height -= 64
            @status_window.y += 32
            @dummy_window.height -= 64
            @dummy_window.y += 32
            @number_window.height -= 64
            @number_window.y += 32
            @help_window.y += 32 if @help_window.y >= 0
            @command_window.y += 32
            @command_window.x += 32
            @command_window.width -= 64
            @command_window.c_spacing = (@command_window.width - 32) / @command_window.commands.size
            @command_window.refresh
            @gold_window.x -= 32
            @gold_window.y += 32
            if @detail_window.is_a?(Window)
                @detail_window.y += 32
                @detail_window.height -= 64
            end
        end
        #--------------------------------------------------------------------------
    end
    #==========================================================================
    class Scene_Equip
        #--------------------------------------------------------------------------
        alias_method :tibuda_cms_scnequip_main_window, :main_window
        def main_window
            tibuda_cms_scnequip_main_window
            if @detail_window.is_a?(Window)
                @detail_window.y += 32
                @detail_window.height -= 64
            end
            for i in 1..5
                eval("@item_window#{i}.height -= 64")
                eval("@item_window#{i}.y += 32")
            end
            @help_window.y += 32 if @help_window.y >= 0
            @left_window.height -= 64 if @item_window1.x > 0
            @left_window.y += 32
            @right_window.y += 32
        end
    end
    #==========================================================================
    class Scene_File
        #--------------------------------------------------------------------------
        def main_window
            super
            # Make help window
            @help_window = Window_Help.new
            @help_window.set_text(@help_text)
            @help_window.y = 64
            # Make save file window
            @savefile_windows = []
            for i in 0..2
                @savefile_windows << Window_SaveFile.new(i, make_filename(i))
            end
            @savefile_windows[@file_index].selected = true
            @party_window = Window_SaveParty.new
            @savefile_windows[@file_index].set_window(@party_window)
        end
        #--------------------------------------------------------------------------
        def update
            super
            # If C button was pressed
            if Input.trigger?(Input::C)
                # Call method: on_decision (defined by the subclasses)
                on_decision(make_filename(@file_index))
                $game_temp.last_file_index = @file_index
                return
            end
            # If B button was pressed
            if Input.trigger?(Input::B)
                # Call method: on_cancel (defined by the subclasses)
                on_cancel
                return
            end
            # If the down directional button was pressed
            if Input.repeat?(Input::DOWN)
                # If the down directional button pressed down is not a repeat,
                # or cursor position is more in front than 3
                if Input.trigger?(Input::DOWN) or @file_index < 3
                    # Play cursor SE
                    $game_system.se_play($data_system.cursor_se)
                    # Move cursor down
                    @savefile_windows[@file_index].selected = false
                    @file_index = (@file_index + 1) % 3
                    @savefile_windows[@file_index].selected = true
                    @savefile_windows[@file_index].set_window(@party_window)
                    return
                end
            end
            # If the up directional button was pressed
            if Input.repeat?(Input::UP)
                # If the up directional button pressed down is not a repeat?
                # or cursor position is more in back than 0
                if Input.trigger?(Input::UP) or @file_index > 0
                    # Play cursor SE
                    $game_system.se_play($data_system.cursor_se)
                    # Move cursor up
                    @savefile_windows[@file_index].selected = false
                    @file_index = (@file_index + 2) % 3
                    @savefile_windows[@file_index].selected = true
                    @savefile_windows[@file_index].set_window(@party_window)
                    return
                end
            end
        end
        #--------------------------------------------------------------------------
    end
    #==========================================================================
    class Window_SaveFile
        #--------------------------------------------------------------------------
        def initialize(file_index, filename)
            super(0, 128 + file_index % 4 * 96, 320, 96)
            self.contents = Bitmap.new(width - 32, height - 32)
            init_filename(file_index, filename)
            init_filedata(file_index)
            init_gamedata if @file_exist
            refresh
        end
        #--------------------------------------------------------------------------
        def init_gamedata
            begin
            file = File.open(@filename, "r")
            @time_stamp = file.mtime
            @characters = Marshal.load(file)
            @frame_count = Marshal.load(file)
            @game_system = Marshal.load(file)
            @game_switches = Marshal.load(file)
            @game_variables = Marshal.load(file)
            @game_sswitches = Marshal.load(file)
            @game_screen = Marshal.load(file)
            @game_actors = Marshal.load(file)
            @game_party = Marshal.load(file)
            @game_troop = Marshal.load(file)
            @game_map = Marshal.load(file)
            @total_sec = @frame_count / Graphics.frame_rate
            @file_bug = false
            file.close
            rescue
            @file_bug = true
        end
    end
    #--------------------------------------------------------------------------
    def refresh
        self.contents.clear
        # Draw file number
        self.contents.font.color = normal_color
        name = "Slot #{@file_index + 1}"
        self.contents.draw_text(4, 0, 600, 32, name)
        @name_width = contents.text_size(name).width
        # If save file exists
        if @file_exist
            unless @file_bug
                # Draw character
                x = (self.width.to_f) / 2 - @characters.size.to_f * 32.0
                for char in @characters
                    bitmap = RPG::Cache.character(char[0], char[1])
                    cw = bitmap.rect.width / 4
                    ch = bitmap.rect.height / 4
                    src_rect = Rect.new(0, 0, cw, ch)
                    # x -= cw.to_f / 2
                    self.contents.blt(x.to_i, 68 - ch, bitmap, src_rect, 128)
                    x += 64
                end
                self.contents.draw_text(4, 32, self.width - 40, 32, @game_map.name, 1)
            else
                self.contents.draw_text(4, 32, self.width - 40, 32, 'Corrupted', 1)
                @file_exist = false
            end
            # Draw timestamp
            self.contents.font.color = normal_color
            time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
            self.contents.draw_text(4, 0, self.width - 40, 32, time_string, 2)
        else
            self.contents.draw_text(4, 32, self.width - 40, 32, 'Empty', 1)
        end
    end
    #--------------------------------------------------------------------------
    def update_cursor_rect
        if @selected
            self.cursor_rect.set(-16, -16, width, height)
        else
            self.cursor_rect.empty
        end
    end
    #--------------------------------------------------------------------------
    def set_window(window)
        window.refresh(@game_party)
    end
    #--------------------------------------------------------------------------
    end
    #==============================================================================
    class Window_SaveParty < Window_Base
    #----------------------------------------------------------------------------
    def initialize
        super(320, 128, 320, 288)
        self.contents = Bitmap.new(width - 32, height - 32)
        refresh
    end
    #----------------------------------------------------------------------------
    def refresh(party = nil)
        self.contents.clear
        clear_sprites
        return if party.nil?
        for i in 0...party.actors.size
            x = 64
            y = i * 64
            actor = party.actors[i]
            draw_actor_battler(actor, x, y, 128, 64)
            draw_actor_graphic(actor, x - 40, y + 60)
            draw_actor_name(actor, x - 16, y)
            draw_actor_level(actor, x - 16, y + 32)
            draw_actor_hp(actor, x + 80, y)
            draw_actor_sp(actor, x + 80, y + 32)
        end
    end
    #----------------------------------------------------------------------------
    end
    #==========================================================================
    if SDK.enabled?('Trickster\'s Bestiary')
    #==========================================================================
    class Scene_Bestiary
        #----------------------------------------------------------------------------
        alias_method :tibuda_cms_scnbest_main_window, :main_window
        def main_window
            tibuda_cms_scnbest_main_window
            @command_window.height -= 64
            @command_window.y += 32
        end
        #----------------------------------------------------------------------------
    end
    #==========================================================================
    class Window_Bestiary
        #--------------------------------------------------------------------------
        SDK.log_overwrite(:Window_Bestiary, :initialize)
        def initialize
            # Call Window Base#initialize
            super(160, 32, 480, 480-64)
            # Setup Contents
            self.contents = Bitmap.new(width - 32, height - 32)
            # Set Shadow
            self.contents.font.shadow = true
            # Setup Instance Variables
            @battler = nil
            # Refresh Window
            refresh
        end
        #--------------------------------------------------------------------------
    end
    #==========================================================================
    end
    #==========================================================================
    if SDK.enabled?('Exseiken\'s Party Switcher')
    #==========================================================================
    class Scene_Switch
        #----------------------------------------------------------------------------
        alias_method :tibuda_cms_scnswitch_main_window, :main_window
        def main_window
            tibuda_cms_scnswitch_main_window
            @status_window.visible = false
            @help_window = Window_Help.new
            @help_window.y = 64
        end
        #----------------------------------------------------------------------------
        alias_method :tibuda_cms_scnswitch_update, :update
        def update
            tibuda_cms_scnswitch_update
            if @party_window.active
                @help_window.set_text('Who will you replace?')
            else
                if @party_window.actor.nil?
                    @help_window.set_text('Who will you add to your party?')
                else
                    @help_window.set_text("Who will replace #{@party_window.actor.name}?")
                end
            end
        end
        #----------------------------------------------------------------------------
    end
    #==========================================================================
    class Window_SwitchParty
        #----------------------------------------------------------------------------
        def oh
            return 64
        end
        #----------------------------------------------------------------------------
        SDK.log_overwrite(:Window_SwitchParty, :initialize)
        def initialize(max)
            # Call Window Selectable Initialize
            super(0, 128, 320, 288)
            # Setup Item Max
            @item_max = max.nil? ? Switch_Setup::Party_Max : max
            # Create Contents
            self.contents = Bitmap.new(width - 32, @item_max * oh)
            # Shallow Copy the party
            @new_party = $game_party.actors.clone
            # Set Index
            self.index = 0
            # Refresh
            refresh
            # Update the cursor rectangle
            update_cursor_rect
        end
        #----------------------------------------------------------------------------
        SDK.log_overwrite(:Window_SwitchParty, :refresh)
        def refresh
            clear_sprites
            # Clear the contents of the bitmap
            self.contents.clear
            # Draw each non-null party member
            @new_party.each_with_index do |actor, i|
                # Skip if actor is nil
                next if actor == nil
                x = 64 + i % @column_max * self.width / @column_max
                y = i * oh / @column_max
                draw_actor_graphic(actor, x - 40, y + 60)
                draw_actor_name(actor, x - 16, y)
                draw_actor_level(actor, x - 16, y + 32)
                draw_actor_hp(actor, x + 80, y)
                draw_actor_sp(actor, x + 80, y + 32)
                @actor_sprites[actor].animate = !actor.mandatory
                # Skip if actor is mandatory
                next unless actor.mandatory
                if SDK.enabled?('Animated Chars')
                    @actor_sprites[actor].tone = Tone.new(0,0,0,255)
                end
                # Set Color to Unswitchable Color
                # self.contents.font.color = Switch_Setup::Unswitchable_Color
                # Draw Unswitchable Text
                # self.contents.draw_text(0, y, 224, 32, Switch_Setup::Unswitchable_Text, 1)
            end
        end
        #----------------------------------------------------------------------------
        SDK.log_overwrite(:Window_SwitchParty, :update_cursor_rect)
        def update_cursor_rect
            super
        end
        #----------------------------------------------------------------------------
    end
    #==========================================================================
    class Window_SwitchReserve
        #----------------------------------------------------------------------------
        def oh
            return 64
        end
        #----------------------------------------------------------------------------
        SDK.log_overwrite(:Window_SwitchReserve, :initialize)
        def initialize
            # initialize the window and its contents
            super(320, 128, 320, 288)
            # Initialize Actor List
            @actor_list = []
            # Remove all actors that are unavailable
            (1...$data_actors.size).each do |actor_id|
                # Get Actor
                actor = $game_actors[actor_id]
                # Skip if actor is unavailable
                next if actor.unavailable or $game_party.actors.include?(actor)
                # Push Actor
                @actor_list << actor
            end
            # Set the maximum of characters the list can contain
            @item_max = @actor_list.size + $game_party.actors.size + 1
            # 2 columns
            @column_max = 1
            # Setup Contents
            self.contents = Bitmap.new(width - 32, row_max * oh)
            # Select the first item
            @index = 0
            # Set to Not Active
            self.active = false
            # Refresh
            refresh
            # Draw the cursor rectangle
            update_cursor_rect
        end
        #----------------------------------------------------------------------------
        SDK.log_overwrite(:Window_SwitchReserve, :refresh)
        def refresh
            if SDK.enabled?('Window Sprites')
                while @window_sprites.size > 0
                @window_sprites[0].dispose
                @window_sprites.delete_at(0)
            end
            if SDK.enabled?('Animated Chars')
                @actor_sprites.each { |id, sprite| @actor_sprites[id] = nil }
            end
            if SDK.enabled?('Animated Gradient Bars')
                @hp_bar_sprites.each { |id, sprite| @hp_bar_sprites[id] = nil }
                @sp_bar_sprites.each { |id, sprite| @sp_bar_sprites[id] = nil }
                @exp_bar_sprites.each { |id, sprite| @exp_bar_sprites[id] = nil }
            end
        end
        # Clear the contents of the bitmap
        self.contents.clear
        # Run Through Values with index
        @actor_list.each_with_index do |actor, i|
            # Skip if actor is nil
            next if actor == nil
            x = 64 + i % @column_max * self.width / @column_max
            y = i * oh / @column_max
            draw_actor_graphic(actor, x - 40, y + 60)
            draw_actor_name(actor, x - 16, y)
            draw_actor_level(actor, x - 16, y + 32)
            draw_actor_hp(actor, x + 80, y)
            draw_actor_sp(actor, x + 80, y + 32)
        end
    end
    #----------------------------------------------------------------------------
    SDK.log_overwrite(:Window_SwitchReserve, :update_cursor_rect)
    def update_cursor_rect
        if self.active
            super
        else
            self.cursor_rect.empty
        end
    end
    #----------------------------------------------------------------------------
    end
    #==========================================================================
    end
    #==========================================================================
    end
    #--------------------------------------------------------------------------
    # End SDK Enabled Test : Tibuda CMS
    #--------------------------------------------------------------------------
    

     

     

×
×
  • Create New...