diff --git a/bin/images/screenshot-4.jpg b/bin/images/screenshot-4.jpg index 1a30c40..70cdf1e 100644 Binary files a/bin/images/screenshot-4.jpg and b/bin/images/screenshot-4.jpg differ diff --git a/gui.pyw b/gui.pyw index d7c3f7e..50db686 100644 --- a/gui.pyw +++ b/gui.pyw @@ -28,7 +28,7 @@ import mpaths import validatefiles import helper -version = "1.06d" +version = "1.06e" # widget vars btnXpad = 8 @@ -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 @@ -145,9 +155,9 @@ 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') @@ -155,7 +165,7 @@ class App(): 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') @@ -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) @@ -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): diff --git a/helper.py b/helper.py index 3fa9a33..1119607 100644 --- a/helper.py +++ b/helper.py @@ -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 # # ---------------------------------------------------------------------------- # @@ -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 = [] diff --git a/mods/Dark Terrain/notes.txt b/mods/Dark Terrain/notes.txt index c6853c0..ba5ec29 100644 --- a/mods/Dark Terrain/notes.txt +++ b/mods/Dark Terrain/notes.txt @@ -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 @@ -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 \ No newline at end of file +Adjust brightness of your monitor or dota2 video settings if it's too dark +Join Discord to find alternative tilesets \ No newline at end of file diff --git a/mods/Misc Optimization/notes.txt b/mods/Misc Optimization/notes.txt index 146992f..074e646 100644 --- a/mods/Misc Optimization/notes.txt +++ b/mods/Misc Optimization/notes.txt @@ -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 \ No newline at end of file +If you want to see full list go to the link in. +mods\Misc Optimization\blacklist.txt \ No newline at end of file diff --git a/mods/Remove Taunt Sounds/blacklist.txt b/mods/Mute Ambient Sounds/blacklist.txt similarity index 55% rename from mods/Remove Taunt Sounds/blacklist.txt rename to mods/Mute Ambient Sounds/blacklist.txt index 6935ca6..fb9d30d 100644 --- a/mods/Remove Taunt Sounds/blacklist.txt +++ b/mods/Mute Ambient Sounds/blacklist.txt @@ -1 +1 @@ -@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Remove%20Taunt%20Sounds/blacklist.txt \ No newline at end of file +@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Mute%20Ambient%20Sounds/blacklist.txt \ No newline at end of file diff --git a/mods/Remove Ambient Sounds/files/blank.txt b/mods/Mute Ambient Sounds/files/blank.txt similarity index 100% rename from mods/Remove Ambient Sounds/files/blank.txt rename to mods/Mute Ambient Sounds/files/blank.txt diff --git a/mods/Remove Ambient Sounds/styling.txt b/mods/Mute Ambient Sounds/styling.txt similarity index 100% rename from mods/Remove Ambient Sounds/styling.txt rename to mods/Mute Ambient Sounds/styling.txt diff --git a/mods/Remove Ambient Sounds/blacklist.txt b/mods/Mute Taunt Sounds/blacklist.txt similarity index 54% rename from mods/Remove Ambient Sounds/blacklist.txt rename to mods/Mute Taunt Sounds/blacklist.txt index 13aebc4..869b07b 100644 --- a/mods/Remove Ambient Sounds/blacklist.txt +++ b/mods/Mute Taunt Sounds/blacklist.txt @@ -1 +1 @@ -@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Remove%20Ambient%20Sounds/blacklist.txt \ No newline at end of file +@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Mute%20Taunt%20Sounds/blacklist.txt \ No newline at end of file diff --git a/mods/Remove Battlepass Sounds/files/blank.txt b/mods/Mute Taunt Sounds/files/blank.txt similarity index 100% rename from mods/Remove Battlepass Sounds/files/blank.txt rename to mods/Mute Taunt Sounds/files/blank.txt diff --git a/mods/Remove Battlepass Sounds/styling.txt b/mods/Mute Taunt Sounds/styling.txt similarity index 100% rename from mods/Remove Battlepass Sounds/styling.txt rename to mods/Mute Taunt Sounds/styling.txt diff --git a/mods/Remove Battlepass Sounds/blacklist.txt b/mods/Mute Voice Line Sounds/blacklist.txt similarity index 53% rename from mods/Remove Battlepass Sounds/blacklist.txt rename to mods/Mute Voice Line Sounds/blacklist.txt index 40eef69..00ae52f 100644 --- a/mods/Remove Battlepass Sounds/blacklist.txt +++ b/mods/Mute Voice Line Sounds/blacklist.txt @@ -1 +1 @@ -@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Remove%20Battlepass%20Sounds/blacklist.txt \ No newline at end of file +@@https://raw.githubusercontent.com/robbyz512/dota2-minify-remote/remote-data/Mute%20Voice%20Line%20Sounds/blacklist.txt \ No newline at end of file diff --git a/mods/Remove Taunt Sounds/files/blank.txt b/mods/Mute Voice Line Sounds/files/blank.txt similarity index 100% rename from mods/Remove Taunt Sounds/files/blank.txt rename to mods/Mute Voice Line Sounds/files/blank.txt diff --git a/mods/Mute Voice Line Sounds/files/scripts/chat_wheel_heroes.txt b/mods/Mute Voice Line Sounds/files/scripts/chat_wheel_heroes.txt new file mode 100644 index 0000000..07c2307 --- /dev/null +++ b/mods/Mute Voice Line Sounds/files/scripts/chat_wheel_heroes.txt @@ -0,0 +1,7 @@ +"chat_wheel" +{ + "hero_messages" + { + + } +} diff --git a/mods/Mute Voice Line Sounds/notes.txt b/mods/Mute Voice Line Sounds/notes.txt new file mode 100644 index 0000000..bc36f7f --- /dev/null +++ b/mods/Mute Voice Line Sounds/notes.txt @@ -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 \ No newline at end of file diff --git a/mods/Remove Taunt Sounds/styling.txt b/mods/Mute Voice Line Sounds/styling.txt similarity index 100% rename from mods/Remove Taunt Sounds/styling.txt rename to mods/Mute Voice Line Sounds/styling.txt diff --git a/mods/READ_BEFORE_EDITING.txt b/mods/READ_BEFORE_EDITING.txt index f68c81d..425f544 100644 --- a/mods/READ_BEFORE_EDITING.txt +++ b/mods/READ_BEFORE_EDITING.txt @@ -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. \ No newline at end of file +Editing files in this folder is not recommended and you should know what you are doing. \ No newline at end of file diff --git a/mods/Remove Foilage/notes.txt b/mods/Remove Foilage/notes.txt index cbe8b62..432f0e6 100644 --- a/mods/Remove Foilage/notes.txt +++ b/mods/Remove Foilage/notes.txt @@ -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. \ No newline at end of file diff --git a/mods/Saiyan Mod/notes.txt b/mods/Saiyan Mod/notes.txt index cd4bed1..21c5ab3 100644 --- a/mods/Saiyan Mod/notes.txt +++ b/mods/Saiyan Mod/notes.txt @@ -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 \ No newline at end of file +https://rumble.com/v274sg0-dota2-saiyan-mod.html + +RIP Akira Toriyama \ No newline at end of file diff --git a/mpaths.py b/mpaths.py index 6bb5920..96589e4 100644 --- a/mpaths.py +++ b/mpaths.py @@ -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") @@ -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") @@ -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', diff --git a/readme.md b/readme.md index 263dac9..361411c 100644 --- a/readme.md +++ b/readme.md @@ -10,15 +10,15 @@

