最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。
7 r& R- m3 u+ P D0 qgerman.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。 3 H& V; w9 v! T4 e1 k" }4 u
https://www.chinaavg.com/read.php?tid=20557 : N; z9 U7 O: d @7 m- b
其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。
. m0 \4 ]8 p! t% g) I- \; y Y P1 _' R
在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。 6 Z+ m1 h @' G; H9 G4 D
我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。
5 y. N9 p: L, I* e# R0 \* F
8 @, b; w4 e. e"""Module to construct, manage and play dialogs. - e% `. Q- t2 ?7 D
8 h9 f8 y* {0 R% A9 R0 wThis modules provides the following classes: 9 N+ [( X0 L8 a, Z& ?
! T0 v Z4 b1 k0 t
Dialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice
4 j0 h1 z* |+ C% E( b/ i8 c0 @instead. 1 }: ^3 ]& ?1 E) v$ U/ c
# f3 R9 h# p) e8 t) GText - This class represents a single text in the dialog (including texts that are part of ; V4 h. F. }* v9 D. m2 \
a choice) 9 g: r' C/ j7 T& h3 Q8 H& q
5 I# z5 Q" Z7 vChoice - This class represents a choice in the dialog. It usually has several Text elements ) p# u6 G( P# z$ z) c7 T" O9 G( P
as children. This childrens are the texts that the player can choose from. The Choice itself is a
: j) k( {* K9 o6 d0 V; z, jsilent element.
5 ]7 _* O2 d! ~5 ? D$ S; E, ?% I, Z: D9 P9 f
Dialog - This class represents a single dialog. A Dialog consists of several Dialog_elements " n" Y: I$ z3 L- f
which are connected with each other in an arbitrary graph. : R1 q; |% p2 c5 n9 _; U9 f$ k
( `3 K* E4 E p- H9 S0 CDialog_system - This class manages and plays Dialogs.
2 ^" p! s) o; p; {. z! p% T# d, y+ Y8 Z' ?. G x
The classes in this module interact with the text database.
$ p+ o7 m, f fThe id used for a Dialog_element is also used to find the appropriate text in the text database when
0 o8 s' ?1 k* ^the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text 5 ?# i4 x$ T; o+ C1 H
database have to be identical for all instances of class Text). 9 K/ b& v$ z# s5 ]( o* h: k
"""
- P9 ?' e, S6 t5 j
! y3 ?( n! l: U9 T) H! P* i我推测,在包文件里面还有一个存放字幕的文件,说不定也是SQLITE3格式的,现在由于还没解包,还不清楚。
1 {) q' g- ~* Z. Y" \另外,还有一个发现在文件名表里面我们发现了一个文件名python/grandmasboy/dwk5_graph.py。
, v' W; W2 v& [& ^( n我想起了前不久刚实现汉化的狂野小子5这个游戏,它也是采用了SQLITE3数据库的。
( C. F: q% L5 s. O; x6 Xhttps://www.chinaavg.com/read.php?tid=20585
. H2 S$ T8 [ B6 V5 b( b我没有猜错的话,这2个游戏应该是同一个游戏公司开发的,上面的那个文件应该是前一个游戏遗留在游戏引擎里面的东西。 / \4 c! F# J4 D U. { B* F
狂野小子5字幕是utf-8的,已经实现了汉化,也许我们能找到一些相似点来实现汉化。 2 R# v3 _9 a8 |
暂时分析到这里,期待有热心的朋友把解包器做出来,以便于进一步研究。 ; H' n1 o' F# K$ c% }" }5 t* c3 b1 q
放上2个sqlite3格式的文件和dialog.py共研究备用。
; p/ m7 v8 X7 W5 D+ Y! a) F) U; Q( L
" ?1 S; d9 Q' J4 c& w$ [7 X( O+ m9 N. e" C0 }/ M0 u
----------------------------------------------------------------------- & ^. Q. ?: p/ M
2010.2.28 第1次更新
: e( P) `( @" v9 Q0 \我在resources.d017中检索font,发现了以下的语句,这和狂野小子5几乎是一样的,应该也是用系统字库的。 # \8 {( l: o& K% }- G- c
self.__cairo_context.select_font_face("Tahoma", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
\6 d4 ]* k) E5 T: a6 e: f所以,我感觉这个游戏的汉化希望很大,接下去就是解包后寻找字幕文件了。
) P ^6 q7 T4 `+ l% E! z; L-----------------------------------------------------------------------
% R9 w+ v/ Q( Q4 ?, {2010.2.28 第2次更新
+ s7 |9 z# _; o- D N我猜想这个游戏的字幕文件名也许和狂野小子5是一样的。5 B8 l7 s/ Q+ ~8 Y' |3 b
我用sqlite3的工具打开german.meta,果然发现了一个german/text_db文件。) ^0 l7 n; N4 e
这样的话,应该用同样的方法就可以把这个游戏给汉化了。
* S5 g0 B! C5 w' a等有时间再来做最后的试验。 |