3DMGAME 3DM首页 新闻中心 前瞻 | 评测 游戏库 热门 | 最新 攻略中心 攻略 | 秘籍 下载中心 游戏 | 汉化 购买正版 论坛

注册 登录

QQ登录

只需一步,快速开始

查看: 61|回复: 1
打印 上一主题 下一主题

[MOD] 【搬运】Mewgenics(Windows + Linux/Proton)的交互式存档补丁器

[复制链接]

2284

主题

3418

帖子

14万

积分

游戏终结者

Rank: 14Rank: 14Rank: 14Rank: 14

贡献度
21648
金元
616390
积分
148231
精华
0
注册时间
2006-12-25
跳转到指定楼层
主题
发表于 2026-2-28 09:55 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
转自n网:https://www.nexusmods.com/mewgenics/mods/71
Interactive save patcher for Mewgenics (Windows + Linux/Proton). Edit base stats and passives safely with automatic backups.
Mewgenics(Windows + Linux/Proton)的交互式存档补丁器。用自动备份安全地编辑基础属性和被动技能。


Mewgenics! Patcher — Save Editor (Stats + Abilities)
梦幻学!补丁员 — 存档编辑器(属性+技能)


A noob-friendly patcher for Mewgenics saves. Backups included. Bad passives deleted properly.
一个适合新手的 Mewgenics 豁免补丁器。包括备份。糟糕的被动技能被正确删除。



What this mod is  这个模组是什么

This is a small Python-based save patcher / save editor for Mewgenics that lets you:
这是一个基于 Python 的小型 Mewgenics 存档补丁/存档编辑器 ,可以让你:
  • List your active in-house cats (the ones actually placed in rooms + are on adventures)
    列出你家里活跃的猫咪(那些实际被安置在房间里+正在冒险的猫)
  • Edit base stats (STR / DEX / CON / INT / SPD / CHA / LUCK)
    编辑基础属性(力量/敏捷/体质/智力/速度/魅力/幸运)
  • Delete or replace mutations
    删除或替换突变
  • Edit cat ages / delete 'Retired' flag
    编辑猫龄 / 删除“已退休”标志
  • Delete or replace abilities/passives safely (fixes things like BloodFrenzy without corrupting the save)
    安全删除或替换技能/被动(修复血狂  之类的问题,同时不破坏存档)
  • Automatically backs up your save before touching anything
    在接触任何东西之前会自动备份存档
It is designed for people who don’t want to hex edit blobs or gamble with half-broken save editors.
它为那些不想对 blobs 进行六边形编辑或用半坏存档编辑器赌博的人设计的。


Key features  主要特征
Noob-friendly interactive wizard
新手友好互动向导
Run one command, pick your save, pick your cat, pick what you want to modify.
运行一个命令,选你的存档,选你的猫,选你想修改的内容。

Works on Linux (Proton) and Windows
适用于 Linux(Proton)和 Windows
The script tries to auto-detect the default save folder paths for:
脚本尝试自动检测以下默认存档文件夹路径:
  • Linux Proton Steam
  • Linux Flatpak Steam
  • Windows AppData / Roaming
    Windows AppData / 漫游
You can also point it to a specific save file manually if detection fails.
如果检测失败,你也可以手动指向某个存档。

✅ Automatic backup  ✅ 自动备份
Before any patching happens, it creates a backup like:
在任何补丁之前,它会创建一个类似的备份:
  • steamcampaign01.sav → steamcampaign01_mewgenics_patcher.savbak
So if you break your save, you can undo it.
所以如果你破坏了存档,可以撤销。

Safe “delete passive” method
安全的“删除被动”方法
Other save patchers “delete” an ability by replacing the string withNoneor blanking bytes. That can cause:
其他存档补丁程序通过用 None 替换字符串或清空字节来“删除”能力。这可能导致:
  • NO PASSIVE NAMED None
  • out of bounds
  • white screen battles  白屏战斗
  • crashes / corrupted blobs
    崩溃/腐化的斑点

This patcher removes passives correctly by rewriting the length-prefixed ability record and repacking it so the blob remains structurally valid.
该补丁器通过重写长度前缀的能力记录并重新打包,使得 blob 在结构上依然有效,从而正确地移除被动技能。


What you can edit right now
你现在可以编辑的内容

