26

Downloading Ark Survival Evolved Mods With SteamCMD

I spent a number of years working for a game server host.  As a result many of my projects are focused in that domain.

One of the more recent issues I had with was dealing with mods for Ark Survival Evolved Servers.

At the time of writing this putting mods on an ARK Survival Evolved server is a bit of a pain.  You must subscribe to the mod in your client, allow Steam to download it and then upload it to your game server.   This is a major pain if you rent a server from a game host.

Due to this problem it left mod installation entirely up to the game server owner.  This is especially a problem for people with slow upload speed since they have to upload their own files instead of leveraging the bandwidth on their hosted game server.

I wanted a way to allow game hosts to automate this process via their control panels.

With other games, Arma 3 as an example, you can use SteamCMD to download the mod files directly.  However, this does not work with ARK Survival Evolved.  When you attempt this all downloaded files are compressed with a non-standard implementation of zlib that will not work on the server.

I decided to roll my own solution in Python 3.

I wanted to create a ‘mod manager’ type tool for downloading and updating ARK mods.

However, due to make lack of file compression knowledge I hit a brick wall trying to extract the .z files.   I about gave up there.  However, I was happy to find someone had already made a Python 3 script for extracting these files.

With that problem out of the way the rest was straight forward and my tool came together nicely.

The end result was a tool that allows you to specify the Mod ID you want.  It will then download it, extract it and move it into your server. The tool handles everything for you.

I also baked in a few other features.

Server Directory – You can either specify the directory of your server via the command line or let the script use it’s current working directory.  The easiest way is to dump the provided exe into the root of your server folder.

Update Existing Mods – If you specify the –update flag in the command line it will find all the mods you currently have installed and update them

SteamCMD – By default the tool will check common locations for SteamCMD.  If it cannot find SteamCMD it will download it’s own local copy.  However, you can also specify a custom location using –steamcmd PATH in the command line.

The full tool can be found here

matt

26 Comments

  1. Thanks for posting this. I tried the tool but it gave a MemoryError when extracting the .z files of the Valhalla map (mod id 504122600)…

    Waiting for license info…OK
    Downloading item 504122600 …
    Success. Downloaded item 504122600 to “C:\Users\Administrator\Desktop\ASM\SteamC
    MD\steamapps\workshop\content\346110\504122600” (3267000143 bytes) [+] Extractin
    g .z Files.
    Traceback (most recent call last):
    File “Ark_Mod_Downloader.py”, line 409, in
    File “Ark_Mod_Downloader.py”, line 404, in main
    File “Ark_Mod_Downloader.py”, line 37, in __init__
    File “Ark_Mod_Downloader.py”, line 147, in update_mods
    File “Ark_Mod_Downloader.py”, line 179, in download_mod
    File “Ark_Mod_Downloader.py”, line 199, in extract_mod
    File “C:\Users\Jeromy\PycharmProjects\Ark_Mod_Downloader\arkit.py”, line 112,
    in unpack
    MemoryError

    Regards,

    Les

  2. Thanks for this. Does it work with Linux servers or just Windows? I glanced over the script and saw references for steamcmd.exe, so I wasn’t sure.

    • It’s for Windows. Although it should be trivial to port to Linux. If I have time this weekend I’ll work on it.

  3. Working amazingly. Sadly I have to manually copy over the larger files (ex. Building Xtras and Annunaki Genesis) because it can’t seem to find the right files after extracting it.

    Still better than any other method.

    Tip for new readers:
    echo off
    Ark_Mod_Downloader.exe –workingdir arkserver –steamcmd steam –modid 538986229
    Ark_Mod_Downloader.exe –workingdir arkserver –steamcmd steam –modid 656489100

    This is how you can download many mods with one batch file. 🙂

    • C:\…\Ark Server>echo off
      [+] Checking Provided Path For SteamCMD
      [+] SteamCMD Found At Provided Path
      [+] Removing Steamapps Folder
      [+] Starting Download of Mod 656489100
      Redirecting stderr to ‘C:\…\Ark Server\steam\logs\stderr.txt’
      [ 0%] Checking for available updates…
      [—-] Verifying installation…
      Steam Console Client (c) Valve Corporation
      — type ‘quit’ to exit —
      Loading Steam API…OK.

      Connecting anonymously to Steam Public…Logged in OK
      Waiting for license info…OK
      Downloading item 656489100 …ERROR! Timeout downloading item 656489100depotreconstruct.cpp (1029) : Assertion Failed: m_nOutstandingWorkItems == 0
      ..\common\asyncfileiohandler.cpp (127) : Assertion Failed: m_queueItemsOut.Count() == 0
      ..\common\asyncfileiohandler.cpp (128) : Assertion Failed: m_unPendingItems == 0
      \src\common\resourcecache.h (250) : Assertion Failed: m_unLockedItems == 0
      \src\common\resourcecache.h (254) : Assertion Failed: e.nLockCount == 0
      \src\common\resourcecache.h (254) : Assertion Failed: e.nLockCount == 0
      \src\common\resourcecache.h (254) : Assertion Failed: e.nLockCount == 0
      \src\common\resourcecache.h (254) : Assertion Failed: e.nLockCount == 0
      \src\common\resourcecache.h (254) : Assertion Failed: e.nLockCount == 0
      ..\common\asyncfileiohandler.cpp (449) : Assertion Failed: m_queueItemsPending.Count() == 0
      ..\common\asyncfileiohandler.cpp (450) : Assertion Failed: m_queueItemsComplete.Count() == 0
      ..\common\asyncfileiohandler.cpp (451) : Assertion Failed: m_unPendingCompletionCalls == 0
      \src\common\resourcecache.h (250) : Assertion Failed: m_unLockedItems == 0
      CWorkThreadPool::~CWorkThreadPool: work complete queue not empty, 16 items discarded.
      CWorkThreadPool::~CWorkThreadPool: work complete queue not empty, 6 items discarded.
      [+] Extracting .z Files.
      [+] Collecting Mod Details From mod.info
      [x] Failed to locate mod.info. Cannot Continue. Aborting
      [+] There was problems with the mod download. See above errors
      Press any key to continue . . .

      It seems like the larger downloads timeout. Anyway to solve this?

      • Sorry for the late reply. Started a new job recently. Can you give me a mod ID to test this with?

  4. Holy Shit, u r a god man!

    Thank you, this works perfect on my win server.
    Im using the EXE, put just one mod and –update

    This works wonderfull nice, i can update more than 20 mods at once, very fast too.

    The only think that i dint like is that i relly need to use –modid ?

    –update would be enough.

    btw, very thankz man, u saved me 🙂

    • Thank you for the kind words. I’m a bit surprised people are using this. I made it for myself.

      If you use the –update flag you don’t need to use –modid.

    • Hey so I used the following but when i enter multiple mods like this:

      –modid mod1 mod2

      It only downloads the second mod. Also when I go back in to download a new mod it clears out the folder than adds the new mod by itself HELP

      C:\Users\manfr\Downloads\ARK\Ark_Mod_Downloader-master>Ark_Mod_Downloader.exe –workingdir C:\Downloads\ARK\Ark_Mod_Downloader-master\dist –steamcmd C:\Downloads\ARK\Ark_Mod_Downloader-master\dist\SteamCMD –modid

  5. I modified the batch script a little so it would no longer need to be changed if a single mod needed installing/updating or if you wanted to choose to update all installed mods. When running this, you are prompted for a specific mod id if you wish to install/update a specific mod, or type update to update currently installed mods. Hopefully this will help others. The batch file is as follows:

    @echo off

    cd \Ark_Mod_Downloader-master\dist

    set /p MODID_NUMBER=Please enter ID of the mod to be installed/updated or type update to update installed mods:

    IF %MODID_NUMBER%==update (
    Ark_Mod_Downloader.exe –workingdir –steamcmd –update
    ) ELSE (
    Ark_Mod_Downloader.exe –workingdir –steamcmd –modid %MODID_NUMBER%
    )

    • for some reason that did not format right and things got left out….. lets try again…

      @echo off

      cd C:path to your ark mod downloader directory\Ark_Mod_Downloader-master\dist

      set /p MODID_NUMBER=Please enter ID of the mod to be installed/updated or type update to update installed mods:

      IF %MODID_NUMBER%==update (
      Ark_Mod_Downloader.exe –workingdir path to your working directory –steamcmd path to your steamcmd directory –update
      ) ELSE (
      Ark_Mod_Downloader.exe –workingdir path to your working directory –steamcmd path to your steamcmd directory –modid %MODID_NUMBER%
      )

  6. Hmm, one problem though, i tried everything, but even the .exe wont launch :/

    • Nevermind that! I was just stupid and didnt type in the flags correctly, one thing though, SteamCMD drops dead while downloading “big” mods, and i already have them at least 80 percent downloaded but steamapps get deleted everytime i use the .exe :/

  7. Hi awesome tool!

    I recently bought a server on OVH and a TCADMIN licence, i see you have it prepared for TCADMIN, i was trying to import it as a python script but gives me error No module named arkit i assume i have to drop arkit.py somewhere or give it a path ?

    • Don’t use it as an Iron Python script in TC Admin. TCA doesn’t include the Python Standard Library so this script won’t come close to running.

      Instead, using the exe and execute it from a batch script in TCA.

      • That was my second idea, yes.

        I was planning to use it as python script because i wanted to edit some of the messages that are printed to console, to make some customized messages.

  8. I’m having trouble getting this problem to work. I run the .exe and the window immediately opens then closes before I can try anything. Help?

  9. Hello guys, i tried everything you post here but the Ark Mod Downloader.exe keep closing on lunch and nothing happen, i will glad for some help plz 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *