最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。
V6 u4 n' T7 i* ^( L& K) \german.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。
$ c3 ~. p6 M3 X7 lhttps://www.chinaavg.com/read.php?tid=20557 1 \0 k n% Q; W5 `) x! w
其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。
2 k6 Y+ | a+ j0 P4 z" ~/ p2 v0 E% E2 p
在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。 3 t/ P% e a4 o: q4 x/ p
我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。 4 V- d4 B; K: d% D" [! U
' w5 P4 P8 K1 l, G0 I% Q+ r"""Module to construct, manage and play dialogs. . E* C% R7 x9 ~' Q+ h' I$ N e7 F( h
; I% s. h4 s% W& H0 Q, V" P6 TThis modules provides the following classes:
7 G8 N l" S: j! P2 y4 h
- s4 K, H1 a% k$ p! i4 NDialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice
5 [0 \( S3 F) vinstead. , ^- H* s- P, i. [! p8 [4 s
& ~) K& y# Z0 Y1 w$ QText - This class represents a single text in the dialog (including texts that are part of ) m% q0 j+ h2 h, h' [8 {/ E; o- y8 p
a choice) 6 H) `( o# Z2 x) F. i
1 ^* V4 K% p3 k( \$ Y' U
Choice - This class represents a choice in the dialog. It usually has several Text elements
6 n7 \$ n' y$ s0 D _+ Z$ vas children. This childrens are the texts that the player can choose from. The Choice itself is a ' }- e0 M; a# t/ B$ W
silent element.
1 s- O8 N3 w0 _/ n) L7 M
6 s% k) E8 ]/ R( ZDialog - This class represents a single dialog. A Dialog consists of several Dialog_elements $ {' c$ a+ Y' _4 v8 J
which are connected with each other in an arbitrary graph.
1 X$ ?2 P# d- H3 m. {1 y& t' y& Y$ v% x# R% [! `: w
Dialog_system - This class manages and plays Dialogs. * f: n7 t C# f- O! t# ?
3 A$ D1 A; ^# U! Q5 j0 A
The classes in this module interact with the text database. - S. }8 w3 e. I4 R% ^! P. e
The id used for a Dialog_element is also used to find the appropriate text in the text database when $ g9 {6 W( ~: {( I V5 K
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text
& N! e0 ?7 s/ y8 cdatabase have to be identical for all instances of class Text).
* z& X o) A/ D L# K" l6 W"""
" F' i: F& e- w( t8 [6 S) H" [4 ? ^& ]: S6 D' E
我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。
0 d9 U7 P. j" u7 G& s& e另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。 ! Q# P/ H3 Z7 v1 @; W& m
我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。 : M* Y1 E# E( q* p E
https://www.chinaavg.com/read.php?tid=20585 3 o( P1 e: p; f$ i5 m
我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。
1 D) c* K# Z0 j. f- ~: m狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。 0 R) K' R0 T1 P$ K$ z
暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。 ' f) \9 G" I& |- G
放上2个sqlite3格式的文件和dialog.py共研究备用。
2 f: O3 A! c/ B) L# X: l) G$ [6 | 7 x3 [0 {4 v; d) |& h
% m. r, v& \# v f" S" i7 Z-----------------------------------------------------------------------
1 W" n5 X. k6 n3 V2010.2.28 第1次更新 3 I- Z' {5 M" [8 H
我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。
+ g; u% W& |6 Z( E1 ]self.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
# z8 W4 k$ d; z+ W7 y所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。
& s# m6 c* a0 _8 O5 V----------------------------------------------------------------------- / B/ G: y+ w0 b' p9 ]
2010.2.28 第2次更新
9 m( U" Q% `- x; t- c9 r! R我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。1 q9 \* z. u% h. y( L2 ^
我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。
4 @7 S' F- |1 r. G _% M$ R这样的话,应该用同样的方法就可以把这个游戏给汉化了。3 o+ f5 t {' m; p2 A& C
等有时间再来做最后的试验。 |