Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Revamped Valorant Optimization and added Apex Legends one
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckDuckG0ose committed Oct 28, 2023
1 parent 677231a commit c3e7c52
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ def gametweaks():
print(" You must use this tweak every time roblox Boost your fps in Valorant using this tweak")
print(" Updates to keep using it. this tweak must be ran every update to have effects")
print(f'\n \n')
print(crayons.cyan(" [3.] Minecraft Tweak "))
print(" Edits Minecraft's configuration to give you ")
print(" The most stable and smooth experience in Minecraft ")
print(crayons.cyan(" [3.] Minecraft Tweak [4.] Apex Legends Tweak"))
print(" Edits Minecraft's configuration to give you Boosts your FPS in Apex Legends by lowering file config")
print(" The most stable and smooth experience in Minecraft settings (Not that in game quality will be affected)")

try:
print(crayons.magenta(" [99.] back | [10.] Discord "))
Expand Down
3 changes: 0 additions & 3 deletions logs.txt

This file was deleted.

48 changes: 47 additions & 1 deletion valorant.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,53 @@
import os
import configparser
import subprocess
import ctypes

def tweakval():
def ltweakval():
# The default directory for Valorant GameUserSettings.ini file
default_dir = os.path.expanduser("~\\AppData\\Local\\VALORANT\\Saved\\Config")

# Check if the directory exists
if not os.path.exists(default_dir):
print("The default directory does not exist. Please make sure Valorant is installed correctly.")
return

# Path to the GameUserSettings.ini file
config_path = os.path.join(default_dir, "GameUserSettings.ini")

# Check if the GameUserSettings.ini file exists
if not os.path.isfile(config_path):
print("The GameUserSettings.ini file does not exist in the default directory.")
return

# Ask for user confirmation
MessageBox = ctypes.windll.user32.MessageBoxW
result = MessageBox(None, 'Are you sure you want to lower the Valorant settings for better performance? NOTE THAT THIS WILL LOWER THE GAME QUALITY. THE ONLY WAY TO UNDO THIS TWEAK IS TO REINSTALL VALORANT!!! ARE YOU SURE?', 'Confirmation', 1)
if result == 1:
# Create a config parser object
config = configparser.ConfigParser()
config.read(config_path)

# Lower the settings
if 'ScalabilityGroups' in config:
config['ScalabilityGroups']['sg.ResolutionQuality'] = '70'
config['ScalabilityGroups']['sg.ViewDistanceQuality'] = '1'
config['ScalabilityGroups']['sg.AntiAliasingQuality'] = '1'
config['ScalabilityGroups']['sg.ShadowQuality'] = '1'
config['ScalabilityGroups']['sg.PostProcessQuality'] = '1'
config['ScalabilityGroups']['sg.TextureQuality'] = '1'
config['ScalabilityGroups']['sg.EffectsQuality'] = '1'
config['ScalabilityGroups']['sg.FoliageQuality'] = '1'

# Save the changes back to the file
with open(config_path, 'w') as configfile:
config.write(configfile)
try:
subprocess.run(['./valorant'], shell=True)
except FileNotFoundError:
print("The 'valorant' batch file was not found in the current directory.")
print("The settings have been successfully lowered for better performance.")
else:
print("Operation cancelled by user.")


0 comments on commit c3e7c52

Please sign in to comment.