dota2-item

Codify Dota 2 custom item KV data, TypeScript logic, and localization into a repeatable workflow.

212|121|Updated Sep 16, 2020
One-click install
npx skills add https://github.com/XavierCHN/x-template --skill dota2-item
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dota2-item
Source: https://github.com/XavierCHN/x-template/tree/main/.agents/skills/dota2-item
Command: npx skills add https://github.com/XavierCHN/x-template --skill dota2-item

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dota 2 modding projects often struggle to keep item configurations, code, and localization in sync across KV data, TypeScript item logic, and UI assets. This Skill provides a repeatable workflow to manage items by codifying configuration in KV files, supplying TSTL item logic templates, and centralizing localization.

Core Features & Use Cases

  • Config-driven item definitions: place attributes and values in KV files (game/scripts/npc/items_list and Excel-generated files) and compile to JSON for both frontend and backend consumption.
  • TSTL-based item logic: create TypeScript classes under game/scripts/src/abilities, extend BaseItem, and register with @registerAbility to implement item behavior.
  • Localization workflow: update game resource strings (addon.csv) with DOTA_Tooltip_ability_item_<name> names, descriptions, and kv-style values.
  • Build and synchronization: run npx gulp kv_2_js to refresh JSON so front-end and back-end share the same data.

Quick Start

Follow the workflow to add a new item: create KV entries under game/scripts/npc/items_list, compile with npx gulp kv_2_js, implement the TS logic under game/scripts/src/abilities, and update localization before testing in-game.

Frequently Asked Questions about dota2-item

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create Dota 2 custom items and keep KV configurations in sync with TypeScript logic?

To create Dota 2 custom items, you codify item attributes in KV files under game/scripts/npc/items_list, implement TypeScript behaviors extending BaseItem, and run the npx gulp kv_2_js build pipeline to synchronize JSON data for both frontend and backend.

Why does my Dota 2 custom item configuration not reflect changes in the game UI?

Dota 2 custom item configuration changes may not appear because the JSON data is out of sync. You must run the npx gulp kv_2_js build pipeline to refresh the compiled JSON data shared between the frontend and backend before testing in-game.

What is the correct workflow for adding TSTL item logic to a Dota 2 x-template project?

The correct workflow for adding TSTL item logic involves creating TypeScript classes under game/scripts/src/abilities, extending BaseItem, and registering the item behavior with the @registerAbility decorator to implement custom item logic.

How do I update localization strings for Dota 2 custom items?

To update localization for Dota 2 custom items, you update game resource strings in addon.csv with DOTA_Tooltip_ability_item_<name> names, descriptions, and kv-style values to ensure the item text displays correctly in-game.

Do I need a specific build pipeline to manage Dota 2 custom items in an x-template project?

Yes, managing Dota 2 custom items in an x-template project requires the npx gulp kv_2_js build pipeline to compile KV configurations into JSON data, ensuring both frontend and backend share the same item attributes.

Can I use Excel-generated files to define Dota 2 custom item attributes?

Yes, you can use Excel-generated files to define attributes and values for Dota 2 custom items. These configuration files are placed under game/scripts/npc/items_list and compiled to JSON for both frontend and backend consumption.