From 24fbbd7c4583edb0ed07554f91df31429eb5a631 Mon Sep 17 00:00:00 2001 From: Somebody Date: Sun, 14 Dec 2025 12:48:18 +0800 Subject: [PATCH] chore: add i18n text --- Common/Data/Excel/GridFightItemsExcel.cs | 1 + Common/Data/Excel/GridFightOrbExcel.cs | 1 + .../Message/LanguageCHS.cs | 22 ++ .../Message/LanguageCHT.cs | 69 ++-- .../Message/LanguageEN.cs | 295 +++++++++--------- .../Component/GridFightRoleComponent.cs | 4 +- Program/Handbook/HandbookGenerator.cs | 70 +++++ 7 files changed, 300 insertions(+), 162 deletions(-) diff --git a/Common/Data/Excel/GridFightItemsExcel.cs b/Common/Data/Excel/GridFightItemsExcel.cs index 393979aa..3d1387df 100644 --- a/Common/Data/Excel/GridFightItemsExcel.cs +++ b/Common/Data/Excel/GridFightItemsExcel.cs @@ -6,6 +6,7 @@ namespace EggLink.DanhengServer.Data.Excel; public class GridFightItemsExcel : ExcelResource { public uint ID { get; set; } + public HashName ItemName { get; set; } = new(); public override int GetId() { diff --git a/Common/Data/Excel/GridFightOrbExcel.cs b/Common/Data/Excel/GridFightOrbExcel.cs index 93d3705f..f98452e0 100644 --- a/Common/Data/Excel/GridFightOrbExcel.cs +++ b/Common/Data/Excel/GridFightOrbExcel.cs @@ -9,6 +9,7 @@ public class GridFightOrbExcel : ExcelResource { public uint BonusID { get; set; } public uint OrbID { get; set; } + public HashName OrbName { get; set; } = new(); [JsonConverter(typeof(StringEnumConverter))] public GridFightOrbTypeEnum Type { get; set; } diff --git a/Common/Internationalization/Message/LanguageCHS.cs b/Common/Internationalization/Message/LanguageCHS.cs index 6c2de77d..2cee6a29 100644 --- a/Common/Internationalization/Message/LanguageCHS.cs +++ b/Common/Internationalization/Message/LanguageCHS.cs @@ -130,6 +130,7 @@ public class CommandTextCHS public AccountTextCHS Account { get; } = new(); public UnstuckTextCHS Unstuck { get; } = new(); public SetlevelTextCHS Setlevel { get; } = new(); + public GridTextCHS Grid { get; } = new(); } #endregion @@ -474,6 +475,27 @@ public class SetlevelTextCHS public string SetlevelSuccess => "等级设定成功!"; } +/// +/// path: Game.Command.Grid +/// +public class GridTextCHS +{ + public string Desc => "管理货币战争内容,注意,此部分内容尚未完善,若有问题请及时反馈。\n此命令不一定会检查ID是否存在,若无效果,请检查参数是否正确"; + public string Usage => "用法:/grid gold [金币数量]\n\n" + + "用法:/grid role [角色ID] [角色星级]\n\n" + + "用法:/grid equip [装备ID]\n\n" + + "用法:/grid consumable [消耗品ID]\n\n" + + "用法:/grid orb [晶矿ID]"; + public string NotInGame => "不在货币战争中!"; + public string InvalidRole => "角色ID或星级不存在!"; + public string AddedRole => "已添加角色。"; + public string UpdateGold => "获得 {0} 个金币。"; + public string AddEquipment => "已添加 {0} 装备。"; + public string AddOrb => "已添加 {0} 晶矿。"; + public string AddConsumable => "已添加 {0} 消耗品。"; + public string EnterSection => "进入 {0}-{1}。"; +} + #endregion #endregion \ No newline at end of file diff --git a/Common/Internationalization/Message/LanguageCHT.cs b/Common/Internationalization/Message/LanguageCHT.cs index 43b684cd..a7a3ab0a 100644 --- a/Common/Internationalization/Message/LanguageCHT.cs +++ b/Common/Internationalization/Message/LanguageCHT.cs @@ -130,6 +130,7 @@ public class CommandTextCHT public AccountTextCHT Account { get; } = new(); public UnstuckTextCHT Unstuck { get; } = new(); public SetlevelTextCHT Setlevel { get; } = new(); + public GridTextCHT Grid { get; } = new(); } #endregion @@ -152,7 +153,7 @@ public class ServerInfoTextCHT public string Shutdown => "關閉中…"; public string CancelKeyPressed => "已按下取消鍵 (Ctrl + C),服務器即將關閉…"; public string StartingServer => "正在啟動 DanhengServer…"; - public string CurrentVersion => "當前服務端支援的版本: {0}"; + public string CurrentVersion => "當前服務端支持的版本: {0}"; public string LoadingItem => "正在加載 {0}…"; public string GeneratingItem => "正在生成 {0}…"; public string WaitingItem => "正在等待進程 {0} 完成…"; @@ -165,8 +166,8 @@ public class ServerInfoTextCHT public string LoadedItem => "已加載 {0}。"; public string LoadedItems => "已加載 {0} 個 {1}。"; public string ServerRunning => "{0} 服務器正在監聽 {1}"; - public string ServerStarted => "啟動完成!用時 {0}s,擊敗了99%的用戶,輸入 『help』 來獲取命令幫助"; // 玩梗,考慮英語版本將其本土化 - public string MissionEnabled => "任務系統已啟用,此功能仍在開發中,且可能不會按預期工作,如果遇見任何bug,請匯報給開發者。"; + public string ServerStarted => "啟動完成!用時 {0}s,擊敗了99%的用戶,輸入 ‘help’ 來獲取命令幫助"; // 玩梗,考慮英語版本將其本土化 + public string MissionEnabled => "任務系統已啟用,此功能仍在開發中,且可能不會按預期工作,如果遇見任何bug,請彙報給開發者。"; public string CacheLoadSkip => "已跳過緩存加載。"; public string ConfigMissing => "{0} 缺失,請檢查你的資源文件夾:{1},{2} 可能不能使用。"; @@ -192,7 +193,7 @@ public class NoticeTextCHT { public string PlayerNotFound => "未找到玩家!"; public string InvalidArguments => "無效的參數!"; - public string NoPermission => "你沒有權限這麽做!"; + public string NoPermission => "你沒有權限這麼做!"; public string CommandNotFound => "未找到命令! 輸入 '/help' 來獲取幫助"; public string TargetOffline => "目標 {0}({1}) 離線了!清除當前目標"; public string TargetFound => "找到目標 {0}({1}),下一次命令將默認對其執行"; @@ -206,7 +207,7 @@ public class NoticeTextCHT public class HeroTextCHT { public string Desc => - "切換主角的性別/形態\n當切換性別時,genderId為1代表男性,2代表女性\n當切換形態時,8001代表毀滅命途,8003代表存護命途,8005代表同諧命途。\n註意,切換性別時會清空所有可選命途以及行跡,為不可逆操作!"; + "切換主角的性別/形態\n當切換性別時,genderId為1代表男性,2代表女性\n當切換形態時,8001代表毀滅命途,8003代表存護命途,8005代表同諧命途。\n注意,切換性別時會清空所有可選命途以及行跡,為不可逆操作!"; public string Usage => "用法:/hero gender [genderId]\n\n用法:/hero type [typeId]"; public string GenderNotSpecified => "性別不存在!"; @@ -235,7 +236,7 @@ public class UnlockAllTextCHT /// public class AvatarTextCHT { - public string Desc => "設定玩家已有角色的屬性\n設置行跡等級時,設置X級即設置所有行跡節點至X級,若大於此節點允許的最高等級,設置為最高等級\n註意:-1意為所有已擁有角色"; + public string Desc => "設定玩家已有角色的屬性\n設置行跡等級時,設置X級即設置所有行跡節點至X級,若大於此節點允許的最高等級,設置為最高等級\n注意:-1意為所有已擁有角色"; public string Usage => "用法:/avatar talent [角色ID/-1] [行跡等級]\n\n用法:/avatar get [角色ID]\n\n用法:/avatar rank [角色ID/-1] [星魂]\n\n用法:/avatar level [角色ID/-1] [角色等級]"; @@ -264,10 +265,17 @@ public class GiveTextCHT /// public class GiveAllTextCHT { - public string Desc => "給予玩家全部指定類型的物品\navatar意為角色,equipment意為光錐,relic意為遺器,unlock意為氣泡、手機壁紙、頭像"; + public string Desc => + "給予玩家全部指定類型的物品\navatar意為角色,equipment意為光錐,relic意為遺器,unlock意為氣泡、手機壁紙、頭像,train意為開拓者房間內容,pet意為寵物,path意為多命途角色命途"; public string Usage => - "用法:/giveall avatar r<星魂> l<等級>\n\n用法:/giveall equipment r<疊影> l<等級> x<數量>\n\n用法:/giveall relic l<等級> x<數量>\n\n用法:/giveall unlock"; + "用法:/giveall avatar r<星魂> l<等級>\n\n" + + "用法:/giveall equipment r<疊影> l<等級> x<數量>\n\n" + + "用法:/giveall relic l<等級> x<數量>\n\n" + + "用法:/giveall unlock\n\n" + + "用法:/giveall train\n\n" + + "用法:/giveall pet\n\n" + + "用法:/giveall path"; public string GiveAllItems => "已給予所有 {0}, 各 {1} 個"; } @@ -280,7 +288,7 @@ public class LineupTextCHT public string Desc => "管理玩家的隊伍\n秘技點一次性只能獲得兩個"; public string Usage => "用法:/lineup mp [秘技點數量]\n\n用法:/lineup heal"; public string PlayerGainedMp => "玩家已獲得 {0} 秘技點"; - public string HealedAllAvatars => "成功治愈當前隊伍中的所有角色"; + public string HealedAllAvatars => "成功治癒當前隊伍中的所有角色"; } /// @@ -312,12 +320,14 @@ public class MissionTextCHT { public string Desc => "管理玩家的任務\n" + - "使用 pass 完成當前正在進行的所有任務,此命令易造成嚴重卡頓,請盡量使用 /mission finish 替代\n" + - "使用 running 獲取正在進行的任務以及可能卡住的任務,使用後可能會出現較長任務列表,請註意甄別\n" + - "使用 reaccept 可重新進行指定主任務,請瀏覽 handbook 來獲取主任務ID"; + "使用 pass 完成當前正在進行的所有任務,此命令易造成嚴重卡頓,請儘量使用 /mission finish 替代\n" + + "使用 finish [子任務ID] 完成指定子任務,請瀏覽 handbook 來獲取子任務ID\n" + + "使用 finishmain [主任務ID] 完成指定主任務,請瀏覽 handbook 來獲取主任務ID\n" + + "使用 running <-all> 獲取正在追蹤的任務,增加'-all'則顯示所有正在進行的任務以及可能卡住的任務,使用後可能會出現較長任務列表,請注意甄別\n" + + "使用 reaccept [主任務ID] 可重新進行指定主任務,請瀏覽 handbook 來獲取主任務ID"; public string Usage => - "用法:/mission pass\n\n用法:/mission finish [子任務ID]\n\n用法:/mission running\n\n用法:/mission reaccept [主任務ID]"; + "用法:/mission pass\n\n用法:/mission finish [子任務ID]\n\n用法:/mission running <-all>\n\n用法:/mission reaccept [主任務ID]\n\n用法:/mission finishmain [主任務ID]"; public string AllMissionsFinished => "所有任務已完成!"; public string AllRunningMissionsFinished => "共 {0} 個進行中的任務已完成!"; @@ -337,7 +347,7 @@ public class MissionTextCHT /// public class RelicTextCHT { - public string Desc => "管理玩家的遺器\n主詞條可選,副詞條可選,但至少存在其中之一\n等級限製:1≤等級≤9999"; + public string Desc => "管理玩家的遺器\n主詞條可選,副詞條可選,但至少存在其中之一\n等級限制:1≤等級≤9999"; public string Usage => "用法:/relic <遺器ID> <主詞條ID> <小詞條ID1:小詞條等級> <小詞條ID2:小詞條等級> <小詞條ID3:小詞條等級> <小詞條ID4:小詞條等級> l<等級> x<數量>"; @@ -385,7 +395,7 @@ public class SceneTextCHT { public string Desc => "管理玩家場景\n" + - "提示:此組大多為調試使用,使用命令前,請確保你清楚你在做什麽!\n" + + "提示:此組大多為調試使用,使用命令前,請確保你清楚你在做什麼!\n" + "使用 prop 來設置道具狀態,在Common/Enums/Scene/PropStateEnum.cs獲取狀態列表\n" + "使用 unlockall 來解鎖場景內所有道具(即將所有能設置為open狀態的道具設置為open狀態),此命令有較大可能會導致遊戲加載卡條約90%,使用 /scene reset 來解決問題\n" + "使用 change 來進入指定場景,要獲取EntryId,請訪問 Resources/MapEntrance.json\n" + @@ -433,8 +443,8 @@ public class RaidTextCHT /// public class AccountTextCHT { - public string Desc => "創建賬號\n註意:此命令未經測試,請謹慎使用!"; - public string Usage => "用法:/account create <用戶名>"; + public string Desc => "創建賬號\n注意:此命令未經測試,請謹慎使用!"; + public string Usage => "用法:/account create [用戶名]"; public string InvalidUid => "無效UID參數!"; public string CreateError => "出現內部錯誤 {0} "; public string CreateSuccess => "新賬號 {0} 創建成功!"; @@ -449,7 +459,7 @@ public class AccountTextCHT public class UnstuckTextCHT { public string Desc => "將玩家傳送回默認場景"; - public string Usage => "用法:/unstuck "; + public string Usage => "用法:/unstuck [UID]"; public string UnstuckSuccess => "已成功將該玩家傳送回默認場景"; public string UidNotExist => "該UID不存在!"; public string PlayerIsOnline => "該玩家目前在線上!"; @@ -461,10 +471,31 @@ public class UnstuckTextCHT public class SetlevelTextCHT { public string Desc => "設定玩家等級"; - public string Usage => "用法:/setlevel <等級>"; + public string Usage => "用法:/setlevel [等級]"; public string SetlevelSuccess => "等級設定成功!"; } +/// +/// path: Game.Command.Grid +/// +public class GridTextCHT +{ + public string Desc => "管理貨幣戰爭內容,注意,此部分內容尚未完善,若有問題請及時反饋。\n此命令不一定會檢查ID是否存在,若無效果,請檢查參數是否正確"; + public string Usage => "用法:/grid gold [金幣數量]\n\n" + + "用法:/grid role [角色ID] [角色星級]\n\n" + + "用法:/grid equip [裝備ID]\n\n" + + "用法:/grid consumable [消耗品ID]\n\n" + + "用法:/grid orb [晶礦ID]"; + public string NotInGame => "不在貨幣戰爭中!"; + public string InvalidRole => "角色ID或星級不存在!"; + public string AddedRole => "已添加角色。"; + public string UpdateGold => "獲得 {0} 個金幣。"; + public string AddEquipment => "已添加 {0} 裝備。"; + public string AddOrb => "已添加 {0} 晶礦。"; + public string AddConsumable => "已添加 {0} 消耗品。"; + public string EnterSection => "進入 {0}-{1}。"; +} + #endregion #endregion \ No newline at end of file diff --git a/Common/Internationalization/Message/LanguageEN.cs b/Common/Internationalization/Message/LanguageEN.cs index 1bd1889e..47c08e53 100644 --- a/Common/Internationalization/Message/LanguageEN.cs +++ b/Common/Internationalization/Message/LanguageEN.cs @@ -35,19 +35,19 @@ public class ServerTextEN /// public class WordTextEN { - public string Rank => "Rank"; + public string Rank => "Eidolon"; public string Avatar => "Avatar"; public string Material => "Material"; public string Pet => "Pet"; public string Relic => "Relic"; public string Equipment => "Light Cone"; - public string Talent => "Talent"; - public string Banner => "Gacha"; - public string VideoKeys => "CG Keys"; + public string Talent => "Trace"; + public string Banner => "Banner"; + public string VideoKeys => "Video Keys"; public string Activity => "Activity"; public string Buff => "Blessing"; public string Miracle => "Curio"; - public string Unlock => "Luxury"; + public string Unlock => "Luxury Item"; // server info public string Config => "Config File"; @@ -67,8 +67,8 @@ public class WordTextEN public string Error => "Error"; public string FloorInfo => "Floor File"; public string FloorGroupInfo => "Floor Group File"; - public string FloorMissingResult => "Teleportation and World Generation"; - public string FloorGroupMissingResult => "Teleportation, Monster Battles, and World Generation"; + public string FloorMissingResult => "Teleport & World Generation"; + public string FloorGroupMissingResult => "Teleport, Monster Battle & World Generation"; public string Mission => "Mission"; public string MissionInfo => "Mission File"; public string SubMission => "Sub Mission"; @@ -83,12 +83,12 @@ public class WordTextEN public string RogueChestMapInfo => "Simulated Universe Map File"; public string ChessRogueRoom => "Simulated Universe DLC"; public string ChessRogueRoomInfo => "Simulated Universe DLC File"; - public string SummonUnit => "Summon Unit"; - public string SummonUnitInfo => "Summon Unit File"; - public string RogueTournRoom => "Divergent Rogue Room"; - public string RogueTournRoomInfo => "Divergent Rogue Room File"; - public string TypesOfRogue => "types of rogue"; - public string RogueMagicRoom => "Unknowable Domain Room"; + public string SummonUnit => "Skill Summon"; + public string SummonUnitInfo => "Skill Summon File"; + public string RogueTournRoom => "Divergent Universe"; + public string RogueTournRoomInfo => "Divergent Universe Room File"; + public string TypesOfRogue => "Types of Simulated Universe"; + public string RogueMagicRoom => "Unknowable Domain"; public string RogueMagicRoomInfo => "Unknowable Domain Room File"; public string RogueDiceSurface => "Dice Surface Effect"; public string RogueDiceSurfaceInfo => "Dice Surface Effect File"; @@ -130,18 +130,19 @@ public class CommandTextEN public AccountTextEN Account { get; } = new(); public UnstuckTextEN Unstuck { get; } = new(); public SetlevelTextEN Setlevel { get; } = new(); + public GridTextEN Grid { get; } = new(); } #endregion -#region ServerTextEN +#region ServerText /// /// path: Server.Web /// public class WebTextEN { - public string Maintain => "The server is undergoing maintenance, please try again later."; + public string Maintain => "The server is under maintenance. Please try again later."; } /// @@ -150,39 +151,29 @@ public class WebTextEN public class ServerInfoTextEN { public string Shutdown => "Shutting down..."; - public string CancelKeyPressed => "Cancel key pressed (Ctrl + C), server shutting down..."; - public string CurrentVersion => "Server supported versions: {0}"; + public string CancelKeyPressed => "Cancel key (Ctrl + C) pressed. The server will shut down shortly..."; public string StartingServer => "Starting DanhengServer..."; + public string CurrentVersion => "Current server-supported version: {0}"; public string LoadingItem => "Loading {0}..."; - public string GeneratingItem => "Building {0}..."; + public string GeneratingItem => "Generating {0}..."; public string WaitingItem => "Waiting for process {0} to complete..."; - public string RegisterItem => "Registered {0} {1}(s)."; + public string RegisterItem => "Registered {0} {1}."; public string FailedToLoadItem => "Failed to load {0}."; - - public string NewClientSecretKey => - "Client Secret Key does not exist and a new Client Secret Key is being generated."; - + public string NewClientSecretKey => "Client secret key does not exist. Generating a new client secret key."; public string FailedToInitializeItem => "Failed to initialize {0}."; - public string FailedToReadItem => "Failed to read {0}, file {1}"; + public string FailedToReadItem => "Failed to read {0}. File {1}"; public string GeneratedItem => "Generated {0}."; public string LoadedItem => "Loaded {0}."; - public string LoadedItems => "Loaded {0} {1}(s)."; - public string ServerRunning => "{0} server listening on {1}"; + public string LoadedItems => "Loaded {0} {1}."; + public string ServerRunning => "{0} server is listening on {1}"; + public string ServerStarted => "Startup complete! Took {0}s, beating 99% of users. Type 'help' for command help."; // Localized the joke for English version + public string MissionEnabled => "Mission system enabled. This feature is still under development and may not work as expected. If you encounter any bugs, please report them to the developers."; + public string CacheLoadSkip => "Cache loading skipped."; - public string ServerStarted => - "Startup complete! Took {0}s, better than 99% of users. Type 'help' for command help"; // This is a meme, consider localizing in English - - public string MissionEnabled => - "Mission system enabled. This feature is still in development and may not work as expected. Please report any bugs to the developers."; - - public string CacheLoadSkip => "Skipped cache loading."; - - public string ConfigMissing => "{0} is missing. Please check your resource folder: {1}, {2} may not be available."; + public string ConfigMissing => "{0} is missing. Please check your resource folder: {1}. {2} may not be available."; public string UnloadedItems => "Unloaded all {0}."; - public string SaveDatabase => "Database saved in {0}s"; - - public string WaitForAllDone => - "You cannot enter the game yet. Please wait for all items to load before trying again"; + public string SaveDatabase => "Saved database. Took {0}s"; + public string WaitForAllDone => "Cannot enter the game yet. Please wait until all items are loaded before trying again."; public string UnhandledException => "An unhandled exception occurred: {0}"; } @@ -202,12 +193,12 @@ public class NoticeTextEN { public string PlayerNotFound => "Player not found!"; public string InvalidArguments => "Invalid arguments!"; - public string NoPermission => "You do not have permission to do this!"; - public string CommandNotFound => "Command not found! Type '/help' to get help."; + public string NoPermission => "You do not have permission to do that!"; + public string CommandNotFound => "Command not found! Type '/help' for help"; + public string TargetOffline => "Target {0}({1}) is offline! Clearing current target"; + public string TargetFound => "Target {0}({1}) found. Next command will target them by default."; public string TargetNotFound => "Target {0} not found!"; - public string TargetOffline => "Target {0}({1}) is offline! Clear the target."; - public string TargetFound => "Online player {0}({1}) is found, the next command will target it by default."; - public string InternalError => "An error occurred while executing the command!"; + public string InternalError => "An internal error occurred while processing the command!"; } /// @@ -216,14 +207,13 @@ public class NoticeTextEN public class HeroTextEN { public string Desc => - "Switch the gender/type of the main character\nWhen switch the gender, 1 means male, 2 means female\nWhen switch the type(path), 8001 means Destruction, 8003 means Preservation, 8005 means Harmony.\nNotice: Switch gender will clear all the paths and talents of main character, this operation is irreversible!"; + "Switch the main character's gender/form.\nWhen switching gender, genderId 1 represents male, 2 represents female.\nWhen switching form, 8001 represents Destruction Path, 8003 represents Preservation Path, 8005 represents Harmony Path.\nNote: Switching gender will clear all optional Paths and Traces, and this operation is irreversible!"; public string Usage => "Usage: /hero gender [genderId]\n\nUsage: /hero type [typeId]"; - public string GenderNotSpecified => "Gender does not exist!"; - public string HeroTypeNotSpecified => "Main character type does not exist!"; - public string GenderChanged => "Gender has been changed!"; - public string HeroTypeChanged => "Main character type has been changed!"; + public string HeroTypeNotSpecified => "Hero type does not exist!"; + public string GenderChanged => "Gender changed!"; + public string HeroTypeChanged => "Hero type changed!"; } /// @@ -232,13 +222,13 @@ public class HeroTextEN public class UnlockAllTextEN { public string Desc => - "Unlock the objects in given category\n" + - "Use '/unlockall mission' to finish all missions, and the target player will be kicked, after re-login, the player may be stuck in tutorial, please use with caution" + - "Use '/unlockall tutorial' to unlock all tutorials, and the target player will be kicked, used for being stuck in some pages\n" + - "Use '/unlockall rogue' to unlock all types of rogue, and the target player will be kicked, used with '/unlockall tutorial' to get better performance"; + "Unlock all objects within the category.\n" + + "Use /unlockall mission to complete all missions. You will be kicked after use, and may get stuck in the tutorial upon re-login. Use with caution.\n" + + "Use /unlockall tutorial to unlock all tutorials. You will be kicked after use. Use for situations where the interface is stuck and you cannot act.\n" + + "Use /unlockall rogue to unlock all types of Simulated Universe. You will be kicked after use. Recommended to use with /unlockall tutorial for better results."; - public string Usage => "Usage:/unlockall [mission/tutorial/rogue]"; - public string UnlockedAll => "Unlocked/Finished All {0}!"; + public string Usage => "Usage: /unlockall [mission/tutorial/rogue]"; + public string UnlockedAll => "Unlocked/completed all {0}!"; } /// @@ -246,18 +236,17 @@ public class UnlockAllTextEN /// public class AvatarTextEN { - public string Desc => - "Set the properties of the avatars player owned\nWhen set talent level, set to X level means set all talent point to X level, if greater than the point max level, set to max level\nNotice: -1 means all owned avatars"; + public string Desc => "Set properties for player's owned avatars.\nWhen setting trace level, setting to level X sets all trace nodes to level X. If greater than the node's max allowed level, sets to max level.\nNote: -1 means all owned avatars."; public string Usage => - "Usage: /avatar talent [Avatar ID/-1] [Talent Level]\n\nUsage: /avatar get [Avatar ID]\n\nUsage: /avatar rank [Avatar ID/-1] [Rank]\n\nUsage: /avatar level [Avatar ID/-1] [Avatar Level]"; + "Usage: /avatar talent [AvatarID/-1] [Trace Level]\n\nUsage: /avatar get [AvatarID]\n\nUsage: /avatar rank [AvatarID/-1] [Eidolon]\n\nUsage: /avatar level [AvatarID/-1] [Avatar Level]"; public string InvalidLevel => "Invalid {0} level"; - public string AllAvatarsLevelSet => "Set all characters' {0} level to {1}"; - public string AvatarLevelSet => "Set character {0}'s {1} level to {2}"; - public string AvatarNotFound => "Character does not exist!"; - public string AvatarGet => "Obtained character {0}!"; - public string AvatarFailedGet => "Failed to obtain character {0}!"; + public string AllAvatarsLevelSet => "Set all avatars' {0} level to {1}"; + public string AvatarLevelSet => "Set avatar {0}'s {1} level to {2}"; + public string AvatarNotFound => "Avatar does not exist!"; + public string AvatarGet => "Obtained avatar {0}!"; + public string AvatarFailedGet => "Failed to obtain avatar {0}!"; } /// @@ -265,10 +254,10 @@ public class AvatarTextEN /// public class GiveTextEN { - public string Desc => "Give player items, item id can be avatar id, but cant set level, talent, rank"; - public string Usage => "Usage: /give [item ID] l x r"; + public string Desc => "Give items to the player. Avatar IDs can be entered here, but traces, levels, and eidolons cannot be set."; + public string Usage => "Usage: /give l x r"; public string ItemNotFound => "Item not found!"; - public string GiveItem => "Gave @{0} {1} item(s) {2}"; + public string GiveItem => "Gave @{0} {1} of item {2}"; } /// @@ -277,12 +266,18 @@ public class GiveTextEN public class GiveAllTextEN { public string Desc => - "Give the player all specified types of items\navatar means characters, equipment means light cones, relic means relic(artifact), unlock means chatBubbles, avatar(head icon), wallpaper"; + "Give the player all items of the specified type.\navatar means characters, equipment means Light Cones, relic means relics, unlock means chat bubbles, phone wallpapers, avatars, train means Trailblazer's room contents, pet means pets, path means Paths for multi-Path characters."; public string Usage => - "Usage: /giveall avatar r l\n\nUsage: /giveall equipment r l x\n\nUsage: /giveall relic l x\n\nUsage: /giveall unlock"; + "Usage: /giveall avatar r l\n\n" + + "Usage: /giveall equipment r l x\n\n" + + "Usage: /giveall relic l x\n\n" + + "Usage: /giveall unlock\n\n" + + "Usage: /giveall train\n\n" + + "Usage: /giveall pet\n\n" + + "Usage: /giveall path"; - public string GiveAllItems => "Gave all {0}, each {1} items"; + public string GiveAllItems => "Gave all {0}, {1} each"; } /// @@ -290,10 +285,10 @@ public class GiveAllTextEN /// public class LineupTextEN { - public string Desc => "Manage player's lineup\nTechnique Point can gain 2 each time"; - public string Usage => "Usage: /lineup mp [amount]\n\nUsage: /lineup heal"; - public string PlayerGainedMp => "Player gained {0} Technique Points"; - public string HealedAllAvatars => "Successfully healed all characters in the current lineup"; + public string Desc => "Manage the player's lineup.\nMaze points can only be obtained two at a time."; + public string Usage => "Usage: /lineup mp [Maze Point Amount]\n\nUsage: /lineup heal"; + public string PlayerGainedMp => "Player gained {0} Maze Points"; + public string HealedAllAvatars => "Successfully healed all avatars in the current lineup"; } /// @@ -302,11 +297,10 @@ public class LineupTextEN public class HelpTextEN { public string Desc => "Show help information"; - public string Usage => "Usage: /help\n\nUsage: /help [cmd]"; + public string Usage => "Usage: /help\n\nUsage: /help [command]"; public string Commands => "Commands:"; - public string CommandUsage => "Usage: "; - public string CommandPermission => "Need Permission: "; - public string CommandAlias => "Command Alias:"; + public string CommandPermission => "Required Permission: "; + public string CommandAlias => "Command Aliases: "; } /// @@ -314,9 +308,9 @@ public class HelpTextEN /// public class KickTextEN { - public string Desc => "Kick out player"; + public string Desc => "Kick a player"; public string Usage => "Usage: /kick"; - public string PlayerKicked => "Player {0} has been kicked out!"; + public string PlayerKicked => "Player {0} has been kicked!"; } /// @@ -325,27 +319,27 @@ public class KickTextEN public class MissionTextEN { public string Desc => - "Manage player's missions\n" + - "Use 'pass' to finish all running mission, this command will cause severe lagging, please use '/mission finish' instead\n" + - "Use 'finish [SubMissionID]' to finish certain sub-mission,please find sub-mission id in handbook\n" + - "Use 'finishmain [MainMissionID]' to finish certain main mission,please find main mission id in handbook\n" + - "Use 'running <-all>' to get the tracking mission, adding '-all' shows all running mission and possible stuck missions, after use, a longer mission list may appear, please note that\n" + - "Use 'reaccept' to re-accept given main mission, please find main mission id in handbook"; + "Manage player's missions.\n" + + "Use pass to complete all currently ongoing missions. This command can cause severe lag. Try to use /mission finish instead.\n" + + "Use finish [SubMissionID] to complete a specific sub mission. Please browse the handbook for SubMissionID.\n" + + "Use finishmain [MainMissionID] to complete a specific main mission. Please browse the handbook for MainMissionID.\n" + + "Use running <-all> to get tracked missions. Add '-all' to show all ongoing and potentially stuck missions. This may produce a long list, please review carefully.\n" + + "Use reaccept [MainMissionID] to restart a specific main mission. Please browse the handbook for MainMissionID."; public string Usage => - "Usage: /mission pass\n\nUsage: /mission finish [Sub mission ID]\n\nUsage: /mission running\n\nUsage: /mission reaccept [main mission id]"; + "Usage: /mission pass\n\nUsage: /mission finish [SubMissionID]\n\nUsage: /mission running <-all>\n\nUsage: /mission reaccept [MainMissionID]\n\nUsage: /mission finishmain [MainMissionID]"; - public string AllMissionsFinished => "All tasks have been completed!"; - public string AllRunningMissionsFinished => "A total of {0} ongoing tasks have been completed!"; - public string MissionFinished => "Task {0} has been completed!"; - public string InvalidMissionId => "Invalid task ID!"; - public string NoRunningMissions => "No ongoing tasks!"; + public string AllMissionsFinished => "All missions finished!"; + public string AllRunningMissionsFinished => "Total {0} ongoing missions finished!"; + public string MissionFinished => "Mission {0} finished!"; + public string InvalidMissionId => "Invalid mission ID!"; + public string NoRunningMissions => "No ongoing missions!"; - public string RunningMissions => "Ongoing tasks:"; - public string PossibleStuckMissions => "Possibly stuck tasks:"; - public string MainMission => "Main task"; + public string RunningMissions => "Ongoing Missions:"; + public string PossibleStuckMissions => "Potentially Stuck Missions:"; + public string MainMission => "Main Mission"; - public string MissionReAccepted => "Reaccepted task {0}!"; + public string MissionReAccepted => "Re-accepted mission {0}!"; } /// @@ -353,16 +347,15 @@ public class MissionTextEN /// public class RelicTextEN { - public string Desc => - "Manage player's relics\nmain affix optional, sub affix optional, but at least one of them exists\nLevel limit: 1≤Level≤9999"; + public string Desc => "Manage player's relics.\nMain stat is optional, sub stats are optional, but at least one must exist.\nLevel restriction: 1 ≤ Level ≤ 9999."; public string Usage => - "Usage: /relic
l x"; + "Usage: /relic l x"; - public string RelicNotFound => "Relic does not exist!"; + public string RelicNotFound => "Relic not found!"; public string InvalidMainAffixId => "Invalid main affix ID"; public string InvalidSubAffixId => "Invalid sub affix ID"; - public string RelicGiven => "Gave player @{0} {1} relic(s) {2}, main affix {3}"; + public string RelicGiven => "Gave player @{0} {1} relic(s) {2}, main stat {3}"; } /// @@ -370,9 +363,9 @@ public class RelicTextEN /// public class ReloadTextEN { - public string Desc => "Reload specified configuration\nConfig Name: banner - Gacha Pool, activity"; + public string Desc => "Reload specified configuration.\nConfiguration names: banner - banners, activity - activities"; public string Usage => "Usage: /reload "; - public string ConfigReloaded => "Configuration {0} has been reloaded!"; + public string ConfigReloaded => "Configuration {0} reloaded!"; } /// @@ -380,20 +373,19 @@ public class ReloadTextEN /// public class RogueTextEN { - public string Desc => - "Manage player's data in the simulated universe\n-1 means all blessings (all owned blessings)\nUse 'buff' to get blessings\nUse 'enhance' to enhance blessings"; + public string Desc => "Manage player's Simulated Universe data.\n-1 means all blessings (owned blessings).\nUse buff to obtain blessings.\nUse enhance to enhance blessings."; public string Usage => - "Usage: /rogue money [Universe Debris Amount]\n\nUsage: /rogue buff [Blessing Id/-1]\n\nUsage: /rogue miracle [Miracle ID]\n\nUsage: /rogue enhance [Blessing ID/-1]\n\nUsage: /rogue unstuck - Leave event"; + "Usage: /rogue money [Cosmic Fragment amount]\n\nUsage: /rogue buff [BlessingID/-1]\n\nUsage: /rogue miracle [CurioID]\n\nUsage: /rogue enhance [BlessingID/-1]\n\nUsage: /rogue unstuck - Leave event"; - public string PlayerGainedMoney => "Player gained {0} universe debris"; + public string PlayerGainedMoney => "Player gained {0} Cosmic Fragments"; public string PlayerGainedAllItems => "Player gained all {0}"; public string PlayerGainedItem => "Player gained {0} {1}"; public string PlayerEnhancedBuff => "Player enhanced blessing {0}"; public string PlayerEnhancedAllBuffs => "Player enhanced all blessings"; - public string PlayerUnstuck => "Player unstuck from event"; + public string PlayerUnstuck => "Player left the event"; public string NotFoundItem => "{0} not found!"; - public string PlayerNotInRogue => "Player is not in the simulated universe!"; + public string PlayerNotInRogue => "Player is not in Simulated Universe!"; } /// @@ -402,27 +394,27 @@ public class RogueTextEN public class SceneTextEN { public string Desc => - "Manage player scenes\n" + - "Note: Most commands in this group are for debugging purposes. Please ensure you understand what you are doing before using any command.\n" + - "Use 'prop' to set the state of a prop. For a list of states, refer to Common/Enums/Scene/PropStateEnum.cs\n" + - "Use 'unlockall' to unlock all props in the scene (i.e., set all props that can be opened to the 'open' state). This command may cause the game to load to about 90%. Use '/scene reset ' to resolve this issue.\n" + - "Use 'change' to enter a specified scene. For EntryId, refer to Resources/MapEntrance.json\n" + - "Use 'reload' to reload the current scene and return to the initial position.\n" + - "Use 'reset' to reset the state of all props in the specified scene. For the current FloorId, use '/scene cur'."; + "Manage player's scene.\n" + + "Note: Most of these are for debugging. Before using commands, ensure you know what you are doing!\n" + + "Use prop to set prop state. Get state list from Common/Enums/Scene/PropStateEnum.cs.\n" + + "Use unlockall to unlock all props in the scene (set all props that can be set to open state to open). This command may cause the game to load stuck at about 90%. Use /scene reset to solve.\n" + + "Use change to enter a specific scene. To get EntryId, visit Resources/MapEntrance.json.\n" + + "Use reload to reload the current scene and return to the starting position.\n" + + "Use reset to reset all prop states in a specified scene. To get current FloorId, use /scene cur."; public string Usage => - "Usage: /scene prop [groupId] [propId] [state]\n\nUsage: /scene remove [entityId]\n\nUsage: /scene unlockall\n\nUsage: /scene change [entryId]\n\nUsage: /scene reload\n\nUsage: /scene reset "; + "Usage: /scene prop [GroupID] [PropID] [State]\n\nUsage: /scene remove [EntityID]\n\nUsage: /scene unlockall\n\nUsage: /scene change [entryId]\n\nUsage: /scene reload\n\nUsage: /scene reset "; public string LoadedGroups => "Loaded groups: {0}"; public string PropStateChanged => "Prop: {0} state set to {1}"; public string PropNotFound => "Prop not found!"; - public string EntityRemoved => "Entity {0} has been removed"; + public string EntityRemoved => "Entity {0} removed"; public string EntityNotFound => "Entity not found!"; - public string AllPropsUnlocked => "All props have been unlocked!"; + public string AllPropsUnlocked => "All props unlocked!"; public string SceneChanged => "Entered scene {0}"; - public string SceneReloaded => "Scene has been reloaded!"; - public string SceneReset => "The prop state in floor {0} has been reset!"; - public string CurrentScene => "Current Scene Entry Id: {0}, Plane Id: {1}, Floor Id: {2}"; + public string SceneReloaded => "Scene reloaded!"; + public string SceneReset => "Reset all prop states in scene {0}!"; + public string CurrentScene => "Current scene Entry Id: {0}, Plane Id: {1}, Floor Id: {2}"; } /// @@ -430,12 +422,10 @@ public class SceneTextEN /// public class MailTextEN { - public string Desc => "Manage player's mails"; - - public string Usage => "Usage: /mail [senderName] [templateId] [expiryDays] _TITLE [title] _CONTENT [content]"; - - public string MailSent => "Mail has been sent!"; - public string MailSentWithAttachment => "Mail with attachments has been sent!"; + public string Desc => "Manage player's mail"; + public string Usage => "Usage: /mail [Sender Name] [TemplateID] [Expire Days] _TITLE [Title] _CONTENT [Content]"; + public string MailSent => "Mail sent!"; + public string MailSentWithAttachment => "Mail with attachment sent!"; } /// @@ -443,9 +433,9 @@ public class MailTextEN /// public class RaidTextEN { - public string Desc => "Manage player's temporary scene"; - public string Usage => "Usage: /raid leave - leave temporary scene"; - public string Leaved => "Leaved temporary scene!"; + public string Desc => "Manage player's mission temporary scene"; + public string Usage => "Usage: /raid leave - Leave temporary scene"; + public string Leaved => "Left temporary scene!"; } /// @@ -453,14 +443,14 @@ public class RaidTextEN /// public class AccountTextEN { - public string Desc => "Create an account\nNote: This command is untested, use with caution!"; - public string Usage => "Usage: /account create "; - public string InvalidUid => "Invalid UID argument!"; - public string CreateError => "An internal error occurred {0}"; + public string Desc => "Create an account.\nNote: This command is untested. Use with caution!"; + public string Usage => "Usage: /account create [Username]"; + public string InvalidUid => "Invalid UID parameter!"; + public string CreateError => "Internal error occurred {0} "; public string CreateSuccess => "New account {0} created successfully!"; public string DuplicateAccount => "Account {0} already exists!"; public string DuplicateUID => "UID {0} already exists!"; - public string DataError => "Failed to retrieve new account! {0}!"; + public string DataError => "Failed to get new account data! {0}!"; } /// @@ -468,11 +458,11 @@ public class AccountTextEN /// public class UnstuckTextEN { - public string Desc => "Teleport player back to default location"; - public string Usage => "Usage: /unstuck "; - public string UnstuckSuccess => "Successfully teleported the player back to default location"; - public string UidNotExist => "The UID does not exist!"; - public string PlayerIsOnline => "The player is online!"; + public string Desc => "Teleport the player back to the default scene"; + public string Usage => "Usage: /unstuck [UID]"; + public string UnstuckSuccess => "Successfully teleported the player back to the default scene"; + public string UidNotExist => "This UID does not exist!"; + public string PlayerIsOnline => "The player is currently online!"; } /// @@ -481,8 +471,29 @@ public class UnstuckTextEN public class SetlevelTextEN { public string Desc => "Set player level"; - public string Usage => "Usage: /setlevel "; - public string SetlevelSuccess => "Successfully set player level!"; + public string Usage => "Usage: /setlevel [Level]"; + public string SetlevelSuccess => "Level set successfully!"; +} + +/// +/// path: Game.Command.Grid +/// +public class GridTextEN +{ + public string Desc => "Manage Aetherium War content. Note: This part is not yet fully developed. Please report any issues promptly.\nThis command may not check if IDs exist. If it has no effect, please check if parameters are correct."; + public string Usage => "Usage: /grid gold [Gold Amount]\n\n" + + "Usage: /grid role [RoleID] [Role Star]\n\n" + + "Usage: /grid equip [EquipmentID]\n\n" + + "Usage: /grid consumable [ConsumableID]\n\n" + + "Usage: /grid orb [OrbID]"; + public string NotInGame => "Not in Aetherium War!"; + public string InvalidRole => "Role ID or Star does not exist!"; + public string AddedRole => "Role added."; + public string UpdateGold => "Gained {0} Gold."; + public string AddEquipment => "Added {0} equipment."; + public string AddOrb => "Added {0} orb."; + public string AddConsumable => "Added {0} consumable."; + public string EnterSection => "Entered {0}-{1}."; } #endregion diff --git a/GameServer/Game/GridFight/Component/GridFightRoleComponent.cs b/GameServer/Game/GridFight/Component/GridFightRoleComponent.cs index 40a6cd97..f3c6558c 100644 --- a/GameServer/Game/GridFight/Component/GridFightRoleComponent.cs +++ b/GameServer/Game/GridFight/Component/GridFightRoleComponent.cs @@ -444,7 +444,9 @@ public class GridFightRoleComponent(GridFightInstance inst) : BaseGridFightCompo var role = Data.Roles.FirstOrDefault(x => x.UniqueId == pos.UniqueId); if (role == null) continue; - if (Data.Roles.Where(x => x.UniqueId != pos.UniqueId && x.Pos <= PrepareAreaPos).Any(x => x.RoleId == role.RoleId)) + if (Data.Roles.Where(x => x.UniqueId != pos.UniqueId && x.Pos <= PrepareAreaPos).Any(x => + GameData.GridFightRoleBasicInfoData.GetValueOrDefault(x.RoleId)?.AvatarID == + GameData.GridFightRoleBasicInfoData.GetValueOrDefault(role.RoleId)?.AvatarID)) return Retcode.RetGridFightSameRoleInBattle; } // only check role diff --git a/Program/Handbook/HandbookGenerator.cs b/Program/Handbook/HandbookGenerator.cs index 73d2b02a..8313dcae 100644 --- a/Program/Handbook/HandbookGenerator.cs +++ b/Program/Handbook/HandbookGenerator.cs @@ -114,6 +114,26 @@ public static class HandbookGenerator builder.AppendLine(); GenerateRogueMiracleDisplay(builder, textMap, fallbackTextMap, lang == config.ServerOption.Language); + builder.AppendLine(); + builder.AppendLine("#CurrencyWarRole"); + builder.AppendLine(); + GenerateCurrencyWarRole(builder, textMap, fallbackTextMap); + + builder.AppendLine(); + builder.AppendLine("#CurrencyWarEquipment"); + builder.AppendLine(); + GenerateCurrencyWarEquipment(builder, textMap, fallbackTextMap); + + builder.AppendLine(); + builder.AppendLine("#CurrencyWarConsumable"); + builder.AppendLine(); + GenerateCurrencyWarConsumable(builder, textMap, fallbackTextMap); + + builder.AppendLine(); + builder.AppendLine("#CurrencyWarOrb"); + builder.AppendLine(); + GenerateCurrencyWarOrb(builder, textMap, fallbackTextMap); + #if DEBUG builder.AppendLine(); builder.AppendLine("#RogueDiceSurface"); @@ -231,6 +251,56 @@ public static class HandbookGenerator } } + public static void GenerateCurrencyWarRole(StringBuilder builder, Dictionary map, + Dictionary fallback) + { + foreach (var display in GameData.GridFightRoleBasicInfoData.Values) + { + // get from avatar id + if (!GameData.AvatarConfigData.TryGetValue((int)display.AvatarID, out var avatar)) continue; + var name = GetNameFromTextMap(avatar.AvatarName.Hash, map, fallback); + + builder.AppendLine(display.ID + ": " + name); + } + } + + public static void GenerateCurrencyWarEquipment(StringBuilder builder, Dictionary map, + Dictionary fallback) + { + foreach (var display in GameData.GridFightEquipmentData.Values) + { + // get from items + if (!GameData.GridFightItemsData.TryGetValue(display.ID, out var item)) continue; + var name = GetNameFromTextMap(item.ItemName.Hash, map, fallback); + + builder.AppendLine(display.ID + ": " + name); + } + } + + public static void GenerateCurrencyWarConsumable(StringBuilder builder, Dictionary map, + Dictionary fallback) + { + foreach (var display in GameData.GridFightConsumablesData.Values) + { + // get from items + if (!GameData.GridFightItemsData.TryGetValue(display.ID, out var item)) continue; + var name = GetNameFromTextMap(item.ItemName.Hash, map, fallback); + + builder.AppendLine(display.ID + ": " + name); + } + } + + public static void GenerateCurrencyWarOrb(StringBuilder builder, Dictionary map, + Dictionary fallback) + { + foreach (var display in GameData.GridFightOrbData.Values) + { + var name = GetNameFromTextMap(display.OrbName.Hash, map, fallback); + + builder.AppendLine(display.OrbID + ": " + name); + } + } + public static string GetNameFromTextMap(BigInteger key, Dictionary map, Dictionary fallback) {