A complete, all-purpose boilerplate and reference implementation for creating mods for Dota 2 Minify.
Use this repository to learn every supported modding method, conditionality directive, template variable, and lifecycle hook, or clone it as a starting point for your own mods.
a bit rushed, sorry
Submit a PR to community repository.
mod-template/
βββ src/ # The actual mod directory loaded by Minify
β βββ manifest.json # Mod metadata and UI settings schema
β βββ blacklist.txt # Conditional asset blanking rules
β βββ styling.css # Target-based Panorama CSS injections
β βββ xml.json # Conditional XML modifications and inclusions
β βββ replacer.json # Conditional asset redirects / swaps
β βββ remap.json # Resource reference remapping
β βββ files/ # Pre-compiled files copied to final VPK
β βββ files_uncompiled/ # Source files compiled by resourcecompiler
β βββ script_utility.py # Custom functions triggered by UI buttons
β βββ script.py # Lifecycle hooks for Python build automation
β βββ notes.md # Localized mod description shown in Minify UI
βββ .gitignore
βββ README.md
Click Use this template on GitHub or clone this repository:
git clone https://github.com/<your-username>/<your-mod-name>.git --depth 1To test your mod live in Dota 2 Minify, create a directory junction / symlink from src/ into Minify's mods/ directory:
Windows (PowerShell):
New-Item -ItemType Junction -Path "path\to\dota2-minify\Minify\mods\My Mod Name" -Target "path\to\mod-template\src"Linux / macOS:
ln -s /path/to/mod-template/src /path/to/dota2-minify/Minify/mods/"My Mod Name"This repository includes a GitHub Actions workflow that automatically packages src/ into a downloadable zip file and creates a GitHub Release when you push a version tag:
# Tag a new version
git tag v1.0.0
# Push the tag to trigger the automated release workflow
git push origin v1.0.0Once pushed, GitHub Actions will:
- Bundle all mod files in
src/into<repo-name>.zip. - Create a new GitHub Release with the zip file attached and auto-generated release notes.
Defines mod metadata, dependencies, conflicts, and configurable settings in the Minify GUI.
{
"name": "My Custom Mod",
"author": "Author Name",
"description": "Short summary of what this mod does.",
"version": "1.0.0",
"category": "huds",
"settings": [
{
"key": "hide_hud",
"text": "Hide HUD Elements",
"type": "checkbox",
"default": true
},
{
"key": "theme_variant",
"text": "UI Theme",
"type": "combo",
"items": ["dark", "light", "minimal"],
"default": "dark"
},
{
"key": "custom_title",
"text": "Header Title",
"type": "inputbox",
"default": "Enhanced HUD"
},
{
"key": "accent_color",
"text": "Glow Color",
"type": "color",
"default": "#00FFCC"
},
{
"key": "hud_opacity",
"text": "HUD Opacity",
"type": "slider",
"min": 0,
"max": 1,
"step": 0.05,
"default": 0.85
},
{
"key": "run_utility",
"text": "Execute Custom Action",
"type": "button"
}
]
}| Type | Description | Default / Format |
|---|---|---|
checkbox |
Boolean on/off switch | true or false |
combo |
Dropdown selection | Array of string items |
inputbox |
Text input field | String |
color |
Color picker | Hex color string ("#RRGGBB") |
slider / number |
Numeric slider / stepper | min, max, step, default |
button |
Action button | Calls function in script_utility.py |
Replaces targeted game files with empty 0-byte or blank assets (disabling visual or sound effects).
#if:<key>[:true|false|<value>]β Opens a conditional block (nestable). Defaults to expectingtrueif:boolis omitted.#endif[:<key>]β Closes the conditional block.<&setting_key>β Interpolates user settings into file paths.>>path/β Matches directory prefix.**patternβ Matches rg pattern across game files.*-patternβ Excludes directory pattern.--exact_pathβ Excludes single file.
# Always blanked
panorama/images/hud/ad_banner.vsvg
# Conditional block
#if:hide_hud
panorama/images/hud/decorations/**
panorama/images/hud/flames_<&theme_variant>.vsvg
# Nested condition
#if:hide_minimap:true
materials/ui/minimap/borders/**
#endif:hide_minimap
# Inverted boolean condition
#if:enable_sounds:false
sounds/ui/ambient_hum.vsnd_c
#endif:enable_sounds
#endif:hide_hud
Injects custom styling directly into game Panorama stylesheets.
/* g:panorama/styles/... */β Target stylesheet in game VPK (pak01_dir.vpk)./* c:panorama/styles/... */β Target stylesheet in core VPK (dota_core/pak01_dir.vpk).
/* if:<key>[:true|false|<value>] */β Opens a conditional CSS block./* endif[:<key>] */β Closes the conditional CSS block.<&setting_key>β Injects setting values (colors, opacities, dimensions, font names).
/* g:panorama/styles/hud/dota_hud_dashboard */
.DashboardRoot {
opacity: <&hud_opacity>;
}
/* if:hide_hud */
.DashboardDecoration,
#HeaderGlowEffect {
visibility: collapse;
/* if:theme_variant:dark */
background-color: #000000;
/* endif:theme_variant */
}
.HeroAccentBox {
border: 2px solid <&accent_color>;
box-shadow: 0 0 10px <&accent_color>;
}
/* endif:hide_hud */Modifies Panorama XML layout trees during build time before compilation.
set_attributeβ Sets or updates an attribute on matching element(s).add_childβ Appends XML snippet as a child of matching element.insert_beforeβ Inserts XML snippet before matching element.insert_afterβ Inserts XML snippet after matching element.move_intoβ Moves matching element intonew_parent_selector.add_style_includeβ Adds a<include src="..." />to<styles>.add_scriptβ Adds a<include src="..." />to<scripts>.
{
"panorama/layout/hud/dota_hud_root.xml": [
{
"if": "hide_hud",
"action": "set_attribute",
"selector": "#TopBarFlames",
"attribute": "style",
"value": "visibility: collapse;"
},
{
"action": "set_attribute",
"selector": "#CustomStatsBox",
"attribute": "style",
"value": "opacity: <&hud_opacity>; background-color: <&accent_color>;"
},
{
"if": "theme_variant:minimal",
"action": "add_child",
"selector": "#HUDHeader",
"xml": "<Panel id='MinimalIndicator' class='Theme-<&theme_variant>' hittest='false' />"
}
]
}Redirects an existing game asset to load content from another asset path inside the VPK.
{
"panorama/images/hud/cursor.png": {
"source": "panorama/images/hud/cursors/<&theme_variant>_cursor.png",
"if": "hide_hud"
},
"sounds/ui/ping.vsnd_c": {
"source": "sounds/ui/ping_minimal.vsnd_c",
"if": "custom_sounds:true"
},
"materials/ui/default_banner.vmat_c": "materials/ui/banners/<&theme_variant>_banner.vmat_c"
}Decompiles target compiled resources, finds string references matching source paths, and rewires them to destination paths before recompilation.
{
"models/heroes/common_hero_*.vmdl_c": {
"if": "theme_variant:minimal",
"redirects": {
"materials/models/heroes/glow_default.vmat": "materials/models/heroes/glow_<&theme_variant>.vmat"
}
},
"panorama/layout/dashboard.xml": {
"if": "hide_hud:true",
"s2r://panorama/images/decorations/border.vtex": "s2r://panorama/images/empty.vtex"
}
}| Script Name | Execution Timing | Purpose |
|---|---|---|
script_utility.py |
UI button click | Contains functions called when clicking "type": "button" in manifest.json. |
script_initial.py |
Before patch cycle starts | Pre-flight checks or downloading remote data. |
script.py |
During mod patch loop | Mod-specific setup or file generation. |
script_after_decompile.py |
After S2V decompilation | Modifying decompiled XMLs, stylesheets, or materials. |
script_after_recompile.py |
After resourcecompiler | Post-compilation adjustments. |
script_after_patch.py |
Build completion | Final notifications or external synchronization. |
script_uninstall.py |
Mod uninstalled | Cleaning up custom external state. |
Shown in Minify's mod details modal. Supports multi-language tabs using <!-- lang:<code> -->:
<!-- lang:en -->
English notes with markdown support.
<!-- lang:tr -->
Markdown destekli TΓΌrkΓ§e notlar