Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Egezenn/dota2-minify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

Is this safe to use?

This project has been around since 2022 with thousands of downloads and users. While binaries are offered for ease of use, anyone can compile it themselves.

The only valid source to get the software is from GitHub Releases or the website. Releases are built via GitHub Workflows with no intervention, we do not distribute elsewhere.

No one has ever been banned for the use of these mods and alike. Minify strictly deals with VPK modifications and not hacking concepts like memory/file manipulation. It utilizes Valve's approved methods (VPK loading) for creating assets, as documented on the official Valve Wiki. Historically Valve has only disabled assets from loading and never punished modders. The worst thing that can happen is a mod stops working and that's it.

Installation

  1. Download Minify

tools-instruction-1

  • Select Properties > DLC.
    • On Linux, you need to force the use of Proton Experimental and have wine package installed. Relaunch steam if you still don't see the DLC.

tools-instruction-2

  • Install Dota 2 Workshop Tools DLC.

Warning

For people using Minify on Linux with workshop tools!

After patching, extract your workshop tools using the Gearcog button > Extract workshop tools (this is for later use so that you won't have to switch back and forth again) and go back to using a Steam Runtime as you'll not be able to queue games with Proton Experimental.

tools-instruction-3

  1. Run Minify

    • Extract the ZIP file.
    • Ensure that you have execution permissions for the Minify executable, run and patch with the mods and the language you want to use.

language-instruction-1

language-instruction-2

  1. Setting the language argument for Dota2 on Steam

    • Right-click on Dota2 in Steam and click Properties.
    • For English: Add -language minify to your launch options.
    • For Other Languages: Select the language you want to patch with on the top bar and add -language language_id

language-instruction-3

  1. Start Dota 2
    • Launch Dota2 and enjoy!

Community mods

In our Discord server we have a forum in which you can find more mods!

Optional Setup

Using the project locally

Prerequisites are git, python and uv. (also tk for tkinter and wine for workshop tools executables)

  • git clone https://github.com/Egezenn/dota2-minify
  • cd dota2-minify
  • uv run Minify

Compilation from source

For instructions, refer to the workflow.

Troubleshooting

Antivirus software flagged it / I don't see an executable

Exclude the folder from your antivirus software(s).

Why though?

These are false-positives caused by people generating similiar compilation/hashes for malwares via the same compilers we're using and we don't have a signing certificate to resolve this as the project is relatively small.

How do I trust it?

Binaries are released directly from GitHub's build system and there aren't any modifications done from us after releases. If you don't like the executable we're providing, you can run it with Python or build it completely yourself. Instructions for both are included in the readme.

VAC dialog

Verify your files from Steam, this happens every so often randomly and is NOT related to anything the program does.

Things are broken!

Try uninstalling the mods. If that doesn't work aswell try using the feature below (it'll delete all the contents of dota 2 beta/game/dota_<language>!)

clean-all-language-paths

It doesn't work / open!

Make a bug report on GitHub or Discord with the contents of your logs folder.

Developing mods

Minify has a programmatical approach to most modifications to keep everything minimal and simple. If there isn't a method available for your needs, you can always upload your mod files in mods/<mod_name>/files to be directly included into the pak minify is going to create or include a python script to accomodate specific behavior.

For most changes, you do not need to reopen the application. Try opening it again if you encounter undesired behavior.

Mod files and explanations

mods
├── <mod_name>
│   ├── files
│   │   ├── <path_to_file_in_pak>
│   │   ├── <...>
│   │   └── <...>
│   ├── blacklist.txt
│   ├── menu.xml
│   ├── modcfg.json
│   ├── notes_<language>.txt
│   ├── script.py
│   ├── script_after_decompile.py
│   ├── script_after_recompile.py
│   ├── script_uninstall.py
│   ├── styling.txt
│   └── xml_mod.json

modcfg.json

{ // defaults doesn't need to be indicated
  "always": false, // false by default, apply them without checking mods.json or checkbox
  "dependencies": ["<mod>"], // None by default, add a mod dependency's name here 
  "order": 1, // default is 1, ordered from negative to positive to resolve any conflicts
  "visual": true // true by default, show it in the UI as a checkbox
}

files directory

This directory will include any files put here into the pak that minify is going to create. These files should be compiled.

If not specifically protected by Dota2, these files will override any game content. This also applies for the rest of the modification methods available.

blacklist.txt

This file is a list of path to files used to override those with blanks. Supported file types can be found in bin/blank-files.

A list of all the files (from the game pak) can be found in bin/gamepakcontents.txt.

Syntax for this file starting from the line beginning is as follows:
#: Comments
>>: Directories
**: RegExp patterns
*-: RegExp patterns for exclusion
--: Exclusions (for when you want to exclude specific files from bulk additions)

