Gió vẫn thôi, mưa vẫn rơi, trời đông vẫn đầy tuyết - Người xưa nay ở đâu?

  • Thread starter Thread starter ken10
  • Ngày gửi Ngày gửi
thế thj` cùng thống nhất đi , mình là đi từ RPG maker 2000 cho đến VX nên bản nào cũng có thể sử dụng , mặc dù ko có bản nào thật sự thông thạo :))
mình có thể cắt ghép hình char cho các bạn , như 1 nhân vật và 1 con sói tớ sẽ ghép thành 1 nhân vật cưỡi sói :P
hoặc vài ba việc nếu đc giao thj` cũng muốn thử xem sao
nếu như tạo 1 game thj` nhưng điều cơ bản này phải phân công ra làm nè
_cốt chuyện
_các nhận vật chính
_nhận vật phụ (NPC)
_item
_các map



cho hỏi luôn XP hiện có web nào tạo char ko
 
VX đi ;))

tớ sẽ đảm nhận việc làm hệ thống Skill, Weapon, Armor, Item

cái này chắc mọi người ngại sờ vào nhất :))
 
mình có thể cắt ghép hình char cho các bạn , như 1 nhân vật và 1 con sói tớ sẽ ghép thành 1 nhân vật cưỡi sói

Way :-o, làm được nhân vật cưỡi sói + ngựa à :D, hay hay đấy.

Anh Thunder làm Animation + Skill thôi heh~ :-".
 
Anh Thunder làm Animation + Skill thôi heh~ .

yên tâm đi ;))

về VX thì anh gần như khai thác hết chức năng của nó rồi

nên phần nào anh cũng có thể tham gia vào làm dc :">
 
:| Có ai down được tài nguyên bên 66rpg không? :|

:|Đang cần thêm tài nguyên battle 45 độ mà tìm mãi không biết down chỗ nào.:|
 
Có ai down được tài nguyên bên 66rpg không?

Đang cần thêm tài nguyên battle 45 độ mà tìm mãi không biết down chỗ nào.

Trang của nó là gì, để em vào thử xem :|
 
@dân makegame mà ko biết trang 66rpg sao ?
mún down j` thj` vào đây
ftp://ftp3.66rpg.com/
ID : 6rpic
Pass : dl
hơi khó down đấy
trang chủ
http://www.66rpg.com/

mỗi lần vào trang này là hoa hết cả mắt :|

trở lại vấn đề chính, thống nhất xong phần phân công công việc chưa vậy :-?
 
trang 66rpg đó thật ra mình cũng ko rõ cách sắp xếp của nó nên cũng ko biết nó để tài nguyên đánh chéo XP ở đâu , mình chỉ vào phần tài nguyên down đc j` thj` down thôi
bây h bạn nào nói có cốt truyện sẵn thj` cho anh em xem , nếu cần thj` chỉnh sửa lại 1 tí sau đó chọn char nhân vật chính , tạo map và thống nhất dùng các script nào sau đó cả bọn down về các thứ cần thiết sau đó phân công công việc ai rành gi` thj` làm cái đó
mình nghĩ với VX đầu tiên sử dụng battle RPG Tankentai cho dễ
vừa thấy trang tạo face
http://rpgstuff.byethost15.com/moromagalabo.html
mà sao thấy toàn con gái ai mò dùm coi có tạo cho con trai ko
 
Mình đã làm một cái Frame trên nền XP =)). Tối nay sẽ up lên hé
 
Mã:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/    ◆            Tileset Extension - KGC_TilesetExtension            ◆ VX ◆
#_/    ◇                    Last Update: 2008/07/13                          ◇
#_/    ◆                 Translation by Mr. Anonymous                        ◆
#_/   ◆ http://ytomy.sakura.ne.jp/                                            ◆
#_/-----------------------------------------------------------------------------
#_/  This script restores some functionanlity pertaining to tilesets that were 
#_/  originally included in previous RPG Makers.
#_/
#_/                        ★ Restored Functions ★ 
#_/   1. Tilesets may be changed to different tileset files.
#_/   2. 4-way Directional Passability 
#_/   3. Terrain tags. (Up to 99!)
#_/
#_/  Note: When the tileset is changed, it DOES NOT appear within the editor.
#_/        You may want to open the image in an external viewer for reference.
#_/-----------------------------------------------------------------------------
#_/                       ◆ 2008/07/13 UPDATE [KGC] ◆
#_/               Bugfix relating to loading extra tilesets.
#_/-----------------------------------------------------------------------------
#_/                       ◆ 2008/05/29 UPDATE [MRA] ◆
#_/   Added a method to designate a variable within the customization block of
#_/    this script that stores the terrain tag the player is currently standing
#_/    on. This should help a small bit with lag caused by parallel processes.
#_/=============================================================================
#_/                         ◆ Instructions For Usage ◆
#_/ To set up the 4-way directional passability properties and the terrain tag
#_/  features on a given tile, use the VXTilesetTool located in the Tileset Tool
#_/  folder of this project.
#_/  
#_/  The following tags are to be entered after a map's name.
#_/   [SET "PresetName"]
#_/    Refer to the customization block to understand this feature.
#_/  
#_/   [INHERIT]
#_/    Uses the same tileset settings as the parent map.
#_/  
#_/                          ◆ Script Commands ◆
#_/  These commands are used in the "Script" function in the third page of event
#_/   commands under "Advanced". These commands are all terrain-related.
#_/  
#_/   * get_terrain_tag(x, y, variable_id)
#_/      Obtains the terrain tag at the specified x/y coordinates and stores it 
#_/       in the designated variable.
#_/  
#_/   * get_event_terrain_tag(event_id, variable_id)
#_/      Obtains the terrain tag where a specified event is located and stores 
#_/       it in the designated variable.
#_/  
#_/   * get_player_terrain_tag(variable_id)
#_/      Obtains the terrain tag where a player is currently located and it in
#_/       the designated variable.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

#==============================================================================#
#                             ★ Customization ★                                #
#==============================================================================#


module KGC
 module TilesetExtension
  #                     ◆ Required Text String Prefix ◆
  #  This is the text string the script searches for in regards to tilesets in
  #   your "Graphics\System" folder.
  TILE_IMAGE_PREFIX = "Tile"
  
  #                     ◆ Player Terrain Tag Variable ◆
  #  The current terrain tag that the player is standing on is stored here.
  PLAYER_TERRAIN_TAG = 1

  #                       ◆ Tileset Image Preset ◆ 
  TILE_PRESET = {}  # ← Do not remove or alter this!
  # The custom tilesets are defined below.
  #  In this example, the script would search for images in the system folder
  #    labeled XN-Castle, and appoints the appropriate tile category by name.
  #    Where X = Tile Category(A,B,C,D,E) Where N = Sub autotile Number
  # Also of note that the text that appears after TILE_PRESET in the brackets []
  #  is what designates your preset Tile groupings.
  #  So all the tilesets defined after ["Castle"] in the example are bound to
  #  the "Castle" tag.
  #
  #      TILE_PRESET["Castle"] = {
  #         "A1"=>"A1-Castle",
  #         "A2"=>"A2-Castle",
  #         "B"=>"B-Castle",
  #         "D"=>"D-Castle",
  #       }
  #
  # By entering [SET Castle] to the end of a map's name (in Map Properties), the 
  #  map would use the tiles defined in the above expression for that particular
  #  map instead of the default tiles A1, A2, B, and D.

  #                  ◆ Insert Custom Tileset Presets Below ◆ 
  # Note: The following is used as a sample for the Black and White Forest 
  # section of the KGC library demo. Please alter this to your needs.
    TILE_PRESET["BW"] = {
       "A1"=>"A1-BW",
       "A2"=>"A2-BW",
       "A3"=>"A3-BW",
       "A4"=>"A4-BW",
       "A5"=>"A5-BW",
       "B"=>"B-BW",
       "C"=>"C-BW",
       "D"=>"D-BW",
    } 
  
  
  #                  ◆ Insert Custom Tileset Presets Above ◆  
  
  #            ◆ Four-way Direction Passage and Terrain Tag Button ◆ 
  #   (For debugging only, available in playtesting mode)
  #  To indicate the four-way directional passage setting of the current tile,
  #   you'd press this key (F7 by default).
  #  The terrain features tag is displayed in a popup dialog box.
  #  This function becomes invalid when setting it to nil.
  DEBUG_INFO_BUTTON = Input::F7
 end
end

#------------------------------------------------------------------------------#

# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
#  Unless you know what you're doing, it's best not to alter anything beyond  #
#  this point, as this only affects the tags used for the Map name and how    #
#  the script sets up the extra Tile sets.                                    #
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #

$imported = {} if $imported == nil
$imported["TilesetExtension"] = true

if $data_mapinfos == nil
  $data_mapinfos = load_data("Data/MapInfos.rvdata")
end

  # Direction Flag Module(for four-way directional passability)
module DirectionFlag
  DOWN  = 0x01
  LEFT  = 0x02
  RIGHT = 0x04
  UP    = 0x08
end

module KGC::TilesetExtension
  # File name of extended tile set data.
  EX_RVDATA = "TilesetEx.rvdata"

  # Regular Expressions Defined
  module Regexp
    # Inherit tag string
    INHERIT = /\[INHERIT\]/i
    # Preset tag string
    PRESET = /\[SET ([\w\-]+)\]/i
  end

  # Default tile set file names
  #  "File Suffix"=>"Full Filename"
  DEFAULT_FILENAME = {
    "A1"=>"TileA1", # This is the first and second rows of autotiles
    "A2"=>"TileA2", # This is the 3rd-6th rows of autotiles 
    "A3"=>"TileA3", # This is the 7th-10th rows of autotiles
    "A4"=>"TileA4", # This is the 11th-16th of the autotiles.
    "A5"=>"TileA5", # This is the rest of the TileA tiles.
    "B"=>"TileB",   # TileB tiles.
    "C"=>"TileC",   # TileC tiles.
    "D"=>"TileD",   # TileD tiles.
    "E"=>"TileE"    # TileE tiles.
  }
  @@__filename = DEFAULT_FILENAME.dup

  module_function
  #--------------------------------------------------------------------------
  # ○ Initialize Tileset Filename
  #     map_id : Map ID
  #--------------------------------------------------------------------------
  def init_tileset_filename(map_id)
    @@__filename = get_converted_tileset_filename(map_id)
  end
  #--------------------------------------------------------------------------
  # ○ Get Convertered Tileset Filename
  #     map_id : Map ID
  #--------------------------------------------------------------------------
  def get_converted_tileset_filename(map_id)
    info = $data_mapinfos[map_id]
    name = info.original_name
    filename = DEFAULT_FILENAME.dup
    if name =~ Regexp::INHERIT
      # Retrieve parent map ID
      parent_id = $data_mapinfos[map_id].parent_id
      if parent_id > 0
        filename = get_converted_tileset_filename(parent_id)
      end
    end
    # Jump to Convert Tileset Filename method
    return convert_tileset_filename(filename, name)
  end
  #--------------------------------------------------------------------------
  # ○ Convert Tileset Filename
  #     filename : Image Filename (Hash)
  #     map_name : Map Name
  #--------------------------------------------------------------------------
  def convert_tileset_filename(filename, map_name)
    name_buf = filename.dup
    # Determine Preset
    presets = map_name.scan(Regexp::PRESET)
    presets.each { |s|
      if TILE_PRESET.has_key?(s[0])
        TILE_PRESET[s[0]].each { |k, v|
          name_buf[k] = TILE_IMAGE_PREFIX + v
        }
      end
    }
     # Convert Map Name
     DEFAULT_FILENAME.keys.each { |key|
      if map_name =~ /\[#{key} ([\w\-]+)\]/
        name_buf[key] = TILE_IMAGE_PREFIX + $1
      end
    }
    return name_buf
  end
  #--------------------------------------------------------------------------
  # ○ Get Tileset Filename
  #--------------------------------------------------------------------------
  def get_tileset_filename
    return @@__filename
  end
end

#==============================================================================
# □ KGC::Commands
#==============================================================================

module KGC::Commands
  module_function
  #--------------------------------------------------------------------------
  # ○ Get Terrain Tag
  #     x : X Coordinate of Map
  #     y : Y Coordinate of Map
  #     variable_id : In-Game Variable ID
  #--------------------------------------------------------------------------
  def get_terrain_tag(x, y, variable_id = 0)
    tag = $game_map.terrain_tag(x, y)       # Assign the X/Y coordinate
    if variable_id > 0
      $game_variables[variable_id] = tag    # Assign the tag to the variable
    end
    return tag
  end
  #--------------------------------------------------------------------------
  # ○ Get Event Terrain tag
  #     event_id : Event ID
  #     variable_id : In-Game Variable ID
  #--------------------------------------------------------------------------
  def get_event_terrain_tag(event_id, variable_id = 0)
    event = $game_map.events.values.find { |e| e.id == event_id }
    if event == nil
     # If there is no event, the value is set to 0.
      tag = 0
    else
      tag = $game_map.terrain_tag(event.x, event.y)
    end

    # If the variable is assigned, the tag is stored there.
    if variable_id > 0
      $game_variables[variable_id] = tag
    end
    return tag
  end
  #--------------------------------------------------------------------------
  # ○ Get Player Terrain Tag
  #     variable_id : In-Game Variable ID
  #--------------------------------------------------------------------------
  def get_player_terrain_tag(variable_id = 0)
    tag = $game_map.terrain_tag($game_player.x, $game_player.y)

    # If the variable is assigned, the tag is stored there.
    if variable_id > 0
      $game_variables[variable_id] = tag
    end
    return tag
  end
end

class Game_Interpreter
  include KGC::Commands
end

#==============================================================================
# ■ RPG::MapInfo
#==============================================================================

class RPG::MapInfo
  #--------------------------------------------------------------------------
  # ● Map Name
  #--------------------------------------------------------------------------
  def name
    return @name.gsub(/\[.*\]/) { "" }
  end
  #--------------------------------------------------------------------------
  # ○ Original Map Name
  #--------------------------------------------------------------------------
  def original_name
    return @name
  end
end

#==============================================================================
# □ RPG::Tileset
#------------------------------------------------------------------------------
#   Define new properties to the Tileset class
#==============================================================================

class RPG::Tileset
  #--------------------------------------------------------------------------  
  # ○ Table Size
  #--------------------------------------------------------------------------
  TABLE_SIZE = 8192                       # 通行・地形タグテーブルのサイズ
  #--------------------------------------------------------------------------
  # ○ Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :version                  # Map Version
  attr_accessor :passages                 # 4-Way Directional Passages
  attr_accessor :terrain_tags             # Terrain Tags
  #--------------------------------------------------------------------------
  # ○ Initialize
  #--------------------------------------------------------------------------
  def initialize
    @version = 1
    @passages = Table.new(TABLE_SIZE)
    @terrain_tags = Table.new(TABLE_SIZE)
  end
end

#==============================================================================
# ■ Game_Map
#==============================================================================

class Game_Map
  LAYERS = [2, 1, 0]
  #--------------------------------------------------------------------------
  # ● Setup
  #     map_id : Map ID
  #--------------------------------------------------------------------------
  alias setup_KGC_TilesetExtension setup
  def setup(map_id)
    @map_id = map_id
    init_tileset_filename

    setup_KGC_TilesetExtension(map_id)
  end
  #--------------------------------------------------------------------------
  # ○ Initialize Tileset Filename
  #--------------------------------------------------------------------------
  def init_tileset_filename
    KGC::TilesetExtension.init_tileset_filename(@map_id)
  end
  #--------------------------------------------------------------------------
  # ○ Define Passage
  #     x : X Position
  #     y : Y Position
  #--------------------------------------------------------------------------
  def passage(x, y)
    LAYERS.each { |i|
      tile_id = @map.data[x, y, i]
      return 0 if tile_id == nil
      return $data_tileset.passages[tile_id]
    }
    return 0
  end
  #--------------------------------------------------------------------------
  # ○ Define Terrain Tag
  #     x : X Position
  #     y : Y Position
  #--------------------------------------------------------------------------
  def terrain_tag(x, y)
    LAYERS.each { |i|
      tile_id = @map.data[x, y, i]               # タイル ID を取得
      return 0 if tile_id == nil                 # タイル ID 取得失敗 : タグなし
      tag = $data_tileset.terrain_tags[tile_id]  # 地形タグを取得
      return tag if tag > 0                      # タグが設定してあれば返す
    }
    return 0
  end
  #--------------------------------------------------------------------------
  # ○ Define Passable Direction Flag
  #     x : X Position
  #     y : Y Position
  #     d : Direction
  #--------------------------------------------------------------------------
  def passable_dir?(x, y, d)
    # 方向 (0,2,4,6,8,10) から 通行フラグ (0,1,2,4,8,0) に変換
    flag = (1 << (d / 2 - 1)) & 0x0F

    LAYERS.each { |i|                         # レイヤーの上から順に調べる
      tile_id = @map.data[x, y, i]            # タイル ID を取得
      return false if tile_id == nil          # タイル ID 取得失敗 : 通行不可
      pass = $data_tileset.passages[tile_id]  # タイルセットの通行属性を取得
      return false if pass & flag != 0x00     # フラグが立っていたら通行不可
    }
    return true
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Character
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # ○ 通行可能判定
  #     x : X 座標
  #     y : Y 座標
  #     d : 移動方向 (省略時: 10)
  #--------------------------------------------------------------------------
  def passable?(x, y, d = 10)
    nx = moved_x(x, d)
    ny = moved_y(y, d)
    nx = $game_map.round_x(nx)                         # 横方向ループ補正
    ny = $game_map.round_y(ny)                         # 縦方向ループ補正
    return false unless $game_map.valid?(nx, ny)       # マップ外?
    return true if @through or debug_through?          # すり抜け ON?
    return false unless map_passable?(x, y, d)         # 指定方向に移動不能?
    return false unless map_passable?(nx, ny, 10 - d)  # 移動先が進入不能?
    return false if collide_with_characters?(nx, ny)   # キャラクターに衝突?
    return true                                        # 通行可
  end
  #--------------------------------------------------------------------------
  # ○ 移動後の X 座標算出
  #     x : X 座標
  #     d : 移動方向
  #    移動後の X 座標を計算する。
  #--------------------------------------------------------------------------
  def moved_x(x, d)
    return x + (d == 6 ? 1 : d == 4 ? -1 : 0)
  end
  #--------------------------------------------------------------------------
  # ○ 移動後の Y 座標算出
  #     y : Y 座標
  #     d : 移動方向
  #    移動後の Y 座標を計算する。
  #--------------------------------------------------------------------------
  def moved_y(y, d)
    return y + (d == 2 ? 1 : d == 8 ? -1 : 0)
  end
  #--------------------------------------------------------------------------
  # ○ マップ通行可能判定
  #     x : X 座標
  #     y : Y 座標
  #     d : 移動方向
  #    指定座標の指定した方向が通行可能かを取得する。
  #--------------------------------------------------------------------------
  def map_passable?(x, y, d)
    return $game_map.passable?(x, y) && $game_map.passable_dir?(x, y, d)
  end
  #--------------------------------------------------------------------------
  # ● 下に移動
  #     turn_ok : その場での向き変更を許可
  #--------------------------------------------------------------------------
  def move_down(turn_ok = true)
    if passable?(@x, @y, 2)                 # 通行可能
      turn_down
      @y = $game_map.round_y(@y+1)
      @real_y = (@y-1)*256
      increase_steps
      @move_failed = false
      #------------------------------------------------------------------
      # ○ Check Player's Terrain Tag
      #     * Added by Mr. Anonymous 5/29/2008
      #------------------------------------------------------------------  
        tag = $game_map.terrain_tag($game_player.x, $game_player.y)
        $game_variables[KGC::TilesetExtension::PLAYER_TERRAIN_TAG] = tag
        return tag
    else                                    # 通行不可能
      turn_down if turn_ok
      check_event_trigger_touch(@x, @y+1)   # 接触イベントの起動判定
      @move_failed = true
    end
  end
  #--------------------------------------------------------------------------
  # ● 左に移動
  #     turn_ok : その場での向き変更を許可
  #--------------------------------------------------------------------------
  def move_left(turn_ok = true)
    if passable?(@x, @y, 4)                 # 通行可能
      turn_left
      @x = $game_map.round_x(@x-1)
      @real_x = (@x+1)*256
      increase_steps
      @move_failed = false
      #------------------------------------------------------------------
      # ○ Check Player's Terrain Tag
      #     * Added by Mr. Anonymous 5/29/2008
      #------------------------------------------------------------------  
        tag = $game_map.terrain_tag($game_player.x, $game_player.y)
        $game_variables[KGC::TilesetExtension::PLAYER_TERRAIN_TAG] = tag
        return tag
    else                                    # 通行不可能
      turn_left if turn_ok
      check_event_trigger_touch(@x-1, @y)   # 接触イベントの起動判定
      @move_failed = true
    end
  end
  #--------------------------------------------------------------------------
  # ● 右に移動
  #     turn_ok : その場での向き変更を許可
  #--------------------------------------------------------------------------
  def move_right(turn_ok = true)
    if passable?(@x, @y, 6)                 # 通行可能
      turn_right
      @x = $game_map.round_x(@x+1)
      @real_x = (@x-1)*256
      increase_steps
      @move_failed = false
      #------------------------------------------------------------------
      # ○ Check Player's Terrain Tag
      #     * Added by Mr. Anonymous 5/29/2008
      #------------------------------------------------------------------  
        tag = $game_map.terrain_tag($game_player.x, $game_player.y)
        $game_variables[KGC::TilesetExtension::PLAYER_TERRAIN_TAG] = tag
        return tag
    else                                    # 通行不可能
      turn_right if turn_ok
      check_event_trigger_touch(@x+1, @y)   # 接触イベントの起動判定
      @move_failed = true
    end
  end
  #--------------------------------------------------------------------------
  # ● 上に移動
  #     turn_ok : その場での向き変更を許可
  #--------------------------------------------------------------------------
  def move_up(turn_ok = true)
    if passable?(@x, @y, 8)                 # 通行可能
      turn_up
      @y = $game_map.round_y(@y-1)
      @real_y = (@y+1)*256
      increase_steps
      @move_failed = false
      #------------------------------------------------------------------
      # ○ Check Player's Terrain Tag
      #     * Added by Mr. Anonymous 5/29/2008
      #------------------------------------------------------------------  
        tag = $game_map.terrain_tag($game_player.x, $game_player.y)
        $game_variables[KGC::TilesetExtension::PLAYER_TERRAIN_TAG] = tag
        return tag
    else                                    # 通行不可能
      turn_up if turn_ok
      check_event_trigger_touch(@x, @y-1)   # 接触イベントの起動判定
      @move_failed = true
    end
  end
  #--------------------------------------------------------------------------
  # ● 左下に移動
  #--------------------------------------------------------------------------
  def move_lower_left
    unless @direction_fix
      @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
    end
    if (passable?(@x, @y, 2) && passable?(@x, @y+1, 4)) ||
       (passable?(@x, @y, 4) && passable?(@x-1, @y, 2))
      @x -= 1
      @y += 1
      increase_steps
      @move_failed = false
      #------------------------------------------------------------------
      # ○ Check Player's Terrain Tag
      #     * Added by Mr. Anonymous 5/29/2008
      #------------------------------------------------------------------  
        tag = $game_map.terrain_tag($game_player.x, $game_player.y)
        $game_variables[KGC::TilesetExtension::PLAYER_TERRAIN_TAG] = tag
        return tag
    else
      @move_failed = true
    end
  end
  #--------------------------------------------------------------------------
  # ● 右下に移動
  #--------------------------------------------------------------------------
  def move_lower_right
    unless @direction_fix
      @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
    end
    if (passable?(@x, @y, 2) && passable?(@x, @y+1, 6)) ||
       (passable?(@x, @y, 6) && passable?(@x+1, @y, 2))
      @x += 1
      @y += 1
      increase_steps
      @move_failed = false
      #------------------------------------------------------------------
      # ○ Check Player's Terrain Tag
      #     * Added by Mr. Anonymous 5/29/2008
      #------------------------------------------------------------------  
        tag = $game_map.terrain_tag($game_player.x, $game_player.y)
        $game_variables[KGC::TilesetExtension::PLAYER_TERRAIN_TAG] = tag
        return tag
    else
      @move_failed = true
    end
  end
  #--------------------------------------------------------------------------
  # ● 左上に移動
  #--------------------------------------------------------------------------
  def move_upper_left
    unless @direction_fix
      @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
    end
    if (passable?(@x, @y, 8) && passable?(@x, @y-1, 4)) ||
       (passable?(@x, @y, 4) && passable?(@x-1, @y, 8))
      @x -= 1
      @y -= 1
      increase_steps
      @move_failed = false
      #------------------------------------------------------------------
      # ○ Check Player's Terrain Tag
      #     * Added by Mr. Anonymous 5/29/2008
      #------------------------------------------------------------------  
        tag = $game_map.terrain_tag($game_player.x, $game_player.y)
        $game_variables[KGC::TilesetExtension::PLAYER_TERRAIN_TAG] = tag
        return tag
    else
      @move_failed = true
    end
  end
  #--------------------------------------------------------------------------
  # ● 右上に移動
  #--------------------------------------------------------------------------
  def move_upper_right
    unless @direction_fix
      @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
    end
    if (passable?(@x, @y, 8) && passable?(@x, @y-1, 6)) ||
       (passable?(@x, @y, 6) && passable?(@x+1, @y, 8))
      @x += 1
      @y -= 1
      increase_steps
      @move_failed = false
      #------------------------------------------------------------------
      # ○ Check Player's Terrain Tag
      #     * Added by Mr. Anonymous 5/29/2008
      #------------------------------------------------------------------  
        tag = $game_map.terrain_tag($game_player.x, $game_player.y)
        $game_variables[KGC::TilesetExtension::PLAYER_TERRAIN_TAG] = tag
        return tag
    else
      @move_failed = true
    end
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Player
#==============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # ○ マップ通行可能判定
  #     x : X 座標
  #     y : Y 座標
  #     d : 移動方向
  #    指定座標の指定した方向が通行可能かを取得する。
  #--------------------------------------------------------------------------
  alias map_passable_KGC_TilesetExtension? map_passable?
  def map_passable?(x, y, d)
    return false unless map_passable_KGC_TilesetExtension?(x, y)

    return $game_map.passable_dir?(x, y, d)
  end

  if $TEST && KGC::TilesetExtension::DEBUG_INFO_BUTTON != nil
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  alias update_KGC_TilesetExtension update
  def update
    update_KGC_TilesetExtension

    if Input.trigger?(KGC::TilesetExtension::DEBUG_INFO_BUTTON)
      show_passage_and_terrain_tag
    end
  end
  #--------------------------------------------------------------------------
  # ○ プレイヤー位置の通行フラグ・地形タグを表示
  #--------------------------------------------------------------------------
  def show_passage_and_terrain_tag
    passage = $game_map.passage(x, y)
    tag = $game_map.terrain_tag(x, y)

    # デバッグ情報作成
    s = "通行可能: "
    s += "↓" if passage & DirectionFlag::DOWN  == 0x00
    s += "←" if passage & DirectionFlag::LEFT  == 0x00
    s += "→" if passage & DirectionFlag::RIGHT == 0x00
    s += "↑" if passage & DirectionFlag::UP    == 0x00
    s += "  地形タグ: #{tag}"

    p s
  end
  end

end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Sprite_Character
#==============================================================================

class Sprite_Character < Sprite_Base
  #--------------------------------------------------------------------------
  # ● 指定されたタイルが含まれるタイルセット画像の取得
  #     tile_id : タイル ID
  #--------------------------------------------------------------------------
  def tileset_bitmap(tile_id)
    filename = KGC::TilesetExtension.get_tileset_filename
    set_number = tile_id / 256
    return Cache.system(filename["B"]) if set_number == 0
    return Cache.system(filename["C"]) if set_number == 1
    return Cache.system(filename["D"]) if set_number == 2
    return Cache.system(filename["E"]) if set_number == 3
    return nil
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Spriteset_Map
#==============================================================================

class Spriteset_Map
  #--------------------------------------------------------------------------
  # ● タイルマップの作成
  #--------------------------------------------------------------------------
  def create_tilemap
    filename = KGC::TilesetExtension.get_tileset_filename
    @tilemap = Tilemap.new(@viewport1)
    @tilemap.bitmaps[0] = Cache.system(filename["A1"])
    @tilemap.bitmaps[1] = Cache.system(filename["A2"])
    @tilemap.bitmaps[2] = Cache.system(filename["A3"])
    @tilemap.bitmaps[3] = Cache.system(filename["A4"])
    @tilemap.bitmaps[4] = Cache.system(filename["A5"])
    @tilemap.bitmaps[5] = Cache.system(filename["B"])
    @tilemap.bitmaps[6] = Cache.system(filename["C"])
    @tilemap.bitmaps[7] = Cache.system(filename["D"])
    @tilemap.bitmaps[8] = Cache.system(filename["E"])
    @tilemap.map_data = $game_map.data
    @tilemap.passages = $game_map.passages
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_Title
#==============================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # ● データベースのロード
  #--------------------------------------------------------------------------
  alias load_database_KGC_TilesetExtension load_database
  def load_database
    load_database_KGC_TilesetExtension

    load_tileset
  end
  #--------------------------------------------------------------------------
  # ○ タイルセット付加情報のロード
  #--------------------------------------------------------------------------
  def load_tileset
    begin
      $data_tileset = load_data("Data/#{KGC::TilesetExtension::EX_RVDATA}")
    rescue
      $data_tileset = RPG::Tileset.new
    end
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_File
#==============================================================================

class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # ● セーブデータの読み込み
  #     file : 読み込み用ファイルオブジェクト (オープン済み)
  #--------------------------------------------------------------------------
  alias read_save_data_KGC_TilesetExtension read_save_data
  def read_save_data(file)
    read_save_data_KGC_TilesetExtension(file)

    $game_map.init_tileset_filename
    Graphics.frame_reset
  end
end

cái tiletools thj` bjk xai` mà cái này thj` ko bjk xài
ai giúp với ò 3 ngày nay rồi =((
 
TILE_PRESET["BW"] = {
"A1"=>"A1-BW",
"A2"=>"A2-BW",
"A3"=>"A3-BW",
"A4"=>"A4-BW",
"A5"=>"A5-BW",
"B"=>"B-BW",
"C"=>"C-BW",
"D"=>"D-BW",
}

Cái này là định nghĩa một bộ tileset.
"A1"=>"A1-BW" tức là tileset A1 của bộ tileset BW sẽ có tên TileA1-BW.png. Tương tự. Cái file tileset nằm trong thư mục System.
Cơ cấu 1 bộ tileset thì xem ở đây : http://tkool.jp/products/rpgvx/eng/material.html

Trong RPG Maker VX, nếu cậu muốn một map nào đó sử dụng bộ tileset đã định nghĩa thì thêm [SET tentileset] vào cuối map name. Ví dụ sử dụng bộ tileset BW trên vào map tên là Castle. Thì tên map sẽ đặt là Castle [SET BW]
 
\m/ Mọi người cố gắng nhé. Tớ cổ vũ hết mình. \m/

:) Về phần tớ sẽ cố gắng không để thua kém mọi người.:)
 
+ Em phát rep xem sao anh Gla...
 
đề nghị ai đã đăng kí không bỏ dở giữa chừng ghen :-w
 
TILE_PRESET["BW"] = {
"A1"=>"A1-BW",
"A2"=>"A2-BW",
"A3"=>"A3-BW",
"A4"=>"A4-BW",
"A5"=>"A5-BW",
"B"=>"B-BW",
"C"=>"C-BW",
"D"=>"D-BW",
}

Cái này là định nghĩa một bộ tileset.
"A1"=>"A1-BW" tức là tileset A1 của bộ tileset BW sẽ có tên TileA1-BW.png. Tương tự. Cái file tileset nằm trong thư mục System.
Cơ cấu 1 bộ tileset thì xem ở đây : http://tkool.jp/products/rpgvx/eng/material.html

Trong RPG Maker VX, nếu cậu muốn một map nào đó sử dụng bộ tileset đã định nghĩa thì thêm [SET tentileset] vào cuối map name. Ví dụ sử dụng bộ tileset BW trên vào map tên là Castle. Thì tên map sẽ đặt là Castle [SET BW]


làm thj` đc rồi , mà vào game mới thấy
 
Hi các bạn,

Các bạn có ý định làm game thể loại ntn? RPG, ARPG, Turn base...
 
Back
Top