Skip to content

Commit

Permalink
Update readme files
Browse files Browse the repository at this point in the history
  • Loading branch information
aelurum committed Sep 24, 2023
1 parent 5c489c5 commit 7c0a637
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 103 deletions.
86 changes: 68 additions & 18 deletions AssetStudioCLI/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
## AssetStudioModCLI
CLI version of AssetStudioMod.
- Supported asset types: `Texture2D`, `Sprite`, `TextAsset`, `MonoBehaviour`, `Font`, `Shader`, `MovieTexture`, `AudioClip`, `VideoClip`, `Mesh`.
## ArknightsStudioCLI
CLI version of ArknightsStudio.
- Supported asset types for export: `Texture2D`, `Sprite`, `AkPortraitSprite`, `TextAsset`, `MonoBehaviour`, `Font`, `Shader`, `MovieTexture`, `AudioClip`, `VideoClip`, `Mesh`.
- *There are no plans to add support for `AnimationClip`, `Animator` for now.*

### Usage
```
AssetStudioModCLI <input path to asset file/folder> [-m, --mode <value>]
ArknightsStudioCLI <input path to asset file/folder> [-m, --mode <value>]
[-t, --asset-type <value(s)>] [-g, --group-option <value>]
[-o, --output <path>] [-h, --help]
[--log-level <value>] [--log-output <value>]
[--image-format <value>] [--audio-format <value>]
[--export-asset-list <value>] [--filter-by-name <text>]
[--filter-by-container <text>] [--filter-by-pathid <text>]
[--filter-by-text <text>] [--assembly-folder <path>]
[--unity-version <text>] [--not-restore-extension]
[--fbx-scale-factor <value>] [--fbx-bone-size <value>]
[--filter-by-name <text>] [--filter-by-container <text>]
[--filter-by-pathid <text>] [--filter-by-text <text>]
[--spritealpha-mode <value>] [--alphatex-resampler <value>]
[--shadow-gamma <value>] [--original-avg-names]
[--add-aliases] [--export-asset-list <value>]
[--assembly-folder <path>] [--unity-version <text>]
[--not-restore-extension] [--load-all]
General Options:
-m, --mode <value> Specify working mode
<Value: export(default) | exportRaw | dump | info | live2d>
<Value: export(default) | exportRaw | dump | info | live2d | splitObjects>
Export - Exports converted assets
ExportRaw - Exports raw data
Dump - Makes asset dumps
Info - Loads file(s), shows the number of available for export assets and exits
Live2D - Exports Live2D Cubism 3 models
SplitObjects - Exports split objects (fbx)
Example: "-m info"
-t, --asset-type <value(s)> Specify asset type(s) to export
<Value(s): tex2d, sprite, textAsset, monoBehaviour, font, shader, movieTexture,
audio, video, mesh | all(default)>
<Value(s): tex2d, sprite, akPortrait, textAsset, monoBehaviour, font, shader,
movieTexture, audio, video, mesh | all(default)>
All - export all asset types, which are listed in the values
*To specify multiple asset types, write them separated by ',' or ';' without spaces
Examples: "-t sprite" or "-t tex2d,sprite,audio" or "-t tex2d;sprite;font"
Expand Down Expand Up @@ -67,12 +72,16 @@ Convert Options:
None - Do not convert audios and export them in their own format
Example: "--audio-format wav"
Advanced Options:
--export-asset-list <value> Specify the format in which you want to export asset list
<Value: none(default) | xml>
None - Do not export asset list
Example: "--export-asset-list xml"
FBX Options:
--fbx-scale-factor <value> Specify the FBX Scale Factor
<Value: float number from 0 to 100 (default=1)
Example: "--fbx-scale-factor 50"
--fbx-bone-size <value> Specify the FBX Bone Size
<Value: integer number from 0 to 100 (default=10)
Example: "--fbx-bone-size 10"
Filter Options:
--filter-by-name <text> Specify the name by which assets should be filtered
*To specify multiple names write them separated by ',' or ';' without spaces
Example: "--filter-by-name char" or "--filter-by-name char,bg"
Expand All @@ -90,8 +99,49 @@ Advanced Options:
*To specify multiple values write them separated by ',' or ';' without spaces
Example: "--filter-by-text portrait" or "--filter-by-text portrait,art"
Arknights Options:
--spritealpha-mode <value> Specify the mode in which you want to export sprites with alpha texture
<Value: none | internalOnly | searchExternal(default)>
None - Export sprites without alpha texture applied
InternalOnly - Export sprites with internal alpha texture applied (if exist)
SearchExternal - Export sprites with internal alpha texture applied,
and in case it doesn't exist, Studio will try to find an external alpha texture
Example: "--spritealpha-mode internalOnly"
--alphatex-resampler <value> Specify the alpha texture upscale algorithm for 2048x2048 sprites
<Value: nearest | bilinear | bicubic | mitchell(default) | spline | welch>
Mitchell - Mitchell Netravali algorithm. Yields good equilibrium between
sharpness and smoothness (produces less artifacts than bicubic in the current use case)
Spline - Similar to Mitchell Netravali but yielding smoother results
Welch - A high speed algorithm that delivers very sharpened results
Example: "--alphatex-resampler bicubic"
--shadow-gamma <value> Specify the gamma correction of semi-transparent shadow for 2048x2048 sprites
<Value: integer number from -5 to 5 (default=2)>
<0 - Make the shadow darker
0 - Do not change the brightness of the shadow
>0 - Make the shadow lighter
Example: "--shadow-gamma 0"
--original-avg-names (Flag) If specified, names of avg character sprites will not be fixed
--add-aliases (Flag) If specified, aliases will be added to avg character sprite names (if exist)
Advanced Options:
--export-asset-list <value> Specify the format in which you want to export asset list
<Value: none(default) | xml>
None - Do not export asset list
Example: "--export-asset-list xml"
--assembly-folder <path> Specify the path to the assembly folder
--unity-version <text> Specify Unity version. Example: "--unity-version 2017.4.39f1"
--not-restore-extension (Flag) If specified, AssetStudio will not try to use/restore original TextAsset
--unity-version <text> Specify Unity version
Example: "--unity-version 2017.4.39f1"
--not-restore-extension (Flag) If specified, Studio will not try to use/restore original TextAsset
extension name, and will just export all TextAssets with the ".txt" extension
--load-all (Flag) If specified, Studio will load assets of all types
(Only for Dump, Info and ExportRaw modes)
```
135 changes: 50 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,158 +1,131 @@
# AssetStudioMod
# ArknightsStudio

