Jump to content

UDCS-ModManager


CappuccettoRosso

Recommended Posts

UDCS-ModManager

Ugly Dashing Cunning Symlink Mod Manager

alt text

 

Overview

UDCS-MM is a generic mod manager ( but written with DCS in mind and heart ) that consists of a single 16 KB PowerShell file developed by a decades-long DCS fan moved by frustration at the lack of similar solutions. It is currently the most powerful, fast, lightweight, and hardware-friendly solution to mod management. Oh, and it is also the most aesthetically pleasing ( see "Ugliness" section ).

Why you should care: because UDCS-MM uses a completely different approach from other mod-managers. UDCS does not rewrite data. It does not corrupt files by copying and pasting them schizophrenically one on top of the other but instead uses symlinks by intervening on a very small part of the data concerning the indexing of directories and files to manage mods thus respecting the health and longevity of your hard drives and respecting your time as well.

 

Ugliness

UDCS-ModManager has a retro interface; commands are given from the terminal. Nothing can beat the thrill of typing Y or pressing enter on a horrible blue background and white text! The User Experience is simply stellar and will make each user really feel in charge. It's pretty much the same difference in feeling as flying in a powerful, flawed and potentially self-destructive F-14 and flying in a modern, clean and deadly slow F-18 looking at its displays with its satellite coordinates... Ehy, I'm kidding, they're both great planes.

 

Simplicity

How complicated could it possibly be to operate this script by people who know how to successfully operate a modern war jet?

 

Time

Without going into details, I'll summarize the benefits like this: the fact is that UDCS is fast. Incredibly fast. If you want you can stop here, take my word for it and avoid continuing to read boring explanations and ravings.

Yes but how fast? Well, if we take any of the other mod managers out there, and assume that this is an old Smart car launched at the frightening speed of 90 kilometers per hour on a bumpy road with shaking windows, UDCS-MM is an AIM-54C Phoenix at 25000 meters traveling at Mach 5 toward a poor, unsuspecting MIG. And let's be clear, I'm not even kidding with the numbers. In fact, this numerical relationship is definitely downward for UDCS-MM.

This is the time it took to activate and then deactivate Taz's fantastic "DCS Optimized Textures" mod used as a template as it is very nice and full-bodied. It occupies about twenty GB and acts on about forty GB of vanilla files.

DCS Optimized Textures by Taz link: https://forum.dcs.world/topic/323252-dcs-optimized-textures/

Time taken to Deploy and Revert Taz's "DCS Optimized Textures" mod:

  • Other popular Mod Managers: ENABLE ---> 5 min 32 sec ; DISABLE ---> 3 min 47 sec.

  • UDCS-ModManager: ENABLE ---> less than 2 sec ; DISABLE ---> less than 6 sec.

 

Data written to hard disk

It doesn't end there. Let's talk briefly about writing data to your hard disk. Let's start with the bad news. Hard disks are not eternal. They have a life cycle measured in amount of data written. Probably a few years ago, when at most you had to change a .lua file to rightly put Fox-3s on an Su-27 ( it would be nice to natively bridge the gap that has come about, don't you think, Eagle Dynamics? ❤️ ) it might as well have been okay to use mod managers that unceremoniously copy and paste the modded files, the original and backupplied files... But now, we have to turn on, then turn off for an Open-Beta update, dozens and dozens of GBs to get the indispensable "Taz's Optimized Textures," "Modern Weapons for the F-14," "Barthek's Caucasian Textures," and other very high quality stuff!

Well, UDCS writes virtually zero Bytes of data to your disk. Windows will report as many as 0 bytes of weight on the symlink files! hey, of course it's not zero. Let's not kid ourselves. If we want to make pseudo-realistic estimates, we can approximate 1 KB for each individual file involved in the operations. Now compare a few measly KB to the imposing, gargantuan bulk of say 40 GB ( which is a VERY optimistic estimate of how much data is written by other mod managers simply by enabling "Taz's Optimized Textures" ).

Below is some data on the disk space used by writing data when we activate and then deactivate the fantastic mod "DCS Optimized Textures" ( which we will still use as a template for this example ). The data is in relation to my Samsung SSD 860 EVO 500GB with NTFS file system

Available hard disk space & Data written for Deploy & Revert of Taz's "DCS Optimized Textures" mod:

  • Other popular Mod Managers:

available space:

