最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。
/ K( |1 y+ y4 f% Ogerman.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。
& y: v# [1 l) I' R5 [! Whttps://www.chinaavg.com/read.php?tid=20557 9 g* m* O2 _4 W) X
其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。
% O9 D, u/ r+ q# u! z' `: D1 I9 M2 j; L# L0 r8 q
在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。 6 c- z, O- V8 m# n0 m" }0 g
我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。 7 O: n( P, @: r# {5 r
8 e- k9 t2 N( {. A- r8 P"""Module to construct, manage and play dialogs.
& b6 r) A7 A& H# W- w4 b& w8 D0 J6 S+ M
This modules provides the following classes:
. z% f& N% u2 e9 f5 A0 p! \4 Z! z) T! ]2 E4 l% L* b
Dialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice % C- C7 P. ^9 g1 b: n: }( h
instead. + E) N4 W( T; y) c
+ D- R q, r4 a& Z( R" d8 jText - This class represents a single text in the dialog (including texts that are part of
+ F" c/ }( R4 ka choice)
0 S- ]7 v; \4 ^
]. Y& K3 V0 L9 \Choice - This class represents a choice in the dialog. It usually has several Text elements 0 d9 K+ K7 q( j$ T
as children. This childrens are the texts that the player can choose from. The Choice itself is a 9 C4 x2 T6 {# ~2 X/ r9 h
silent element. % l( i, w! N1 W9 m* j1 O ?/ @6 [$ X8 {
2 V$ |# D. w& ODialog - This class represents a single dialog. A Dialog consists of several Dialog_elements
8 x' x' d+ U& D. e8 Z5 O% Q5 Hwhich are connected with each other in an arbitrary graph. ; a4 N8 A1 L+ C' Q& R
0 A: D$ {5 S* b, x& T: d0 cDialog_system - This class manages and plays Dialogs.
- o$ K3 b. \7 C: }
2 S, h. v P# G5 O$ z. |$ SThe classes in this module interact with the text database. + v9 C8 F5 k! o5 _& b/ I
The id used for a Dialog_element is also used to find the appropriate text in the text database when & o0 H6 j3 ^/ H6 a, _
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text 4 n; {. ]& ^: r1 Z% X* x' [2 ^
database have to be identical for all instances of class Text). 6 R& ]' n2 l \" U- O
""" 2 j( {4 D7 w/ r! @4 H
7 J n: |8 k& Y3 r- ]
我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。 ! x! E: k! |3 @& l% y9 d+ H4 e
另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。
) E S4 _3 p8 r我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。 ' ?5 m8 K; K( I- \6 ?; r
https://www.chinaavg.com/read.php?tid=20585
1 E$ I; z L0 C& Y3 o# a% e我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。 1 D# D5 E0 l# J: A) v2 E' A
狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。 / y( y6 L! P9 E6 S. P7 E9 y, b; m. j* d
暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。
2 |( \ d8 R/ @. M" H% m! s放上2个sqlite3格式的文件和dialog.py共研究备用。 7 `9 B+ P# S. b5 }$ C6 x4 [4 m
& S! L' a8 _7 h7 v; H1 V: @- k8 S b' i6 B& @* w% A0 s
-----------------------------------------------------------------------
n2 q* A: \4 K4 P2 ?2010.2.28 第1次更新
* V' b) q! c9 V" a8 O$ o) \我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。 $ \3 w! v2 p J3 {8 N$ p2 Z, I
self.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
4 [; X7 r: J" Q( B所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。
9 P/ V. Q- G5 i0 w7 d" x9 v5 P2 |-----------------------------------------------------------------------
) [/ u2 e) [, J, [6 L) x2010.2.28 第2次更新
& S5 O6 J$ t$ Y9 K9 n8 \. L, s我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。/ g' O9 _% l z d7 r
我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。9 n; W9 C- _' a* J9 Z: E' V* K
这样的话,应该用同样的方法就可以把这个游戏给汉化了。
0 @$ B. H6 {' H% p8 d1 ^等有时间再来做最后的试验。 |