Jump to content

Recommended Posts

  • 2 weeks later...
  • 2 months later...
  • 2 weeks later...
Posted
On 10/17/2024 at 5:10 PM, zbysiek said:

All except cockpit and terrain:

# --------------- CUSTOMIZE HERE ---------------

# Textures below or at this size do not get compressed
$minTexSize = CHANGE-ME

# 2 means divided by 2 on the X and Y axis, so 1/4 of the original resolution
$compressionRatio = 2

# Zip names that get searched recursively in the main directory
$whitelistedZipNames = @("*")
# What to exclude from the above search
$blacklistedZipNames = @("*cockpit*.zip", "*terrain*.zip")

# All .zip files inside those folders get searched, even if they aren't in the whitelist above. This is a bypass in case the zip is not called like usual. Not connected to the function above. 
$whitelistedFolders = @("*")
# What to exclude from the above search
$blacklistedFolders = @("*cockpit*", "*terrain*")

# Files inside .zips from above searches cointaining these filters get compressed.
$whitelistedFilesInZips = @(
    "*"
)
# What to exclude from the above search
$blacklistedFilesInZips = @("*refl*")

# Loose file names cointaining these filters get compressed, they are searched recursively in the main directory. Simillary to $Folders, this is in case the files are not in a .zip like usual.
$whitelistedFiles = @(
"*"
)
# What to exclude from the above search
$blacklistedFiles = @(
	"*refl*", "*cockpit*", "*terrain*", "*pilot*"
)

# --------------- CUSTOMIZE HERE ---------------

 

After having used the original script for awhile, I've been really happy with it. I was hoping to exclude the terrains and cockpits using this set of parameters but I've been getting an error when I attempt to use what's in the quote above. 

textures script error.jpg

Any idea of how to fix it?

 

dcs-texture-optimizer.ps1

Posted
16 hours ago, Biggus said:

After having used the original script for awhile, I've been really happy with it. I was hoping to exclude the terrains and cockpits using this set of parameters but I've been getting an error when I attempt to use what's in the quote above. 

textures script error.jpg

Any idea of how to fix it?

 

dcs-texture-optimizer.ps1 8.76 kB · 1 download

Looks like you deleted too much stuff when copy pasting, the lines don't match the original script.

Posted (edited)
3 hours ago, zbysiek said:

Looks like you deleted too much stuff when copy pasting, the lines don't match the original script.

Thank you for getting back to me. 🙂

After checking with a script comparison tool, the only differences I can see are the ones that are cut and paste from the original one to the modified one you shared a couple of pages ago and the CHANGE-ME value to 2048.  The lines change because the lines are changed in your example I quoted yesterday.  I'm quite stumped.

Edited by Biggus
Posted

Do you receive the error for a specific texture or every time? An idea that comes to my mind is that it could be an issue that it cannot read the texture size or name of a specific file.

 

Posted
9 hours ago, tomeye said:

Do you receive the error for a specific texture or every time? An idea that comes to my mind is that it could be an issue that it cannot read the texture size or name of a specific file.

 

I don't think it's a specific file or texture as it will compress everything with the original parameters.  I'll see if I can find a specific parameter that is triggering the error though.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...