Yanfly Victory Aftermath - skipping loot screen when there's no loot

Discussion in 'RGSS3 Script Requests' started by kat821, Jun 20, 2019.

  1. kat821

    kat821 Villager Member

    Messages:
    23
    Likes Received:
    1
    First Language:
    Polish
    Primarily Uses:
    RMVXA
    Link to the script

    The screen still shows up even if the enemy didn't drop anything. It just shows that I got 0 money from the battle.
    Is it possible to adjust the script so that this screen won't show up if there's no loot?
    Thanks for help in advance.
     
    #1
  2. Heirukichi

    Heirukichi Veteran Veteran

    Messages:
    1,235
    Likes Received:
    492
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMVXA
    I am not sure if this is what you want, but you can use this:
    Code:
    module HRK_VAS
      def self.skip_spoils(val)
        @spoils_skip_flag = val
      end
      def self.skip_spoils?
        @spoils_skip_flag
      end
    end
    
    class Scene_Battle < Scene_Base
      alias hrk_show_victory_spoils_old show_victory_spoils
      def show_victory_spoils(gold, drops)
        HRK_VAS.skip_spoils((gold == 0) && (drops.length == 0))
        return if HRK_VAS.skip_spoils?
        hrk_show_victory_spoils_old(gold, drops)
      end
    end
    
    module BattleManager
      class << BattleManager
        alias hrk_set_victory_text_old set_victory_text
        def set_victory_text(actor, type)
          return if (HRK_VAS.skip_spoils? && (type == :drops))
          hrk_set_victory_text_old(actor, type)
        end
      end
    end
    
    This is just plug and play, copy/past below Materials and above Main in your script editor. Just be sure to place it BELOW Yanfly's script.
     
    #2
    BCj likes this.

Share This Page