Created
January 13, 2024 11:03
-
-
Save jericjan/38ad598042cfad936ab4b3f005060f7d to your computer and use it in GitHub Desktop.
L4D2 - Consistency error culprit finder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vpk | |
from pathlib import Path | |
import subprocess | |
# Paste the path to your workshop folder here | |
workshop_folder = ( | |
"F:/SteamLibrary/steamapps/common/Left 4 Dead 2/left4dead2/addons/workshop" | |
) | |
# Paste the file path to the file that has a consistency error here | |
target_file = "models/infected/charger.mdl" | |
for file in Path(workshop_folder).glob("*.vpk"): | |
pak1 = vpk.open(str(file.resolve())) | |
try: | |
pakfile = pak1.get_file(target_file) | |
print(f"{file.name} has it!") | |
subprocess.call(f"{file.parent / file.stem}.jpg", shell=True) | |
# Opens in default image viewer | |
except: | |
pass | |
print("Scan complete!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment