Tinkertown
Nincs elegendő értékelés
How to create a dedicated server
Készítő: gravia
I've found a way to create a dedicated server for Tinkertown, and since there are a few guides on the discord, but not on the steam page. I figured I'd create a guide.
I'll try to be as explicit as I can be. This guide will cover the ServerGUI and I will attempt to add the commandline server later as well.
   
Díjazás
Kedvenc
Kedvenc
Törlés
Introduction
As I've fought with creating a multiplayer game myself which didn't work from the in-game creation, I approached the discord server and got a response there that helped me out. I figured I'd help you guys out too.

For me the problem lay in the multiplayer tool PlayFab that Tinkertown uses as well as the tool not being able to keep a valid connection which results in a crash.
The solution?
Dedicated Servers!

Hence this guide.
This is the very first guide I'm creating, so I apologize if things are unclear. Should you wish clarification, drop a comment below and I'll answer as soon as I can!
Dedicated server using Server GUI
Before we start, I want to press that the tool I'm using was not developed by me. I have not spoken to the author or know him/her/them personally, so any question regarding the tool should forwarded to the tinkertown devs or the dev of this tool.

Alright, now that is out of the way, here goes:
  1. Download the tool here.[earlytown.de]
    You can download the zip file on this line JETZT HERUNTERLADEN (TinkertownServerGUI.zip (278KB)[earlytown.de]

  2. Extract the files to your desired location. I've created a folder on my Desktop called Tinkertown Server so my Path would be:
    C:\Users\<USERNAME>\Desktop\Tinkertown Server
    This will be important later.

    The files in the .zip should be
    • TinkertownServerGUI.exe
    • Updater.exe

  3. Run the TinkertownServerGUI.exe file and you'll be met with this window:


  4. It is here that we get to edit those sweet sweet settings!
    Click on the "settings >>>" button on the bottom right

    Which will add a screen section that should look something like this:


    Let's edit those settings in the next section, so I can explain the settings a little in detail.

  5. After you've updated or edited the settings, you can click on the "Start server" button on the bottom left.

  6. Now you should be able to join the game by friend-code or IP address and Port.
Settings
Let's go over the settings a little in detail.
The settings in the TinkertownServerGUI are composed of 4 sections.
  1. Server Settings
  2. Automated server restart
  3. Webserver
  4. Backup

Server Settings
Program Path
This is the path of where your TinkertownServer.exe file is located. No need to look around a lot in your AppData folder or anything, Tinkertown has that built into their game folder!
Find the installation path of your TInkertown game -- mine was in my steam library Steamapps folder -- and find the Server folder in there.
The path I had was this:
/steam/steamapps/common/Tinkertown/Server/TinkertownServer.exe
But make sure yours applies to your installation folder. If you have your Steam Library on a different drive than where your steam installation is running, you'd have something that looks like this:
/SteamLibrary/steamapps/common/Tinkertown/Server/TinkertownServer.exe

However you find the TInkertown installation folder and the exe file inside, this is all that is required for the Program Path setting. Simply put, the GUI kind of needs to know which Server program to run, and wants this one specifically.

Autostart server on launch
This checkbox simply wants to know if you want to start the server every time you launch the GUI, or if you want to manually start the server after launching the GUI. I've left it unchecked, but this is entirely your preference.

World save path
Here we get to pick any location to save the Server's world save in, though I picked the path on my desktop that I mentioned in the previous section as my world save location.
/Desktop/Tinkertown Server

I could, technically, also specify the game save folder to the world name we'll pick, but that's up to your preference too. This folder location does not really matter where it is located per-sé but it is helpful if you remember where it is for when you need to debug something. So I placed it in the same folder as my ServerGUI program is.
After the server runs for the first time, the program will create the save in here.

Port

The port the server must be running on. I left this one on default at 8000 and I reccomend to not really go beyond port 8099 on this setting. Though I am not an expert in port forwarding or port protocols, so if you're unsure, just leave it at the default 8000 or at most 8010.
IMPORTANT NOTE: Before the game can actually listen on any of these ports, one must forward their ports on their router. This is different for each brand of router. Make sure to follow a guide on your specific type of router on how to do port-forwarding.
Here's an example link from the TinkertownServerGUI page.[www.tomshardware.com]

Max Players

Select the maximum amount of players allowed in your server. The default is set to 4 and I am unsure as to what the hard limit is on this. If I find out I'll edit this in this guide.

Seed

This is the seed to use to generate the map. There are a few good ones on the forums and on the discord server of Tinkertown, but you can also pick a random number. I believe it to be a 4 digit number, though I can be wrong in the max digits.

Friendcode

This code is to connect to a server without having to type out a full IP address and port number. Just use the friend code and connect to the server.
I've set mine as "FRIENDS" in the example images in the previous section, but you can pick whatever you like here. Make it easy to use but secure enough that no ill-willed people can join your server.

Map name
This is the name of this world, or map, or save, and this will be used as identifier for your game. Make it something cool!

Automated Server Restart
In here we find two settings both are easy to understand, but we'll go through them regardless

Preform daily autorestart at
Set a time at which the server will attempt to restart the game daily. For example, if you've set the time at 01 AM like I did, then the server will restart at 1 AM every day.
This is a good practice to have enabled when you have a seperate machine running this server, that way you're sure the cache is cleared of any debris and ready for the next day of gaming!

Activate
This is whether you want this feature enabled or not. If you have it unchecked, the server will not restart automatically, and you'll have to do it manually.

Webserver
The webserver is meant for browser features with game-information and server status.
I have not set this up myself, but I bet there are amazing features. Be it existing or upcoming features like a live map and such!

Webserver port
Like in the Server Settings, this port must be forwarded on your router or firewall, though this port should be kept within the 80-89 range.

Run webserver
Whether you want this feature enabled. Uncheck if you're not going to use the webserver.

Web API Key
In order to run the webserver you must set an API key. As I understood the program, it means you can set your own "private key" here. Which can be as simple as
webKeyToken
but I won't recommend such token. Set it yourself, and stay safe!

Backup
Especially if you're running this server on a separate machine, make sure to create backups of your saves.
I've ran a few servers for various games, and I've always regretted not making backups.
If the server crashes for some reason, and I had a backup to roll back to.. Saves you a lot of progress!

World Backup Path
The path where you want your backups to be stored. I recommend not storing the backups in the same folder as your game world save path. Store it somewhere separately, preferably even a different drive. But if you have only one drive, that's fine, store it in a different folder.
For example, you have your World Save Path at:
C:\Users\<USERNAME>\Desktop\Tinkertown Server\
Then I suggest storing the backups into:
C:\Users\<USERNAME>\Documents\Tinkertown Backups\
or something similar
You can use the button "Select path" to find a path instead of writing the path in the box.

Automated backup
This setting will enable the server to automatically backup the saves at regular intervals.
This will occur every 6 hours, starting at 12AM. The times this happens cannot be altered.

Backup now
This isn't a setting, as it is the button for a manual backup to happen.
If you're not automatically backing up your files, hit this button regularly during your gameplay!
Dedicated server using commandline
There is a way to start a dedicated server using a commandline interface, though this requires the Tinkertown game to be installed on the machine that runs the server. This method, unlike the GUI, can be run on both Linux and Windows machines if I understood things correctly.

To use the commandline I recommend GitBash as the interface so you have a more colorized interface, but this is only preference. If you don't want to install a separate commandline interface just for the purpose of this server you can just use Windows Command Prompt, or Linux's Terminal instead.

For both Windows and Linux the setup is the same.
run the `TinkertownServer.exe` file with some parameters. I'll go through the parameters first and then I'll show a few examples of the commandline.
Note: All parameters described here are Case Sensitive

neoPort
This defines the port that the server will host on.
usage:
-neoPort 8000
seed
This defines the seed for map generation. Default is 1000
usage:
-seed 1234
mapName
This defines the name of the world.
usage:
-mapName "My Awesome World"
Note: use the Quotation marks around the world name to prevent any commandline misinterpretations.
offline
Skips any online networking actions. Sets local IP to 127.0.0.1 (localhost). No players from any other computer will be able to connect. So this is basically the setting to enable for singleplayer games. If this setting is used, I recommend instead just starting a singleplayer game from the in-game interface.
usage:
-offline
savePath
This defines the absolute path to the location where the server stores its world-data. Default is
C:\Users\<USERNAME>\AppData\LocalLow\Headup\Tinkertown\
usage
-savePath "Path\To\Save\Location"
Note: Use the quotation marks around your path to prevent commandline misinterpretations
maxPlayers
This defines the maximum amount of players allowed in the server. Default is 4
usage:
-maxPlayers 4


Examples
When you open up the Command Prompt or Terminal or GitBash you'll be located in the User's folder. This means you won't be in the tinkertown's installation folder yet. So make sure you navigate there, or use the absolute path of the TInkertownServer.exe file instead.

Navigating to the folder would be:
cd C:\Path\To\Tinkertown\Server
Now you're in the TInkertown Server folder and from here you can run:

TinkertownServer.exe -neoPort 8000 -seed 1234 -mapName "TinkertownTestMap" -savePath "C:\Users<USERNAME>\Desktop\TinkertownServer"
In some cases you might have to use relative access to the exe file instead. So that looks like this:
./TinkertownServer.exe -neoPort 8000 -seed 1234 -mapName "TinkertownTestMap" -savePath "C:\Users\<USERNAME>\Desktop\TinkertownServer"

Another example from the base directory you'd be placed in is this:
C:\Path\To\Your\Tinkertown\Server\TinkertownServer.exe -neoPort 8000 -seed 1234 -mapName "TinkertownTestMap" -savePath "C:\Users<USERNAME>\Desktop\TinkertownServer"

Nat punchthrough
If you're hosting on a private computer, you will have to deal with NAT punchthrough issues. This means it may be hard for other clients to connect to your Server.

Tinkertown supports Upnp. if you own a router capable of upnp, you should be fine. Upnp makes your port publically available so everyone can connect without any issues.
To check if Upnp works, check the server logs for a line saying: "Registering Host Port <NEOPORT> (with UPnP)"

If Upnp is not an option, you can try to forward your port manually in your router settings. Make sure to use the port you defined in the option "-neoPort".

If both are not possible, you have to rely on your STUNT punchthrough mechanism. It is unreliable and it may be impossible for some users to connect at all

But what if I don't want to create this command in a terminal?
Got you covered!

Navigate to the TinkertownServer.exe file in your steam installation folder.
Right-click the file and "create shortcut"
Right-click the shortcut and add the desired parameters to the end of the input field Target.
For example:
C:\Program Files (x86)\steam\steamapps\common\Tinkertown\Server\TinkertownServer.exe -neoPort 8000 -seed 1234 -mapName "My First Tinkertown Map"

Now you can double-click the shortcut and the server will start the same way!

And if this is still too technical, you can always check out the GUI I described earlier!


Credit where Credit is due
I did not create this part of the guide, but instead one of the Tinkertown Devs did on discord, and I paraphrased his guide here. So thanks to klaesology on discord for writing the guide so I could add it here!
Footnotes
That should cover the TinkertownSeverGUI program.

Thank you for using my guide!

Shout-out to the Headup devs
Tinkertown Twitter
Tinkertown Discord[discord.com]

My twitter
My Twitch
(note: I plan on streaming again at some point. But haven't been able to due to personal reasons)
3 megjegyzés
Button Mash 2024. jún. 6., 19:36 
Hello, I followed the tutorial, but I have some problems.

1- My friends can't reach me, the ports are open in the router and in the windows firewall.

2- When there is no one on the server, the server closes by itself.

3- I've noticed that the friendcode chance every time I open the game, whereas if you have a server for example with G-Portal you can choose the friendcode in the server settings.

Translated with DeepL.com (free version)
gravia  [készítő] 2024. ápr. 5., 1:55 
I haven't been in the game a while, I'll search for a mirror link. But it might be that Tinkertown updated some portions where either a new GUI was created, or they removed the need for one. I'll get back on this when I finished my research
Noah Caulfield 2024. márc. 1., 14:51 
Nice guide! But this seems that earlytown(dot)de is down... Do you have any mirror download link?