Space Impossible – Dedicated Server Guide

This is a quick intro to the dedicated server. Only bother if you want to actually host the game for long periods of time when you will not be playing it as a client.

Introduction

This is an introductory guide on the dedicated server. The dedicated has the same functionality as the normal game’s listen server, except it is capable of running when the normal game is not. That’s about it. We recommend you should be an intermediary or advanced computer user, as configuring the server isn’t too difficult, but there may be some networking and firewall issues, depending your specific situation.

Installation

Step 1) Getting the Server

Alternate A

Downloading through normal Steam client

If you have Steam installed, and you are logged into an account that owns Space Impossible, go to LIBRARY > HOME. There is a dropdown that usually says “GAMES”. Click that, and turn on “TOOLS”. You should now see Space Impossible, Space Impossible Mod Tool, Space Impossible Dedicated Server.

Select the dedicated server and download it.

Alternate B

Downloading through the SteamCMD console application Steam has a great console program that advanced users and server hosts use for downloading most dedicated server programs. To find out more information, please see this reference: 

The dedicated server appid is 1222650.

Step 2) Running the Server on Windows

If you’ve downloaded the dedicated server through steam, you can press “LAUNCH” OR You can go to where the install occured (ex: C:\Program Files (x86)\Steam\steamapps\common\Space Impossible Dedicated Server) and press the START_SERVER.BAT file. This bat file contains some prewritten command launch arguments. If you just launch SIDedicatedServer directly, it will close.

Step 3) Running the Server on Mac or Linux

Since bat files don’t work on Mac or Linux, however you choose to launch the game (via command line or gui) make sure you’re launching SIDedicatedServer with the arguments:

  • -config serverconfig.txt -console -batchmode -nographics

Basic Info

Some basic info. SIDedicatedServer contains the basic server logic for the universe, player data, general game data and logic. There is also a program called SIRegionServer and this is responsible for simulating AI and physics (along with some other misc things like ai dialogue and weapon damage). SIRegionServer is capable of simulating up to 4 unique regions at one time. In situations where more than 4 unique regions must be simulated (most often seen if there are more than 4 players playing) then additional SIRegionServers processes will start.

Note: Incase your SIDedicatedServer crashes or in someway ends abruptly, you may need to kill the SIRegionServer processes. In a proper shutdown, there no SIRegionServer should continue after the main server stops.

Space Impossible refers to players in 3 ways.

  • Player ID – This is a uint starting at 1, that is assigned the first time a player connects to the server and universe. This is not guaranteed to be consistent across universes or servers. This is mostly used for short hand reference to a player when you don’t want to type out their name or steam id.
  • Player Name – Fairly self explanatory, but the default “Brave Captain Omega” will probably show up quite a bit.
  • Steam ID – This is the best way to uniquely id a player. This comes from the steam authentication servers and it should be as reliable as Steam itself.

Networking Config and Some Notes

This can be potentially the most difficult part of server setup for players who aren’t experienced with this stuff. There is no one size fits all guide here since everyones network setup can and usually is different.

Ports 4545 and 4546 TCP/UDP must be accessible from the Internet. Port forwarding is often necessary for those behind a router. These are the ports that players connect on.

Ports 4547 and 4548 TCP are ports that the SIRegionServer connect to the main server (SIDedicatedServer or SpaceImpossible) on. Since you’ll most likely be running these on the same computer, no port forwarding is usually necessary, though some firewalls may have an issue with it.

Players DO NOT directly connect to the SIRegionServer ever, so those ports are not needed to be externally accessible.

The main server will accept additional SIRegionServer connections as often as they come in, so you can launch as many SIRegionServers as you wish, if you want to be fancy. This may be useful if you want to host large numbers of players or host the servers on multiple computers or VMs (note: this is officially untested, so let us know if you try this).

Serverconfig.txt

