Jump to content
Freddo3000

a3update.py - A small lightweight python script for handling server and modpack updates

Recommended Posts

Marceldev89s original script, from which I forked.

Introduction:

a3update.py is a simple, lightweight python script that handles:

  • Updating the arma server
  • Installing and updating mods
  • Generating an importable preset.html

ideal to accompany @Dahlgren's Arma Server Web Admin which as of yet does not provide those features.

Here is an example modpack.html I setup for a friend using this script

 

Download (Github Gist)
 

Requirements:

SteamCMD, Python3, Python3-urllib3, a Steam account with Arma 3

Installation (Ubuntu):

  1. Follow the initial server installation instructions on the BIWiki
  2. `sudo apt-get install steamcmd python3 python3-urllib3`
  3. `wget https://gist.githubusercontent.com/Freddo3000/a5cd0494f649db75e43611122c9c3f15/raw/4854ac4a78c7d347ade1e9ab9fcac147d7dbe3e9/a3update.py`
  4. Edit the following settings:
    1. STEAM_CMD - Point this at your steamcmd installation, alternatively simply enter "steamcmd"
    2. STEAM_USER - Your login username
    3. STEAM_PASS - Your login password
    4. A3_SERVER_DIR - Point this at your A3 server installation directory
    5. A3_MODS_DIR - Point this to where you want your mods to be symlinked. If you are using the suggested Arma Server Web Admin, make this the same as A3_SERVER_DIR
    6. A3_KEYS_DIR - Point this at the Keys folder in your installation directory
    7. MODPACK_NAME - Change this to what the title should be for the A3 launcher imported preset
    8. MODPACK_PATH - This will be the output preset.html file. Point this to wherever you wish for it to be stored, such as /var/www/html for the Apache web server
    9. MODS - Your list of mods in the format "@mod_folder" : "https://steamcommunity.com/sharedfiles/filedetails/?id=450814997". Avoid special and capital characters
    10. SERVER_MODS - List of server mods, only add folder names here. These also have to be present in the MODS list. Server keys will not be copied for these mods
    11. OPTIONAL_MODS - List of server mods, only add folder names here. These also have to be present in the `MODS` list. These mods will not get symlinks in your A3_MODS_DIR, but will have their server keys copied.
    12. DLC - List of CDLC in format "Name" : "https://store.steampowered.com/app/1042220/Arma_3_Creator_DLC_Global_Mobilization__Cold_War_Germany/"
    13. Optional: Install Arma Server Web Admin
  5. `chmod +x a3update.py` // Might be a good idea to limit access, as you have your password stored in plaintext
  6. Run it! `./a3update.py`

 

Importing preset via URL:

  1. Open the A3 Launcher, go to mods, select "PRESET" at the top right and "IMPORT"
  2. Copy the link to the modpack.html (Example: https://somewebsite.com/modpack.html)
  3. Paste it into the "File name" field and press Open


Notes:
This has only been tested on Linux, though I wouldn't be surprised if it also works on Windows
 

Known issues:

  • Does currently not handle installation and updates of CDLC
  • Doesn't work well with 2FA due to how steam stores login tokens
  • Optional DLC is not kept when preset is imported
  • With larger mod lists some data may fail to transfer to the launcher, therefore if you intend to keep the server public you'll want to run less than 15 mods.
    You can increase the amount of transferable data by shortening each mods mod.cpp file, making each mod take less space to transfer.
    Alternatively, you can use the ACE checkPBOs framework to make sure players are running the correct mods.


License:

MIT License
 

Credits:

@marceldev89 from who I forked this project

Edited by Freddo3000
Added additional info
  • Thanks 3

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×