Last active
May 2, 2024 09:03
-
-
Save Traderain/8e8dedeea2fabc4e5c6a3ea962940dd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.IO; | |
using WolvenKit.CR2W; | |
namespace WolvenKit | |
{ | |
class Dump | |
{ | |
public static void DumpRTTIClasses(string logfile) | |
{ | |
HashSet<string> ClassTypes = new HashSet<string>(); | |
foreach(var bundle in MainController.Get().BundleManager.Bundles) | |
{ | |
Console.Title = ("Witcher 3: The Wild Hunt RTTI Class dumper | DUMPING [" + bundle.Key + "]"); | |
foreach (var item in bundle.Value.Items) | |
{ | |
using (var ms = new MemoryStream()) | |
{ | |
string tempfile = Path.GetTempFileName(); | |
if (File.Exists(tempfile)) | |
File.Delete(tempfile); | |
try | |
{ | |
item.Value.Extract(tempfile); | |
using (var fs = new FileStream(tempfile, FileMode.Open)) | |
{ | |
var f = new CR2WFile(new BinaryReader(fs)); | |
Console.WriteLine("[" + f.chunks.Count + "] chunks. File: " + item.Key); | |
f.chunks.ForEach(x => ClassTypes.Add(x.Type)); | |
} | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine("[EXCEPTION] " + ex.Message); | |
} | |
if (File.Exists(tempfile)) | |
File.Delete(tempfile); | |
} | |
} | |
} | |
File.AppendAllLines(logfile, ClassTypes); | |
} | |
} | |
} |
Hello, I need the code for the new weapons at the fair in Last Day on Earth
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi