技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

YuriSizuku/GalgameReverse 深度技术分析

项目背景与痛点

GalgameReverse 是一个针对文本冒险游戏(Galgame)的反向工程项目。这类游戏以其丰富的剧情和角色性格而闻名,但它们通常被封闭在专有格式中。这项工作旨在解析这些封闭格式的数据,提供对游戏内容的访问,以便于二次创作和研究,同时也降低了使用过程中的技术门槛,让用户能够更自由地操作和定制游戏内容。

核心技术揭秘

该项目的核心挑战在于如何解析和理解游戏数据的复杂结构。设计团队采用了高度模块化的架构来实现这一点,其主要由以下几个模块构成:

  1. 数据解析引擎:负责从不同的 Galgame 文件中提取游戏内容,例如对话脚本、角色信息等。
  2. 数据分析器:对提取出来的数据进行处理,识别出可以进行二次创作的关键元素。
  3. 交互接口:为用户提供可交互的工具和接口,以便用户方便地使用、修改和扩展游戏内容。

下面,通过一个简单的 Mermaid 架构图来展示 GalgameReverse 的技术架构。

graph TD A[用户请求] --> B{"数据来源"} B -->|"Galgame 文件"| C[数据解析引擎] B -->|"外部数据库"| D[数据解析引擎] C --> E[数据分析器] E --> F{"处理结果"} F -->|"成功"| G[交互接口] F -->|"失败"| H[错误提示]

功能亮点与差异

GalgameReverse 通过提供反向工程工具包,直接向社区开发者开放了 Galgame 的内部结构,这在同类竞品中比较少见。它不仅支持多项常用游戏格式的数据提取,更显著的是其模块化设计,使得开发者能够轻松地进行扩展和定制。如果你对某一款特定游戏的数据结构有深刻理解,你可以直接向 GalgameReverse 加入新的解析算法,无需修改整个项目的核心部分。

应用场景与落地建议

在实际生产环境中使用 GalgameReverse,需要对第三方 Galgame 文件的版权问题保持高度警惕。因为即使是从解构的角度来看,某些数据结构仍然可能隐含着版权保护措施。重点推荐此类工具服务于对原创游戏的研究场合,而非用于正式游戏发布。适合的应用场景包括:

  • 游戏数据的二次分析,例如为新的语言版本准备翻译基准。
  • 反向工程教育和研讨会,通过研究和分析,进一步了解和讲解游戏作品内容。
  • 内部自尊项目测试和调整,通过修改内容来模拟真实用户环境。

与此同时,由于工具本身的核心价值在于提升用户对 Galgame 的内部了解,所以,对于反编译和自定义工具的使用,掌握一定的编程基础是非常必要的,特别是对于游戏格式和反编译技术的理解。

综合评价

GalgameReverse 在技术上通过模块化设计和灵活的数据解析机制,大大降低了对文本冒险游戏进行二次创作和研究的技术门槛。然而受限于版权法律,使用它在正式游戏开发中的用途受到了一定限制。根据上述分析,它可以被视为一个很好的研究和学习平台,适合开发者和爱好者进行探索。与此同时,受项目的开放性启发,也激励社区开发者们为 Galgame 的未来创造多样化的可能。

关于

GitHub 原始描述(英文)

Reverse Projects for Galgame

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
556
价值分
295
活跃状态
活跃

语言占比

Batchfile
C
C#
C++
CMake
JavaScript
Linker Script
Makefile
Python
Shell

README

GalgameReverse

🍀 Reverse Projects for Galgame.

Reverse util tools are moved to ReverseTool Localization util tools are moved to Localization

1. Console galgame

sony

  • sony_tm2.py, encode or decode tm2 format, support swizzle // 231218 added

koei

金色のコルダ (psp)

  • corda_cdar.py, parse cdvdar (type v2) structure (comming soon …)
  • corda_eboot.py, patch the eboot for chs support, extend the fontmap and font glphy memory
  • corda_font.py, parse 4bpp 16X16 font (in processing …)
  • corda_eventdat.py, parse event text, export and import

遙かなる時空の中で (psp)

  • haruka_cdar.py, parse cdvdar (type v4) structure

konami

ときめきメモリアル Girl’s Side: 3rd Story (psp)

  • gs3_evsc.py, parse EVSC opcode, export or import text

kid

想いのかけら -Close to- (psp) // 240112 added

  • kid_psp_bip.py, decode or encode bip file (implement by pytcc lzss)

prototype

