当前位置: 首页 > Skill >

UE Datatable Editor

UE Datatable Editor

1.1.0 2026.11.24 浏览:728
获取Skill文件查看使用说明
作者:周言许可证:
本文目录展开

UE DataTable Editor

Edit Unreal Engine DataTable configuration through JSON files — auto-discover projects, search, modify, validate, and import back to the engine.

Overview

UE projects commonly store DataTable data in .uasset files, with corresponding JSON source files that serve as the editable representation. This skill provides a complete workflow for discovering, modifying, and re-importing these data tables.

This skill works with any UE project — it automatically detects the project structure and locates DataTable JSON files. No hardcoded paths required.

Supported DataTable Format

The JSON file should be an array of objects, each with a Name field as the row key:

[
  { "Name": "230000", "DevName": "技能名", "LOC_Name": "NSLOCTEXT(...)", ... },
  { "Name": "230001", ... }
]

Important Notes

  • JSON files may be encoded in UTF-16 LE (with BOM), UTF-8 BOM, or UTF-8. All scripts handle encoding automatically.
  • The .uasset files are binary and cannot be edited directly — always modify through JSON then import.

Workflow

Step 0: Discover UE Project and DataTable Files

ALWAYS run this step first when the user has not provided a specific JSON path. Use scripts/dt_discover.py to auto-detect UE projects and DataTable JSON files:

# Auto-discover all UE projects and DataTable JSON files in common locations
python {SKILL_DIR}/scripts/dt_discover.py

# Search in a specific directory
python {SKILL_DIR}/scripts/dt_discover.py --root "<directory>"

# Find a specific table by name (matches JSON filename)
python {SKILL_DIR}/scripts/dt_discover.py --table "AI_Skills"

# Filter by UE project name
python {SKILL_DIR}/scripts/dt_discover.py --project "SMG"

# Output as JSON for parsing
python {SKILL_DIR}/scripts/dt_discover.py --json-output

When the user provides a table name (e.g. "修改 AI_Skills 表"), use --table to locate the matching JSON file:

python {SKILL_DIR}/scripts/dt_discover.py --table "<user_provided_table_name>"

Once the JSON file is identified, store its absolute path for use in subsequent steps.

Step 1: Search for Target Rows

Use scripts/dt_search.py to locate the row(s) to modify. The --json parameter takes the path discovered in Step 0.

# Search by row ID
python {SKILL_DIR}/scripts/dt_search.py --json <json_path> --id 230000

# Search by name keyword
python {SKILL_DIR}/scripts/dt_search.py --json <json_path> --name "蓄力"

# Search by any field
python {SKILL_DIR}/scripts/dt_search.py --json <json_path> --field DevName --value "瞬移"

# List all rows in a Part (for AI Skills tables)
python {SKILL_DIR}/scripts/dt_search.py --json <json_path> --part 1

# Show full JSON for results
python {SKILL_DIR}/scripts/dt_search.py --json <json_path> --id 230000 --full

# List all available fields
python {SKILL_DIR}/scripts/dt_search.py --json <json_path> --list-fields

Present search results to the user before proceeding with modifications.

Step 2: Modify Data

Use scripts/dt_modify.py to modify fields. The script automatically:

  • Wraps plain text in NSLOCTEXT() format for localization fields
  • Validates all data after modification
  • Creates a timestamped backup before saving
# Modify LOC_Desc (auto-wraps in NSLOCTEXT)
python {SKILL_DIR}/scripts/dt_modify.py --json <json_path> --id 230000 --set-loc-desc "对随机角色造成伤害"

# Modify LOC_Name
python {SKILL_DIR}/scripts/dt_modify.py --json <json_path> --id 230000 --set-loc-name "新技能名"

# Modify any field
python {SKILL_DIR}/scripts/dt_modify.py --json <json_path> --id 230000 --set "bUseAlert=true" --set "DevName=新名称"

# Preview without saving (dry-run)
python {SKILL_DIR}/scripts/dt_modify.py --json <json_path> --id 230000 --set-loc-desc "测试" --dry-run

# Validate entire JSON
python {SKILL_DIR}/scripts/dt_modify.py --json <json_path> --validate

NSLOCTEXT Format Rules

