最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。 5 z. p& f1 V0 g5 L
german.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。
. S+ [1 l+ P4 P7 ?) phttps://www.chinaavg.com/read.php?tid=20557 : ~+ t3 d" ^+ h5 N4 c) C
其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。
' m/ {# m/ x0 G
" ^* O7 U: S: ?' ?# R% n2 @$ q在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。 " C" ^- T! e4 j' [) p5 r- {
我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。
- X8 i# z" v& y+ f/ u! M( P! P3 Q: l4 K4 W* o9 K
"""Module to construct, manage and play dialogs. 2 V/ I4 ^- z( d8 ^" _
5 g; [7 `, v; @& \; v' r: l* G
This modules provides the following classes: - h& n, k/ x# o( y
" L* R# Y8 _) jDialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice + d, L# |& b7 W
instead. ; P! H9 g# r w2 o' b: M9 `* J/ N/ U
, d) |/ _; o1 u+ pText - This class represents a single text in the dialog (including texts that are part of
% N8 h( S% r0 O0 g" a: Wa choice) # U X+ [$ N+ P
0 u" z% m& Z* l- `4 {Choice - This class represents a choice in the dialog. It usually has several Text elements
( I5 i! |8 y' c8 x% Gas children. This childrens are the texts that the player can choose from. The Choice itself is a L; N0 z9 p6 F7 G* P& x
silent element. - E$ t& u% \+ H+ l! n4 @# A
( d) D& H0 m; J, f E- b6 {Dialog - This class represents a single dialog. A Dialog consists of several Dialog_elements
/ Y4 A0 w& n: t0 b( Gwhich are connected with each other in an arbitrary graph.
+ Y: f7 X/ q: h
4 m2 O( N6 b+ V7 C! o' oDialog_system - This class manages and plays Dialogs. ; V0 r8 v7 Y+ ^* T; Q2 T
/ w8 `# @( R* x! @* t3 t2 r* Z
The classes in this module interact with the text database. ' o, F+ }9 C2 L' n0 `' F' D+ e
The id used for a Dialog_element is also used to find the appropriate text in the text database when 8 m# Z: j6 g: ^% T( _( M3 F5 q# e
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text
% }- G7 A2 Z$ L4 g" G' pdatabase have to be identical for all instances of class Text). 4 F; W8 j7 O% a6 ]$ b
""" : l1 Y T# W a8 y% o
! c g2 K5 e- o) p- s0 b9 N! Y
我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。 ! X& n: L1 i2 v# i( n
另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。 & r( \8 g! F; T4 X: K2 O5 A% ^
我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。 4 A& m& m/ X" q, o& T/ J
https://www.chinaavg.com/read.php?tid=20585 , P a7 m; f. t
我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。 7 y2 G5 H' E6 C/ A( l& ~
狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。
# T' }6 V" `- D( f- r- i$ {暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。
, }7 G$ B2 L( Q6 m放上2个sqlite3格式的文件和dialog.py共研究备用。
% t1 ]3 f( X) U) I
6 F5 K/ I$ o) V. r
: u5 ^7 [7 j: e/ v----------------------------------------------------------------------- + n3 d- M7 M6 Y( }: T
2010.2.28 第1次更新 * V, M+ ]1 L* M9 S3 b
我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。 ; F. t4 v: A$ v0 K( q
self.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
$ b4 ?( q' c. L. N所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。0 Q3 f$ F6 i) m, x% \# X
----------------------------------------------------------------------- . s0 X2 p! j; W9 `; U q( [( _
2010.2.28 第2次更新
9 }- a# R# M# u! K# x; U" j我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。
/ v$ Q7 `* G/ x( b我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。6 m+ ^1 Z& t* p: w2 t6 V. \
这样的话,应该用同样的方法就可以把这个游戏给汉化了。
+ B! q% R/ A9 P等有时间再来做最后的试验。 |