Skip to content

Commit

Permalink
1.04.22
Browse files Browse the repository at this point in the history
  • Loading branch information
robbyz512 committed Sep 13, 2022
1 parent a5e35ce commit d67b0d1
Show file tree
Hide file tree
Showing 226 changed files with 77 additions and 15 deletions.
Binary file added bin/images/info.ico
Binary file not shown.
4 changes: 3 additions & 1 deletion bin/modpaths/Misc Optimization/blacklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -382,4 +382,6 @@ particles\econ\events\diretide_2020\emblem\fall20_emblem_v2_effect.vpcf_c
particles\econ\events\diretide_2020\emblem\fall20_emblem_v3_effect.vpcf_c
particles\econ\events\summer_2021\summer_2021_emblem_effect.vpcf.vpcf_c
particles\econ\events\ti10\emblem\ti10_emblem_effect.vpcf_c
particles\econ\events\ti9\ti9_emblem_effect.vpcf_c
particles\econ\events\ti9\ti9_emblem_effect.vpcf_c
#remove-effigy-effects
>>particles\econ\items\effigies\status_fx_effigies
35 changes: 22 additions & 13 deletions gui.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,28 @@
# \/_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/
# ----------------------------------------------------------

# This is the stable branch
# If you are interested in contributing to the project use the developer branch

import os
import sys
from wsgiref import validate
import vpk
import shutil
import psutil
import traceback
import threading
import subprocess
import tkinter as tk
from functools import partial
from idlelib.tooltip import Hovertip
from shutil import copytree, ignore_patterns

import mpaths
import validatefiles
import helper

version = "1.03.22"
version = "1.04.22"

# button size
btnXpad = 5
btnYpad = 10
btnYpad = 8
btnW = 8

patching = False
Expand Down Expand Up @@ -84,7 +81,7 @@ class App():
self.root.title("Minify Dota2")
self.root.iconbitmap('bin/images/favicon.ico')
self.root.resizable(False, False)
self.app_width = 840
self.app_width = 800
self.app_height = helper.getAppHeight(mpaths.mods_folders)
self.screen_width = self.root.winfo_screenwidth()
self.screen_height = self.root.winfo_screenheight()
Expand All @@ -110,7 +107,17 @@ class App():
self.current_box.var = self.current_var
self.current_box.grid(row=index, column=0, sticky='w')
checkboxes[self.current_box] = self.name # so checkbutton object is the key and value is string


mod_path = os.path.join(mpaths.mods_dir, self.name)
notes_txt = os.path.join(mod_path, 'notes.txt')
if os.path.exists(notes_txt) and os.stat(notes_txt).st_size != 0:
self.modLabel = tk.Label(self.checkboxesFrame, font=("Poplar Std", 7), fg="#0000EE", cursor="hand2")
self.modLabel.config(text="details")
self.modLabel.bind("<Enter>", partial(helper.modLabelColorConfig, self.modLabel, "#000010"))
self.modLabel.bind("<Leave>", partial(helper.modLabelColorConfig, self.modLabel, "#0000EE"))
self.modLabel.bind("<Button-1>", partial(helper.modInfo, self.modLabel, self.name, mod_path))
self.modLabel.grid(row=index, column=1, sticky='w')

# 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)
Expand All @@ -131,14 +138,14 @@ class App():
self.exitBtn.grid(row=15, column=0, pady=btnYpad, padx=btnXpad)

# Other Widget
self.consoleText = tk.Text(self.consoleFrame, wrap=tk.WORD, state=tk.DISABLED, width=78, borderwidth=2, bg="#FFFFF7", relief="groove")
self.consoleText = tk.Text(self.consoleFrame, wrap=tk.WORD, state=tk.DISABLED, width=72, borderwidth=2, bg="#FFFFF7", relief="groove")
self.consoleText.grid(row=0,column=0)
self.consoleText.configure(font=("Fixedsys"))
self.devLabel = tk.Label(self.consoleFrame, font=("Tahoma", 8), width=40)
self.devLabel.config(text=f"Want to create Dota2 mods with Minify?")
self.devLabel.place(x=400,y=390)
self.devLabel.config(text="Want to create Dota2 mods with Minify?")
self.devLabel.place(x=340,y=390)
self.devbtn = tk.Button(self.consoleFrame, text='Download Developer Version', width=22, height=1, font=("None", 7), takefocus=False, command=lambda:threading.Thread(target=helper.urlDispatcher(mpaths.dev_version), daemon=True).start())
self.devbtn.place(x=475,y=412)
self.devbtn.place(x=420,y=412)

# 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")
Expand Down Expand Up @@ -228,7 +235,7 @@ class App():
for folder in mpaths.mods_folders:
try:
mod_path = os.path.join(mpaths.mods_dir, folder)
files_total = sum([len(files) for r, d, files in os.walk(os.path.join(mod_path, 'files'))])
# files_total = sum([len(files) for r, d, files in os.walk(os.path.join(mod_path, 'files'))])
blacklist_txt = os.path.join(mod_path, 'blacklist.txt')
styling_txt = os.path.join(mod_path, 'styling.txt')