After that with no blank spaces you put the path to the file you want to override. path/to/file

particles/base_attacks/ranged_goodguy_launch.vpcf_c
>>particles/sprays
**taunt.*\.vsnd_c

styling.txt

This file is a list of CSS paths and styling that will be appended to them.
By the nature of this method modifications done here may break the original XML or CSS that gets updated resulting in a bad layout.
In such cases, a repatch or a slight modification is required.

If you encounter errors while patching, it's most likely that your CSS is invalid or the path is wrong. Check logs/resourcecompiler.txt for more information.

For Source 2 flavored CSS properties, refer to: Valve Developer Community Wiki.
To live inspect the layout, open the workshop tools and press F6 and select the element you'd like to select from the XML.

Syntax for this file starting from the line beginning is as follows:
#: Comments
!: By default, the file is pulled from dota 2 beta/game/dota/pak01_dir.vpk.
However to change this behavior and pull files from dota 2 beta/game/core/pak01_dir.vpk, you can use this.
@@: Links to raw data

path/to/vcss_file_without_extension @@ #example_id { property: value; }

script.py

If and when there is a specific behavior to be automated you can include a python script along with your mod. You can find the template below.

Appending _initial, _after_decompile, _after_recompile, _uninstall to your script's name will adjust when it'll be executed. Thus giving you the full control of how your mod can be handled. By default it executes while iterating over each mod when you are patching.

# This script template can be run both manually and from minify.
# You are able to use packages and modules from minify (you need an activated environment from the minify root or running with the tool `uv` can automatically handle this.)
import os
import sys

current_dir = os.path.dirname(os.path.abspath(__file__))
minify_root = os.path.abspath(os.path.join(current_dir, os.pardir, os.pardir))
os.chdir(minify_root)

if minify_root not in sys.path:
    sys.path.insert(0, minify_root)

# Any package or module native to minify can be imported here
# import requests
#
# import mpaths
# ...


def main():
    pass
    # Code specific to your mod goes here, minify will try to execute this block.
    # If any exceptions occur, it'll be written to `logs` directory


if __name__ == "__main__":
    main()

xml_mod.json

to be written

menu.xml

to be written

Tools of the trade

to be written

Thanks

This project wouldn't be available without the work of the community. Thanks to everyone that has contributed to the project over GitHub with issues & contributions or Discord!

Special thanks to

contributors

Mod Author Other
Auto Accept Match MeGaNeKoS
Auto Language Dialog Accept MeGaNeKoS
Custom Backgrounds Egezenn
D2PT Hero Grids Egezenn Dota2ProTracker Meta Hero Grids
Dark Terrain robbyz512
Minify Base Attacks robbyz512
Minify Spells & Items robbyz512
Misc Optimization robbyz512
Mute Ambient Sounds robbyz512
Mute Default Announcer Egezenn
Mute Taunt Sounds robbyz512
Mute Voice Line Sounds robbyz512
OpenDotaGuides Guides Egezenn Project
Remove Foilage robbyz512
Revamp Hero Grid Layout Egezenn
Remove Hero Renders Egezenn
Remove Main Menu Background Egezenn
Remove Pings robbyz512
Remove River robbyz512
Remove Showcases Egezenn
Remove Sprays robbyz512
Remove Weather Effects robbyz512
Repopulate Unit Query HUD MeGaNeKoS
Reposition & Rescale HUD robbyz512
Revert Ping Sounds Egezenn
Show NetWorth MeGaNeKoS
Stat Site Buttons Egezenn Generalized off of Dotabuff in Profiles by yujin sharingan
Transparent HUD ZerdacK Egezenn
Tree Mod robbyz512
User Styles Egezenn

Dependencies

Binaries

Name Usage License
Python Core language PSFL license
Source 2 Viewer Decompilation of assets and game VPK filelisting MIT license
ripgrep Blacklist generation with RegExp patterns Unlicense & MIT license

Python packages

Name Usage License
dearpygui GUI MIT license
json-with-comments JSON parsing with comments MIT license
playsound3 Playing simple sounds MIT license
psutil Checking Dota2 processes existence BSD-3-Clause license
PyInstaller Compilation GPLv2 or later + additional properties
requests Downloading/querying project dependencies Apache-2.0 license
screeninfo Calculation of the initial position for the main window MIT license
vdf Serializing VDFs MIT license
vpk Creating VPKs and getting file content list in VPKs MIT license

License

Contents of this repository are licensed under GPL-3.0, however some files in Minify/mods/*/files may contain assets that originate from Dota2 itself, with or without modifications to them.

About

Dota2 Mod Patcher & Toolkit for everyone to use mods easily

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Languages