1) Base Stats  1)基础属性
You’ll see the current base stats and can set them directly:
你会看到当前的基础属性,并可以直接设置:
Example input:   示例输入:
7 7 7 7 7 7 7
2) Abilities / Passives  2)技能/被动
The script will list ability/string records found for the chosen cat. You can:
脚本会列出所选猫咪的能力/字符串记录。你可以:
  • Delete an ability/passive
    删除一个技能/被动
  • Replace it with another internal ability id ex: TakeAim
    用另一个内部能力 ID(例如: TakeAim)替代 它


What this does NOT do (yet)
但这还没有(目前)
  • It doesn’t handle every possible save field.
    它不能处理所有 可能的存档字段。
  • It currently targets cats detected as “active in house”. If parsing fails, it can fall back to listing all cats.
    目前它针对检测到“室内活跃”的猫。如果解析失败,可以退回列出所有猫。


Requirements  要求
  • Python 3.10+ recommended  推荐 Python 3.10+
  • Python dependency:  Python 依赖:
    • lz4

Install:  安装:
  • Windows:  Windows:
    py -m pip install lz4 rich
  • Linux:  Linux:
    pip install lz4 rich



How to use  如何使用

Basic usage  基本用途

python mewgenics_patcher.py --scan --verify
  • --scan - starts the interactive wizard
    --扫描  - 启动交互向导
  • --verify  - runs sanity checks after patching (recommended)
    --verify  - 补丁后运行理智检查(推荐)
If auto-detection doesn’t find your saves
如果自动检测找不到你的存档

Point it to a save manually:
手动指向存档:

python mewgenics_patcher.py --scan --sav /path/to/steamcampaign01.sav --verify

What happens when you run it
运行它会发生什么
  • It finds your saves and asks which one to use
    它会找到你的存档,并询问使用哪个存档
  • It creates a backup (*.savbak)
    它会创建一个备份(*.savbak)
  • It lists your in-house cats (name/sex/stats)
    它列出了你家里的猫(名字/性别/属性)
  • You pick which cat(s) to edit
    你可以选择要编辑哪些猫
  • You edit stats or abilities
    你可以编辑属性或能力
  • It patches the original save in-place
    它会原地修补原始存档

Troubleshooting  故障排除
“It can’t find my save files”
“它找不到我的存档文件”

Use --sav
and point it directly at your steamcampaign0X.sav
使用 --sav 然后直接对着你的 steamcampaign0X.sav
“Ability list contains weird entries”
“能力列表包含奇怪的条目”

The script currently scans a common string-record pattern in the blob. It’s good enough to patch real abilities, but it may show some unrelated internal strings. If you’re unsure, don’t patch it.
脚本目前扫描 blob 中的常见字符串-记录模式。它足够好用来修补真实能力,但可能会显示一些无关的内部字符串。如果你不确定,就不要修补。
“Game crashes after patching”
“打补丁后游戏崩溃”

Restore the backup:  恢复备份:
  • rename steamcampaign01_mewgenics_patcher.savbak back to steamcampaign01.sav
    更名  steamcampaign01_mewgenics_patcher.savbak  回 steamcampaign01.sav

If you can reproduce it, post:
如果你能复述,请发布:
  • your game version/build  你的游戏版本/构建
  • what you changed  你改变了什么
  • which cat  哪只猫
  • and I’ll fix the parser/patcher.
    我会修好解析器和补丁器。


Safety / Disclaimer  安全 / 免责声明
This edits your save. I’m not responsible if you:
这会编辑你的存档。如果你有以下行为,我不负责:
  • patch the wrong cat  给错误的猫接了
  • set stats to nonsense  将属性设置为无意义
  • replace abilities with garbage ids
    用垃圾 ID 替换能力
  • refuse to keep backups and then cry
    拒绝备份然后哭泣

Backups are created automatically — use them.
备份是自动生成的——请使用它们。


Credits  制作人员
  • Built from reverse engineering the Mewgenics save format (SQLite + LZ4 blobs)
    这是通过逆向工程 Mewgenics 存档格式构建的(SQLite + LZ4 blobs)



Ko-Fi  科菲
  • If this tool saves you time and you want to support development: Ko-Fi
    如果这个工具能帮你节省时间,并且你想支持开发:Ko-Fi



Changelog  更新日志

v.0.4.5

Added  新增内容
  • Rich-powered UI (optional)
    富驱动的用户界面(可选)
  • Pretty tables for save selection, cat roster, and selected cats.
    存档选择、猫咪名单和精选猫咪的漂亮表格。
  • Stat display now supports emoji labels () and a color gradient (3→7).
    属性显示现在支持表情符号标签 ()和色渐变 (3→7)。
  • Expanded Rich formatting into session menus and all major editors:
    扩展丰富格式至会话菜单及所有主要编辑器 :