before ENABLE - - - - intra-operation ENABLE - - - - end of ENABLE

75.725 GB - - - - - - - - - - 29.635 GB - - - - - - - - - - 56.883 GB

data written:

before ENABLE - - - - intra-operation ENABLE - - - - end of ENABLE

0 GB - - - - - - - - - - 46.090 GB - - - - - - - - - - 18.842 GB

The other Mod Managers write at least 46 GB of data. Most likely they write even more than that. This is a rough downward estimate. And we are not even considering here the disk write of when we disable the mod.

  • UDCS-ModManager:

available space:

before ENABLE - - - - intra-operation ENABLE - - - - end of ENABLE

75.725 GB - - - - - - - - - - 75.725 GB - - - - - - - - - - 75.725 GB

data written:

before ENABLE - - - - intra-operation ENABLE - - - - end of ENABLE

0 GB - - - - - - - - - - 0 GB - - - - - - - - - - 0.000811 GB

The same operation conducted by UDCS-ModManager writes to disk the ridiculous amount of 0.000811 GB practically less than a single megabyte.

 

INSTALL AND HOW TO USE

 

Steps

  • Download the folder "UDCS-ModManager" from https://github.com/ObsceneNickname/UDCS-ModManager and place it on the root of your games drive. Example: D:\UDCS-ModManager\

  • Execute the PowerShell file "UDCS-ModManager.ps1" inside that folder. Right click on the file --> Run with PowerShell

  • If a prompt asks for confirmation say "Yes". Do not say "Yes to all". The PowerShell terminal should start up.

Remember that you can exit the PowerShell terminal at any time by pressing CTRL+C

  • Follow the instructions on the terminal. You'll need to set up the directories of where the game you want to mod, where you want to keep the original files, and where your folder with the mods is. Don't worry, this operation only needs to be done the first time.

Example: - Main Game: D:\DCS World\ - Backup Folder: D:\UDCS-ModManager\backup\ - Mods Folder: D:\DCS World\_MODS\

N.B. Consider that inside DCS World there is already natively a Mods folder. That's why the one with our mods is called "_MODS" with the underscore.

  • From the menu that appears with the list of your mods, choose which one you want to activate by typing in the corresponding number and press enter. The mods displayed in green are the ones you have already activated. If multiple mods impact the same files, the last one activated will take priority.

Under no circumstances the original files of both the game and your mods will be altered.

  • To disable all mods and return the game to its vanilla state simply run the script again. If you have mods enabled you will be asked if you want to disable all of them.

If you want to start from scratch and set up different directories, you can simply delete that .ini file in the "UDCS-ModManager" folder.

 

More info

N.B. Highly Suggested Prerequisites: Windows 10 or higher, NTFS disk, mods and game on the same disk

Download and extract (if zipped) the folder "UDCS-ModManager" on your drive. That folder should contain the "UDCS-ModManager.ps1" file that we are going to run.

Possibly directly in the root of the hard drive. This is not mandatory but the point is that you must launch UDCS-ModManager from a directory that contains no space in its absolute-path. If this is clear to you, feel free to rename both the folder and the .ps1 file itself as you wish.

So D:\UDCS-ModManager\ is fine. Also D:\Games\UDCS-ModManager\.

If the folder is, let's say, D:\DCS World\UDCS-ModManager\ the script will not work.

The folder that houses your mods must be structured as usual as with other mod managers. It must contain folders with the name of the mod and inside the same structure as the Main Game directories. Example:

D:\DCS World\_MODS\
├───BARTHEK's CAUCASUS REDONE 2022 - REV 2
│   ├───Bazar
│   │   └───Textures
│   └───Mods
│       └───terrains
│           └───Caucasus
│               ├───shadingOptions
│               └───vfstextures
├───BARTHEK's CAUCASUS REDONE 2022 - SNOWLESS WINTER REV 2
│   └───Mods
│       └───terrains
│           └───Caucasus
│               ├───shadingOptions
│               └───vfstextures\

 

Limitations

On some PCs launching PowerShell scripts is disabled by default.

To fix:

In your search bar type "powershell", right click and open as administrator.

In the terminal run the command:
 

Set-ExecutionPolicy RemoteSigned
 

This way you should be able to launch the script correctly.

More details on this issue in the comments below


--README is WIP--

 

Thanks

This script was developed for personal needs but it is a pleasure to be able to share it with the community, from which I have taken and learned so much, in the hope that you will enjoy it and find it useful.


