Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.



 
Trang ChínhPortalTìm kiếmLatest imagesĐăng kýĐăng Nhập
Bài gửiNgười gửiThời gian
GAME nhập vai - Gta San Andreas phiên bản multiplayer. Battle back 115/11/2014, 22:08
Tài nguyên game bang bang zing me Battle back 114/11/2014, 07:32
Hướng dẫn làm nhân vật di chuyển Battle back 114/11/2014, 06:57
Cách sử dụng code current Battle back 114/11/2014, 06:52
Em xin làm đoạn video do em tự dẫn giúp cho các anh chị nào không biết các công cụ trong game maker Battle back 114/11/2014, 06:50
Cần tài nguyên game Võ đài thần tiên Battle back 114/11/2014, 06:39
Tải RPG XP + Việt Hóa Battle back 127/9/2014, 18:50
Bản hướng dẫn RPGXP đây..... Battle back 127/9/2014, 13:43
can giup Battle back 127/9/2014, 13:40
can giup Battle back 127/9/2014, 13:36
sự thật về vtc academy hcm Battle back 122/10/2013, 20:07
[vnplay.org]MU Việt Season 6.3 - Reset Và Non Reset -Không Webshop - Open tháng 5 Battle back 14/5/2013, 15:35
Phần trang bị giống game diablo Battle back 113/3/2013, 18:31
Game4V và Event "Viết bài hay, nhận ngay quà tặng" Battle back 119/2/2012, 21:24
HELP: Failed to create process Battle back 113/12/2011, 11:27
Danh hiệu member Battle back 16/12/2011, 13:02
TRY.VN RA MẮT CỤM MÁY CHỦ MỚI : HOÀN MỸ - OPEN 22/11 - ĐỈNH CAO MU ONLINE Battle back 123/11/2011, 07:44
MU 24 Giờ - Cực khó dành cho game thủ đích thực - Open Beta vào lúc 11h ngày 11/11/2011 Battle back 119/11/2011, 18:55
wqswqdqw Battle back 123/10/2011, 21:51
Diễn đàn Make Game VN chính thức Battle back 131/8/2011, 10:29

Share | 
 

 Battle back

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down 
Tác giảThông điệp
duongtiep
Level 15
Level 15
duongtiep

Danh hiệu : The King
Tổng số bài gửi : 1229
MGV Xu : 2677
Danh tiếng : 45
Ngày tham gia : 10/12/2010
Đến từ : Quảng Ninh

Battle back Empty
Bài gửiTiêu đề: Battle back   Battle back I_icon_minitime15/12/2010, 21:19

Script thay thế battleback mặc định của VX bằng hình ảnh.

Script:
Code:
#==============================================================================
# ** Battlebacks VX
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.2
#    03-29-2008
#    RGSS2
#------------------------------------------------------------------------------
#
#  INTRODUCTION:
#
#  This system reintroduces the use of 'Battleback' graphics into your pro-
#  jects, something that was sadly lacking in tbe RPGMaker VX system.
#
#------------------------------------------------------------------------------
#
#  SCRIPT CALLS:
#
#  There's only one script call that you need to know.
#
#  --Changing Battlebacks--
#  Given that this system allows you to use 'Battlebacks, you may find a need
#  to 'change' the battleback in-game. Unfortunately, this can't be done with
#  a pre-rendered map event, so I had to make a script call:
#
#          $game_system.battleback = "filename"
#
#  The filename is whatever is stored within the folder that you have speci-
#  fied in the configuration section (in the BATTLEBACK_DIR value).

#------------------------------------------------------------------------------
#
#  THANKS:
#
#  To Fantasy at RPG RPG Revolution for noticing a bug when using the 'Battle
#  Test' feature.
#
#------------------------------------------------------------------------------
#  TERMS AND CONDITIONS:
#
#  Free to use, even in commercial projects.  Just note that I need some form
#  of due credit... even a mere mention in some end titles.
#
#==============================================================================

  #========================================================================
  #  **  C  O  N  F  I  G  U  R  A  T  I  O  N      S  Y  S  T  E  M  **  #
  #======================================================================== 
 
  # Name of directory (used in cache)
    BATTLEBACK_DIR = "Graphics/Battlebacks/"

  # List of battlebacks by Map ID.
  #                    MapID    Filename                 
    BATTLEBACK_LIST = {
  1 => "BG7",
  2 => "BG7",
  10 => "BG002",
  13 => "BG7",
  14 => "BG8",
  15 => "BG2",
  22 => "BG003",
  23 => "BG003",
  31 => "BG2",
  33 => "BG004",
  40 => "BG3",
  50 => "BG3",
  55 => "BG0011",
  58 => "BG1",
  59 => "BG1",
  61 => "BG2", 
  62 => "BG2",   
  64 => "BG8",   
  65 => "BG7", 
  66 => "BG8",
  69 => "bg000", 
  70 => "BG1", 
  77 => "BG005", 
  78 => "BG005", 
  84 => "BG005",   
  86 => "BG11",
  88 => "BG12",
  89 => "BG12",
  101 => "BG18",
  102 => "BG18",
  105 => "BG18",
  109 => "BG17",   
  112 => "BG17",
  113 => "BG5",
  116 => "BG5",
  117 => "BG23", 
  120 => "BG16",
  127 => "BG19",
  134 => "BG2",
  144 => "BG23",
  146 => "BG23",
  147 => "BG23",
  148 => "BG29",
  150 => "BG23", 
  152 => "BG26",
  151 => "BG31",
  153 => "BG26",
  154 => "BG25",
  155 => "BG27", 
  156 => "BG24",
  157 => "BG005",
  158 => "BG7",
  159 => "BG30",
  170 => "BG28"
 
 
  }
  # The name of the battleback used
  # when using the Battle Test feature.
    BATTLEBACK_TEST = "BG004"                     

                 
