Пример #1
0
        /// <summary>
        /// Dumps everything the program uses to the provided <see cref="dest"/>, using the provided <see cref="pathBCSV"/>.
        /// </summary>
        /// <param name="pathBCSV">Source of <see cref="BCSV"/> files.</param>
        /// <param name="dest">Destination folder where the dumps will be saved.</param>
        public static void UpdateDumps(string pathBCSV, string dest)
        {
            BCSVConverter.DumpAll(pathBCSV, dest);
            var itemNames = GameInfo.Strings.itemlist;

            void DumpS(string fn, IEnumerable <string> lines)
            {
                File.WriteAllLines(Path.Combine(dest, fn), lines);
                Console.WriteLine($"Created {fn}");
            }

            void DumpB(string fn, byte[] bytes)
            {
                File.WriteAllBytes(Path.Combine(dest, fn), bytes);
                Console.WriteLine($"Created {fn}");
            }

            DumpS("milestones.txt", GetMilestoneList(pathBCSV));
            DumpS("recipeDictionary.txt", GetRecipeList(pathBCSV));
            DumpS("outsideAcres.txt", GetAcreNames(pathBCSV));

            DumpS("fish.txt", GetFishList(pathBCSV, itemNames));
            DumpS("bugs.txt", GetInsectList(pathBCSV, itemNames));

            DumpS("ItemKind.txt", GetPossibleEnum(pathBCSV, "ItemParam.bcsv", 0xFC275E86));
            DumpS("PlantKind.txt", GetPossibleEnum(pathBCSV, "FgMainParam.bcsv", 0x48EF0398));

            DumpB("item_kind.bin", GetItemKindArray(pathBCSV));
            DumpS("plants.txt", GetPlantedNames(pathBCSV));
        }
Пример #2
0
        /// <summary>
        /// Dumps everything the program uses to the provided <see cref="dest"/>, using the provided <see cref="pathBCSV"/>.
        /// </summary>
        /// <param name="pathBCSV">Source of <see cref="BCSV"/> files.</param>
        /// <param name="dest">Destination folder where the dumps will be saved.</param>
        /// <param name="csv">Convert all <see cref="BCSV"/> files to CSV for easy viewing.</param>
        /// <param name="delim">Delimiter when exporting the <see cref="csv"/> files</param>
        public static void UpdateDumps(string pathBCSV, string dest, bool csv = false, string delim = "\t")
        {
            var itemNames = GameInfo.Strings.itemlist;

            void DumpS(string fn, IEnumerable<string> lines)
            {
                File.WriteAllLines(Path.Combine(dest, fn), lines);
                Console.WriteLine($"Created {fn}");
            }

            void DumpB(string fn, byte[] bytes)
            {
                File.WriteAllBytes(Path.Combine(dest, fn), bytes);
                Console.WriteLine($"Created {fn}");
            }

            DumpS("lifeSupportAchievement.txt", GetLifeSupportAchievementList(pathBCSV));
            DumpS("recipeDictionary.txt", GetRecipeList(pathBCSV));
            DumpS("outsideAcres.txt", GetAcreNames(pathBCSV));

            DumpS("fish.txt", GetFishList(pathBCSV, itemNames));
            DumpS("bugs.txt", GetInsectList(pathBCSV, itemNames));
            DumpS("fossils.txt", GetFossilList(pathBCSV, itemNames));
            DumpS("eventFlagPlayer.txt", GetEventFlagNames(pathBCSV));
            DumpS("eventFlagVillager.txt", GetVillagerEventFlagNames(pathBCSV));
            DumpS("eventFlagLand.txt", GetLandEventFlagNames(pathBCSV));

            DumpS("ItemKind.txt", GetPossibleEnum(pathBCSV, "ItemParam.bcsv", 0xFC275E86));
            DumpS("ItemSize.txt", GetPossibleEnum(pathBCSV, "ItemParam.bcsv", 0xE06FB090));
            DumpS("PlantKind.txt", GetPossibleEnum(pathBCSV, "FgMainParam.bcsv", 0x48EF0398));
            DumpS("TerrainKind.txt", GetNumberedEnumValues(pathBCSV, "FieldLandMakingUnitModelParam.bcsv", 0x39B5A93D, 0x54706054));
            DumpS("BridgeKind.txt", GetNumberedEnumValues(pathBCSV, "StructureBridgeParam.bcsv", 0x39B5A93D, 0x54706054));
            DumpS("BridgeMaterial.txt", GetNumberedEnumValues(pathBCSV, "StructureBridgeTypeParam.bcsv", 0x68CF5938, 0x54706054));
            DumpS("SlopeKind.txt", GetNumberedEnumValues(pathBCSV, "StructureSlopeParam.bcsv", 0x39B5A93D, 0x54706054));
            DumpS("RoofKind.txt", GetNumberedEnumValues(pathBCSV, "StructureHouseRoofParam.bcsv", 0x39B5A93D, 0x54706054));
            DumpS("DoorKind.txt", GetNumberedEnumValues(pathBCSV, "StructureHouseDoorParam.bcsv", 0x39B5A93D, 0x54706054));
            DumpS("WallKind.txt", GetNumberedEnumValues(pathBCSV, "StructureHouseWallParam.bcsv", 0x39B5A93D, 0x54706054));

            DumpB("item_kind.bin", GetItemKindArray(pathBCSV));
            DumpB("item_size.bin", GetItemSizeArray(pathBCSV));
            DumpS("plants.txt", GetPlantedNames(pathBCSV));
            DumpS("item_size_dictionary.txt", GetItemSizeDictionary(pathBCSV));

            if (csv)
                BCSVConverter.DumpAll(pathBCSV, dest, delim);
        }
Пример #3
0
 public static void UpdateCSV(string pathBCSV, string dest, bool remapColumns = false, string delim = "\t")
 {
     BCSV.DecodeColumnNames = remapColumns;
     Directory.CreateDirectory(dest);
     BCSVConverter.DumpAll(pathBCSV, dest, delim);
 }