private static void DumpItem(string corePath, string langID, string msbtFolder, string langFolderCode) { var dest = Path.Combine(corePath, langID, $"text_item_{langID}.txt"); var file = string.Format(msbtFolder, langFolderCode); var items = GameMSBTDumper.GetItemListResource(file, langID); File.WriteAllLines(dest, items); }
private static void DumpVillagerPhrase(string corePath, string langID, string msbtFolder, string langFolderCode) { var dest = Path.Combine(corePath, langID, $"text_phrase_{langID}.txt"); var file = string.Format(msbtFolder, langFolderCode); var villager = GameMSBTDumper.GetVillagerPhraseResource(file); File.WriteAllLines(dest, villager); }
private static void DumpRemake(string corePath, string langID, string msbtFolder, string langFolderCode) { DumpMSBT("body_color", "STR_Remake_BodyColor.msbt"); DumpMSBT("body_parts", "STR_Remake_BodyParts.msbt"); DumpMSBT("fabric_color", "STR_Remake_FabricColor.msbt"); DumpMSBT("fabric_parts", "STR_Remake_FabricParts.msbt"); void DumpMSBT(string name, string msbt) { var dest = Path.Combine(corePath, langID, $"text_{name}_{langID}.txt"); var folder = string.Format(msbtFolder, langFolderCode); var file = Path.Combine(folder, "Remake", msbt); var lines = GameMSBTDumper.GetLabelList(file); var result = lines.Select(z => z.Label.Substring(z.Label.IndexOf('_') + 1) + "\t" + z.Text).OrderBy(z => z); File.WriteAllLines(dest, result); } }