[GH-ISSUE #1894] Arma 3 Updater with mod support #1487

Open
opened 2026-02-27 02:57:23 +03:00 by kerem · 8 comments
Owner

Originally created by @JediNarwals on GitHub (May 5, 2018).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/1894

Originally assigned to: @UltimateByte on GitHub.

I haven't seen anything for support for mods, especially for Arma. So I've made a code that helps makes this work.
PasteBin

This will require you to have your own repository so it doesn't get updated back to default on the Update LGMS command. (Maybe there is a way to retry this without it self updating under the functions.)

You'll also need to add a line into the file: command_update.sh

elif [ "${gamename}" == "ARMA 3" ]; then
	updateserver.sh

This will go before the else at the end. So it'll look like this:

#!/bin/bash
# LinuxGSM command_update.sh function
# Author: Daniel Gibbs
# Website: https://gameservermanagers.com
# Description: Handles updating of servers.

local commandname="UPDATE"
local commandaction="Update"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

fn_print_dots ""
sleep 0.5
check.sh
logs.sh

if [ "${gamename}" == "TeamSpeak 3" ]; then
	update_ts3.sh
elif [ "${engine}" == "lwjgl2" ]; then
	update_minecraft.sh
elif [ "${gamename}" == "Mumble" ]; then
	update_mumble.sh
elif [ "${gamename}" == "Factorio" ]; then
	update_factorio.sh
elif [ "${gamename}" == "Multi Theft Auto" ]; then
	update_mta.sh
elif [ "${gamename}" == "ARMA 3" ]; then
	updateserver.sh
else
	update_steamcmd.sh
fi

core_exit.sh
Originally created by @JediNarwals on GitHub (May 5, 2018). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/1894 Originally assigned to: @UltimateByte on GitHub. I haven't seen anything for support for mods, especially for Arma. So I've made a code that helps makes this work. [PasteBin](https://pastebin.com/embed_js/gEyA4h9n) This will require you to have your own repository so it doesn't get updated back to default on the Update LGMS command. (Maybe there is a way to retry this without it self updating under the functions.) You'll also need to add a line into the file: command_update.sh ```Bash elif [ "${gamename}" == "ARMA 3" ]; then updateserver.sh ``` This will go before the else at the end. So it'll look like this: ```Bash #!/bin/bash # LinuxGSM command_update.sh function # Author: Daniel Gibbs # Website: https://gameservermanagers.com # Description: Handles updating of servers. local commandname="UPDATE" local commandaction="Update" local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_print_dots "" sleep 0.5 check.sh logs.sh if [ "${gamename}" == "TeamSpeak 3" ]; then update_ts3.sh elif [ "${engine}" == "lwjgl2" ]; then update_minecraft.sh elif [ "${gamename}" == "Mumble" ]; then update_mumble.sh elif [ "${gamename}" == "Factorio" ]; then update_factorio.sh elif [ "${gamename}" == "Multi Theft Auto" ]; then update_mta.sh elif [ "${gamename}" == "ARMA 3" ]; then updateserver.sh else update_steamcmd.sh fi core_exit.sh ```
Author
Owner

@UltimateByte commented on GitHub (May 6, 2018):

Even though this one is a bit different from other mods downloaded using ZIPs, I believe we could add it to https://github.com/GameServerManagers/LinuxGSM/wiki/mods with some painful adaptations :)

GitHub
LinuxGSM - Linux Game Server Managers_
<!-- gh-comment-id:386882599 --> @UltimateByte commented on GitHub (May 6, 2018): Even though this one is a bit different from other mods downloaded using ZIPs, I believe we could add it to https://github.com/GameServerManagers/LinuxGSM/wiki/mods with some painful adaptations :) <blockquote><img src="https://avatars2.githubusercontent.com/u/20358373?s=400&v=4" width="48" align="right"><div><img src="https://assets-cdn.github.com/favicon.ico" height="14"> GitHub</div><div><strong><a href="https://github.com/GameServerManagers/LinuxGSM">GameServerManagers/LinuxGSM</a></strong></div><div>LinuxGSM - Linux Game Server Managers_</div></blockquote>
Author
Owner

@draakuns commented on GitHub (May 8, 2018):

Hi,

Arma3 is very different in the way it manages mods, as they are missions and mods on the same web place, but dont reside on the same directory after that.
To complicate more, the missions are not downloaded with names but a dirty name from workshop.
Therefore i created a quick'n'dirty mod management (sorry, no time to make it better yet, it's a pre-alpha WIP)... You can't just download from zips that change names, or install & go. It needs subscriptions on the workshop to work, and also a valid steam account that owns the game to download the mods.

  • In my mod management, you must trigger a manual exec, which reads your favourites page on the workshop (quickest way to avoid logging in the web, as favs are public). So you need to subscribe AND fav it for my scripts to work.
  • After it reads that, compares with a local list that populates with: whether it is a mission or a mod, grabs the name of the mission or mod, downloads it and creates the needed link with a name.
  • If the mod has been already downloaded, it doesnt downloads it.
  • To avoid compat issues you must lowercase the full mods directory on linux (don't ask, or better ask Bohemia about it)
  • I think I didnt commited it yet, but I also made a "update mods/missions"...

TO_DO: (and probably will never be done) The mods required for each mission must be human-read by hand on the workshop page and add it to the armaserver.cfg on the mods var.
This can be solved by creating a var on the script itself, but it's not so smart to read from the workshop yet.

That can serve as a basis (if you want), but beware of all the dirty tricks I used for now... And beware that Bohemia Int. complicated things a lot on this mod game.

If want anything, let me know.

Best of luck
Draakuns

<!-- gh-comment-id:387354172 --> @draakuns commented on GitHub (May 8, 2018): Hi, Arma3 is very different in the way it manages mods, as they are missions and mods on the same web place, but dont reside on the same directory after that. To complicate more, the missions are not downloaded with names but a dirty name from workshop. Therefore i created a quick'n'dirty mod management (sorry, no time to make it better yet, it's a pre-alpha WIP)... You can't just download from zips that change names, or install & go. It needs subscriptions on the workshop to work, and also a valid steam account that owns the game to download the mods. - In my mod management, you must trigger a manual exec, which reads your favourites page on the workshop (quickest way to avoid logging in the web, as favs are public). So you need to subscribe AND fav it for my scripts to work. - After it reads that, compares with a local list that populates with: whether it is a mission or a mod, grabs the name of the mission or mod, downloads it and creates the needed link with a name. - If the mod has been already downloaded, it doesnt downloads it. - To avoid compat issues you must lowercase the full mods directory on linux (don't ask, or better ask Bohemia about it) - I think I didnt commited it yet, but I also made a "update mods/missions"... TO_DO: (and probably will never be done) The mods required for each mission must be human-read by hand on the workshop page and add it to the armaserver.cfg on the mods var. This can be solved by creating a var on the script itself, but it's not so smart to read from the workshop yet. That can serve as a basis (if you want), but beware of all the dirty tricks I used for now... And beware that Bohemia Int. complicated things a lot on this mod game. If want anything, let me know. Best of luck Draakuns
Author
Owner

@JediNarwals commented on GitHub (May 8, 2018):

So I haven't really gone into detail on what this script actually does.

So this will make the server stop and validate all files (including the mods) if it requires an update it will update that file. If it doesn't need an update then it won't re-download the file. This process will however move the file every time. It will delete the previous mod location, to help with different server keys/bikeys. It will then move all the files over and lowercase all the files and folders so that they will read on Linux. After that it will move the server keys over to the keys folder so that the server can read it and suggest it to the player. I've also made it check for the Update-Linux command and run that as well so both the server and the LinuxGSM files are up to date. And it will start the server then push an update notification (If applicable).

Let me know if you have any other questions
JediNarwals

<!-- gh-comment-id:387356936 --> @JediNarwals commented on GitHub (May 8, 2018): So I haven't really gone into detail on what this script actually does. So this will make the server stop and validate all files (including the mods) if it requires an update it will update that file. If it doesn't need an update then it won't re-download the file. This process will however move the file every time. It will delete the previous mod location, to help with different server keys/bikeys. It will then move all the files over and lowercase all the files and folders so that they will read on Linux. After that it will move the server keys over to the keys folder so that the server can read it and suggest it to the player. I've also made it check for the Update-Linux command and run that as well so both the server and the LinuxGSM files are up to date. And it will start the server then push an update notification (If applicable). Let me know if you have any other questions JediNarwals
Author
Owner

@draakuns commented on GitHub (May 9, 2018):

Hmmm... I see... Some points below (not saying it's better, but it suits my needs in a better way).

  • The point for me was avoiding having to edit the script file to get the workshop files, therefore the parsing from user favourites.
  • Same applies for naming.
  • Unfortunately here you don't cover Mission files, only mods. Missions can be downloaded same way, but you will reach rapidly the 30 mod limit that way (I have a personal server which has 60+ mod+miss and I "just" installed it). And missions on DS don't download with proper naming, so it's handwork after that...
  • Validating all the mods every time you want to download a mod is overkill if you have a lot of them... That's why I use a file list to keep info. If the favourites list has new items, they get downloaded. Otherwise, they don't. And I am just adding a "full mod update" (WIP), but for me is not possible, as it needs to validate 50Gb of mods if I just want to add a mission which will play that night.
  • I don't need to even bear with steamcmd, as it is managed by LGSM already. I save that part, as my time nowadays is very limited...
  • Right now I lowercase the full mod directory (which is for me $serverfiles/mod/steamapps/blablah....). If the time comes, maybe it's convenient for me to only lowercase every installed / updated mod...
  • Here I don't get why you move the files after using and case-lowering... maybe I took a too-diagonal read here. Can you clarify, pls?
    Can't you just set a force_install_dir directly for the mods within the Arma serverfiles? You can even use outer directories... after all, that's what symlinks are for!
    This is my mod dir, as a reference:
lrwxrwxrwx 1 steamsrv users   81 Apr 26 01:19 @ace -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/463939057
....blablablah..........................
lrwxrwxrwx 1 steamsrv users   81 Apr 26 01:19 @Zombies_and_Demons -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/501966277

and same applies for the mpmissions:

lrwxrwxrwx 1 steamsrv users 111 Apr 26 16:48 coop-04_a_long_way.altis.pbo -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/349220853/419187061830718204_legacy.bin
lrwxrwxrwx 1 steamsrv users 112 Apr 26 16:47 coop_1-4_drug_war_tanoa.tanoa.pbo -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/752795234/2432383864451690455_legacy.bin
.....BLAHBLAHBLAH....
lrwxrwxrwx 1 steamsrv users 111 Apr 26 16:48 sp_co-06_disarmament.altis.pbo -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/410243478/419187061830802126_legacy.bin
lrwxrwxrwx 1 steamsrv users 112 May  9 00:52 SP_COOP_06_World_War_2_Battle_of_Berlin.SWU_Germany_Streets_of_Berlin.pbo -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/1376202051/930434406210962787_legacy.bin

Hope that helps,
Draakuns

<!-- gh-comment-id:387669257 --> @draakuns commented on GitHub (May 9, 2018): Hmmm... I see... Some points below (not saying it's better, but it suits my needs in a better way). - The point for me was avoiding having to edit the script file to get the workshop files, therefore the parsing from user favourites. - Same applies for naming. - Unfortunately here you don't cover Mission files, only mods. Missions can be downloaded same way, but you will reach rapidly the 30 mod limit that way (I have a personal server which has 60+ mod+miss and I "just" installed it). And missions on DS don't download with proper naming, so it's handwork after that... - Validating all the mods every time you want to download a mod is overkill if you have a lot of them... That's why I use a file list to keep info. If the favourites list has new items, they get downloaded. Otherwise, they don't. And I am just adding a "full mod update" (WIP), but for me is not possible, as it needs to validate 50Gb of mods if I just want to add a mission which will play that night. - I don't need to even bear with steamcmd, as it is managed by LGSM already. I save that part, as my time nowadays is very limited... - Right now I lowercase the full mod directory (which is for me $serverfiles/mod/steamapps/blablah....). If the time comes, maybe it's convenient for me to only lowercase every installed / updated mod... - Here I don't get why you move the files after using and case-lowering... maybe I took a too-diagonal read here. Can you clarify, pls? Can't you just set a force_install_dir directly for the mods within the Arma serverfiles? You can even use outer directories... after all, that's what symlinks are for! This is my mod dir, as a reference: ```:~/arma3/serverfiles/mods$ls -l lrwxrwxrwx 1 steamsrv users 81 Apr 26 01:19 @ace -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/463939057 ....blablablah.......................... lrwxrwxrwx 1 steamsrv users 81 Apr 26 01:19 @Zombies_and_Demons -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/501966277 ``` and same applies for the mpmissions: ``` :~/arma3/serverfiles/mpmissions$ ls -l lrwxrwxrwx 1 steamsrv users 111 Apr 26 16:48 coop-04_a_long_way.altis.pbo -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/349220853/419187061830718204_legacy.bin lrwxrwxrwx 1 steamsrv users 112 Apr 26 16:47 coop_1-4_drug_war_tanoa.tanoa.pbo -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/752795234/2432383864451690455_legacy.bin .....BLAHBLAHBLAH.... lrwxrwxrwx 1 steamsrv users 111 Apr 26 16:48 sp_co-06_disarmament.altis.pbo -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/410243478/419187061830802126_legacy.bin lrwxrwxrwx 1 steamsrv users 112 May 9 00:52 SP_COOP_06_World_War_2_Battle_of_Berlin.SWU_Germany_Streets_of_Berlin.pbo -> /home/steamsrv/arma3/serverfiles/mods/steamapps/workshop/content/107410/1376202051/930434406210962787_legacy.bin ``` Hope that helps, Draakuns
Author
Owner

@JediNarwals commented on GitHub (May 9, 2018):

So what we're trying to do (this is just the file that I use on my own server) is integrate it into the mods command for LinuxGSM. So this is all skeptical. But what the file that I have right now does is goes through and downloads the mods from the previously set variables. Once downloaded they're in the root of the users (same location of the "serverfiles" folder, not in it). The script then takes the files that were downloaded (addons folder, keys folder, and the files that you'd typically find in a mod for Arma 3 without all the folder-ception) and places them in the "serverfiles" folder under the corresponding name to the variable that was set. It'll then look for the keys in the mod folder and move them to the "keys" folder in the Arma directory so the server can suggest the mod to the client as a mod to join with.

This file will automatically use the login that was used when you first installed the game for the steamCMD and will handle the steamCMD commands for you to install/validate all the mods and games.

But as for mission downloading this file was purely intended for the mods. There's no intention for the mission files to be downloaded/installed this way. Though it can be done. And I may have a more powerful dedicated server than most. But to validate 3 servers each with ~45Gb of mods plus the server files it only takes my server about 4-5 minutes for all 3 servers to run and validate on the same machine at the same time.

I do have some ideas on how to integrate this type of script with the current mod script in LinuxGSM however it is all theory right now and we are opening to ideas and speculation to make it better and integrate with the current standing files.

<!-- gh-comment-id:387761416 --> @JediNarwals commented on GitHub (May 9, 2018): So what we're trying to do (this is just the file that I use on my own server) is integrate it into the mods command for LinuxGSM. So this is all skeptical. But what the file that I have right now does is goes through and downloads the mods from the previously set variables. Once downloaded they're in the root of the users (same location of the "serverfiles" folder, not in it). The script then takes the files that were downloaded (addons folder, keys folder, and the files that you'd typically find in a mod for Arma 3 without all the folder-ception) and places them in the "serverfiles" folder under the corresponding name to the variable that was set. It'll then look for the keys in the mod folder and move them to the "keys" folder in the Arma directory so the server can suggest the mod to the client as a mod to join with. This file will automatically use the login that was used when you first installed the game for the steamCMD and will handle the steamCMD commands for you to install/validate all the mods and games. But as for mission downloading this file was purely intended for the mods. There's no intention for the mission files to be downloaded/installed this way. Though it can be done. And I may have a more powerful dedicated server than most. But to validate 3 servers each with ~45Gb of mods plus the server files it only takes my server about 4-5 minutes for all 3 servers to run and validate on the same machine at the same time. I do have some ideas on how to integrate this type of script with the current mod script in LinuxGSM however it is all theory right now and we are opening to ideas and speculation to make it better and integrate with the current standing files.
Author
Owner

@draakuns commented on GitHub (May 9, 2018):

Hi @JediNarwals,

different approaches then... But each one serve a different purpose ;)

WOW, 4-5min... it tooks some time for my 50gig, but I am kind of shorthanded on CPU power at all, as it is a small NAS with dual core AMD 1.6Ghz... I run the games with 4 to 10 mods for 8 people tops, but it serves my purpose... only that I need to wait a lil' more than u hehe.

Good luck on your trip towards your mod management, though! I will keep trying to create a full suite for dynamic mod-missions.
Draakuns.

<!-- gh-comment-id:387764445 --> @draakuns commented on GitHub (May 9, 2018): Hi @JediNarwals, different approaches then... But each one serve a different purpose ;) WOW, 4-5min... it tooks some time for my 50gig, but I am kind of shorthanded on CPU power at all, as it is a small NAS with dual core AMD 1.6Ghz... I run the games with 4 to 10 mods for 8 people tops, but it serves my purpose... only that I need to wait a lil' more than u hehe. Good luck on your trip towards your mod management, though! I will keep trying to create a full suite for dynamic mod-missions. Draakuns.
Author
Owner

@gbschenkel commented on GitHub (Oct 2, 2018):

Hi everyone, I found this script built with python3. a3update.py. The mods are validated against the changelog from steam workshop page(at least was what I understood), maybe it can help in your development. Cheers.

<!-- gh-comment-id:426147565 --> @gbschenkel commented on GitHub (Oct 2, 2018): Hi everyone, I found this script built with python3. [a3update.py](https://gist.github.com/marceldev89/12da69b95d010c8a810fd384cca8d02a#file-a3update-py). The mods are validated against the changelog from steam workshop page(at least was what I understood), maybe it can help in your development. Cheers.
Author
Owner

@cydactyl commented on GitHub (Jul 21, 2020):

+1 support this idea, mod management is a pain with the Steam Workshop, especially with large mod files like Arma 3 uses...

<!-- gh-comment-id:661657867 --> @cydactyl commented on GitHub (Jul 21, 2020): +1 support this idea, mod management is a pain with the Steam Workshop, especially with large mod files like Arma 3 uses...
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#1487
No description provided.