Air (psv) Clannad (psv) ヴァルプルガの詩(psv)

  • prot_psv_dat.py, dat picture(RGBA8888, RGB888, delta encoding,color panel) decode and encode
  • port_psv_psbtext.py, extract and import the text to PSV air, can be longer than origin
  • prot_psv_4bppfnt.py, for building the psv air 4bpp font

Flowers (psv)

  • flowers_psv_text.py, map flowers pc translation text
  • flowers1-2_psv_pak.py, flowers3_psv_pak.py, flowers4_psv_pak.py export or import *.pak

Island (psv)

  • island_psv_pak.py, export or import *.pak

eldia

神田アリスも推理スル (switch)

  • kanda_switch_rs4.py, parse rs4 file for importing text
  • kanda_switch_fontmap.c, build the ConvertGb2312ToUtf16 arm64 binray code to support gb2312
  • kanda_switch_fontmap.py, make the fontmap to gb2312 and patch sjis char check

hobibox

Narcissus ナルキッソス~もしも明日があるなら (psp)

  • narcissus_psp_lzss.py, parse lzss structure with header
  • narcissus_psp_sn.py, export or import sn.bin (after decompress)
  • narcissus_psp_sntext.py, export or import sn.bin (after extract) text
  • narcissus_psp_2bppfont.py, parse font.bin and make 2bpp font
  • narcissus_psp_lbg.py, extract and rebuild lbg texture

gss (takuyo)

  • gss_arc.cs, for 月影の鎖 -錯乱パラノイア PSP, PSV see, my pull request in my forked GARBRO

月影の鎖 -錯乱パラノイア (psp, psv)

cycrose

薔薇ノ木ニ薔薇ノ花咲ク (psp)

  • baranoki_psp_zp.py, baranoki_psp_pk, support *.zp, *.pk file for 薔薇ノ木ニ薔薇ノ花咲ク
  • baranoki_psp_vmc.py, baranoki_psp_pktext.py, text support
  • baranoki_psp_fontfnt.py, baranoki_psp_fontp.py, tile font support
  • baranoki_psp_boot.py, rebuild the boot for fixing size buffer

nippon1

  • ykcmp.py, an implementation in python to parse ykcmp compression.

夜廻3 (switch)

  • yomawari3_switch_nltx.py, deal with switch swizzle texture in nltx file.

神々の悪戯 (psp)

(comming soon …)

  • kamigami_psp_nispack.py, export or import nispack
  • kamigami_psp_story.py, export or import text in story.dat
  • kamigami_psp_font.py, analyze the multi page font
  • kamigami_psp_txp.py, export or import txp picture

if (idea factory)

Jewelic Nightmare (psp)

(comming soon …)

  • jewelic_psp_uf.py, building the UF tile font, forJewelic Nightmare (ジュエリック・ナイトメア)
  • jewelic_psp_stcm2l.py, converting the ftext (by bintext.py) to STCM2Ltool format (made by STCM2L_import.py), forJewelic Nightmare (ジュエリック・ナイトメア)

entergram

9 Nine (switch) // 231211 added

  • 9nine_switch_fnt.py, extract and insert glphys for fnt font

2. PC galgame

majiro

  • majiro_arc.py, export and build majiro *.arc file
  • majiro_mjo.py, decrypt *.mjo file, MajiroObjX1.000 to MajiroObjV1.000
  • majiro_mjiltext.py, export and import text from *.mjil file by mjotool2

そらいろ // 230815 added ルリのかさね ~いもうと物語り // 230822 added Winter Polaris

  • winterpolaris_hook.js, dump mjo and analyze majiro in winter polaris game
  • winterpolaris_patch.c, Majirov3 dynamic hook framework code example

azsystem

ラムネ

  • lamune_hook.js, decrypt the *.asb and *.tbl files
  • lamune_patch.c, semi-dynamic framework for chs localization
  • lamune_asbtext.py, export or import text to *.asb files

systemnnn

  • systemnnn_patch.c, patch sjis check, change font, redirect files, repalce dwq with png
  • systemnnn_spt.py, parser spt opcode, export and import text

倭人異聞録~あさき、ゆめみし~

advhd (willplus)

  • advhd_patch.c, gbk support and overide arc file
  • advhd_arcv1.py, willplus advhd v1 arc pack or unpack
  • advhd_arcv2.py, willplus advhd v2 arc pack or unpack
  • advhd_wsc.py, willplus advhd v1 wsc text export or import
  • advhd_ws2.py, willplus advhd v2 ws2 text export or import
  • advhd_pna.py, willplus advhd pna export and import

