R3EXS 1.0.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8d0aab9e1fbe2fdb0012fc2222c16254ada40699942e7fd969c22100fb974c7
4
- data.tar.gz: 534e2e482ef2ff5fb9ae1814d06d82014a72fce10920610647138e7beae2831f
3
+ metadata.gz: 9a3bc4fe4ef14d4c9751004acf9d58bd8d5b8f3c19b6421ec22b1ad5be6852c9
4
+ data.tar.gz: d84184c23083d1bb0e270ce2bbdf91bedd880ed014a61ee6babd0d1e05f285fc
5
5
  SHA512:
6
- metadata.gz: 19c16fc2eac9df25d58a9e6a9b254ad3079d8dd0dba39936fed663b916b26b1a6f6e6fe158810f832c16cf522b36862cf0debaa82dd070c1a36e6d66a9bdbd93
7
- data.tar.gz: a858596624ae00c8e263e2b82f57630a549b6ffee46197e9a69b616811c453391ae54766da743bd7f167bd9feffd6224c39fd563a0c30a35b3c10b7ba9f0aa42
6
+ metadata.gz: 211d024eddfac0d4ad0e7a62260c0f20ae5992470f3d3fdcd99c0ac5a67bac1d6f36673c2f87f3c54f4014d370d1fa9469a1bbef19cbc03b7fadc520e8ca3c94
7
+ data.tar.gz: 7b5bc178dea86262f3d5b273f2130fb97b44ffc9ca2180dcc7c5edb1849bdab187a3983dc0f5490aa336ca71974df668a2131c8ff7c2388274934041288cdbf0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # [R3EXS]
2
2
 
3
+ ## [1.1.0] - 2025-04-09
4
+
5
+ - 添加了递归搜索目标目录下的 \*.rvdata2 文件的功能
6
+ - 修复了 R3EXS::EventCommand 类里面的 205 和 505 指令的处理问题
7
+ - 修复了 StringsInjector 里面的逻辑错误,即在遍历 AST 时,错误地将翻译后的字符串放入 location 中
8
+ - gli 版本更新到 2.22.2
9
+
3
10
  ## [1.0.5] - 2025-03-12
4
11
 
5
12
  - rb_in_strings 方法里面添加将 Scripts_info.json 文件拷贝至目标目录里面,以避免后续报错