-

Modding is awesome

+

All in one smart patcher for Dota2 to install all types of mods


✔️500+ Spells Simplified • - ✔️7,000+ files modded • + ✔️8,000+ files modded • ✔️Boost FPS • - ✔️Creator Toolkit • + ✔️Creator Toolkit

@@ -28,9 +28,14 @@

-
+## :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. @@ -45,13 +50,13 @@
-**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. @@ -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. -

-

(back to top)

\ No newline at end of file +

(back to top)

diff --git a/validatefiles.py b/validatefiles.py index 83406b4..ccc8902 100644 --- a/validatefiles.py +++ b/validatefiles.py @@ -10,8 +10,15 @@ def setFolder(main_window): dialog_root = tk.Tk() dialog_root.withdraw() folder = filedialog.askdirectory() - with open(mpaths.path_file, 'w') as file: file.write(folder) - messagebox.showinfo("","Path saved, go start Minify again.") + + if folder: # Check if the user selected a folder + with open(mpaths.path_file, 'w') as file: + file.write(folder) + messagebox.showinfo("Saved", "Path saved, go start Minify again.") + else: + messagebox.showinfo("Canceled", "You did not select a folder. Exiting.") + + dialog_root.destroy() main_window.destroy() # this class is called with getattr method and calls all functions here alphabetically @@ -30,13 +37,16 @@ def a_isSteamFound(self): def b_isDotaInstallFound(self): dota2path = os.path.join(mpaths.steam_dir, "steamapps\\common\\dota 2 beta\\game\\bin\\win64\\dota2.exe") + normalized_dota2path = os.path.normpath(dota2path) - if not os.path.exists(dota2path): + if not os.path.exists(normalized_dota2path): self.toggle_flag = True message_root = tk.Tk() message_root.withdraw() - messagebox.showinfo("",f"Dota2 not found in '{dota2path}' ---- Select where your 'SteamLibrary' folder is. For example 'D:\SteamLibrary'") + messagebox.showinfo("Dota 2 Not Found", + f"Dota2 not found in\n\n\"{normalized_dota2path}\"\n\n" + "Please select the location of your \"SteamLibrary\" folder, for example \"D:\\SteamLibrary\".") message_root.destroy() setFolder(self.main_window)