あやかしごはん (advhd v1) Blackish House (advhd v2) 華は短し、踊れよ乙女 (advhd v2)

yuris

  • yuris_patch.c, universe yuris patch, tested by 3M_Marionettes

越えざるは红い花 remaster

  • akaihana_yurispatch.c, yuris gbk support

3M_Marionettes

ffa

天巫女姫

  • amanomiko_patch.c, add new lzss support and gbk support
  • amanomiko_lzss.py, parse lzss compress file with header
  • amanomiko_SO4.py, export or import text in so4 files
  • amanomiko_PT1.py, parse PT1 image file rgb24 format

nvl

我和她的世界末日

  • nvl_asar.py, to decrypt the game.asar made by nvlcloud

criware

  • xtx_font.py, xtx font decode and encode

祝姫

  • iwaihime_sn.c, decode sn.bin
  • iwaihime_patch.c, redirect files and fonts
  • iwaihime_font.py, make xtx font by mapping sjis encoding to gbk glphys

hibiki

Natrual Vacation

  • hibiki_text_ks.py, export and import game text for ftext format
  • hibiki_rename_picture.py, rename all the picture name to crc32, to avoid sjis file name problem

livemaker

アイするキミの居場所

  • aikimi_loader.c, a loader to dynamic inject DLL to the game
  • aikimi_patch.c, patch the game dynamic to support GBK text

bruns

解体挿入新書

  • bruns_decrypt.c , decrypt EENZ file, 解体挿入新書 tested

ig (innocent gray)

  • redirect_ig.c, redirect the files to xxx_chs for separate CHSPATCH, tested in 天ノ少女 Innocent Gray

天ノ少女

exhibit

空色の風琴

  • sorairo_patch.c, support for gbk enconding text in dll

hunex

  • hunex_hlzs.py, decode hlzs format file
  • hunex_hpb.py, extract hpb(hph) format file

明治東亰恋伽 // 241012 added

  • meikoi_dump.js, invoke il2cpp func to dump script_dialog to text
  • meikoi_dump.c, invoke il2cpp func to dump hpb(hph) to unityfs

qt

  • qfile_dump.cpp, use QFile and QDir to dump qres files

叙事曲1:难忘的回忆 // 250211 added 叙事曲2:星空下的诺言 // 250211 added

3. Cross galgame

unity

  • unity_assetbundle.py, batch export or import objects from assertbundle
  • unity_globalmeta.py, export or import text from global-metadata.dat
  • unity_globalmeta.py, print or rebuild unity custom font

krkr

  • krkr_text.py , batch convert text encoding
  • krkr_xp2.py, krkr1 (v0.91) xp2 (xpk, XPK2) format files
  • krkr_xp3.py, krkr2 xp3 files (support xp3filter)
  • krkr_xp3_hxv4.py, krkr hxv4 xp3 files (using keys and contrl_block dumped by krkr_hxv4_dumpkey.js)
  • krkr_hxcrypt.py, krkr hxv4 CxEncryption and HxEncryption rewrite from c# to python
  • krkr_hxv4_hash.py, krkr hxv4 static hash calculator for filehash and dirhash
  • krkr_hxv4_dumpkey.js, krkr hxv4 dump hxv4 cx keys used for garbro and krkr_xp3_hxv4.py
  • krkr_hxv4_dumphash.cpp, krkr hxv4 dynamic hash calculator for filelist and dirlist
  • krkr_hxv4_patch.cpp, krkr hxv4 redirect arc:\\.\xxx to unencrypted patch.xp3>xxx (previous cx) for localization

つばさの丘の姫王

  • sdhime_xp3enc.cpp, make encrypted xp3 files
  • sdhime_patch.c, chs localization support

D.C.5 Plus Happiness ~ダ・カーポ5~プラスハピネス // added on 250210

artemis

  • artemis_pf8.py, pf8 format archive pack and unpack

renpy

苍空的彼端 // 250203 added

  • skyblue_rpa.py extract *.blend rpa file with sig WJZ-4.9

海蓝星之梦 // 250205 added

  • blueplanet_rpa.py extract *.dll rpa file with sig HLXZMENG

tyrano

  • tyrano_extractexe.c extract tyrano build-in exe files

Q-bit_キグルミキノコ (android)

  • qbit_text.py export and import text for translation

onscripter

  • extract_nt3.c, extract *.nt3 script
  • nscript_patch.c, support gbk, redirect *.dat, *.arc file

评论

暂无评论