This is a PVE Dota2 custom game project.
Game is published on Steam workshop: 10v10 AI custom by windy
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。
If you would like to contribute to Windy10v10AI, please see our contributing guidelines.
如果你想参与Windy10v10AI的开发,请参考我们的参与指南。
Windows 10/11
-
Install Dota2 and Dota 2 Workshop Tools.
-
Install node.js. The required version is pinned in
.nvmrc(v22). Recommend install node use nvmRun in PowerShell from the repository root.
nvm-windowsdoes not read.nvmrcdirectly, so pipe its content in via$(Get-Content .nvmrc):
# set/update node version
nvm install $(Get-Content .nvmrc)
nvm use $(Get-Content .nvmrc)- Clone this repository to local. It must be on the same hard drive partition as Dota2. 仓库必须和 Dota2 在同一块硬盘分区上。
- Run
npm installin the repository root directory. Content and game folder will be linked to dota2 dota_addons directory.
npm installThis project ships with Claude Code configuration (.claude/) for AI-assisted development. Two ways to use it:
- Official subscription — install Claude Code and sign in.
- 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 辅助开发,有两种使用方式:
- 官网订阅 — 安装 Claude Code 并登录。
- 第三方 API — 安装 Claude Code VS Code 插件,在
.claude/settings.local.json(已被 git 忽略)中配置上面的 API 地址与密钥。
建议安装 GitHub CLI 并运行 gh auth login,以便 Claude Code 帮你创建 PR、管理 issue。
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.txt、abilities_schinese.txt 两个本地化文件解压到 docs/reference/<版本>/ 下。
Run in windows powershell/cmd
npm run startRun 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>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文件,采用以下方式编译。
- Add png file to
content/panorama/imagesfolder. - Add image to
content/panorama/layout/custom_game/images.xmlfile.
png will be compiled to vtex_c automatically when you run npm run start.
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 installhttps://github.com/ModDota/TypeScriptAddonTemplate
https://github.com/XavierCHN/x-template
- sample modifiers and abilities: https://github.com/ModDota/TypeScriptAddonTemplate/tree/master/src/vscripts
Panorama UI with webpack, TypeScript and React.
- TypeScript for VScripts Check out Typescript Introduction for more information.
- TypeScript for Panorama
- React in Panorama tutorial
- [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 ts和tstl公用的声明,如custom_net_tables等
- [src/vscripts/shared]: 用来写
- [src/scripts]: 各种 node 脚本,用来完成各种辅助功能
- [game/*]: 会和
dota 2 beta/game/dota_addons/your_addon_name同步更新 - [content/*]: 会和
dota 2 beta/content/dota_addons/your_addon_name同步更新
console中有如下报错时,技能特效会消失,需要删除对应的文件,然后重新启动Dota2即可。
Failed loading resource "particles/units/heroes/hero_skywrath_mage/skywrath_mage_mystic_flare_ambient.vpcf_c" (ERROR_BADREQUEST: Code error - bad request)
