dota2-unit

Create and manage Dota 2 custom unit KV configurations with JSON compilation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps developers create and maintain Dota 2 custom unit definitions using KV files, separating configuration from logic to enable consistent front-end and back-end data.

Core Features & Use Cases

  • KV-driven unit definitions: describe unit properties, models, abilities, and localization in a single source of truth.
  • Data-to-JSON synchronization: compile KV to JSON for both client (panorama) and server (TSTL) usage.
  • Use Case: design a new custom unit for a mod, update its stats and abilities, then regenerate shared data with a single build step.

Quick Start

Create or modify a unit under game/scripts/npc/custom_units, ensure it is referenced in npc_units_custom.txt, and run the build step to regenerate JSON.

Frequently Asked Questions about dota2-unit

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

FAQPage Schema
How do I create custom Dota 2 units using KV files?

You create custom units by defining their properties, models, and abilities in KV files under game/scripts/npc/custom_units, ensuring each is referenced in the master npc_units_custom.txt file for proper registration.

How does KV to JSON compilation work for Dota 2 custom units?

KV to JSON compilation uses the npx gulp kv_2_js build step to synchronize custom unit configurations, generating JSON files that both the panorama client and TSTL server can consume.

Do I need to run a build step to synchronize Dota 2 custom unit data?

Yes, running the npx gulp kv_2_js build step is required to regenerate synchronized JSON data from your custom unit KV files, ensuring consistent front-end and back-end data usage.

What is the best way to manage Dota 2 custom unit stats and abilities?

The best way to manage custom unit stats is using KV-driven definitions that separate configuration from logic, allowing you to update properties and abilities in a single source of truth before running the build step.

Why separate configuration from logic when defining Dota 2 custom units?

Separating configuration from logic via KV files enables consistent front-end and back-end data synchronization, preventing data mismatches between the panorama client and TSTL server environments.