Project1
标题:
地图板块增加
[打印本页]
作者:
可爱小魔女120
时间:
2013-9-30 14:10
标题:
地图板块增加
怎么增加地图板块啊!主站上的那个脚本不知道在哪里添加啊!新人求解啊!
作者:
可爱小魔女120
时间:
2013-9-30 17:57
注定秒沉没有人吗?
作者:
铃仙·优昙华院·因幡
时间:
2013-9-30 18:46
地图扩张 脚本有很多个, 都不知道你说的是哪个.
添加一般都是在 Main 之前.
作者:
可爱小魔女120
时间:
2013-10-2 11:19
#简易图块扩张 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
作者:
铃仙·优昙华院·因幡
时间:
2013-10-2 11:50
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
#在这里添加
}
主要说明就是这个啊
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1