server.exe Command Line Switches

Discussion in 'Mod Discussions' started by warrenkc, October 9, 2014.

  1. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    If you have any additional information please add it.

    --log-network-traffic
    Log network traffic to given file

    --http
    Enables http server

    --ubernet-url
    Sets UberNet service url

    --monitor-url
    Sets UberNet monitor service url

    --paurl
    url for custom content json.

    --ubernet-secret
    Sets UberNet secret key for server to server calls

    --lobby-id
    Sets the UberNet lobby id

    --server-id
    Sets the UberNet server id

    --build-id
    Set the build id

    --output-dir
    Specify directory to write log files, replays, etc.

    --headless
    Server will not create a window

    --debug-landing-zones
    Server will give players all landing zones generated and disable the force landing timer

    --test-config
    Use a very simple test system config

    --game-mode
    Sets the current game mode.

    --allow-cheats
    Server will allow clients to cheat.

    --allow-lan
    Server will allow enable lan messages.

    --load-replay
    Replay file to load at startup.

    --no-players
    Run the server without waiting for any players. (AI only.)

    --no-waiting
    Do not wait for time passage, user connections, or anything that would slow down the server.

    --no-throttle
    Do not throttle the sim tick even if it is running slowly.

    --time-limit
    Maximum time limit for running the sim, in sim time seconds.

    --allow-crash-api
    Allow access to /api/crash and /api/die.

    --port
    Listen on port [1-65535]
  2. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    From Linux:
    Code:
    usage: ./server [options]
         | --log-network-traffic    : Log network traffic to given file
         | --http                   : Enables http server
         | --ubernet-url            : Sets UberNet service url
         | --monitor-url            : Sets UberNet monitor service url
         | --paurl                  : url for custom content json.
         | --ubernet-secret         : Sets UberNet secret key for server to server calls
         | --lobby-id               : Sets the UberNet lobby id
         | --server-id              : Sets the UberNet server id
         | --build-id               : Set the build id
         | --output-dir             : Specify directory to write log files, replays, etc.
         | --headless               : Server will not create a window
         | --debug-landing-zones    : Server will give players all landing zones generated and disable the force landing timer
         | --test-config            : Use a very simple test system config
         | --game-mode              : Sets the current game mode.
         | --allow-cheats           : Server will allow clients to cheat.
         | --allow-lan              : Server will allow enable lan messages.
         | --load-replay            : Replay file to load at startup.
         | --no-players             : Run the server without waiting for any players.  (AI only.)
         | --no-waiting             : Do not wait for time passage, user connections, or anything that would slow down the server.
         | --no-throttle            : Do not throttle the sim tick even if it is running slowly.
         | --time-limit             : Maximum time limit for running the sim, in sim time seconds.
         | --allow-crash-api        : Allow access to /api/crash and /api/die.
    -p   | --port                   : Listen on port [1-65535]
         | --neuralnetdatadir       : Sets the neural network data directory.
         | --ai-log                 : Enables AI logging.
         | --no-ai                  : Prevents ticking of AI armies.
         | --neural-learnrate       : Sets neural network learning rate.
         | --neural-momentum        : Sets neural network momentum rate.
    -h   | --help                   : Prints the list of command line options
         | --gl-vendor              : Override the GL_VENDOR string
         | --gl-force-enable-capabilities : Comma separated list of capabilities that are forced ON.
         | --gl-force-disable-capabilities : Comma separated list of capabilities that are forced OFF.
    
    
    Fr33Lancer likes this.
  3. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    http listens on port 8080, but I get a 404 for /
  4. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    Just need to put the correct page?
  5. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I suppose there is no HTML within web serve at all, but there is several API urls you can use:
    Code:
    /api/status
    /api/sim_toggle_pause
    /api/sim_save_replay
    /api/sim_step
    /api/sim_faster
    /api/sim_slower
    /api/sim_reset_speed
    /api/sim_terminate
    /api/crash
    /api/die
    /api/throw
    /api/stats/history
    /api/startProbe
    wondible likes this.
  6. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Well this is interesting:

    Code:
    var loadSaveIndex = env.indexOf('--load-save');
    var loadTimeIndex = env.indexOf('--load-time');
    if (loadSaveIndex >= 0) {
        var saveFileName = env[loadSaveIndex + 1];
        var saveTime = loadTimeIndex >= 0 ? env[loadTimeIndex + 1] : -1;
    
        initialStateEnterData = { 'create_sim': true, 'name': saveFileName, 'sentinel_name': '', 'time': saveTime };
        curState = states.load_replay;
    }
    proeleert, SXX and squishypon3 like this.
  7. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    How exactly do you use this? I ran the program through the terminal and it tells me the commands weren't found.
  8. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    This way:
    Code:
    ./server --option
    If it's still not work please make some screenshot so I can understand what exactly you mean. ;)
  9. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    When I did that it said that wasn't a valid location, though that could be because I did it after moving the "server" executable to the terminal. =P
  10. MCXplode

    MCXplode Active Member

    Messages:
    196
    Likes Received:
    28
    Does anybody know where the --neuralnetdatadir is or what that does for the AI?
  11. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    There's not much point in playing around with it as we don't have the ability to train the neural nets.
  12. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    With http enabled, the server will serve files from the (normally non-existant) media/server-html directory.
    SXX and cola_colin like this.

Share This Page