コード例 #1
0
        public static void GetThoseDats()
        {
            var path = @"C:\Program Files (x86)\Grinding Gear Games\Path of Exile\Content.ggpk";

            //var file = @"C:\ggpk2\Metadata\StatDescriptions\stat_descriptions.txt";

            var ggpk = new GgpkFileSystem(path);

            var datIndex = new DatFileIndex(ggpk,
                                            DetSpecificationIndex.Default);

            var stats = new StatsDatLoader().Load(datIndex);
            var mods  = new ModifiersDatLoader(stats).Load(datIndex);

            var we = mods.SelectMany(c => c.Value.SpawnWeights.Select(e => e.TagId)).Distinct().ToList();

            Console.WriteLine("First 10 mods:");
            int i = 0;

            foreach (var row in datIndex["Mods.dat"])
            {
                Console.WriteLine(row["Name"]);
                if (++i == 10)
                {
                    break;
                }
            }
        }
コード例 #2
0
        private static void Translations()
        {
            var ggpk = new GgpkFileSystem(GgpkPath);

            var file = ggpk.Directories
                       .First(c => c.Name == "Metadata").Directories
                       .First(c => c.Name == "StatDescriptions").Files
                       .First(c => c.Name == "stat_descriptions.txt")
                       .GetStream();

            var datIndex = new DatFileIndex(ggpk,
                                            DetSpecificationIndex.Default);

            var stats = new StatsDatLoader().Load(datIndex);
            var mods  = new ModifiersDatLoader(stats).Load(datIndex);

            var transLoader = new TranslationsLoader(stats);
            var transIndex  = transLoader.Load(file);

            var passiveSkills = datIndex.Where(c => c.Key.ToLower().Contains("tree")).ToList();
        }
コード例 #3
0
        private static void PsgExtract()
        {
            var sw = Stopwatch.StartNew();

            Console.WriteLine("Reading PassiveSkillGraph.psg...");

            var psgFile       = new DiskFile(@"C:\ggpk3\Metadata\PassiveSkillGraph.psg");
            var diskDirectory = new DiskDirectory(@"C:\ggpk3\Data\");
            var datIndex      = new DatFileIndex(diskDirectory, DetSpecificationIndex.Default);

            var stats       = new StatsDatLoader().Load(datIndex);
            var mods        = new ModifiersDatLoader(stats).Load(datIndex);
            var passiveTree = new SkillTreeLoader(stats, datIndex);

            var psg    = new PsgFile(psgFile);
            var result = passiveTree.Load(psg);

            sw.Stop();

            Console.WriteLine($"Parsed Passive Skill Graph in {sw.ElapsedMilliseconds}ms.\r\n");
            Console.WriteLine($"{psg.Groups.Count} groups, with {psg.Groups.Sum(c => c.Count)} nodes in total");
        }