Expand Down Expand Up @@ -374,6 +381,8 @@ class App():
helper.toggleFrameOn(self.checkboxesFrame, self.buttonsFrame, mpaths.mods_dir, mpaths.mods_folders, checkboxes)
print("→ Done!")
print("-------------------------------------------------")
print("→ Remember to use dota2patcher and patch gameinfo")
print("→ if you wish to use mods in online matchmaking.")
helper.handleWarnings(mpaths.logs_dir)

except Exception:
Expand Down
23 changes: 22 additions & 1 deletion helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import vpk
import shutil
import webbrowser
import tkinter
import urllib.error
from urllib.request import urlopen

Expand Down Expand Up @@ -46,6 +47,26 @@ def patchGameInfo(gameinfo_dir):
# ---------------------------------------------------------------------------- #
# GUI #
# ---------------------------------------------------------------------------- #
# when you add new arguments to bind in tkinter event must be the last parameter.
def modLabelColorConfig(widget, color, event):
widget.configure(foreground=color)

def modInfo(widget, name, mod_path, event):

with open(os.path.join(mod_path, 'notes.txt'), 'r') as file:
data = file.readlines()

# convert list to string because text= in tkinter expects a string
data = ''.join(data)

infoWindow = tkinter.Toplevel()
infoWindow.title(name)
infoWindow.iconbitmap('bin/images/info.ico')
infoWindow.resizable(False, False)

newtxt = tkinter.Label(infoWindow, text=data)
newtxt.grid(row=0, column=0, padx=5, pady=5, sticky='nsew')

def disableWorkshopMods(mods_dir, mods_folders, checkboxes):
for folder in mods_folders:
mod_path = os.path.join(mods_dir, folder)
Expand Down Expand Up @@ -80,7 +101,7 @@ def toggleFrameOff(frame_checkbox, frame_buttons):
widget.configure(state='disable')

def getAppHeight(mods_folders):
height = 465
height = 445

num_of_mods = len(mods_folders)
i = 10
Expand Down
6 changes: 6 additions & 0 deletions logs/resourcecompiler.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
NvAPI initialized: NVidia Complete Version 1.10
NVIDIA Driver Version: 516.59 r515_00
-----------------------------------------------------------------
WARNING: 0 compiled, 0 failed, 0 skipped, 0m:00s
-----------------------------------------------------------------
ID3D11Device has 2 outstanding references indicating leaked D3D11 resources.
4 changes: 4 additions & 0 deletions mods/Dark Terrain/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Makes the entire floor dark tiles.

- ONLY works on default terrain you cannot use a custom terrain like desert, immortal gardens..etc
- You can turn on "Normal Maps" in graphcis settings to make the tiles look like a grid.
10 changes: 10 additions & 0 deletions mods/Misc Optimization/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Removes many uneeded effects from the game to improve performance, a few examples are.

- 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

I am often updating more optimizations into the patcher so if you want to see everything go here on github.
dota2-minify/bin/modpaths/Misc Optimization/blacklist.txt
2 changes: 2 additions & 0 deletions mods/Remove Foilage/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Removes all the bushes, flowers, rocks and any other ground props so you just have tiles.
This improves FPS quite a bit since it reduces the number of draw calls your GPU has to make.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/dire_tree004.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/dire_tree004b.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/dire_tree007.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/dire_tree008.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mods/Tree Mod/files/models/props_tree/palm_01.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed mods/Tree Mod/files/models/props_tree/palm_03.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_bamboo_01.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_bamboo_02.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_cine_00_low.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_cine_02_low.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_oak_01.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_oak_01b.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_oak_02.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_pine_01.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_pine_02.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mods/Tree Mod/files/models/props_tree/tree_pine_03b.vmdl_c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions mods/Tree Mod/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Turns all trees to small green square bushes

- ONLY works on default terrain you cannot use a custom terrain like desert, immortal gardens..etc
- shows juke paths and improves GPU performance since these trees don't use as much geometry as default ones.

I plan to add tree mod to all maps in the future.
1 change: 1 addition & 0 deletions mpaths.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'Remove Foilage',
'Remove Pinging',
'Remove Sprays',
# 'Testing',
'Tree Mod']

mods_folders = []
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Once you get comfortable with the tools you can use Minify to patch them quickly
| [`Files`](https://github.com/robbyz512/dota2-minify/wiki/Minify#files) | Compiled files you want to pack (Models, Meshes, Textures...etc)
| [`blacklist.txt`](https://github.com/robbyz512/dota2-minify/wiki/Minify#blacklisttxt) | *Paths* to files to replace with blanks so they wont appear in game (Particles, Sounds...etc)
| [`styling.txt`](https://github.com/robbyz512/dota2-minify/wiki/Minify#stylingtxt) | Custom CSS you want to apply to the Panorama (Interfaces, Layouts, HUD's...etc)
| `notes.txt` | Optionally include this file to have a details button beside your mod for users to read.

[Click here to do the Beginner Mod Tutorial](https://github.com/robbyz512/dota2-minify/wiki/Minify#create-your-first-mod-tutorial)

Expand Down

0 comments on commit d67b0d1

Please sign in to comment.