Skip to content

β„Ή A Command-Line Utility Tool for Installing Mods from https://modworkshop.net/ (Written in GoπŸ”΅)

License

Notifications You must be signed in to change notification settings

WillKirkmanM/modworkshop-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

71 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

modworkshop-dl

β„Ή A Command-Line Utility Tool for Installing Mods from Mod Workshop

⚠ Migration to a new Version ⚠

With the new addition of the Modworkshop.net API. I am in the process of cleaning up the code to implement these new additions (removes the tedious web scraping, YES!). This will be in the form of a version 2. View the Development Branch Here

Install (Conventional)

mkdir "C:\Program Files (x86)\Modworkshop-DL"
setx PATH "C:\Program Files (x86)\Modworkshop-DL;%PATH%"
curl https://github.com/WillKirkmanM/modworkshop-dl/releases/download/v1.5.0/modworkshop-dl.exe -o "C:\Program Files (x86)\Modworkshop-DL\modworkshop-dl.exe"
powershell

Install (One-Liner)

mkdir "C:\Program Files (x86)\Modworkshop-DL";setx PATH "C:\Program Files (x86)\Modworkshop-DL;%PATH%";curl https://github.com/WillKirkmanM/modworkshop-dl/releases/download/v1.5.0/modworkshop-dl.exe -o "C:\Program Files (x86)\Modworkshop-DL\modworkshop-dl.exe";echo "";echo "Installed! Run the Command 'modworkshop-dl --help'";echo "";echo "Restarting Terminal";echo "";powershell

Get Started

Install via Searching

  1. Run the tool with the search flag followed by your query
$ modworkshop-dl --search low violence mode

  1. From the list of mods returned, write the index of the mod you would like to download (The mod will now be downloaded into your mods folder)
  2. Launch PAYDAY 2!

Install from Link

  1. Run the tool with the install flag followed by the link to the mod (The mod will now be downloaded into your mods folder)
$ modworkshop-dl --install https://modworkshop.net/mod/25629
  1. Launch PAYDAY 2!

Install from File

  1. Create / Open the modlist.txt file (In the same directory as the executable).
  2. Paste the desired mods in the "Mods" header
  3. Paste the desired assets in the "Assets" header
  4. Start the tool
$ modworkshop-dl --file modlist.txt
  1. Launch PAYDAY 2!

Examples

Below is an example of the mod list text file that you will be supplied with the --file flag. Note that the mods links are under the Mods header and the assets links are below the Assets header.

# modlist.txt
Mods
https://modworkshop.net/mod/40265
https://modworkshop.net/mod/40992
https://modworkshop.net/mod/41000

Assets
https://modworkshop.net/mod/41001
https://modworkshop.net/mod/40586

Usage

See the usage by running:

$ modworkshop-dl --help
Modworkshop-dl allows for installing mods with ease.

usage: modworkshop-dl [<command>] [<argument>]

The following commands are available:
search, S                       The mod to search                               [-S <Name>]
file, f                         The text file containing the mods               [-f <File>]
install, I                      The Link / ModID To Be Installed                [-I <Link / ModID>]
help, h                         Display this Help Message                       [-h]
version, v                      Display the Current Version                     [-v]
update, u                       Update Modworkshop-DL                           [-u]
installSBLT, is                 Install SuperBLT                                [-is]

Supported Games

Game Windows Mac Linux Mod Install Path
Payday 2 🟩 πŸŸ₯ πŸŸ₯ 🟩
Noita 🟩 πŸŸ₯ πŸŸ₯ 🟩
Enter the Gungeon 🟩 πŸŸ₯ πŸŸ₯ 🟩
Payday: The Heist 🟩 πŸŸ₯ πŸŸ₯ 🟩
Final Fantasy XV 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Stolen Realm 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
RAID: World War II 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Aurora 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Zuma 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Luxor 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
VRChat 🟩 πŸŸ₯ πŸŸ₯ 🟩
Left 4 Dead 2 🟩 πŸŸ₯ πŸŸ₯ 🟩
Hitman 3 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Monster Sanctuary 🟩 πŸŸ₯ πŸŸ₯ 🟩
Fallout 4 🟩 πŸŸ₯ πŸŸ₯ 🟩
Teardown 🟩 πŸŸ₯ πŸŸ₯ 🟩
Black Mesa 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Yakuza Kiwami 2 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Hotline Miami 2: Wrong Number 🟩 πŸŸ₯ πŸŸ₯ 🟩
Friday Night Funkin' 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Hotdogs, Horseshoes & Hand Grenades 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Yakuza Kiwami 1 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
100% Orange Juice 🟩 πŸŸ₯ πŸŸ₯ 🟩
Hyperdimension Neptunia Re;Birth2 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Non-games / Plugins 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Yakuza 0 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
One Step From Eden 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
OVERKILL's The Walking Dead 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
The Elder Scrolls V: Skyrim - Legendary Edition 🟩 πŸŸ₯ πŸŸ₯ 🟩
SCP: Containment Breach 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Fallout: New Vegas 🟩 πŸŸ₯ πŸŸ₯ 🟩
OneShot 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
SteamVR 🟩 πŸŸ₯ πŸŸ₯ 🟩
Criminal Girls: Invite Only 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Gal*Gun: Double Peace 🟩 πŸŸ₯ πŸŸ₯ 🟩
Warhammer: End Times - Vermintide 🟩 πŸŸ₯ πŸŸ₯ 🟩
Tales of Berseria 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Team Fortress 2 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Hyperdimension Neptunia Re;Birth3 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Hyperdimension Neptunia Re;Birth1 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Metal Gear Solid V: The Phantom Pain 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Skyrim Special Edition 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯
Forspoken 🟩 πŸŸ₯ πŸŸ₯ πŸŸ₯

A Red Square (πŸŸ₯) in the Mod Install Path section of the table indicates the mod will be downloaded and unzipped in the current directory of the terminal.

Building

To build the files, run the command:

$ go build

If the above does not work try the command:

$ go install

Testing

To Test the Tool, Run the command:

$ go test

If you would like code coverage, run:

$ go test -cover

How does it work?

What I've Learned

  • The "Fundahmentals" of Golang ⏩
  • Command Line Tooling (How they are made) πŸ’Ώ
  • Web Scraping ✨
  • As a person with OCD. Never write all of your code in one file, You'll go Crazy.