private static void MakeExcel(TOptions.TArgs opt) { var langInfo = new PfkLanguageInfo(); PfkLanguageDao.LoadFromFile(langInfo, opt.FileNameLangInput); var fanInfo = new PfkLanguageInfo(); if (!string.IsNullOrWhiteSpace(opt.FileNameFanInput)) { //// 有志翻訳版の言語情報を作成する。 PfkLanguageDao.LoadFromFile(fanInfo, opt.FileNameFanInput); } //// UMM対応版データを読み込む。 var ummDataInfo = new PfkUmmDataInfo(); if (!string.IsNullOrEmpty(opt.FileNameUmm)) { PfkUmmDataDao.LoadFromCsv(ummDataInfo, opt.FileNameUmm); } PfkTransSheetDao.SaveToExcel( langInfo, fanInfo, ummDataInfo, opt.FileNameSheet, opt.RowsPerSheet, opt.UseTag); }
private static void MakeCsv(TOptions.TArgs opt) { var langInfo = new PfkLanguageInfo(); //// 原文を読み込み言語情報を作成する。 PfkLanguageDao.LoadFromFile(langInfo, opt.FileNameLangInput); //// 言語情報から翻訳シートを出力する。制御文字はタグ化する。 if (opt.RowsPerSheet > 0) { //// シートを分割する。 var dir = Path.GetDirectoryName(Path.GetFullPath(opt.FileNameSheet)); var fileName = Path.GetFileNameWithoutExtension(opt.FileNameSheet); int total = langInfo.GetEntryCountWithoutEmpty(); var count = total / opt.RowsPerSheet; for (var i = 0; i < count + 1; i++) { var path = Path.Combine(dir, $"{fileName}_{i + 1}.csv"); var from = i * opt.RowsPerSheet; var to = (i * opt.RowsPerSheet) + opt.RowsPerSheet - 1; PfkTransSheetDao.SaveToCsv( langInfo, path, from, to, opt.UseTag); } } else { //// シートを分割しない。 PfkTransSheetDao.SaveToCsv( langInfo, opt.FileNameSheet, 0, 9999999, opt.UseTag); } }
private static void InitDB(TOptions.TArgs opt) { var systemDb = new MieSystemDB(); var dbFolder = Path.GetDirectoryName(Path.GetFullPath(opt.FileNameSystemDB)); MieCommonUtils.SafeCreateDirectory(dbFolder); systemDb.CreateSystemDB(opt.FileNameSystemDB, opt.SchemaPath, opt.IsReplace); systemDb.Open(opt.FileNameSystemDB); var convertConvApp = new MieDataConvertConversationApp(); try { convertConvApp.InitConversations(systemDb); convertConvApp.InitFileList(systemDb); convertConvApp.InitLanguage(systemDb); convertConvApp.InitQuests(systemDb); convertConvApp.InitChatter(systemDb); } catch (Exception ex) { logger.Trace(ex.Message); } systemDb.CompactDatabase(); systemDb.Close(); }
private static void CreateMod(TOptions.TArgs opt) { var transSheetInfo = new MieTransSheetInfo(); //// 翻訳シート(会話)の読み込み MieTransSheetDao.LoadFromCsv( transSheetInfo, opt.FileNameConvasation); //// 翻訳シート(システム)の読み込み MieTransSheetDao.LoadFromCsv( transSheetInfo, opt.FileNameSystem); //// 翻訳シート(chatter)の読み込み MieTransSheetDao.LoadFromCsv( transSheetInfo, opt.FileNameChatter); //// DBから言語情報を取得する。 var stringMarger = new MieStringMargeUtils( opt.FileNameSystemDB); //// 統合版日本語化MODを作成する。 { //// ID付き var useReferenceID = true; var useMT = false; stringMarger.SaveToFolder( opt.FolderNameOut, transSheetInfo, true, true, true, true, useMT, useReferenceID); stringMarger.SaveLanguageConf(opt.FolderNameOut, useReferenceID); } { //// IDなし var useReferenceID = false; var useMT = false; stringMarger.SaveToFolder( opt.FolderNameOut, transSheetInfo, true, true, true, true, useMT, useReferenceID); stringMarger.SaveLanguageConf(opt.FolderNameOut, useReferenceID); } stringMarger.SaveToCsvForMC(transSheetInfo, @"MC\0PoE2_MC用翻訳シート.csv"); }
private static MieSystemDbApp DB2MieObj(TOptions.TArgs opt) { MieSystemDB systemDb = new MieSystemDB(); systemDb.Open(opt.FileNameSystemDB); MieSystemDbApp sysApp = new MieSystemDbApp(); sysApp.LoadFromDB(systemDb); //// 検証リスト出力 sysApp.ToCharacterAttributeString(@"D_CheckList(CharacterAttribute).txt"); sysApp.ToFileListString(@"D_CheckList(FileList).txt"); sysApp.ToLanguageString(@"D_CheckList(Language).txt"); ////sysApp.ToNodeStringString(@"D_CheckList(Node).txt"); sysApp.ToConversationLinkString(@"D_CheckList(Conv)(LinkWithStopNode).txt", true); sysApp.ToConversationLinkString(@"D_CheckList(Conv)(LinkWithoutStopNode).txt", false); sysApp.ToConversationLinksFromToString(@"D_CheckList(Conv)(FromTo).txt"); sysApp.ToRaceAttributeString(@"D_CheckList(Race).txt"); sysApp.ToSpeakerAttributeString(@"D_CheckList(Speaker).txt"); sysApp.ToQuestsLinksFromToString(@"D_CheckList(Quests)(FromTo).txt"); sysApp.ToQuestsLinkString(@"D_CheckList(Quests)(LinkWithStopNode).txt", true); sysApp.ToQuestsLinkString(@"D_CheckList(Quests)(LinkWithoutStopNode).txt", false); sysApp.ToChatterLinksFromToString(@"D_CheckList(Chatter)(FromTo).txt"); sysApp.ToChatterLinkString(@"D_CheckList(Chatter)(LinkWithStopNode).txt", true); sysApp.ToChatterLinkString(@"D_CheckList(Chatter)(LinkWithoutStopNode).txt", false); systemDb.Close(); return sysApp; }
private static void MakeFont(TOptions.TArgs opt) { MieFont fontEn = new MieFont(); fontEn.Load(opt.FileNameSource, opt.EnumFormatType); //// 自作のTMPフォント。形式は Type2 に固定。 MieFont fontJp = new MieFont(); fontJp.Load(opt.FileNameTarget, MieFont.NFormatType.Type2); var newJp = MieFontConvert.Convert( fontEn, opt.EnumFormatType, fontJp, MieFont.NFormatType.Type2, opt.Ascender); var fileName = Path.GetFileName(opt.FileNameSource); var fullPath = Path.Combine(opt.FolderNameOutput, fileName); newJp.Save(fullPath, opt.EnumFormatType); if (opt.UseList) { var dumpPath = $"{fullPath}.txt"; newJp.Dump(dumpPath, opt.IsDetail); } }
private static void MakeSheet(TOptions.TArgs opt) { //// ToDo: 言語番号の処理を追加する。 var langNo = FssLanguageInfo.LanguageNo.English; //// 言語情報ファイルの読み込み。 var languageInfo = FssLanguageDao.LoadFromFile(opt.FileNameLangInput); FssTransSheetDao.SaveToCsv(opt.FileNameSheet, languageInfo, langNo); }
private static void MakeSheet(TOptions.TArgs opt) { var dataInfo = new CrsTransDataInfo(); CrsTransDataDao.LoadFromFolder( dataInfo, opt.FolderNameLangInput); CrsTransSheetDao.SaveToFile(dataInfo, opt.FileNameSheet); }
private static void SheetDialog(TOptions.TArgs opt) { var dialogInfo = new UapDialogInfo(); UapDialogDao.LoadFromFolder( dialogInfo, opt.FolderNameLangInput, "*.DialogPackage"); UapTransSheetDialogDao.SaveToCsv( dialogInfo, opt.FileNameSheet, opt.LanguageNo); }
private static void MakeMod(TOptions.TArgs opt) { //// 言語情報ファイルの読み込み。 var languageInfoEn = FssLanguageDao.LoadFromFile(opt.FileNameInput); //// 翻訳シートの読み込み。 var sheetFile = FssTransSheetDao.LoadFromCsv(opt.FileNameSheet); //// 翻訳シートを使用し、日本語化する。 var languageInfoJp = FssLanguageTranslation.Translate( languageInfoEn, sheetFile, opt.UseMachineTrans, FssLanguageInfo.LanguageNo.English); //// 日本語化した言語情報を言語情報ファイルとして出力する。 FssLanguageDao.SaveToFile(languageInfoJp, opt.FileNameOutput); }
private static void SheetLocalization(TOptions.TArgs opt) { //// 【注意事項】 //// GOG版(v2.7.1)のデータ "resources_00006.-9" にはバグが有る。 //// FileID(LocalizationReference_Map_SELFNAME) //// ID(1190585287)のLangID(10)が重複し項目数も一つ多い。 //// LoadFromFolder()時にエラーメッセージが表示されるが無視して良い。 var localizeInfo = new UapLocalizationInfo(); UapLocalizationDao.LoadFromFolder( localizeInfo, opt.FolderNameLangInput, "*.LocalizationReference"); UapTransSheetLocalizationDao.SaveToCsv( localizeInfo, opt.FileNameSheet, opt.LanguageNo); }
private static void MakeJpFont(TOptions.TArgs opt) { Encoding enc = new UTF8Encoding(false); //// オリジナルの座標情報を読み込む。 var orgFontMap = FsbFontDao.Load(opt.FileNameInput); //// 日本語版BMFontの座標情報(XML)を読み込む var bmfontMap = FsbBMFontDao.Load(opt.FileNameFontXml); var replacedList = new StringBuilder(); //// オリジナルと日本語版座標情報をマージする。 var newFont = FsbFontConvert.Merge(orgFontMap, bmfontMap, replacedList, 0, 0); //// 新しい座標情報ファイルを書き出す。 FsbFontDao.Save(opt.FileNameOutput, newFont); }
private static void MakeMod(TOptions.TArgs opt) { var dataInfo = new CrsTransDataInfo(); CrsTransDataDao.LoadFromFile( dataInfo, opt.FileNameInput, string.Empty); var sheetInfo = new CrsTransSheetInfo(); CrsTransSheetDao.LoadFromFile( sheetInfo, opt.FileNameSheet); var translatedInfo = CrsTranslation.Translate(dataInfo, sheetInfo, opt.UseMachineTrans); CrsTransDataDao.SaveToFile(opt.FileNameOutput, translatedInfo); }
private static void SaveDialog(TOptions.TArgs opt) { //// 翻訳シートの読み込み var sheetDialogInfo = new UapTransSheetDialogInfo(); string dialogPath = opt.FileNameSheet; UapTransSheetDialogDao.LoadFromCsv(sheetDialogInfo, dialogPath); //// 言語情報(原文)の読み込み var langDialogInfoEN = new UapDialogInfo(); UapDialogDao.LoadFromFolder( langDialogInfoEN, opt.FolderNameInput, "*.DialogPackage"); //// 翻訳済み言語情報の作成 var langDialogInfoJP = UapTranslation.TranslateDialog(sheetDialogInfo, langDialogInfoEN, opt.LanguageNo, opt.UseMachineTrans); UapDialogDao.SaveToFolder(opt.FolderNameOutput, langDialogInfoJP, opt.UseReplace); }
private static void SaveLocalize(TOptions.TArgs opt) { //// 翻訳シートの読み込み var sheetLocalizationInfo = new UapTransSheetLocalizationInfo(); string locPath = opt.FileNameSheet; UapTransSheetLocalizationDao.LoadFromCsv(sheetLocalizationInfo, locPath); //// 言語情報(原文)の読み込み var localizationInfoEN = new UapLocalizationInfo(); UapLocalizationDao.LoadFromFolder( localizationInfoEN, opt.FolderNameInput, "*.LocalizationReference"); //// 翻訳済み言語情報の作成 var localizationInfoJP = UapTranslation.TranslateLocalization(sheetLocalizationInfo, localizationInfoEN, opt.LanguageNo, opt.UseMachineTrans); UapLocalizationDao.SaveToFolder(opt.FolderNameOutput, localizationInfoJP, opt.UseReplace); }
private static void MakeMod(TOptions.TArgs opt) { //// 用語集の読み込み PfkGlossaryInfo glossaryInfo = null; if (string.IsNullOrWhiteSpace(opt.FileNameGlossary)) { glossaryInfo = new PfkGlossaryInfo(); } else { glossaryInfo = PfkGlossaryDao.LoadFromCsv(opt.FileNameGlossary); } //// 翻訳シートを読み込む var sheetInfo = new PfkTransSheetInfo(); var fileID = "enGB"; switch (opt.SheetType) { case TOptions.NSheetType.Unknown: break; case TOptions.NSheetType.SingleFile: //// タグの制御文字への変換は副作用がないため、必ず実行する。 PfkTransSheetDao.LoadFromFile(sheetInfo, opt.FileNameSheet, fileID, true); break; case TOptions.NSheetType.MultiFile: PfkTransSheetDao.LoadFromFolder(sheetInfo, opt.FileNameSheet, fileID, true); break; default: throw new Exception($"Unknown error. Sheet type({opt.SheetType})"); } if (opt.UseUnityModMan) { //// UMM形式のCSVファイルを出力する(タグは制御文字に変換する)。 PfkUmmDataDao.SaveToUmmFile( opt.FileNameInput, sheetInfo, glossaryInfo, opt.FileNameOutput, opt.UseReferenceId, opt.UseMachineTrans, opt.MtransMark, opt.UseForceMt); } else { //// 翻訳済みJSONファイルを出力する(タグは制御文字に変換する)。 PfkLanguageDao.SaveToFile( opt.FileNameInput, sheetInfo, glossaryInfo, opt.FileNameOutput, opt.UseReferenceId, opt.UseMachineTrans, opt.MtransMark, opt.UseForceMt); } }
private static void OE2DB_No2(TOptions.TArgs opt) { MieSystemDB systemDb = new MieSystemDB(); systemDb.Open(opt.FileNameSystemDB); MieDataConvertConversationApp convertConvApp = new MieDataConvertConversationApp(); var productLine = MieProduct.GetProductLineFromText(opt.ProductLine); //// FileListの作成と言語情報のDB化。 MieFileList fileList = new MieFileList(); { var langPath = string.Empty; //// 会話情報の取り込み switch (productLine) { case MieProduct.NProductLine.Vanilla: //// チャッター情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\chatter"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Chatter, fileList); //// 会話情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\conversations"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Conversations, fileList); //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); //// クエスト情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\quests"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Quests, fileList); break; case MieProduct.NProductLine.LaxA: //// チャッター情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\chatter"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Chatter, fileList); //// 会話情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\conversations"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Conversations, fileList); //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); break; case MieProduct.NProductLine.LaxB: //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); break; case MieProduct.NProductLine.LaxC: //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); break; case MieProduct.NProductLine.LaxD: //// 会話情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\conversations"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Conversations, fileList); //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); break; case MieProduct.NProductLine.LaxE: break; case MieProduct.NProductLine.LaxF: //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); break; case MieProduct.NProductLine.LaxG: //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); break; case MieProduct.NProductLine.LaxH: //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); break; case MieProduct.NProductLine.LaxI: //// 会話情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\conversations"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Conversations, fileList); //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); break; case MieProduct.NProductLine.DLC1: //// チャッター情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\chatter"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Chatter, fileList); //// 会話情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\conversations"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Conversations, fileList); //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); //// クエスト情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\quests"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Quests, fileList); break; case MieProduct.NProductLine.DLC2: //// チャッター情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\chatter"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Chatter, fileList); //// 会話情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\conversations"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Conversations, fileList); //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); //// クエスト情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\quests"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Quests, fileList); break; case MieProduct.NProductLine.DLC3: //// チャッター情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\chatter"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Chatter, fileList); //// 会話情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\conversations"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Conversations, fileList); //// ゲーム情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\game"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Game, fileList); //// クエスト情報の取り込み langPath = Path.Combine(opt.FileNameLang, @"text\quests"); convertConvApp.ConvertLanguage(systemDb, langPath, productLine, MieProduct.NLanguageType.Quests, fileList); break; default: var msg = $"Unknown ProductLine({productLine})."; throw new InvalidEnumArgumentException(msg); } //// 言語ファイルのDB化。 MieTableLanguageDao.SaveToSysyemDB(systemDb, convertConvApp.LanguageInfo); //// FileListのDB化。 convertConvApp.ConvertFileList(systemDb, fileList); } //// キャラクター情報と種族情報のDB化。 { var charAttrPath = string.Empty; switch (productLine) { case MieProduct.NProductLine.Vanilla: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.LaxA: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxa_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.LaxB: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxb_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.LaxC: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxc_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.LaxD: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxd_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.LaxE: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxe_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.LaxF: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxf_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.LaxG: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxg_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.LaxH: //// キャラクター情報および種族情報なし break; case MieProduct.NProductLine.LaxI: //// キャラクター情報および種族情報なし break; case MieProduct.NProductLine.DLC1: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\lax2_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.DLC2: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\lax1_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; case MieProduct.NProductLine.DLC3: charAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\lax3_characters.gamedatabundle"); convertConvApp.ConvertCharcterAttributes(systemDb, charAttrPath); break; default: var msg = $"Unknown ProductLine({productLine})."; throw new InvalidEnumArgumentException(msg); } } //// Speaker情報のDB化。 { var speakerAttrPath = string.Empty; switch (productLine) { case MieProduct.NProductLine.Vanilla: speakerAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\speakers.gamedatabundle"); convertConvApp.ConvertSpeakerAttributes(systemDb, speakerAttrPath); break; case MieProduct.NProductLine.LaxA: break; case MieProduct.NProductLine.LaxB: break; case MieProduct.NProductLine.LaxC: speakerAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxc_speakers.gamedatabundle"); convertConvApp.ConvertSpeakerAttributes(systemDb, speakerAttrPath); break; case MieProduct.NProductLine.LaxD: speakerAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxd_speakers.gamedatabundle"); convertConvApp.ConvertSpeakerAttributes(systemDb, speakerAttrPath); break; case MieProduct.NProductLine.LaxE: speakerAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\laxe_speakers.gamedatabundle"); convertConvApp.ConvertSpeakerAttributes(systemDb, speakerAttrPath); break; case MieProduct.NProductLine.LaxF: break; case MieProduct.NProductLine.LaxG: break; case MieProduct.NProductLine.LaxH: break; case MieProduct.NProductLine.LaxI: break; case MieProduct.NProductLine.DLC1: speakerAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\lax2_speakers.gamedatabundle"); convertConvApp.ConvertSpeakerAttributes(systemDb, speakerAttrPath); break; case MieProduct.NProductLine.DLC2: speakerAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\lax1_speakers.gamedatabundle"); convertConvApp.ConvertSpeakerAttributes(systemDb, speakerAttrPath); break; case MieProduct.NProductLine.DLC3: speakerAttrPath = Path.Combine(opt.FileNameDesign, @"gamedata\lax3_speakers.gamedatabundle"); convertConvApp.ConvertSpeakerAttributes(systemDb, speakerAttrPath); break; default: var msg = $"Unknown ProductLine({productLine})."; throw new InvalidEnumArgumentException(msg); } } //// 会話情報のDB化 { var convPath = string.Empty; switch (productLine) { case MieProduct.NProductLine.Vanilla: convPath = Path.Combine(opt.FileNameDesign, @"conversations"); convertConvApp.ConvertConversations(systemDb, convPath, fileList); break; case MieProduct.NProductLine.LaxA: break; case MieProduct.NProductLine.LaxB: break; case MieProduct.NProductLine.LaxC: break; case MieProduct.NProductLine.LaxD: convPath = Path.Combine(opt.FileNameDesign, @"conversations"); convertConvApp.ConvertConversations(systemDb, convPath, fileList); break; case MieProduct.NProductLine.LaxE: break; case MieProduct.NProductLine.LaxF: break; case MieProduct.NProductLine.LaxG: break; case MieProduct.NProductLine.LaxH: break; case MieProduct.NProductLine.LaxI: convPath = Path.Combine(opt.FileNameDesign, @"conversations"); convertConvApp.ConvertConversations(systemDb, convPath, fileList); break; case MieProduct.NProductLine.DLC1: convPath = Path.Combine(opt.FileNameDesign, @"conversations"); convertConvApp.ConvertConversations(systemDb, convPath, fileList); break; case MieProduct.NProductLine.DLC2: convPath = Path.Combine(opt.FileNameDesign, @"conversations"); convertConvApp.ConvertConversations(systemDb, convPath, fileList); break; case MieProduct.NProductLine.DLC3: convPath = Path.Combine(opt.FileNameDesign, @"conversations"); convertConvApp.ConvertConversations(systemDb, convPath, fileList); break; default: var msg = $"Unknown ProductLine({productLine})."; throw new InvalidEnumArgumentException(msg); } } //// ToDo:クエスト情報のDB化 { var questsPath = string.Empty; switch (productLine) { case MieProduct.NProductLine.Vanilla: questsPath = Path.Combine(opt.FileNameDesign, @"quests"); convertConvApp.ConvertQuests(systemDb, questsPath, fileList); break; case MieProduct.NProductLine.LaxA: break; case MieProduct.NProductLine.LaxB: break; case MieProduct.NProductLine.LaxC: break; case MieProduct.NProductLine.LaxD: break; case MieProduct.NProductLine.LaxE: break; case MieProduct.NProductLine.LaxF: break; case MieProduct.NProductLine.LaxG: break; case MieProduct.NProductLine.LaxH: break; case MieProduct.NProductLine.LaxI: break; case MieProduct.NProductLine.DLC1: questsPath = Path.Combine(opt.FileNameDesign, @"quests"); convertConvApp.ConvertQuests(systemDb, questsPath, fileList); break; case MieProduct.NProductLine.DLC2: questsPath = Path.Combine(opt.FileNameDesign, @"quests"); convertConvApp.ConvertQuests(systemDb, questsPath, fileList); break; case MieProduct.NProductLine.DLC3: questsPath = Path.Combine(opt.FileNameDesign, @"quests"); convertConvApp.ConvertQuests(systemDb, questsPath, fileList); break; default: var msg = $"Unknown ProductLine({productLine})."; throw new InvalidEnumArgumentException(msg); } } //// ToDo:チャッター情報のDB化 { var chatterPath = string.Empty; switch (productLine) { case MieProduct.NProductLine.Vanilla: chatterPath = Path.Combine(opt.FileNameDesign, @"chatter"); convertConvApp.ConvertChatter(systemDb, chatterPath, fileList); break; case MieProduct.NProductLine.LaxA: break; case MieProduct.NProductLine.LaxB: break; case MieProduct.NProductLine.LaxC: break; case MieProduct.NProductLine.LaxD: break; case MieProduct.NProductLine.LaxE: break; case MieProduct.NProductLine.LaxF: break; case MieProduct.NProductLine.LaxG: break; case MieProduct.NProductLine.LaxH: break; case MieProduct.NProductLine.LaxI: break; case MieProduct.NProductLine.DLC1: chatterPath = Path.Combine(opt.FileNameDesign, @"chatter"); convertConvApp.ConvertChatter(systemDb, chatterPath, fileList); break; case MieProduct.NProductLine.DLC2: chatterPath = Path.Combine(opt.FileNameDesign, @"chatter"); convertConvApp.ConvertChatter(systemDb, chatterPath, fileList); break; case MieProduct.NProductLine.DLC3: chatterPath = Path.Combine(opt.FileNameDesign, @"chatter"); convertConvApp.ConvertChatter(systemDb, chatterPath, fileList); break; default: var msg = $"Unknown ProductLine({productLine})."; throw new InvalidEnumArgumentException(msg); } } systemDb.CompactDatabase(); systemDb.Close(); }