- Stats  - 统计数据
- Age  - 年龄
- Mutations (slot tables + search tables)
- 突变(槽表 + 搜索表)
- Abilities (slot tables + search tables)
- 能力(老虎机表+搜索表)
- Items (equipment tables + raw-record tables + search tables)
- 项目(设备表 + 原始记录表 + 搜索表)
- Batch mode tables for selected cats and editor slot lists
- 选定猫和编辑槽列表的批处理模式表

  • Reference lists exported (for lookups)
    导出的参考文献列表(用于查找)
  • Added generated reference files for mutation/bodypart IDs and ability/passive/disorder description tokens (for easier lookups and fewer “what does ID X do?” posts).
    新增了生成的参考文件,用于突变/身体部位 ID 和能力/被动/无序描述标记(方便查找,减少“ID X 做什么?”的帖子)。

Fixed  固定
  • Mutation slot mapping corrected
    变异槽映射校正
- Fixed UI slot labels to match the on-disk blob order (Body/Head and Tail/Mouth were previously swapped).
- 固定了 UI 槽标签以匹配磁盘上的 blob 顺序(之前对换了身体/头部和尾巴/嘴巴)。

Notes  注释
  • Rich remains optional: if not installed, the script falls back to the plain CLI output.
    Rich 仍然是可选的:如果未安装,脚本会退回到普通的 CLI 输出。

v.0.4.2

Update: Passive “Upgrades” fixed (tier-u32), plus tier-aware abilities parsing
更新:被动“升级”已固定(32级),并支持阶级感知能力解析
This update fixes how upgraded passives/disorders are represented in the save.
这次更新修正了升级后的被动/异常技能在存档中的表现方式。
What changed  发生了什么变化
  • Passive/Disorder upgrades are NOT stored as new IDs like AngelicInspiration2. The ID string stays AngelicInspiration, and the upgrade is stored as an adjacent u32 tier (1 normal / 2 upgraded).
    被动/无序升级不会像 AngelicInspiration2 那样作为新 ID 存储。ID 字符串保持 AngelicInspiration,升级作为相邻的 U32 等级  存储(1 普通/2 升级)。
  • The patcher’s ability parser is now tier-aware:
    补丁师的能力解析器现在具备等级感知:
  • Actives + Passive1 are in the u64 string run
    Actives + Passive1 属于 u64 弦系
  • Passive1 has a u32 tier right after the run
    被动 1 级在跑完后有一个 U32 等级  
  • Passive2 + Disorder1 + Disorder2 are stored as [u64 len][ASCII id][u32 tier]
    被动语气 + 无序 + 无序 2 存储为 [u64 len][ASCII id][u32 tier]
  • In the abilities editor (and batch mode), editing Passive1/Passive2/Disorders now prompts for tier and writes it correctly.
    在能力编辑器(和批量模式)中,编辑被动 1/被动 2/无序状态时会提示等级  并正确写入。

Also included  另有收录
  • Regenerated abilities.json with tier metadata (passive_tiers, disorder_tiers) and a disorders list from the dumped .gon data
    通过从转储的 .gon 数据中重新生成 abilities.json,包含层级元数据(passive_tiers、disorder_tiers)和无序列表




v.0.4.1Abilities: selecting a no longer bounces you straight back to the session menu. It now actually opens the ability slot editor like it should.
技能: 选择  不再  会直接跳回会话菜单。现在它真的能像正常一样打开技能栏编辑器。Mutations: the submenu now responds to inputs ( l / s / c / x / X ) instead of re-prompting forever. q exits cleanly back to the main menu. Also tweaked --verify for “clear all” so it only checks slots that were actually changed.
变异: 子菜单现在会响应输入( l / s / c / x / X ),而不是一直重复提示。 Q 会干净利落地返回主菜单。还调整 了一下——验证  “清除所有”,这样只检查实际更改过的槽位。