Edited by CappuccettoRosso
I added info on a fix
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, CappuccettoRosso said:

mods and game on the same disk

 

I was going to try your Mod Manager, but the above limitation stopped me .. I have the DCS sim on drive C, my Mods are on drive E, and my /Saved Games/ is on drive G  ... how should I proceed on this case? 

 

... also, DCS Mods can be divided in two types: those that go into the DCS Program Folder, and those that go onto /Saved Games/  .. how would I configure the Mod Manager to cater for both Mod types?

  • Like 2

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

You can still use it even on different disks. If you notice, those instructions you quote are written in "highly suggested" not in limitations. Why then did I suggest using the same disk? Not to dwell on being careful in considering compatibility between the file systems of the disks involved, whether the disks use different file systems (e.g. NTFS and ext4), etc. etc. Go ahead and use it and let me know ❤️

As for mods going into \Saved Games\ come on, a little imagination : )
Create another folder D:\UDCS-ModManager2\ , copy the .ps1 file into it and set here the directories for X:\Saved Games\DCS.openbeta
That way you will have a script that manages the main DCS World folder and one that manages DCS.openbeta in Saved Games.

I sincerely thank you for giving me feedback and cordially invite you to give UDCS-ModManager a chance. You'll see that - especially if you're dealing with very heavy files - it's really fast.

P.s. Oh, by the way, I honestly didn't understand if you are the guy who made OvGME. If so feel free to use my code. If you want to put a decent interface to my script go ahead. The only important thing is to have a serious and working tool to manage the mods, no matter the name and affiliation.


Edited by CappuccettoRosso
Link to comment
Share on other sites

37 minutes ago, CappuccettoRosso said:

Go ahead and use it and let me know ❤️

 

ok, will do and then I will tell you how it went 👍

 

37 minutes ago, CappuccettoRosso said:


P.s. Oh, by the way, I honestly didn't understand if you are the guy who made OvGME.


I’m not, the Ovgme author is @sedenion

  • Like 1

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

This is a good idea to create symlinks instead of brutally copying data back and forth. I was myself concerned by this lack of read/write optimization while designing Open Mod Manager.

I see some drawback using this method, especially managing mod overlapping which imply that you keep a copy of intermediary state to be restored. However I admit such feature, while requested by some users, is quite useless in most of case and could be replaced by simple interdiction of mod overlapping... The symlink method also implies that you must have actually mod files exising somewhere in the file system, you cannot work with zipped/packaged mods for example. Each approach have advantages and drawbacks, but the fact that DCS in its Open-Beta branch and frequent update forces to apply/restore mods frequently is a strong point in favor of the symlink way.


Edited by sedenion
  • Like 2
Link to comment
Share on other sites

Hi sedenion, thank you for your feedback! I know it's silly but receiving your appreciation is a good feeling : )
Allow me a couple of clarifications:

 

2 hours ago, sedenion said:

managing mod overlapping which imply that you keep a copy of intermediary state to be restored

This dynamic is already provided for and handled correctly (at least by the criteria I imagine :S) in UDCS-MM. Intermediate versions of overlap files are not preserved nor time and computational resources are lost over them (see line 347 of the code). Simply the last activated mod takes priority in case there is the same impacted file. I honestly do not think that interdicting mod overlapping is a good idea. It is a normal scenario that happens frequently.

I fully agree that each method there has its pros and cons and that you choose according to your preferences. For my personal needs, the priority was on minimizing the deployment and revert time and minimizing as much as possible the amount of data written to disk. That is why there is no support for packaged/zipped files: to avoid having to then work on those files to extract them.

Thank you again for your intervention, and I renew my complete availability to an eventual integration of my code into a real program ( with a real interface xD ).

  • Like 1
Link to comment
Share on other sites

19 hours ago, CappuccettoRosso said:

UDCS-ModManager: ENABLE ---> less than 2 sec ; DISABLE ---> less than 6 sec.

Oh my! That's hell too much! Too slow... Well, I'll wait for another mod manager that does it in a few milliseconds. 😄 😄

Man! I'm joking of course. That's pretty great idea. Thanks a lot!

But I wish I'd like to see a video all about this. We'd directly jump into this.

Thank you!


Edited by Devrim
  • Like 2

