最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。
k) l, H4 J' Z! X6 f9 J+ wgerman.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。
* W8 ~/ q- S" K0 x1 A. x$ T) e" m; B* Q3 @https://www.chinaavg.com/read.php?tid=20557
1 `; B+ { l8 |: A其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。
% n( D$ o V# Z8 X1 z# ]: v( q O+ @0 S4 r v. z3 }4 j2 c& u
在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。 & Q' R$ ]% S3 D+ T' U3 ]8 x
我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。 ) d- @& e1 u# K# Z, d& C
* p" [) }1 y q, G: L+ h
"""Module to construct, manage and play dialogs. . y- X0 r' V3 H8 d6 ~
0 y ^+ Y' p$ [/ eThis modules provides the following classes:
; }1 a: `& p) t" D
" `" u, k- U8 e5 u% qDialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice
1 w/ G5 x1 m1 Z( binstead.
P& f1 D' G8 u+ h8 b3 \( j4 n* P0 @4 H/ I1 H; j- ~9 ^
Text - This class represents a single text in the dialog (including texts that are part of * x/ c& b. e6 `
a choice) ( }1 [7 u- J4 t; R0 C& G f
/ q, D R3 V9 ~- _) E. i5 T
Choice - This class represents a choice in the dialog. It usually has several Text elements
7 f5 _# i/ b$ Qas children. This childrens are the texts that the player can choose from. The Choice itself is a
; [" \% d" G t# \1 A( T' ^' u# bsilent element.
; j3 G6 ]1 V$ x0 K' X1 C, N, W% Q* V1 N
Dialog - This class represents a single dialog. A Dialog consists of several Dialog_elements 0 l' {( J/ k6 T5 @: j- R, K, Q, H
which are connected with each other in an arbitrary graph. 3 H! F0 W& e' s( n! u) T
! K/ h( p7 O1 X7 ]* bDialog_system - This class manages and plays Dialogs.
8 p1 x/ L U- }" w( J& V, R& \' k, T1 _/ h( r/ O
The classes in this module interact with the text database.
9 x x( H! ` c- ~- x3 v \The id used for a Dialog_element is also used to find the appropriate text in the text database when 1 K# G. }4 W, Q
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text
& ^" E& {8 v+ [) I3 g: c5 l1 fdatabase have to be identical for all instances of class Text).
) }; V2 {1 H/ G5 z% }' f/ `""" . {8 Z0 x v& r6 D. G
8 T$ y* z" A! @
我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。 6 {( ~5 r# d9 H% I& O. [
另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。
% s. E* s% J. x, |* a. k我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。 ) i. o% J! O) o$ _0 _3 l
https://www.chinaavg.com/read.php?tid=20585 9 v8 Y& T" F/ I& U' D
我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。 7 Y6 q: V9 v( ?+ ~" ?% y. {
狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。 & t# k; n) q/ X8 O5 I; q7 y% j
暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。 " m+ q- C( E& ~9 T' b, t V
放上2个sqlite3格式的文件和dialog.py共研究备用。 7 ~: m/ {1 V' u5 m
v2 V! i5 l( l0 n R O
4 q$ V1 Y$ t3 N* c4 f! W-----------------------------------------------------------------------
9 C; B5 r) K. b: J" h0 t2010.2.28 第1次更新 ! ~, ~+ Z7 Z% I D
我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。
; f8 U4 f/ \0 V1 v1 ]" j/ U2 }self.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD) # Y6 Z$ n0 L1 h# V" J- \4 U/ L, Z
所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。$ W0 a* N5 {; S2 @" I2 f/ x$ s
----------------------------------------------------------------------- , t: v+ L# x6 W( }! s4 W6 p- Y" E
2010.2.28 第2次更新" o4 X5 y4 b+ k, _ T/ p! u' u
我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。) W* a5 C- }! I
我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。- ~. H( A3 Q/ U
这样的话,应该用同样的方法就可以把这个游戏给汉化了。
$ P# I9 w( N$ D$ F. L等有时间再来做最后的试验。 |