Skip to content

feat(config): add extraparams to all game server configs - #4970

Open
borzaka wants to merge 1 commit into
GameServerManagers:developfrom
borzaka:feat/add-extraparams
Open

borzaka wants to merge 1 commit into
GameServerManagers:developfrom
borzaka:feat/add-extraparams

Conversation

@borzaka

@borzaka borzaka commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds an extraparams variable to every game server's _default.cfg and appends it to the end of startparameters.

Users can now add their own start parameters in instance.cfg (or common.cfg) without copying and overriding the whole startparameters line. They also keep getting future upstream changes to the default parameters.

# lgsm/config-lgsm/cs2server/cs2server.cfg
extraparams="+sv_lan 1"

Details:

  • extraparams="" is the last entry of the ## Predefined Parameters block in all 147 server configs. Configs that had no such block got one.
  • Every startparameters now ends with ${extraparams}. The default is empty, so nothing changes unless the user sets it.
  • The commented-out alternative startparameters lines (hcuserver, kfserver) include it too.
  • kf2server: ${extraparams} sits inside the escaped quotes, next to -QueryPort, which is also inside them.
  • hwserver: ${extraparams} comes after the quoted -exec command, so the extra parameters are passed as separate arguments.

This revives #2120 (first opened in 2018 as #2084) on top of the current develop branch, squashed into a single commit. The original implementation was co-authored by @Frisasky.

Fixes #2183
Supersedes #2120

Affected servers: all

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (a change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Chore (CI, workflows, tooling or other maintenance).
  • Comment update (typo, spelling, explanation, examples, etc).

Testing

  • Commands/tests run:
    • bash -n on all 147 _default.cfg files.
    • Simulated fn_reload_startparameters() for every config. Each test sourced _default.cfg, set extraparams="-lgsmtest a -lgsmtest2 b" the way an instance config would, and re-evaluated the startparameters line the same way linuxgsm.sh does (eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' ...)").
    • Compared each config against develop to confirm that startparameters is unchanged apart from the appended ${extraparams}.
    • git diff --check.
  • Result:
    • bash -n: no syntax errors.
    • Simulation: 147/147 configs end with the user's extra parameters. The default extraparams is empty in all configs.
    • Comparison with develop: 147/147 changed only by the appended ${extraparams} (ahlserver, mohaaserver and tsserver also lose a trailing space).
    • git diff --check: no whitespace issues.
    • No game servers were actually started; the Details Check workflow will run for all affected servers.
  • Environment used (distro/version): Ubuntu 22.04.5 LTS, bash 5.1.16

Risk and rollback

  • Risk level: low
    • With the default empty value, startparameters only gains a trailing space, which shell word splitting drops. The one exception is kf2server, where the space lands inside the quoted argument.
    • Users who already override startparameters in their instance config are not affected.
  • Rollback plan: revert the single commit. No data or config migration is involved.

Breaking changes

  • No breaking changes.
  • Breaking changes included (describe below).

Documentation

The start parameters page (https://docs.linuxgsm.com/configuration/start-parameters) should describe extraparams.

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue ("Fixes", or "Related to" for a partial fix).
  • This pull request uses the develop branch as its base.
  • This pull request subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have provided a detailed enough description of this PR.

Thank you for your Pull Request!

🤖 Generated with Claude Code

@borzaka
borzaka changed the base branch from master to develop October 3, 2026 19:15
@borzaka
borzaka force-pushed the feat/add-extraparams branch 3 times, most recently from 0e6d46d to 5b75f25 Compare October 10, 2026 21:09
@github-actions github-actions Bot added the type: feature New feature or request label Oct 10, 2026
@borzaka
borzaka force-pushed the feat/add-extraparams branch 3 times, most recently from 57ad717 to 67f3055 Compare October 17, 2026 18:32
@borzaka
borzaka force-pushed the feat/add-extraparams branch from 67f3055 to 3c3fcb1 Compare October 18, 2026 09:01
@dgibbs64 dgibbs64 mentioned this pull request Oct 18, 2026
Add an `extraparams` variable to every game server's _default.cfg so users can append custom start parameters from their instance.cfg without copying and overriding the whole `startparameters` line.

`extraparams=""` is the last entry of the "Predefined Parameters" block in every config, and every `startparameters` ends with `${extraparams}`.

Supersedes GameServerManagers#2120.

Co-authored-by: Frisasky <digimoncn@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@borzaka
borzaka force-pushed the feat/add-extraparams branch from 3c3fcb1 to fafffee Compare October 26, 2026 10:05
@borzaka

borzaka commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Hi @dgibbs64 👋

I've rebased this onto the latest develop again and added extraparams to the newly added servers (cswonserver and hlwonserver, and earlier ceserver, jk3server and rwrserver), so it's up to date and mergeable right now.

No pressure at all, just a friendly question: are you planning to merge this at some point, or would you like any changes first? Since it touches every server config, it needs a rebase whenever a new server is added or a config changes, so it would help to know whether it's worth keeping it up to date. 🙂

Thanks for all your work on LinuxGSM!

@github-actions github-actions Bot added engine: idtech3 Issues related to idtech3 engine engine: goldsrc engine: source2 Issues related to source2 engine engine: unreal4 Issues related to unreal4 engine engine: unreal3 Issues related to unreal3 engine engine: unity3d Issues related to unity3d engine engine: unreal2 Issues related to unreal2 engine game: Medal of Honor: Allied Assault Issues related to Medal of Honor: Allied Assault game: Action Half-Life Issues related to Action Half-Life game: Counter-Strike 2 Issues related to Counter-Strike 2 game: HYPERCHARGE: Unboxed Issues related to HYPERCHARGE: Unboxed game: Killing Floor 2 Issues related to Killing Floor 2 game: Hurtworld Issues related to Hurtworld game: Killing Floor Issues related to Killing Floor labels Oct 26, 2026
@github-actions github-actions Bot added the game: The Specialists Issues related to The Specialists label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine: goldsrc engine: idtech3 Issues related to idtech3 engine engine: source2 Issues related to source2 engine engine: unity3d Issues related to unity3d engine engine: unreal2 Issues related to unreal2 engine engine: unreal3 Issues related to unreal3 engine engine: unreal4 Issues related to unreal4 engine game: Action Half-Life Issues related to Action Half-Life game: Counter-Strike 2 Issues related to Counter-Strike 2 game: Hurtworld Issues related to Hurtworld game: HYPERCHARGE: Unboxed Issues related to HYPERCHARGE: Unboxed game: Killing Floor Issues related to Killing Floor game: Killing Floor 2 Issues related to Killing Floor 2 game: Medal of Honor: Allied Assault Issues related to Medal of Honor: Allied Assault game: The Specialists Issues related to The Specialists type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extra Parameters Option

1 participant