最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。
0 j5 J% h" k1 N2 I/ Vgerman.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。 0 l9 H5 N, u9 A5 T
https://www.chinaavg.com/read.php?tid=20557 - h- r" s& w' k, q
其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。 5 n5 Y/ w8 o$ `, u6 t3 W" f2 c
7 {- b, g, g/ B& S( l2 s/ C在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。
3 n1 D7 y( Q9 z- S" U. S- x我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。
: ]( }6 V( g' ?7 T( v/ G! W, w+ w% Z5 f2 {' H+ D3 J/ P2 C
"""Module to construct, manage and play dialogs.
+ E# A6 H1 A0 y2 ^: M
5 \- p4 S8 o/ y; B( G& BThis modules provides the following classes: t* n4 R% H0 \* N& T# f
9 Q7 l- I7 s: f" u8 rDialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice % t. Q- I0 g2 D# X' w8 j/ c
instead. , R9 f! I- I2 c, Q$ X! J, ~
- N$ E. |0 M9 H
Text - This class represents a single text in the dialog (including texts that are part of
! X/ G! M& ~1 f) ]a choice) 6 q/ z5 r" O: [1 W
( i, @( b- r. |, R; J" Q
Choice - This class represents a choice in the dialog. It usually has several Text elements 9 h% q: T$ a0 h4 N6 a/ ^3 _
as children. This childrens are the texts that the player can choose from. The Choice itself is a ( F" b4 f8 s$ y* u
silent element.
; _7 I- r2 v4 Q* Y5 L
, L. U/ j( z5 i. s4 j5 V5 y; ODialog - This class represents a single dialog. A Dialog consists of several Dialog_elements ) T$ u1 N" w7 U
which are connected with each other in an arbitrary graph. 6 _) I2 ^/ Y, J `7 `
! }# A, N2 Q" z; J3 n# m
Dialog_system - This class manages and plays Dialogs. / l% ^" c- q5 ?& F
! Q+ B, D7 }1 ~7 S" f/ K0 d {; [( w+ `The classes in this module interact with the text database. 2 d! e9 e# ` N! F
The id used for a Dialog_element is also used to find the appropriate text in the text database when ^3 P( n4 R) ^( l9 M
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text - b% m8 J8 X1 w* G! k
database have to be identical for all instances of class Text).
' D: K, O& o/ r. P"""
6 R/ ?! n5 [; E. a8 s; U$ V; K8 P+ \" w+ t1 m! z4 z
我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。 / J7 E: N g' U, F N8 T& U4 g
另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。
! K9 B1 X. E& K我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。
( x8 O- S+ i1 T! l% p0 Q. hhttps://www.chinaavg.com/read.php?tid=20585 1 E3 u% c L3 K6 F' i4 H
我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。 9 `* h$ n9 ?# [) J \
狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。
# v) @! _9 m4 h暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。 - y: v2 |- P. F. `
放上2个sqlite3格式的文件和dialog.py共研究备用。 + f. n3 F$ ^! g' g0 V9 u3 w) ^# X
# J, f! ~$ N1 L5 o, @7 D8 @$ n! ~
% `/ C2 c; A/ t----------------------------------------------------------------------- , c) B4 H5 z" v+ p; I% l
2010.2.28 第1次更新
1 y# i& [2 Q& ^% g8 M0 O! b我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。
5 ^- _$ ]& y. P: z8 N) d# uself.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
' ^- N" a! U0 ?4 S- l所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。9 z# o- d: p0 ]% B1 a
-----------------------------------------------------------------------
7 U' H: z# m" u. Y9 Z# s+ h( R2010.2.28 第2次更新8 n! U) B {) \0 X, T
我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。7 z" J4 ]- T4 ~' n6 S; g
我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。, ]5 t* k# X* B: h3 B$ i) J
这样的话,应该用同样的方法就可以把这个游戏给汉化了。
- ?, F/ H/ H+ e1 \等有时间再来做最后的试验。 |