diff --git a/Assets/GameMain/DataTables/DialogLine.txt b/Assets/GameMain/DataTables/DialogLine.txt index 49a55c7..567ba54 100644 --- a/Assets/GameMain/DataTables/DialogLine.txt +++ b/Assets/GameMain/DataTables/DialogLine.txt @@ -1,13 +1,13 @@ # 对话内容表 筛选用数据 # Id SpeakerId Expression SpeakerName Direction Text Emphasis ChapterId DialogId -# int int ExpressionType string int string EmphasisType int int +# int string ExpressionType string int string EmphasisType int int # 对话行编号 策划备注 说话人Id 表情 显示人名 说话朝向 说话内容 演出效果 章节Id 对话Id - 100100001 Id规则为 Null Null Null 0 相传。 1.00100001 1001.00001 - 100100002 第1位数为章节Id Null Null Null 0 Mask。 1.00100002 1001.00002 - 100100003 第2-4位数为对话Id Null Null Null 0 很好。 1.00100003 1001.00003 - 100200001 第5-9位数为对话行Id Xu Normal 徐晟壹 0 你好,王。 1.00200001 1002.00001 - 100200002 Wang Normal 王可嘉 1 你好,徐。 1.00200002 1002.00002 - 100200003 Master Normal 李诫 1 你们好。 1.00200003 1002.00003 - 100300001 Npc1 Null Null 0 这人谁啊? 1.00300001 1003.00001 - 100300002 Npc2 Null Null 0 不知道啊? 1.00300002 1003.00002 - 100300003 Npc1 Null Null 0 不知道你在这干嘛。 1.00300003 1003.00003 + 100100001 Id规则为 Null None Null 0 相传。 None 1.00100001 1001.00001 + 100100002 第1位数为章节Id Null None Null 0 Mask。 None 1.00100002 1001.00002 + 100100003 第2-4位数为对话Id Null None Null 0 很好。 None 1.00100003 1001.00003 + 100200001 第5-9位数为对话行Id Xu Normal 徐晟壹 0 你好,王。 None 1.00200001 1002.00001 + 100200002 Wang Normal 王可嘉 1 你好,徐。 None 1.00200002 1002.00002 + 100200003 Master Normal 李诫 1 你们好。 None 1.00200003 1002.00003 + 100300001 Npc1 None Null 0 这人谁啊? None 1.00300001 1003.00001 + 100300002 Npc2 None Null 0 不知道啊? None 1.00300002 1003.00002 + 100300003 Npc1 None Null 0 不知道你在这干嘛。 None 1.00300003 1003.00003 diff --git a/Assets/GameMain/DataTables/Scene.txt b/Assets/GameMain/DataTables/Scene.txt index 6aecfae..10e008e 100644 --- a/Assets/GameMain/DataTables/Scene.txt +++ b/Assets/GameMain/DataTables/Scene.txt @@ -5,3 +5,4 @@ 1 菜单场景 Menu 1 2 战斗场景 Main 2 3 压力测试场景 StressTest 0 + 4 GameplayA 0 diff --git a/Assets/GameMain/DataTables/UIForm.txt b/Assets/GameMain/DataTables/UIForm.txt index 6b11bd8..f8de70d 100644 --- a/Assets/GameMain/DataTables/UIForm.txt +++ b/Assets/GameMain/DataTables/UIForm.txt @@ -6,3 +6,4 @@ 100 主菜单 MenuForm Default False True 101 设置 SettingForm Default False True 102 关于 AboutForm Default False True + 103 组装玩法UI CombineForm Default False False diff --git a/Assets/GameMain/Scripts/DataTable/DRDialog.cs b/Assets/GameMain/Scripts/DataTable/DRDialog.cs index 91274f2..f192b0e 100644 --- a/Assets/GameMain/Scripts/DataTable/DRDialog.cs +++ b/Assets/GameMain/Scripts/DataTable/DRDialog.cs @@ -32,7 +32,7 @@ namespace DataTable index++; Title = fields[index++]; UIMode = EnumUtility.Get(fields[index++]); - + return true; } } diff --git a/Assets/GameMain/Scripts/DataTable/DRDialogLine.cs b/Assets/GameMain/Scripts/DataTable/DRDialogLine.cs index f211f38..fb888dd 100644 --- a/Assets/GameMain/Scripts/DataTable/DRDialogLine.cs +++ b/Assets/GameMain/Scripts/DataTable/DRDialogLine.cs @@ -11,7 +11,7 @@ namespace DataTable /// /// 获取对话行编号 /// - public override int Id { get; } + public override int Id => m_Id; /// /// 获取说话人 Id。 @@ -57,7 +57,7 @@ namespace DataTable Direction = int.Parse(fields[index++]); Text = fields[index++]; Emphasis = EnumUtility.Get(fields[index++]); - + return true; } } diff --git a/Assets/GameMain/Scripts/DataTable/DataTableExtension.cs b/Assets/GameMain/Scripts/DataTable/DataTableExtension.cs index b496f91..b114cf2 100644 --- a/Assets/GameMain/Scripts/DataTable/DataTableExtension.cs +++ b/Assets/GameMain/Scripts/DataTable/DataTableExtension.cs @@ -8,7 +8,7 @@ namespace DataTable { public static class DataTableExtension { - private const string DataRowClassPrefixName = "StarForce.DR"; + private const string DataRowClassPrefixName = "DataTable.DR"; internal static readonly char[] DataSplitSeparators = new char[] { '\t' }; internal static readonly char[] DataTrimSeparators = new char[] { '\"' }; diff --git a/Assets/Launcher.unity b/Assets/Launcher.unity index 2d12a16..bac3db4 100644 --- a/Assets/Launcher.unity +++ b/Assets/Launcher.unity @@ -779,7 +779,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 11499388, guid: adb3eb1c35fcff14f89fba7b05c9d71c, type: 3} propertyPath: m_JsonHelperTypeName - value: StarForce.LitJsonHelper + value: CustomUtility.LitJsonHelper objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] diff --git a/数据表/DialogLine.txt b/数据表/DialogLine.txt index 49a55c7..567ba54 100644 --- a/数据表/DialogLine.txt +++ b/数据表/DialogLine.txt @@ -1,13 +1,13 @@ # 对话内容表 筛选用数据 # Id SpeakerId Expression SpeakerName Direction Text Emphasis ChapterId DialogId -# int int ExpressionType string int string EmphasisType int int +# int string ExpressionType string int string EmphasisType int int # 对话行编号 策划备注 说话人Id 表情 显示人名 说话朝向 说话内容 演出效果 章节Id 对话Id - 100100001 Id规则为 Null Null Null 0 相传。 1.00100001 1001.00001 - 100100002 第1位数为章节Id Null Null Null 0 Mask。 1.00100002 1001.00002 - 100100003 第2-4位数为对话Id Null Null Null 0 很好。 1.00100003 1001.00003 - 100200001 第5-9位数为对话行Id Xu Normal 徐晟壹 0 你好,王。 1.00200001 1002.00001 - 100200002 Wang Normal 王可嘉 1 你好,徐。 1.00200002 1002.00002 - 100200003 Master Normal 李诫 1 你们好。 1.00200003 1002.00003 - 100300001 Npc1 Null Null 0 这人谁啊? 1.00300001 1003.00001 - 100300002 Npc2 Null Null 0 不知道啊? 1.00300002 1003.00002 - 100300003 Npc1 Null Null 0 不知道你在这干嘛。 1.00300003 1003.00003 + 100100001 Id规则为 Null None Null 0 相传。 None 1.00100001 1001.00001 + 100100002 第1位数为章节Id Null None Null 0 Mask。 None 1.00100002 1001.00002 + 100100003 第2-4位数为对话Id Null None Null 0 很好。 None 1.00100003 1001.00003 + 100200001 第5-9位数为对话行Id Xu Normal 徐晟壹 0 你好,王。 None 1.00200001 1002.00001 + 100200002 Wang Normal 王可嘉 1 你好,徐。 None 1.00200002 1002.00002 + 100200003 Master Normal 李诫 1 你们好。 None 1.00200003 1002.00003 + 100300001 Npc1 None Null 0 这人谁啊? None 1.00300001 1003.00001 + 100300002 Npc2 None Null 0 不知道啊? None 1.00300002 1003.00002 + 100300003 Npc1 None Null 0 不知道你在这干嘛。 None 1.00300003 1003.00003 diff --git a/数据表/Scene.txt b/数据表/Scene.txt index 6aecfae..10e008e 100644 --- a/数据表/Scene.txt +++ b/数据表/Scene.txt @@ -5,3 +5,4 @@ 1 菜单场景 Menu 1 2 战斗场景 Main 2 3 压力测试场景 StressTest 0 + 4 GameplayA 0 diff --git a/数据表/Scene.xlsx b/数据表/Scene.xlsx index 3bb1e1a..bdc5b47 100644 Binary files a/数据表/Scene.xlsx and b/数据表/Scene.xlsx differ diff --git a/数据表/UIForm.txt b/数据表/UIForm.txt index 6b11bd8..f8de70d 100644 --- a/数据表/UIForm.txt +++ b/数据表/UIForm.txt @@ -6,3 +6,4 @@ 100 主菜单 MenuForm Default False True 101 设置 SettingForm Default False True 102 关于 AboutForm Default False True + 103 组装玩法UI CombineForm Default False False diff --git a/数据表/UIForm.xlsx b/数据表/UIForm.xlsx index db32a7a..9cfa1b1 100644 Binary files a/数据表/UIForm.xlsx and b/数据表/UIForm.xlsx differ diff --git a/数据表/convert.py b/数据表/convert.py index ba85f28..5ca4b8a 100644 --- a/数据表/convert.py +++ b/数据表/convert.py @@ -28,7 +28,8 @@ def convert_excel_to_txt(folder_path='.'): print(f"正在处理: {file_path}...") try: - df = pd.read_excel(file_path, header=None) + # 保留单元格中的 "None" 文本,避免被 pandas 当作缺失值转为空 + df = pd.read_excel(file_path, header=None, keep_default_na=False) df.to_csv(output_file, sep='\t', index=False, header=False, encoding='utf-8')