Running multiple instances of factorio
Running multiple instances of factorio
Is it possible to run multiple instances of factorio to test mod development in multiplayer?
Re: Running multiple instances of factorio
Not on one machine. I have a desktop and a laptop so it makes testing multiplayer possible, but if you are limited to one machine you should try virtualization: https://www.virtualbox.org/
My mods
-
- Smart Inserter
- Posts: 1847
- Joined: Sun Feb 23, 2014 3:37 pm
- Contact:
Re: Running multiple instances of factorio
Actually, if you have multiple installations of Factorio and enough video ram they can interact with each other so long as you use a different port number in the config.ini of each installation. I managed to get 3 instances into a multiplayer session on my 2GB card before the 4th instance started causing me trouble.
Connect to yourself with the IP: 127.0.0.1
Connect to yourself with the IP: 127.0.0.1
Re: Running multiple instances of factorio
Thanks Fish, That worked for me.
Coincidently I'm looking to implement your split dependency game as a mod.
Coincidently I'm looking to implement your split dependency game as a mod.
Re: Running multiple instances of factorio
Connecting to yourself works, but has a nasty habit of sometimes not connecting due to some weird port problem. Does anyone know of a solution to force close the port when multiplayer host has left the game?
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
Re: Running multiple instances of factorio
Running multiple instances of Factorio???
You should read threw this post before starting this.
One is steam
The other is to download Alpha version (you will need to have a steam account and link it so you can download it from there page at Factorio.com)
Install Stream first.
then
Install Alpha version as FACTORIO-2 (C:\Program Files\Factorio-2 )
(will call it factorio-2 for now on)
Now factorio-2 will link its self to the AppData file area (C:\Users\username\AppData\Roaming\Factorio)
C:\Users\username\AppData\Roaming\Factorio\config
C:\Users\username\AppData\Roaming\Factorio\mods
C:\Users\username\AppData\Roaming\Factorio\saves
(Note: The AppData is a hidden file. In the windows 10 search put %appdata% and it should take you to the hidden file.)
You will need to go to the Factorio-2 (C:\Program Files\Factorio-2)
Then DELETE the folders that have SHORTCUTS to the AppData files (This is where the config file are for Steam and we cant use them).
Folders should be:
config
mods
saves
C:\Users\username\AppData\Roaming\Factorio\config
C:\Users\username\AppData\Roaming\Factorio\mods
C:\Users\username\AppData\Roaming\Factorio\saves
Now in Factorio-2 you just need to make a config.ini change and it should update the folders automatically. (Other wise you will need to copy some of the folder information to the new directory as listed above from your steam files.)
Go to the Factorio-2\config folder. (F:\Program Files\Factorio-2\config )
EDIT the config.ini (editor like Note++ or Note Pad).
>Config.ini - OLD path:
At the very top you should see this.
[path]
read-data=__PATH__system-read-data__
write-data=__PATH__system-write-data__
>Config.ini New Path:
(should look something like this. Change the drive and path information as needed for your computer to your files)
[path]
read-data=C:\Program Files\Factorio-2\data
write-data=C:\Program Files\Factorio-2\data
>Change the port number:
port=34198
Now Steam should be running on Port 34197 and the Factorio-2 should be running on Port 34198
Once you do that it should also stop things like log file errors as each copy is now looking at its own files and its not sharing files anymore.
Now to START them on the same computer:
STEP 1:
Start your Steam Factorio.
-Play
-Multiplayer
New Game
Load Game? (if you load a game everyone has to have the same mods for this to work)
Or
Custom scenario
We'll do NEW GAME for this.
Look for the "X" at the bottom "Verify User Identity:" Check this off (if left with a "X" then only users that have real factorio accounts can login and you cant just make up new names on your LAN.)
STEP 2:
Start the Factorio-2.
-Play
-Multiplayer
-Connect to server
127.0.0.1
It should connect.
This is the steps I used to get 2 copy's of the game to run on my computer for testing.
Hope that works for you.
You should read threw this post before starting this.
One is steam
The other is to download Alpha version (you will need to have a steam account and link it so you can download it from there page at Factorio.com)
Install Stream first.
then
Install Alpha version as FACTORIO-2 (C:\Program Files\Factorio-2 )
(will call it factorio-2 for now on)
Now factorio-2 will link its self to the AppData file area (C:\Users\username\AppData\Roaming\Factorio)
C:\Users\username\AppData\Roaming\Factorio\config
C:\Users\username\AppData\Roaming\Factorio\mods
C:\Users\username\AppData\Roaming\Factorio\saves
(Note: The AppData is a hidden file. In the windows 10 search put %appdata% and it should take you to the hidden file.)
You will need to go to the Factorio-2 (C:\Program Files\Factorio-2)
Then DELETE the folders that have SHORTCUTS to the AppData files (This is where the config file are for Steam and we cant use them).
Folders should be:
config
mods
saves
C:\Users\username\AppData\Roaming\Factorio\config
C:\Users\username\AppData\Roaming\Factorio\mods
C:\Users\username\AppData\Roaming\Factorio\saves
Now in Factorio-2 you just need to make a config.ini change and it should update the folders automatically. (Other wise you will need to copy some of the folder information to the new directory as listed above from your steam files.)
Go to the Factorio-2\config folder. (F:\Program Files\Factorio-2\config )
EDIT the config.ini (editor like Note++ or Note Pad).
>Config.ini - OLD path:
At the very top you should see this.
[path]
read-data=__PATH__system-read-data__
write-data=__PATH__system-write-data__
>Config.ini New Path:
(should look something like this. Change the drive and path information as needed for your computer to your files)
[path]
read-data=C:\Program Files\Factorio-2\data
write-data=C:\Program Files\Factorio-2\data
>Change the port number:
port=34198
Now Steam should be running on Port 34197 and the Factorio-2 should be running on Port 34198
Once you do that it should also stop things like log file errors as each copy is now looking at its own files and its not sharing files anymore.
Now to START them on the same computer:
STEP 1:
Start your Steam Factorio.
-Play
-Multiplayer
New Game
Load Game? (if you load a game everyone has to have the same mods for this to work)
Or
Custom scenario
We'll do NEW GAME for this.
Look for the "X" at the bottom "Verify User Identity:" Check this off (if left with a "X" then only users that have real factorio accounts can login and you cant just make up new names on your LAN.)
STEP 2:
Start the Factorio-2.
-Play
-Multiplayer
-Connect to server
127.0.0.1
It should connect.
This is the steps I used to get 2 copy's of the game to run on my computer for testing.
Hope that works for you.
Re: Running multiple instances of factorio
kds71 wrote:Not on one machine. I have a desktop and a laptop so it makes testing multiplayer possible, but if you are limited to one machine you should try virtualization: https://www.virtualbox.org/
Yes you can do it on one system!
Virtualbox is a HUGE waist of your system and you DO NOT NEED IT..
Re: Running multiple instances of factorio
YES!.. I show it in my post..camelCase wrote:Is it possible to run multiple instances of factorio to test mod development in multiplayer?
Re: Running multiple instances of factorio
1. Join to the game, that have more then 2 players.
2. Save the map.
3. Play alone, you are not player #1 anymore.
2. Save the map.
3. Play alone, you are not player #1 anymore.
Re: Running multiple instances of factorio
Being player #1 is not the most notable difference between multiplayer and singleplayer.darkfrei wrote:1. Join to the game, that have more then 2 players.
2. Save the map.
3. Play alone, you are not player #1 anymore.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Running multiple instances of factorio
The only place this will matter is poorly coded mods / console commands3. Play alone, you are not player #1 anymore.
The steps can be greatly simplified, just download the .zip version from factorio.com. This version will use the read and write paths where it is extracted too.
It isn't necessary to change the port number for local testing. (play on lan/direct connect)
You can use the --mod-directory command line swtich on factorio2 to point to steam versions mod folder to make testing mods easier.
Re: Running multiple instances of factorio
The problem is, is that all the files are being send to the steam folders and not its own. I just did more checking last night and found that its still sending files to the Steam folds and not to the Factorio-2 folders. No mater how you do it if its the .ZIP or the Installer its going to write to them folders. Saved games will be put in the Steam folder in the AppData area.Nexela wrote:The only place this will matter is poorly coded mods / console commands3. Play alone, you are not player #1 anymore.
The steps can be greatly simplified, just download the .zip version from factorio.com. This version will use the read and write paths where it is extracted too.
It isn't necessary to change the port number for local testing. (play on lan/direct connect)
You can use the --mod-directory command line switch on factorio2 to point to steam versions mod folder to make testing mods easier.
If you have not done it then I would try it, and let me know step by step how you get the folds to no long copy to the Steam folder.
Also you must change the port when your running more then one copy, you will get a ERROR otherwise saying the port is being used by something, bla bla bla.
Regardless of how Im trying to use both copys of the game.. Maybe to test out the server on my system, or a friends is having problems and Im trying to fix them.. Whatever it is I needed a copy other then steam and one that I could mirror on my system.
There are just a few lines to change and its not all that much stuff. It reads longer then what is being done. I want to give a new user the chance to follow the steps if they wanted or needed to do this..
Last edited by Aamic on Wed Feb 15, 2017 4:57 pm, edited 1 time in total.
Re: Running multiple instances of factorio
Doesn't this help?Aamic wrote:No mater how you do it if its the .ZIP or the Installer its going to write to them folders. Saved games will be put in the Steam folder in the AppData area.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Running multiple instances of factorio
What I found is copy#2 had ERRORS and wouldn't run on the port 34197 when copy #1 was running. The program needed to see its own port to work correctly.Adil wrote:Doesn't this help?Aamic wrote:No mater how you do it if its the .ZIP or the Installer its going to write to them folders. Saved games will be put in the Steam folder in the AppData area.
Now I have found that I like copy #2 and not the steam version as I dont like steam running in the background. (that just me)
I also need to see how a user logs in and what that user can do or see in the game. (my own testing)
I wanted all the files to be in there own folders, as I found its working now and there not going into the Steam folder anymore.
The #1 has its own copy and #2 has its own stuff... Ports work good and no more Errors from the game.
Point.. That you dont have to start that "virtualbox" deal to run two (2) copys...