TUNNEL DIVERS

TUNNEL DIVERS

Not enough ratings
Quick Server Hosting Guide
By Spasman
This is a short guide explaining some of the essentials in hosting a server, and provides helpful links in getting started.
   
Award
Favorite
Favorited
Unfavorite
Intro
Hello! If you're interesting in hosting a server you've come to the right place. Here I will briefly explain some of the unique things abotu hosting a TUNNEL DIVERS server, and provide some other guides to help you with hosting a server in general.
Set up
So the first thing you'll want to do is download TDServer, a slightly modified and stripped version of the game that acts as a server program.

You can download it from my website: http://spasmangames.com/tunneldivers/

Once thats done, you should first run the server. It will immediately close, thats because it "crashed" because you have no levels on the level list. But the level list file needed to be generated, and running the server for the first time will do that for you.

Once thats done, head over the TunnelDivers appdata folder. You can get there two ways:

The file path:
C:\Users\<windows username>\AppData\Local\TunnelDivers

Or enter the below line in the Run window:
%localappdata%\TunnelDivers

Here you will see a few files. Next, you'll want to open td_settings.ini in notepad and look for the [Server] section. Then you'll need to find the Dedicated value and set it to "1". If you don't

Quick Tip: If you're trying to run the server on a virtual environment, it can be very difficult because Game Maker needs a GPU to run. If your virtual server has 3D acceleration, its possible to run it then, and you can also set the "Generated" value in td_settings to "2" which will run the game in a 1x1 window and undraw EVERYTHING, making it use the least amount GPU.

Now lets put a map in the map list. Open "td_settings.ini_level_list" in notepad, and add the line:

Maps\stock\df1.tmap

This will add Training Facility to the map list. Alternatively if you're using the default server ID name (td_settings) you can also start the game and edit the map list from the hosting menu if you find that to be easier. The game and a default server both share the td_settings file.

Now run the server again and you should get a black box with a console. Youre all set up! But it's likely players won't be able to join your server, hence the next section.
Port Forwarding
The most laborous step in hosting a server is getting your ports forwarded. In short, network ports by default are blocked on your router if they're not used frequently by websites and the like. Port forwarding lets you open certain ports so other devices can connect to you, whether to game or other means.

Learning how to port forward isn't super hard, and you can use this skill to host servers for other games too. It's actually tons of fun.

I wrote a portforwarding guide for my last game, Boring Man. The defualt. port for TUNNEL DIVERS is 9999, so just swap that single port number with the Boring Man port numbers in the guide.

https://steamhost.cn/steamcommunity_com/app/346120/discussions/0/405690850609661167/

If you need further help, you can post on the forums and someone with experience in it may come and assist you. Please do not contact me about port forwarding help, as I need to put my attention towards other things for this game.
Server Config / td_settings
So now that you're all portforwarded and players are joining your Dogfight server, I'll explain some of the config options. The important server ones anyways.

You already know how to add and remove maps from the map list, but lets check out that meaty config file, "td_settings.ini". Head back over to the AppData folder like before.

Open td_settings.ini with notepad, head to the [Server] section and I'll go ahead and explain what each value under [Server] does for you. Keep in mind you DON'T need all the decimaled 0s in each value, you can delete them as long as the whole number is still there.

Briefing
When set to "1", this will enable the ready screen before the map starts.
When set to "0", this will disable the ready screen before the map starts.

Name
Type what your server name is here. Set to "Server" by default but you can name it whatever you like, that isn't inappropriate for other players.

Password
Type your server password here. Players must know it to be able to join your server. If you don't want a password, then just leave it blank, or with just two quotes.

Bots
How many computer players you want on your server. Please keep in mind the bot limit is the player limit, minus one.

PlayerLimit
Sets how many players are allowed on your server. 16 is the max player count.

Autobalance
When set to "0", this will disable team autobalance.
When set to "1", this will enable team autobalance, but players can still choose the team they want to join.
When set to "2", this will enable team autobalance and set it to "strict", where players can't choose a team at all.

Dedicated
When set to "0", this run the game normally. This will immediately make your server crash with a Steam API error because you're not running the game from Steam.
When set to "1", this will enable dedicated server mode, which undraws everything in-game and only displays the in-game console window.
When set to "2", this will make the game run in dedicated mode if the Steam API wasn't detected. Good if you want to use 1 config file to host a dedicated server and play the game at the same time.

