dsts-extractor 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dsts_extractor-0.8.1/LICENSE +21 -0
- dsts_extractor-0.8.1/PKG-INFO +20 -0
- dsts_extractor-0.8.1/README.md +151 -0
- dsts_extractor-0.8.1/pyproject.toml +50 -0
- dsts_extractor-0.8.1/setup.cfg +4 -0
- dsts_extractor-0.8.1/src/dsts_extractor/__init__.py +0 -0
- dsts_extractor-0.8.1/src/dsts_extractor/__main__.py +4 -0
- dsts_extractor-0.8.1/src/dsts_extractor/anim.py +587 -0
- dsts_extractor-0.8.1/src/dsts_extractor/anim_build.py +278 -0
- dsts_extractor-0.8.1/src/dsts_extractor/anim_sharing.py +76 -0
- dsts_extractor-0.8.1/src/dsts_extractor/assets/missing.png +0 -0
- dsts_extractor-0.8.1/src/dsts_extractor/blender_import.py +1752 -0
- dsts_extractor-0.8.1/src/dsts_extractor/build_index.py +215 -0
- dsts_extractor-0.8.1/src/dsts_extractor/catalog.py +134 -0
- dsts_extractor-0.8.1/src/dsts_extractor/chr_env.py +117 -0
- dsts_extractor-0.8.1/src/dsts_extractor/cli.py +1333 -0
- dsts_extractor-0.8.1/src/dsts_extractor/clut.py +103 -0
- dsts_extractor-0.8.1/src/dsts_extractor/data/digimon_index.json +3610 -0
- dsts_extractor-0.8.1/src/dsts_extractor/data/effect_textures.json +87 -0
- dsts_extractor-0.8.1/src/dsts_extractor/data/npc_face_map.json +538 -0
- dsts_extractor-0.8.1/src/dsts_extractor/data/npc_full_index.json +870 -0
- dsts_extractor-0.8.1/src/dsts_extractor/data/render_state.json +48 -0
- dsts_extractor-0.8.1/src/dsts_extractor/data/same_animation_data.json +261 -0
- dsts_extractor-0.8.1/src/dsts_extractor/data/shader_param_names.json +3168 -0
- dsts_extractor-0.8.1/src/dsts_extractor/doctor.py +155 -0
- dsts_extractor-0.8.1/src/dsts_extractor/dxbc.py +170 -0
- dsts_extractor-0.8.1/src/dsts_extractor/effects.py +50 -0
- dsts_extractor-0.8.1/src/dsts_extractor/export.py +462 -0
- dsts_extractor-0.8.1/src/dsts_extractor/extras.py +191 -0
- dsts_extractor-0.8.1/src/dsts_extractor/eyes.py +942 -0
- dsts_extractor-0.8.1/src/dsts_extractor/geom.py +853 -0
- dsts_extractor-0.8.1/src/dsts_extractor/glb_bundle.py +888 -0
- dsts_extractor-0.8.1/src/dsts_extractor/glb_optimize.py +180 -0
- dsts_extractor-0.8.1/src/dsts_extractor/glb_validate.py +538 -0
- dsts_extractor-0.8.1/src/dsts_extractor/gltf_writer.py +232 -0
- dsts_extractor-0.8.1/src/dsts_extractor/material_routing.py +538 -0
- dsts_extractor-0.8.1/src/dsts_extractor/mvgl.py +418 -0
- dsts_extractor-0.8.1/src/dsts_extractor/native_export.py +757 -0
- dsts_extractor-0.8.1/src/dsts_extractor/nlst.py +62 -0
- dsts_extractor-0.8.1/src/dsts_extractor/paths.py +196 -0
- dsts_extractor-0.8.1/src/dsts_extractor/setup_cmd.py +181 -0
- dsts_extractor-0.8.1/src/dsts_extractor/shaders/__init__.py +8 -0
- dsts_extractor-0.8.1/src/dsts_extractor/shaders/analyze.py +346 -0
- dsts_extractor-0.8.1/src/dsts_extractor/steam.py +226 -0
- dsts_extractor-0.8.1/src/dsts_extractor.egg-info/PKG-INFO +20 -0
- dsts_extractor-0.8.1/src/dsts_extractor.egg-info/SOURCES.txt +48 -0
- dsts_extractor-0.8.1/src/dsts_extractor.egg-info/dependency_links.txt +1 -0
- dsts_extractor-0.8.1/src/dsts_extractor.egg-info/entry_points.txt +3 -0
- dsts_extractor-0.8.1/src/dsts_extractor.egg-info/requires.txt +14 -0
- dsts_extractor-0.8.1/src/dsts_extractor.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nuffle
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dsts-extractor
|
|
3
|
+
Version: 0.8.1
|
|
4
|
+
Summary: Extract Digimon Story: Time Stranger chr models to FBX + GLB.
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: click==8.1.7
|
|
9
|
+
Requires-Dist: numpy>=1.24
|
|
10
|
+
Requires-Dist: Pillow>=11.0
|
|
11
|
+
Requires-Dist: texture2ddecoder>=1.0
|
|
12
|
+
Requires-Dist: platformdirs>=4.0
|
|
13
|
+
Requires-Dist: lz4>=4.0
|
|
14
|
+
Provides-Extra: optimize
|
|
15
|
+
Requires-Dist: dsts-extractor-gltfpack<2,>=1.2; extra == "optimize"
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pytest==8.3.3; extra == "dev"
|
|
18
|
+
Requires-Dist: pyright==1.1.389; extra == "dev"
|
|
19
|
+
Requires-Dist: build; extra == "dev"
|
|
20
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# dsts-extractor
|
|
2
|
+
|
|
3
|
+
A fan-made command-line tool for extracting models from **Digimon Story: Time Stranger**.
|
|
4
|
+
|
|
5
|
+
This project aims to to provide a streamlined way to export game-accurate digimon and NPC models from DSTS that you can drop into your own fan projects and start using them quickly, no manual tweaks or adjustments required.
|
|
6
|
+
|
|
7
|
+
This is the tool used to extract the models shown in [dsts-viewer](https://nuffle.me/dsts-viewer/) ([source](https://tangled.sh/nuffle.me/dsts-viewer)). Models will not be made available for direct download from that site. Instead, use this tool to extract the same models from your own copy of the game.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
|
|
11
|
+
- Python 3.12 or later ([Python setup guide](https://realpython.com/installing-python/))
|
|
12
|
+
- Your own Steam installation of [Digimon Story: Time Stranger](https://store.steampowered.com/app/1984270/Digimon_Story_Time_Stranger/)
|
|
13
|
+
- At least ~15 GB additional free disk space to unpack game files
|
|
14
|
+
- (Optional) Blender 4.x if you want to extract models as `.fbx` files
|
|
15
|
+
|
|
16
|
+
## Quick start
|
|
17
|
+
|
|
18
|
+
1. `pip install dsts-extractor` - Install the tool with pip
|
|
19
|
+
2. `dsts setup` - First-time setup (unpack game files to prepare for extraction)
|
|
20
|
+
3. `dsts list` - List all models available for extraction
|
|
21
|
+
4. `dsts export renamon` - Extract `renamon.glb` to the current directory
|
|
22
|
+
|
|
23
|
+
If you get stuck, try:
|
|
24
|
+
|
|
25
|
+
* Reading the full instructions below
|
|
26
|
+
* Running `dsts setup` again to try and fix any install path or game file errors
|
|
27
|
+
* Running `dsts --help` (or just `dsts`) for a list of commands
|
|
28
|
+
* Running `dsts export --help`, `dsts list --help`, etc. for options that work with a specific command
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Install the core tool
|
|
34
|
+
pip install dsts-extractor
|
|
35
|
+
|
|
36
|
+
# (Optional) Install extra binaries if you want to `--optimize` your models (smaller file size)
|
|
37
|
+
pip install dsts-extractor[optimize]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## First-time setup
|
|
41
|
+
|
|
42
|
+
`dsts setup` finds the Steam install and unpacks everything the exporter needs, straight from the game's own archives. This command configures some default paths for working with game files and will ask you to confirm or override them, including:
|
|
43
|
+
|
|
44
|
+
- Your DSTS Steam installation path
|
|
45
|
+
- An output directory for unpacked game files
|
|
46
|
+
- Your Blender installation path (optional)
|
|
47
|
+
|
|
48
|
+
Once confirmed, the command reads the game's `.mvgl` archives and unpacks them to the specified folder. The files must be unpacked before models can be extracted. If you update your game, add DLC, or update this tool, you may need to run setup again to unpack new files.
|
|
49
|
+
|
|
50
|
+
By default, the command grabs just the model data that it needs, which is about 14.5 GB. Choose the **full unpack** option if you want the entire game archive extracted (~41 GB, which includes maps, audio, and UI) if you want it for additional modding work.
|
|
51
|
+
|
|
52
|
+
You can re-run `dsts setup` again anytime to walk through the process, which will verify these setup paths and allow you to change them.
|
|
53
|
+
|
|
54
|
+
## CLI Usage
|
|
55
|
+
|
|
56
|
+
### Listing available models
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# List models available for export
|
|
60
|
+
dsts list # List all models
|
|
61
|
+
dsts list agu # List all models with name containing 'agu'
|
|
62
|
+
dsts list --filter=digimon # Only list in-battle digimon, not npcs/bosses/etc.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### Options
|
|
66
|
+
|
|
67
|
+
| Option | Values | Description |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| `--filter` | `digimon`, `npc`, `boss` | Limit results to a specific model type |
|
|
70
|
+
| `--format` | `table` (default), `list`, `raw` | Output format. `table` is human-readable; `list` prints one model name per line; `raw` prints all model names space-separated on a single line (both are handy for scripting). |
|
|
71
|
+
|
|
72
|
+
### Exporting models
|
|
73
|
+
|
|
74
|
+
By default, models are exported as self-contained `.glb` files (glTF 2.0 standard) with all meshes and materials intact. You should be able to load them into Blender or a standard model viewer of your choice and begin working with them.
|
|
75
|
+
|
|
76
|
+
> **NOTE:** This tool does not guarantee that models can be re-imported back into DSTS without significant work. Support for this may be added in the future, but for now be wary of using models directly for modding DSTS.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Export one model
|
|
80
|
+
# Outputs to current dir: renamon.glb
|
|
81
|
+
dsts export renamon
|
|
82
|
+
dsts export chr391 # Outputs renamon by model name: chr391.glb
|
|
83
|
+
dsts export renamon --optimized # Output with reduced file size, recommended in most cases
|
|
84
|
+
|
|
85
|
+
# Export multiple models
|
|
86
|
+
# Outputs models to current dir: guilmon.glb, growlmon.glb, wargrowlmon.glb
|
|
87
|
+
dsts export guilmon growlmon wargrowlmon
|
|
88
|
+
|
|
89
|
+
# Bulk export models, supports same args as `dsts list`
|
|
90
|
+
dsts export-all agu
|
|
91
|
+
dsts export-all --filter=digimon
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Options
|
|
95
|
+
|
|
96
|
+
| Option | Values | Description |
|
|
97
|
+
| --- | --- | --- |
|
|
98
|
+
| `--format` | `glb` (default), `fbx` | Output format for exported models (`fbx` requires Blender) |
|
|
99
|
+
| `--optimized` | flag (off by default) | Reduce file size at a small cost to accuracy (see [Optimization](#optimization)) |
|
|
100
|
+
| `-o`, `--out-dir` | directory (default: current dir) | Where to write the model files (the directory must already exist) |
|
|
101
|
+
|
|
102
|
+
#### Optimization
|
|
103
|
+
|
|
104
|
+
Passing `--optimized` runs the exported `.glb` through [gltfpack](https://github.com/zeux/meshoptimizer/tree/master/gltf) (meshopt compression). This compresses vertex data from 32-bit precision to 16-bit precision, which reduces model size by about 30% on average. Textures are unaffected. It's recommended for most uses, especially loading models on the web. Leave it off if you want the exact, full-precision export, e.g. for detailed editing in Blender.
|
|
105
|
+
|
|
106
|
+
`--optimized` needs the `gltfpack` tool. The simplest way to get it is the optional extra, which bundles a prebuilt binary:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pip install 'dsts-extractor[optimize]'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The resolution order for the gltfpack dependency is:
|
|
113
|
+
|
|
114
|
+
1. If gltfpack is found on your PATH, it will use that.
|
|
115
|
+
2. Otherwise, if `dsts-extractor[optimize]` is installed, it will use that.
|
|
116
|
+
3. Otherwise, if Node.js is installed, it will attempt to install gltfpack through npm and use that.
|
|
117
|
+
|
|
118
|
+
### Inspecting game files
|
|
119
|
+
|
|
120
|
+
You can use this command
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Output: table summary about model's bones, meshes, textures, shaders, etc.
|
|
124
|
+
dsts inspect terriermon
|
|
125
|
+
|
|
126
|
+
# Supports multiple models as well
|
|
127
|
+
dsts inspect lucemon lucemon-sm lucemon-cm
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### Options
|
|
131
|
+
|
|
132
|
+
| Option | Values | Description |
|
|
133
|
+
| --- | --- | --- |
|
|
134
|
+
| `--format` | `table` (default), `csv` | Output format of the inspect summary (`csv` for machine parsing) |
|
|
135
|
+
|
|
136
|
+
## Shaders
|
|
137
|
+
|
|
138
|
+
DSTS features distinctive cel shaders which do a lot of the heavy lifting in making the models appear anime-like in game. These shaders are **not bundled** with model exports because they require a lot of data about the game's live scenes in order to run properly. So you can't just drop them into a modeling program and expect them to look exactly like they do in-game. The easiest path to getting them looking good in your own fan project is to apply a general toon shader to the models in your scene and tweak it until it looks the way you want.
|
|
139
|
+
|
|
140
|
+
However, each `.glb` model does include lots of canonical, game-extracted data (like shader uniforms) in the `extras.dsts` section that you can use to drive your own shaders (like how bright a light emission should be, or animation timing information for special effects). This tool's companion project, [dsts-viewer](https://nuffle.me/dsts-viewer/), uses custom shaders that have been reverse-engineered from DSTS itself and uses this model data to drive them. See [data/dsts_extras.schema.json](./data/dsts_extras.schema.json) for details on the available fields.
|
|
141
|
+
|
|
142
|
+
> **Experimental:** If you want to replicate the dsts-viewer look, you can now download the body cel shader code as GLSL directly from the viewer site (Settings icon -> Cel shaders -> Download) and adapt them to your own project.
|
|
143
|
+
|
|
144
|
+
## Contributions & feedback
|
|
145
|
+
|
|
146
|
+
* Suggestions and bug reports welcome as issues
|
|
147
|
+
* Code contributions welcome through pull requests
|
|
148
|
+
* Contact me directly at:
|
|
149
|
+
* [@nuffle.me on Bluesky](https://bsky.app/profile/nuffle.me)
|
|
150
|
+
* [@dolphinspired on Discord](https://discord.com/users/263732939815256064)
|
|
151
|
+
* More links at [nuffle.me](https://nuffle.me/)!
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dsts-extractor"
|
|
7
|
+
version = "0.8.1"
|
|
8
|
+
description = "Extract Digimon Story: Time Stranger chr models to FBX + GLB."
|
|
9
|
+
license = { text = "MIT" }
|
|
10
|
+
# The CLI + core modules target 3.12+, but modules imported inside Blender's
|
|
11
|
+
# stdlib-only Python 3.11 (blender_import.py and everything it imports —
|
|
12
|
+
# geom, anim, anim_sharing, effects, eyes, extras, nlst, dxbc, paths) must
|
|
13
|
+
# stay 3.11-syntax-safe.
|
|
14
|
+
requires-python = ">=3.12"
|
|
15
|
+
dependencies = [
|
|
16
|
+
"click==8.1.7",
|
|
17
|
+
"numpy>=1.24",
|
|
18
|
+
"Pillow>=11.0",
|
|
19
|
+
"texture2ddecoder>=1.0",
|
|
20
|
+
"platformdirs>=4.0",
|
|
21
|
+
"lz4>=4.0",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.optional-dependencies]
|
|
25
|
+
# Node-free `--optimized`: the companion package bundles a prebuilt gltfpack
|
|
26
|
+
# binary (platform wheel). Version tracks the bundled gltfpack version.
|
|
27
|
+
optimize = ["dsts-extractor-gltfpack>=1.2,<2"]
|
|
28
|
+
dev = [
|
|
29
|
+
"pytest==8.3.3",
|
|
30
|
+
"pyright==1.1.389",
|
|
31
|
+
"build",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.scripts]
|
|
35
|
+
dsts-extractor = "dsts_extractor.cli:main"
|
|
36
|
+
dsts = "dsts_extractor.cli:main"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools]
|
|
39
|
+
package-dir = {"" = "src"}
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.packages.find]
|
|
42
|
+
where = ["src"]
|
|
43
|
+
include = ["dsts_extractor*"]
|
|
44
|
+
exclude = ["dsts_extractor.tests*"]
|
|
45
|
+
|
|
46
|
+
[tool.setuptools.package-data]
|
|
47
|
+
"dsts_extractor" = ["assets/*.png", "data/*.json"]
|
|
48
|
+
|
|
49
|
+
[tool.pytest.ini_options]
|
|
50
|
+
testpaths = ["src/dsts_extractor/tests"]
|
|
File without changes
|