Skip to content

Commit

Permalink
1.06e
Browse files Browse the repository at this point in the history
  • Loading branch information
robbyz512 committed Jun 12, 2024
1 parent 1c2f65a commit 2b0b44f
Show file tree
Hide file tree
Showing 22 changed files with 121 additions and 71 deletions.
Binary file modified bin/images/screenshot-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 33 additions & 19 deletions gui.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import mpaths
import validatefiles
import helper

version = "1.06d"
version = "1.06e"

# widget vars
btnXpad = 8
Expand Down Expand Up @@ -63,6 +63,16 @@ def welcomeMsg():
-------------------------------------------------------
""")

def failureMsg():
print(r""":( Failed to connect to
https://github.com/robbyz512/dota2-minify-remote/tree/remote-data
Either you are not connected to the internet or your network configuration is not allowing this app to make requests to Github
Minify may not work correctly.
-------------------------------------------------------
""")

class Extension:
def __init__(self, path):
self.path = path
Expand Down Expand Up @@ -145,17 +155,17 @@ class App():
# Buttons
self.patchBtn = tk.Button(self.buttonsFrame, text='Patch', state=tk.NORMAL, width=btnW, takefocus=False, command=lambda:threading.Thread(target=self.patcher, daemon=True).start())
self.patchBtn.grid(row=10, column=0, pady=btnYpad, padx=btnXpad, sticky='w')
self.helpBtn = tk.Button(self.buttonsFrame, text='Help', state=tk.NORMAL, width=btnW, takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(mpaths.help_url), daemon=True).start())
self.helpBtn = tk.Button(self.buttonsFrame, text='Help', state=tk.NORMAL, width=btnW, takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(helper.help_url), daemon=True).start())
self.helpBtn.grid(row=10, column=1, pady=btnYpad, padx=btnXpad, sticky='w')
self.updateBtn = tk.Button(self.buttonsFrame, text='Update', state=tk.NORMAL, width=btnW, takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(mpaths.update_url), daemon=True).start())
self.updateBtn = tk.Button(self.buttonsFrame, text='Update', state=tk.NORMAL, width=btnW, takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(helper.update_url), daemon=True).start())
self.updateBtn.grid(row=11, column=0, pady=btnYpad, padx=btnXpad, sticky='w')
self.uninstallBtn = tk.Button(self.buttonsFrame, text='Uninstall', width=btnW, takefocus=False, command=lambda:threading.Thread(target=self.uninstaller, daemon=True).start())
self.uninstallBtn.grid(row=11, column=1, pady=btnYpad, padx=btnXpad, sticky='w')
self.versionLabel = tk.Label(self.buttonsFrame, font=("None", 8), width=20)
self.versionLabel.grid(row=12, column=0, sticky='w')
self.newVersionLabel = tk.Label(self.buttonsFrame, font=("None", 8, "bold"), width=20)
self.newVersionLabel.grid(row=13, column=0, sticky='w')
self.discordBtn = tk.Button(self.buttonsFrame, text='Discord', width=btnW, takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(mpaths.discord_url), daemon=True).start())
self.discordBtn = tk.Button(self.buttonsFrame, text='Discord', width=btnW, takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(helper.discord_url), daemon=True).start())
self.discordBtn.grid(row=14, column=0, pady=btnYpad, padx=btnXpad, sticky='w')
self.exitBtn = tk.Button(self.buttonsFrame, text='Exit', width=btnW, takefocus=False, command=self.exit)
self.exitBtn.grid(row=14, column=1, pady=btnYpad, padx=btnXpad, sticky='w')
Expand All @@ -168,20 +178,23 @@ class App():
self.devLabel = tk.Label(self.consoleFrame, font=("Tahoma", 10))
self.devLabel.config(text="Minify 2.0 under development", fg="#FF8C00")
self.devLabel.grid(row=1, column=0, pady=4, sticky='s')
self.devbtn = tk.Button(self.consoleFrame, text='Preview 2.0', width=22, height=1, font=("None", 8, "bold"), takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(mpaths.new_version), daemon=True).start())
self.devbtn = tk.Button(self.consoleFrame, text='Preview 2.0', width=22, height=1, font=("None", 8, "bold"), takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(helper.new_version), daemon=True).start())
self.devbtn.grid(row=1, column=0, pady=4, sticky='e')

self.donateLabel = tk.Label(self.consoleFrame, font=("Tahoma", 10))
self.donateLabel.config(text="Support the Project", fg="#FF8C00")
self.donateLabel.grid(row=2, column=0, pady=4, sticky='s')
self.donateBtn = tk.Button(self.consoleFrame, text='Donation Page', width=22, height=1, font=("None", 8, "bold"), takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(mpaths.donations_url), daemon=True).start())
self.donateBtn = tk.Button(self.consoleFrame, text='Donation Page', width=22, height=1, font=("None", 8, "bold"), takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(helper.donations_url), daemon=True).start())
self.donateBtn.grid(row=2, column=0, pady=4, sticky='e')

# redirects stdout and stderror to text box widget, which means print statements will not appear in the gui until these two lines are ran
sys.stdout = TextRedirector(self.consoleText, "stdout")
sys.stderr = TextRedirector(self.consoleText, "stderr")

welcomeMsg()
if helper.response.status_code == 200:
welcomeMsg()
else:
failureMsg()

def setupSystem(self):
x = validatefiles.MyClass(checkboxes, self.root)
Expand Down Expand Up @@ -210,20 +223,21 @@ class App():
if helper.workshop_installed == False:
helper.disableWorkshopMods(mpaths.mods_dir, mpaths.mods_folders, checkboxes)

if version == mpaths.latest_version_url:
self.updateBtn.config(state='disabled')
self.versionLabel.config(fg="#0cb6b3")
self.versionLabel.config(text=f"Latest version {version}")
if helper.latest_version_url == None:
pass
else:
self.updateBtn.config(state='normal', fg='#0cb6b3', activeforeground='#0cb6b3')

self.newVersionLabel.config(fg='#0cb6b3')
self.newVersionLabel.config(text=f"New version! {mpaths.latest_version_url}")

self.versionLabel.config(fg="red")
self.versionLabel.config(text=f"Your version {version}")
if version == helper.latest_version_url:
self.updateBtn.config(state='disabled')
self.versionLabel.config(fg="#0cb6b3")
self.versionLabel.config(text=f"Latest version {version}")
else:
self.updateBtn.config(state='normal', fg='#0cb6b3', activeforeground='#0cb6b3')

self.newVersionLabel.config(fg='#0cb6b3')
self.newVersionLabel.config(text=f"New version! {helper.latest_version_url}")

# 0cb6b3
self.versionLabel.config(fg="red")
self.versionLabel.config(text=f"Your version {version}")

def uninstaller(self):

Expand Down
28 changes: 27 additions & 1 deletion helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,32 @@
import tkinter
import urllib.error
from urllib.request import urlopen
import requests
import yaml

workshop_installed = False

# # ---------------------------------------------------------------------------- #
# # Connect Remote #
# # ---------------------------------------------------------------------------- #
response = requests.get('https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/data.yaml')

if response.status_code == 200:
data = yaml.safe_load(response.text)

latest_version_url = data.get('latest_version')
discord_url = data.get('discord')
donations_url = data.get('donations')
help_url = data.get('help')
new_version = data.get('minify_2')
update_url = data.get('releases')
else:
latest_version_url = None
discord_url = None
donations_url = None
help_url = None
new_version = None
update_url = None
# ---------------------------------------------------------------------------- #
# Warnings #
# ---------------------------------------------------------------------------- #
Expand Down Expand Up @@ -124,7 +147,10 @@ def cleanFolders(build_dir, logs_dir, content_dir, game_dir, minify_dir, dota_mi
os.makedirs(os.path.join(minify_dir, 'build'))

def urlDispatcher(url):
webbrowser.open(url)
if url == None:
print("Could not connect to Github")
else:
webbrowser.open(url)

def getBlankFileExtensions(blank_files_dir):
extensions = []
Expand Down
4 changes: 3 additions & 1 deletion mods/Dark Terrain/notes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Designed to make heroes and spells be as visible as possible so nothing blends into the terrain.

* Must have default dota2 terrain equipped
* Must turn OFF grass in video options in your dota2 settings

- Makes all tiles gray/dark gray
Expand All @@ -11,4 +12,5 @@ Designed to make heroes and spells be as visible as possible so nothing blends i
- Custom shopkeepers
- Other miscellaneous texture improvements to fit map theme

Adjust brightness of your monitor or dota2 video settings if it's too dark
Adjust brightness of your monitor or dota2 video settings if it's too dark
Join Discord to find alternative tilesets
8 changes: 4 additions & 4 deletions mods/Misc Optimization/notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Removes many unneeded effects from the game to improve performance, a few exampl
- Removes particle effects on buildings such as the glowing blue effects on fountain, outpost, base buildings..etc
- Tower attack projectile/destruction particles
- Effigies particles
- Simplified illusions, helps with fps drops against Naga/PL especially.
- hero loadouts, event emblems...etc
- Simplified illusions, helps with fps drops against heroes with many illusions suddenly appearing
- hero loadouts, event emblems, glyph...etc

If you want to see full list go here.
bin/modpaths/Misc Optimization/blacklist.txt
If you want to see full list go to the link in.
mods\Misc Optimization\blacklist.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Remove%20Taunt%20Sounds/blacklist.txt
@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Mute%20Ambient%20Sounds/blacklist.txt
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Remove%20Ambient%20Sounds/blacklist.txt
@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Mute%20Taunt%20Sounds/blacklist.txt
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Remove%20Battlepass%20Sounds/blacklist.txt
@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Mute%20Voice%20Line%20Sounds/blacklist.txt
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"chat_wheel"
{
"hero_messages"
{

}
}
4 changes: 4 additions & 0 deletions mods/Mute Voice Line Sounds/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Hides and mutes all DotaPlus Hero chatwheel sounds
https://dota2.fandom.com/wiki/Chat_Wheel/Dota_Plus
- Mutes all other DotaPlus chatwheel sounds
- Mutes all voice lines from battlepasses
File renamed without changes.
3 changes: 1 addition & 2 deletions mods/READ_BEFORE_EDITING.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Editing files in this folder is not recommended and you should know what you are doing.
Eventually this project will have more user friendly customization.
Editing files in this folder is not recommended and you should know what you are doing.
1 change: 1 addition & 0 deletions mods/Remove Foilage/notes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Removes all the bushes, flowers, rocks and any other ground props so you just have tiles.
This improves FPS a lot since it reduces the number of draw calls your GPU has to make.

- Must have default dota2 terrain equipped in your inventory
- Remember to turn off grass in dota2 video settings.
6 changes: 4 additions & 2 deletions mods/Saiyan Mod/notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Changes sound effects to dragonball ones (level up, runes, blink..etc)
Changes visuals and sound effects to dragonball related.

https://rumble.com/v274sg0-dota2-saiyan-mod.html
https://rumble.com/v274sg0-dota2-saiyan-mod.html

RIP Akira Toriyama
25 changes: 3 additions & 22 deletions mpaths.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import os
import winreg
import traceback
import requests
import yaml
from urllib.request import urlopen

try:
hkey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\WOW6432Node\Valve\Steam")
Expand Down Expand Up @@ -52,22 +49,6 @@
gi_file_default = os.path.join(bin_dir, "gi_files\\default\\gameinfo_branchspecific.gi")
gi_file_patched = os.path.join(bin_dir, "gi_files\\patched\\gameinfo_branchspecific.gi")

# -------------------------------- remote data ------------------------------- #
response = requests.get('https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/data.yaml')

if response.status_code == 200:
data = yaml.safe_load(response.text)

latest_version_url = data.get('latest_version')
discord_url = data.get('discord')
donations_url = data.get('donations')
help_url = data.get('help')
new_version = data.get('minify_2')
update_url = data.get('releases')

else:
print("Failed to fetch data from the URL")

# dota2 paths
content_dir = os.path.join(steam_dir, "steamapps\\common\\dota 2 beta\\content\\dota_addons\\minify")
game_dir = os.path.join(steam_dir, "steamapps\\common\\dota 2 beta\\game\\dota_addons\\minify")
Expand All @@ -88,13 +69,13 @@
'Minify HUD',
'Minify Spells & Items',
'Misc Optimization',
'Remove Ambient Sounds',
'Remove Battlepass Sounds',
'Mute Ambient Sounds',
'Mute Taunt Sounds',
'Mute Voice Line Sounds',
'Remove Foilage',
'Remove Pinging',
'Remove River',
'Remove Sprays',
'Remove Taunt Sounds',
'Remove Weather Effects',
'Show NetWorth',
'Saiyan Mod',
Expand Down
30 changes: 17 additions & 13 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<img src="https://img.shields.io/badge/License-GPLv3-blue.svg">
</p>

<h4 align="center" style="font-weight: bold;">Modding is awesome</h4>
<h4 align="center" style="font-weight: bold; font-size:15px">All in one smart patcher for Dota2 to install all types of mods</h4>

<br>

<p align="center" style="font-size: 16px">
<span>✔️500+ Spells Simplified •</span>
<span>✔️7,000+ files modded •</span>
<span>✔️8,000+ files modded •</span>
<span>✔️Boost FPS •</span>
<span>✔️Creator Toolkit</span>
<span>✔️Creator Toolkit</span>
</p>

<p align="center">
Expand All @@ -28,9 +28,14 @@
<img src="bin/images/screenshot-4.jpg">
</p>


<hr>

## :information_desk_person: Is this safe to use?

This open-source project has been around for over 3 years with thousands of downloads and users. While binaries are offered for ease of use, anyone can compile it themselves.

Nobody has ever been banned either. This project focuses on mods -- NO hacks, utilizing Valve's approved methods (VPK loading) for creating assets, as documented on the official Valve Wiki. Historically Valve just disabled problematic assets from loading and never punished modders. Worst thing that can happen is a mod stops working and that's it.

## :rocket: Installation

[Dota 2 Workshop Tools](https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools) must be installed to use mods that edit the Interface like "Minify HUD". Skip step 1 if you don't want those.
Expand All @@ -45,13 +50,13 @@

<hr>

**Optional**: To compile project from source [Click Here for instructions](https://github.com/robbyz512/dota2-minify/wiki/Minify#compiling-minify)
**Optional**: To compile project from source [Click Here for instructions](https://github.com/robbyz512/dota2-minify/wiki/Minify#compiling-minify)

**Optional**: If you want to manually get Decompiler.exe and libSkiaSharp.dll

1. Open https://github.com/SteamDatabase/ValveResourceFormat/releases

2. Download "Decompiler-windows-x64.zip" (Get latest or use 5.0 if you have problems)
2. Download "Decompiler-windows-x64.zip"

3. Extract both files into Minify folder.

Expand Down Expand Up @@ -95,25 +100,24 @@ Once you get comfortable with the workflow you can use Minify to easily patch la

## :fast_forward: Future of this project - Minify 2.0

- Very customziable that makes editing mods or editing anything in dota2 easy without any experience in modding.
- Very customziable that makes editing mods or editing anything in dota2 easy without any experience in modding.

- Adjust settings within Minify and instantly see changes in realtime while you are playing dota2
- Adjust settings within Minify and instantly see changes in realtime while you are playing dota2

- Builder tab to create, export and submit your mods to the community. With a dashboard to update your files at any time for your users.
- Builder tab to create, export and submit your mods to the community. With a dashboard to update your files at any time for your users.

- Say goodbye to dealing with outdated and broken mods, Minify will recompile every file now.
- Say goodbye to dealing with outdated and broken mods, Minify will recompile every file now.

- Fullstack application with backend web server to create accounts and upload/share/follow each others works.
- Fullstack application with backend web server to create accounts and upload/share/follow each others works.

### For Developers:

New app is being built with [Django](https://www.djangoproject.com/) and [Pywebview](https://pywebview.flowrl.com/) send a message on [Discord](https://discord.com/invite/2YDnqpbcKM) if you want to help.


<p align="center">
<img src="bin/images/screenshot-5.jpg">
<img src="bin/images/screenshot-6.jpg">
<img src="bin/images/screenshot-7.jpg">
</p>

<p align="right">(<a href="#top">back to top</a>)</p>
<p align="right">(<a href="#top">back to top</a>)</p>
Loading

0 comments on commit 2b0b44f

Please sign in to comment.