dota2-game-logic

Compile TypeScript to Lua for DOTA2 custom game server-side logic.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide provides a structured approach to developing DOTA2 custom game server-side logic, clarifying how to organize code, data, and configurations to build robust game modes, modules, and synchronization mechanisms.

Core Features & Use Cases

  • TypeScript-based development with tstl to compile into Lua for the Dota 2 server.
  • Enforced usage of dota_ts_adapter for registering abilities, modifiers, and items, ensuring consistent integration.
  • Clear separation of configuration and code (KV configs in game/scripts/npc, JSON assets for front- and back-end data).
  • End-to-end workflow coverage including module activation, KV compilation, and debugging/build verification.
  • Modular project structure and guidance for adding new game modes and events.

Quick Start

Follow the procedure to scaffold and start a Dota 2 server-side logic project using TypeScript and tstl.

Frequently Asked Questions about dota2-game-logic

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

FAQPage Schema
How do I build Dota 2 custom game server-side logic with TypeScript?

You can develop Dota 2 server-side logic by writing TypeScript and using tstl to compile it into Lua. This approach provides a modular project structure for building game modes, modules, and synchronization mechanisms safely.

What is the best way to manage KV configurations in a Dota 2 custom game?

Managing KV configurations involves placing them in the game/scripts/npc directory and using a KV-to-JSON pipeline. This separates configuration from code and safely synchronizes data between the front-end and back-end.

How does dota_ts_adapter work for registering Dota 2 abilities and modifiers?

The dota_ts_adapter enforces consistent integration by providing a structured method to register abilities, modifiers, and items. It ensures your TypeScript code interfaces correctly with the Dota 2 server environment.

Can I use TypeScript to create Dota 2 game modes instead of writing Lua directly?

Yes, you can use TypeScript to create Dota 2 game modes by compiling your code with tstl. This workflow enforces best practices, including modular project layout, test validation, and build verification for deployment.

How do I synchronize data between front-end and back-end in Dota 2 custom games?

You synchronize data by using JSON assets managed through a KV-to-JSON pipeline alongside dota_ts_adapter. This setup ensures safe front-end and back-end data synchronization within your custom game architecture.

Why should I separate configuration files from code in Dota 2 server-side modding?

Separating configuration files from code organizes data and logic to build robust game modes. Keeping KV configs in specific directories while using JSON for data assets prevents conflicts and streamlines modular development.