赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 4 |
经验 | 6269 |
最后登录 | 2022-1-4 |
在线时间 | 117 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 352
- 在线时间
- 117 小时
- 注册时间
- 2013-9-19
- 帖子
- 55
|
4楼
楼主 |
发表于 2013-10-2 11:19:38
|
只看该作者
#简易图块扩张 by zh99998 2008-11-1
#通行度无法更改
class Spriteset_Map
#在这里添加需要更改图块的地图ID等信息,每行一个地图
#格式: id => {"原文件名" => "新文件名"}
#或: id => {数字 => "新文件名"}
#或: id => [A1,A2,A3,A4,A5,B,C,D,E]
#数字与图块的对应关系:
# 0 => A1, 1 => A2, 2 => A3,
# 3 => A4, 4 => A5, 5 => B,
# 6 => C , 7 => D , 8 => E
#可以省略"Tile"和扩展名
#除了最后一行,其余的行尾加上逗号【,】
EXP = {
1 => {"A1" => "new_A1", 8 => "new_E"},
#示例:001号地图中,用new_A1文件代替TileA1,用new_E文件代替TileE
2 => ["new_A1", "A2", "A3", "A4", "A5", "new_B", "C", "new_D", "new_E"]
#示例:002号地图中,用new_A1文件代替TileA1,用new_B文件代替TileB,new_D代替TileD,new_E代替TileE
#在这里添加
}
def create_tilemap
@tilemap = Tilemap.new(@viewport1)
exp = EXP[$game_map.map_id]
if exp.is_a?(Hash)
bitmaps = ["TileA1", "TileA2", "TileA3", "TileA4", "TileA5", "TileB", "TileC", "TileD", "TileE"]
exp.each do |old, new|
case old
when 0, "A1", "TileA1"
bitmaps[0] = new
when 1, "A2", "TileA2"
bitmaps[1] = new
when 2, "A3", "TileA3"
bitmaps[2] = new
when 3, "A4", "TileA4"
bitmaps[3] = new
when 4, "A5", "TileA5"
bitmaps[4] = new
when 5, "B", "TileB"
bitmaps[5] = new
when 6, "C", "TileC"
bitmaps[6] = new
when 7, "D", "TileD"
bitmaps[7] = new
when 8, "E", "TileE"
bitmaps[8] = new
end
end
elsif exp.is_a?(Array)
bitmaps = exp
end
bitmaps.each_index do |index|
@tilemap.bitmaps[index] = Cache.system(bitmaps[index]) rescue Cache.system("Tile" + bitmaps[index])
end
@tilemap.map_data = $game_map.data
@tilemap.passages = $game_map.passages
end
end |
|