Страница 125 из 190 ПерваяПервая ... 2575115123124125126127135175 ... ПоследняяПоследняя
Показано с 1,241 по 1,250 из 1899

Тема: Поиск скриптов

  1. #1241
    Маститый Аватар для Yuryol
    Информация о пользователе
    Регистрация
    06.03.2014
    Адрес
    Красноярск
    Сообщений
    1,420
    Записей в дневнике
    44
    Репутация: 60 Добавить или отнять репутацию

    По умолчанию

    на счет глупости - скажите это разрабам зельды
    про переключатели - для рядовых врагов так и сделал, но сейчас делаю босса, слишком много переключателей выходит, думал может есть другой способ,поудобнее.

  2. #1242
    Местный Аватар для Наблюдатель
    Информация о пользователе
    Регистрация
    01.01.2013
    Адрес
    Мрак
    Сообщений
    189
    Записей в дневнике
    25
    Репутация: 4 Добавить или отнять репутацию

    По умолчанию

    Просто переключатели в помощь
    А так может есть, но я не видел подобного.

  3. #1243

    По умолчанию Просьба найти Animated Battle Takkentai автора: Victor Sant или помочь у Jet

    Я искал в поисковике, не мог найти. Были битые ссылки.
    Я использую пока что Battle Animations от Jet.
    Единственное, что меня не устраивает в нём, это нет возможности сделать персонажа или врага дальнего боя.
    Если не сможете найти, помогите в этом сделать дальний бой. Вот скрипт
    Спойлер Код:
    Код:
    #===============================================================================
    # Animated Battlers
    # By Jet10985 (Jet)
    #===============================================================================
    # This script will allow the use of spritesheets to represent enemies and actors
    # inside the battle scene.
    # This script has: 14 customization options.
    #===============================================================================
    # Overwritten Methods:
    # None
    #-------------------------------------------------------------------------------
    # Aliased methods:
    # Cache: load_bitmap
    # Game_Battler: initialize, on_damage
    # BattleManager: process_victory, process_defeat, battle_start
    # Sprite_Battler: initialize, update, update_origin, start_effect,
    #   revert_to_normal
    # Sprite: update
    #===============================================================================
    =begin
    If you need to set up a custom animated sprite for a specific actor or enemy,
    you need to use these inside the character's notebox:
    
    <anim battler: name> (This sets the name of the animated spritesheet to use)
    
    The above is the only needed notetag to use a custom spritesheet, but if you
    need to go against default configuration below as well, you may use these:
    
    <anim speed: speed> (This sets the speed at which the animation changes frames)
    <anim frames: frames> (This sets how many frames there are in a single row)
    <anim rows: rows> (This sets how many rows there are in the spritesheet)
    --------------------------------------------------------------------------------
    Byd efault, all states except being dead will set the row to be the one
    set for :state, but if you need a state which does not change the current row,
    use this in the state's notebox:
    
    <anim no pose>
    --------------------------------------------------------------------------------
    To have an enemy follow the opposite of the below FLIP_ENEMIES config, use this
    notetag:
    
    <anim flip>
    
    Putting this in an actor's notebox will always cause the actor's sprite to be
    flipped.
    --------------------------------------------------------------------------------
    You can change an enemy's attack animation by using this notetag:
    
    <atk anim: id>
    --------------------------------------------------------------------------------
    If you need to have a special sheet for when the character is a specific class,
    use this tag in the class notebox:
    
    <anim suffix: suffix>
    
    This will make the script look for whatever their default sheet would be,
    but with suffix at the end. So if the tag was <anim suffix: _paladin> and the
    base sheet was "Jimmy", the script would look for "Jimmy_paladin"
    --------------------------------------------------------------------------------
    If you need to have a specific row for when the character has a specific state,
    use this tag in the state notebox:
    
    <anim row: row>
    
    This will make it so if this state is inflicted, the character's row will be
    that of whatever the row is in the notetag.
    If multiple states have a notetag, and are inflicted, the state with the highest
    "Display Priority" will be used.
    --------------------------------------------------------------------------------
    By default, this is what the POSE_ROWS configuration correlates to in choosing
    which row of the spritesheet to show. This uses a format which Holder uses in
    their animated battlers by default, and this is taken directly from them:
    
    1. Idle - Waiting.
    2. Defend - Guarding.
    3. Woozy - Under status effect. (Also low hp value)
    4. Struck - Being hit. (Taking damage)
    5. Attack - Striking the target.
    6. Item - Using an item.
    7. Skill - Using a technique.
    8. Magic - Casting a spell.
    9. Advance - Moving forward.
    10. Retreat - Moving away. (From target or fleeing from battle)
    11. Victory - Battle end.
    12. Enter - Battle start.
    13. Dead - Corpse. (Dead-dood-ded)
    14. Credits - Information about the graphic. (Not shown in game)
    =end
    
    module Jet
      module AnimatedBattlers
        
        # This is how many rows on poses there are in a default spritesheet.
        # The height of each row is determined by dividing the animation
        # bitmap height by this.
        ANIMATION_ROWS = 14
        
        # This is how many frames are in a row/pose.
        # This width of each frame is determined by dividing the animation
        # bitmap width by this.
        ANIMATION_FRAMES = 4
        
        # This is how long it takes in frames to change which frame is displayed
        # on the current pose.
        ANIMATION_SPEED = 10
        
        # This is the suffix added to the character's name to try to find a default
        # animated spritesheet. If an enemy's name was "Slime", this script will
        # first scan the note for a specific spritesheet, and if it does not find
        # it, this script will then search for a file by the enemy's name combined
        # with this suffix. If the suffix was "_animated", it'd look for 
        # "Sline_animated"
        ANIM_SUFFIX = "_animated"
        
        # Do you want to flip enemy's spritesheets by default?
        FLIP_ENEMIES = true
        
        # Don't touch.
        PLAYER_SPOTS = []
        
        # This is where an actor's battler is displayed on the screen.
        # You can add one for each actor by following this format:
        # PLAYER_SPOTS[party_index] = [x, y]
        PLAYER_SPOTS[0] = [400, 150]
        PLAYER_SPOTS[1] = [400, 120]
        PLAYER_SPOTS[2] = [355, 130]
        PLAYER_SPOTS[3] = [375, 150]
        
        # Do you want the battlers to move to the target when attacking?
        MOVE_TO_TARGET = true
        
        # This is the amount of time it takes to move an animated battler to their
        # target during a physical attack. This is in seconds.
        TIME_TO_MOVE = 0.5
        
        # This is a switch to turn animated battlers off and to revert to normal.
        TURN_OFF = 0
        
        # This is the percent of hp a battler's current hp has to be below to be
        # considered "critical condition"
        CRIT_PERC = 25
        
        # What is an enemy's default attack animation id?
        ENEMY_DEF_ANIM = 1
        
        # This is the harder config, fair warning.
        # By default, these options work with Holder's animated battlers.
        # These are used to determine which condition goes to which row on
        # the sheet.
        # :symbol => row_id
        POSE_ROWS = {
        
          :idle => 0,
          :guard => 1,
          :state => 2,
          :damage => 3,
          :attack => 4,
          :item => 5,
          :skill => 6,
          :magic => 7,
          :advance => 8,
          :retreat => 9,
          :victory => 10,
          :begin => 11,
          :dead => 12,
          :credits => 13
        
        }
        
        #---------------------------------------------------------------------------
        # This is the most difficult and optional config.
        # You may set specific amounts of frames, and speed for each row of
        # specific spritesheets.
        # "SheetName" => {row_index => [frames, speed], next_row => [frames, speed]}
        # row_index is which row you're configuring
        # frames is how many frames there are on this row
        # speed if how long it takes to make from one frame to the other.
        #---------------------------------------------------------------------------
        ROW_CONFIG = {
        
          "ExampleSheet" => {
            0 => [14, 10],
            1 => [7, 10]
          },
          "ExampleSheet_paladin" => {
            8 => [27, 20],
            9 => [3, 5]
          }
        }
        
        # This is the default for rows for every sheet if you need to change them.
        # It follows the format of the second hash in the above config.
        # row_index => [frames, speed]
        ROW_HASHES = {}
        
        # Don't touch these.
        ROW_HASHES.default = [ANIMATION_FRAMES, ANIMATION_SPEED]
        ROW_CONFIG.default = ROW_HASHES
        
      end
    end
    
    #===============================================================================
    # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
    #===============================================================================
    
    ($imported ||= {})[:jet] ||= {}
    $imported[:jet][:AnimatedBattlers] = true
    
    class Game_Actor
      
      def screen_x
        Jet::AnimatedBattlers::PLAYER_SPOTS[self.index][0] rescue 0
      end
      
      def screen_y
        Jet::AnimatedBattlers::PLAYER_SPOTS[self.index][1] rescue 0
      end
      
      def screen_z
        100
      end
      
      def battler_name
        self.actor.name
      end
    end
    
    class Game_Enemy
      
      def atk_animation_id1
        begin
          self.enemy.note.match(/<atk[ ]*anim[ ]*(\:|=)[ ]*(\d+)/i)[2]
        rescue
          Jet::AnimatedBattlers::ENEMY_DEF_ANIM
        end
      end
      
      def atk_animation_id2
        0
      end
    end
    
    class << Cache
      
      alias jet3746_load_bitmap load_bitmap
      def load_bitmap(*args, &block)
        (jet3746_load_bitmap(*args, &block)).dup
      end
    end
    
    class Game_Battler
      
      attr_accessor :animation_row
      attr_accessor :animation_delay
      
      alias jet1824_initialize initialize
      def initialize(*args, &block)
        @animation_row = Jet::AnimatedBattlers::POSE_ROWS[:idle]
        @animation_delay = 0
        jet1824_initialize(*args, &block)
      end
      
      def animated?
        false
      end
      
      def full_frame_time
        self.animation_frames * self.animation_speed
      end
      
      alias jet3745_on_damage on_damage
      def on_damage(*args, &block)
        jet3745_on_damage(*args, &block)
        if !dead?
          @animation_row = guard? ? @animation_row : Jet::AnimatedBattlers::POSE_ROWS[:damage]
          @animation_delay = self.full_frame_time
        end
      end
      
      def pose_state?
        states.each {|a|
          return true unless a.id == 1 || !(a.note =~ /<anim[ ]*no[ ]*pose>/i).nil?
        }
        return true if self.mhp / self.hp.to_f >= Jet::AnimatedBattlers::CRIT_PERC
        return false
      end
      
      def state_row
        sort_states
        states.each {|a|
          if !(a.note =~ /<anim[ ]*row[ ]*(\:|=)[ ]*(\d+)>/i).nil?
            return $2.to_i
          end
        }
        return Jet::AnimatedBattlers::POSE_ROWS[:state]
      end
      
      def battle_sprite
        return nil unless SceneManager.scene_is?(Scene_Battle)
        SceneManager.scene.spriteset.battler_sprites.each {|a|
          return a if a.battler == self
        }
        return nil
      end
      
      def anim_reset
        @animation_row = Jet::AnimatedBattlers::POSE_ROWS[:idle]
        @animation_delay = 0
        @animated = nil
        @anim_rows = nil
        @anim_speed = nil
        @anim_frames = nil
        @anim_bitmap = nil
      end
    end
    
    class << BattleManager
      
      alias jet8335_battle_start battle_start
      def battle_start(*args, &block)
        ($game_party.alive_members + $game_troop.alive_members).each {|a|
          a.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:begin]
          a.animation_delay = a.full_frame_time
        }
        jet8335_battle_start(*args, &block)
      end
      
      alias jet2834_process_victory process_victory
      def process_victory(*args, &block)
        $game_party.alive_members.each {|a|
          a.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:victory]
          a.animation_delay = -1
        }
        jet2834_process_victory(*args, &block)
      end
      
      alias jet3745_process_defeat process_defeat
      def process_defeat(*args, &block)
        $game_troop.alive_members.each {|a|
          a.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:victory]
          a.animation_delay = -1
        }
        jet3745_process_defeat(*args, &block)
      end
    end
    
    %w[enemy actor].each {|a|
      aStr = %Q{
    
        class Game_#{a.capitalize}
          
          def animated?
            @animated ||= (
            note = !(/<anim[ ]*battler[ ]*(\\:|=)[ ]*(.+)>/i =~ #{a}.note).nil?
            name = self.battler_name + Jet::AnimatedBattlers::ANIM_SUFFIX
            graph = (!Cache.battler(name, self.battler_hue).nil? rescue false)
            note || graph)
          end
          
          def animation_rows
            @anim_rows ||= (
            if /<anim[ ]*rows[ ]*(\\:|=)[ ]*(\\d+)/i =~ #{a}.note
              $2.to_i
            else
              Jet::AnimatedBattlers::ANIMATION_ROWS
            end)
          end
          
          def animation_speed
            @anim_speed ||= (
            if /<anim[ ]*speed[ ]*(\\:|=)[ ]*(\\d+)/i =~ #{a}.note
              $2.to_i
            else
              Jet::AnimatedBattlers::ROW_CONFIG[self.animation_bitmap][@animation_row][1]
            end)
          end
          
          def animation_frames
            @anim_frames ||= (
            if /<anim[ ]*frames[ ]*(\\:|=)[ ]*(\\d+)/i =~ #{a}.note
              $2.to_i
            else
              Jet::AnimatedBattlers::ROW_CONFIG[self.animation_bitmap][@animation_row][0]
            end)
          end
          
          def animation_bitmap_name
            @anim_bitmap ||= (
            begin
              self.#{a}.note.match(/<anim[ ]*battler[ ]*(\\:|=)[ ]*(.+)>/i)[2]
            rescue
              self.battler_name + Jet::AnimatedBattlers::ANIM_SUFFIX
            end)
          end
          
          def animation_bitmap
            actor_bitmap = self.animation_bitmap_name
            #{ 
              if a == "actor"
                "class_suffix = (self.class.note.match(
                  /<anim[ ]*suffix[ ]*(\:|=)[ ]*(.+)>/i)[2] rescue '')"
              else
                "class_suffix = ''"
              end
            }
            actor_bitmap + (class_suffix || "")
          end
        end
      }
      eval(aStr)
    }
    
    class Sprite_Battler
      
      attr_reader :animated
      attr_accessor :anim_pause
      
      alias jet2734_initialize initialize
      def initialize(viewport, battler = nil)
        @animated = (!battler.nil? && battler.animated?) ? true : false
        jet2734_initialize(viewport, battler)
      end
      
      def battler=(new_battler)
        @animated = (!new_battler.nil? && new_battler.animated?) ? true : false
        @battler = new_battler
      end
      
      alias jet8234_update update
      def update(*args, &block)
        @animated = (!@battler.nil? && @battler.animated?) ? true : false
        @animated = false if $game_switches[Jet::AnimatedBattlers::TURN_OFF]
        @animated ? (super; animated_update) : jet8234_update(*args, &block)
      end
      
      def animated_update
        if @old_battler != @battler
          self.bitmap = Cache.battler(@battler.animation_bitmap, @battler.battler_hue)
          @old_battler = @battler
          @use_sprite = true
          init_visibility
          if @battler.enemy?
            self.mirror = Jet::AnimatedBattlers::FLIP_ENEMIES
            if /<anim[ ]*flip>/i =~ @battler.enemy.note
              self.mirror = !self.mirror
            end
          elsif @battler.actor?
            self.mirror = !(/<anim[ ]*flip>/i =~ @battler.actor.note).nil?
          end
        end
        #------------------------
        update_origin
        update_position unless @in_anim_move
        setup_new_effect
        setup_new_animation
        update_effect
        update_battler_pose
        #------------------------
        width = self.bitmap.width
        height = self.bitmap.height
        if @anim_row != @battler.animation_row
          @anim_frame = 0
          @frame_count = 0
        end
        @anim_row = @battler.animation_row
        width = self.bitmap.width / @battler.animation_frames
        height = self.bitmap.height / @battler.animation_rows
        x = @anim_frame * width
        y = @battler.animation_row * height
        self.src_rect.set(x, y, width, height)
        @frame_count += 1
        @anim_pause ||= false
        if @frame_count >= @battler.animation_speed
          @anim_frame += 1
          @frame_count = 0
          if @anim_frame >= @battler.animation_frames
            @anim_frame = @anim_pause ? (@battler.animation_frames - 1) : 0
          end
        end
      end
      
      def update_battler_pose
        if @battler.animation_delay == -1
          return
        end
        if @battler.animation_delay > 0
          @battler.animation_delay -= 1
          return
        end
        if @battler.dead?
          @battler.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:dead]
        elsif @battler.guard?
          @battler.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:guard]
        elsif @battler.pose_state?
          @battler.animation_row = @battler.state_row
        else
          @battler.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:idle]
        end
      end
      
      alias jet7345_update_origin update_origin
      def update_origin(*args, &block)
        if @animated
          self.ox = @battler.enemy? ? self.src_rect.width / 2 : 0
          self.oy = @battler.enemy? ? self.src_rect.height / 2 : 0
        else
          jet7345_update_origin(*args, &block)
        end
      end
      
      alias jet2734_revert_to_normal revert_to_normal
      def revert_to_normal(*args, &block)
        jet2734_revert_to_normal(*args, &block)
        if @animated
          self.ox = @battler.enemy? ? self.src_rect.width / 2 : 0
          self.oy = @battler.enemy? ? self.src_rect.height / 2 : 0
        end
      end
      
      alias jet8344_start_effect start_effect
      def start_effect(effect)
        return if effect == :collapse && @animated
        jet8344_start_effect(effect)
      end
      
      def anim_move_to(target)
        self.z = 101
        return unless Jet::AnimatedBattlers::MOVE_TO_TARGET
        min_x = target.x - target.src_rect.width / 2 + self.src_rect.width / 2
        min_x -= self.src_rect.width / 3
        max_x = target.x + target.src_rect.width / 2 - self.src_rect.width / 2
        max_x += self.src_rect.width / 3
        @orig_x ||= self.x
        @orig_y ||= self.y
        if self.x > min_x && @orig_x > min_x
          x = min_x
        elsif self.x < max_x && @orig_x < min_x
          x = max_x
        else
          x = self.x
        end
        if self.y > target.y + target.src_rect.height / 2
          y = target.y + target.src_rect.height / 2
        elsif self.y < target.y - target.src_rect.height / 2
          y = target.y - target.src_rect.height / 2
        else
          y = self.y
        end
        if x > self.x
          @battler.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:retreat]
        else
          @battler.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:advance]
        end
        @battler.animation_delay = -1
        @in_anim_move = true
        do_tween(x, y, Tween::Linear, Jet::AnimatedBattlers::TIME_TO_MOVE)
        until @tween.nil?
          [SceneManager.scene.spriteset, Graphics].each {|a| a.update }
        end
      end
      
      def anim_return
        self.z = 100
        return unless Jet::AnimatedBattlers::MOVE_TO_TARGET
        @orig_x = nil
        @orig_y = nil
        x = @battler.screen_x
        y = @battler.screen_y
        if x >= self.x
          @battler.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:retreat]
        else
          @battler.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:advance]
        end
        @battler.animation_delay = -1
        do_tween(x, y, Tween::Linear, Jet::AnimatedBattlers::TIME_TO_MOVE)
        until @tween.nil?
          [SceneManager.scene.spriteset, Graphics].each {|a| a.update }
        end
        @in_anim_move = false
        @battler.animation_delay = 0
      end
    end
    
    class Scene_Battle
      
      attr_reader :spriteset
      
      alias jet3845_show_normal_animation show_normal_animation
      def show_normal_animation(targets, animation_id, mirror = false)
        if !$game_switches[Jet::AnimatedBattlers::TURN_OFF]
          animation = $data_animations[animation_id]
          if animation
            did_to_screen = false
            targets.each do |target|
              next if did_to_screen
              @subject.animation_delay = 0
              @subject.battle_sprite.anim_pause = false
              obj = @subject.current_action.item
              if @subject.battle_sprite.animated
                if obj.physical?
                  @subject.battle_sprite.anim_move_to(target.battle_sprite)
                end
              end
              target.animation_id = animation_id
              target.animation_mirror = mirror
              did_to_screen = animation.to_screen?
              case obj
              when RPG::Item
                @subject.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:item]
              when RPG::Skill
                if obj.id == @subject.attack_skill_id
                  @subject.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:attack]
                elsif obj.magical?
                  @subject.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:magic]
                elsif obj.id != @subject.guard_skill_id
                  @subject.animation_row = Jet::AnimatedBattlers::POSE_ROWS[:skill]
                end
              end
              @subject.animation_delay = -1
              @subject.battle_sprite.anim_pause = true
              abs_wait_short unless animation.to_screen?
            end
            abs_wait_short if animation.to_screen?
          end
        else
          jet3845_show_normal_animation(*args, &block)
        end
      end
      
      alias jet3745_terminate terminate
      def terminate(*args, &block)
        jet3745_terminate(*args, &block)
        $game_party.members.each {|a| a.anim_reset }
      end
      
      alias jet3434_use_item use_item
      def use_item(*args, &block)
        jet3434_use_item(*args, &block)
        @subject.animation_delay = 0
        @subject.battle_sprite.anim_pause = false
        if @subject.battle_sprite.animated
          if @subject.current_action.item.physical?
            @subject.battle_sprite.anim_return
          end
        end
      end
      
      alias jet3345_show_attack_animation show_attack_animation
      def show_attack_animation(targets)
        if !$game_switches[Jet::AnimatedBattlers::TURN_OFF]
          show_normal_animation(targets, @subject.atk_animation_id1, false)
          show_normal_animation(targets, @subject.atk_animation_id2, true)
        else
          jet3345_show_attack_animation(*args, &block)
        end
      end
    end
    
    class Sprite
      
      attr_reader :tween
      
      def calculate_delta
        @this_frame = Time.now
        @delta = ((@this_frame - @last_frame) * 1000.0).to_i / 1000.0
        @last_frame = @this_frame
      end
      
      def do_tween(new_x, new_y, style = Tween::Linear, time = 1)
        @last_frame = Time.now
        @tween = Tween.new([self.x.to_f, self.y.to_f], [new_x.to_f, new_y.to_f],
          style, time)
      end
      
      alias jet2724_update update unless $@
      def update(*args, &block)
        jet2724_update(*args, &block)
        if !@tween.nil?
          calculate_delta
          @tween.update(@delta)
          self.x, self.y = @tween.x, @tween.y
          @tween = nil if @tween.done
        end
      end
    end
        
    class Tween
      attr_reader :done
      attr_reader :easer
      
      def initialize(start, finish, easer, duration)
        @start, @finish = start, finish
        @easer, @duration = easer, duration
        unless @start.is_a? Enumerable
          @start = [@start]
        end
        unless @finish.is_a? Enumerable
          @finish = [@finish]
        end
        @time = 0
        @done = false
      end
      
      def update(delta)
        @time += delta
        if @time > @duration
          @time = @duration
          @done = true
        end
      end
      
      def [](idx)
        @easer.ease(
          @time,
          @start[idx],
          (@finish[idx] - @start[idx]),
          @duration
        )
      end
      
      def value; self[0]; end
      def x; self[0]; end
      def y; self[1]; end
      def z; self[2]; end
      
      module Linear
        def self.ease(t, st, ch, d)
          ch * t / d + st
        end
      end
    end]
    Последний раз редактировалось Arnon; 24.06.2014 в 19:41.

  4. #1244

    По умолчанию

    HAKCA, на сайте Виктора в новостях даны ссылки.

    https://drive.google.com/folderview?...p=sharing#list


    Dropbox — бесплатное хранилище файлов с прямыми ссылками.

    Humble Bundle — игры, подборки и наборы со скидками.

  5. #1245

    По умолчанию

    ребятушки! помогите настроить скриптик! ну или состряпойте демку! а я с этой демкой уж разберусь)))))) http://yanflychannel.wordpress.com/r...-combo-skills/

  6. #1246

    По умолчанию

    люди добрые! (если таковые имеются) помогите настроить скриптики! проект встал намертво из за нехватки знания инглиша! я на грани нервного срыва! ай нид хелп)

  7. #1247
    Познающий Аватар для JackCL
    Информация о пользователе
    Регистрация
    27.07.2013
    Адрес
    Дальний Восток
    Сообщений
    554
    Записей в дневнике
    85
    Репутация: 30 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от GVIDO Посмотреть сообщение
    люди добрые! (если таковые имеются) помогите настроить скриптики! проект встал намертво из за нехватки знания инглиша! я на грани нервного срыва! ай нид хелп)
    Там все просто.
    В notes к скиллу (назовем его №1) прописываешь строчку вида
    Код:
    <combo skill L: x>
    , где x - ID скилла (назовем его №2), который сработает после №1 если игрок успеет нажать условную кнопку L.

    Кнопка L именно условная, потому что соответствия прописываются в разделе - Combo Skill Text - скрипта (строчки 116-137). В данном случае L соответствует кнопка Q на клавиатуре.

    Также возможно использовать не-однокнопочные комбо используя в notes строчку вида
    Код:
    <combo special string: x>
    , где string - это комбинация задействованных кнопок, например, LLZ - это два нажания на Q, затем одно нажатие на D.

    В строчке 100 скрипта
    Код:
    MINIMUM_TIME = 90
    задается время (во фреймах) отведенное игроку на активацию комбо.

    В строчке 106
    Код:
    TIME_PER_INPUT = 30
    задается время (во фреймах) добавляемое бонусом к основному после каждого нажатия верной кнопки. То есть если у тебя например трехкнопочное комбо, то на нажатие первой кнопки у игрока будет 90 фреймов, после нажатия первой кнопки к ним добавиться еще 30, после нажатия второй - еще 30 и т.д.

    В строчке 111
    Код:
    DEFAULT_MAX_INPUT = 5
    задается количество возможных активаций скилла по умолчанию. То есть если игрок успеет набрать нужную комбинацию пять раз, то комбо-скилл будет выполнен целых пять раз подряд (уберчит для комбо с небольшим количеством клавиш).

    Отдельно для каждого скилла этот параметр можно изменить прописав в notes строчку
    Код:
    <combo max: x>
    , где X - макс количество срабатываний комбо.

    Наконец, есть нотетаг
    Код:
    <combo only>
    , который запрещает использование скилла из меню, делая его исключетельно комбовым.

    Ну и наконец, нужно знать, что комбо-скилл будет исполнен даже если персонаж не знает такого скилла, учить его персонажу не обязательно, лишь бы игрок шустро на кнопки нажимал. С другой стороны комбо-скиллы едят MP и TP так же, как и обычные, так что если у игрока будет недостаточно ресурсов, то активировать комбу ему не удасться.

    Еще вопросы есть?

    update.

    Немного неправильно перевел. <combo special string: x> на самом деле срабатывают после применения обычных <combo skill L: x> в зависимости от их комбинации.
    Последний раз редактировалось JackCL; 31.07.2014 в 01:43. Причина: поправка



  8. #1248
    Авторитет Аватар для Hosse
    Информация о пользователе
    Регистрация
    23.03.2010
    Адрес
    Королёв
    Сообщений
    1,603
    Записей в дневнике
    54
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию Проблемы со скриптами

    Может, я слепой, но подобной общей темы не нашёл, за сим - вот она

    И сразу к делу.

    VX Ace, скрипт Yanfly Engine Ace - Victory Aftermath v1.03.

    Работал как часы. Но вот, я купил себе ноут, и на нём он вылетает О_о (ничего в скрипте не менял, да и вообще не менял ничего такого, что могло бы вызвать проблему.

    Вот сам скрипт
    Код:
    #==============================================================================
    # 
    # ▼ Yanfly Engine Ace - Victory Aftermath v1.03
    # -- Last Updated: 2012.01.07
    # -- Level: Easy, Normal, Hard
    # -- Requires: n/a
    # 
    #==============================================================================
    
    $imported = {} if $imported.nil?
    $imported["YEA-VictoryAftermath"] = true
    
    #==============================================================================
    # ▼ Updates
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # 2012.01.07 - Compatibility Update: JP Manager
    # 2012.01.01 - Bug Fixed: Quote tags were mislabeled.
    # 2011.12.26 - Compatibility Update: Command Autobattle
    # 2011.12.16 - Started Script and Finished.
    # 
    #==============================================================================
    # ▼ Introduction
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # At the end of each battle, RPG Maker VX Ace by default shows text saying that
    # the party has gained so-and-so EXP while this person leveled up and your
    # party happened to find these drops. This script changes that text into
    # something more visual for your players to see. Active battle members will be
    # seen gaining EXP, any kind of level up changes, and a list of the items
    # obtained through drops.
    # 
    #==============================================================================
    # ▼ Instructions
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # To install this script, open up your script editor and copy/paste this script
    # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
    # 
    # -----------------------------------------------------------------------------
    # Actor Notetags - These notetags go in the actors notebox in the database.
    # -----------------------------------------------------------------------------
    # <win quotes>
    #  string
    #  string
    # </win quotes>
    # Sets the win quote for the actor. The strings are continuous and can use
    # text codes. Use \n for a line break. Type in what you want the actor to say
    # for the particular win quote. Use [New Quote] in between the two tags to
    # start up a new quote.
    # 
    # <level quotes>
    #  string
    #  string
    # </level quotes>
    # Sets the level up quote for the actor. The strings are continuous and can use
    # text codes. Use \n for a line break. Type in what you want the actor to say
    # for the particular win quote. Use [New Quote] in between the two tags to
    # start up a new quote.
    # 
    # <drops quotes>
    #  string
    #  string
    # </drops quotes>
    # Sets the drops quote for the actor. The strings are continuous and can use
    # text codes. Use \n for a line break. Type in what you want the actor to say
    # for the particular win quote. Use [New Quote] in between the two tags to
    # start up a new quote.
    # 
    # -----------------------------------------------------------------------------
    # Class Notetags - These notetags go in the class notebox in the database.
    # -----------------------------------------------------------------------------
    # <win quotes>
    #  string
    #  string
    # </win quotes>
    # Sets the win quote for the class. The strings are continuous and can use
    # text codes. Use \n for a line break. Type in what you want the actor to say
    # for the particular win quote. Use [New Quote] in between the two tags to
    # start up a new quote.
    # 
    # <level quotes>
    #  string
    #  string
    # </level quotes>
    # Sets the level up quote for the class. The strings are continuous and can use
    # text codes. Use \n for a line break. Type in what you want the actor to say
    # for the particular win quote. Use [New Quote] in between the two tags to
    # start up a new quote.
    # 
    # <drops quotes>
    #  string
    #  string
    # </drops quotes>
    # Sets the drops quote for the class. The strings are continuous and can use
    # text codes. Use \n for a line break. Type in what you want the actor to say
    # for the particular win quote. Use [New Quote] in between the two tags to
    # start up a new quote.
    # 
    #==============================================================================
    # ▼ Compatibility
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
    # it will run with RPG Maker VX without adjusting.
    # 
    #==============================================================================
    
    module YEA
      module VICTORY_AFTERMATH
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - General Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # These are various settings that are used throughout the Victory Aftermath
        # portion of a battle. Adjust them as you see fit.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        VICTORY_BGM  = RPG::BGM.new("2-12 Victory Theme", 100, 100)    # Victory BGM
        VICTORY_TICK = RPG::SE.new("NFF-Switchy-03", 100, 150)  # EXP ticking SFX
        LEVEL_SOUND  = RPG::SE.new("Up4", 80, 150)         # Level Up SFX
        SKILLS_TEXT  = "New Skills"                        # New skills text title.
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Important Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # These are some important settings so please set them up properly. This
        # section includes a switch that allows you to skip the victory aftermath
        # phase (for those back to back battles and making them seamless) and it
        # also allows you to declare a common event to run after each battle. If
        # you do not wish to use either of these features, set them to 0. The
        # common event will run regardless of win or escape.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        SKIP_AFTERMATH_SWITCH  = 0  # If switch on, skip aftermath. 0 to disable.
        SKIP_MUSIC_SWITCH      = 0  # If switch on, skip music. 0 to disable.
        AFTERMATH_COMMON_EVENT = 0  # Runs common event after battle. 0 to disable.
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Top Text Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # Here, you can adjust the various text that appears in the window that
        # appears at the top of the screen.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        TOP_TEAM         = "%и его команда"           # Team name used.
        TOP_VICTORY_TEXT = "%побеждает!"   # Text used to display victory.
        TOP_LEVEL_UP     = "%повышает свой уровень!"  # Text used to display level up.
        TOP_SPOILS       = "Victory Spoils!"     # Text used for spoils.
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - EXP Gauge Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # Adjust how the EXP Gauge appears for the Victory Aftermath here. This
        # includes the text display, the font size, the colour of the gauges, and
        # more. Adjust it all here.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        VICTORY_EXP  = "+%sEXP"      # Text used to display EXP.
        EXP_PERCENT  = "%1.2f%%"     # The way EXP percentage will be displayed.
        LEVELUP_TEXT = "LEVEL UP!"   # Text to replace percentage when leveled.
        MAX_LVL_TEXT = "MAX LEVEL"   # Text to replace percentage when max level.
        FONTSIZE_EXP = 20            # Font size used for EXP.
        EXP_TICKS    = 15            # Ticks to full EXP
        EXP_GAUGE1   = 12            # "Window" skin text colour for gauge.
        EXP_GAUGE2   = 4             # "Window" skin text colour for gauge.
        LEVEL_GAUGE1 = 13            # "Window" skin text colour for leveling.
        LEVEL_GAUGE2 = 5             # "Window" skin text colour for leveling.
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Victory Messages -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # In the Victory Aftermath, actors can say unique things. This is the pool
        # of quotes used for actors without any custom victory quotes. Note that
        # actors with custom quotes will take priority over classes with custom
        # quotes, which will take priority over these default quotes. Use \n for
        # a line break in the quotes.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        HEADER_TEXT = "\e>\eC[6]%s\eC[0]\e<\n"  # Always at start of messages.
        FOOTER_TEXT = ""                        # Always at end of messages.
        
        # Win Quotes are what the actors say when a battle is won.
        VICTORY_QUOTES ={
        # :type   => Quotes
          #------------------------------------------------------------------------
          :win    => [ # Occurs as initial victory quote.
                       '"We won! What an exciting fight!"',
                       '"I didn\'t even break a sweat."',
                       '"That wasn\'t so tough."',
                       '"Let\'s fight something harder!"',
                     ],# Do not remove this.
          #------------------------------------------------------------------------
          :level  => [ # Occurs as initial victory quote.
                       '"Yes! Level up!"',
                       '"I\'ve gotten stronger!"',
                       '"Try to keep up with me!"',
                       '"I\'ve grown again!"',
                     ],# Do not remove this.
          #------------------------------------------------------------------------
          :drops  => [ # Occurs as initial victory quote.
                       '"I\'ll be taking these."',
                       '"To the victor goes the spoils."',
                       '"The enemies dropped something!"',
                       '"Hey, what\'s this?"',
                     ],# Do not remove this.
          #------------------------------------------------------------------------
        } # Do not remove this.
        
      end # VICTORY_AFTERMATH
    end # YEA
    
    #==============================================================================
    # ▼ Editting anything past this point may potentially result in causing
    # computer damage, incontinence, explosion of user's head, coma, death, and/or
    # halitosis so edit at your own risk.
    #==============================================================================
    
    module YEA
      module REGEXP
      module BASEITEM
        
        NEW_QUOTE = /\[(?:NEW_QUOTE|new quote)\]/i
        
        WIN_QUOTE_ON    = /<(?:WIN_QUOTES|win quote|win quotes)>/i
        WIN_QUOTE_OFF   = /<\/(?:WIN_QUOTES|win quote|win quotes)>/i
        LEVEL_QUOTE_ON  = /<(?:LEVEL_QUOTES|level quote|level quotes)>/i
        LEVEL_QUOTE_OFF = /<\/(?:LEVEL_QUOTES|level quote|level quotes)>/i
        DROPS_QUOTE_ON  = /<(?:DROPS_QUOTES|drops quote|drops quotes)>/i
        DROPS_QUOTE_OFF = /<\/(?:DROPS_QUOTES|drops quote|drops quotes)>/i
        
      end # BASEITEM
      end # REGEXP
    end # YEA
    
    #==============================================================================
    # ■ Switch
    #==============================================================================
    
    module Switch
      
      #--------------------------------------------------------------------------
      # self.skip_aftermath
      #--------------------------------------------------------------------------
      def self.skip_aftermath
        return false if YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH <= 0
        return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_AFTERMATH_SWITCH]
      end
      
      #--------------------------------------------------------------------------
      # self.skip_aftermath_music
      #--------------------------------------------------------------------------
      def self.skip_aftermath_music
        return false if YEA::VICTORY_AFTERMATH::SKIP_MUSIC_SWITCH <=0
        return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_MUSIC_SWITCH]
      end
        
    end # Switch
    
    #==============================================================================
    # ■ Numeric
    #==============================================================================
    
    class Numeric
      
      #--------------------------------------------------------------------------
      # new method: group_digits
      #--------------------------------------------------------------------------
      unless $imported["YEA-CoreEngine"]
      def group; return self.to_s; end
      end # $imported["YEA-CoreEngine"]
        
    end # Numeric
    
    #==============================================================================
    # ■ DataManager
    #==============================================================================
    
    module DataManager
      
      #--------------------------------------------------------------------------
      # alias method: load_database
      #--------------------------------------------------------------------------
      class <<self; alias load_database_va load_database; end
      def self.load_database
        load_database_va
        load_notetags_va
      end
      
      #--------------------------------------------------------------------------
      # new method: load_notetags_va
      #--------------------------------------------------------------------------
      def self.load_notetags_va
        groups = [$data_actors, $data_classes]
        for group in groups
          for obj in group
            next if obj.nil?
            obj.load_notetags_va
          end
        end
      end
      
    end # DataManager
    
    #==============================================================================
    # ■ RPG::BaseItem
    #==============================================================================
    
    class RPG::BaseItem
      
      #--------------------------------------------------------------------------
      # public instance variables
      #--------------------------------------------------------------------------
      attr_accessor :win_quotes
      attr_accessor :level_quotes
      attr_accessor :drops_quotes
      
      #--------------------------------------------------------------------------
      # common cache: load_notetags_va
      #--------------------------------------------------------------------------
      def load_notetags_va
        @win_quotes = [""]
        @level_quotes = [""]
        @drops_quotes = [""]
        @victory_quote_type = nil
        #---
        self.note.split(/[\r\n]+/).each { |line|
          case line
          #---
          when YEA::REGEXP::BASEITEM::WIN_QUOTE_ON
            @victory_quote_type = :win_quote
          when YEA::REGEXP::BASEITEM::WIN_QUOTE_OFF
            @victory_quote_type = nil
          when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_ON
            @victory_quote_type = :level_quote
          when YEA::REGEXP::BASEITEM::LEVEL_QUOTE_OFF
            @victory_quote_type = nil
          when YEA::REGEXP::BASEITEM::DROPS_QUOTE_ON
            @victory_quote_type = :drops_quote
          when YEA::REGEXP::BASEITEM::DROPS_QUOTE_OFF
            @victory_quote_type = nil
          #---
          when YEA::REGEXP::BASEITEM::NEW_QUOTE
            case @victory_quote_type
            when nil; next
            when :win_quote;   @win_quotes.push("")
            when :level_quote; @level_quotes.push("")
            when :drops_quote; @drops_quotes.push("")
            end
          #---
          else
            case @victory_quote_type
            when nil; next
            when :win_quote;   @win_quotes[@win_quotes.size-1] += line.to_s
            when :level_quote; @level_quotes[@level_quotes.size-1] += line.to_s
            when :drops_quote; @drops_quotes[@drops_quotes.size-1] += line.to_s
            end
          end
        } # self.note.split
        #---
        return unless self.is_a?(RPG::Class)
        quotes = YEA::VICTORY_AFTERMATH::VICTORY_QUOTES
        @win_quotes = quotes[:win].clone if @win_quotes == [""]
        @level_quotes = quotes[:level].clone if @level_quotes == [""]
        @drops_quotes = quotes[:drops].clone if @drops_quotes == [""]
      end
      
    end # RPG::BaseItem
    
    #==============================================================================
    # ■ BattleManager
    #==============================================================================
    
    module BattleManager
      
      #--------------------------------------------------------------------------
      # overwrite method: self.process_victory
      #--------------------------------------------------------------------------
      def self.process_victory
        if $imported["YEA-CommandAutobattle"]
          SceneManager.scene.close_disable_autobattle_window
        end
        return skip_aftermath if Switch.skip_aftermath
        play_battle_end_me
        gain_jp if $imported["YEA-JPManager"]
        display_exp
        gain_exp
        gain_gold
        gain_drop_items
        close_windows
        SceneManager.return
        replay_bgm_and_bgs
        battle_end(0)
        return true
      end
      
      #--------------------------------------------------------------------------
      # new method: self.skip_aftermath
      #--------------------------------------------------------------------------
      def self.skip_aftermath
        $game_party.all_members.each do |actor|
          actor.gain_exp($game_troop.exp_total)
        end
        $game_party.gain_gold($game_troop.gold_total)
        $game_troop.make_drop_items.each do |item|
          $game_party.gain_item(item, 1)
        end
        close_windows
        SceneManager.return
        replay_bgm_and_bgs
        battle_end(0)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: self.play_battle_end_me
      #--------------------------------------------------------------------------
      def self.play_battle_end_me
        return if Switch.skip_aftermath_music
        $game_system.battle_end_me.play
        YEA::VICTORY_AFTERMATH::VICTORY_BGM.play
      end
      
      #--------------------------------------------------------------------------
      # new method: self.set_victory_text
      #--------------------------------------------------------------------------
      def self.set_victory_text(actor, type)
        text = "" + sprintf(YEA::VICTORY_AFTERMATH::HEADER_TEXT, actor.name)
        text += actor.victory_quotes(type)[rand(actor.victory_quotes(type).size)]
        text += YEA::VICTORY_AFTERMATH::FOOTER_TEXT
        $game_message.face_name = actor.face_name
        $game_message.face_index = actor.face_index
        $game_message.add(text)
        wait_for_message
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: self.display_exp
      #--------------------------------------------------------------------------
      def self.display_exp
        SceneManager.scene.show_victory_display_exp
        actor = $game_party.random_target
        @victory_actor = actor
        set_victory_text(@victory_actor, :win)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: self.gain_exp
      #--------------------------------------------------------------------------
      def self.gain_exp
        $game_party.all_members.each do |actor|
          temp_actor = Marshal.load(Marshal.dump(actor))
          actor.gain_exp($game_troop.exp_total)
          next if actor.level == temp_actor.level
          SceneManager.scene.show_victory_level_up(actor, temp_actor)
          set_victory_text(actor, :level)
          wait_for_message
        end
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: self.gain_gold
      #--------------------------------------------------------------------------
      def self.gain_gold
        $game_party.gain_gold($game_troop.gold_total)
      end
      
      #--------------------------------------------------------------------------
      # overwrite method: self.gain_drop_items
      #--------------------------------------------------------------------------
      def self.gain_drop_items
        drops = []
        $game_troop.make_drop_items.each do |item|
          $game_party.gain_item(item, 1)
          drops.push(item)
        end
        SceneManager.scene.show_victory_spoils($game_troop.gold_total, drops)
        set_victory_text(@victory_actor, :drops)
        wait_for_message
      end
      
      #--------------------------------------------------------------------------
      # new method: self.close_windows
      #--------------------------------------------------------------------------
      def self.close_windows
        SceneManager.scene.close_victory_windows
      end
      
      #--------------------------------------------------------------------------
      # alias method: load_database
      #--------------------------------------------------------------------------
      class <<self; alias battle_end_va battle_end; end
      def self.battle_end(result)
        battle_end_va(result)
        return if result == 2
        return if YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT <= 0
        event_id = YEA::VICTORY_AFTERMATH::AFTERMATH_COMMON_EVENT
        $game_temp.reserve_common_event(event_id)
      end
      
    end # BattleManager
    
    #==============================================================================
    # ■ Game_Actor
    #==============================================================================
    
    class Game_Actor < Game_Battler
      
      #--------------------------------------------------------------------------
      # overwrite method: gain_exp
      #--------------------------------------------------------------------------
      def gain_exp(exp)
        enabled = !SceneManager.scene_is?(Scene_Battle)
        change_exp(self.exp + (exp * final_exp_rate).to_i, enabled)
      end
      
      #--------------------------------------------------------------------------
      # new method: victory_quotes
      #--------------------------------------------------------------------------
      def victory_quotes(type)
        case type
        when :win
          return self.actor.win_quotes if self.actor.win_quotes != [""]
          return self.class.win_quotes
        when :level
          return self.actor.level_quotes if self.actor.level_quotes != [""]
          return self.class.level_quotes
        when :drops
          return self.actor.drops_quotes if self.actor.drops_quotes != [""]
          return self.class.drops_quotes
        else
          return ["NOTEXT"]
        end
      end
      
    end # Game_Actor
    
    #==============================================================================
    # ■ Window_VictoryTitle
    #==============================================================================
    
    class Window_VictoryTitle < Window_Base
      
      #--------------------------------------------------------------------------
      # initialize
      #--------------------------------------------------------------------------
      def initialize
        super(0, 0, Graphics.width, fitting_height(1))
        self.z = 200
        self.openness = 0
      end
      
      #--------------------------------------------------------------------------
      # refresh
      #--------------------------------------------------------------------------
      def refresh(message = "")
        contents.clear
        draw_text(0, 0, contents.width, line_height, message, 1)
      end
      
    end # Window_VictoryTitle
    
    #==============================================================================
    # ■ Window_VictoryEXP_Back
    #==============================================================================
    
    class Window_VictoryEXP_Back < Window_Selectable
      
      #--------------------------------------------------------------------------
      # initialize
      #--------------------------------------------------------------------------
      def initialize
        super(0, fitting_height(1), Graphics.width, window_height)
        self.z = 200
        self.openness = 0
      end
      
      #--------------------------------------------------------------------------
      # window_height
      #--------------------------------------------------------------------------
      def window_height
        return Graphics.height - fitting_height(4) - fitting_height(1)
      end
      
      #--------------------------------------------------------------------------
      # col_max
      #--------------------------------------------------------------------------
      def col_max; return item_max; end
      
      #--------------------------------------------------------------------------
      # spacing
      #--------------------------------------------------------------------------
      def spacing; return 8; end
      
      #--------------------------------------------------------------------------
      # item_max
      #--------------------------------------------------------------------------
      def item_max; return $game_party.battle_members.size; end
      
      #--------------------------------------------------------------------------
      # open
      #--------------------------------------------------------------------------
      def open
        @exp_total = $game_troop.exp_total
        super
      end
      
      #--------------------------------------------------------------------------
      # item_rect
      #--------------------------------------------------------------------------
      def item_rect(index)
        rect = Rect.new
        rect.width = item_width
        rect.height = contents.height
        rect.x = index % col_max * (item_width + spacing)
        rect.y = index / col_max * item_height
        return rect
      end
      
      #--------------------------------------------------------------------------
      # draw_item
      #--------------------------------------------------------------------------
      def draw_item(index)
        actor = $game_party.battle_members[index]
        return if actor.nil?
        rect = item_rect(index)
        reset_font_settings
        draw_actor_name(actor, rect)
        draw_exp_gain(actor, rect)
        draw_jp_gain(actor, rect)
        draw_actor_face(actor, rect)
      end
      
      #--------------------------------------------------------------------------
      # draw_actor_name
      #--------------------------------------------------------------------------
      def draw_actor_name(actor, rect)
        name = actor.name
        draw_text(rect.x, rect.y+line_height, rect.width, line_height, name, 1)
      end
      
      #--------------------------------------------------------------------------
      # draw_actor_face
      #--------------------------------------------------------------------------
      def draw_actor_face(actor, rect)
        face_name = actor.face_name
        face_index = actor.face_index
        bitmap = Cache.face(face_name)
        rw = [rect.width, 96].min
        face_rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, rw, 96)
        rx = (rect.width - rw) / 2 + rect.x
        contents.blt(rx, rect.y + line_height * 2, bitmap, face_rect, 255)
      end
      
      #--------------------------------------------------------------------------
      # draw_exp_gain
      #--------------------------------------------------------------------------
      def draw_exp_gain(actor, rect)
        dw = rect.width - (rect.width - [rect.width, 96].min) / 2
        dy = rect.y + line_height * 3 + 96
        fmt = YEA::VICTORY_AFTERMATH::VICTORY_EXP
        text = sprintf(fmt, actor_exp_gain(actor).group)
        contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
        change_color(power_up_color)
        draw_text(rect.x, dy, dw, line_height, text, 2)
      end
      
      #--------------------------------------------------------------------------
      # actor_exp_gain
      #--------------------------------------------------------------------------
      def actor_exp_gain(actor)
        n = @exp_total * actor.final_exp_rate
        return n.to_i
      end
      
      #--------------------------------------------------------------------------
      # draw_jp_gain
      #--------------------------------------------------------------------------
      def draw_jp_gain(actor, rect)
        return unless $imported["YEA-JPManager"]
        dw = rect.width - (rect.width - [rect.width, 96].min) / 2
        dy = rect.y + line_height * 4 + 96
        fmt = YEA::JP::VICTORY_AFTERMATH
        text = sprintf(fmt, actor_jp_gain(actor).group, Vocab::jp)
        contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
        change_color(power_up_color)
        draw_text(rect.x, dy, dw, line_height, text, 2)
      end
      
      #--------------------------------------------------------------------------
      # actor_jp_gain
      #--------------------------------------------------------------------------
      def actor_jp_gain(actor)
        n = actor.battle_jp_earned
        if actor.exp + actor_exp_gain(actor) > actor.exp_for_level(actor.level + 1)
          n += YEA::JP::LEVEL_UP unless actor.max_level?
        end
        return n
      end
      
    end # Window_VictoryEXP_Back
    
    #==============================================================================
    # ■ Window_VictoryEXP_Front
    #==============================================================================
    
    class Window_VictoryEXP_Front < Window_VictoryEXP_Back
      
      #--------------------------------------------------------------------------
      # initialize
      #--------------------------------------------------------------------------
      def initialize
        super
        self.back_opacity = 0
        @ticks = 0
        @counter = 30
        contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
      end
      
      #--------------------------------------------------------------------------
      # update
      #--------------------------------------------------------------------------
      def update
        super
        update_tick
      end
      
      #--------------------------------------------------------------------------
      # update_tick
      #--------------------------------------------------------------------------
      def update_tick
        return unless self.openness >= 255
        return unless self.visible
        return if complete_ticks?
        @counter -= 1
        return unless @counter <= 0
        return if @ticks >= YEA::VICTORY_AFTERMATH::EXP_TICKS
        YEA::VICTORY_AFTERMATH::VICTORY_TICK.play
        @counter = 4
        @ticks += 1
        refresh
      end
      
      #--------------------------------------------------------------------------
      # complete_ticks?
      #--------------------------------------------------------------------------
      def complete_ticks?
        for actor in $game_party.battle_members
          total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS
          bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks
          now_exp = actor.exp - actor.current_level_exp + bonus_exp
          next_exp = actor.next_level_exp - actor.current_level_exp
          rate = now_exp * 1.0 / next_exp
          return false if rate < 1.0
        end
        return true
      end
      
      #--------------------------------------------------------------------------
      # draw_item
      #--------------------------------------------------------------------------
      def draw_item(index)
        actor = $game_party.battle_members[index]
        return if actor.nil?
        rect = item_rect(index)
        draw_actor_exp(actor, rect)
      end
      
      #--------------------------------------------------------------------------
      # exp_gauge1
      #--------------------------------------------------------------------------
      def exp_gauge1; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE1); end
      
      #--------------------------------------------------------------------------
      # exp_gauge2
      #--------------------------------------------------------------------------
      def exp_gauge2; return text_color(YEA::VICTORY_AFTERMATH::EXP_GAUGE2); end
      
      #--------------------------------------------------------------------------
      # lvl_gauge1
      #--------------------------------------------------------------------------
      def lvl_gauge1; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE1); end
      
      #--------------------------------------------------------------------------
      # lvl_gauge2
      #--------------------------------------------------------------------------
      def lvl_gauge2; return text_color(YEA::VICTORY_AFTERMATH::LEVEL_GAUGE2); end
      
      #--------------------------------------------------------------------------
      # draw_actor_exp
      #--------------------------------------------------------------------------
      def draw_actor_exp(actor, rect)
        if actor.max_level?
          draw_exp_gauge(actor, rect, 1.0)
          return
        end
        total_ticks = YEA::VICTORY_AFTERMATH::EXP_TICKS
        bonus_exp = actor_exp_gain(actor) * @ticks / total_ticks
        now_exp = actor.exp - actor.current_level_exp + bonus_exp
        next_exp = actor.next_level_exp - actor.current_level_exp
        rate = now_exp * 1.0 / next_exp
        draw_exp_gauge(actor, rect, rate)
      end
      
      #--------------------------------------------------------------------------
      # draw_exp_gauge
      #--------------------------------------------------------------------------
      def draw_exp_gauge(actor, rect, rate)
        rate = [[rate, 1.0].min, 0.0].max
        dx = (rect.width - [rect.width, 96].min) / 2 + rect.x
        dy = rect.y + line_height * 2 + 96
        dw = [rect.width, 96].min
        colour1 = rate >= 1.0 ? lvl_gauge1 : exp_gauge1
        colour2 = rate >= 1.0 ? lvl_gauge2 : exp_gauge2
        draw_gauge(dx, dy, dw, rate, colour1, colour2)
        fmt = YEA::VICTORY_AFTERMATH::EXP_PERCENT
        text = sprintf(fmt, [rate * 100, 100.00].min)
        if [rate * 100, 100.00].min == 100.00
          text = YEA::VICTORY_AFTERMATH::LEVELUP_TEXT
          text = YEA::VICTORY_AFTERMATH::MAX_LVL_TEXT if actor.max_level?
        end
        draw_text(dx, dy, dw, line_height, text, 1)
      end
      
    end # Window_VictoryEXP_Front
    
    #==============================================================================
    # ■ Window_VictoryLevelUp
    #==============================================================================
    
    class Window_VictoryLevelUp < Window_Base
      
      #--------------------------------------------------------------------------
      # initialize
      #--------------------------------------------------------------------------
      def initialize
        super(0, fitting_height(1), Graphics.width, window_height)
        self.z = 200
        hide
      end
      
      #--------------------------------------------------------------------------
      # window_height
      #--------------------------------------------------------------------------
      def window_height
        return Graphics.height - fitting_height(4) - fitting_height(1)
      end
      
      #--------------------------------------------------------------------------
      # refresh
      #--------------------------------------------------------------------------
      def refresh(actor, temp_actor)
        contents.clear
        reset_font_settings
        YEA::VICTORY_AFTERMATH::LEVEL_SOUND.play
        draw_actor_changes(actor, temp_actor)
      end
      
      #--------------------------------------------------------------------------
      # draw_actor_changes
      #--------------------------------------------------------------------------
      def draw_actor_changes(actor, temp_actor)
        dx = contents.width / 16
        draw_actor_image(actor, temp_actor, dx)
        draw_param_names(actor, dx)
        draw_former_stats(temp_actor)
        draw_arrows
        draw_newer_stats(actor, temp_actor)
        draw_new_skills(actor, temp_actor)
      end
      
      #--------------------------------------------------------------------------
      # draw_actor_image
      #--------------------------------------------------------------------------
      def draw_actor_image(actor, temp_actor, dx)
        draw_text(dx, line_height, 96, line_height, actor.name, 1)
        draw_actor_face(actor, dx, line_height * 2)
        exp = actor.exp - temp_actor.exp
        text = sprintf(YEA::VICTORY_AFTERMATH::VICTORY_EXP, exp.group)
        change_color(power_up_color)
        contents.font.size = YEA::VICTORY_AFTERMATH::FONTSIZE_EXP
        draw_text(0, line_height * 2 + 96, dx + 96, line_height, text, 2)
        reset_font_settings
      end
      
      #--------------------------------------------------------------------------
      # draw_param_names
      #--------------------------------------------------------------------------
      def draw_param_names(actor, dx)
        dx += 108
        change_color(system_color)
        text = Vocab.level
        draw_text(dx, 0, contents.width - dx, line_height, text)
        dy = 0
        for i in 0...8
          dy += line_height
          text = Vocab.param(i)
          draw_text(dx, dy, contents.width - dx, line_height, text)
        end
      end
      
      #--------------------------------------------------------------------------
      # draw_former_stats
      #--------------------------------------------------------------------------
      def draw_former_stats(actor)
        dw = contents.width / 2 - 12
        dy = 0
        change_color(normal_color)
        draw_text(0, dy, dw, line_height, actor.level.group, 2)
        for i in 0...8
          dy += line_height
          draw_text(0, dy, dw, line_height, actor.param(i).group, 2)
        end
      end
      
      #--------------------------------------------------------------------------
      # draw_arrows
      #--------------------------------------------------------------------------
      def draw_arrows
        dx = contents.width / 2 - 12
        dy = 0
        change_color(system_color)
        for i in 0..8
          draw_text(dx, dy, 24, line_height, "→", 1)
          dy += line_height
        end
      end
      
      #--------------------------------------------------------------------------
      # draw_newer_stats
      #--------------------------------------------------------------------------
      def draw_newer_stats(actor, temp_actor)
        dx = contents.width / 2 + 12
        dw = contents.width - dx
        dy = 0
        change_color(param_change_color(actor.level - temp_actor.level))
        draw_text(dx, dy, dw, line_height, actor.level.group, 0)
        for i in 0...8
          dy += line_height
          change_color(param_change_color(actor.param(i) - temp_actor.param(i)))
          draw_text(dx, dy, dw, line_height, actor.param(i).group, 0)
        end
      end
      
      #--------------------------------------------------------------------------
      # draw_new_skills
      #--------------------------------------------------------------------------
      def draw_new_skills(actor, temp_actor)
        return if temp_actor.skills.size == actor.skills.size
        dw = 172 + 24
        dx = contents.width - dw
        change_color(system_color)
        text = YEA::VICTORY_AFTERMATH::SKILLS_TEXT
        draw_text(dx, 0, dw, line_height, text, 0)
      end
      
    end # Window_VictoryLevelUp
    
    #==============================================================================
    # ■ Window_VictorySkills
    #==============================================================================
    
    class Window_VictorySkills < Window_Selectable
      
      #--------------------------------------------------------------------------
      # initialize
      #--------------------------------------------------------------------------
      def initialize
        dy = fitting_height(1) + 24
        dw = 172 + 24 + 24
        dh = Graphics.height - fitting_height(4) - fitting_height(1) - 24
        super(Graphics.width - dw, dy, dw, dh)
        self.opacity = 0
        self.z = 200
        hide
      end
      
      #--------------------------------------------------------------------------
      # item_max
      #--------------------------------------------------------------------------
      def item_max; return @data.nil? ? 0 : @data.size; end
      
      #--------------------------------------------------------------------------
      # refresh
      #--------------------------------------------------------------------------
      def refresh(actor, temp_actor)
        contents.clear
        if actor.skills.size == temp_actor.skills.size
          unselect
          @data = []
          create_contents
          return
        end
        @data = actor.skills - temp_actor.skills
        if @data.size > 8
          select(0)
          activate
        else
          unselect
          deactivate
        end
        create_contents
        draw_all_items
      end
      
      #--------------------------------------------------------------------------
      # refresh
      #--------------------------------------------------------------------------
      def draw_item(index)
        rect = item_rect(index)
        skill = @data[index]
        return if skill.nil?
        rect.width -= 4
        draw_item_name(skill, rect.x, rect.y, true)
      end
      
    end # Window_VictorySkills
    
    #==============================================================================
    # ■ Window_VictorySpoils
    #==============================================================================
    
    class Window_VictorySpoils < Window_ItemList
      
      #--------------------------------------------------------------------------
      # initialize
      #--------------------------------------------------------------------------
      def initialize
        super(0, fitting_height(1), Graphics.width, window_height)
        self.z = 200
        hide
      end
      
      #--------------------------------------------------------------------------
      # window_height
      #--------------------------------------------------------------------------
      def window_height
        return Graphics.height - fitting_height(4) - fitting_height(1)
      end
      
      #--------------------------------------------------------------------------
      # spacing
      #--------------------------------------------------------------------------
      def spacing; return 32; end
      
      #--------------------------------------------------------------------------
      # make
      #--------------------------------------------------------------------------
      def make(gold, drops)
        @gold = gold
        @drops = drops
        refresh
        select(0)
        activate
      end
      
      #--------------------------------------------------------------------------
      # make_item_list
      #--------------------------------------------------------------------------
      def make_item_list
        @data = [nil]
        items = {}
        weapons = {}
        armours = {}
        @goods = {}
        for item in @drops
          case item
          when RPG::Item
            items[item] = 0 if items[item].nil?
            items[item] += 1
          when RPG::Weapon
            weapons[item] = 0 if weapons[item].nil?
            weapons[item] += 1
          when RPG::Armor
            armours[item] = 0 if armours[item].nil?
            armours[item] += 1
          end
        end
        items = items.sort { |a,b| a[0].id <=> b[0].id }
        weapons = weapons.sort { |a,b| a[0].id <=> b[0].id }
        armours = armours.sort { |a,b| a[0].id <=> b[0].id }
        for key in items; @goods[key[0]] = key[1]; @data.push(key[0]); end
        for key in weapons; @goods[key[0]] = key[1]; @data.push(key[0]); end
        for key in armours; @goods[key[0]] = key[1]; @data.push(key[0]); end
      end
      
      #--------------------------------------------------------------------------
      # draw_item
      #--------------------------------------------------------------------------
      def draw_item(index)
        item = @data[index]
        rect = item_rect(index)
        reset_font_settings
        if item.nil?
          draw_gold(rect)
          return
        end
        rect.width -= 4
        draw_item_name(item, rect.x, rect.y, true, rect.width - 24)
        draw_item_number(rect, item)
      end
      
      #--------------------------------------------------------------------------
      # draw_gold
      #--------------------------------------------------------------------------
      def draw_gold(rect)
        text = Vocab.currency_unit
        draw_currency_value(@gold, text, rect.x, rect.y, rect.width)
      end
      
      #--------------------------------------------------------------------------
      # draw_item_number
      #--------------------------------------------------------------------------
      def draw_item_number(rect, item)
        number = @goods[item].group
        if $imported["YEA-AdjustLimits"]
          contents.font.size = YEA::LIMIT::ITEM_FONT
          text = sprintf(YEA::LIMIT::ITEM_PREFIX, number)
          draw_text(rect, text, 2)
        else
          draw_text(rect, sprintf(":%s", number), 2)
        end
      end
      
    end # Window_VictorySpoils
    
    #==============================================================================
    # ■ Scene_Battle
    #==============================================================================
    
    class Scene_Battle < Scene_Base
      
      #--------------------------------------------------------------------------
      # alias method: create_all_windows
      #--------------------------------------------------------------------------
      alias scene_battle_create_all_windows_va create_all_windows
      def create_all_windows
        scene_battle_create_all_windows_va
        create_victory_aftermath_windows
      end
      
      #--------------------------------------------------------------------------
      # new method: create_victory_aftermath_windows
      #--------------------------------------------------------------------------
      def create_victory_aftermath_windows
        @victory_title_window = Window_VictoryTitle.new
        @victory_exp_window_back = Window_VictoryEXP_Back.new
        @victory_exp_window_front = Window_VictoryEXP_Front.new
        @victory_level_window = Window_VictoryLevelUp.new
        @victory_level_skills = Window_VictorySkills.new
        @victory_spoils_window = Window_VictorySpoils.new
      end
      
      #--------------------------------------------------------------------------
      # new method: show_victory_display_exp
      #--------------------------------------------------------------------------
      def show_victory_display_exp
        @victory_title_window.open
        name = $game_party.battle_members[0].name
        fmt = YEA::VICTORY_AFTERMATH::TOP_TEAM
        name = sprintf(fmt, name) if $game_party.battle_members.size > 1
        fmt = YEA::VICTORY_AFTERMATH::TOP_VICTORY_TEXT
        text = sprintf(fmt, name)
        @victory_title_window.refresh(text)
        #---
        @victory_exp_window_back.open
        @victory_exp_window_back.refresh
        @victory_exp_window_front.open
        @victory_exp_window_front.refresh
      end
      
      #--------------------------------------------------------------------------
      # new method: show_victory_level_up
      #--------------------------------------------------------------------------
      def show_victory_level_up(actor, temp_actor)
        @victory_exp_window_back.hide
        @victory_exp_window_front.hide
        #---
        fmt = YEA::VICTORY_AFTERMATH::TOP_LEVEL_UP
        text = sprintf(fmt, actor.name)
        @victory_title_window.refresh(text)
        #---
        @victory_level_window.show
        @victory_level_window.refresh(actor, temp_actor)
        @victory_level_skills.show
        @victory_level_skills.refresh(actor, temp_actor)
      end
      
      #--------------------------------------------------------------------------
      # new method: show_victory_spoils
      #--------------------------------------------------------------------------
      def show_victory_spoils(gold, drops)
        @victory_exp_window_back.hide
        @victory_exp_window_front.hide
        @victory_level_window.hide
        @victory_level_skills.hide
        #---
        text = YEA::VICTORY_AFTERMATH::TOP_SPOILS
        @victory_title_window.refresh(text)
        #---
        @victory_spoils_window.show
        @victory_spoils_window.make(gold, drops)
      end
      
      #--------------------------------------------------------------------------
      # new method: close_victory_windows
      #--------------------------------------------------------------------------
      def close_victory_windows
        @victory_title_window.close
        @victory_exp_window_back.close
        @victory_exp_window_front.close
        @victory_level_window.close
        @victory_level_skills.close
        @victory_spoils_window.close
        wait(16)
      end
      
    end # Scene_Battle
    
    #==============================================================================
    # 
    # ▼ End of File
    # 
    #==============================================================================
    Ошибка "malformed format string" в строчке №1151
    Код:
        name = sprintf(fmt, name) if $game_party.battle_members.size > 1
    Кто подскажет, в чём проблема и как исправить?
    Творчество, никак с играми не связанное:
    https://vk.com/amjee
    https://vk.com/r2space
    Моя рожа и всякий рэпчик живьём: https://www.instagram.com/rap_amjeenickyry/

  9. #1249

    По умолчанию

    Проблема в строчках:

    Код:
        TOP_TEAM         = "%и его команда"           # Team name used.
        TOP_VICTORY_TEXT = "%побеждает!"   # Text used to display victory.
        TOP_LEVEL_UP     = "%повышает свой уровень!"  # Text used to display level up.
    они переведены неправильно.
    В оригинале:

    Код:
        TOP_TEAM         = "%s's team"           # Team name used.
        TOP_VICTORY_TEXT = "%s is victorious!"   # Text used to display victory.
        TOP_LEVEL_UP     = "%s has leveled up!"  # Text used to display level up.
    Вот эта %s должна остаться. Т.е.

    %s и его команда
    %s побеждает!
    %s повышает свой уровень!


    Dropbox — бесплатное хранилище файлов с прямыми ссылками.

    Humble Bundle — игры, подборки и наборы со скидками.

  10. #1250
    Авторитет Аватар для Hosse
    Информация о пользователе
    Регистрация
    23.03.2010
    Адрес
    Королёв
    Сообщений
    1,603
    Записей в дневнике
    54
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Спасибо
    Странно, раньше так всё работало
    Творчество, никак с играми не связанное:
    https://vk.com/amjee
    https://vk.com/r2space
    Моя рожа и всякий рэпчик живьём: https://www.instagram.com/rap_amjeenickyry/

Страница 125 из 190 ПерваяПервая ... 2575115123124125126127135175 ... ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 7 (пользователей: 0 , гостей: 7)

Метки этой темы

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Поиск скриптов