data/README.md CHANGED
@@ -1,260 +1,260 @@
1
- # R3EXS
2
-
3
- RGSS3_Extract_Strings_Tool
4
-
5
- <p style="text-align: center;">一个用来提取和翻译 RGSS3 游戏引擎的字符串的工具</p>
6
-
7
- [**简体中文**](README.md)&nbsp;&nbsp;&nbsp;[**English**](README_EN.md)
8
-
9
- ## 目录
10
-
11
- - [简介](#简介)
12
- - [特点](#特点)
13
- - [功能列表](#功能列表)
14
- - [安装方法](#安装方法)
15
- - [使用方法](#使用方法)
16
- - [项目构建](#项目构建)
17
- - [项目文档](#项目文档)
18
- - [友情链接](#友情链接)
19
-
20
- ## [简介](#目录)
21
-
22
- R3EXS 是一个基于 Ruby 语言,用来提取和翻译 RGSS3 游戏里字符串的 gem
23
-
24
- ## [特点](#目录)
25
-
26
- 使用 [Prism](https://github.com/ruby/prism) 实现了对 Ruby 脚本中的字符串和符号的精准提取
27
-
28
- ## [功能列表](#目录)
29
-
30
- 1. [解包 Game.rgss3a 文件](#解包-Gamergss3a-文件)
31
- 2. [序列化 rvdata2 文件为 json 格式](#序列化-rvdata2-文件为-json-格式)
32
- 3. [反序列化 json 文件为 rvdata2 格式](#反序列化-json-文件为-rvdata2-格式)
33
- 4. [提取所有的字符串](#提取所有的字符串)
34
- 5. [注入所有的字符串](#注入所有的字符串)
35
-
36
- ## [安装方法](#目录)
37
-
38
- ### 使用 RubyGems 安装
39
-
40
- 1. 安装 [Ruby](https://www.ruby-lang.org/zh_cn) (要附带安装 Devkit 来支持编译 C 扩展)
41
- 2. 安装 [R3EXS](https://rubygems.org/gems/R3EXS) gem
42
-
43
- ```bash
44
- gem install R3EXS
45
- ```
46
-
47
- ### 直接下载 exe 可执行文件
48
-
49
- 点击下载 [R3EXS.exe](https://github.com/LuoTat/R3EXS/releases)
50
-
51
- 使用 [Ocran](https://github.com/Largo/ocran) 和 [Tebako](https://github.com/tamatebako/tebako) 两个打包工具
52
-
53
- `Windows` 环境提供 `R3EXS-windows-Ocran` 和 `R3EXS-windows-Tebako`
54
-
55
- `Linux (GLIBC>=2.31)` 环境提供 `R3EXS-linux-Tebako`
56
-
57
- 在首次运行时会解压 Ruby 环境,所以首次运行会比较慢
58
-
59
- ## [使用方法](#目录)
60
-
61
- 以下代码均假设在游戏根目录下运行,确保 `./Game.rgss3a` 文件存在,或者已经解包到 `./Data` 文件夹下
62
-
63
- ~~如果你喜欢疯狂输出的控制台或者觉得运行太快~~,请开启 `--verbose` 选项
64
-
65
- ### [解包 Game.rgss3a 文件](#功能列表)
66
-
67
- ```bash
68
- NAME
69
- decrypt - 解码 Game.rgss3a 文件
70
-
71
- SYNOPSIS
72
-
73
- R3EXS [global options] decrypt [command options] <Game.rgss3a file path>
74
-
75
- COMMAND OPTIONS
76
- -o, --output_dir=DIRECTORY - *.rvdata2 文件的输出目录 (默认: ./)
77
- ```
78
-
79
- 示例代码
80
-
81
- ```bash
82
- R3EXS decrypt ./Game.rgss3a
83
- ```
84
-
85
- ### [序列化 rvdata2 文件为 json 格式](#功能列表)
86
-
87
- ```bash
88
- NAME
89
- rvdata2_json - 将 rvdata2 文件序列化为 json 格式
90
-
91
- SYNOPSIS
92
-
93
- R3EXS [global options] rvdata2_json [command options] <the *.rvdata2 dir>
94
-
95
- COMMAND OPTIONS
96
- -c, --[no-]complete - 开启完全序列化
97
- -n, --[no-]with_notes - 开启注释序列化
98
- -o, --output_dir=DIRECTORY - *.json 文件的输出目录 (默认: ./JSON)
99
- -s, --[no-]with_scripts - 开启 Scripts 脚本序列化
100
- ```
101
-
102
- 示例代码
103
-
104
- ```bash
105
- // 只序列化可翻译部分
106
- R3EXS rvdata2_json ./Data
107
-
108
- // 完全序列化
109
- R3EXS rvdata2_json -c ./Data
110
- ```
111
-
112
- ### [反序列化 json 文件为 rvdata2 格式](#功能列表)
113
-
114
- ```bash
115
- NAME
116
- json_rvdata2 - 将 json 文件反序列化为 rvdata2 文件
117
-
118
- SYNOPSIS
119
-
120
- R3EXS [global options] json_rvdata2 [command options] <the *.json dir>
121
-
122
- COMMAND OPTIONS
123
- -c, --[no-]complete - 开启完全反序列化
124
- -o, --output_dir=DIRECTORY - 新的 *.rvdata2 文件的输出路径 (默认: ./Data_NEW)
125
- -r, --original_dir=DIRECTORY - 原始的 *.rvdata2 文件路径 (默认: ./Data)
126
- -s, --[no-]with_scripts - 开启 Scripts 脚本反序列化
127
- ```
128
-
129
- 示例代码
130
-
131
- ```bash
132
- // 如果在 rvdata2_json 时没有开启 --complete 选项
133
- // 则必须提供 --original_dir 或是当前目录下存在 ./Data 文件夹
134
- R3EXS json_rvdata2 ./JSON
135
-
136
- // 如果在 rvdata2_json 时开启 --complete 选项
137
- // 则不需要提供 --original_dir 选项
138
- R3EXS json_rvdata2 -c ./JSON
139
- ```
140
-
141
- ### [提取所有的字符串](#功能列表)
142
-
143
- ```bash
144
- NAME
145
- ex_strings - 提取所有的字符串
146
-
147
- SYNOPSIS
148
-
149
- R3EXS [global options] ex_strings [command options] <the *.json dir>
150
-
151
- COMMAND OPTIONS
152
- -o, --output_dir=DIRECTORY - ManualTransFile.json 或 ManualTransFile_scripts.json 文件的输出目录 (默认: ./)
153
- -p, --[no-]with_scripts_separate - 开启 Scripts 脚本单独提取到 ManualTransFile_scripts.json 文件
154
- -s, --[no-]with_scripts - 开启 Scripts 脚本提取
155
- -y, --[no-]with_symbol - 开启 Scripts 脚本中的 Symbol 提取
156
- ```
157
-
158
- 示例代码
159
-
160
- ```bash
161
- // 不提取 Scripts 脚本
162
- R3EXS ex_strings ./JSON
163
-
164
- // 提取 Scripts 脚本
165
- R3EXS ex_strings -s ./JSON
166
-
167
- // 提取 Scripts 脚本并单独提取到 ManualTransFile_scripts.json 文件
168
- R3EXS ex_strings -s -p ./JSON
169
- ```
170
-
171
- ### [注入所有的字符串](#功能列表)
172
-
173
- ```bash
174
- NAME
175
- in_strings - 注入所有的字符串
176
-
177
- SYNOPSIS
178
-
179
- R3EXS [global options] in_strings [command options] <the *.json dir>
180
-
181
- COMMAND OPTIONS
182
- -m, --manualtransfile_path=FILE - ManualTransFile.json 文件路径 (默认: ./ManualTransFile.json)
183
- -o, --output_dir=DIRECTORY - 新的 *.json 文件的输出目录 (默认: ./JSON_NEW)
184
- -s, --[no-]with_scripts - 开启 Scripts 脚本注入
185
- ```
186
-
187
- 示例代码
188
-
189
- ```bash
190
- // 不注入到 Scripts 脚本
191
- R3EXS in_strings ./JSON
192
-
193
- // 注入到 Scripts 脚本
194
- R3EXS in_strings -s ./JSON
195
- ```
196
-
197
- ---
198
-
199
- 想要获取更多帮助,使用
200
-
201
- ```bash
202
- R3EXS help
203
- ```
204
-
205
- ## [项目构建](#目录)
206
-
207
- 如果想要构建项目并运行,首先克隆整个项目
208
-
209
- ```bash
210
- git clone git@github.com:LuoTat/R3EXS.git
211
- ```
212
-
213
- 然后使用 `bundle` 安装依赖
214
-
215
- ```bash
216
- bundle install
217
- ```
218
-
219
- 最后编译 C 扩展即可
220
-
221
- ```bash
222
- rake compile
223
- ```
224
-
225
- ---
226
-
227
- 构建本地文档
228
-
229
- ```bash
230
- yardoc
231
- ```
232
-
233
- 构建 `R3EXS_Ocran.exe` 可执行文件
234
-
235
- ```bash
236
- rake ocran
237
- ```
238
-
239
- 查看所有 rake 任务
240
-
241
- ```bash
242
- rake -T
243
- ```
244
-
245
- ## [项目文档](#目录)
246
-
247
- [R3EXS Api 文档](https://rubydoc.info/gems/R3EXS)
248
-
249
- ## [友情链接](#目录)
250
-
251
- - [oj](https://github.com/ohler55/oj)
252
- - [gli](https://github.com/davetron5000/gli)
253
- - [Prism](https://github.com/ruby/prism)
254
- - [Ocran](https://github.com/Largo/ocran)
255
- - [Tebako](https://github.com/tamatebako/tebako)
256
- - [RGSS3](https://github.com/taroxd/RGSS3)
257
- - [rvdata2json](https://github.com/DICE2000/rvdata2json)
258
- - [VX-Ace-Translator](https://github.com/AhmedAhmedEG/VX-Ace-Translator)
259
- - [RPGMakerDecrypter](https://github.com/uuksu/RPGMakerDecrypter)
260
- - [RPGMaker VX Ace F1-Manual](https://miaowm5.github.io/RMVA-F1)
1
+ # R3EXS
2
+
3
+ RGSS3_Extract_Strings_Tool
4
+
5
+ <p style="text-align: center;">一个用来提取和翻译 RGSS3 游戏引擎的字符串的工具</p>
6
+
7
+ [**简体中文**](README.md)&nbsp;&nbsp;&nbsp;[**English**](README_EN.md)
8
+
9
+ ## 目录
10
+
11
+ - [简介](#简介)
12
+ - [特点](#特点)
13
+ - [功能列表](#功能列表)
14
+ - [安装方法](#安装方法)
15
+ - [使用方法](#使用方法)
16
+ - [项目构建](#项目构建)
17
+ - [项目文档](#项目文档)
18
+ - [友情链接](#友情链接)
19
+
20
+ ## [简介](#目录)
21
+
22
+ R3EXS 是一个基于 Ruby 语言,用来提取和翻译 RGSS3 游戏里字符串的 gem
23
+
24
+ ## [特点](#目录)
25
+
26
+ 使用 [Prism](https://github.com/ruby/prism) 实现了对 Ruby 脚本中的字符串和符号的精准提取
27
+
28
+ ## [功能列表](#目录)
29
+
30
+ 1. [解包 Game.rgss3a 文件](#解包-Gamergss3a-文件)
31
+ 2. [序列化 rvdata2 文件为 json 格式](#序列化-rvdata2-文件为-json-格式)
32
+ 3. [反序列化 json 文件为 rvdata2 格式](#反序列化-json-文件为-rvdata2-格式)
33
+ 4. [提取所有的字符串](#提取所有的字符串)
34
+ 5. [注入所有的字符串](#注入所有的字符串)
35
+
36
+ ## [安装方法](#目录)
37
+
38
+ ### 使用 RubyGems 安装
39
+
40
+ 1. 安装 [Ruby](https://www.ruby-lang.org/zh_cn) (要附带安装 Devkit 来支持编译 C 扩展)
41
+ 2. 安装 [R3EXS](https://rubygems.org/gems/R3EXS) gem
42
+
43
+ ```bash
44
+ gem install R3EXS
45
+ ```
46
+
47
+ ### 直接下载 exe 可执行文件
48
+
49
+ 点击下载 [R3EXS.exe](https://github.com/LuoTat/R3EXS/releases)
50
+
51
+ 使用 [Ocran](https://github.com/Largo/ocran) 和 [Tebako](https://github.com/tamatebako/tebako) 两个打包工具
52
+
53
+ `Windows` 环境提供 `R3EXS-windows-Ocran` 和 `R3EXS-windows-Tebako`
54
+
55
+ `Linux (GLIBC>=2.31)` 环境提供 `R3EXS-linux-Tebako`
56
+
57
+ 在首次运行时会解压 Ruby 环境,所以首次运行会比较慢
58
+
59
+ ## [使用方法](#目录)
60
+
61
+ 以下代码均假设在游戏根目录下运行,确保 `./Game.rgss3a` 文件存在,或者已经解包到 `./Data` 文件夹下
62
+
63
+ ~~如果你喜欢疯狂输出的控制台或者觉得运行太快~~,请开启 `--verbose` 选项
64
+
65
+ ### [解包 Game.rgss3a 文件](#功能列表)
66
+
67
+ ```bash
68
+ NAME
69
+ decrypt - 解码 Game.rgss3a 文件
70
+
71
+ SYNOPSIS
72
+
73
+ R3EXS [global options] decrypt [command options] <Game.rgss3a file path>
74
+
75
+ COMMAND OPTIONS
76
+ -o, --output_dir=DIRECTORY - *.rvdata2 文件的输出目录 (默认: ./)
77
+ ```
78
+
79
+ 示例代码
80
+
81
+ ```bash
82
+ R3EXS decrypt ./Game.rgss3a
83
+ ```
84
+
85
+ ### [序列化 rvdata2 文件为 json 格式](#功能列表)
86
+
87
+ ```bash
88
+ NAME
89
+ rvdata2_json - 将 rvdata2 文件序列化为 json 格式
90
+
91
+ SYNOPSIS
92
+
93
+ R3EXS [global options] rvdata2_json [command options] <the *.rvdata2 dir>
94
+
95
+ COMMAND OPTIONS
96
+ -c, --[no-]complete - 开启完全序列化
97
+ -n, --[no-]with_notes - 开启注释序列化
98
+ -o, --output_dir=DIRECTORY - *.json 文件的输出目录 (默认: ./JSON)
99
+ -s, --[no-]with_scripts - 开启 Scripts 脚本序列化
100
+ ```
101
+
102
+ 示例代码
103
+
104
+ ```bash
105
+ // 只序列化可翻译部分
106
+ R3EXS rvdata2_json ./Data
107
+
108
+ // 完全序列化
109
+ R3EXS rvdata2_json -c ./Data
110
+ ```
111
+
112
+ ### [反序列化 json 文件为 rvdata2 格式](#功能列表)
113
+
114
+ ```bash
115
+ NAME
116
+ json_rvdata2 - 将 json 文件反序列化为 rvdata2 文件
117
+
118
+ SYNOPSIS
119
+
120
+ R3EXS [global options] json_rvdata2 [command options] <the *.json dir>
121
+
122
+ COMMAND OPTIONS
123
+ -c, --[no-]complete - 开启完全反序列化
124
+ -o, --output_dir=DIRECTORY - 新的 *.rvdata2 文件的输出路径 (默认: ./Data_NEW)
125
+ -r, --original_dir=DIRECTORY - 原始的 *.rvdata2 文件路径 (默认: ./Data)
126
+ -s, --[no-]with_scripts - 开启 Scripts 脚本反序列化
127
+ ```
128
+
129
+ 示例代码
130
+
131
+ ```bash
132
+ // 如果在 rvdata2_json 时没有开启 --complete 选项
133
+ // 则必须提供 --original_dir 或是当前目录下存在 ./Data 文件夹
134
+ R3EXS json_rvdata2 ./JSON
135
+
136
+ // 如果在 rvdata2_json 时开启 --complete 选项
137
+ // 则不需要提供 --original_dir 选项
138
+ R3EXS json_rvdata2 -c ./JSON
139
+ ```
140
+
141
+ ### [提取所有的字符串](#功能列表)
142
+
143
+ ```bash
144
+ NAME
145
+ ex_strings - 提取所有的字符串
146
+
147
+ SYNOPSIS
148
+
149
+ R3EXS [global options] ex_strings [command options] <the *.json dir>
150
+
151
+ COMMAND OPTIONS
152
+ -o, --output_dir=DIRECTORY - ManualTransFile.json 或 ManualTransFile_scripts.json 文件的输出目录 (默认: ./)
153
+ -p, --[no-]with_scripts_separate - 开启 Scripts 脚本单独提取到 ManualTransFile_scripts.json 文件
154
+ -s, --[no-]with_scripts - 开启 Scripts 脚本提取
155
+ -y, --[no-]with_symbol - 开启 Scripts 脚本中的 Symbol 提取
156
+ ```
157
+
158
+ 示例代码
159
+
160
+ ```bash
161
+ // 不提取 Scripts 脚本
162
+ R3EXS ex_strings ./JSON
163
+
164
+ // 提取 Scripts 脚本
165
+ R3EXS ex_strings -s ./JSON
166
+
167
+ // 提取 Scripts 脚本并单独提取到 ManualTransFile_scripts.json 文件
168
+ R3EXS ex_strings -s -p ./JSON
169
+ ```
170
+
171
+ ### [注入所有的字符串](#功能列表)
172
+
173
+ ```bash
174
+ NAME
175
+ in_strings - 注入所有的字符串
176
+
177
+ SYNOPSIS
178
+
179
+ R3EXS [global options] in_strings [command options] <the *.json dir>
180
+
181
+ COMMAND OPTIONS
182
+ -m, --manualtransfile_path=FILE - ManualTransFile.json 文件路径 (默认: ./ManualTransFile.json)
183
+ -o, --output_dir=DIRECTORY - 新的 *.json 文件的输出目录 (默认: ./JSON_NEW)
184
+ -s, --[no-]with_scripts - 开启 Scripts 脚本注入
185
+ ```
186
+
187
+ 示例代码
188
+
189
+ ```bash
190
+ // 不注入到 Scripts 脚本
191
+ R3EXS in_strings ./JSON
192
+
193
+ // 注入到 Scripts 脚本
194
+ R3EXS in_strings -s ./JSON
195
+ ```
196
+
197
+ ---
198
+
199
+ 想要获取更多帮助,使用
200
+
201
+ ```bash
202
+ R3EXS help
203
+ ```
204
+
205
+ ## [项目构建](#目录)
206
+
207
+ 如果想要构建项目并运行,首先克隆整个项目
208
+
209
+ ```bash
210
+ git clone git@github.com:LuoTat/R3EXS.git
211
+ ```
212
+
213
+ 然后使用 `bundle` 安装依赖
214
+
215
+ ```bash
216
+ bundle install
217
+ ```
218
+
219
+ 最后编译 C 扩展即可
220
+
221
+ ```bash
222
+ rake compile
223
+ ```
224
+
225
+ ---
226
+
227
+ 构建本地文档
228
+
229
+ ```bash
230
+ yardoc
231
+ ```
232
+
233
+ 构建 `R3EXS_Ocran.exe` 可执行文件
234
+
235
+ ```bash
236
+ rake ocran
237
+ ```
238
+
239
+ 查看所有 rake 任务
240
+
241
+ ```bash
242
+ rake -T
243
+ ```
244
+
245
+ ## [项目文档](#目录)
246
+
247
+ [R3EXS Api 文档](https://rubydoc.info/gems/R3EXS)
248
+
249
+ ## [友情链接](#目录)
250
+
251
+ - [oj](https://github.com/ohler55/oj)
252
+ - [gli](https://github.com/davetron5000/gli)
253
+ - [Prism](https://github.com/ruby/prism)
254
+ - [Ocran](https://github.com/Largo/ocran)
255
+ - [Tebako](https://github.com/tamatebako/tebako)
256
+ - [RGSS3](https://github.com/taroxd/RGSS3)
257
+ - [rvdata2json](https://github.com/DICE2000/rvdata2json)
258
+ - [VX-Ace-Translator](https://github.com/AhmedAhmedEG/VX-Ace-Translator)
259
+ - [RPGMakerDecrypter](https://github.com/uuksu/RPGMakerDecrypter)
260
+ - [RPGMaker VX Ace F1-Manual](https://miaowm5.github.io/RMVA-F1)