Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Install the module globally from NPM
#### Options
```
-h, --help output usage information
--debug More verbose logging (e.g. stack traces)
--filePatching Enable file patching
--game [value] Game to launch
--host [value] Server IP to join
Expand All @@ -43,6 +44,7 @@ Install the module globally from NPM
```
-h, --help output usage information
--config [value] Server config name
--debug More verbose logging (e.g. stack traces)
--disableVoN [value] Disable VON
--filePatching Enable file patching
--game [value] Game to launch
Expand Down Expand Up @@ -79,6 +81,7 @@ References,

Option | Type | Default | Description
--- | --- | --- | ---
debug | boolean | game default | More verbose logging (e.g. stack traces)
filePatching | boolean | game default | Enable file patching
game | string | 'arma3' | Which game engine to use
host | string | game default | IP or hostname that client should connect to
Expand Down Expand Up @@ -112,6 +115,7 @@ allowedLoadFileExtensions | array of strings | game default | Whitelisted file e
allowedPreprocessFileExtensions | array of strings | game default | Whitelisted file extensions allowed
battleEye | boolean | game default | Should BattleEye be enabled
config | string | 'server.config' | Name of config file to be saved, stored in configs directory
debug | boolean | game default | More verbose logging (e.g. stack traces)
disableVoN | boolean | game default | Should built in VoN be disabled
doubleIdDetected | string | game default | Server side script to execute on duplicate client id
filePatching | boolean | game default | Enable file patching
Expand Down
1 change: 1 addition & 0 deletions bin/arma-headless
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function list(val) {
}

program
.option('--debug', 'More verbose logging (e.g. stack traces)')
.option('--filePatching', 'Enable file patching')
.option('--game [value]', 'Game to launch')
.option('--host [value]', 'Server IP to join')
Expand Down
1 change: 1 addition & 0 deletions bin/arma-server
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function list(val) {

program
.option('--config [value]', 'Server config name')
.option('--debug', 'More verbose logging (e.g. stack traces)')
.option('--disableVoN [value]', 'Disable VON')
.option('--filePatching', 'Enable file patching')
.option('--game [value]', 'Game to launch')
Expand Down
5 changes: 5 additions & 0 deletions src/headless.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var defaultPlatform = function () {

var Headless = function (options) {
this.options = _.defaults(options, {
debug: null,
filePatching: null,
game: 'arma3',
host: null,
Expand Down Expand Up @@ -109,6 +110,10 @@ Headless.prototype.start = function () {
startParams.push('-filePatching')
}

if (this.options.debug) {
startParams.push('-debug')
}

startParams.push('-client')

return spawn(gamePath, startParams, options)
Expand Down
5 changes: 5 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var Server = function (options) {
allowedPreprocessFileExtensions: null,
battleEye: null,
config: 'server.config',
debug: null,
disableVoN: null,
doubleIdDetected: null,
filePatching: null,
Expand Down Expand Up @@ -140,6 +141,10 @@ Server.prototype.start = function () {
startParams.push('-filePatching')
}

if (this.options.debug) {
startParams.push('-debug')
}

startParams.push(this.makeConfigParameter())

return spawn(gamePath, startParams, options)
Expand Down
6 changes: 6 additions & 0 deletions templates/config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ allowedHTMLLoadExtensions[] = {
allowedFilePatching = <%= allowedFilePatching %>;
<% } %>

<% if (debug !== null) { %>
// More verbose logging (e.g. stack traces)
// set to 1 to activate
debug = <%= debug %>;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this documented somewhere? I can only find the startup argument on the Biki

No harm, just curious :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I think that's where I got it from.

Copy link
Owner

@Dahlgren Dahlgren Nov 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The startup argument is added above in src/server.js, does this flag in server.cfg also enable additional debugging?

<% } %>

<% if (onUserConnected !== null) { %>
// Server Side Script to be executed upon user connected
onUserConnected = "<%= onUserConnected %>";
Expand Down