标题: 魔法师西蒙5初步汉化分析(2010.2.28 第2次更新) [打印本页] 作者: shane007 时间: 2010-2-28 09:35 标题: 魔法师西蒙5初步汉化分析(2010.2.28 第2次更新) 最近看了一下魔法师西蒙5这个游戏,发现这个游戏也使用了Sqlite3来保存一些游戏数据。 i' \4 N# K! J6 @9 d9 r! w# ?
german.meta和resources.meta这2个文件都是Sqlite3格式的,我们可以用以下这个工具来打开修改。 4 i+ q6 G1 p8 Z& l; s6 k5 nhttps://www.chinaavg.com/read.php?tid=20557 & K1 Z B$ k p# n7 p1 Q& g& c其中的几个字段分别对应了包文件index,文件大小和文件在包文件中的偏移量,所以制作解包器应该很容易。 ) p7 b. o) {% Q; e
( r6 j7 H \" N
在文件名表里面,我们发现了在python/目录下面有好多游戏的.py脚本,暂时还没有发现游戏的字幕。 . s2 F/ D/ y; M9 @0 |9 Z9 n我把python/adventure/dialog.py文件手工解了出来,让我们来看一下它头部的注释。 2 d9 |+ E3 y6 ~% \" ]! n# S( {8 s+ k. i
"""Module to construct, manage and play dialogs. 6 `2 V3 T* Q1 G# F# R7 |! N
- y; V* @4 I6 F" LThis modules provides the following classes: ' b+ W* l* t; m- B
2 |) V/ M! o# U. s
Dialog_element - Basis class for all dialog elements. Not to be used directly, use Text or Choice - E1 V4 M9 |+ a* Jinstead. 9 e' R% T: A" A% s% y2 Y
" E# z8 c4 s9 ]Text - This class represents a single text in the dialog (including texts that are part of 7 Q% r3 Z. s4 N8 K2 ^5 H- ya choice) 4 ? D. t8 W5 S/ C! U- x ; ^# X1 z& q1 E( `4 S- ?- c$ JChoice - This class represents a choice in the dialog. It usually has several Text elements : _' l" L* W# P' @
as children. This childrens are the texts that the player can choose from. The Choice itself is a . u; a) n' @: \) Usilent element. , I/ C. f ~. D: H
2 V& {; A/ a2 Z* t0 B( Q+ x$ a/ FDialog - This class represents a single dialog. A Dialog consists of several Dialog_elements / Z/ E: Z- B b
which are connected with each other in an arbitrary graph. 5 R# r3 S% g8 \/ i8 F% {( n/ O% C! G& x
Dialog_system - This class manages and plays Dialogs. ! Z) K$ b5 s- [( T; i! |' r2 ^6 ] e& P1 u! O: V8 c C4 }, P
The classes in this module interact with the text database. 4 a, t' P$ |& W' w9 E+ y. A
The id used for a Dialog_element is also used to find the appropriate text in the text database when . o3 K1 z I* K- W5 J+ B
the Dialog_element is displayed. (i.e. the Dialog_element id and the id of the text in the text " U+ V6 n& J% B1 b+ I9 E9 adatabase have to be identical for all instances of class Text). " A% D M3 O8 l' r0 t""" # {) m# ]8 I& U: D5 F0 l6 `1 E! T