最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。 , M( k. h6 A2 K( S8 D) X! c
german.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。
) h9 z) i2 p6 Q2 u$ z8 y8 x: q/ l" ghttps://www.chinaavg.com/read.php?tid=20557 4 H# Y" u$ l. Q" I8 X
其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。
: g- ~# M. |/ s. W
5 m- t/ X6 L1 @+ j) Z3 z1 n在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。
5 ]( a+ N/ z, t$ E+ T. j: D% R/ N我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。
4 J# B* D- b+ T G* h+ C5 b1 e
9 \. Q4 ~3 e! p0 s! ^"""Module to construct, manage and play dialogs.
: N( |: I3 T7 y7 u' Q! q3 M
4 J$ o: d) p" A3 EThis modules provides the following classes: 2 L1 I+ s# H# C8 ^+ V: D6 m7 Z, D2 M
; M5 M1 K/ O0 r
Dialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice
7 Q% ?( G- i4 m) hinstead. % r: G# c% ~7 {( K: S7 C
% V4 h3 v, T9 u6 w# nText - This class represents a single text in the dialog (including texts that are part of 5 S) m2 C2 `+ c6 K
a choice)
" x. C6 x: h7 v o% r. n* z E+ t4 X$ S1 N: }: w0 r& u
Choice - This class represents a choice in the dialog. It usually has several Text elements ! V2 `0 g4 \2 K: z
as children. This childrens are the texts that the player can choose from. The Choice itself is a 9 k) T9 Y% A( ~5 ]& g/ e* b8 }
silent element.
; ?; {5 i$ n/ ]& m p X: l4 n% Y6 g0 Y& J p
Dialog - This class represents a single dialog. A Dialog consists of several Dialog_elements
( K( G3 } b& h4 A Xwhich are connected with each other in an arbitrary graph. 0 @9 O: k4 M# m+ S1 e8 |
1 ^; f+ F# [' ?6 x3 nDialog_system - This class manages and plays Dialogs.
+ G) m* S1 c0 {# l1 f; R
' b7 }% Z- ^ G, C, QThe classes in this module interact with the text database. : t# z. i7 q' U6 z
The id used for a Dialog_element is also used to find the appropriate text in the text database when . K- g A/ B! p2 e
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text
" w- C" x; G: a( M# [. C1 Hdatabase have to be identical for all instances of class Text).
. n8 S/ V' O$ T" X( R% r"""
# D0 {: c# ?2 |7 E3 F+ u6 {6 Q; L2 o5 A7 |8 v
我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。 7 `4 s% x* ^3 c7 `1 q/ e
另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。 & e( g/ s2 N3 U+ [- I) V
我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。 8 t+ ?( Y- K. c$ q" Y; ]+ @
https://www.chinaavg.com/read.php?tid=20585
) d, h+ R5 }7 O$ p8 D1 P, q1 O我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。 $ m/ X, i4 O0 U9 Q6 B. D* n4 t
狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。 ! O. i2 u' s' D2 W3 Q$ A: y
暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。
3 d3 e! l8 s- L0 P2 d) p' M放上2个sqlite3格式的文件和dialog.py共研究备用。
' C7 O4 P8 U$ Q* n! i
; Y1 v: h! Y2 m5 I
! h3 F. b+ E8 r; E-----------------------------------------------------------------------
& q( U$ i4 u% s0 X& w2010.2.28 第1次更新
3 T7 |$ v) s. g ^1 @# `我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。
. O' {; N; V- o; C& k8 bself.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
8 o8 i3 N3 |; Y. J9 b2 z所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。
$ q1 d" z3 S, ~----------------------------------------------------------------------- 2 o N! w3 @+ }$ b" E3 J1 L# x1 `
2010.2.28 第2次更新/ O! ~: G- D- {1 p2 i" k1 L/ D% P
我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。) {7 U0 R6 Q5 e: p) Y8 R; D
我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。2 q) G; S4 }5 s! P8 B" R; D! Z, r
这样的话,应该用同样的方法就可以把这个游戏给汉化了。$ \8 ]" l/ L, d! z$ N& u# z
等有时间再来做最后的试验。 |