最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。
: `' [4 [9 H5 A9 A8 d. H7 jgerman.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。 " A& k( `4 e0 \ @1 q9 u
https://www.chinaavg.com/read.php?tid=20557 : d2 ]; [& k5 T; E4 Z7 F- A
其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。 , M8 y3 _) W1 X# {; q$ L
: M3 I, h* K9 E% l$ S在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。
' i3 \! g( i- X! K; V" p4 w我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。
, b8 [, f0 N; g }7 K7 f7 J v& y9 N. Y! y! p
"""Module to construct, manage and play dialogs. 2 K/ E5 s5 c. Y/ \ H8 a6 ~* {* j' K
3 Y; _9 d/ c; BThis modules provides the following classes:
) e! L) z1 H' J1 z! ?# _: @1 K9 _
: W2 K: B( c3 O# {Dialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice
) i M, C* z$ rinstead.
% \0 B: X& V6 `2 s( F2 M" L5 x. G
D* c s- |" z v. D8 _7 `Text - This class represents a single text in the dialog (including texts that are part of
0 s" t# B! z. L+ q6 \" f( F$ v( r; R6 Va choice) : J1 N0 `$ A/ z/ `* ?& O- j4 T, N
) w. Q( l- D' j C+ C3 [7 R5 v
Choice - This class represents a choice in the dialog. It usually has several Text elements : _7 `; w, c# T$ }- S$ a
as children. This childrens are the texts that the player can choose from. The Choice itself is a $ d6 w( I- }9 J4 e" L) t
silent element.
8 B7 N3 I7 Y# l/ h2 b+ g8 G7 X4 a) q& R- Y5 ]7 q+ ?3 E! @2 [+ S
Dialog - This class represents a single dialog. A Dialog consists of several Dialog_elements
" i% U3 f# f7 f0 v$ kwhich are connected with each other in an arbitrary graph. , a& ]3 G# s8 c; j/ O" `
2 n+ o8 L9 i0 E7 b4 VDialog_system - This class manages and plays Dialogs. + i, r, k: u, f% X! X( x. z
& j" W3 l& ~' S/ A) QThe classes in this module interact with the text database. * H4 \8 b1 v, c
The id used for a Dialog_element is also used to find the appropriate text in the text database when 3 V8 p# T9 G" v3 x; d. t
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text 8 z# K. G8 _6 e9 Z: L& t4 M
database have to be identical for all instances of class Text).
7 |1 x% E7 V: y4 X"""
) E- Y( O( n4 S* u& V" g) W' y" C5 u. U# u
我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。
% l8 ^" I* b0 r% k另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。 2 D6 W6 ~! H4 T3 @) C t6 o* `
我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。 / F; @2 \6 `$ Z( Z' d1 m7 q
https://www.chinaavg.com/read.php?tid=20585 + e! s. ~( m3 | [& x$ Z
我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。
0 o7 |- O: j1 f狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。 ' v" C, Y# v; O
暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。
: U. T" H$ K8 Z1 ^. n2 C8 J放上2个sqlite3格式的文件和dialog.py共研究备用。 ; n4 z1 c' F% _/ E
* F l7 J5 e$ {# v5 y/ [
- S( ~5 V) |4 A+ x! D-----------------------------------------------------------------------
/ B$ A! X; s+ O) n! V' ~. n! J2010.2.28 第1次更新
E* r$ S: N/ V: y( G$ `( z6 s我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。 : f: H% A6 F' z( x l) v
self.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
- b* v8 k8 h% z' a% d3 a所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。2 q2 p, `# z' _6 w- n& ]* y
-----------------------------------------------------------------------
( ~. _1 ?0 \5 Q* s) {; }$ j7 U' b0 z2010.2.28 第2次更新
' o8 E! F a7 y% _8 q我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。
! m2 h2 _5 B, h- F( @我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。
m0 ` `! a( U: [0 e这样的话,应该用同样的方法就可以把这个游戏给汉化了。2 U3 U3 @0 `3 W8 J% g, x, ~
等有时间再来做最后的试验。 |