| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 13 |
| 经验 | |
| 最后登录 | 2025-11-23 |
| 在线时间 | 1276 小时 |
○赛
- 梦石
- 0
- 星屑
- 1254
- 在线时间
- 1276 小时
- 注册时间
- 2013-1-22
- 回帖
- 2078

|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
先附上效果图。
就是这个样子,虽然这张图片里面NPC和蓝点不一致,但是是截图的原因,实际上没有问题……
脚本- class Window_MiniMap < Window_Base
- def initialize
- super(0,0,$game_map.width * 8+32 ,$game_map.height * 8+32)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.x = 640 - self.width
- self.opacity = 120
- refresh
- end
- def update
- super
- refresh
- end
- def refresh
- self.contents.clear
- self.contents.fill_rect(0,0,self.width,self.height,Color.new(100,100,100,200))
- for i in 0..$game_map.width
- for j in 0..$game_map.height
- if $game_map.passable?(i,j,0)
- self.contents.fill_rect(i*8,j*8,8,8,Color.new(200,200,200,200))
- end
- if (i == $game_player.x)and(j == $game_player.y)
- self.contents.fill_rect(i*8,j*8,8,8,Color.new(230,180,10,200))
- end
- for l in 0..$game_map.events.size
- if not $game_map.events[l].nil? and $game_map.events[l].x == i and $game_map.events[l].y == j
- unless $game_map.events[l].name =~ /无视我/
- self.contents.fill_rect(i*8,j*8,8,8,Color.new(10,150,200,200))
- end
- end
- end
- end
- end
- end
- end
- class Game_Event < Game_Character
- def name
- return @event.name
- end
- end
- class Scene_Map
- alias mini_map_main main
- def main
- @mini_map = Window_MiniMap.new
- mini_map_main
- @mini_map.dispose
- end
- alias mini_map_update update
- def update
- @mini_map.update
- if $game_switches[1]
- @mini_map.visible = false
- else
- @mini_map.visible = true
- end
- mini_map_update
- end
- end
复制代码
可以说是完全没有优化,而且alias有F12报错的危险……暂时还没有发现bug
然后说下用法。
1.插入脚本到Main前即可生效
2.背景的不透明度在一开始的 self.opacity = 后面改
3.默认1号开关打开时,此窗口消失,1号在$game_switches[1]这里改
4.颜色在Color.new后面的参数里改
5.如果想让事件不显示在小地图上,事件名里面加上“无视我”这三个字
最后说一下,如果有bug我尽量第一时间修复,现在的效果还不是很美观,如果有强力美工能够贡献一些素材就好了~ |
|