加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
这个脚本原作者是小J@fux2
发布的年代较早,所以只有XP和VX通用版本,现在我开VA的坑了,所以把这个脚本改造了一下,添加了VA通行度显示,然后发布出来分享一下。
原始版本请参考小J的此帖:https://rpg.blue/thread-187850-1-1.html
VA截图效果如下:
# 地图通行度显示 by fux2 ,[url]https://rpg.blue/?65553[/url] # 在原脚本的基础上增加VA通行度显示 by P叔 2018-03-31 (托小J的福,照葫芦画瓢) "P叔:来人呐,快把小J绑起来。" # XP,VX,VA通用,游戏中按F5开启通行显示,可以自由修改 $showpass = false $fuxver = self module Fux2 BUTTON = "F5" # 快捷键,在游戏中按下开启本脚本功能 VER = defined?(msgbox()) ? "VA" : ($fuxver ? "VX" : "XP") OPACITY = 150 # 显示通行度图层的透明度(0-255) # 下面请勿随意修改 BLOCK = {"XP"=>{2=>["↓",8,8],4=>["←",0,0],6=>["→",16,0],8=>["↑",8,-8]}, "VX"=>{2=>["",0,0],4=>["",0,0],6=>["",0,0],0x08=>["",0,0]}, "VA"=>{2=>["↓",8,8],4=>["←",0,0],6=>["→",16,0],8=>["↑",8,-8]}, } SET = { "XP"=>[4,Color.new(100,0,100,OPACITY),[2,4,6,8]], "VX"=>[8,Color.new(255,0,0,OPACITY),[1]], "VA"=>[0.03125,Color.new(100,0,100,OPACITY),[2,4,6,8]], } end class Spriteset_Map include Fux2 alias:ini:initialize def initialize @passble = Sprite.new @passble.z = 99999999 @passble.x = -$game_map.display_x/4 @passble.y = -$game_map.display_y/4 @passble.bitmap = Bitmap.new($game_map.width*32,$game_map.height*32) @passble.bitmap.font.size = 16 @passble.bitmap.font.color = Color.new(255,255,255,200) for px in 0...$game_map.width for py in 0...$game_map.height temp = [] SET[VER][2].each do |i| temp << i if $game_map.passable?(px,py,i) end if temp == SET[VER][2] @passble.bitmap.fill_rect(px*32,py*32,32,32,Color.new(0,0,255,OPACITY)) elsif temp == [] @passble.bitmap.fill_rect(px*32,py*32,32,32,Color.new(255,0,0,OPACITY)) else @passble.bitmap.fill_rect(px*32,py*32,32,32,SET[VER][1]) temp.each do |j| @passble.bitmap.draw_text(px*32+BLOCK[VER][j][1],py*32+BLOCK[VER][j][2],32,32,BLOCK[VER][j][0]) end end end end ini end alias:ud:update def update ud @passble.visible = $showpass @passble.x = -$game_map.display_x/SET[VER][0] @passble.y = -$game_map.display_y/SET[VER][0] @passble.update end alias:dis:dispose def dispose dis @passble.dispose end end class Scene_Map alias:ud:update def update ud eval("$showpass = !$showpass if Input.trigger?(Input::#{Fux2::BUTTON})") end end # rpg.blue
# 地图通行度显示 by fux2 ,[url]https://rpg.blue/?65553[/url]
# 在原脚本的基础上增加VA通行度显示 by P叔 2018-03-31 (托小J的福,照葫芦画瓢)
"P叔:来人呐,快把小J绑起来。"
# XP,VX,VA通用,游戏中按F5开启通行显示,可以自由修改
$showpass = false
$fuxver = self
module Fux2
BUTTON = "F5" # 快捷键,在游戏中按下开启本脚本功能
VER = defined?(msgbox()) ? "VA" : ($fuxver ? "VX" : "XP")
OPACITY = 150 # 显示通行度图层的透明度(0-255)
# 下面请勿随意修改
BLOCK = {"XP"=>{2=>["↓",8,8],4=>["←",0,0],6=>["→",16,0],8=>["↑",8,-8]},
"VX"=>{2=>["",0,0],4=>["",0,0],6=>["",0,0],0x08=>["",0,0]},
"VA"=>{2=>["↓",8,8],4=>["←",0,0],6=>["→",16,0],8=>["↑",8,-8]},
}
SET = { "XP"=>[4,Color.new(100,0,100,OPACITY),[2,4,6,8]],
"VX"=>[8,Color.new(255,0,0,OPACITY),[1]],
"VA"=>[0.03125,Color.new(100,0,100,OPACITY),[2,4,6,8]],
}
end
class Spriteset_Map
include Fux2
alias:ini:initialize
def initialize
@passble = Sprite.new
@passble.z = 99999999
@passble.x = -$game_map.display_x/4
@passble.y = -$game_map.display_y/4
@passble.bitmap = Bitmap.new($game_map.width*32,$game_map.height*32)
@passble.bitmap.font.size = 16
@passble.bitmap.font.color = Color.new(255,255,255,200)
for px in 0...$game_map.width
for py in 0...$game_map.height
temp = []
SET[VER][2].each do |i|
temp << i if $game_map.passable?(px,py,i)
end
if temp == SET[VER][2]
@passble.bitmap.fill_rect(px*32,py*32,32,32,Color.new(0,0,255,OPACITY))
elsif temp == []
@passble.bitmap.fill_rect(px*32,py*32,32,32,Color.new(255,0,0,OPACITY))
else
@passble.bitmap.fill_rect(px*32,py*32,32,32,SET[VER][1])
temp.each do |j|
@passble.bitmap.draw_text(px*32+BLOCK[VER][j][1],py*32+BLOCK[VER][j][2],32,32,BLOCK[VER][j][0])
end
end
end
end
ini
end
alias:ud:update
def update
ud
@passble.visible = $showpass
@passble.x = -$game_map.display_x/SET[VER][0]
@passble.y = -$game_map.display_y/SET[VER][0]
@passble.update
end
alias:dis:dispose
def dispose
dis
@passble.dispose
end
end
class Scene_Map
alias:ud:update
def update
ud
eval("$showpass = !$showpass if Input.trigger?(Input::#{Fux2::BUTTON})")
end
end
# rpg.blue
|