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

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

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

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

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

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

最近老外开发了一个很不错的通用命令行解包器,以后制作解包器只要简单的写几句脚本就行了。 + a; @) X  r. `1 P: p4 Y, L! Q
现在老外还在不断完善之中,有兴趣的朋友来测试一下吧。 0 e, _+ ]6 T7 @
0 ~* ~4 g7 D: J& @: M: U/ t
---------------------------- * V$ [4 ]( ]# k$ W$ m
工具更新1
* \0 e" @9 P! n6 Z/ O---------------------------- 3 |* T; Z' K$ i# Z  m
well I have some good news.
$ c" n* y' `; K+ c7 `6 E) Vyesterday and today I have worked on the script parser and the results are so good that my beta version already works. ( d6 A' P: q3 K2 K; `  g* o* j

4 Q$ W) Q$ ?$ d9 iI 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.
2 F4 h4 b6 C' mobviously 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 s4 Y* c4 O# C) _6 ^( M7 @) Q
then the input BMS script no longer needs the semicolon ';' and the file number which are now optional.
- G  A% C5 i' x) i9 X. @
5 A# ?6 F9 \( c  {- nnote 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. / c9 D1 X- S7 \  b

( j% ?+ U$ N; w* U7 E0 M: t. q' D! K) n& Zabout 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):
3 [' S, \! C( h1 K
4 F/ V8 e6 f# `, iCode: % K& a8 M. `3 m& ?# k8 y5 |
idstring SBPK 8 Q. W, r* r% @* k$ [; V
get FILES long
6 h' _- V0 [  A- b7 ~$ i
" s) }  H% t) G$ ~& q4 ~0 i5 Psavepos NAMES_OFFSET 2 C8 F% _; G/ k9 z
for i = 1 to FILES + Q/ ]5 W7 Q/ o
get FNAMESZ long
! l: G  A; q7 S; Pgetdstring FNAME FNAMESZ
. f$ t8 ]5 o* C" {: r! K0 xget OFFSET long : i+ I: g5 a& d
get SIZE long / H. D: H, G" G
next i
4 ^% Q3 t8 J- P7 o: o
8 ?! B+ {6 s# X* M" ^3 _. ksavepos FILES_OFFSET . `8 s3 R3 @! V
goto NAMES_OFFSET
# c% o/ Q' Q, K" p( ^for i = 1 to FILES " b0 c9 B$ U: |, x
get FNAMESZ long
3 B; t, s0 [# [( F' m/ ?$ \" Kgetdstring FNAME FNAMESZ # e3 v  \  U) F/ S
get OFFSET long / o, A( [4 p( S# V1 G2 M
get SIZE long
0 a" G$ |0 x7 z* `0 X( Dmath OFFSET += FILES_OFFSET - A  I& t2 s0 X% E* z! }1 v( ~

5 l, K0 I8 g$ ffilexor 0xcc , a) Z5 l; s4 L. y" x
log FNAME OFFSET SIZE 0 0
4 p5 U+ U* S+ {* Z0 w, ]0 Afilexor 0 % l4 L! }3 g. n- S2 F
next i
. [+ _7 x" ?) H1 d( {, X" x% w" t4 Ras visible it's files are XORed with the byte 0xcc. & c9 G) i* P; N( W2 J( s  g+ H4 L
% \3 W8 T& @! {' `- c
now the link to the beta version: : P5 ^: g8 ]3 h/ Y( f
/ `: L. O$ C, m0 m; M
http://aluigi.org/papers/quickbms.zip
! ]  h8 {9 Z5 m# J& ^0 y# p! H7 M- P9 z
obviously 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. 6 ^6 d0 Y% _/ c" o7 P* u- N; [
* A; G! P0 c$ m6 T8 T- ^/ R$ i# x
P.S.: the usage is very simple and the following are some examples: , p, e$ s# T, P+ \# q  {; q
listing the files in the archive common.spk of outcry:
( q2 H2 I6 i% [. }- z! o* I- e/ LCode:
6 x' b9 @% i, h/ G2 t' |quickbms -l outcry.bms c:\common.spk . * l$ u# q: }) G/ c$ r1 ?
3 D* X1 A2 @( v% V% ]
extracting the files in c:\folder: 2 m) f1 y6 B4 {: p& x/ O
Code:
2 W  @% {; X9 J; B) O: ]* y& Oquickbms outcry.bms c:\common.spk c:\folder # x9 t2 d+ \. r! p! v. {! E
3 \- z' b5 Y" p; F! ~0 Y/ \
extracing or listing only the dds files: 1 u. P8 R, t! P' c# U
Code:
" n- z  b& ]6 p( Z5 mquickbms -f "*.dds" outcry.bms c:\common.spk c:\folder
( c8 D! X3 \* r. @3 q
. i7 }) `2 E+ E2 z. H+ ]----------------------------
; \" k( p% x/ @) n9 C7 i& H工具更新2
* L+ l  b9 n! D----------------------------
$ n; c4 k% {& r! F# @% ?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:
+ @) u2 }# Q2 ~  G, t
0 S3 K. A. P( c! b# DCode:get OFFSET asize : g) r8 i) Z. V, q% o
math OFFSET -= 4
9 H: R6 k; [1 C3 L8 s5 t! R" dgoto OFFSET
* w- j  D% N' |9 s* ?' hget OFFSET long 6 e( S$ `8 A; q: H; A! \/ E: N
goto OFFSET
" U5 _+ E. X( [, C9 C9 W' V5 b  X9 y, _..."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.
! {' }/ c  J. H' N2 T$ canyway 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. + P$ H- [. |, [

  Z& g) Y0 e+ g% |oh and about the "repacking" question, no it will be not supported   S$ o3 O8 \, h$ P9 X2 E! }
/ `9 {7 _- \' i7 t- Q# |# Z8 h) j. @
*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)
. n1 n& P5 F* d( y. @1 c" \
. d8 i0 l  w. I, S  j-----------------------------------------------------
  a* ^  z' S( D5 d2009.4.17 更新
% g% a1 E/ T; v7 E/ D老外发布了最新的0.1.2 版。 + l. h( |7 q5 F9 f8 t- `# I! H
-----------------------------------------------------
' S& g  B# [+ l2009.4.18 更新 # o: l3 I: m& m
老外发布了最新的0.1.2a 版。
4 T% W3 a2 {% D8 c-----------------------------------------------------
/ N- G* }) D- d2 K2009.5.10 更新 1 C1 X6 P# ]5 y. e
老外发布了最新的0.2.0 版。1 S' I$ l- A- l
----------------------------------------------------- * ~, ]# }! N2 m* w
2009.5.10 更新 ' i5 c) w# n$ v2 r* F
老外发布了最新的0.2.3a版。4 U) l6 O, @0 O9 o- U5 n- d. c: |

8 P# i! ^- ]; n, K2 C" a$ |9 M; `% d& ?, X# W
说明: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发表的  :7 _( P$ f: {- ]; R, r
哇...沙发板凳都没了.如果等到1.0再用会不会晚了点...
. x4 \) q# e' b2 \) W& @* u
确实是晚了
回复 支持 反对

使用道具 举报

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

使用道具 举报

8#
 楼主| 发表于 2009-5-10 12:21 | 只看该作者
引用第6楼firendless于2009-05-10 11:51发表的  :/ \4 d& \4 }2 `7 H
一晃的功夫...007老大又刷版了...你到底是啥订阅工具....

1 ]4 b) N2 U! x2 q; W呵呵,人眼订阅工具
回复 支持 反对

使用道具 举报

9#
发表于 2009-5-10 12:29 | 只看该作者
引用第7楼shane007于2009-05-10 12:21发表的  :
' _% L* U( v9 }, @# C- D4 k- W
5 P& C' Q+ E5 q4 j5 m( Y. }$ x呵呵,人眼订阅工具
" H/ Z, |% |; }  c
可惜现在的论坛没有关注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日,是全球华人共同的冒险解谜类游戏家园。我们致力于提供各类冒险游戏资讯供大家学习交流。本站所有资源均不用于商业用途。

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