[Hướng Dẫn] Cần hướng dẫn sử dụng message backgound thay cho windowskin :(

GrayWolfGrayWolf Posts: 45Registered
Theo mình nhớ là ở VX có cái này. Tức là thay vì hiện windowskin thì cho hiện 1 bức ảnh. Như thế thì hay hơn rất nhiều. Mà sao mò bên VX ace mãi không ra :(
Pro nào biết làm chỉ cho mình với :( hay có script gì cho mình xin :(

Comments

  • ducnguyendevducnguyendev Posts: 94Registered
    Sử dụng event Show Picture và Transparent Background of Message.
    GrayWolf wrote:
    Theo mình nhớ là ở VX có cái này. Tức là thay vì hiện windowskin thì cho hiện 1 bức ảnh. Như thế thì hay hơn rất nhiều. Mà sao mò bên VX ace mãi không ra :(
    Pro nào biết làm chỉ cho mình với :( hay có script gì cho mình xin :(
  • BướmBướm Posts: 1,220Registered
    nhiều cách lắm nhưng cách đơn giản nhất là để khung text trong suốt rồi show picture của text bar mà mình muốn dùng mỗi khi có hội thoại
  • GrayWolfGrayWolf Posts: 45Registered
    hix. có script thì tốt. Kiếm đc cái script của Galv mà k làm sao để dùng. :( nó không hiện ra. Làm đúng như nó hướng dẫn
    @Dang_Khoa vào giúp em ;)
    #------------------------------------------------------------------------------#
    #  Galv's Message Background
    #------------------------------------------------------------------------------#
    #  For: RPGMAKER VX ACE
    #  Version 1.3
    #------------------------------------------------------------------------------#
    #  2013-04-01 - version 1.2 - added option to disable script in battle
    #  2013-02-10 - version 1.1 - dim and transparent settings work with image now
    #  2012-12-02 - version 1.0 - release
    #------------------------------------------------------------------------------#
    #  This script displays an image file for a message background instead of using
    #  the windowskin. If you are using Galv's Message Busts put this script ABOVE.
    #
    #  This image background will not stretch to fit, that's not it's purpose.
    #  I encourage you to make your own message background images, the ones in the
    #  demo are just quick examples!
    #------------------------------------------------------------------------------#
    #  INSTRUCTIONS:
    #  Put in script list below Materials and above Main.
    #
    #  Read the instructions
    #------------------------------------------------------------------------------#
    #  SCRIPT CALL
    #------------------------------------------------------------------------------#
    # 
    #  msgbg("ImageName", y_offset)     # To change message background during game
    #                                   # "ImageName" is the new file name to use
    #                                   # y_offset is the new IMAGE_Y for that bg
    #  EXAMPLE
    #  msgbg("MsgImage", -98)     
    #
    #------------------------------------------------------------------------------#
     
    ($imported ||= {})["Galvs_Message_Background"] = true
    module Galv_Msgbg
     
    #------------------------------------------------------------------------------#
    #  SCRIPT SETTINGS
    #------------------------------------------------------------------------------#
     
      # DEFAULT MESSAGE #
       
      MESSAGE_IMAGE = "Background"   # Name of image in /Graphics/System to use for
                                   # the message background.
     
      IMAGE_Y = -98                # Y offset of image
     
      DISABLE_SWITCH = 1   # Turn swith ON to disable image background
       
      DISABLE_IN_BATTLE = true  # Disable this script when in battle.
       
       
    #------------------------------------------------------------------------------#
    #  END SCRIPT SETTINGS
    #------------------------------------------------------------------------------#
     
    end
     
     
    class Window_Message < Window_Base
      alias galv_msgbg_window_create_back_bitmap create_back_bitmap
      def create_back_bitmap
        @bg ||= Sprite.new
        if !$game_message.message_bg.nil?
          @bg.bitmap = Cache.system($game_message.message_bg)
          @current_bg = $game_message.message_bg
        end
        @bg.z = z - 1
        @bg.opacity = 0
        galv_msgbg_window_create_back_bitmap
      end
       
      alias galv_msgbg_window_dispose dispose
      def dispose
        galv_msgbg_window_dispose
        dispose_msgbg if !@bg.nil?
      end
       
      def dispose_msgbg
        @bg.dispose
        @bg.bitmap.dispose
      end
       
      alias galv_msgbg_window_update_back_sprite update_back_sprite
      def update_back_sprite
        if !$game_switches[Galv_Msgbg::DISABLE_SWITCH] && !$game_temp.msg_off
          update_msgbg if openness > 0
          @bg.opacity = 0 if openness == 0
        else
          galv_msgbg_window_update_back_sprite
          @bg.opacity = 0
        end
        @bg.update
        @back_sprite.update
      end
       
      def update_msgbg
        if $game_message.message_bg != @current_bg
          if !$game_message.message_bg.nil?
            @bg.bitmap = Cache.system($game_message.message_bg)
            @current_bg = $game_message.message_bg
          end
        end
        @bg.y = self.y + $game_message.message_bg_y
        case @background
        when 0; @bg.opacity = openness
        when 1; @bg.opacity = openness * 0.5
        when 2; @bg.opacity = 0
        end
        @back_sprite.visible = false
        self.opacity = 0
      end
     
    end # Window_Message < Window_Base
     
    class Game_Message
      attr_accessor :message_bg
      attr_accessor :message_bg_y
       
      alias galv_msgbg_message_initialize initialize
      def initialize
        galv_msgbg_message_initialize
        @message_bg = Galv_Msgbg::MESSAGE_IMAGE
        @message_bg_y = Galv_Msgbg::IMAGE_Y
      end
    end # Game_Message
     
    class Game_Temp
      attr_accessor :msg_off
    end # Game_Temp
     
    class Scene_Battle < Scene_Base
      alias galv_msgbg_sb_start start
      def start
        $game_temp.msg_off = true if Galv_Msgbg::DISABLE_IN_BATTLE
        galv_msgbg_sb_start
      end
     
      alias galv_msgbg_sb_terminate terminate
      def terminate
        $game_temp.msg_off = nil
        galv_msgbg_sb_terminate
      end
    end # Scene_Battle < Scene_Base
     
    class Game_Interpreter
      def msgbg(image,y_offset)
        $game_message.message_bg = image
        $game_message.message_bg_y = y_offset
      end
    end # Game_Interpreter
    
  • ducnguyendevducnguyendev Posts: 94Registered
    Bạ cái gì cùng dùng script ăn sẵn linh tinh chắc bộ không sợ xung đột code về sau à GrayWolf =))
    GrayWolf wrote:
    hix. có script thì tốt. Kiếm đc cái script của Galv mà k làm sao để dùng. :( nó không hiện ra. Làm đúng như nó hướng dẫn
    @Dang_Khoa vào giúp em ;)
    #------------------------------------------------------------------------------#
    #  Galv's Message Background
    #------------------------------------------------------------------------------#
    #  For: RPGMAKER VX ACE
    #  Version 1.3
    #------------------------------------------------------------------------------#
    #  2013-04-01 - version 1.2 - added option to disable script in battle
    #  2013-02-10 - version 1.1 - dim and transparent settings work with image now
    #  2012-12-02 - version 1.0 - release
    #------------------------------------------------------------------------------#
    #  This script displays an image file for a message background instead of using
    #  the windowskin. If you are using Galv's Message Busts put this script ABOVE.
    #
    #  This image background will not stretch to fit, that's not it's purpose.
    #  I encourage you to make your own message background images, the ones in the
    #  demo are just quick examples!
    #------------------------------------------------------------------------------#
    #  INSTRUCTIONS:
    #  Put in script list below Materials and above Main.
    #
    #  Read the instructions
    #------------------------------------------------------------------------------#
    #  SCRIPT CALL
    #------------------------------------------------------------------------------#
    # 
    #  msgbg("ImageName", y_offset)     # To change message background during game
    #                                   # "ImageName" is the new file name to use
    #                                   # y_offset is the new IMAGE_Y for that bg
    #  EXAMPLE
    #  msgbg("MsgImage", -98)     
    #
    #------------------------------------------------------------------------------#
     
    ($imported ||= {})["Galvs_Message_Background"] = true
    module Galv_Msgbg
     
    #------------------------------------------------------------------------------#
    #  SCRIPT SETTINGS
    #------------------------------------------------------------------------------#
     
      # DEFAULT MESSAGE #
       
      MESSAGE_IMAGE = "Background"   # Name of image in /Graphics/System to use for
                                   # the message background.
     
      IMAGE_Y = -98                # Y offset of image
     
      DISABLE_SWITCH = 1   # Turn swith ON to disable image background
       
      DISABLE_IN_BATTLE = true  # Disable this script when in battle.
       
       
    #------------------------------------------------------------------------------#
    #  END SCRIPT SETTINGS
    #------------------------------------------------------------------------------#
     
    end
     
     
    class Window_Message < Window_Base
      alias galv_msgbg_window_create_back_bitmap create_back_bitmap
      def create_back_bitmap
        @bg ||= Sprite.new
        if !$game_message.message_bg.nil?
          @bg.bitmap = Cache.system($game_message.message_bg)
          @current_bg = $game_message.message_bg
        end
        @bg.z = z - 1
        @bg.opacity = 0
        galv_msgbg_window_create_back_bitmap
      end
       
      alias galv_msgbg_window_dispose dispose
      def dispose
        galv_msgbg_window_dispose
        dispose_msgbg if !@bg.nil?
      end
       
      def dispose_msgbg
        @bg.dispose
        @bg.bitmap.dispose
      end
       
      alias galv_msgbg_window_update_back_sprite update_back_sprite
      def update_back_sprite
        if !$game_switches[Galv_Msgbg::DISABLE_SWITCH] && !$game_temp.msg_off
          update_msgbg if openness > 0
          @bg.opacity = 0 if openness == 0
        else
          galv_msgbg_window_update_back_sprite
          @bg.opacity = 0
        end
        @bg.update
        @back_sprite.update
      end
       
      def update_msgbg
        if $game_message.message_bg != @current_bg
          if !$game_message.message_bg.nil?
            @bg.bitmap = Cache.system($game_message.message_bg)
            @current_bg = $game_message.message_bg
          end
        end
        @bg.y = self.y + $game_message.message_bg_y
        case @background
        when 0; @bg.opacity = openness
        when 1; @bg.opacity = openness * 0.5
        when 2; @bg.opacity = 0
        end
        @back_sprite.visible = false
        self.opacity = 0
      end
     
    end # Window_Message < Window_Base
     
    class Game_Message
      attr_accessor :message_bg
      attr_accessor :message_bg_y
       
      alias galv_msgbg_message_initialize initialize
      def initialize
        galv_msgbg_message_initialize
        @message_bg = Galv_Msgbg::MESSAGE_IMAGE
        @message_bg_y = Galv_Msgbg::IMAGE_Y
      end
    end # Game_Message
     
    class Game_Temp
      attr_accessor :msg_off
    end # Game_Temp
     
    class Scene_Battle < Scene_Base
      alias galv_msgbg_sb_start start
      def start
        $game_temp.msg_off = true if Galv_Msgbg::DISABLE_IN_BATTLE
        galv_msgbg_sb_start
      end
     
      alias galv_msgbg_sb_terminate terminate
      def terminate
        $game_temp.msg_off = nil
        galv_msgbg_sb_terminate
      end
    end # Scene_Battle < Scene_Base
     
    class Game_Interpreter
      def msgbg(image,y_offset)
        $game_message.message_bg = image
        $game_message.message_bg_y = y_offset
      end
    end # Game_Interpreter
    
  • GrayWolfGrayWolf Posts: 45Registered
    Bạ cái gì cùng dùng script ăn sẵn linh tinh chắc bộ không sợ xung đột code về sau à GrayWolf =))
    GrayWolf wrote:
    hix. có script thì tốt. Kiếm đc cái script của Galv mà k làm sao để dùng. :( nó không hiện ra. Làm đúng như nó hướng dẫn
    @Dang_Khoa vào giúp em ;)
    #------------------------------------------------------------------------------#
    #  Galv's Message Background
    #------------------------------------------------------------------------------#
    #  For: RPGMAKER VX ACE
    #  Version 1.3
    #------------------------------------------------------------------------------#
    #  2013-04-01 - version 1.2 - added option to disable script in battle
    #  2013-02-10 - version 1.1 - dim and transparent settings work with image now
    #  2012-12-02 - version 1.0 - release
    #------------------------------------------------------------------------------#
    #  This script displays an image file for a message background instead of using
    #  the windowskin. If you are using Galv's Message Busts put this script ABOVE.
    #
    #  This image background will not stretch to fit, that's not it's purpose.
    #  I encourage you to make your own message background images, the ones in the
    #  demo are just quick examples!
    #------------------------------------------------------------------------------#
    #  INSTRUCTIONS:
    #  Put in script list below Materials and above Main.
    #
    #  Read the instructions
    #------------------------------------------------------------------------------#
    #  SCRIPT CALL
    #------------------------------------------------------------------------------#
    # 
    #  msgbg("ImageName", y_offset)     # To change message background during game
    #                                   # "ImageName" is the new file name to use
    #                                   # y_offset is the new IMAGE_Y for that bg
    #  EXAMPLE
    #  msgbg("MsgImage", -98)     
    #
    #------------------------------------------------------------------------------#
     
    ($imported ||= {})["Galvs_Message_Background"] = true
    module Galv_Msgbg
     
    #------------------------------------------------------------------------------#
    #  SCRIPT SETTINGS
    #------------------------------------------------------------------------------#
     
      # DEFAULT MESSAGE #
       
      MESSAGE_IMAGE = "Background"   # Name of image in /Graphics/System to use for
                                   # the message background.
     
      IMAGE_Y = -98                # Y offset of image
     
      DISABLE_SWITCH = 1   # Turn swith ON to disable image background
       
      DISABLE_IN_BATTLE = true  # Disable this script when in battle.
       
       
    #------------------------------------------------------------------------------#
    #  END SCRIPT SETTINGS
    #------------------------------------------------------------------------------#
     
    end
     
     
    class Window_Message < Window_Base
      alias galv_msgbg_window_create_back_bitmap create_back_bitmap
      def create_back_bitmap
        @bg ||= Sprite.new
        if !$game_message.message_bg.nil?
          @bg.bitmap = Cache.system($game_message.message_bg)
          @current_bg = $game_message.message_bg
        end
        @bg.z = z - 1
        @bg.opacity = 0
        galv_msgbg_window_create_back_bitmap
      end
       
      alias galv_msgbg_window_dispose dispose
      def dispose
        galv_msgbg_window_dispose
        dispose_msgbg if !@bg.nil?
      end
       
      def dispose_msgbg
        @bg.dispose
        @bg.bitmap.dispose
      end
       
      alias galv_msgbg_window_update_back_sprite update_back_sprite
      def update_back_sprite
        if !$game_switches[Galv_Msgbg::DISABLE_SWITCH] && !$game_temp.msg_off
          update_msgbg if openness > 0
          @bg.opacity = 0 if openness == 0
        else
          galv_msgbg_window_update_back_sprite
          @bg.opacity = 0
        end
        @bg.update
        @back_sprite.update
      end
       
      def update_msgbg
        if $game_message.message_bg != @current_bg
          if !$game_message.message_bg.nil?
            @bg.bitmap = Cache.system($game_message.message_bg)
            @current_bg = $game_message.message_bg
          end
        end
        @bg.y = self.y + $game_message.message_bg_y
        case @background
        when 0; @bg.opacity = openness
        when 1; @bg.opacity = openness * 0.5
        when 2; @bg.opacity = 0
        end
        @back_sprite.visible = false
        self.opacity = 0
      end
     
    end # Window_Message < Window_Base
     
    class Game_Message
      attr_accessor :message_bg
      attr_accessor :message_bg_y
       
      alias galv_msgbg_message_initialize initialize
      def initialize
        galv_msgbg_message_initialize
        @message_bg = Galv_Msgbg::MESSAGE_IMAGE
        @message_bg_y = Galv_Msgbg::IMAGE_Y
      end
    end # Game_Message
     
    class Game_Temp
      attr_accessor :msg_off
    end # Game_Temp
     
    class Scene_Battle < Scene_Base
      alias galv_msgbg_sb_start start
      def start
        $game_temp.msg_off = true if Galv_Msgbg::DISABLE_IN_BATTLE
        galv_msgbg_sb_start
      end
     
      alias galv_msgbg_sb_terminate terminate
      def terminate
        $game_temp.msg_off = nil
        galv_msgbg_sb_terminate
      end
    end # Scene_Battle < Scene_Base
     
    class Game_Interpreter
      def msgbg(image,y_offset)
        $game_message.message_bg = image
        $game_message.message_bg_y = y_offset
      end
    end # Game_Interpreter
    
    test vẫn ok mà :) xung đột thì xóa đi thôi ;)
    Mình đã cố gắng đơn giản hóa nhất có thể rồi. tại message mà phải show từng cái ảnh một thì hơi mêt :)
  • kumuzukumuzu Posts: 669Registered
    xung đột là chuyện thường tôi vẫn ghép được đấy thôi chạy cứ ngọt như mía lù
  • tinteo1995tinteo1995 Posts: 3Registered
Sign In or Register to comment.