.net Core: Divinity Original Sin 2
var doc = XDocument.Load(filePath); var root = doc.Root; // Traverse <region><node><attribute> return ExtractNodes(root);
using System.Xml; public static LsxNode ParseLsx(string filePath) divinity original sin 2 .net core
var magic = reader.ReadInt32(); // "LSPK" var version = reader.ReadInt32(); // Read file table, compression flags, etc. var doc = XDocument
For production tools, recommend shelling out to or wrapping its DLL via P/Invoke. 7. Modifying Save Files (.lsv) .lsv = LZ4 compressed LSX container. var doc = XDocument.Load(filePath)
<save> <region id="GameState"> <node id="Player"> <attribute id="Level" value="12" type="int8" /> </node> </region> </save>
using var ms = new MemoryStream(input); using var decompressed = new MemoryStream(); using var lz4Stream = LZ4Stream.Decode(ms); lz4Stream.CopyTo(decompressed); return decompressed.ToArray();
DJKaas.com Dancehall and Reggae Music and News