Skip to content
Robby Attila edited this page Nov 12, 2024 · 16 revisions

File Structure

Read VPK Basics first. You should understand what steam file extensions look like and what the VPK folder is.

In Minify mods are the folders you find in your "mods" directory. Every mod in Minify uses this structure.

ExampleMod
   files
   blacklist.txt
   styling.txt    

files

These are files that will simply be put into the VPK. They should already be compiled.


blacklist.txt

Any paths you add here will be replaced by blank files, it is how you prevent sounds, particles, models, textures...etc from loading into the game.

sounds\ambient\horn_dire.vsnd_c
sounds\ambient\horn_radiant.vsnd_c
  • The supported files that can be replaced are extensions inside the "bin/blank-files" folder of the project.
  • Minify validates you are using correct extensions in your paths.
  • It does not check if the path exists in the VPK so for example if you typed path\to\randomfile.vsnd_c it would still be created and no warnings will be shown so make sure you have no typos. Because validating every file is too slow although I plan to make a faster one later.
  • lines beginning with # are treated as comments

@@ prefix

Adding @@ at the beginning lets you use a URL to fetch paths from your text file online. This is useful if others are using your mods because you wouldn't need to send everyone your updated files.

@@https://www.example.com/blacklist.txt

>> prefix

Adding >> at the beginning will blacklist everything in a folder in the VPK.

>>particles\prime
  • Be careful because dota might be adding files to your blacklisted folders in future updates. So use it on very specific folders that don't add new features.

styling.txt

Apply your own custom CSS to the panorama and any other .vcss files steam uses. Valve Panorama Wiki

Example

panorama\styles\hud\dota_hud_top_bar @@ DOTATopBar{ui-scale: 75%;} #TimeOfDay{ui-scale: 125%;} #TimeOfDayBG{ui-scale: 125%;}
Path Divider Style
panorama\styles\hud\dota_hud_top_bar @@ DOTATopBar{ui-scale: 75%;} #TimeOfDay{ui-scale: 125%;} #TimeOfDayBG{ui-scale: 125%;}
  • Minify validates styling.txt paths exist before extracting.
  • It does not validate your CSS because Panorama uses their own CSS rulesets and a validator would have to be written from scratch. If it doesn't work you probably made a typo. Test how everything looks with the Panorama first.
  • It is possible to link a remote styling.txt like with blacklist.txt

Adding your mod

To add your mod to Minify so you can patch with it.

  1. Create a folder in "dota2-minify/mods" for example "MyMod"
  2. Open mpaths.py and add "MyMod" to one of the items in "enabled_mods"

I plan to improve the developer experience in the future but for now we struggle. Message me on discord if you are stuck.

Compiling Minify

I recommend Nuitka you can also use pyinstaller.

  1. Download Python 3.12.7

  2. Install requirements

pip install -r requirements.txt

  1. Create executable

python -m nuitka --mingw64 --enable-plugin=tk-inter --windows-disable-console --include-module=helper --include-module=mpaths --include-module=validatefiles --windows-icon-from-ico=bin/images/favicon.ico --standalone gui.pyw

  1. Extract files from decompiler.zip into project

  2. Run Minify.exe

Using Minify with a different language in dota2

  1. Go to your Steam Launch Options --> https://imgur.com/KTfqXUg
  2. For example if you want Spanish set your launch option to "-language spanish"
  3. Navigate to Steam\steamapps\common\dota 2 beta\game\dota_minify
  4. Copy the pak01_dir.vpk file into Steam\steamapps\common\dota 2 beta\game\dota_spanish

You must also have the language pack installed in Windows.

Valid Languages

Language Name
한국어 (Korean) koreana
简体中文 (Simplified Chinese) schinese
繁體中文 (Traditional Chinese) tchinese
Português Brasileiro (Brazilian Portuguese) brazilian
Español latinoamericano (Latin American Spanish) latam
Русский (Russian) russian
Español (Spanish) spanish
Français (French) french
Italiano (Italian) italian
Deutsch (German) german
Ελληνικά (Greek) greek
ไทย (Thai) thai
日本語 (Japanese) japanese
Português (Portuguese) portuguese
Polski (Polish) polish
Dansk (Danish) danish
Nederlands (Dutch) dutch
Suomi (Finnish) finnish
Norsk (Norwegian) norwegian
Svenska (Swedish) swedish
Čeština (Czech) czech
Magyar (Hungarian) hungarian
Română (Romanian) romanian
Български (Bulgarian) bulgarian
Türkçe (Turkish) turkish
Українська (Ukrainian) ukrainian
Tiếng Việt (Vietnamese) vietnamese