加图片
SkillMediaGuides your agent to add claude skill images to a Dota 2 custom game: where to put pngs, copy files, and register xml.
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the 加图片 skill
About this skill
Add custom icons or UI images to a game: where to put the png, whether a content copy is needed, and whether to register it in xml. Trigger: the user says "add an icon", "add an image", or "the icon shows as a purple block", or a new skill/item needs a custom icon.
What this skill tells your AI
The instructions your AI receives, as published by windy10v10ai/game in .claude/skills/add-image/SKILL.md and read by ahel’s review.
第一步:判断要不要放 png
AbilityTextureName 引用的若是 Dota2 已有的原版 texture(原版技能名 / 物品名),直接写名字引用即可,不放任何 png、不登记 xml,到此结束。
只有自制或从 Dota2 资源解包提取的图标才继续往下走。
第二步:按类型选流程
三类图片的存放规则不同,不要互相照抄。
A. 技能图标(技能 ability_xxx 的 AbilityTextureName)
放 game/resource/flash3/images/spellicons/<name>.png,KV 中用文件名引用:
"AbilityTextureName" "axe_auto_culling_blade"
引擎自动在 spellicons/ 下查同名 .png,不需要登记 xml,也不需要 content 副本。
B. 物品图标(物品 item_xxx 的 AbilityTextureName)
图标名 = 物品名去掉 item_ 前缀。三步缺一不可,少任一步都是紫块:
game/resource/flash3/images/items/<name>.png- 同一张 png 复制到
content/panorama/images/items/<name>.png - 在
content/panorama/layout/custom_game/images_items.xml加一行,id与文件名一致:
<Image id="awaken_stone" class="SeqImg" src="file://{images}/items/awaken_stone.png" />
登记表与 png 不同目录,是因为引擎只允许从 layout/custom_game/ 加载 layout。
C. Panorama UI 图片
放 content/panorama/images/custom_game/<module>/,按功能模块分二级目录(lottery/、profile/、battlepass/ 等):
- 文件命名小写下划线,前缀按类型(
icon_bg_frame_decor_) - 在
content/panorama/layout/custom_game/images.xml隐藏 Panel 内加一行<Image>声明(id 在该文件内唯一),用于触发.vtex_c编译 - 不再为每张图创建单独的
<name>.xml编译壳
在 React 或 less 中用 file://{images}/custom_game/<module>/<file>.png 引用。
第三步:校验
npm run lint:images
校验物品图标三处一致(已并入 npm run lint)。
排查紫块
按顺序查:png 是否在对应目录 → 物品图标是否漏了 content 副本或 xml 登记 → 文件名与 KV 中引用是否完全一致 → 是否还没用 Dota tools 编译过。
若整个技能与 modifier 的图标集体消失,先怀疑 TS 模块加载失败(见 src/vscripts/CLAUDE.md「引擎枚举不要在模块顶层求值」),不是图标资源问题。
发布前提醒
编译产物 game/panorama/images/items/*.vtex_c 已 gitignore,由 Dota tools 本地生成。换机器 clone 后必须先用 Dota tools 完整编译一次才能发布,否则 workshop 包会缺图标 —— custom_game/ 下 lottery、profile、member 等目录同理。
Signals
- GitHub stars
- 78
- Forks
- 39
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
add-image- Source
- github.com/windy10v10ai/game