(米哈游资源提取)HoYoStudio中文教程
苏格兰特产圆脸大胖鸡
2024年05月04日 22:03

原项目地址:https://github.com/TomyJan/HoYoStudio/releases/tag/v0.17.00

事先声明:(本文使用AI翻译HoYoStudio是一个开源项目,旨在对米哈游(Mihoyo)游戏文件进行分析和修改。它可以用于分析、提取和修改Mihoyo游戏中的资源,如角色模型、动画、音效和场景等。HoYoStudio支持Mihoyo的多款游戏,如《原神》(Genshin Impact)、《崩坏3》(Honkai Impact 3rd)、《崩坏:星穹铁道》(Honkai: Star Rail)和《未定事件簿》(Tears of Themis)。


HoYoStudio功能包括:

1. 更改所选游戏:使用“选项(Option)->指定游戏(Specify Game)”。

Change selected Game by using "Option -> Specify Game".

2. 集成Radioegor146的仓库以通过“选项->指定AI版本”加载asset_index。

Integration with "Radioegor146" repo to load asset_index through "Options -> Specify AI version".

3. 支持导出可编辑资产(并非所有资产),支持XOR/JSON格式的MiHoYoBinData。

Exportable Assets (not all of them) with XOR/JSON support for "MiHoYoBinData"

4. 可选调试控制台。

Togglable debug console.

5. 容器/文件名恢复。

Container/filename recovery for Assets

6. 构建资产地图,即游戏文件内的资产列表。

Build AssetMap, An asset list of assets inside game files.

7. 通过命令行界面(CLI)构建CABMap/资产地图(支持Unity类型和正则表达式过滤器)。

Build CABMap/AssetMap through CLI (with supported `Unity Type` and `Regex` filters).

8. 通过命令行界面导出资产(支持Unity类型和正则表达式过滤器以及分组)。

Export assets through CLI (with supported `Unity Type` and `Regex` filters and grouping).


如何使用HoYoStudio:

1. 构建CABMap(杂项->构建CABMap)。

Build CABMap (Misc. -> Build CABMap).

2. 加载文件。

Load files.

命令行版本(Description):

用法(Usage):AssetStudioCLI <输入路径> <输出路径> [选项]

AssetStudioCLI <input_path> <output_path> [options]

参数(Arguments):

<输入路径>:输入文件/文件夹。

<input_path> Input file/folder.

<输出路径>:输出文件夹。

<output_path> Output folder.

选项(Options):

--silent:隐藏日志消息。

silent Hide log messages.

--type :指定Unity类类型。

type <Texture2D|Sprite|etc..>

Specify unity class type(s)

--filter :指定正则过滤器。

filter <filter> Specify regex filter(s).

--game (必需):指定游戏。

game <BH3|GI|SR|TOT> (REQUIRED)

Specify Game.

--map_op :指定要构建的地图。[默认:无]

map_op <AssetMap|Both|CABMap|None>

Specify which map to build. [default: None]

--map_type :资产地图输出类型。[默认:XML]

map_type <JSON|XML>

AssetMap output type. [default: XML]

--map_name :指定资产地图文件名。

map_name <map_name>

Specify AssetMap file name.

--group_assets_type :指定导出的资产分组方式。[默认:0]

group_assets_type <ByContainer|BySource|ByType|None>

Specify how exported assets should be grouped. [default: 0]

--no_asset_bundle:从资产地图/导出中排除AssetBundle。

no_asset_bundle

Exclude AssetBundle from AssetMap/Export.

--no_index_object:从资产地图/导出中排除IndexObject/MiHoYoBinData。

no_index_object

Exclude IndexObject/MiHoYoBinData from AssetMap/Export.

--xor_key :解密MiHoYoBinData的XOR密钥。

xor_key <xor_key>

XOR key to decrypt MiHoYoBinData.

--ai_file :指定asset_index json文件路径(以恢复GI容器)。

ai_file <ai_file>

Specify asset_index json file path (to recover GI containers).

--version:显示版本信息

version

Show version information

此处有一段未翻译到

?, -h, --help

Show help and usage information

注意:

1. 如遇到任何“MeshRenderer/SkinnedMeshRenderer”错误,请在加载资产之前启用“禁用渲染器”选项。

in case of any "MeshRenderer/SkinnedMeshRenderer" errors, make sure to enable "Disable Renderer" option in "Export Options" before loading assets.

2. 如需在不获取所有动画的情况下导出模型/动画控制器,请启用“忽略控制器动画”选项。

in case of need to export models/animators without fetching all animations, make sure to enable "Ignore Controller Anim" option in "Options -> Export Options" before loading assets.

致谢:

Perfare:原始作者。

Khang06:genshinblkstuff,用于blk/mhy0提取。

Radioegor146:gi-asset-indexes,用于恢复/更新的asset_index。

Ds5678:AssetRipper[discord #mihoyo频道],提供了关于资产格式和解析的信息。

mafaca:uTinyRipper,用于YAML和AnimationClipConverter。