赞 | 0 |
VIP | 4 |
好人卡 | 0 |
积分 | 2 |
经验 | 31715 |
最后登录 | 2021-9-11 |
在线时间 | 829 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 180
- 在线时间
- 829 小时
- 注册时间
- 2010-6-26
- 帖子
- 671
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 企鹅达达 于 2015-6-10 18:24 编辑
- =begin
- 通行度快速设置
- by 企鹅达达
- 2015.6.10 v1.0
- 首先,你每个图块文件先设置一次,然后把记录了该文件图块编号、页代码写在下面的
- 表内,事件脚本输入:
- PG_WRITE_DATA::write_data_tileflag
- 保存后运行游戏,触发该事件,游戏会自动关闭,接着不做任何操作关闭编辑器(这很
- 重要),接着再打开就会发现随机组合的图块通行度都设置好了。脚本会自动识别使用的图
- 块文件名,无论你把文件放在B、C、D、E哪一个页面都无所谓
- 这也能防止某个文件图块变更之后要一起更改所有用到这个文件的通行度。现在,你只
- 要把模板上的通行度改掉,再运行脚本就ok了。
- =end
- PG_TILESETS_WRITE_DATA = {
- #-----------------[图块编号,页代码]--------------
- "World_B" =>[1,"B"],
- "Outside_B" =>[2,"B"],
- "Outside_C" =>[2,"C"],
- "Inside_B" =>[3,"B"],
- "Inside_C" =>[3,"C"],
- "Dungeon_B" =>[4,"B"],
- "Dungeon_C" =>[4,"C"],
- "World_A1" =>[1,nil],
- "World_A2" =>[1,nil],
- "Outside_A1" =>[2,nil],
- "Outside_A2" =>[2,nil],
- "Outside_A3" =>[2,nil],
- "Outside_A4" =>[2,nil],
- "Outside_A5" =>[2,nil],
- "Inside_A1" =>[3,nil],
- "Inside_A2" =>[3,nil],
- "Inside_A4" =>[3,nil],
- "Inside_A5" =>[3,nil],
- "Dungeon_A1" =>[4,nil],
- "Dungeon_A2" =>[4,nil],
- "Dungeon_A4" =>[4,nil],
- "Dungeon_A5" =>[4,nil],
- #----------------------------------
- }
- # PG_WRITE_DATA::write_data_tileflag
- module PG_WRITE_DATA
- #--------------------------------------------------------------------------
- # ● Classes
- #--------------------------------------------------------------------------
- def self.write_data_tileflag
- filename = "Data/Tilesets.rvdata2"
- $data = load_data(filename)
- $data.each do |data|
- #=================BCDE通行设置============
- #
- 4.times do |n|
- next if data.nil?
- next if data.tileset_names[n+5].nil? || data.tileset_names[n+5] == ""
- fs = PG_TILESETS_WRITE_DATA[data.tileset_names[n+5]]
- if fs.nil?
- text = "缺少"+ data.tileset_names[n+5]+"的信息!"
- msgbox(text)
- end
- 256.times do |i| # B为0,C为1,D为2,E为3
- case fs[1]
- when "B"; e = 0
- when "C"; e = 1
- when "D"; e = 2
- when "E"; e = 3
- else; next
- end
- data.flags[i+256*n] = $data[fs[0]].flags[i+256*e]
- end
- end
- #
- #=================BCDE通行设置============
- #=================A5通行设置==============
- #
- for i in 1536..1663
- next if data.nil?
- next if data.tileset_names[4].nil? || data.tileset_names[4] == ""
- fs = PG_TILESETS_WRITE_DATA[data.tileset_names[4]]
- if fs.nil?
- text = "缺少"+ data.tileset_names[4]+"的信息!"
- msgbox(text)
- end
- data.flags[i] = $data[fs[0]].flags[i]
- end
- #
- #=================A5通行设置==============
- #=================A1通行设置==============
- #
- for i in 2048..2815
- next if data.nil?
- next if data.tileset_names[0].nil? || data.tileset_names[0] == ""
- fs = PG_TILESETS_WRITE_DATA[data.tileset_names[0]]
- if fs.nil?
- text = "缺少"+ data.tileset_names[0]+"的信息!"
- msgbox(text)
- end
- data.flags[i] = $data[fs[0]].flags[i]
- end
- #
- #=================A1通行设置==============
- #=================A2通行设置==============
- #
- for i in 2816..4351
- next if data.nil?
- next if data.tileset_names[1].nil? || data.tileset_names[1] == ""
- fs = PG_TILESETS_WRITE_DATA[data.tileset_names[1]]
- if fs.nil?
- text = "缺少"+ data.tileset_names[1]+"的信息!"
- msgbox(text)
- end
- data.flags[i] = $data[fs[0]].flags[i]
- end
- #
- #=================A2通行设置==============
- #=================A3通行设置==============
- #
- for i in 4352..5887
- next if data.nil?
- next if data.tileset_names[2].nil? || data.tileset_names[2] == ""
- fs = PG_TILESETS_WRITE_DATA[data.tileset_names[2]]
- if fs.nil?
- text = "缺少"+ data.tileset_names[2]+"的信息!"
- msgbox(text)
- end
- data.flags[i] = $data[fs[0]].flags[i]
- end
- #
- #=================A3通行设置==============
- #=================A4通行设置==============
- #
- for i in 5888..6655
- next if data.nil?
- next if data.tileset_names[3].nil? || data.tileset_names[3] == ""
- fs = PG_TILESETS_WRITE_DATA[data.tileset_names[3]]
- if fs.nil?
- text = "缺少"+ data.tileset_names[3]+"的信息!"
- msgbox(text)
- end
- data.flags[i] = $data[fs[0]].flags[i]
- end
- #
- #=================A4通行设置==============
- end
- save_data($data, filename)
- SceneManager::exit
- end
- end
复制代码 |
评分
-
查看全部评分
|