GameServerManagers / GameServerManagers/LinuxGSM
[FEATURE]Steam Workshop Support
- Dominant language
- Shell
- Stars
- 4.9k
- Forks
- 864
- PR merge metrics
- No merged PRs in 30d
Description
## User Story
As a LGSM-User, I want a general steam workshop support to be added so that it becomes much easier to install mods on steam gameservers.
## Basic info
* **Command:** [mods]
## Further Information
Many games, such as ARK or ARMA utilize the steam workshop as a platform for independent developers to upload their mods, that can be installed on the games server- (and perhaps client-) software.
My idea would be to add a variable "steammodids" to the linuxgsm config, a comma seperated list of modids to be installed.
The procedure of installing mods from the steamworkshop is always the same.
Example:
Download the Mod "Structures Plus"(731604991) for the game "ARK: Survival Evolved"(346110) to /home/gameserver :
`steamcmd +login anonymous + force_install_dir "/home/gameserver" +workshop_download_item 346110 731604991
`
The downloaded mod items then only have to be placed in the right folder (for arkserver that would be serverfiles/ShooterGame/Mods/).
**Checking for mod-updates via the steam web api**
To check wether a mod has been updated, you can retreive additional information as a json string via the steam web api (see link below).
Example:
To retreive additional information for the Mod "Structures Plus"(731604991) for the game "ARK: Survival Evolved"(346110), send a POST-Request to `https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/` containing the variables `itemcount = 1` and `publishedfileids[0] = 731604991`
Result:
SPOILER
{"response":{"result":1,"resultcount":1,"publishedfiledetails":[{"publishedfileid":"787023321","result":1,"creator":"76561198207216944","creator_app_id":346110,"consumer_app_id":346110,"filename":"","file_size":1391503,"file_url":"http://depotcontent.akamai.steamusercontent.com/staticcontent/346110/614094907/depot_346110_9170410184033285252.zip","hcontent_file":"9170410184033285252","preview_url":"https://steamuserimages-a.akamaihd.net/ugc/241333401165577293/96F98D936613B98B7703973567EB31CDB250BE16/","hcontent_preview":"241333401165577293","title":"Potions X","description":"[h1]Potions X[/h1]\r\n\r\n[b]CONTENT[/b]\r\n[list]\r\n [*]12 Special Potions\r\n[/list]\r\n\r\n[b]FEATURES[/b]\r\n\r\nInstant Potions for Players or Dinos to eighter\r\n[list]\r\n [*]Gain XP (Small/Medium/Large)\r\n [*]Recover Full Health\r\n [*]Wake Up\r\n [*]Repair Inventory Items\r\n [*]Make Hungry\r\n [*]Give Full Stamina\r\n [*]Add/Remove Speed (temporary removed)\r\n [*]High temporary Craft Speed/Skill\r\n [*]Instant Grow Hair (unlocks all hair styles)\r\n [*]More Speed (may need server restart to display value)\r\n [*]More Weight (may need server restart to display value)\r\n [*]Give Creative Mode Potion\r\n[/list]\r\n\r\nBe aware that this MOD is NOT for PVP servers, as all items cost only 1 fiber.\r\n\r\n[b]INI OPTIONS[/b]\r\n\r\n[code]\r\n[Potions]\r\nSpeedMultiplier=1.5\r\nWeightMultiplier=2\r\n[/code]\r\n\r\n[code]\r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_Healing_Potion_X.PrimalItemConsumable_Healing_Potion_X'\" 1 0 0 \r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_Repair_Potion_X.PrimalItemConsumable_Repair_Potion_X'\" 1 0 0 \r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_Wakeup_Potion_X.PrimalItemConsumable_Wakeup_Potion_X'\" 1 0 0 \r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_Hunger_Potion_X.PrimalItemConsumable_Hunger_Potion_X'\" 1 0 0 \r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_Stamina_Potion_X.PrimalItemConsumable_Stamina_Potion_X'\" 1 0 0 \r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_XP_Potion_X_Small.PrimalItemConsumable_XP_Potion_X_Small'\" 1 0 0 \r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_XP_Potion_X_Medium.PrimalItemConsumable_XP_Potion_X_Medium'\" 1 0 0 \r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_XP_Potion_X_Big.PrimalItemConsumable_XP_Potion_X_Big'\" 1 0 0 \r\nCheat GiveItem \"Blueprint'/Game/Mods/jd_DinoFood/PrimalItemConsumable_Creative_Potion_X.PrimalItemConsumable_Creative_Potion_X'\" 1 0 0 \r\n[/code]\r\n\r\n[b]MOD ID:[/b]\r\n[table]\r\n [tr]\r\n [th]787023321[/th]\r\n [/tr]\r\n[/table]\r\n[i]Mod is clean and stackable[/i]\r\n\r\n\r\n[URL=http://steamcommunity.com/profiles/76561198207216944/myworkshopfiles/?p=1] / / / CHECK OUT MY OTHER MODS / / /[/URL]\r\n\r\n\r\n[b]Feel free to donate if you like my MOD! Or if you would like it to be improved[/b]\r\n[URL=https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donate%40dubCUT%2ech&lc=CH&item_name=Game%20Modding¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted] [IMG]https://steamuserimages-a.akamaihd.net/ugc/1795223008080556716/5C479BD03AD6F7FA449817D55790D94895F09515/[/IMG] [/url]\r\n[img]https://steamuserimages-a.akamaihd.net/ugc/1795223008080557185/AAF7511DA72CB0FA1222D38BE270436D39AE943F/[/img] \r\n\r\nThis mod/code/work is protected by the [URL=http://creativecommons.org/licenses/by-nc-nd/4.0/legalcode]Attribution-NonCommercial-NoDerivatives 4.0 International Creative Commons License.\r\n[IMG]https://steamuserimages-a.akamaihd.net/ugc/911288903790420619/58BD7FE9EA4C1F04EB98D28F912B63441E5D137A/[/IMG][/URL]\r\n\r\n[b]Thank you everyone![/b]","time_created":1477408824,"time_updated":1525279596,"visibility":0,"banned":0,"ban_reason":"","subscriptions":15888,"favorited":647,"lifetime_subscriptions":35695,"lifetime_favorited":799,"views":22459,"tags":[]}]}}
You can then check the `time_updated` variable to determine, when the mod has been updated the last time.
Of course you can also print some of the information via the details command to provide additional insights.
## Further Reading
Steam workshop example (ARK): https://steamcommunity.com/workshop/browse/?appid=346110
Steam web api documentation: https://partner.steamgames.com/doc/webapi
Steam web api mod-query: https://partner.steamgames.com/doc/webapi/ISteamRemoteStorage (See GetPublishedFileDetails)
Related to #2777 #1623 #2092
Contributor guide
Assessment
This issue has not been assessed yet.