Windless
订阅/Feed
稗田千秋(i@wind.moe)

Ren'Py 拆包汉化初试

稗田千秋
Jan.05 2016 acgn

前言

[趴.jpg] 这个人很懒,并不想说什么。

LongLiveTheQueen

chiaki@chiaki:~/steam$ cd LongLiveTheQueen/
chiaki@chiaki:~/steam/LongLiveTheQueen$ ls
common       LongLiveTheQueen.exe           Play in Safe Mode.bat
game             LongLiveTheQueen.py             Play in Software Mode.bat
lib                  Microsoft.VC90.CRT.manifest  python26.dll
LICENSE.txt  msvcr90.dll                                renpy
chiaki@chiaki:~/steam/LongLiveTheQueen$

注:系统 Ubuntu LTS 14.04,拆包 Windows 版游戏。

RPA文件

游戏的rpa文件放在game下,命名为 llq.rpa,游戏的很多资源都被压制在里面,老规矩,先解包。

轮子:https://github.com/Lattyware/unrpa

chiaki@chiaki:~/steam$ cd unrpa/
chiaki@chiaki:~/steam/unrpa$ python unrpa /home/chiaki/steam/rpa/llq.rpa
unrpa: extracting files.

稍等片刻,解包完成。

chiaki@chiaki:~/steam/unrpa$cd ~/steam/rpa/
chiaki@chiaki:~/steam/rpa$ ls
ballroom.jpg                          moodbg.png
bonus                                     music
bubble.png                            ocean-fog2.png
calendarbase.png                 ocean-fog.png
calendar-center.png             ocean.jpg
calendar-month.png            outside.jpg
calendar-pendulum.png      princess
caloris.png                             redswirl.png
chaingrad.png                       ribbon_only_fademask-small.png
chains.png                             ribbon_only-small.png
coronation.jpg                       roundrect.png
doomforest.jpg                     royal_crystal_glow.png
epilogged.jpg                         royal_crystal.png
epilogged-top.png                 schedulebg.jpg
girl_fadein_gradient.jpg       selene_crystal_glow.png
girl_only.png                         selene_crystal.png
goldglow.png                        sidebar
gradialdent.png                    spinnypulsy.png
heads                                     stars
heart.png                              statsbackdrop.png
heartytransition.png            statsbg.jpg
henshin_base-small.png     tentaclefade.png
histoheartytransition.png   transformation_music.ogg
icon-32.png                          tutorial
icon-big.png                         ui
llq.rpa                                   ursul_crystal_glow.png
map                                      ursul_crystal.png

可见游戏的主要资源文件都在里面了,全CG收集!(x

贴图部分的汉化可在此进行,逐一寻找匹配即可。

RPYC文本文件

游戏的RPYC文件没有压进 llq.rpa 中,直接放在 /game 目录下,将所有 .rpyc 后缀的文件提取出来置于新文件夹 /rpyc 中,然后使用 unrpyc 开始反编译文件。

轮子: https://github.com/CensoredUsername/unrpyc

chiaki@chiaki:~/steam$ cd unrpyc/
chiaki@chiaki:~/steam/unrpyc$ python unrpyc.py -c /home/chiaki/steam/rpyc/*

Decompiling /home/chiaki/steam/rpyc/script.rpyc to /home/chiaki/steam/rpyc/script.rpy...
Decompiling /home/chiaki/steam/rpyc/dossiers.rpyc to /home/chiaki/steam/rpyc/dossiers.rpy...
Decompiling /home/chiaki/steam/rpyc/screens.rpyc to /home/chiaki/steam/rpyc/screens.rpy...
Decompiling /home/chiaki/steam/rpyc/epilogue.rpyc to /home/chiaki/steam/rpyc/epilogue.rpy...
Decompiling /home/chiaki/steam/rpyc/checklist.rpyc to /home/chiaki/steam/rpyc/checklist.rpy...
Decompiling /home/chiaki/steam/rpyc/stats.rpyc to /home/chiaki/steam/rpyc/stats.rpy...
Decompiling /home/chiaki/steam/rpyc/ursul.rpyc to /home/chiaki/steam/rpyc/ursul.rpy...
Decompiling /home/chiaki/steam/rpyc/weekends.rpyc to /home/chiaki/steam/rpyc/weekends.rpy...
Decompiling /home/chiaki/steam/rpyc/selene.rpyc to /home/chiaki/steam/rpyc/selene.rpy... 
......
Decompiling /home/chiaki/steam/rpyc/000.rpyc to /home/chiaki/steam/rpyc/000.rpy...
Decompilation of 45 script files successful

chiaki@chiaki:~$ cd ~/steam/rpyc/
chiaki@chiaki:~/steam/rpyc$ ls
000.rpy           distributor.rpyc   music.rpy            tracebacks.rpyc
000.rpyc          dossiers.rpy       music.rpyc           transformation.rpy
backgrounds.rpy   dossiers.rpyc      options.rpy          transformation.rpyc
backgrounds.rpyc  effects.rpy        options.rpyc         translation.rpy
.....

生成的rpy文件可直接使用文本编辑器查看,比如我们打开script.rpy,这是主流程脚本,本游戏大多数的文字可以在这里找到。

[图片佚失]

很明显,双引号中间的部分便是需要汉化的台词。

完结撒花.

关于字库、封包什么的有空再来扯淡,先这样凑合一篇(x

--END--
文章创建于 2016-01-05 22:43:31,最后更新 2016-01-05 22:43:31
Comment
尝试加载Disqus评论, 失败则会使用基础模式.
    • play_arrow

    About this site

    version:1.02 Alpha
    博客主题: Lime
    联系方式: i@wind.moe
    写作语言: zh_CN & en_US
    博客遵循 CC BY-NC-SA 4.0许可进行创作

    此外,本博客会基于访客的Request Headers记录部分匿名数据用于统计(Logger的源码见Github),包含Referer, User-Agent & IP Address.个人绝不会主动将数据泄露给第三方