设为首页收藏本站官方微博

【汉化工具】通用命令行解包器QuickBMS

[复制链接]
查看: 8176|回复: 15
打印 上一主题 下一主题

【汉化工具】通用命令行解包器QuickBMS

跳转到指定楼层
楼主
发表于 2009-4-17 11:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

【汉化工具】通用命令行解包器QuickBMS

最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。
- D" h6 ~( b' _- S: W' g: f现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。
6 U! A6 d8 K  i) s/ {
# C4 K3 U! Q4 ?- g- T* I* D& B. A( j---------------------------- / n# G% c4 }; |$ g* q" L! f
工具更新1 ) y! e6 D/ x! h2 _' V; |
----------------------------
, W" U* l: ]  m; Y5 N& O: Gwell I have some good news.
0 m& T3 d+ ~( Ayesterday and today I have worked on the script parser and the results are so good that my beta version already works. ( ^7 X5 w& {' O1 R9 d/ u

0 I. j; r9 G/ E6 M. H4 `  m$ _I have made it compatible with the BMS scripting language so people don't need to learn 1000 languages and then it's a good language. . x/ I$ ^' s( U1 _
obviously the BMS support has been enhanced so it's possible to use XOR, rot13, zlib/deflate, lzo, lzss plus various new operator in the "math" command (and, or, xor, complement, not, shift and modulus) and some other things like choosing the desired endianness.
3 l- D$ p' z- N  a0 v6 s# q9 F' pthen the input BMS script no longer needs the semicolon ';' and the file number which are now optional. - y! d8 r# \  `' F) L* |4 K! a
) E+ ?/ B  ^9 i0 b4 H) F3 o
note that the BMS guide available on http://wiki.xentax.com/index.php/BMS doesn't report some additional fields which instead already exists like the GetCT, ComType and ReverseLong or some internals variables like EXTRCNT so I have tried to find and add also these ones.
6 O7 d! |8 D" O9 n& `, d
  C0 V0 C+ `0 a1 K; M' Dabout the new commands, the following is an example of BMS script for the game Outcry (you can call it outcry.bms or outcry.txt or as you want): ; p2 g& o4 H; j  B% ?, G4 B
# w- a% [: \% @/ f. [/ J
Code: ! v1 i0 b! S( E4 M
idstring SBPK 6 F5 Z8 S* J/ U* S) a9 k3 B# B
get FILES long : W/ t8 z: q, ?( `6 Y* N/ d, m

- X, x/ ~6 M4 v6 X+ ]( Usavepos NAMES_OFFSET ( P" r( _5 K2 I# {$ b+ e' P7 l  B
for i = 1 to FILES
- t# W2 E- M+ B% r+ X5 nget FNAMESZ long
7 i3 k8 H6 c% N1 o4 bgetdstring FNAME FNAMESZ 7 T9 q/ C' @% `$ z
get OFFSET long
7 }2 ~/ c/ O. S0 Jget SIZE long 7 b$ A; L8 @4 F6 P2 T# ^" e
next i 4 K& D3 p* ~4 t& g# i

3 ]$ O9 M' p" i3 `, `savepos FILES_OFFSET ! p& v0 F/ ?* Y! [1 c1 U# u. M' c' C
goto NAMES_OFFSET - q9 Y( w. m5 F7 A
for i = 1 to FILES
: g; v# j( V1 wget FNAMESZ long & W, d& J% [# c% L4 _! y
getdstring FNAME FNAMESZ 7 N% p4 j) [, G
get OFFSET long * T6 H/ b0 h5 ^! G" T6 x! Q. j
get SIZE long - d( w3 P  l: q5 D( }
math OFFSET += FILES_OFFSET
. E# n) v8 F2 o* _# @% z; o3 h0 C/ w; N' a9 m
filexor 0xcc
* b6 ?) Y( @' i3 Y% x* i" }3 blog FNAME OFFSET SIZE 0 0 3 W2 l4 {4 t$ f/ J: {3 r% b
filexor 0 ' g# K, F) C) F# A, T! ~7 Q! M
next i 2 y. Y  ]& r$ X  L
as visible it's files are XORed with the byte 0xcc. : l: b3 `/ ^/ l0 n2 @4 P$ _

2 X6 m1 {0 h' o7 N" rnow the link to the beta version: 6 x9 R# n0 i% k. f$ ]

: z+ }1 F0 ^/ h+ l% Bhttp://aluigi.org/papers/quickbms.zip 8 K; Y9 y5 I& A' P8 _9 D/ a

7 M& J* _$ X$ ?( p* Iobviously it needs to be tested more because 2 days are not enough for a project like this which is not so basic so anyone is invited to test it and suggest new features.
9 h1 J! u4 _% |+ h- A) {/ n9 @; z. k; o$ |: M
P.S.: the usage is very simple and the following are some examples:
) _$ W4 x& [$ D  K" C; I; ?2 M/ `listing the files in the archive common.spk of outcry: $ U4 n' c. R; o7 L- I4 _
Code:
+ _5 T' o0 U! s! J: Aquickbms -l outcry.bms c:\common.spk .
. r/ L5 E; L+ G' I1 Y) G
+ g" {# t6 n5 C1 v1 cextracting the files in c:\folder:
& w" F  v# U3 V' M  \7 t, F9 `. eCode:
0 u  [# _: P6 \9 w1 `+ H/ hquickbms outcry.bms c:\common.spk c:\folder
+ d; n6 c# ]9 b% J3 |3 j" m- w4 Q- }+ }- C
extracing or listing only the dds files: 7 {5 t3 E+ m0 e) G' g$ u
Code: 4 f. T9 |1 R' h' R. A! f
quickbms -f "*.dds" outcry.bms c:\common.spk c:\folder ; [. J4 Y1 z) L& d" k  \
# A' m  F5 j: K- o$ k- I/ y+ E
----------------------------
6 s) P( E7 H: @3 T+ E% D工具更新2 $ @. T! G3 j8 [" q0 g1 W* n: w
---------------------------- 5 y4 t+ w' j5 c; A
if you know the size of the structure or where is located the particular value you are searching (for example some file formats have a 32bit number in the last 4 bytes which has the offset where are located the other file structures) you could use something like the following: 7 ^9 h' R1 a* |" W

3 D* d8 y% w; ?7 n- v7 `Code:get OFFSET asize 8 \! B9 {# S( V. ~) Q! q
math OFFSET -= 4 2 `3 w- t  _, x: J9 C
goto OFFSET
2 n, i- F1 K5 D) {# pget OFFSET long
  G7 R/ S' K3 o4 F9 G8 v+ ^: ugoto OFFSET 9 I6 e3 a; e( C1 d6 Y0 e
..."asize" is not available in the BMS guide but is supported by both multiex and my tool, it contains the total size of the file. 4 Z2 V8 y, i1 P; \5 E& R' {
anyway tell me a file format which has the file name table at the end, it's good to make various exercises for testing the BMS language and where is possible to enhance it. ; A8 G; n& {  }

% D5 K9 h9 C0 u3 R: goh and about the "repacking" question, no it will be not supported ( R# q8 \+ N4 _* C' P
. j7 Y4 K4 D8 X
*EDIT*: updated version to 0.1.1 and attached 3 examples of BMS files which show different operations or different types for doing the same thing (7x7m.bms and 7x7m_special.bms) & g" M2 F" H8 F. D  j7 s
! I1 t' H4 c4 O# @" e& e% }$ P
----------------------------------------------------- % u; q4 Z4 m1 D4 r( L- A
2009.4.17 更新
; T; S# }1 K, N# ?老外发布了最新的0.1.2 版。 0 u' X* l5 Y+ }2 ?! \
----------------------------------------------------- 1 R1 y1 ]% K# d' N# o1 ]
2009.4.18 更新 / @- {! q! C8 ~! ^4 _
老外发布了最新的0.1.2a 版。0 B9 l" D9 }! }) L, K0 R
-----------------------------------------------------
- C8 Q2 I+ o2 T7 I# b. \2009.5.10 更新 ; a6 l  X' a- i- |3 |4 z* _/ g
老外发布了最新的0.2.0 版。
9 B( n% X; S$ W* \----------------------------------------------------- , w2 ~) D6 I9 P6 l, U! ]3 t7 G
2009.5.10 更新 ; n: W* S; Z, g+ X0 t0 L
老外发布了最新的0.2.3a版。6 d9 x+ ?7 Z# Z: V/ Q! @

2 ^2 b: J& G/ F
& M) V5 r9 g8 j) {8 v6 A( r3 m说明:ND20在老版本打不开。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 很美好很美好 很差劲很差劲
回复

使用道具 举报

沙发
 楼主| 发表于 2009-4-17 23:16 | 只看该作者
2009.4.17 更新
回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2009-4-18 07:13 | 只看该作者
2009.4.18 更新
回复 支持 反对

使用道具 举报

地板
 楼主| 发表于 2009-5-10 09:16 | 只看该作者
2009.5.10 更新
回复 支持 反对

使用道具 举报

5#
发表于 2009-5-10 11:38 | 只看该作者
哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...
回复 支持 反对

使用道具 举报

6#
 楼主| 发表于 2009-5-10 11:47 | 只看该作者
引用第4楼firendless于2009-05-10 11:38发表的  :# j) X% _+ Q4 x# A6 l, n2 Y
哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...

* R1 v5 J: b7 p5 J/ b* H3 O确实是晚了
回复 支持 反对

使用道具 举报

7#
发表于 2009-5-10 11:51 | 只看该作者
一晃的功夫...007老大又刷版了...你到底是啥订阅工具....
回复 支持 反对

使用道具 举报

8#
 楼主| 发表于 2009-5-10 12:21 | 只看该作者
引用第6楼firendless于2009-05-10 11:51发表的  :+ ^3 U* \% Z+ |6 a$ f
一晃的功夫...007老大又刷版了...你到底是啥订阅工具....

1 K5 C7 J. ?  i6 E% |呵呵,人眼订阅工具
回复 支持 反对

使用道具 举报

9#
发表于 2009-5-10 12:29 | 只看该作者
引用第7楼shane007于2009-05-10 12:21发表的  :
2 b, I0 l/ k7 g% b" P0 c- A+ ^2 ~; v0 i4 y0 L
呵呵,人眼订阅工具
- k5 r# \: F( }6 ]& L+ l8 o
可惜现在的论坛没有关注ID发帖功能,如果发帖,则用PHP Mail()发邮件通知帖子有更新
回复 支持 反对

使用道具 举报

10#
发表于 2009-8-3 15:39 | 只看该作者
2009年8月3日更新
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

冒险解谜游戏中文网 ChinaAVG

官方微博官方微信号小黑屋 微信玩家群  

(C) ChinaAVG 2004 - 2019 All Right Reserved. Powered by Discuz! X3.2
辽ICP备11008827号 | 桂公网安备 45010702000051号

冒险,与你同在。 冒险解谜游戏中文网ChinaAVG诞生于2004年9月9日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

快速回复 返回顶部 返回列表