wa-editing
v0.0.1
Published
Source-backed WeakAuras SavedVariables editing and import/export conversion workflows for Codex.
Downloads
152
Maintainers
Readme
WA-Editing
中文
WA-Editing 是一个 Codex skill bundle,用于直接编辑和验证 WeakAuras SavedVariables 文件,并提供 WeakAuras 导入字符串和 Lua 文件之间的转换能力。它面向需要修改 WeakAuras.lua、排查 WA 自定义代码、优化性能/发光/ticker、或者导入导出光环配置的工作流。
当前版本:v0.0.1
亮点
- WA-Editing:按 WeakAuras 源码和 Blizzard UI 源码做依据检查,再修改
WeakAuras.lua。 - WA-Convert:支持
WeakAuras.lua与!WA:2!导入字符串互转,支持单 aura、分组、子项、选中集合和批量导出。 - Lua 5.1 验证:要求使用
luac 5.1 -p验证 SavedVariables 和自定义 Lua 语法。 - 客户端接口校验:修改前后都要求检查当前客户端对应 Blizzard 源码里的 API、事件、payload 字段和 frame method。
- 跨平台脚本:安装和工具脚本优先使用 Python,适配 Windows、macOS 和 Linux。
- 安全编辑流程:真实 WTF 路径会优先建议复制到项目目录;直接编辑前会创建时间戳备份。
安装
通过 npm 安装并注册两个 Codex skill:
npm install --global wa-editing
wa-editing install也可以不全局安装:
npx wa-editing install可选命令:
wa-editing doctor
wa-editing install-hooks现有 Python 3 安装入口仍然可用:
python install.py安装后重启 Codex 或 reload skills。可用命令:
$wa-editing
$wa-convertWA-Editing 工作流
启动时应先确认:
- 当前 WoW 客户端版本,例如 Classic Era、Classic PTR、Classic Anniversary、Cata Classic 或 Retail。
- 游戏内 WeakAuras 版本。
- 要编辑的
WeakAuras.lua路径。 - 目标 aura id/name 和具体问题。
典型验证包括:
python scripts/inspect_wa_file_context.py --wa-lua "D:\path\WeakAuras.lua"
python scripts/validate_wa_edit.py --wa-lua "D:\path\WeakAuras.lua"
luac -p "D:\path\WeakAuras.lua"WA-Convert 示例
导出一个分组及其子项:
python convert/scripts/wa_convert.py \
--mode LuaToString \
--input "D:\path\WeakAuras.lua" \
--id "术士分组" \
--granularity Group \
--client-version "Classic Era"把 !WA:2! 字符串还原成 Lua:
python convert/scripts/wa_convert.py \
--mode StringToLua \
--input "D:\path\20260601123000.txt" \
--project-folder "D:\path\project" \
--client-version "Classic Era"字符串默认写入 yyyyMMddHHmmss.txt,Lua 默认写入 WeakAuras.lua.DELETEME01,重名时自动递增。
参考源码
- WeakAuras: https://github.com/WeakAuras/WeakAuras2
- Blizzard UI Source: https://github.com/Gethe/wow-ui-source
English
WA-Editing is a Codex skill bundle for direct WeakAuras SavedVariables editing and WeakAuras import/export conversion. It is built for workflows that modify WeakAuras.lua, debug custom WA code, optimize performance/glow/tickers, or convert aura data between Lua and !WA:2! strings.
Current version: v0.0.1
Highlights
- WA-Editing: edits
WeakAuras.luawith WeakAuras source checks and Blizzard UI source evidence. - WA-Convert: converts between
WeakAuras.luaand!WA:2!strings, including single auras, groups, descendants, selected sets, and batch exports. - Lua 5.1 validation: requires
luac 5.1 -pchecks for SavedVariables and embedded custom Lua. - Client API checks: verifies Blizzard APIs, events, payload fields, and frame methods against the target client source before and after edits.
- Cross-platform scripts: Python-first installer and utilities for Windows, macOS, and Linux.
- Safer editing flow: recommends project copies for real WTF paths and creates timestamped backups before direct edits.
Installation
Install the package and register both Codex skills through npm:
npm install --global wa-editing
wa-editing installYou can also run the installer without a global installation:
npx wa-editing installOptional commands:
wa-editing doctor
wa-editing install-hooksThe existing Python 3 installer remains available:
python install.pyRestart Codex or reload skills after installation. Available commands:
$wa-editing
$wa-convertWA-Editing Workflow
Before editing, the skill asks for:
- The target WoW client line, such as Classic Era, Classic PTR, Classic Anniversary, Cata Classic, or Retail.
- The in-game WeakAuras version.
- The exact
WeakAuras.luapath. - The target aura id/name and the concrete issue.
Typical validation:
python scripts/inspect_wa_file_context.py --wa-lua "D:\path\WeakAuras.lua"
python scripts/validate_wa_edit.py --wa-lua "D:\path\WeakAuras.lua"
luac -p "D:\path\WeakAuras.lua"WA-Convert Examples
Export a group with descendants:
python convert/scripts/wa_convert.py \
--mode LuaToString \
--input "D:\path\WeakAuras.lua" \
--id "Warlock Group" \
--granularity Group \
--client-version "Classic Era"Decode a !WA:2! string back to Lua:
python convert/scripts/wa_convert.py \
--mode StringToLua \
--input "D:\path\20260601123000.txt" \
--project-folder "D:\path\project" \
--client-version "Classic Era"String outputs default to yyyyMMddHHmmss.txt. Lua outputs default to WeakAuras.lua.DELETEME01 and increment when a name already exists.
Source References
- WeakAuras: https://github.com/WeakAuras/WeakAuras2
- Blizzard UI Source: https://github.com/Gethe/wow-ui-source
