[WINDOWS] Connectorio - Factorio Headless Server Tool C++

Find multiplayer games.
Tools/scripts to run a dedicated server.
Post Reply
KFA
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Jul 30, 2019 10:05 pm
Contact:

[WINDOWS] Connectorio - Factorio Headless Server Tool C++

Post by KFA » Tue Jul 30, 2019 11:01 pm

Story
So me, my little brother and my big brother had this vision of a Factorio server that would be constantly running even if no one was connected. So I sacrificed an old laptop to run Headless Factorio server and bought a mobile internet thingy (because they are cheap) and we started our journey. The thing with the mobile internet tho was that it sometimes changed IP address so I had to post status updates (that is, the new IP) to our whatsapp group. Getting tired of doing it manually I decided to write a program that would upload the new IP address automatically to a website that would have a static IP. All was fine until we decided to install some mods which resulted into Factorio server to crash occasionally which again meant that I had to manually restart the server everytime it did.
...And then the map got bigger which meant that the caching-up phase got intolerable (as map download took longer). And server-settings.json didn't have any options to pause the server when a peer was connecting. So the program I initially wrote for a quick dirty fix got bigger and I got carried away.

So now that it works somewhat I decided I would share this program for all those who want it for similar reasons. Source code included.

Features
- Able to read console output and send input as well
- Restarts server if it crashes
- Able to pause the server when a peer is connecting, greatly reducing catching up phase
- Can write commands in-game to control the server
- Able to bind to public IP address to work as a server program that even has a GUI and can potentially be controlled from a website
- Able to to periodically connect to a selected web page so that e.g IP information can be uploaded
- Able to take real-time screenshots to send thru web page if requested (of the server interface, to see if the computer messed up, it can't take in-game screenshots)

Static Website:
Image

Web interface:
Image

In-game:
Image

Download: http://www.mediafire.com/file/8wtrvjklz ... o.zip/file

Instructions
1. Unzip the file
2. Edit startup.cmd and change --start-server-load-latest "FACTORIO MULTIPLAYER 0.17.zip" to match your map file
3a. If you want to send IP information to a static web site then edit host.txt and write the host name in there (www.example.com)
3b. Upload the folder servu to the web site you wrote to host.txt
4. Run Connector.exe. You can access its server interface from the link from of your <yourhost>/servu website.
5. If you wish to change the program's behavior edit Connector.cpp and compile it.

Adamo
Filter Inserter
Filter Inserter
Posts: 295
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: [WINDOWS] Connectorio - Factorio Headless Server Tool C++

Post by Adamo » Tue Jul 30, 2019 11:47 pm

Neat. Have you looked at clusterio? A couple of your features would be good additions to the current standard setup.

KFA
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Jul 30, 2019 10:05 pm
Contact:

Re: [WINDOWS] Connectorio - Factorio Headless Server Tool C++

Post by KFA » Wed Jul 31, 2019 1:49 pm

Adamo wrote:
Tue Jul 30, 2019 11:47 pm
Neat. Have you looked at clusterio? A couple of your features would be good additions to the current standard setup.
I haven't actually looked at it but after you mentioned it I did search about it. This program is however different in that this tool only makes maintaining the server more automatic and adds some features e.g player activity tracking and eliminates Catching Up when a server is set to run when no one is connected.

Adamo
Filter Inserter
Filter Inserter
Posts: 295
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: [WINDOWS] Connectorio - Factorio Headless Server Tool C++

Post by Adamo » Wed Jul 31, 2019 8:12 pm

KFA wrote:
Wed Jul 31, 2019 1:49 pm
Adamo wrote:
Tue Jul 30, 2019 11:47 pm
Neat. Have you looked at clusterio? A couple of your features would be good additions to the current standard setup.
I haven't actually looked at it but after you mentioned it I did search about it. This program is however different in that this tool only makes maintaining the server more automatic and adds some features e.g player activity tracking and eliminates Catching Up when a server is set to run when no one is connected.
I understand the difference. But there are some features in your tool that don't exist in clusterio, which already does SOME of what you're saying. It was just a mention because it would be nice, one day, if they worked together, so we could have all the features.

Post Reply

Return to “Multiplayer / Dedicated Server”

Who is online

Users browsing this forum: No registered users