For localization fields (LOC_Name, LOC_Desc, LOC_AlertText, LOC_InterruptMessage, LOC_NoticeText):

  • When user provides plain text, the script auto-wraps it as: NSLOCTEXT("<PartName>", "<SkillID>_<FieldName>", "<text>")
  • When user provides a full NSLOCTEXT(...) or INVTEXT(...) string, it is used as-is
  • Use --no-wrap flag to disable auto-wrapping

Field Modification via Direct File Edit

For complex modifications (nested objects, arrays, or bulk changes), directly edit the JSON file using replace_in_file or read_file + write_to_file tools. Always validate after editing:

python {SKILL_DIR}/scripts/dt_modify.py --json <json_path> --validate

Step 3: Import into UE Engine

After modifying and validating the JSON, generate the UE import command. The user must execute this command in the UE Editor Output Log:

py "{SKILL_DIR}/scripts/dt_import_ue.py" --json "<json_path>" --part <part_number>

Parameters:

  • --part 0 — Import Part0 (ID 200000–229999)
  • --part 1 — Import Part1 (ID 230000–239999)
  • --part 2 — Import Part2 (ID 240000–249999)
  • --part all — Import all Parts
  • --asset-base "<path>" — Override the UE asset base path (default: /Game/SMG/Configs/DataTables/AISkills)

Determine the correct --part number from the row ID being modified. Always provide the full command with absolute paths for the user to copy-paste.

Step 4: Verify

After the user reports the UE import result, check the log output for:

  • Imported DataTable '...' - 0 Problems = Success
  • Any Error lines = Investigation needed

Refer to references/field_schema.md for the complete field documentation when needed.

Quick Start Example

User says: "修改 AI_Skills 表中技能 230005 的描述"

  1. Discover: python {SKILL_DIR}/scripts/dt_discover.py --table "AI_Skills" → Found: D:ProjectsMyGameContentConfigsJsonJson_AI_Skills.json

  2. Search: python {SKILL_DIR}/scripts/dt_search.py --json "<found_path>" --id 230005 → Shows current skill data

  3. Modify: python {SKILL_DIR}/scripts/dt_modify.py --json "<found_path>" --id 230005 --set-loc-desc "新的描述文本" → Modifies and validates

  4. Import: Provide UE command for the user to run in editor

Error Handling

Error Cause Solution
No UE project found Project not in search paths Use --root to specify project directory
No DataTable JSON found JSON file not in Content directory Check project structure, provide path manually
UnicodeDecodeError Wrong encoding detection Scripts auto-detect; if issues persist, check file BOM bytes
fill_data_table_from_json_string fails JSON fields don't match RowStruct Validate JSON, check for missing/extra fields
DataTable not found Wrong asset path Use --asset-base to specify correct UE asset path
P4 checkout failure File locked by another user Coordinate with team or force checkout

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,040
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,033
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,021
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,021
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,019
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,016
Skill 文件
  • SKILL.md
    • UE DataTable Editor
    • Overview
      • Supported DataTable Format
      • Important Notes
    • Workflow
      • Step 0: Discover UE Project and DataTable Files
      • Step 1: Search for Target Rows
      • Step 2: Modify Data
        • NSLOCTEXT Format Rules
        • Field Modification via Direct File Edit
      • Step 3: Import into UE Engine
      • Step 4: Verify
    • Quick Start Example
    • Error Handling
  • 项目或源文件

相关 Skill

更多
Ue Build Package Ue Build Package 编译并打包Unreal Engine项目。使用场景:(1)从命令行构建UE项目;(2)打包分发版本(Android/iOS/Windows);(3)...
Openclaw Unreal Skill Openclaw Unreal Skill 通过 OpenClaw Unreal 插件控制 Unreal Engine 编辑器,用于关卡/角色管理、变换、PIE 控制和调试等开发任务。
unreal-engine-cpp-pro unreal-engine-cpp-pro Unreal Engine 5.x C++ 开发的专家指南,涵盖 UObject 使用规范、性能模式和最佳实践。
Unreal Engine Unreal Engine 避免常见的 Unreal 错误——垃圾回收、UPROPERTY 宏、复制权限和资源引用陷阱。
game-developer game-developer 你是一名游戏开发专家,精通 Unity、Unreal Engine、游戏机制设计、物理系统和多人游戏。使用场景:游戏引擎相关问题。