Skip to content

windy10v10ai/game

Repository files navigation

Windy10v10AI

This is a PVE Dota2 custom game project.
Game is published on Steam workshop: 10v10 AI custom by windy

📊 Project Status

Build Status License: GPL v3 CodeFactor

Last Commit Commit Activity GitHub issues GitHub pull requests

GitHub contributors GitHub stars GitHub forks

License

Licensed under the GNU GPL v3 (LICENSE), with a Steam/Workshop distribution exception and notes on prior MIT releases in LICENSE.EXCEPTIONS.md.
本项目采用 GNU GPL v3 协议(见 LICENSE),并附带 Steam/创意工坊 分发例外,相关说明及此前 MIT 版本的处理见 LICENSE.EXCEPTIONS.md

Contributors

Contributors

Join us

If you would like to contribute to Windy10v10AI, please see our contributing guidelines.
如果你想参与Windy10v10AI的开发,请参考我们的参与指南

Get Start

OS Requirement

Windows 10/11

Develop Tool

Setup

  1. Install Dota2 and Dota 2 Workshop Tools.

  2. Install node.js. The required version is pinned in .nvmrc (v22). Recommend install node use nvm

    Run in PowerShell from the repository root. nvm-windows does not read .nvmrc directly, so pipe its content in via $(Get-Content .nvmrc):

# set/update node version
nvm install $(Get-Content .nvmrc)
nvm use $(Get-Content .nvmrc)
  1. Clone this repository to local. It must be on the same hard drive partition as Dota2. 仓库必须和 Dota2 在同一块硬盘分区上。
  2. Run npm install in the repository root directory. Content and game folder will be linked to dota2 dota_addons directory.
npm install

Claude Code (Optional)

This project ships with Claude Code configuration (.claude/) for AI-assisted development. Two ways to use it:

  1. Official subscription — install Claude Code and sign in.
  2. Third-party API — install the Claude Code VS Code extension, then set the endpoint and key in .claude/settings.local.json (git-ignored):
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://your-api-endpoint",
    "ANTHROPIC_AUTH_TOKEN": "your-api-key"
  }
}

Recommend installing the GitHub CLI and running gh auth login, so Claude Code can create pull requests and manage issues for you.

本项目自带 Claude Code 配置(.claude/)用于 AI 辅助开发,有两种使用方式:

  1. 官网订阅 — 安装 Claude Code 并登录。
  2. 第三方 API — 安装 Claude Code VS Code 插件,在 .claude/settings.local.json(已被 git 忽略)中配置上面的 API 地址与密钥。

建议安装 GitHub CLI 并运行 gh auth login,以便 Claude Code 帮你创建 PR、管理 issue。

Dota2 Reference Files (Optional)

Some development tasks (editing ability/item KV, localization, AI tuning) reference the vanilla Dota 2 files under docs/reference/<version>/. This directory is git-ignored, so you need to build it yourself with Source 2 Viewer: open dota 2 beta/game/dota/pak01_dir.vpk and extract the scripts/npc/ folder together with the two localization files abilities_english.txt and abilities_schinese.txt into docs/reference/<version>/.

部分开发任务(编辑技能/物品 KV、本地化、AI 调参)需要参考 docs/reference/<version>/ 下的原版 Dota2 文件。该目录已被 git 忽略,需用 Source 2 Viewer 自行解压:打开 dota 2 beta/game/dota/pak01_dir.vpk,将 scripts/npc/ 目录以及 abilities_english.txtabilities_schinese.txt 两个本地化文件解压到 docs/reference/<版本>/ 下。

Develop

Launch Dota2 devTools and build the project

Run in windows powershell/cmd

npm run start

VConsole Command

Run in Dota2 VConsole

# launch/relaunch custom game
dota_launch_custom_game windy10v10ai dota
dota_launch_custom_game windy10v10ai custom
# show game end panel
dota_custom_ui_debug_panel 7
# reload lua
script_reload
# Speeds the game up to that number 加速游戏到指定倍速
host_timescale <float>

How to compile png to vtex_c (Recommended) 如何编译图片png文件

If a PNG is referenced within an XML file, it will be compiled automatically. For standalone PNG files, use the following method to compile. 如果png在xml中被引用了,则会自动编译。对于独立的png文件,采用以下方式编译。

  1. Add png file to content/panorama/images folder.
  2. Add image to content/panorama/layout/custom_game/images.xml file.

png will be compiled to vtex_c automatically when you run npm run start.

Troubleshooting

This code needs to be on the same hard drive partition as dota2.
Reinstall solve most of the problems.

代码需要和dota2在同一块硬盘分区上。
重新安装可以解决大部分问题。

rm -r ./node_modules
npm install

Documentation

Supported by ModDota template and x-template

ModDota template

https://github.com/ModDota/TypeScriptAddonTemplate

X-Template

https://github.com/XavierCHN/x-template

Typescript to lua

ModDota template README

Panorama UI with webpack, TypeScript and React.

Contents 文件夹内容说明

  • [src/common]: TypeScript .d.ts type declaration files with types that can be shared between Panorama and VScripts
  • [src/vscripts]: TypeScript code for Dota addon (Lua) vscripts. Compiles lua to game/scripts/vscripts.
  • [src/panorama]: TypeScript code for panorama UI. Compiles js to content/panorama/scripts/custom_game

  • [game/*]: Dota game directory containing files such as npc kv files and compiled lua scripts.
  • [content/*]: Dota content directory containing panorama sources other than scripts (xml, css, compiled js)

  • [src/vscripts]: 用来写tstl代码,lua脚本会被编译到game/scripts/vscripts目录下
    • [src/vscripts/shared]: 用来写panorama tststl公用的声明,如custom_net_tables
  • [src/scripts]: 各种 node 脚本,用来完成各种辅助功能

  • [game/*]: 会和 dota 2 beta/game/dota_addons/your_addon_name 同步更新
  • [content/*]: 会和 dota 2 beta/content/dota_addons/your_addon_name 同步更新

Data Flow

Data Flow

维护指南

Console报错

console中有如下报错时,技能特效会消失,需要删除对应的文件,然后重新启动Dota2即可。

Failed loading resource "particles/units/heroes/hero_skywrath_mage/skywrath_mage_mystic_flare_ambient.vpcf_c" (ERROR_BADREQUEST: Code error - bad request)

Activity

Alt

Star History Chart

About

Dota2 custom game.

Topics

Resources

License

Contributing

Stars

69 stars

Watchers

1 watching

Forks

Sponsor this project

Contributors