[![Build status](https://ci.appveyor.com/api/projects/status/5qyai0hqs0ktyara/branch/AssetStudioMod?svg=true)](https://ci.appveyor.com/project/aelurum/assetstudiomod/branch/AssetStudioMod)
[![Build status](https://ci.appveyor.com/api/projects/status/857ucvvp0cykv1ni?svg=true)](https://ci.appveyor.com/project/aelurum/arknightsstudio)

**AssetStudioMod** - modified version of Perfare's [AssetStudio](https://github.com/Perfare/AssetStudio), mainly focused on UI optimization and some functionality enhancements.
**ArknightsStudio** is a modified version of AssetStudio designed for Arknights. Based on [AssetStudioMod](https://github.com/aelurum/AssetStudio).

**Neither the repository, nor the tool, nor the author of the tool, nor the author of the modification is affiliated with, sponsored, or authorized by Unity Technologies or its affiliates.**

Since the original repo has been archived, it's worth saying that you shouldn't expect support for newer versions of Unity from this fork.
Unfortunately, I can't continue Perfare's work and keep AssetStudio up to date.

## Game specific modifications

- ArknightsStudio - soon™

## AssetStudio Features

- Support version:
- 3.4 - 2022.1
- Support asset types:
- **Texture2D** : convert to png, tga, jpeg, bmp, webp
- **Sprite** : crop Texture2D to png, tga, jpeg, bmp, webp
- **AudioClip** : mp3, ogg, wav, m4a, fsb. Support converting FSB file to WAV(PCM)
- **Font** : ttf, otf
- **Mesh** : obj
- **TextAsset**
- **Shader** (for Unity < 2021)
- **MovieTexture**
- **VideoClip**
- **MonoBehaviour** : json
- **Animator** : export to FBX file with bound AnimationClip

## AssetStudioMod Features
## ArknightsStudio Features

- CLI version (for Windows, Linux, Mac)
- `Animator` and `AnimationClip` assets are not supported in the CLI version
- Support of sprites with alpha mask
- Support of image export in WebP format
- Support of Live2D Cubism 3 model export
- Ported from my fork of Perfare's [UnityLive2DExtractor](https://github.com/aelurum/UnityLive2DExtractor)
- Using the Live2D export in AssetStudio allows you to specify a Unity version and assembly folder if needed
- Detecting bundles with UnityCN encryption
- Detection only. If you want to open them, please use Razmoth's [Studio](https://github.com/RazTools/Studio)
- Some UI optimizations and bug fixes (See [CHANGELOG](https://github.com/aelurum/AssetStudio/blob/AssetStudioMod/CHANGELOG.md) for details)

- Support of sprites with alpha texture
- Support of portrait sprites
- Correct support of avg character sprites
- Correct support of character art sprites

## Requirements

- AssetStudioMod.net472
- ArknightsStudio-net472
- GUI/CLI - [.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472)
- AssetStudioMod.net6
- ArknightsStudio-net6
- GUI/CLI (Windows) - [.NET Desktop Runtime 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)
- CLI (Linux/Mac) - [.NET Runtime 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)
- AssetStudioMod.net7
- ArknightsStudio-net7
- GUI/CLI (Windows) - [.NET Desktop Runtime 7.0](https://dotnet.microsoft.com/download/dotnet/7.0)
- CLI (Linux/Mac) - [.NET Runtime 7.0](https://dotnet.microsoft.com/download/dotnet/7.0)

## CLI Usage

You can read CLI readme [here](https://github.com/aelurum/AssetStudio/blob/AssetStudioMod/AssetStudioCLI/ReadMe.md).
You can read CLI readme [here](https://github.com/aelurum/AssetStudio/blob/ArknightsStudio/AssetStudioCLI/ReadMe.md).

### Run

- Command-line: `AssetStudioModCLI <asset folder path>`
- Command-line for Portable versions (.NET 6+): `dotnet AssetStudioModCLI.dll <asset folder path>`
- Command-line: `ArknightsStudioCLI <asset folder path>`
- Command-line for Portable versions (.NET 6+): `dotnet ArknightsStudioCLI.dll <asset folder path>`

### Basic Samples

- Show a list with a number of assets of each type available for export
```
AssetStudioModCLI <asset folder path> -m info
ArknightsStudioCLI <asset folder path> -m info
```
- Export assets of all supported for export types
```
AssetStudioModCLI <asset folder path>
ArknightsStudioCLI <asset folder path>
```
- Export assets of specific types
```
AssetStudioModCLI <asset folder path> -t tex2d
ArknightsStudioCLI <asset folder path> -t sprite
```
```
ArknightsStudioCLI <asset folder path> -t tex2d,sprite,audio
```
AssetStudioModCLI <asset folder path> -t tex2d,sprite,audio
- Export portrait sprites
```
ArknightsStudioCLI <asset folder path> -t akPortrait
```
- Export assets grouped by type
```
AssetStudioModCLI <asset folder path> -g type
ArknightsStudioCLI <asset folder path> -g type
```
- Export assets to a specified output folder
```
AssetStudioModCLI <asset folder path> -o <output folder path>
ArknightsStudioCLI <asset folder path> -o <output folder path>
```
- Dump assets to a specified output folder
```
AssetStudioModCLI <asset folder path> -m dump -o <output folder path>
ArknightsStudioCLI <asset folder path> -m dump -o <output folder path>
```
- Export Live2D Cubism models
- Export assets and create a log file
```
AssetStudioModCLI <asset folder path> -m live2d
ArknightsStudioCLI <asset folder path> --log-output both
```
> When running in live2d mode you can only specify `-o`, `--log-level`, `--log-output`, `--export-asset-list`, `--unity-version` and `--assembly-folder` options.
Any other options will be ignored.
- Export all FBX objects (similar to "Export all objects (split)" option in the GUI)
```
AssetStudioModCLI <asset folder path> -m splitObjects
ArknightsStudioCLI <asset folder path> -m splitObjects
```
> When running in splitObjects mode you can only specify `-o`, `--log-level`, `--log-output`, `--export-asset-list`, `--image-format`, `--filter-by-name` and `--unity-version` options.
Any other options will be ignored.

### Advanced Samples
- Export image assets converted to webp format to a specified output folder
```
AssetStudioModCLI <asset folder path> -o <output folder path> -t sprite,tex2d --image-format webp
ArknightsStudioCLI <asset folder path> -o <output folder path> -t sprite,akPortrait,tex2d --image-format webp
```
- Show the number of audio assets that have "voice" in their names
- Export avg character sprites with aliases in their names
```
AssetStudioModCLI <asset folder path> -m info -t audio --filter-by-name voice
ArknightsStudioCLI <asset folder path> -t sprite --add-aliases
```
- Export audio assets that have "voice" in their names
- Export character art sprites without brightness change of semi-transparent shadow for 2048x2048 images
```
AssetStudioModCLI <asset folder path> -t audio --filter-by-name voice
ArknightsStudioCLI <asset folder path> -t sprite --shadow-gamma 0
```
- Export audio assets that have "music" or "voice" in their names
- Show the number of audio assets that have "voice" in their containers
```
AssetStudioModCLI <asset folder path> -t audio --filter-by-name music,voice
ArknightsStudioCLI <asset folder path> -m info -t audio --filter-by-container voice
```
- Export audio assets that have "voice" in their containers
```
AssetStudioModCLI <asset folder path> -t audio --filter-by-name music --filter-by-name voice
ArknightsStudioCLI <asset folder path> -t audio --filter-by-container voice
```
- Export audio assets that have "char" in their names **or** containers
- Export audio assets that have "music" or "voice" in their containers
```
AssetStudioModCLI <asset folder path> -t audio --filter-by-text char
ArknightsStudioCLI <asset folder path> -t audio --filter-by-container music,voice
```
- Export audio assets that have "voice" in their names **and** "char" in their containers
```
AssetStudioModCLI <asset folder path> -t audio --filter-by-name voice --filter-by-container char
ArknightsStudioCLI <asset folder path> -t audio --filter-by-container music --filter-by-container voice
```
- Export FBX objects that have "model" or "scene" in their names and set the scale factor to 10
- Export audio assets that have "char" in their names **or** containers
```
AssetStudioModCLI <asset folder path> -m splitObjects --filter-by-name model,scene --fbx-scale-factor 10
ArknightsStudioCLI <asset folder path> -t audio --filter-by-text char
```
- Export MonoBehaviour assets that require an assembly folder to read and create a log file
- Export audio assets that have "loop" in their names **and** "music" in their containers
```
AssetStudioModCLI <asset folder path> -t monobehaviour --assembly-folder <assembly folder path> --log-output both
ArknightsStudioCLI <asset folder path> -t audio --filter-by-name loop --filter-by-container music
```
- Export assets that require to specify a Unity version
- Export FBX objects that have "model" or "scene" in their names and set the scale factor to 10
```
AssetStudioModCLI <asset folder path> --unity-version 2017.4.39f1
ArknightsStudioCLI <asset folder path> -m splitObjects --filter-by-name model,scene --fbx-scale-factor 10
```
- Load assets of all types and show them (similar to "Display all assets" option in the GUI)
```
AssetStudioModCLI <asset folder path> -m info --load-all
ArknightsStudioCLI <asset folder path> -m info --load-all
```
- Load assets of all types and dump Material assets
```
AssetStudioModCLI <asset folder path> -m dump -t material --load-all
ArknightsStudioCLI <asset folder path> -m dump -t material --load-all
```

## GUI Usage
Expand All @@ -161,13 +134,13 @@ AssetStudioModCLI <asset folder path> -m dump -t material --load-all

Use **File->Load file** or **File->Load folder**.

When AssetStudio loads AssetBundles, it decompresses and reads it directly in memory, which may cause a large amount of memory to be used. You can use **File->Extract file** or **File->Extract folder** to extract AssetBundles to another folder, and then read.
When ArknightsStudio loads AssetBundles, it decompresses and reads it directly in memory, which may cause a large amount of memory to be used. You can use **File->Extract file** or **File->Extract folder** to extract AssetBundles to another folder, and then read.

### Extract/Decompress AssetBundles

Use **File->Extract file** or **File->Extract folder**.

### Export Assets, Live2D models
### Export Assets

Use **Export** menu.

Expand All @@ -183,14 +156,6 @@ Select model from "Scene Hierarchy" then select the AnimationClip from "Asset Li

Export Animator will export bound AnimationClip or use **Ctrl** to select Animator and AnimationClip from "Asset List", using **Export->Export Animator with selected AnimationClip** to export.

### Export MonoBehaviour

When you select an asset of the MonoBehaviour type for the first time, AssetStudio will ask you the directory where the assembly is located, please select the directory where the assembly is located, such as the `Managed` folder.

#### For Il2Cpp

First, use [Il2CppDumper](https://github.com/Perfare/Il2CppDumper) to generate dummy dll, then when using AssetStudio to select the assembly directory, select the dummy dll folder.

## Build

* Visual Studio 2022 or newer
Expand Down

0 comments on commit 7c0a637

Please sign in to comment.