ServerPort
This allows you to change the network port for your server. I don't recommend changing this from 9999 if you don't know what you're doing.

TunnelServer
This is actually for the cloud server option in the game, so it has no effect on your server. Ignore it.

ServerList2
When set to "1", this will automatically register your server to the server list.
When set to "0", the host will need to manually register the server to the server list by typing "lobby" into the console window.

Yes, the 2 in ServerList2 is needed.

Generated
When set to "0", this will disabled Generated mode.
When set to "1", this will make your server start in a 1x1 window, and wait 1 minute for players. If no players join, the server will close itself. If players do join, it will remain up until they all leave and then close. This is mostly used for the Tunnel Servers system.
When set to "2", this will make your server run in the 1x1 window, without the Tunnel Servers closing part. Good for running on virtual environments that have 3D acceleration.
Moderating
So your cool server for cool people is up and going but sometimes you get the occasional shithead you want to throw out.

You can kick or ban anyone in the server by typing "kick <playername>" or "ban <playername>" into the console.

You should also add yourself as an admin. Open the "td_settings.ini_admin_server" file in notepad and add your steam ID number.

No, not your Steam name, your ID number. Or more ungracefully called your "SteamID64" number. You can learn what this is by going to https://steamid.io/lookup and entering the URL for your steam profile.

Once you do that, the number you're looking for should be the fourth entry down. For example, my SteamID64 is 76561197986219204, so I would add that to the admin file to make myself admin.

You can also add other people too, just put in their Steam profile URL into steamid.io and get their ID64. You can have as many admins as you like.

Admins added from this file can't open the server console, they can only click player names and kick/ban them. Keep in mind that global game moderators are granted this admin ability on any server they join. Don't panic, they're there to help you and are instructed to only punish cheaters. If they use their powers for some other reason on your server without your permission, please let me know and they will be demoted immediately.

Once a player is banned, their SteamID64 will be added to the "td_settings.ini_banned_server" file. If you need to remove the ban, you will need to open this file and remove their Steam ID.

There is an anti-cheat in place that will kick players automatically if it thinks they're cheating. It won't ban them however, you will need to keep an eye on repeat offenders and ban them yourself if needed, at least until the anti-cheat is stable enough to be allowed to ban people automatically.
Hosting multiple servers
Most of you probably jsut want to host your 1 server, but those looking to host multiple servers, you'll want to use the "-ini" Windows parameter when running the software.

Make a short cut to TunnelDivers.exe and right click it and click Properties. In the "Target" field, add -ini at the end, and a file name for your server to use. For example if I wanted my server to use the file name "pineapples" my target line would look like this:

C:\Program Files\Tunnel Divers\TunnelDivers.exe -ini pineapples

This will generate a new set of files with a different name. So for example, what use to be called "td_settings.ini" is now called "pineapples.ini". This change also applies to the admin file, banned and map list files.

With this feature, you can run multiple TD servers with unique config files that hold different port numbers, map lists and so forth.
8 Comments
Spasman  [author] 5 Oct, 2018 @ 11:44am 
well looks like its not working quite right still, but let me know what it does if you try it
The Anomalous Bird-man 4 Oct, 2018 @ 11:39pm 
Ah, thanks, man!
I'll try it out again when I get the time.
Spasman  [author] 4 Oct, 2018 @ 9:59pm 
Looks like there was a bug, I made a little update and fixed it, try the cloud servers again. Your version should be 1.0.0b
The Anomalous Bird-man 4 Oct, 2018 @ 7:29pm 
Yes, but it still appears as an Unknown Server. I think I'm doing something wrong with the configs.
Spasman  [author] 4 Oct, 2018 @ 5:12pm 
It should appear on the server list, but if they can't ping it your server will appear as "Unknown server" to them

have you tried cloud hosting?
The Anomalous Bird-man 4 Oct, 2018 @ 2:37pm 
Do my friends have to do anything else special to join, or is it just entering the server list and joining the game through there?
Lost Info 7 Apr, 2018 @ 7:32am 
Nah, but still very useful, thx spaz
Lost Info 7 Apr, 2018 @ 7:32am 
"brief"