Intel i7-14700@5.6GHz | MSI RTX4080 Super SuprimX | Corsair V. 32GB@6400MHz. | Samsung 1TB 990 PRO SSD (Win10Homex64)
Samsung G5 32" + Samsung 18" + 2x8"TFT Displays | Saitek X-55 Rhino & Rudder | TM MFD Cougars | Logitech G13, G230, G510, PZ55 & Farming Sim Panel | TIR5
>>MY MODS<< | Discord: Devrim#1068

Link to comment
Share on other sites

Hi @Devrim, it's a pleasure to read you here, glad you like the idea : )

Thanks for all your great work with the modded cockpits! I've been using your stuff for years.
As for a video tutorial... yes actually it would be helpful but the idea of doing it slightly intimidates me. If you feel like it, try using the script anyway, it's not hard. Just be sure to spell the directories right when asked. in the form:
( use backslash \ not slash / we're on Windows! )

Main Game - D:\DCS World
Backup - D:\UDCS-ModManager\backup
Mods Folder - D:\DCS World\_MODS.

Let me know if you can get it working. In the meantime, if you really want, I'll scrape up some courage to make a video : )

Thanks again!

  • Like 2
Link to comment
Share on other sites

1 hour ago, CappuccettoRosso said:

Thank you again for your intervention, and I renew my complete availability to an eventual integration of my code into a real program ( with a real interface xD ).

The harder and painful part is indeed the GUI. To begin, you should considere making a C or C++ (but please no C# !) version of your PowerShell script, as command-line program (notice that C++ is retrocompatible with C libraries and APIs, while sharing the same base syntax)... Maybe you never coded in C/C++ and afraid of it, but it is not that hard once you get a working developpement environnement. The C syntax and principles are pretty clear and easy once you get the bases.


Edited by sedenion
  • Like 1
Link to comment
Share on other sites

On 6/30/2023 at 5:13 PM, CappuccettoRosso said:

Hi @Devrim, it's a pleasure to read you here, glad you like the idea : )

Thanks for all your great work with the modded cockpits! I've been using your stuff for years.
As for a video tutorial... yes actually it would be helpful but the idea of doing it slightly intimidates me. If you feel like it, try using the script anyway, it's not hard. Just be sure to spell the directories right when asked. in the form:
( use backslash \ not slash / we're on Windows! )

Main Game - D:\DCS World
Backup - D:\UDCS-ModManager\backup
Mods Folder - D:\DCS World\_MODS.

Let me know if you can get it working. In the meantime, if you really want, I'll scrape up some courage to make a video : )

Thanks again!

Thanks a lot for your words, mate. 🙂❤️

Of course I'll try your work anyway. As other friends stated, big files won't move locations on our harddrives. So, your app is already useful in many ways.

Again, thanks a billion!


Edited by Devrim
  • Like 2

Intel i7-14700@5.6GHz | MSI RTX4080 Super SuprimX | Corsair V. 32GB@6400MHz. | Samsung 1TB 990 PRO SSD (Win10Homex64)
Samsung G5 32" + Samsung 18" + 2x8"TFT Displays | Saitek X-55 Rhino & Rudder | TM MFD Cougars | Logitech G13, G230, G510, PZ55 & Farming Sim Panel | TIR5
>>MY MODS<< | Discord: Devrim#1068

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...

@SizzlingPopcorn

Hi, sorry for the crazy delay!

You are absolutely right, on some pcs launching PowerShell scripts is disabled by default.

To fix:

In your search bar type "powershell", right click and open as administrator.

In the terminal run the command:
 

Set-ExecutionPolicy RemoteSigned
 

This way you should be able to launch the script correctly.


----
 

For the sake of completeness, I should tell you that clearly this policy was implemented for security reasons and I urge you not to run suspicious powershell scripts.

If you want to know what kind of "ExecutionPolicy" you currently have run the command:

Get-ExecutionPolicy

Below are some details:
 

Set-ExecutionPolicy Restricted <-- Will not allow any powershell scripts to run.  Only individual commands may be run.

Set-ExecutionPolicy AllSigned <-- Will allow signed powershell scripts to run.

Set-ExecutionPolicy RemoteSigned <-- Allows unsigned local script and signed remote powershell scripts to run.

Set-ExecutionPolicy Unrestricted <-- Will allow unsigned powershell scripts to run.  Warns before running downloaded scripts.

Set-ExecutionPolicy Bypass <-- Nothing is blocked and there are no warnings or prompts.

 

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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