diff --git a/My project/Assets/CSV/Multilingual.csv b/My project/Assets/CSV/Multilingual.csv deleted file mode 100644 index 1d64010ca..000000000 --- a/My project/Assets/CSV/Multilingual.csv +++ /dev/null @@ -1,362 +0,0 @@ -1,"消息列表" -2,"建设" -3,"[我要看到血流成河!] -" -4,"阵营的普通单位如完成击杀后,将 -在下回合获得攻击强化。 -" -5,"排名列表(#3)" -6,"名次" -7,"玩家名" -8,"城市数" -9,"信仰" -10,"比那名居天子" -11,"带领<普鲁士帝国>" -12,"设置" -13,"排名" -14,"科技" -15,"消息" -16,"下回合" -17,"城市已升级!" -18,"请从下方选择一项奖励" -19,"工作坊" -20,"有bug别点" -21,"公园" -22,"伟人" -23,"城墙" -24,"财富" -25,"人口扩张" -26,"领土扩张" -27,"请等待其他玩家操作..." -28,"步兵" -29,"轻骑兵" -30,"弓兵" -31,"盾兵" -32,"剑士" -33,"重骑兵" -34,"炮兵" -35,"芙兰朵露" -36,"蕾米莉亚" -37,"十六夜咲夜" -38,"红美铃" -39,"帕秋莉诺蕾姬" -40,"占领城市" -41,"升级" -42,"恢复 -" -43,"解雇" -44,"挖掘" -45,"采集" -46,"帆船" -47,"冲锋艇" -48,"战舰" -49,"清除树林" -50,"渔猎" -51,"狩捕" -52,"林场" -53,"采矿场" -54,"农田" -55,"港口" -56,"道路" -57,"桥梁" -58,"谷仓" -59,"加工厂" -60,"市场" -61,"冶炼厂" -62,"神庙" -63,"森林神庙" -64,"山神庙" -65,"海洋神庙" -66,"焚林垦田" -67,"植树造林" -68,"拆除" -69,"和平祭坛" -70,"智慧之塔" -71,"繁荣之殿" -72,"财富之巅" -73,"权力之门" -74,"皇家公园" -75,"世界之眼" -76,"平原" -77,"这是一片空旷的土地。" -78,"这里是提示文字 -提示玩家应该怎么操作" -79,"登山" -80,"KING -职阶召唤 -" -81,"BISHOP -职阶召唤 -" -82,"QUEEN -职阶召唤 -" -83,"KNIGHTS -职阶召唤 -" -84,"CHARIOT -职阶召唤 -" -85,"科技名称" -86,"该科技将会解锁以下内容:" -87,"取消" -88,"研发" -89,"[巴别之瞻妄]" -90,"帝国控制的城市越多,研发科技的费用越高。" -91,"当帝国规模愈发庞大,众声喧哗的世界便难以共鸣于同一道理。知识在各城邦间折损、误解、甚至扭曲,如同昔日攀天之塔的回音,终将自毁其基。" -92,"金币 (+2)" -93,"回合" -94,"十六夜姣夜" -95,"这里是宵夜的对话内容。 -第二行。 -第三行" -96,"这里是蕾米的对话内容。 -第二行。 -第三行。" -97,"测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文" -98,"测试标题" -99,"确认" -100,"胜利" -101,"恭喜您获得最终胜利!" -102,"拥有城市" -103,"拥有雕塑" -104,"最终得分" -105,"返回主菜单" -106,"失败" -107,"很遗憾,您已出局" -108,"新游戏" -109,"继续游戏" -110,"故事模式" -111,"图鉴" -112,"战绩" -113,"关于" -114,"地图尺寸" -115,"玩家数量" -116,"游戏难度" -117,"选择阵营 -" -118,"红魔馆" -119,"难度" -120,"高傲的红魔馆大小姐抽到了埃及帝国卡。 -不知为什么,她赌上了整个红魔馆押自己赢。" -121,"“无聊,我要看到血流成河!”" -122,"埃及帝国" -123,"优雅而怠惰的月之公主抽到了法兰西帝国卡。 -尚无败绩,不过好像都是她的宠物月兔代打。" -124,"“输了的话,今晚就没饭吃了哦,铃仙酱~”" -125,"永远亭" -126,"法兰西帝国" -127,"沉静而可怖的地灵殿主人抽到了印度帝国卡。 -她只是来寻找妹妹和宠物,稀里糊涂加入了对局。" -128,"“投降吧,阁下毫无胜算。我只想带她们早些回家。”" -129,"地灵殿" -130,"印度帝国" -131,"“投降吧,阁下毫无胜算。我只想带她们回家。”" -132,"开始霸业!" -133,"经典模式" -134,"征服模式" -135,"来自红魔馆的吸血鬼大小姐——蕾米莉亚·斯卡雷特,此刻伫立于金字塔之巅,宣告自己即是埃及正统的王权化身。她将率领红魔馆的将领们南征北讨,驱策妖精女仆在尼罗河的滋养下开垦荒芜之地,筑起属于斯卡雷特王朝的辉煌帝国。" -136,"斯卡雷特王朝" -137,"伟人阵营" -138,"芙兰朵露·斯卡雷特" -139,"继承赛特意志的恶魔之妹。" -140,"继承克里欧帕特拉意志的魔女。" -141,"蕾米莉亚·斯卡雷特" -142,"继承奥里西斯意志的吸血鬼。" -143,"继承阿努比斯意志的女仆长。" -144,"继承荷鲁斯意志的武术家。" -145,"伟人职阶:马(Knights) -继承赛特意志的红魔馆二小姐。拥有特色破局技能四重存在。" -146,"帕秋莉·诺蕾姬" -147,"伟人职阶:后(Queen) -继承克里欧帕特拉意志的魔女。拥有特色范围伤害技能皇家烈焰。" -148,"伟人职阶:王(King) -继承奥西里斯意志的吸血鬼。拥有特色反击回复技能红色不夜城。" -149,"伟人职阶:相(Bishop) -继承阿努比斯意志的女仆长。拥有特色突袭技能银之跳跃。" -150,"伟人职阶:车(Rook) -继承荷鲁斯意志的武术家。拥有特色反伤技能虹色太极拳。" -151,"士兵特性" -152,"妖精女仆" -153,"领土内未改造的森林可训练基础单位。 -妖精是森林的呼吸,是自然的化身。" -154,"文明特性" -155,"尼罗河的女儿" -156,"在游戏开始时拥有耕种科技。 -埃及是尼罗河的馈赠。" -157,"来自永远亭的月之公主——蓬莱山辉夜,此刻端坐于凯旋门下,优雅地宣布她将继承法兰西帝国的荣光。月光洒落枫丹白露,竹影漫过香榭丽舍。她将率领兔子军团,漫步于革命与浪漫交织的疆土上,从容地重塑法兰西的雄图霸业。" -158,"蓬莱山王朝" -159,"铃仙·优昙华院·因幡" -160,"继承拉纳意志的月兔。" -161,"八意永琳" -162,"继承贝尔蒂埃意志的月人。" -163,"蓬莱山辉夜" -164,"继承拿破仑意志的月之公主。" -165,"因幡帝" -166,"继承红衣主教意志的妖怪兔。" -167,"藤原妹红" -168,"继承贝尔纳多特意志的蓬莱人。" -169,"妖怪兔" -170,"永远亭阵营的单位在领土内的恢复量由4点提升至5点。 -兔子轻跳而过,好运悄然而至。" -171,"田园绅士学" -172,"在游戏开始时拥有采集科技。 -文明的第一课,就在在葡萄藤与玫瑰花间。" -173,"埃及" -174,"法兰西" -175,"普鲁士" -176,"普鲁士帝国 -守矢王朝" -177,"八坂神奈子将扮演普鲁士帝国——守矢铁血联盟的最高领袖。她将以神权与军威并重的姿态,率守矢神社在钢铁洪流中强势登顶东方理想国大赛!" -178,"射命丸文" -179,"犬走花" -180,"泄矢诹访子" -181,"东风谷早苗" -182,"八坂神奈子" -183,"领袖特性" -184,"[神不需要奇迹] -" -185,"挖掘<遗迹>必定获得强力作战单位。" -186,"[妖怪山的天狗们] -" -187,"1范围内如有友方死亡,自身获得1回合的强化效果。" -188,"[鲁尔山谷] -" -189,"初始拥有<狩猎>科技。没有矿石的山脉也能为冶炼厂提供1点城市经验。" -190,"印度帝国 -古明地王朝" -191,"古明地觉将扮演印度帝国——地灵圣朝的女王。她将以深不可测的心灵操控,带领地灵殿,在恒河文明中冉冉升起,问鼎东方理想国大赛的最终冠军。" -192,"星熊勇仪" -193,"灵乌路空" -194,"古明地恋" -195,"火焰猫燐" -196,"古明地觉" -197,"[你还有一次说谎的机会] -" -198,"游戏开始时获得所有敌人位置和所有遗迹位置的提示" -199,"[旧地狱的怨灵] -" -200,"被杀死后,会对凶手附加<中毒>的负面效果。" -201,"[恒河女神] -" -202,"初始拥有<种植>科技。种树享受40%的折扣。" -203,"战绩历史" -204,"所有战绩" -205,"回合数" -206,"得分" -207,"阵营" -208,"得分系数" -209,"日期" -210,"阵营图鉴" -211,"伟人图鉴" -212,"奇观图鉴" -213,"成就图鉴" -214,"阵营图鉴 -" -215,"高傲而任性的红魔馆大小姐抽到了埃及帝国卡。 -不知为什么,她赌上了整个红魔馆押自己赢。" -216,"沉静而可怖的地灵殿主人抽到了印度帝国卡。 -她只是来寻找妹妹和宠物,稀里糊涂加入了对局。" -217,"“投降吧,阁下毫无胜算。我只想带她们仨快点回去。”" -218,"可靠又专横的风雨之神抽到了普鲁士帝国卡。 -她已经为这款游戏新成立了并购部和宣传部。" -219,"“我要这游戏的冠名权,把你们负责人叫来。”" -220,"守矢神社" -221,"普鲁士帝国" -222,"“投降吧,你没有胜算。我只想快点带家妹回去。”" -223,"帝王星收集 3 / 5 -在游戏中召唤对应的伟人,点亮帝王星吧!" -224,"伟人图鉴 -" -225,"角色介绍" -226," 继承了阿努比斯意志的少女,原本是在红魔馆服侍蕾米莉亚·斯卡蕾特的女仆长,拥有操纵时间/停止时间程度的能力。 - " -227," 她是红魔馆中唯一的人类,冷静从容、头脑敏锐、优雅潇洒,偶尔也有些毒舌。对大小姐唯命是从,也正因此陪着任性的主人一同加入到了这款风靡幻想乡的游戏之中。" -228,"居然是……冥界守护神吗?不过大小姐那种程度,是不会死的吧。这样一来,我就变得多余了呢。" -229,"大小姐也来到冥界了吗?该说幸运还是不幸呢……反正不管在哪里,我都会侍奉好大小姐。" -230," 在意识到大小姐所扮演的奥里西斯亦有冥王的身份后,她似乎有些开心,这便是操纵命运的能力吧,她这么想。" -231,"冥界的守护神?说得倒轻松,我是不是该去向某位偷懒的死神讨教一下‘划水秘诀’了呢。" -232," 虽然招牌的道具变成了安卡和瓦斯权杖,但她仍在黑曜石神像的阴影之中擦亮了手中的银刃。一定要帮助大小姐赢下比赛,她已下决心。" -233," 获得阿努比斯扮演卡的人类少女。她本是在红魔馆服侍蕾米莉亚·斯卡蕾特的女仆长,陪着任性的大小姐一同加入游戏。 - " -234,"居然是……亡者引路人吗?不过大小姐是不会死的吧。我变得多余了呢。" -235,"角色特性" -236,"三星挑战" -237,"[又见面了,大小姐]" -238,"累计召唤10次" -239,"[完美潇洒的从者]" -240,"在一回合内连续闪现到4个不同的伟人身边" -241,"[于冥河守候]" -242,"闪现到蕾米莉亚身边后蕾米莉亚在该回合内死亡" -243,"在一回合内,连续闪现到4个不同的己方伟人身边" -244,"[为您指引归途]" -245,"闪现到蕾米莉亚身边后,蕾米莉亚在该回合内死亡" -246,"十六夜 夜" -247,"口" -248,"关" -249,"奇观介绍" -250," 古代世界最大、最著名的图书馆,建于托勒密王朝时期的埃及,旨在收藏天下所有知识。后因战火与政治动荡多次焚毁。 - 在游戏中,作为知识类奇观,解锁全部科后即可获得,提供3点城市经验。" -251,"众人评价" -252,"蕾米莉亚和帕秋莉正在讨论。" -253,"七十万卷!你可别让小恶魔累死哦。传出去坏了我红魔馆的名声。" -254,"小恶魔很结实,何况她是自愿的。倒是某只老鼠可能会累死吧。" -255,"听说进了亚历山大港的船只,必须把书留下来,就像打劫一样呢。" -256,"若真如此,我还真希望黑白老鼠多来几趟。" -257,"[雅典娜的居所]" -258,"累计建造10次" -259,"[船过港,书且留]" -260,"在亚历山大港建造该奇观,必须靠近谷仓、港口和市中心" -261,"[七十万卷遗梦]" -262,"伟人帕秋莉·诺蕾姬在该奇观上连续停留10回合" -263,"亚历山大图书馆" -264,"成就收集星({count}/100)" -265,"战斗成就" -266,"战斗成就(5/25)" -267,"[系统设置]" -268,"音乐音量" -269,"音效音量" -270,"显示提示" -271,"语言" -272,"简体中文" -273,"关闭" -274,"退出" -275,"关于我们" -276,"出品 蕾米莉亚指挥部" -277,"原作 上海爱丽丝幻乐团" -278,"本作品为 东方project 的二次同人创作" -279,"关注我们" -280,"@蕾米莉亚指挥部" -281,"官方网站" -282,"开发团队" -283,"版本信息" -284,"隐私政策" -285,"服务条款" -286,"少女加冕中..." -287,"卢克索神庙" -288,"孟菲斯老城" -289,"吉萨大金字塔" -290,"阿布辛贝大神庙" -291,"狮身人面像" -292,"奥里西斯神庙" -293,"枫丹白露宫" -294,"索邦大学" -295,"交易所广场" -296,"卢浮宫" -297,"凯旋门" -298,"巴黎圣母院" -299,"巴黎天文台" -300,"勃兰登堡门" -301,"海登堡大学" -302,"汉堡港口仓库城" -303,"新天鹅堡" -304,"柏林胜利纪念柱" -305,"拜罗伊特节日剧院" -306,"齐柏林飞艇基地" -307,"阿育王柱" -308,"那烂陀寺" -309,"亨比" -310,"泰姬陵" -311,"红堡" -312,"米纳克希神庙" -313,"简塔曼塔天文台" diff --git a/My project/Assets/CSV/Multilingual.csv.meta b/My project/Assets/CSV/Multilingual.csv.meta deleted file mode 100644 index db73f9246..000000000 --- a/My project/Assets/CSV/Multilingual.csv.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 64c1bbe0986b866488c0ff7df56a175e -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/My project/Assets/Resources/Export/AIConfig.asset.meta b/My project/Assets/Resources/Export/AIConfig.asset.meta index 75b43bc5a..f33fb5eb0 100644 --- a/My project/Assets/Resources/Export/AIConfig.asset.meta +++ b/My project/Assets/Resources/Export/AIConfig.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8582602f11b29574bbc97685fd858ad0 +guid: aa71630f1874d3c46b0edd7721a00eeb NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/Achievement.asset.meta b/My project/Assets/Resources/Export/Achievement.asset.meta index 0517b43ba..a516c5165 100644 --- a/My project/Assets/Resources/Export/Achievement.asset.meta +++ b/My project/Assets/Resources/Export/Achievement.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 27f4bb438a10ceb4ab02dac1f478600c +guid: 520b2f1c1cb2909478e60c9298f8a6ce NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/ActionDataAssets.asset.meta b/My project/Assets/Resources/Export/ActionDataAssets.asset.meta index 43bcad469..ab65f76ae 100644 --- a/My project/Assets/Resources/Export/ActionDataAssets.asset.meta +++ b/My project/Assets/Resources/Export/ActionDataAssets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 94ead1d9ef420884b8752757007e5f3d +guid: ad6c553940fdb5b4f97e1521da68b00a NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/AnimDataAssets.asset.meta b/My project/Assets/Resources/Export/AnimDataAssets.asset.meta index 863938435..32b7a54f1 100644 --- a/My project/Assets/Resources/Export/AnimDataAssets.asset.meta +++ b/My project/Assets/Resources/Export/AnimDataAssets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6222b7477e5810544bbf3399b7c5a3bc +guid: 4dc4e9009fc13cb4a877c48769c97458 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/CivDataAssets.asset.meta b/My project/Assets/Resources/Export/CivDataAssets.asset.meta index 1b0df9f19..8ffdbc067 100644 --- a/My project/Assets/Resources/Export/CivDataAssets.asset.meta +++ b/My project/Assets/Resources/Export/CivDataAssets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 78fb95fe1cdf1d743a75761564e269a8 +guid: d4560da2c750246499013f5710a286c4 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/GridAndResourceDataAssets.asset.meta b/My project/Assets/Resources/Export/GridAndResourceDataAssets.asset.meta index 425aea1cb..c441d225b 100644 --- a/My project/Assets/Resources/Export/GridAndResourceDataAssets.asset.meta +++ b/My project/Assets/Resources/Export/GridAndResourceDataAssets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5c11ac7aa51414a428e81362c470f4d2 +guid: fea7201f68899cd42bc4a68de499411c NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/PlayerDataAssets.asset.meta b/My project/Assets/Resources/Export/PlayerDataAssets.asset.meta index 3bb1fd111..d113d73b9 100644 --- a/My project/Assets/Resources/Export/PlayerDataAssets.asset.meta +++ b/My project/Assets/Resources/Export/PlayerDataAssets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 31f15e99e6e4e0d41982384fff6b674d +guid: f75f4d9fa159bd04b8243f676f6aca57 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/TechDataAssets.asset.meta b/My project/Assets/Resources/Export/TechDataAssets.asset.meta index b64036122..a058093ef 100644 --- a/My project/Assets/Resources/Export/TechDataAssets.asset.meta +++ b/My project/Assets/Resources/Export/TechDataAssets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9b81b94a68d068c49a4d0f3e3f259784 +guid: 9df2b616a8cdde14b9f6a7516514f407 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/UICenterMessageDataAssets.asset.meta b/My project/Assets/Resources/Export/UICenterMessageDataAssets.asset.meta index 618c1875e..6893f6fdd 100644 --- a/My project/Assets/Resources/Export/UICenterMessageDataAssets.asset.meta +++ b/My project/Assets/Resources/Export/UICenterMessageDataAssets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2946577c0524a2f4690e88c277934394 +guid: 5beb76bff734a2f4680421fe75739001 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Resources/Export/UnitTypeDataAssets.asset.meta b/My project/Assets/Resources/Export/UnitTypeDataAssets.asset.meta index 1413fb1b4..7e2ff9ade 100644 --- a/My project/Assets/Resources/Export/UnitTypeDataAssets.asset.meta +++ b/My project/Assets/Resources/Export/UnitTypeDataAssets.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8266b710a198c864bb1b14405df1834d +guid: e87583e33d858a84d961ea170f035833 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/My project/Assets/Scripts/Logic/Editor/MultilingualEditorWindow.cs b/My project/Assets/Scripts/Logic/Editor/MultilingualEditorWindow.cs index 6dec1c564..a76cdddd6 100644 --- a/My project/Assets/Scripts/Logic/Editor/MultilingualEditorWindow.cs +++ b/My project/Assets/Scripts/Logic/Editor/MultilingualEditorWindow.cs @@ -6,8 +6,10 @@ */ +using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; @@ -17,6 +19,7 @@ using Logic.Multilingual; using TMPro; using UnityEditor; using UnityEngine; +using Debug = UnityEngine.Debug; namespace Logic.Editor @@ -92,6 +95,11 @@ namespace Logic.Editor AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); } + if (InspectorUtils.InspectorButtonWithTextWidth("清空")) + { + _asset.Items.Clear(); + _asset.RefreshDict(); + } if (InspectorUtils.InspectorButtonWithTextWidth("导出 Excel")) { @@ -102,13 +110,45 @@ namespace Logic.Editor { ExcelExportToAsset(); } - EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + if (InspectorUtils.InspectorButtonWithTextWidth("添加字体组")) + { + _asset.FontGroups.Add(new MultilingualFontGroup()); + } + EditorGUILayout.EndHorizontal(); + + var deleteSet = new HashSet(); + for (int i = 0; i < _asset.FontGroups.Count; i++) + { + _asset.FontGroups[i].FontID = (uint)i + 1; + if (!ShowFontGroup(_asset.FontGroups[i])) continue; + deleteSet.Add(_asset.FontGroups[i]); + } + foreach (var deleteGroup in deleteSet)_asset.FontGroups.Remove(deleteGroup); foreach (var item in _asset.Items) ShowMultilingualItem(item); EditorGUILayout.EndScrollView(); } + private bool ShowFontGroup(MultilingualFontGroup fontGroup) + { + var isDelete = false; + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.BeginHorizontal(); + InspectorUtils.InspectorTextWidthRich($"ID : {fontGroup.FontID}"); + if (InspectorUtils.InspectorButtonWithTextWidth("x")) isDelete = true; + EditorGUILayout.EndHorizontal(); + fontGroup.ZHFont = (TMP_FontAsset)EditorGUILayout.ObjectField(fontGroup.ZHFont, typeof(TMP_FontAsset), false); + fontGroup.ENFont = (TMP_FontAsset)EditorGUILayout.ObjectField(fontGroup.ENFont, typeof(TMP_FontAsset), false); + fontGroup.JPFont = (TMP_FontAsset)EditorGUILayout.ObjectField(fontGroup.JPFont, typeof(TMP_FontAsset), false); + fontGroup.KRFont = (TMP_FontAsset)EditorGUILayout.ObjectField(fontGroup.KRFont, typeof(TMP_FontAsset), false); + EditorGUILayout.EndVertical(); + EditorGUILayout.Space(); + return isDelete; + } + private void ShowMultilingualItem(MultilingualItem item) { EditorGUILayout.BeginVertical(EditorStyles.helpBox); @@ -124,47 +164,61 @@ namespace Logic.Editor EditorGUILayout.Space(); } + // 新增辅助方法:移除 CSV 字段两端的引号并处理内部转义 + private string RemoveCsvQuotes(string field) + { + if (string.IsNullOrEmpty(field)) return field; + // 去除首尾空格和换行符 + field = field.Trim(); + // 若字段以引号开头和结尾,则去除引号并处理内部转义 + if (field.Length >= 2 && field.StartsWith("\"") && field.EndsWith("\"")) + { + field = field.Substring(1, field.Length - 2) // 去除首尾引号 + .Replace("\"\"", "\""); // 将转义引号还原为单个引号 + } + return field; + } + private void ExcelExportToAsset() { - _asset.Items.Clear(); - // 读取整个文件(而不是按行) - string csvContent = File.ReadAllText("Assets/CSV/Multilingual.csv"); - List lines = new List(); - StringBuilder currentLine = new StringBuilder(); - bool inQuotes = false; - foreach (char c in csvContent) - { - if (c == '"') inQuotes = !inQuotes; // 进入/退出引号模式 - if (c == '\n' && !inQuotes) // 换行符且不在引号内 - { - lines.Add(currentLine.ToString()); - currentLine.Clear(); - } - else currentLine.Append(c); - } - if (currentLine.Length > 0) lines.Add(currentLine.ToString()); + GetExcelData(); + _asset.RefreshDict(); + string context; + using (var reader = new StreamReader("F:/th1new/Tools/MultilingualTxt.txt", Encoding.Default, true)) + { + context = reader.ReadToEnd(); + } + var lines = context.Split("!@#$%"); foreach (string line in lines) { if (string.IsNullOrWhiteSpace(line)) continue; // 跳过空行 - - string[] cells = line.Split(','); // 按逗号分割 + string[] cells = line.Split("%$#@!"); if (cells.Length == 0) continue; - - var item = new MultilingualItem(); - item.ID = uint.Parse(cells[0]); - if (cells.Length >= 2) item.ZH = cells[1]; - if (cells.Length >= 3) item.EN = cells[2]; - if (cells.Length >= 4) item.JP = cells[3]; - if (cells.Length >= 5) item.KR = cells[4]; - _asset.Items.Add(item); + + var id = uint.Parse(cells[0]); + MultilingualItem item; + if (_asset.ItemDict.TryGetValue(id, out var value)) item = value; + else + { + item = new MultilingualItem(); + _asset.Items.Add(item); + } + + item.ID = id; + if (cells.Length >= 2) item.ZH = RemoveCsvQuotes(cells[1]); + if (cells.Length >= 3) item.EN = RemoveCsvQuotes(cells[2]); + if (cells.Length >= 4) item.JP = RemoveCsvQuotes(cells[3]); + if (cells.Length >= 5) item.KR = RemoveCsvQuotes(cells[4]); } } private void AssetExportToExcel() { _zhStrDict.Clear(); - _idIndex = 1; + foreach (var item in _asset.Items) _zhStrDict[item.ZH] = item.ID; + if (_asset.Items.Count != 0) _idIndex = _asset.Items[^1].ID + 1; + else _idIndex = 1; var uiObj = GameObject.Find("UICanvas"); if (!uiObj) @@ -176,7 +230,9 @@ namespace Logic.Editor var coms = uiObj.GetComponentsInChildren(true).ToList(); foreach (var com in coms) { - if (!Regex.IsMatch(com.text, @"[\u4E00-\u9FFF\u3400-\u4DBF]")) continue; + if (!Regex.IsMatch(com.text, @"[\u4E00-\u9FFF\u3400-\u4DBFa-zA-Z]")) continue; + // 去除首尾空格和换行符 + com.text = com.text.Trim(); var textCom = com.gameObject.GetComponent(); if (!textCom) textCom = com.gameObject.AddComponent(); @@ -201,22 +257,36 @@ namespace Logic.Editor var targetAsset = GetExportAsset(asset); TraverseObject(targetAsset); } + + _asset.RefreshDict(); + foreach (var kv in _zhStrDict) + { + if (_asset.ItemDict.ContainsKey(kv.Value)) continue; + var item = new MultilingualItem(); + item.ID = kv.Value; + item.ZH = kv.Key; + _asset.Items.Add(item); + } + // 排序 asset.items 保证id从小到大 + _asset.Items = _asset.Items.OrderBy(i => i.ID).ToList(); - string dirPath = Path.Combine(Application.dataPath, "CSV"); - string filePath = Path.Combine(dirPath, "Multilingual.csv"); - if (!Directory.Exists(dirPath)) Directory.CreateDirectory(dirPath); + string filePath = "F:/th1new/Tools/MultilingualTxt.txt"; if (!File.Exists(filePath)) { using (File.Create(filePath)) { } // 立即释放句柄 } + using (StreamWriter sw = new StreamWriter(filePath, false, Encoding.UTF8)) { - foreach (var kv in _zhStrDict) + StringBuilder sb = new StringBuilder(); + foreach (var item in _asset.Items) { - var text = $"\"{kv.Key.Replace("\"", "\"\"")}\""; - sw.WriteLine($"{kv.Value.ToString()},{text}"); + sb.Append($"{item.ID}%$#@!{item.ZH}%$#@!{item.EN}%$#@!{item.JP}%$#@!{item.KR}!@#$%\n"); } + sw.Write(sb.ToString()); } + + WriteToExcel(); } private ScriptableObject GetExportAsset(ScriptableObject origin) @@ -243,8 +313,8 @@ namespace Logic.Editor var attr = field.GetCustomAttribute(); if (attr != null) { - var str = (string)field.GetValue(asset); - if (str != null) + var str = ((string)field.GetValue(asset)).Trim(); + if (!string.IsNullOrEmpty(str)) { if (_zhStrDict.ContainsKey(str)) { @@ -277,5 +347,57 @@ namespace Logic.Editor } } } + + public void WriteToExcel() + { + var pythonScript = $"F:/th1new/Tools/ExportStringToExcel.py"; + + ProcessStartInfo start = new ProcessStartInfo + { + FileName = "python", + Arguments = $"\"{pythonScript}\"", + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true + }; + + using (var process = Process.Start(start)) + { + string output = process.StandardOutput.ReadToEnd(); + string error = process.StandardError.ReadToEnd(); // 获取错误信息 + process.WaitForExit(); + + Debug.Log($"Exit Code: {process.ExitCode}"); // 打印退出码 + Debug.Log($"Output: {output}"); + Debug.Log($"Error: {error}"); // 打印错误信息 + } + } + + public void GetExcelData() + { + var pythonScript = $"F:/th1new/Tools/PrintExcelString.py"; + + ProcessStartInfo start = new ProcessStartInfo + { + FileName = "python", + Arguments = $"\"{pythonScript}\"", + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true + }; + + using (var process = Process.Start(start)) + { + string output = process.StandardOutput.ReadToEnd(); + string error = process.StandardError.ReadToEnd(); // 获取错误信息 + process.WaitForExit(); + + Debug.Log($"Exit Code: {process.ExitCode}"); // 打印退出码 + Debug.Log($"Output: {output}"); + Debug.Log($"Error: {error}"); // 打印错误信息 + } + } } } \ No newline at end of file diff --git a/My project/Assets/Scripts/Logic/Multilingual/MultilingualData.cs b/My project/Assets/Scripts/Logic/Multilingual/MultilingualData.cs index 16dbf6c36..98274443c 100644 --- a/My project/Assets/Scripts/Logic/Multilingual/MultilingualData.cs +++ b/My project/Assets/Scripts/Logic/Multilingual/MultilingualData.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; +using TMPro; using UnityEngine; @@ -23,8 +24,10 @@ namespace Logic.Multilingual public class MultilingualData : ScriptableObject { + public List FontGroups = new List(); public List Items = new List(); private Dictionary _itemDict; + public Dictionary ItemDict => _itemDict; public string GetMultilingualStr(uint id, MultilingualType type) @@ -42,6 +45,35 @@ namespace Logic.Multilingual _ => string.Empty, }; } + + public TMP_FontAsset GetMultilingualFont(uint fontId, MultilingualType type) + { + if (fontId == 0) return null; + foreach (var group in FontGroups) + { + if (group.FontID != fontId) continue; + return type switch + { + MultilingualType.ZH => group.ZHFont, + MultilingualType.EN => group.ENFont, + MultilingualType.JP => group.JPFont, + MultilingualType.KR => group.KRFont, + _ => null, + }; + } + + return null; + } + + public uint GetFontGroupID(TMP_FontAsset font) + { + foreach (var group in FontGroups) + { + if (group.ZHFont == font) return group.FontID; + } + + return 0; + } public void RefreshDict() { @@ -61,4 +93,14 @@ namespace Logic.Multilingual public string JP; public string KR; } + + + public class MultilingualFontGroup + { + public uint FontID; + public TMP_FontAsset ZHFont; + public TMP_FontAsset ENFont; + public TMP_FontAsset JPFont; + public TMP_FontAsset KRFont; + } } \ No newline at end of file diff --git a/My project/Assets/Scripts/Logic/Multilingual/MultilingualManager.cs b/My project/Assets/Scripts/Logic/Multilingual/MultilingualManager.cs index b0e024153..4f0abe826 100644 --- a/My project/Assets/Scripts/Logic/Multilingual/MultilingualManager.cs +++ b/My project/Assets/Scripts/Logic/Multilingual/MultilingualManager.cs @@ -24,6 +24,7 @@ namespace Logic.Multilingual public void Init() { + if (!_multilingualData) _multilingualData = Resources.Load("Export/Multilingual"); _currentType = (MultilingualType)PlayerPrefs.GetInt("Multilingual", 0); ChangedMultilingual(_currentType); } @@ -33,6 +34,11 @@ namespace Logic.Multilingual return _multilingualData.GetMultilingualStr(id, _currentType); } + public TMP_FontAsset GetMultilingualFont(uint fontId) + { + return _multilingualData.GetMultilingualFont(fontId, _currentType); + } + public void ChangedMultilingual(MultilingualType type) { RefreshTextComs(); @@ -40,6 +46,11 @@ namespace Logic.Multilingual foreach (var textCom in _textComs) textCom.OnMultilingualChanged(); } + public uint GetFontGroupID(TMP_FontAsset font) + { + return _multilingualData.GetFontGroupID(font); + } + public void SetUIText(TextMeshPro textCom, string id) { if (!textCom) return; diff --git a/My project/Assets/Scripts/Logic/Multilingual/MultilingualTextMono.cs b/My project/Assets/Scripts/Logic/Multilingual/MultilingualTextMono.cs index afd37c778..440764ace 100644 --- a/My project/Assets/Scripts/Logic/Multilingual/MultilingualTextMono.cs +++ b/My project/Assets/Scripts/Logic/Multilingual/MultilingualTextMono.cs @@ -15,20 +15,34 @@ namespace Logic.Multilingual public class MultilingualTextMono : MonoBehaviour { public uint ID = 0; + public uint FontID = 0; private void OnEnable() { - if (ID == 0) return; OnMultilingualChanged(); } public void OnMultilingualChanged() { - if (ID == 0) return; + BindFontID(); var text = GetComponent(); if (!text) return; - text.text = MultilingualManager.Instance.GetMultilingualText(ID); + + if (ID != 0) text.text = MultilingualManager.Instance.GetMultilingualText(ID); + if (FontID != 0) + { + var font = MultilingualManager.Instance.GetMultilingualFont(FontID); + if (font)text.font = font; + } + } + + public void BindFontID() + { + if (FontID != 0) return; + var text = GetComponent(); + if (!text) return; + FontID = MultilingualManager.Instance.GetFontGroupID(text.font); } } } \ No newline at end of file diff --git a/Tools/ExportStringToExcel.py b/Tools/ExportStringToExcel.py new file mode 100644 index 000000000..55f7bbdac --- /dev/null +++ b/Tools/ExportStringToExcel.py @@ -0,0 +1,52 @@ +import sys +import openpyxl +import os +from datetime import datetime + +def log(message): + print(f"[{datetime.now()}] {message}", file=sys.stderr) + +def parse_special_format(content): + """解析特殊标记格式的数据""" + records = [] + # 按记录分割(注意保留结尾空行处理) + for record in content.split('!@#$%'): + if not record.strip(): + continue + # 按字段分割 + fields = [f.strip() for f in record.split('%$#@!')] + if len(fields) == 5: # ID,ZH,EN,JP,KR + records.append(fields) + else: + log(f"忽略格式错误的记录: {record}") + return records + +def convert_file(): + try: + txt_path = r"F:/th1new/Tools/MultilingualTxt.txt" + excel_path = r"F:/th1new/Tools/Multilingual.xlsx" + with open(txt_path, 'r', encoding='utf-8') as f: + content = f.read() + + records = parse_special_format(content) + if not records: + log("错误:未找到有效记录") + return False + + wb = openpyxl.Workbook() + ws = wb.active + ws.append(["ID", "中文", "英文", "日文", "韩文"]) # 添加标题行 + for row in records: + ws.append(row) + + os.makedirs(os.path.dirname(excel_path), exist_ok=True) + wb.save(excel_path) + log(f"成功转换 {len(records)} 条记录") + return True + except Exception as e: + log(f"转换失败: {str(e)}") + return False + + +if __name__ == "__main__": + sys.exit(0 if convert_file() else 1) \ No newline at end of file diff --git a/Tools/Multilingual.xlsx b/Tools/Multilingual.xlsx new file mode 100644 index 000000000..5b1b1c4d8 Binary files /dev/null and b/Tools/Multilingual.xlsx differ diff --git a/Tools/MultilingualTxt.txt b/Tools/MultilingualTxt.txt new file mode 100644 index 000000000..b622b6897 --- /dev/null +++ b/Tools/MultilingualTxt.txt @@ -0,0 +1,356 @@ +1%$#@!消息列表%$#@!%$#@!%$#@!!@#$% +2%$#@!建设%$#@!%$#@!%$#@!!@#$% +3%$#@![我要看到血流成河!]%$#@!%$#@!%$#@!!@#$% +4%$#@!阵营的普通单位如完成击杀后,将 +在下回合获得攻击强化。%$#@!%$#@!%$#@!!@#$% +5%$#@!排名列表(#3)%$#@!%$#@!%$#@!!@#$% +6%$#@!名次%$#@!%$#@!%$#@!!@#$% +7%$#@!玩家名%$#@!%$#@!%$#@!!@#$% +8%$#@!城市数%$#@!%$#@!%$#@!!@#$% +9%$#@!信仰%$#@!%$#@!%$#@!!@#$% +10%$#@!比那名居天子%$#@!%$#@!%$#@!!@#$% +11%$#@!带领<普鲁士帝国>%$#@!%$#@!%$#@!!@#$% +12%$#@!设置%$#@!%$#@!%$#@!!@#$% +13%$#@!排名%$#@!%$#@!%$#@!!@#$% +14%$#@!科技%$#@!%$#@!%$#@!!@#$% +15%$#@!消息%$#@!%$#@!%$#@!!@#$% +16%$#@!下回合%$#@!%$#@!%$#@!!@#$% +17%$#@!城市已升级!%$#@!%$#@!%$#@!!@#$% +18%$#@!请从下方选择一项奖励%$#@!%$#@!%$#@!!@#$% +19%$#@!工作坊%$#@!%$#@!%$#@!!@#$% +20%$#@!有bug别点%$#@!%$#@!%$#@!!@#$% +21%$#@!公园%$#@!%$#@!%$#@!!@#$% +22%$#@!伟人%$#@!%$#@!%$#@!!@#$% +23%$#@!城墙%$#@!%$#@!%$#@!!@#$% +24%$#@!财富%$#@!%$#@!%$#@!!@#$% +25%$#@!人口扩张%$#@!%$#@!%$#@!!@#$% +26%$#@!领土扩张%$#@!%$#@!%$#@!!@#$% +27%$#@!请等待其他玩家操作...%$#@!%$#@!%$#@!!@#$% +28%$#@!步兵%$#@!%$#@!%$#@!!@#$% +29%$#@!轻骑兵%$#@!%$#@!%$#@!!@#$% +30%$#@!弓兵%$#@!%$#@!%$#@!!@#$% +31%$#@!盾兵%$#@!%$#@!%$#@!!@#$% +32%$#@!剑士%$#@!%$#@!%$#@!!@#$% +33%$#@!重骑兵%$#@!%$#@!%$#@!!@#$% +34%$#@!炮兵%$#@!%$#@!%$#@!!@#$% +35%$#@!芙兰朵露%$#@!%$#@!%$#@!!@#$% +36%$#@!蕾米莉亚%$#@!%$#@!%$#@!!@#$% +37%$#@!十六夜咲夜%$#@!%$#@!%$#@!!@#$% +38%$#@!红美铃%$#@!%$#@!%$#@!!@#$% +39%$#@!帕秋莉诺蕾姬%$#@!%$#@!%$#@!!@#$% +40%$#@!占领城市%$#@!%$#@!%$#@!!@#$% +41%$#@!升级%$#@!%$#@!%$#@!!@#$% +42%$#@!恢复%$#@!%$#@!%$#@!!@#$% +43%$#@!解雇%$#@!%$#@!%$#@!!@#$% +44%$#@!挖掘%$#@!%$#@!%$#@!!@#$% +45%$#@!采集%$#@!%$#@!%$#@!!@#$% +46%$#@!帆船%$#@!%$#@!%$#@!!@#$% +47%$#@!冲锋艇%$#@!%$#@!%$#@!!@#$% +48%$#@!战舰%$#@!%$#@!%$#@!!@#$% +49%$#@!清除树林%$#@!%$#@!%$#@!!@#$% +50%$#@!渔猎%$#@!%$#@!%$#@!!@#$% +51%$#@!狩捕%$#@!%$#@!%$#@!!@#$% +52%$#@!林场%$#@!%$#@!%$#@!!@#$% +53%$#@!采矿场%$#@!%$#@!%$#@!!@#$% +54%$#@!农田%$#@!%$#@!%$#@!!@#$% +55%$#@!港口%$#@!%$#@!%$#@!!@#$% +56%$#@!道路%$#@!%$#@!%$#@!!@#$% +57%$#@!桥梁%$#@!%$#@!%$#@!!@#$% +58%$#@!谷仓%$#@!%$#@!%$#@!!@#$% +59%$#@!加工厂%$#@!%$#@!%$#@!!@#$% +60%$#@!市场%$#@!%$#@!%$#@!!@#$% +61%$#@!冶炼厂%$#@!%$#@!%$#@!!@#$% +62%$#@!神庙%$#@!%$#@!%$#@!!@#$% +63%$#@!森林神庙%$#@!%$#@!%$#@!!@#$% +64%$#@!山神庙%$#@!%$#@!%$#@!!@#$% +65%$#@!海洋神庙%$#@!%$#@!%$#@!!@#$% +66%$#@!焚林垦田%$#@!%$#@!%$#@!!@#$% +67%$#@!植树造林%$#@!%$#@!%$#@!!@#$% +68%$#@!拆除%$#@!%$#@!%$#@!!@#$% +69%$#@!和平祭坛%$#@!%$#@!%$#@!!@#$% +70%$#@!智慧之塔%$#@!%$#@!%$#@!!@#$% +71%$#@!繁荣之殿%$#@!%$#@!%$#@!!@#$% +72%$#@!财富之巅%$#@!%$#@!%$#@!!@#$% +73%$#@!权力之门%$#@!%$#@!%$#@!!@#$% +74%$#@!皇家公园%$#@!%$#@!%$#@!!@#$% +75%$#@!世界之眼%$#@!%$#@!%$#@!!@#$% +76%$#@!平原%$#@!%$#@!%$#@!!@#$% +77%$#@!这是一片空旷的土地。%$#@!%$#@!%$#@!!@#$% +78%$#@!这里是提示文字 +提示玩家应该怎么操作%$#@!%$#@!%$#@!!@#$% +79%$#@!登山%$#@!%$#@!%$#@!!@#$% +80%$#@!KING +职阶召唤%$#@!%$#@!%$#@!!@#$% +81%$#@!BISHOP +职阶召唤%$#@!%$#@!%$#@!!@#$% +82%$#@!QUEEN +职阶召唤%$#@!%$#@!%$#@!!@#$% +83%$#@!KNIGHTS +职阶召唤%$#@!%$#@!%$#@!!@#$% +84%$#@!CHARIOT +职阶召唤%$#@!%$#@!%$#@!!@#$% +85%$#@!科技名称%$#@!%$#@!%$#@!!@#$% +86%$#@!该科技将会解锁以下内容:%$#@!%$#@!%$#@!!@#$% +87%$#@!取消%$#@!%$#@!%$#@!!@#$% +88%$#@!研发%$#@!%$#@!%$#@!!@#$% +89%$#@![巴别之瞻妄]%$#@!%$#@!%$#@!!@#$% +90%$#@!帝国控制的城市越多,研发科技的费用越高。%$#@!%$#@!%$#@!!@#$% +91%$#@!当帝国规模愈发庞大,众声喧哗的世界便难以共鸣于同一道理。知识在各城邦间折损、误解、甚至扭曲,如同昔日攀天之塔的回音,终将自毁其基。%$#@!%$#@!%$#@!!@#$% +92%$#@!金币 (+2)%$#@!%$#@!%$#@!!@#$% +93%$#@!回合%$#@!%$#@!%$#@!!@#$% +94%$#@!古明地觉%$#@!%$#@!%$#@!!@#$% +95%$#@!贵安,红魔馆的大小姐。 +你的心声已经都写在脸上了, +不过,请别再想那些失礼的事情了,好吗?%$#@!%$#@!%$#@!!@#$% +96%$#@!哎呀哎呀,原来是古明地小姐。 +既然是游戏中,我可不会手下留情哦。 +想必我不说,你也能读懂我的野心吧?%$#@!%$#@!%$#@!!@#$% +97%$#@!测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文%$#@!%$#@!%$#@!!@#$% +98%$#@!测试标题%$#@!%$#@!%$#@!!@#$% +99%$#@!确认%$#@!%$#@!%$#@!!@#$% +100%$#@!胜利%$#@!%$#@!%$#@!!@#$% +101%$#@!恭喜您获得最终胜利!%$#@!%$#@!%$#@!!@#$% +102%$#@!拥有城市%$#@!%$#@!%$#@!!@#$% +103%$#@!拥有雕塑%$#@!%$#@!%$#@!!@#$% +104%$#@!最终得分%$#@!%$#@!%$#@!!@#$% +105%$#@!返回主菜单%$#@!%$#@!%$#@!!@#$% +106%$#@!失败%$#@!%$#@!%$#@!!@#$% +107%$#@!很遗憾,您已出局%$#@!%$#@!%$#@!!@#$% +108%$#@!TOHOTOPIA%$#@!%$#@!%$#@!!@#$% +109%$#@!TOHOVILIZATION%$#@!%$#@!%$#@!!@#$% +110%$#@!新游戏%$#@!%$#@!%$#@!!@#$% +111%$#@!继 续%$#@!%$#@!%$#@!!@#$% +112%$#@!故 事%$#@!%$#@!%$#@!!@#$% +113%$#@!图 鉴%$#@!%$#@!%$#@!!@#$% +114%$#@!战 绩%$#@!%$#@!%$#@!!@#$% +115%$#@!关于%$#@!%$#@!%$#@!!@#$% +116%$#@!地图尺寸%$#@!%$#@!%$#@!!@#$% +117%$#@!玩家数量%$#@!%$#@!%$#@!!@#$% +118%$#@!游戏难度%$#@!%$#@!%$#@!!@#$% +119%$#@!EASY%$#@!%$#@!%$#@!!@#$% +120%$#@!NORMAL%$#@!%$#@!%$#@!!@#$% +121%$#@!HARD%$#@!%$#@!%$#@!!@#$% +122%$#@!LUNATIC%$#@!%$#@!%$#@!!@#$% +123%$#@!选择阵营%$#@!%$#@!%$#@!!@#$% +124%$#@!红魔馆%$#@!%$#@!%$#@!!@#$% +125%$#@!难度%$#@!%$#@!%$#@!!@#$% +126%$#@!高傲的红魔馆大小姐抽到了埃及帝国卡。 +不知为什么,她赌上了整个红魔馆押自己赢。%$#@!%$#@!%$#@!!@#$% +127%$#@!“无聊,我要看到血流成河!”%$#@!%$#@!%$#@!!@#$% +128%$#@!埃及帝国%$#@!%$#@!%$#@!!@#$% +129%$#@!优雅而怠惰的月之公主抽到了法兰西帝国卡。 +尚无败绩,不过好像都是她的宠物月兔代打。%$#@!%$#@!%$#@!!@#$% +130%$#@!“输了的话,今晚就没饭吃了哦,铃仙酱~”%$#@!%$#@!%$#@!!@#$% +131%$#@!永远亭%$#@!%$#@!%$#@!!@#$% +132%$#@!法兰西帝国%$#@!%$#@!%$#@!!@#$% +133%$#@!沉静而可怖的地灵殿主人抽到了印度帝国卡。 +她只是来寻找妹妹和宠物,稀里糊涂加入了对局。%$#@!%$#@!%$#@!!@#$% +134%$#@!“投降吧,阁下毫无胜算。我只想带她们早些回家。”%$#@!%$#@!%$#@!!@#$% +135%$#@!地灵殿%$#@!%$#@!%$#@!!@#$% +136%$#@!印度帝国%$#@!%$#@!%$#@!!@#$% +137%$#@!“投降吧,阁下毫无胜算。我只想带她们回家。”%$#@!%$#@!%$#@!!@#$% +138%$#@!开始霸业!%$#@!%$#@!%$#@!!@#$% +139%$#@!经典模式%$#@!%$#@!%$#@!!@#$% +140%$#@!征服模式%$#@!%$#@!%$#@!!@#$% +141%$#@!来自红魔馆的吸血鬼大小姐——蕾米莉亚·斯卡雷特,此刻伫立于金字塔之巅,宣告自己即是埃及正统的王权化身。她将率领红魔馆的将领们南征北讨,驱策妖精女仆在尼罗河的滋养下开垦荒芜之地,筑起属于斯卡雷特王朝的辉煌帝国。%$#@!%$#@!%$#@!!@#$% +142%$#@!SCARLET%$#@!%$#@!%$#@!!@#$% +143%$#@!斯卡雷特王朝%$#@!%$#@!%$#@!!@#$% +144%$#@!伟人阵营%$#@!%$#@!%$#@!!@#$% +145%$#@!芙兰朵露·斯卡雷特%$#@!%$#@!%$#@!!@#$% +146%$#@!继承赛特意志的恶魔之妹%$#@!%$#@!%$#@!!@#$% +147%$#@!继承克里欧帕特拉意志的魔女%$#@!%$#@!%$#@!!@#$% +148%$#@!蕾米莉亚·斯卡雷特%$#@!%$#@!%$#@!!@#$% +149%$#@!继承奥里西斯意志的吸血鬼%$#@!%$#@!%$#@!!@#$% +150%$#@!十六夜 夜%$#@!%$#@!%$#@!!@#$% +151%$#@!继承阿努比斯意志的女仆长%$#@!%$#@!%$#@!!@#$% +152%$#@!继承荷鲁斯意志的武术家%$#@!%$#@!%$#@!!@#$% +153%$#@!伟人职阶:马(Knights) +继承赛特意志的红魔馆二小姐。拥有特色破局技能四重存在。%$#@!%$#@!%$#@!!@#$% +154%$#@!帕秋莉·诺蕾姬%$#@!%$#@!%$#@!!@#$% +155%$#@!伟人职阶:后(Queen) +继承克里欧帕特拉意志的魔女。拥有特色范围伤害技能皇家烈焰。%$#@!%$#@!%$#@!!@#$% +156%$#@!伟人职阶:王(King) +继承奥西里斯意志的吸血鬼。拥有特色反击回复技能红色不夜城。%$#@!%$#@!%$#@!!@#$% +157%$#@!伟人职阶:相(Bishop) +继承阿努比斯意志的女仆长。拥有特色突袭技能银之跳跃。%$#@!%$#@!%$#@!!@#$% +158%$#@!伟人职阶:车(Rook) +继承荷鲁斯意志的武术家。拥有特色反伤技能虹色太极拳。%$#@!%$#@!%$#@!!@#$% +159%$#@!士兵特性%$#@!%$#@!%$#@!!@#$% +160%$#@!妖精女仆%$#@!%$#@!%$#@!!@#$% +161%$#@!领土内未改造的森林可训练基础单位。 +妖精是森林的呼吸,是自然的化身。%$#@!%$#@!%$#@!!@#$% +162%$#@!文明特性%$#@!%$#@!%$#@!!@#$% +163%$#@!尼罗河的女儿%$#@!%$#@!%$#@!!@#$% +164%$#@!在游戏开始时拥有耕种科技。 +埃及是尼罗河的馈赠——希罗多德%$#@!%$#@!%$#@!!@#$% +165%$#@!来自永远亭的月之公主——蓬莱山辉夜,此刻端坐于凯旋门下,优雅地宣布她将继承法兰西帝国的荣光。月光洒落枫丹白露,竹影漫过香榭丽舍。她将率领兔子军团,漫步于革命与浪漫交织的疆土上,从容地重塑法兰西的雄图霸业。%$#@!%$#@!%$#@!!@#$% +166%$#@!HOURAISAN%$#@!%$#@!%$#@!!@#$% +167%$#@!蓬莱山王朝%$#@!%$#@!%$#@!!@#$% +168%$#@!铃仙·优昙华院·因幡%$#@!%$#@!%$#@!!@#$% +169%$#@!继承拉纳意志的月兔%$#@!%$#@!%$#@!!@#$% +170%$#@!八意永琳%$#@!%$#@!%$#@!!@#$% +171%$#@!继承贝尔蒂埃意志的月之贤者%$#@!%$#@!%$#@!!@#$% +172%$#@!蓬莱山辉夜%$#@!%$#@!%$#@!!@#$% +173%$#@!继承拿破仑意志的月之公主%$#@!%$#@!%$#@!!@#$% +174%$#@!因幡帝%$#@!%$#@!%$#@!!@#$% +175%$#@!继承红衣主教意志的妖怪兔%$#@!%$#@!%$#@!!@#$% +176%$#@!藤原妹红%$#@!%$#@!%$#@!!@#$% +177%$#@!继承贝尔纳多特意志的不死鸟%$#@!%$#@!%$#@!!@#$% +178%$#@!妖怪兔%$#@!%$#@!%$#@!!@#$% +179%$#@!永远亭阵营的单位在领土内的恢复量由4点提升至5点。 +兔子轻跳而过,好运悄然而至。%$#@!%$#@!%$#@!!@#$% +180%$#@!田园绅士学%$#@!%$#@!%$#@!!@#$% +181%$#@!在游戏开始时拥有采集科技。 +文明的第一课,就在葡萄藤与玫瑰花间。%$#@!%$#@!%$#@!!@#$% +182%$#@!埃及%$#@!%$#@!%$#@!!@#$% +183%$#@!法兰西%$#@!%$#@!%$#@!!@#$% +184%$#@!普鲁士%$#@!%$#@!%$#@!!@#$% +185%$#@!普鲁士帝国 +守矢王朝%$#@!%$#@!%$#@!!@#$% +186%$#@!八坂神奈子将扮演普鲁士帝国——守矢铁血联盟的最高领袖。她将以神权与军威并重的姿态,率守矢神社在钢铁洪流中强势登顶东方理想国大赛!%$#@!%$#@!%$#@!!@#$% +187%$#@!射命丸文%$#@!%$#@!%$#@!!@#$% +188%$#@!犬走花%$#@!%$#@!%$#@!!@#$% +189%$#@!泄矢诹访子%$#@!%$#@!%$#@!!@#$% +190%$#@!东风谷早苗%$#@!%$#@!%$#@!!@#$% +191%$#@!八坂神奈子%$#@!%$#@!%$#@!!@#$% +192%$#@!领袖特性%$#@!%$#@!%$#@!!@#$% +193%$#@![神不需要奇迹]%$#@!%$#@!%$#@!!@#$% +194%$#@!挖掘<遗迹>必定获得强力作战单位。%$#@!%$#@!%$#@!!@#$% +195%$#@![妖怪山的天狗们]%$#@!%$#@!%$#@!!@#$% +196%$#@!1范围内如有友方死亡,自身获得1回合的强化效果。%$#@!%$#@!%$#@!!@#$% +197%$#@![鲁尔山谷]%$#@!%$#@!%$#@!!@#$% +198%$#@!初始拥有<狩猎>科技。没有矿石的山脉也能为冶炼厂提供1点城市经验。%$#@!%$#@!%$#@!!@#$% +199%$#@!印度帝国 +古明地王朝%$#@!%$#@!%$#@!!@#$% +200%$#@!古明地觉将扮演印度帝国——地灵圣朝的女王。她将以深不可测的心灵操控,带领地灵殿,在恒河文明中冉冉升起,问鼎东方理想国大赛的最终冠军。%$#@!%$#@!%$#@!!@#$% +201%$#@!星熊勇仪%$#@!%$#@!%$#@!!@#$% +202%$#@!灵乌路空%$#@!%$#@!%$#@!!@#$% +203%$#@!古明地恋%$#@!%$#@!%$#@!!@#$% +204%$#@!火焰猫燐%$#@!%$#@!%$#@!!@#$% +205%$#@![你还有一次说谎的机会]%$#@!%$#@!%$#@!!@#$% +206%$#@!游戏开始时获得所有敌人位置和所有遗迹位置的提示%$#@!%$#@!%$#@!!@#$% +207%$#@![旧地狱的怨灵]%$#@!%$#@!%$#@!!@#$% +208%$#@!被杀死后,会对凶手附加<中毒>的负面效果。%$#@!%$#@!%$#@!!@#$% +209%$#@![恒河女神]%$#@!%$#@!%$#@!!@#$% +210%$#@!初始拥有<种植>科技。种树享受40%的折扣。%$#@!%$#@!%$#@!!@#$% +211%$#@!战绩历史%$#@!%$#@!%$#@!!@#$% +212%$#@!所有战绩%$#@!%$#@!%$#@!!@#$% +213%$#@!回合数%$#@!%$#@!%$#@!!@#$% +214%$#@!得分%$#@!%$#@!%$#@!!@#$% +215%$#@!阵营%$#@!%$#@!%$#@!!@#$% +216%$#@!得分系数%$#@!%$#@!%$#@!!@#$% +217%$#@!日期%$#@!%$#@!%$#@!!@#$% +218%$#@!阵营图鉴%$#@!%$#@!%$#@!!@#$% +219%$#@!高傲而任性的红魔馆大小姐抽到了埃及帝国卡。不知为什么,她赌上了整个红魔馆押自己赢。%$#@!%$#@!%$#@!!@#$% +220%$#@!优雅而怠惰的月之公主抽到了法兰西帝国卡。尚无败绩,不过好像都是她的宠物月兔代打。%$#@!%$#@!%$#@!!@#$% +221%$#@!沉静而可怖的地灵殿主人抽到了印度帝国卡。她只是来寻找妹妹和宠物,稀里糊涂加入了对局。%$#@!%$#@!%$#@!!@#$% +222%$#@!“投降吧,阁下毫无胜算。我只想带她们仨快点回去。”%$#@!%$#@!%$#@!!@#$% +223%$#@!可靠又专横的风雨之神抽到了普鲁士帝国卡。她已经为这款游戏新成立了并购部和宣传部。%$#@!%$#@!%$#@!!@#$% +224%$#@!“我要这游戏的冠名权,把你们负责人叫来。”%$#@!%$#@!%$#@!!@#$% +225%$#@!守矢神社%$#@!%$#@!%$#@!!@#$% +226%$#@!普鲁士帝国%$#@!%$#@!%$#@!!@#$% +227%$#@!“投降吧,你没有胜算。我只想快点带家妹回去。”%$#@!%$#@!%$#@!!@#$% +228%$#@!帝王星收集 3 / 5 +在游戏中召唤对应的伟人,点亮帝王星吧!%$#@!%$#@!%$#@!!@#$% +229%$#@!伟人图鉴%$#@!%$#@!%$#@!!@#$% +230%$#@!IZAYOI SAKUYA%$#@!%$#@!%$#@!!@#$% +231%$#@!角色介绍%$#@!%$#@!%$#@!!@#$% +232%$#@!继承了阿努比斯意志的少女,原本是在红魔馆服侍蕾米莉亚·斯卡蕾特的女仆长,拥有操纵时间/停止时间程度的能力。%$#@!%$#@!%$#@!!@#$% +233%$#@!她是红魔馆中唯一的人类,冷静从容、头脑敏锐、优雅潇洒,偶尔也有些毒舌。对大小姐唯命是从,也正因此陪着任性的主人一同加入到了这款风靡幻想乡的游戏之中。%$#@!%$#@!%$#@!!@#$% +234%$#@!居然是……冥界守护神吗?不过大小姐那种程度,是不会死的吧。这样一来,我就变得多余了呢。%$#@!%$#@!%$#@!!@#$% +235%$#@!大小姐也来到冥界了吗?该说幸运还是不幸呢……反正不管在哪里,我都会侍奉好大小姐。%$#@!%$#@!%$#@!!@#$% +236%$#@!在意识到大小姐所扮演的奥里西斯亦有冥王的身份后,她似乎有些开心,这便是操纵命运的能力吧,她这么想。%$#@!%$#@!%$#@!!@#$% +237%$#@!冥界的守护神?说得倒轻松,我是不是该去向某位偷懒的死神讨教一下‘划水秘诀’了呢。%$#@!%$#@!%$#@!!@#$% +238%$#@!虽然招牌的道具变成了安卡和瓦斯权杖,但她仍在黑曜石神像的阴影之中擦亮了手中的银刃。一定要帮助大小姐赢下比赛,她已下决心。%$#@!%$#@!%$#@!!@#$% +239%$#@!获得阿努比斯扮演卡的人类少女。她本是在红魔馆服侍蕾米莉亚·斯卡蕾特的女仆长,陪着任性的大小姐一同加入游戏。%$#@!%$#@!%$#@!!@#$% +240%$#@!居然是……亡者引路人吗?不过大小姐是不会死的吧。我变得多余了呢。%$#@!%$#@!%$#@!!@#$% +241%$#@!角色特性%$#@!%$#@!%$#@!!@#$% +242%$#@!三星挑战%$#@!%$#@!%$#@!!@#$% +243%$#@![又见面了,大小姐]%$#@!%$#@!%$#@!!@#$% +244%$#@!累计召唤10次%$#@!%$#@!%$#@!!@#$% +245%$#@![完美潇洒的从者]%$#@!%$#@!%$#@!!@#$% +246%$#@!在一回合内连续闪现到4个不同的伟人身边%$#@!%$#@!%$#@!!@#$% +247%$#@![于冥河守候]%$#@!%$#@!%$#@!!@#$% +248%$#@!闪现到蕾米莉亚身边后蕾米莉亚在该回合内死亡%$#@!%$#@!%$#@!!@#$% +249%$#@!在一回合内,连续闪现到4个不同的己方伟人身边%$#@!%$#@!%$#@!!@#$% +250%$#@![为您指引归途]%$#@!%$#@!%$#@!!@#$% +251%$#@!闪现到蕾米莉亚身边后,蕾米莉亚在该回合内死亡%$#@!%$#@!%$#@!!@#$% +252%$#@!口%$#@!%$#@!%$#@!!@#$% +253%$#@!关%$#@!%$#@!%$#@!!@#$% +254%$#@!EGYPT EMPIRE%$#@!%$#@!%$#@!!@#$% +255%$#@!奇观介绍%$#@!%$#@!%$#@!!@#$% +256%$#@!古代世界最大、最著名的图书馆,建于托勒密王朝时期的埃及,旨在收藏天下所有知识。后因战火与政治动荡多次焚毁。 + 在游戏中,作为知识类奇观,解锁全部科后即可获得,提供3点城市经验。%$#@!%$#@!%$#@!!@#$% +257%$#@!众人评价%$#@!%$#@!%$#@!!@#$% +258%$#@!蕾米莉亚和帕秋莉正在讨论。%$#@!%$#@!%$#@!!@#$% +259%$#@!七十万卷!你可别让小恶魔累死哦。传出去坏了我红魔馆的名声。%$#@!%$#@!%$#@!!@#$% +260%$#@!小恶魔很结实,何况她是自愿的。倒是某只老鼠可能会累死吧。%$#@!%$#@!%$#@!!@#$% +261%$#@!听说进了亚历山大港的船只,必须把书留下来,就像打劫一样呢。%$#@!%$#@!%$#@!!@#$% +262%$#@!若真如此,我还真希望黑白老鼠多来几趟。%$#@!%$#@!%$#@!!@#$% +263%$#@![雅典娜的居所]%$#@!%$#@!%$#@!!@#$% +264%$#@!累计建造10次%$#@!%$#@!%$#@!!@#$% +265%$#@![船过港,书且留]%$#@!%$#@!%$#@!!@#$% +266%$#@!在亚历山大港建造该奇观,必须靠近谷仓、港口和市中心%$#@!%$#@!%$#@!!@#$% +267%$#@![七十万卷遗梦]%$#@!%$#@!%$#@!!@#$% +268%$#@!伟人帕秋莉·诺蕾姬在该奇观上连续停留10回合%$#@!%$#@!%$#@!!@#$% +269%$#@!亚历山大图书馆%$#@!%$#@!%$#@!!@#$% +270%$#@!成就收集星({count}/100)%$#@!%$#@!%$#@!!@#$% +271%$#@!战斗成就%$#@!%$#@!%$#@!!@#$% +272%$#@!战斗成就(5/25)%$#@!%$#@!%$#@!!@#$% +273%$#@!奇观图鉴%$#@!%$#@!%$#@!!@#$% +274%$#@!成就图鉴%$#@!%$#@!%$#@!!@#$% +275%$#@![系统设置]%$#@!%$#@!%$#@!!@#$% +276%$#@!音乐音量%$#@!%$#@!%$#@!!@#$% +277%$#@!音效音量%$#@!%$#@!%$#@!!@#$% +278%$#@!显示提示%$#@!%$#@!%$#@!!@#$% +279%$#@!ON%$#@!%$#@!%$#@!!@#$% +280%$#@!OFF%$#@!%$#@!%$#@!!@#$% +281%$#@!语言%$#@!%$#@!%$#@!!@#$% +282%$#@!简体中文%$#@!%$#@!%$#@!!@#$% +283%$#@!English%$#@!%$#@!%$#@!!@#$% +284%$#@!关闭%$#@!%$#@!%$#@!!@#$% +285%$#@!退出%$#@!%$#@!%$#@!!@#$% +286%$#@!关于我们%$#@!%$#@!%$#@!!@#$% +287%$#@!出品 蕾米莉亚指挥部%$#@!%$#@!%$#@!!@#$% +288%$#@!原作 上海爱丽丝幻乐团%$#@!%$#@!%$#@!!@#$% +289%$#@!本作品为 东方project 的二次同人创作%$#@!%$#@!%$#@!!@#$% +290%$#@!关注我们%$#@!%$#@!%$#@!!@#$% +291%$#@!Youtube%$#@!%$#@!%$#@!!@#$% +292%$#@!@蕾米莉亚指挥部%$#@!%$#@!%$#@!!@#$% +293%$#@!Weibo%$#@!%$#@!%$#@!!@#$% +294%$#@!Bilibili%$#@!%$#@!%$#@!!@#$% +295%$#@!Discord%$#@!%$#@!%$#@!!@#$% +296%$#@!官方网站%$#@!%$#@!%$#@!!@#$% +297%$#@!www.remiliaComand.com%$#@!%$#@!%$#@!!@#$% +298%$#@!开发团队%$#@!%$#@!%$#@!!@#$% +299%$#@!版本信息%$#@!%$#@!%$#@!!@#$% +300%$#@!隐私政策%$#@!%$#@!%$#@!!@#$% +301%$#@!服务条款%$#@!%$#@!%$#@!!@#$% +302%$#@!少女加冕中...%$#@!%$#@!%$#@!!@#$% +303%$#@!卢克索神庙%$#@!%$#@!%$#@!!@#$% +304%$#@!孟菲斯老城%$#@!%$#@!%$#@!!@#$% +305%$#@!吉萨大金字塔%$#@!%$#@!%$#@!!@#$% +306%$#@!阿布辛贝大神庙%$#@!%$#@!%$#@!!@#$% +307%$#@!狮身人面像%$#@!%$#@!%$#@!!@#$% +308%$#@!奥里西斯神庙%$#@!%$#@!%$#@!!@#$% +309%$#@!枫丹白露宫%$#@!%$#@!%$#@!!@#$% +310%$#@!索邦大学%$#@!%$#@!%$#@!!@#$% +311%$#@!交易所广场%$#@!%$#@!%$#@!!@#$% +312%$#@!卢浮宫%$#@!%$#@!%$#@!!@#$% +313%$#@!凯旋门%$#@!%$#@!%$#@!!@#$% +314%$#@!巴黎圣母院%$#@!%$#@!%$#@!!@#$% +315%$#@!巴黎天文台%$#@!%$#@!%$#@!!@#$% +316%$#@!勃兰登堡门%$#@!%$#@!%$#@!!@#$% +317%$#@!海登堡大学%$#@!%$#@!%$#@!!@#$% +318%$#@!汉堡港口仓库城%$#@!%$#@!%$#@!!@#$% +319%$#@!新天鹅堡%$#@!%$#@!%$#@!!@#$% +320%$#@!柏林胜利纪念柱%$#@!%$#@!%$#@!!@#$% +321%$#@!拜罗伊特节日剧院%$#@!%$#@!%$#@!!@#$% +322%$#@!齐柏林飞艇基地%$#@!%$#@!%$#@!!@#$% +323%$#@!阿育王柱%$#@!%$#@!%$#@!!@#$% +324%$#@!那烂陀寺%$#@!%$#@!%$#@!!@#$% +325%$#@!亨比%$#@!%$#@!%$#@!!@#$% +326%$#@!泰姬陵%$#@!%$#@!%$#@!!@#$% +327%$#@!红堡%$#@!%$#@!%$#@!!@#$% +328%$#@!米纳克希神庙%$#@!%$#@!%$#@!!@#$% +329%$#@!简塔曼塔天文台%$#@!%$#@!%$#@!!@#$% diff --git a/Tools/PrintExcelString.py b/Tools/PrintExcelString.py new file mode 100644 index 000000000..ffe3350de --- /dev/null +++ b/Tools/PrintExcelString.py @@ -0,0 +1,46 @@ +import sys +import openpyxl +import os +from datetime import datetime + +def log(message): + print(f"[{datetime.now()}] {message}", file=sys.stderr) + +def convert_excel_to_txt(): + try: + excel_path = r"F:/th1new/Tools/Multilingual.xlsx" + txt_path = r"F:/th1new/Tools/MultilingualTxt.txt" + + # 读取Excel文件(跳过标题行) + wb = openpyxl.load_workbook(excel_path) + ws = wb.active + records = [] + for row in ws.iter_rows(min_row=2, values_only=True): + # 确保总是有5个字段,空值转为空字符串 + normalized_row = [str(cell).strip() if cell is not None else "" for cell in row] + if len(normalized_row) >= 5: # 只取前5列 + records.append(normalized_row[:5]) + else: # 不足5列则补齐空字符串 + records.append(normalized_row + [""]*(5-len(normalized_row))) + + if not records: + log("错误:Excel中没有有效数据") + return False + + # 写入TXT文件(使用指定分隔符格式) + os.makedirs(os.path.dirname(txt_path), exist_ok=True) + with open(txt_path, 'w', encoding='utf-8') as f: + for record in records: + # 确保总是5个字段,空字段也会保留分隔符 + line = '%$#@!'.join(field for field in record) + '!@#$%' + f.write(line) + + log(f"成功转换 {len(records)} 条记录到TXT") + return True + + except Exception as e: + log(f"转换失败: {str(e)}") + return False + +if __name__ == "__main__": + sys.exit(0 if convert_excel_to_txt() else 1) \ No newline at end of file