MVGLTools 1.0.1
dotnet add package MVGLTools --version 1.0.1
NuGet\Install-Package MVGLTools -Version 1.0.1
<PackageReference Include="MVGLTools" Version="1.0.1" />
<PackageVersion Include="MVGLTools" Version="1.0.1" />
<PackageReference Include="MVGLTools" />
paket add MVGLTools --version 1.0.1
#r "nuget: MVGLTools, 1.0.1"
#:package MVGLTools@1.0.1
#addin nuget:?package=MVGLTools&version=1.0.1
#tool nuget:?package=MVGLTools&version=1.0.1
MVGL.NET
MVGL.NET is a crude .NET Library for working with several Media.Vision game formats used by:
- Digimon Story: Cyber Sleuth (DSCS)
- Digimon Story: Time Stranger (DSTS)
- The Hundred Line -Last Defense Academy- (THL)
It can unpack and repack MDB1 archives, extract and create AFS2 archives, convert EXPA table data to and from CSV, and encrypt or decrypt DSCS save files.
Credit and provenance
This project is based on the original MVGLTools / DSCSTools work by SydMontague.
The original project documentation and license have been kept in this repository as:
This README is an updated adaptation of that older documentation for the current C#/.NET version in this repository. The original author deserves the core format research and the original implementation credit.
What changed in this version
Compared to the old README and older CLI:
- this repository is a C#/.NET rewrite rather than the original native implementation
- the CLI now uses subcommands instead of
--game=... --mode=... MDB1handling is profile-based viadscs,dscs-nocrypt,dsts, andthl- table conversion is exposed as
expacommands - the currently implemented command set is narrower than the old README: some older modes described there are not exposed by this build
- save encryption and decryption are currently exposed as direct
savecommands
If you are familiar with the old syntax, check the usage section below before assuming older commands still apply.
Current features
- Unpack
MDB1/.mvglarchives - Extract a single file from an
MDB1archive - Repack / create
MDB1archivesnormalcompressionnonecompressionadvancedcompression with data deduplication
- Unpack and repack
AFS2archives - Export
EXPAtables to CSV - Import CSV back into
EXPA - Encrypt and decrypt DSCS PC save files
- Use the library APIs directly from .NET code
Requirements
- .NET 8 SDK
This project currently targets net8.0.
API overview
Mdb1<TProfile>
Most library users will spend most of their time with Mdb1<TProfile>.
Useful factory methods:
Mdb1<TProfile>.Create()creates a new in-memory archiveMdb1<TProfile>.Open(path)/Read(path)loads an archive from disk
Useful properties:
SourcePathreturns the path the archive was loaded from or last written toFilesreturns the archive file list
Useful read methods:
Extract(outputFolder)extracts the full archive to diskExtractSingleFile(outputPath, archivePath)extracts one fileGetFileData(archivePath)/ReadFileData(archivePath)returns a file asbyte[]ContainsFile(archivePath)checks whether a file exists in the archive
Useful write/edit methods:
AddFile(sourcePath, archivePath)adds a disk file into the archiveAddFile(archivePath, data)adds raw bytes into the archiveAddFolder(sourceFolder, archiveRoot)recursively adds a folder treeUpdateFile(sourcePath, archivePath)replaces an existing archive entry from diskUpdateFile(archivePath, data)replaces an existing archive entry from bytesRemoveFile(archivePath)/DeleteFile(archivePath)removes an entryWrite(target, compressMode)writes the archive to diskWrite(stream, compressMode)writes to a streamToStream(compressMode)builds the archive into aMemoryStream
Expa
Useful static methods:
Expa.Read<TProfile>(path)reads anEXPAfile into aTableFileExpa.ExportCsv(tableFile, targetFolder)exports tables as CSVExpa.ImportCsv<TProfile>(sourceFolder)reads CSV back into aTableFileExpa.Write<TProfile>(tableFile, targetPath)writes a rebuiltEXPAfile
Afs2
Useful static methods:
Afs2.Extract(source, target)extracts anAFS2archiveAfs2.Pack(source, target)builds anAFS2archive from a folder
SaveFile
Useful static methods:
SaveFile.Decrypt(source, target)decrypts a DSCS save fileSaveFile.Encrypt(source, target)encrypts a DSCS save file
Example: extract an archive
using MVGLTools;
var archive = Mdb1<DscsMdbProfile>.Open("DSDBP.steam.mvgl");
archive.Extract("DSDBP_extracted");
Example: create or rebuild an archive
using MVGLTools;
Mdb1<DstsMdbProfile>.Create()
.AddFolder("DSDBP_extracted")
.Write("DSDBP.steam.mvgl", CompressMode.Advanced);
Example: modify one file in an archive
using MVGLTools;
var archive = Mdb1<ThlMdbProfile>.Open("DSDBP.steam.mvgl");
archive.UpdateFile("ui_chara_icon_1819.img", "images/ui_chara_icon_1819.img");
archive.Write("DSDBP.steam.mvgl", CompressMode.Normal);
Example: convert EXPA to and from CSV
using MVGLTools;
var tableFile = Expa.Read<DscsExpaProfile>("m00_d02_0501.mbe");
Expa.ExportCsv(tableFile, "m00_d02_0501.csv");
var rebuilt = Expa.ImportCsv<DscsExpaProfile>("m00_d02_0501.csv");
Expa.Write<DscsExpaProfile>(rebuilt, "m00_d02_0501_new.mbe");
Example: work with AFS2 and save files
using MVGLTools;
Afs2.Extract("DSDBvo.mgvl", "DSDBvo");
Afs2.Pack("DSDBvo", "DSDBvo.mgvl");
SaveFile.Decrypt("slot_0001.bin", "slot_0001.dec.bin");
SaveFile.Encrypt("slot_0001.dec.bin", "slot_0001.enc.bin");
Notes for library consumers
Mdb1<TProfile>keeps archive contents in memory, so very large archives may require substantial RAM and may take time to fully load.Extract()writes all files to disk, whileGetFileData()/ReadFileData()let you access a single file as bytes.AddFile(),UpdateFile(),RemoveFile(), andContainsFile()support programmatic archive editing workflows.EXPAstructure lookups still depend on the working directory if you rely on externalstructures/...folders. This may be addressed in the future.SaveFileis currently relevant to DSCS save encryption only.
Notes
- The older README documents features and workflows from the original project lineage. It remains useful historical reference material, but it does not exactly match the current CLI.
- If you are migrating scripts from the old tool, update them to the new subcommand-based syntax.
Credits
This project builds on format research and prior implementation work by SydMontague and the broader modding community referenced in the original documentation.
Third-party libraries used by this version include:
doboz4netfor Doboz compression supportK4os.Compression.LZ4for LZ4 support
For broader historical credits, related tools, and community links, see README_old.md.
License
See LICENSE_old for the preserved upstream license text included with this repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- doboz4net (>= 1.0.1)
- K4os.Compression.LZ4 (>= 1.3.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 97 | 4/9/2026 |