7.5 KiB
Workshop Phase 1 Implementation
Workspace reference: GSP-WORKSPACE.md
Summary
Phase 1 makes the active Server Content Manager Workshop path usable for DayZ/Arma-style Workshop installs without reviving the deprecated standalone steam_workshop user workflow.
Active workflow:
Game Monitor -> Server Content -> Steam Workshop Mods
Files Changed
Panel/modules/addonsmanager/server_content_helpers.phpPanel/modules/addonsmanager/workshop_action.phpPanel/modules/addonsmanager/workshop_content.phpPanel/modules/addonsmanager/addons_manager.phpPanel/modules/addonsmanager/module.phpPanel/modules/addonsmanager/scripts/workshop/generic_steam_workshop_linux.sh(Panel template for generated jobs)Panel/modules/addonsmanager/scripts/workshop/generic_steam_workshop_windows_cygwin.sh(Panel template for generated jobs)Panel/modules/steam_workshop/monitor_buttons.php
User Flow
- Open a server from the Panel.
- Click
Server Content. - Open the
Steam Workshop Modscategory. - Paste one or more Steam Workshop URLs or numeric Workshop IDs.
- Click
Install / Queue. - The Panel validates input, stores numeric Workshop IDs, writes a manifest, writes a generated per-job script, executes it through the agent's existing
execprimitive, and shows the result. - Installed items can be enabled/disabled, updated, removed, downloaded without immediate install, assigned an update policy, and later used by Scheduler actions.
Accepted input examples:
450814997https://steamcommunity.com/sharedfiles/filedetails/?id=450814997
Invalid text is rejected before reaching the manifest or shell script.
Admin Flow
- Create a Server Content template in
addonsmanager. - Set content type to
Steam Workshop Mods. - Configure
Workshop App IDwhen the game XML/profile does not provide it. - Leave
Default Workshop IDsblank for normal user-supplied installs. - Optionally configure a target path template.
The admin template defines capability and policy. The customer supplies only Workshop item IDs or URLs.
Install Flow
workshop_content.phpreceives the form post.workshop_action.phpparses URLs/IDs and records rows inserver_content_workshop.- The Panel builds a manifest with per-item install details.
- The manifest is written to:
{SERVER_HOME}/gsp_server_content/workshop_manifest.json
- A generated job script is written to:
{SERVER_HOME}/gsp_server_content/jobs/workshop/workshop_job_<timestamp>_<random>.sh
- The agent runs:
bash <script> <manifest>
- The script writes a temporary SteamCMD runscript containing
workshop_download_item <appid> <workshop_id> validate. - The script runs SteamCMD with
+runscript, copies downloaded content into the target mod folder when the action requires install, logs output, and copies.bikeyfiles for DayZ/Arma-style strategies.
Current repair:
- The default script filename is no longer treated as an agent-host path.
- Static custom Workshop scripts are deprecated for the primary path; the Panel generates a per-job script instead.
- Generic installs default to
{SERVER_ROOT}/workshop/{MOD_FOLDER}. - DayZ/Arma installs keep
{SERVER_ROOT}/{MOD_FOLDER}for@<workshop_id>compatibility. download_onlyandvalidate_filesare accepted script actions and do not copy into live mod folders.removedoes not require SteamCMD.
Manifest Fields
Phase 1 manifests include:
manifest_versionactionhome_idhome_cfg_idgame_pathserver_pathworkshop_app_idsteam_app_iditemsitem_detailsinstall_strategytarget_pathextra
Each item_details entry includes:
workshop_item_idfolder_nametarget_path_templatetarget_path_resolvedinstall_strategycopy_keyskeys_target_path
DayZ / Arma Behavior
The Panel detects dayz_mod_folder or arma_mod_folder from the game key/name/config file when no explicit strategy exists.
Default install folder:
@<workshop_id>
Arma 3 game XML now declares:
- Workshop app ID:
107410 - Dedicated server app ID:
233780through the existinginstaller_name
Key-copy behavior:
.bikeyfiles found anywhere in the installed mod folder are copied to{SERVER_HOME}/keys.- Missing
.bikeyfiles are logged and do not fail the install.
Database Tracking
server_content_workshop now tracks:
content_idinstall_pathinstall_strategyenabledload_orderupdate_policypending_actioninstall_statelast_installed_atlast_updated_atlast_error
Phase 1 states:
queuedinstallinginstalleddownloadedfailedremoved
server_content_workshop_catalog tracks known/common items:
workshop_idapp_idtitleinstall_countfirst_seenlast_installedlast_updatedpublished_datetagsgame_keylocal_cache_path
Supported update policies:
manualscheduledupdate_nowupdate_and_restartdownload_onlyinstall_on_restart
Scheduler action keys:
workshop_updateworkshop_update_and_restartworkshop_download_onlyworkshop_install_pending_on_restart
Security Notes
- Customer input is reduced to numeric Workshop IDs only.
- Invalid text is rejected.
- Target paths are generated from trusted templates and checked to stay under the server home.
- Scripts are copied from the Panel module source into a GSP-controlled folder under the server home.
- Customers do not supply shell commands.
- Admin-defined post-install scripts remain possible but should be treated as trusted admin configuration only.
- Steam credentials are not introduced by Phase 1; scripts use anonymous login.
Startup Parameters
Phase 1 does not rewrite startup parameter generation.
Current DayZ/Arma XML files already expose user-editable -mod= / -serverMod= parameters through server_params.
Phase 2 should generate structured mod lists from enabled server_content_workshop rows ordered by load_order, avoid duplicate -mod= entries, and preserve existing user parameters.
Validation Performed
- PHP syntax checks passed for changed PHP files.
- Bash syntax checks passed for both bundled Workshop scripts.
- Parser test confirmed:
- numeric ID accepted
- full Steam URL accepted
- invalid text rejected
- Temporary manifest test with fake SteamCMD confirmed:
- Linux script installs generic content into
workshop/@<workshop_id> - Windows/Cygwin script installs generic content into
workshop/@<workshop_id> - Arma/DayZ strategies resolve to root
@<workshop_id>folders .bikeyfiles are copied tokeys- useful logs are written under
gsp_server_content
- Linux script installs generic content into
- Current smoke tests also confirm:
- default Linux/Windows script staging no longer reports
script not found - full URLs, numeric IDs, whitespace, comma, newline, duplicates, and invalid values parse correctly
- generic no-template installs use
server_root/workshop - missing SteamCMD returns a clear failure
- default Linux/Windows script staging no longer reports
Phase 2 Work
- Add real asynchronous install jobs and progress polling.
- Resolve Workshop item titles/metadata.
- Add load-order UI.
- Wire enable/disable and load order into safe startup parameter generation.
- Support separate client mods and server-only mods.
- Add update-all and repair semantics that can preserve old installs until success.
- Add cache policy and cleanup controls.
- Add admin XML/schema fields for explicit install strategy and key-copy behavior.
- Add Steam account credential support without leaking secrets.