Igneez Posted May 23, 2021 Posted May 23, 2021 I got fed up having to redownload all the mods whenever I decided to take a break from Skyrim and uninstall it, only to install it again pretty soon. So I wrote two userscripts to download mods from Nexus in a sequential manner. Just list down the mods you want and click on the download button in the main page and sit back while all the mods in the begin to download one by one. Code at the end of this post, but read on to know more. It's still in the early stages so you will have to manually go into the source code and change it according to your needs. NOTE: YOU REQUIRE TAMPERMONKEY IN ORDER TO INSTALL THOSE USERSCRIPTS There are two userscripts you have to install, one is responsible for initiating the download while the other actually causes the download to begin. Just create two new userscripts after opening Tampermonkey and copy-paste the code from the bottom of my post over there and save, it should run whenever you open https://www.nexusmods.com/skyrim. Oh and make sure to close all other tabs and just have the Nexus page open when you initiate the download process. Structure So I split the downloads into two - Small and Large. Small downloads are the ones that are less than 40 mb and the large downloads are the ones that exceed that size, I will explain why soon. The buttons in the main page are placed in this fashion Small Download - Large Download - Show/Hide Mod List The structure of each mod in a list is as follows ["Mod ID", "Mod Index", "Mod Name"] Mod ID: The number you see when you open a mod. Example: SkyUI Mod ID is 3863. Mod Index: The file number to download, 0 means the first file, 1 means the second file and so on. Mod Name: This is for your own convenience, it shows up in a list in the main page. The default mod list in the userscript is as below, but you can add new mods into the list, just make sure to separate each one with a comma. let smallDownloadIDs = [ ["3863", "0", "Sky UI"], ["11811", "0", "FNIS"], ["29624", "0", "Racemenu"], ["53996", "0", "HDT PE "], ["36213", "0", "HDT HighHeels"], ["68000", "0", "XP32"], ["9557", "0", "Alternate Start"], ["57046", "0", "UIExtensions"], ["64905", "0", "AddItemMenu"], ["14884", "0", "Silent Voice"], ["27371", "0", "Better Dialogue Controls"], ["28170", "0", "Better MessageBox Controls"], ["58705", "0", "PapyrusUtil"], ["95017", "0", "PaprusExtender"], ["75795", "0", "SKSE Preloader"], ["72725", "0", "Crash Fixes"], ["76747", "0", "Bug Fixes"], ["96734", "0", "Cobb Bug Fixes"], ["85443", "0", "Load Game CTD Fix"], ["40706", "0", "OneTweak"], ["49743", "0", "JContainers"], ["10753", "0", "Auto Unequip Ammo"], ["66257", "0", "ConsoleUtil"], ]; And to avoid downloading all the mods at once, I included a timeout between each download whose duration is dictated by the following lines let smallLowerBound = 10000; let smallUpperBound = 16000; let largeLowerBound = 30000; let largeUpperBound = 60000; where lowerBound is the minimum time to wait between each download and upperBound is the maximum time to wait between each download. I split it into small and large because the larger file sizes take some time to download and I figured it would be better to wait a bit longer while the current download finishes before a next one is started. However, you can change it according to how fast your internet connection is. Note: 10000 = 10 sec, 16000 = 16 secs and so on ADDITIONAL FEATURE I also made the mods to appear in a list when you click on the "Show/Hide Mod List" Button which appears at the top in the main page. It will show whatever mods are in the list, and if you click on any one mod, it will start the download process. I would love to hear some feedback and ways I can improve upon this. I haven't yet figured out how to add files here so I will be linking the Pastebin links here Userscript 1 Userscript 2
Recommended Posts
Archived
This topic is now archived and is closed to further replies.