最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。 , C$ C% q) W/ g6 M$ g
german.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。 - E ?) W, m% K4 s/ L
https://www.chinaavg.com/read.php?tid=20557
; q8 Z6 @' U) W" w, W4 ~其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。
* W$ ~# D! A( j$ S4 i4 v
0 q9 s) |& Q: V6 M在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。
: e" ]' p( O$ D7 f/ f我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。
* Y- b8 o9 T. E% a' A8 n1 W4 f: r+ U) M
"""Module to construct, manage and play dialogs. 2 S6 g) M! z% D. A2 C3 m* i
- J( I9 L4 Q; c# K. oThis modules provides the following classes:
* D, ~9 k+ E+ r# f- o2 N: ^/ [
# e8 C: Y- x, h0 r$ N# `7 \Dialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice 5 @; T9 @ k/ {2 n" U/ D% h
instead. 9 x+ n9 g2 d& n2 e! S
* y* b- N2 R( Q" V
Text - This class represents a single text in the dialog (including texts that are part of : Z3 M2 F; s: C) [4 c: p7 s+ r; Y; ?
a choice) 5 n1 W, a" j# M* v% {4 Y8 v3 @2 B
$ n" _1 F: e+ I/ Z/ m
Choice - This class represents a choice in the dialog. It usually has several Text elements 3 w2 {7 B+ t& r0 }$ N3 n6 s f8 i
as children. This childrens are the texts that the player can choose from. The Choice itself is a ; G8 V% y. d5 J; z- E5 W/ C! \9 r& g' B
silent element.
9 ^7 \" W& k3 V6 o% E) ^' T2 K5 [* k8 C# U
Dialog - This class represents a single dialog. A Dialog consists of several Dialog_elements
! ?! s- J& i* S a5 dwhich are connected with each other in an arbitrary graph. 4 Y2 s' m$ _* i: ^$ f
X- v8 C& d: I+ y6 o
Dialog_system - This class manages and plays Dialogs.
( {; e% u; p6 c* ^* F) W8 r _4 V2 h% f" s( G& ~* v" U
The classes in this module interact with the text database. f* w! B4 ?# @/ ]# B6 D) U- L
The id used for a Dialog_element is also used to find the appropriate text in the text database when 6 X; @, E: g% v, T' n D
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text U. h0 n! s3 k4 k6 J# b7 o
database have to be identical for all instances of class Text).
) z) V% I* y" ]( F1 |""" ) L4 S; I) c1 H' v7 y7 L3 }
/ [- i y0 q5 l5 m1 S7 `/ a7 I
我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。 & h3 ]7 `8 X7 B- |' h7 z/ ` r
另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。 . u' X/ G8 y$ y! l2 o* T0 [
我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。
0 G/ N6 y" ~; Rhttps://www.chinaavg.com/read.php?tid=20585 / z1 q9 v6 Q% P+ P f- N$ z
我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。
4 j# p9 B/ I! G0 n$ V( J狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。
& ~: [ F8 N7 v暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。
, M+ g9 b' ^, M ?, _2 U; f+ T: B放上2个sqlite3格式的文件和dialog.py共研究备用。
0 D/ I1 e; m5 V 1 Q; k5 r4 \4 A8 x3 M8 u) @6 X5 |* q/ B
/ q, n& ]1 V, g4 k- w# G! B, Q
-----------------------------------------------------------------------
% f& u" Q% v& S- p3 h# B2 }2010.2.28 第1次更新
9 U6 `$ R; T# X( p$ `我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。
+ n: L% b& F4 [2 Oself.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
; ]) g. X: m, @所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。3 N5 ^1 _" f1 }- c' c# N
----------------------------------------------------------------------- , Y$ B7 O ~+ e" f* J" m
2010.2.28 第2次更新: b9 w- q! A4 s+ ^5 E
我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。$ J3 f4 k0 O0 L0 j# o
我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。$ z$ U3 i* [8 O$ m/ z6 j A8 T* E4 T
这样的话,应该用同样的方法就可以把这个游戏给汉化了。# D# V$ C4 S9 w( Q
等有时间再来做最后的试验。 |