#==============================================================================
# ** Cache
#------------------------------------------------------------------------------
#  This module loads each of graphics, creates a Bitmap object, and retains it.
# To speed up load times and conserve memory, this module holds the created
# Bitmap object in the internal hash, allowing the program to return
# preexisting objects when the same bitmap is requested again.
#==============================================================================

module Cache
  #--------------------------------------------------------------------------
  # * Get Battleback Graphic
  #    filename : Filename
  #-------------------------------------------------------------------------- 
  def self.battleback(filename)
    load_bitmap(BATTLEBACK_DIR, filename)
  end
end


#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :battleback              # filename of battleback
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias bback_initialize initialize
  def initialize
    bback_initialize
    @battleback = nil
  end
end



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  This class brings together battle screen sprites. It's used within the
# Scene_Battle class.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Create Battleback Sprite
  #--------------------------------------------------------------------------
  alias bback_create_battleback create_battleback
  def create_battleback
    # Perform and exit for battletests
    if $BTEST
      if BATTLEBACK_TEST != nil
        # Create Battleback sprite
        @battleback_sprite = Sprite.new(@viewport1)
        # Load image from cache
        @battleback_sprite.bitmap = Cache.battleback(BATTLEBACK_TEST)
        return
      else
        bback_create_battleback
        return
      end
    end
    # If map used 'called' battleback. 
    if $game_system.battleback != nil
      # Create Battleback sprite
      @battleback_sprite = Sprite.new(@viewport1)
      # Load image from cache
      @battleback_sprite.bitmap = Cache.battleback($game_system.battleback)   
    # If map has assigned battleback
    elsif BATTLEBACK_LIST.key?($game_map.map_id)
      # Create Battleback sprite
      @battleback_sprite = Sprite.new(@viewport1)
      # Load image from cache
      @battleback_sprite.bitmap = Cache.battleback(BATTLEBACK_LIST[$game_map.map_id])
    # Otherwise, as normal
    else
      # Perform the original call
      bback_create_battleback
    end
  end 
  #--------------------------------------------------------------------------
  # * Create Battlefloor Sprite
  #-------------------------------------------------------------------------- 
  alias bback_create_battlefloor create_battlefloor
  def create_battlefloor
    # Disable battlefloor for existing battleback maps
    if BATTLEBACK_LIST.key?($game_map.map_id) or $game_system.battleback != nil
      @battlefloor_sprite = Sprite.new(@viewport1)
      return
    end
    # Disable for battletests with set battleback
    if $BTEST
      if BATTLEBACK_TEST != nil
        @battlefloor_sprite = Sprite.new(@viewport1)
        return
      end
    end
    # Perform the original call
    bback_create_battlefloor
  end
end

Hướng dẫn:
Hình để trong thư mục:
Graphics/Battlebacks/

Kích thước ảnh:
544x416

Mỗi map một battleback, chỉnh trong script, ta thấy:
BATTLEBACK_LIST = {
1 => "BG7",

Nghĩa là map ID = 1 có battleback là file hình có tên BG7.png

Còn dòng:
BATTLEBACK_TEST = "BG004"
Nghĩa là khi test dùng file hình này

Muốn thay đổi battleback trong game thì gọi script sau (Event Command -> Script):
$game_system.battleback = "filename"
"filename" là tên hình, nhớ là có dấu nháy "


Chữ ký của duongtiep
Về Đầu Trang Go down
https://makegame.forumvi.com
skriptank
Level 1
Level 1


Tổng số bài gửi : 34
MGV Xu : 90
Danh tiếng : 8
Ngày tham gia : 15/12/2010
Đến từ : http://anhhungthieunien.22web.net/

Battle back Empty
Bài gửiTiêu đề: Re: Battle back   Battle back I_icon_minitime15/12/2010, 21:20

cho cấy S coi cho đỡ
Chữ ký của skriptank
Về Đầu Trang Go down
http://anhhungthieunien.22web.net/
duongtiep
Level 15
Level 15
duongtiep

Danh hiệu : The King
Tổng số bài gửi : 1229
MGV Xu : 2677
Danh tiếng : 45
Ngày tham gia : 10/12/2010
Đến từ : Quảng Ninh

Battle back Empty
Bài gửiTiêu đề: Re: Battle back   Battle back I_icon_minitime15/12/2010, 21:22

không có khổ thế đấy để mai up vậy
Chữ ký của duongtiep
Về Đầu Trang Go down
https://makegame.forumvi.com
L.V
Level 4
Level 4
L.V

Tổng số bài gửi : 197
MGV Xu : 341
Danh tiếng : 9
Ngày tham gia : 13/12/2010
Tuổi : 29
Đến từ : Cầu Xe Hội

Battle back Empty
Bài gửiTiêu đề: Re: Battle back   Battle back I_icon_minitime16/12/2010, 10:01

Không có cái này Battle của VX xấu ẹt ! Nhất là battle taiken hay gì gì đó !
Chữ ký của L.V
Về Đầu Trang Go down
http://cauxe.come.vn
Sponsored content




Battle back Empty
Bài gửiTiêu đề: Re: Battle back   Battle back I_icon_minitime

Chữ ký của Sponsored content
Về Đầu Trang Go down
 

Battle back

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang 

 Similar topics

+
Trang 1 trong tổng số 1 trang

Permissions in this forum:Bạn không có quyền trả lời bài viết
 :: RPG VX :: Script-
Chuyển đến