Multiplayer testing by myself

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Ohead
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Sep 03, 2023 11:35 pm
Contact:

Multiplayer testing by myself

Post by Ohead »

I need to test the multiplayer compatibility of my mod, but I don't wanna pester my friends to do something stupid in Factorio over and over again. Is there a way I can have multiple clients on one system or something similar?

Loewchen
Global Moderator
Global Moderator
Posts: 8321
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Multiplayer testing by myself

Post by Loewchen »

Use /c game.force_crc() or /toggle-heavy-mode.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1654
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Multiplayer testing by myself

Post by Pi-C »

You also could try to run Factorio from two different user accounts on your machine. Host a multiplayer game from the first instance (make sure it's not a public game!), then switch over to the other user and join that game.

Caveat: This may not work if your computer is low on RAM. Even then, things may work really slow, so it may be a good idea to set up a testing environment while only one instance of the game is running and then join with the second player. Also, you probably should have a close look at your mod list. Throw out everything that isn't necessary for your tests! If possible, get rid of huge mods, or mods that pull in lots of other dependencies! (On my computer, starting the game alone takes a relatively long time when SE is active, so I wouldn't even try to run this on two instances of the game instantaneously.)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 490
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Multiplayer testing by myself

Post by Silari »

Don't need two accounts - you can just use the standalone version. You'll need to change settings so they use a different username and don't check accounts, but it works fine. Done it before.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1654
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Multiplayer testing by myself

Post by Pi-C »

Silari wrote:
Sun Sep 17, 2023 4:38 pm
Don't need two accounts - you can just use the standalone version. You'll need to change settings so they use a different username and don't check accounts, but it works fine. Done it before.
Thanks for making this more clear! I'm not using Steam etc. myself, but the stand-alone version. I didn't mean you should buy two keys for Factorio! But for some reason, I had trouble running two different instances of Factorio as the same Linux user. So I log in as user 'Pi-C' on my machine, start the first instance of Factorio, then log in as user 'test' and start the second instance, then switch back to the first account to host the local multiplayer game, and back again to connect to the game as 'test' (doing everything at once sometimes brings down my computer as I usually have a lot of stuff open in my main account, and things may get nasty if the computer starts to swap memory).
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 490
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Multiplayer testing by myself

Post by Silari »

Definitely works on the same user account in Windows. Not sure why it wouldn't on Linux. Might have had issues if you tried to run the same instance twice. You need to use two different installs, otherwise factorio can't lock the files it needs.

User avatar
dog80
Filter Inserter
Filter Inserter
Posts: 279
Joined: Thu Dec 08, 2016 11:57 pm
Contact:

Re: Multiplayer testing by myself

Post by dog80 »

just force your friends to help you - help developing a mod is propably a greater thing than whatever they do instead

Gweneph
Inserter
Inserter
Posts: 26
Joined: Thu Nov 14, 2019 11:51 pm
Contact:

Re: Multiplayer testing by myself

Post by Gweneph »

In case you haven't gotten this working yet, you don't even need two separate installations, they can use the same installation, you just need two "write directories" and two config files (I usually put the config files in the usual ./config/config.ini location within the write directory)
the write directory setting within the config file must match the write directory location*
Then you can start facotrio with the -c option pointing to the config file, et. viola two separate instances can run at once.
For ease of use I'd make a shortcut for each installation.

Since you're making a shortcut anyway, I'd recommend adding the --mod-directory switch to point to a common mod directory so they're always kept in sync.

There's many other useful parameters: https://wiki.factorio.com/Command_line_parameters

*if you're lazy like me and like to copy and paste whole folders including the config file, you can actually write

Code: Select all

write-data=./
in your config file and Factorio will use the current working directory as the path, so then your shortcut just has to set the working directory to be your actual write directory, this allows your folders to be more portable/copyable.

Post Reply

Return to “Modding help”