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.

  • 1 month later...
Posted (edited)

I couldnt make this powershell script to work, sorry I am not a computer expert guy thats why this is too challenging for me. all I need reduced textures for performance.  is there any video which shows correct installation and following process?

Thanks!

Edited by theropod
  • Like 1
  • 2 weeks later...
Posted

Just a question. When the files are reduced from 4k to 2k, mine are all blurry. Is there a way to add the mip maps to make them clear? Or is it a cockpit resolution thing?

 

Posted (edited)
On 6/12/2025 at 7:03 PM, theropod said:

I couldnt make this powershell script to work, sorry I am not a computer expert guy thats why this is too challenging for me. all I need reduced textures for performance.  is there any video which shows correct installation and following process?

Thanks!

Beginner-Friendly Instructions – DCS Optimized Textures PowerShell Script

Original thread: https://forum.dcs.world/topic/357233-dcs-optimized-textures-powershell-script/
Works on Windows 10/11 64-bit.

What You Need

  1. Create a folder on your Desktop
    Suggested name: DCS Optimized Textures
  2. Download and place the following files into that folder:

a) Script

b) TexConv

c) PowerShell 7

Cleanup Before Running

Go to your main DCS installation folder
Delete these folders if they exist:

  • _backup
  • _downloads

This helps avoid processing unnecessary files.

How to Run the Script

  1. Open PowerShell as Administrator
    • Press Windows key, type powershell,
    • Right-click > Run as Administrator
  2. In the window, type:
    Set-ExecutionPolicy Unrestricted
    Press Enter
    Then close the window
  3. Go to your DCS Optimized Textures folder
    Right-click inside the folder (not on a file)
    Choose Open with PowerShell 7
    Do NOT run as admin
  4. Make sure the console path is correct. If needed, type:
    cd "$env:USERPROFILE\Desktop\DCS Optimized Textures"
    and press Enter
  5. Start the script by typing:
    .\dcs-texture-optimizer.ps1
    and press Enter
  6. A window will pop up – choose your main DCS install folder
  7. Wait for the script to finish. This may take some time.

Restore PowerShell Security (Recommended)
When done:

  1. Open PowerShell as Administrator again
  2. Type:
    Set-ExecutionPolicy Restricted
  3. Press Enter

That’s it. Now you have to install it into DCS.

HOW-TO: Install DCS Optimized Textures using OvGME

This guide explains how to install the DCS Optimized Textures using OvGME, a simple mod manager.

Step 1: Download and Install OvGME

  1. Go to: https://github.com/jweisner/ovgme
  2. On the left side of the page, click "Releases" – latest is version 1.7.4
  3. From the list, download this file:
    https://github.com/jweisner/ovgme/releases/download/v1.7.4/ovgme_1_7_4_setup_64.exe
  4. Run the downloaded file: ovgme_1_7_4_setup_64.exe
  5. Complete the installation

Step 2: Prepare the Mods Folder

  1. Go to your main DCS installation folder
    Example: C:\Program Files\Eagle Dynamics\DCS World
  2. Create a new folder named "_MODS" (if it doesn't already exist)
  3. Inside "_MODS", create a new folder called "Optimized Textures"
  4. Go to the folder on your Desktop where you ran the DCS Optimized Textures script
  5. Copy the entire "Mod" folder from there into the "Optimized Textures" folder
    Final result should look like:
    C:\Program Files\Eagle Dynamics\DCS World\_MODS\Optimized Textures\Mod\Bazar...

Step 3: Configure OvGME

  1. Open OvGME
  2. Click the "New" button to create a new configuration
  3. You can name it "DCS Core" or anything you like
  4. Set the paths:
    • Mods folder: point to the "_MODS" folder
      Example: C:\Program Files\Eagle Dynamics\DCS World\_MODS
    • Root folder: point to your DCS main folder
      Example: C:\Program Files\Eagle Dynamics\DCS World
  5. Click OK
  6. You should now see the "Optimized Textures" mod listed

Step 4: Enable the Mod

  1. Select the mod from the list (click it)
  2. Click "Enable selected"
  3. You can enable more than one mod at a time

To disable a mod, select it and click "Disable selected"

Notes:

  • You only need to enable the mod once. It stays active until you disable it.
  • If you move your mods folder later, update the configuration paths in OvGME.

This guide uses the _MODS folder inside your DCS install. Saved Games folder is not needed here.

If you have any questions or run into problems, feel free to ask in this thread.

Edited by Mizuri
  • Like 3
  • Thanks 3
  • Recently Browsing   0 members

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