v0.4.0

  • No more “edit one category then exit.” After you pick cats, you now land in a main menu and can edit multiple categories in one run (stats → abilities → mutations → etc.). New option: d = done
      不再是“编辑一个类别然后退出”的局面。  选好猫后,你会进入主菜单 ,一次游戏 可以编辑多个类别 (属性→能力→变异→等)。新选项: d = 完成
    to exit, plus c = change selected cats
    to re-pick targets without restarting.
    退出时,加 c = 改变所选猫 重新选择目标而不重启。
  • Age support: reads current_day
      年龄支持: 读 current_day
    from the save DB and detects each cat’s birthday_day
    from the blob, so it can display age and set age safely.
    从存档数据库中检测每匹猫的 birthday_day  从斑点中移除,这样它就能安全地显示年龄和设置年龄  。
  • Mutation editor: detects the fixed-size mutation/appearance table (coat override + 14 slots) and lets you list/set/clear mutation IDs without changing blob size (fixed-width writes only).
    变异编辑器: 检测固定大小的变异/外观表(外套覆盖+14 个槽位),允许你列出/设置/清除突变 ID,而无需更改 blob 大小(仅限固定宽度写入)。
  • Optional mutations.json
    可选 mutations.json
      generated from dumped .gon
    files so IDs can show human-readable names and be searchable in the UI.
    由转储的.gon 生成 因此,ID 可以显示人类可读的名字并在 UI 中进行搜索。





v0.3.0

Items are editable + batch editing + SQLite STRICT fix help
项目可编辑 + 批量编辑 + SQLite 严格修复帮助

✅ Item editing (reliable now)
✅ 物品编辑(现在很可靠)

  • Equipment slots are parsed deterministically (no proximity guessing).
    装备槽位是确定性解析的(不猜测接近度)。
  • You can detect / replace / delete items.
    你可以检测/替换/删除物品。
  • Correctly handles the game’s weirdness where Trinket/Consumables can be “empty” by having no bytes at all (implicit empty).
    正确处理了游戏中饰品/消耗品因完全没有字节而变成“空”(隐式空)的怪异现象。

✅ Equip items into EMPTY slots (safe)
✅ 将物品装备到空槽(保险箱)

  • “Equip-from-empty” is implemented using template blobs.
    “从空装备”是用模板块实现的。
  • This avoids corrupting saves by trying to reconstruct unknown per-slot metadata from scratch.
    这样可以避免通过从零重建未知的每个槽元数据而损坏存档。
  • If templates are missing, the tool will tell you exactly which files it needs.
    如果缺少模板,工具会准确告诉你需要哪些文件。

✅ Batch edit multiple cats
✅ 批量编辑多只猫

Cat selection now supports:
猫选择现支持:
  • 1-4 (ranges)  1-4(射击场)
  • 1-4,7,12 (mixed)  1-4,7,12(混合)
  • all / a
    全部 / A
  • * = reuse your last selection
    * = 重复使用你上一次的选择

When multiple cats are selected, you can use Batch mode to apply the same change to all of them (stats/items/abilities).
当选择多只猫时,你可以用批量模式对所有猫(属性/物品/能力)施加相同的变化。

Feedback welcome, but if you post a traceback, include your Python version + sqlite_version output.
欢迎反馈,但如果你发布追溯,请附上你的 Python 版本+输出 sqlite_version。




v0.2.0Added abilities.json validation (ability list is now much cleaner, fewer random strings).
增加了 abilities.json 验证功能(能力列表现在更清晰,随机字符串减少)。Added Retired flag display + “Remove Retired” option.
新增了已退役旗帜显示+“移除已退休” 选项。Ability menu now shows structured slots (Actives / Passives / Disorders) instead of a raw dump.
技能菜单现在显示的是结构化的槽位(主动/被动/异常),而不是直接输出。Added ?  search helper when replacing abilities (searches abilities.json).
添加 ? 替换能力时的搜索助手(搜索 abilities.json)。 Fixed multiple crashes in ability detection.
修复了能力检测多次崩溃的问题。
游客,如果您要查看本帖隐藏内容请回复

回复

使用道具 举报

21

主题

2万

帖子

3万

积分

游戏天王

Rank: 11Rank: 11Rank: 11Rank: 11

贡献度
466
金元
284557
积分
30320
精华
0
注册时间
2018-10-5

元气女仆(永久)量子Doro3DM小黄鸡拉姆雷姆尼禄·克劳狄乌斯锦鲤

舒服的沙发
发表于 2026-2-28 15:34 | 只看该作者
谢谢分享!谢谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|3DMGAME ( 京ICP备14006952号-1  沪公网安备 31011202006753号

GMT+8, 2026-3-16 04:56 , Processed in 0.030174 second(s), 19 queries , Memcached On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表