DatReaderWriter 0.1.0-beta.42
dotnet add package DatReaderWriter --version 0.1.0-beta.42
NuGet\Install-Package DatReaderWriter -Version 0.1.0-beta.42
<PackageReference Include="DatReaderWriter" Version="0.1.0-beta.42" />
paket add DatReaderWriter --version 0.1.0-beta.42
#r "nuget: DatReaderWriter, 0.1.0-beta.42"
// Install DatReaderWriter as a Cake Addin #addin nuget:?package=DatReaderWriter&version=0.1.0-beta.42&prerelease // Install DatReaderWriter as a Cake Tool #tool nuget:?package=DatReaderWriter&version=0.1.0-beta.42&prerelease
DatReaderWriter
DatReaderWriter is an open-source library for reading and writing .dat files used by the game Asheron's Call. This tool allows players and developers to access and modify game data files for various purposes, such as creating mods or analyzing game content.
Table of Contents
Features
- Read/Write AC .dat files (Including creating new dats)
- Full Dat BTree seeking / insertion / removal / range queries
Basic Usage
See Tests for full usage.
Update spell names and descriptions
var portalDat = new PortalDatabase(Path.Combine(config.clientDir, "client_portal.dat"), DatAccessType.ReadWrite);
var spellTable = portalDat.SpellTable ?? throw new Exception("Failed to read spell table");
// update spell name / description (no need to worry about updating Components with newly
// encrypted values, they will be transparently decrypted/encrypted during (un)packing).
spellTable.Spells[1].Name = "Strength Other I (updated)";
spellTable.Spells[1].Description = "Increases the target's Strength by 10 points. (updated)";
//write the updated spell table
if (!portalDat.TryWriteFile(spellTable)) {
throw new Exception("Failed to write spell table");
}
// close dat
portalDat.Dispose();
Rewrite all MotionTables to be 100x speed
var portalDat = new PortalDatabase(Path.Combine(config.clientDir, "client_portal.dat"), DatAccessType.ReadWrite);
// loop through all motion tables and update framerates
foreach (var mTable in portalDat.MotionTables) {
// build a list of all animations
var anims = new List<AnimData>();
anims.AddRange(mTable.Cycles.Values.SelectMany(c => c.Anims));
anims.AddRange(mTable.Modifiers.Values.SelectMany(c => c.Anims));
anims.AddRange(mTable.Links.Values.SelectMany(v => v.MotionData.Values.SelectMany(c => c.Anims)));
// update all animation framerates
foreach (var anim in anims) {
anim.Framerate *= 100f;
}
// write MotionTable back to the dat
portalDat.TryWriteFile(mTable);
}
// close dat
portalDat.Dispose();
Contributing
We welcome contributions from the community! If you would like to contribute to DatReaderWriter, please follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -am 'Add some feature').
- Push to the branch (git push origin feature-branch).
- Create a new Pull Request.
Thanks
In no particular order, thanks to ACE team, GDLE team, OptimShi, paradox, and Yonneh. Used lots of projects as a reference for different parts.
License
This project is licensed under the MIT License. See the LICENSE.txt file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- System.Buffers (>= 4.5.1)
- System.IO.Pipelines (>= 8.0.0)
- System.Memory (>= 4.5.5)
-
.NETStandard 2.0
- System.Buffers (>= 4.5.1)
- System.IO.Pipelines (>= 8.0.0)
- System.Memory (>= 4.5.5)
-
net8.0
- System.Buffers (>= 4.5.1)
- System.IO.Pipelines (>= 8.0.0)
- System.Memory (>= 4.5.5)
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 |
---|---|---|
0.1.0-beta.42 | 57 | 11/16/2024 |