Shenmue I & II Modding SDK for C#
This library was created to give developers an easy access to all the file formats of Shenmue I & II.
How to contribute:
- Feel free to commit if you want to contribute some fixes or features.
- If you found an bug just create an issue on GitHub.
- For feature requests just create an issue on GitHub.
Model reading example:
using ShenmueDKSharp;
using ShenmueDKSharp.Files.Models;
public void ReadMT7(string filename)
{
MT7 mt7 = new MT7(filename);
foreach(ModelNode node in mt7.GetAllNodes())
{
foreach(MeshFace face in node.Faces)
{
face.GetFloatArray(node, Vertex.VertexFormat.VertexNormalUV);
}
}
}See the github wiki for more examples.
For more informations about the file formats see the wulinshu wiki.
| Name | Read | Write | Description | Notes |
|---|---|---|---|---|
| AFS | ✔️ | ✔️ | Archive | |
| IDX | ✔️ | 🔶 | AFS Archive Reference Names | Only IDX0 can be created |
| PKF | ✔️ | ✔️ | Archive (mainly textures for PKS) | |
| PKS (IPAC) | ✔️ | ✔️ | Archive | |
| SPR | ✔️ | ✔️ | Sprite texture Container | |
| GZ | ✔️ | ✔️ | GZip | |
| TAD/TAC | ✔️ | ✔️ | d3t TAD/TAC container with hash mapping | Filename coverage based on wulinshu hash database |
| Name | Read | Write | Description | Notes |
|---|---|---|---|---|
| PVRT | 🔶 | 🔶 | PowerVR Texture | Not all formats working but enough for MT5 and MT7 |
| DDS | ✔️ | ✔️ | DirectDraw_Surface | |
| JPEG | ✔️ | ✔️ | JPEG format | |
| BMP | ✔️ | ✔️ | Bitmap format | |
| PNG | ✔️ | ✔️ | PNG format |
| Value | Name | Read | Write | Description |
|---|---|---|---|---|
| 0x00 | ARGB1555 | ✔️ | ✔️ | Format consisting of one bit of alpha value and five bits of RGB values. |
| 0x01 | RGB565 | ✔️ | ✔️ | Format without alpha value and consisting of five bits of RB values and six bits of G value. |
| 0x02 | ARGB4444 | ✔️ | ✔️ | Format consisting of four bits of alpha value and four bits of RGB values. |
| 0x03 | YUV422 | ✔️ | ✔️ | YUV422 format |
| 0x04 | BUMP | ✔️ | ✔️ | Bump map with positiv only normal vectors (S and R direction angles) |
| 0x05 | RGB555 | ✔️ | ✔️ | for PCX compatible only |
| 0x06 | ARGB8888 | ✔️ | ✔️ | Format consisting of 1 byte of alpha value and 1 byte of RGB values. (Palettize only!) |
| 0x80 | DDS_RGB24 | ✔️ | ✔️ | RGB24 format (DXT1) |
| 0x81 | DDS_RGBA32 | ✔️ | ✔️ | RGBA32 format (DXT3) |
| Value | Name | Read | Write | Notes |
|---|---|---|---|---|
| 0x01 | SQUARE_TWIDDLED | ✔️ | ✔️ | |
| 0x02 | SQUARE_TWIDDLED_MIPMAP | ✔️ | ✔️ | |
| 0x03 | VECTOR_QUANTIZATION | ✔️ | ✔️ | |
| 0x04 | VECTOR_QUANTIZATION_MIPMAP | ✔️ | ✔️ | |
| 0x05 | PALETTIZE_4BIT | ✔️ | ✔️ | |
| 0x06 | PALETTIZE_4BIT_MIPMAP | ✔️ | ✔️ | |
| 0x07 | PALETTIZE_8BIT | ✔️ | ✔️ | |
| 0x08 | PALETTIZE_8BIT_MIPMAP | ✔️ | ✔️ | |
| 0x09 | RECTANGLE | ✔️ | ✔️ | |
| 0x0A | RECTANGLE_MIPMAP | ❌ | ❌ | Reserved: Can't use. |
| 0x0B | RECTANGLE_STRIDE | ✔️ | ✔️ | |
| 0x0C | RECTANGLE_STRIDE_MIPMAP | ❌ | ❌ | Reserved: Can't use. |
| 0x0D | RECTANGLE_TWIDDLED | ✔️ | ✔️ | Should not be supported. |
| 0x0E | BMP | ❌ | ❌ | No information. |
| 0x0F | BMP_MIPMAP | ❌ | ❌ | No information. |
| 0x10 | VECTOR_QUANTIZATION_SMALL | ✔️ | ✔️ | |
| 0x11 | VECTOR_QUANTIZATION_SMALL_MIPMAP | ✔️ | ✔️ | |
| 0x80 | DDS | ✔️ | ✔️ | DDS format |
| 0x87 | DDS | ✔️ | ✔️ | DDS format |
| Name | Read | Write | Description | Notes |
|---|---|---|---|---|
| MT5 | 🔶 | 🔶 | Model Container | Reading/Writing works but still has some unknown stuff. |
| MT6 | ❌ | ❌ | Model Container | |
| MT7 | 🔶 | ❌ | Model Container | Reading works but missing rig and skin weights and some unknown stuff |
| MOTN | ❌ | ❌ | Motion data (Animation sequences) | |
| OBJ | 🔶 | 🔶 | Wavefront OBJ | Very basic OBJ implementation |
| Name | Read | Write | Description | Notes |
|---|---|---|---|---|
| SND | ❌ | ❌ | Dreamcast sound file | |
| XWMA | ❌ | ❌ | Xbox WMA (XAudio2) file |
| Name | Read | Write | Description | Notes |
|---|---|---|---|---|
| SRF | ❌ | ❌ | Cinematic subtitles file | |
| FONTDEF | ❌ | ❌ | Font definition file | |
| SUB | ✔️ | ✔️ | Subtitles file | |
| GLYPHS | ❌ | ❌ | Font glyph file | |
| FON | ❌ | ❌ | Disk font file |
| Name | Read | Write | Description | Notes |
|---|---|---|---|---|
| CHRD | ❌ | ❌ | ||
| CHRM | ❌ | ❌ | ||
| COLS | ❌ | ❌ | Collisions (sm1) | |
| DOOR | ❌ | ❌ | Door portals? | |
| ECAM | ❌ | ❌ | ||
| FLDD | ❌ | ❌ | Collisions (sm2) | |
| LGHT | ❌ | ❌ | Lighting data | |
| MAPR | ❌ | ❌ | ||
| MAPT | ❌ | ❌ | ||
| SCEX | ❌ | ❌ | Cutscenes and maybe other stuff | |
| SNDP | ❌ | ❌ | Sound program | |
| WTHR | ❌ | ❌ | Weather data |
| Name | Read | Write | Description | Notes |
|---|---|---|---|---|
| ATH | ❌ | ❌ | Sequence Data | |
| SRL | ❌ | ❌ | Scroll Data | |
| IWD | ❌ | ❌ | LCD Table | |
| WDT | ❌ | ❌ | Weather Data | |
| UI | ❌ | ❌ | UI Json | |
| CHR | ❌ | ❌ | Character | |
| MVS | ❌ | ❌ | MVS data | |
| DYM | ❌ | ❌ | Dynamics Info | |
| CRM | ❌ | ❌ | Character Model | |
| CHT | ❌ | ❌ | Character Properties | |
| CSV | ❌ | ❌ | Comma-separated values | |
| EMU | ❌ | ❌ | Emulator file |
- ShenmueHDTools - GUI file unpacker/packer and converter for Shenmue I&II file formats.
- wudecon - CLI file unpacker/converter for Shenmue I&II file formats.
Contributors:
Starting code:
- SHENTRAD Team - Shenmue I & II DC ground work
- ShenmueHDTools - Project where it all started
- Fishbiter - MT5 and MOTN starting code
- hellwig - MT5 incompleted code
- yazgoo - MT5 and MT7 rough starting point
- nickworonekin - PVR reader/writer base code
- KFreon - DDS reader/writer base code
Other:
- Shenmue-Mods - Modding knowledge database
- Raymonf - Wulinshu TAD hash database