This is the main configuration for the dedicated server, it contains comments that should be self explanatory, but we’ll add some details there.

  • ‘servername’ is the name of the server that will be displayed in any server browser. At the moment this usually isn’t visible.
  • ‘ispublic’ determines whether or not the server will appear on Steam’s (and any other) server browser
  • ‘settings’ if this is set, it can be the absolute path AND file name to the settings.
    Ex 1: settings = settings.cfg This will look for settings.cfg in the same working directory as the serverconfig.txt file. This may be different on Mac and Linux
    Ex 2: settings = “C:\Space Impossible Servers\myserver1.cfg” This will be an absolute path to this server file
    Ex 3: commented out with #. This will look in a default location, which on Windows is %appdata%/SpaceImpossible/settings.cfg
    Note: For reference, this uses the Environment.SpecialFolder.ApplicationData lookup, so your own OS will have its own default location.
  • ‘netsettings’ and ‘rssettings’ follow the same path and naming as ‘settings’
  • ‘universename’ is also the name of the save folder located within the universesavepath directory. NOTE: Unless this is altered, every time the server is launched, it loads this universe (and only this universe). It will only create it the first time. This is different than the client, which allows overwriting of pre-existing universes.
  • ‘seed’ this can be a number (it actually treats the numbers as characters and converts them to a numeric value) or a string, similar as client.
  • ‘mainport’ default is 4545. This requires TCP, and is the main connection the client will communicate on.
  • ‘fileport’ default is 4546. This requires TCP, and is the second connection the client will communicate on, but it’s mostly for server->client streaming of object data.
  • ‘steamport’ default 4545 as UDP. This is for communicating with Steam and is necessary for Steam integration.
  • ‘steamqueryport’ default 27015 as UDP. This is for steam’s server browser.
  • ‘modname’ mod support is still pretty rough, but in theory, you would change this to change out the game data.
  • ‘gamemode’ normal or creative, creative allows the player unlimited building access, same as client launch options.

Server Settings

Any settings (like /sv_cheats 1) will not persistent across game sessions or restarts if entered during the game. In order to have altered game settings, you can either edit in custom settings or save the settings mid game with the /saveserversettings. Server settings are saved to wherever it is set in ‘settings’ file is pointing to. It is in json format.

  • /sv_maxplayers – Determines the maximum allowable number of players
  • /sv_cheats – Turns on cheats, like giving items, spawning stuff, etc
  • /sv_gamemode – 0 is normal, 1 is creative (full building access)
  • /sv_usewhitelist – Whether or not to only allow whitelisted players to connect.

Controlling Who is Able to Play and Some Basic Commands

The server (and listenserver) is capable of being in whitelist only mode. You must set “

  • /sv_usewhitelist 1” to true in order for this to work. The whitelist file should contain the Steam ID for the user. Here are the relevant console commands (these work on dedicated or listen):
  • /kick – Kicks a player by player name. Optional reason should be in double quotes “reason”
  • /banlist – Lists all banned individuals by Steam IDs and IPs
  • /ban – Bans a Steam ID by player name. Optional reason should be in double quotes “reason”
  • /banip – Bans the IP of a player. Optional reason should be in double quotes “reason”
  • /bankey – Bans the Steam ID of a player. Optional reason should be in double quotes “reason”
  • /unbanip – Unbans the IP of a player
  • /unbankey – Unbans the Steam ID of a player
  • /whitelist – White lists a Steam ID by player name. Optional comment should be in double quotes “this is a cool guy”
  • /whitelistkey – White lists a steam ID. Optional comment should be in double quotes “this is a cool guy”
  • /unwhitelist – Removes a Steam ID by player name
  • /unwhitelistkey – Removes a Steam ID by Steam ID
  • /admin – (Un)Flags a player as an admin. Use this sparingly, a rogue admin can ruin a server in about 5 seconds. The previously listed commands are Admin only.
  • /playerlist – Lists all connected players by Player ID, Player Name and Steam ID (sometimes called key)
  • /quit – This is the suggested and heavily encouraged way of shutting down the dedicated server.

Talking from console – Typing anything that isn’t preceeded by a forward slash (/) in the console allows you to speak as “SYSTEM” to players.


Be the first to comment

Leave a Reply

Your email address will not be published.


*