Windows Headless 14.20 Doesn't Respect Mods
-
- Inserter
- Posts: 22
- Joined: Tue Jul 26, 2016 1:35 am
- Contact:
Windows Headless 14.20 Doesn't Respect Mods
Good Day,
I created a StartFactorio.bat, with the following info:
C:\Games\Factorio\bin\x64\Factorio.exe --start-server C:\Games\Factorio\MultiplayerBobs.zip
I've also filled the Mods folder with several mods that I'd like to use. When I run the above batch file, the server is loaded, including the mods, everything works great. When I try to run this bat file from either Task Scheduler or create a service for it via NSSM the mods aren't being loaded, even though the server comes up just fine.
This is running on Windows Server 2012 and Factorio (14.20) is running in a headless manner.
I created a StartFactorio.bat, with the following info:
C:\Games\Factorio\bin\x64\Factorio.exe --start-server C:\Games\Factorio\MultiplayerBobs.zip
I've also filled the Mods folder with several mods that I'd like to use. When I run the above batch file, the server is loaded, including the mods, everything works great. When I try to run this bat file from either Task Scheduler or create a service for it via NSSM the mods aren't being loaded, even though the server comes up just fine.
This is running on Windows Server 2012 and Factorio (14.20) is running in a headless manner.
Re: Windows Headless 14.20 Doesn't Respect Mods
do you have properly set working directory?
i would suggest using batch file for that
my factorioserver.cmd (which is placed in d:\games\factorio)
looks like this
works as shortcut, service and from scheduler.
if you don't want to see server output, just remove /wait after start or don't use "start" command at all.
i would suggest using batch file for that
my factorioserver.cmd (which is placed in d:\games\factorio)
looks like this
Code: Select all
cd %~dp0
start /wait .\bin\x64\factorio.exe --server-settings "data/server-settings.json" --start-server "saves/bobs.zip" --autosave-interval 5 --autosave-slots 5 --latency-ms 200 --port 34150
if you don't want to see server output, just remove /wait after start or don't use "start" command at all.
Re: Windows Headless 14.20 Doesn't Respect Mods
Where are mods located? If they are in C:\Games\Factorio\mods then I don't have an idea why it wouldn't work. If they are in %APPDATA%\Factorio\mods, then probably Factorio is executed under different user when ran as service, therefore has different path to %APPDATA%johnmegacycle wrote:When I try to run this bat file from either Task Scheduler or create a service for it via NSSM the mods aren't being loaded, even though the server comes up just fine.
Either way you can add parameter --mods-directory <path_to_mods_directory> and have full control over where you want to have mods stored.
Re: Windows Headless 14.20 Doesn't Respect Mods
i thought game is lookig for config-path.cfg which is in "root" of game folder, and there is specified location of datafiles.posila wrote:Where are mods located? If they are in C:\Games\Factorio\mods then I don't have an idea why it wouldn't work. If they are in %APPDATA%\Factorio\mods, then probably Factorio is executed under different user when ran as service, therefore has different path to %APPDATA%johnmegacycle wrote:When I try to run this bat file from either Task Scheduler or create a service for it via NSSM the mods aren't being loaded, even though the server comes up just fine.
Either way you can add parameter --mods-directory <path_to_mods_directory> and have full control over where you want to have mods stored.
if you use "installer" version it points to profile directory, while in zipped version it points to folders inside "root" of game folder.
installer config
zip config
anyways, for running headless is better to use zipped version, and not installer version, since you can have it "anywhere" and better control where it read/writes. especially when using as service it's better, since you don't need to use user account with R/W profile.-
- Inserter
- Posts: 22
- Joined: Tue Jul 26, 2016 1:35 am
- Contact:
Re: Windows Headless 14.20 Doesn't Respect Mods
Thank you both very much for your time. I'll be able to test this out later tonight. Also, by using the zipped version and not the installer, I should be able to host two Headless servers at the same time on the same machine. I'll just have to specify different ports. Am I on the right path? ^_^
Re: Windows Headless 14.20 Doesn't Respect Mods
that will be not enough, either you will need to have 2 installations, or you will need also modify datapath and eventually also mod path, so each instance will save log file to different folder and have own mod config. i suggest having 2 complete folders, since you might also want separate mod configurations and so on. so it's better to separate them completely.johnmegacycle wrote:Thank you both very much for your time. I'll be able to test this out later tonight. Also, by using the zipped version and not the installer, I should be able to host two Headless servers at the same time on the same machine. I'll just have to specify different ports. Am I on the right path? ^_^
my server has different port, because game doesn't want to connect otherwise if run on same machine as server (i think it uses port for receiving reply packets from server), but multiple instance will indeed need different port each one.
-
- Inserter
- Posts: 22
- Joined: Tue Jul 26, 2016 1:35 am
- Contact:
Re: Windows Headless 14.20 Doesn't Respect Mods
Right, sorry, I replied a bit hastily. With the zip version, two different folders, two different everything. I'm on the same page. How do you specify port that is being listened to? Also, I'm assuming if I connect via (server ip) without the port as in (server ip:port) then the default port is used, even though there are two instances on that physical server. The user must specify the port if they want to connect to a different instance.
Re: Windows Headless 14.20 Doesn't Respect Mods
johnmegacycle wrote:With the zip version, two different folders, two different everything. I'm on the same page. How do you specify port that is being listened to?
- In the config\config.ini file:
Code: Select all
[other] port=34197
- (only when running as server/headless) using the --port N (or --bind ADDRESS[:PORT]) console options of the factorio executable
-
- Inserter
- Posts: 22
- Joined: Tue Jul 26, 2016 1:35 am
- Contact:
Re: Windows Headless 14.20 Doesn't Respect Mods
You guys have been amazing and that looks like that was it.
My bat file needed some small tweaking, but the straight zip and not the installer was my issue.
I"ll do more tweaking for ports and such later, but the mods loaded right up and I'm good to go.
Task scheduler and NSSM work like a charm. ^_^
My bat file needed some small tweaking, but the straight zip and not the installer was my issue.
I"ll do more tweaking for ports and such later, but the mods loaded right up and I'm good to go.
Task scheduler and NSSM work like a charm. ^_^
-
- Inserter
- Posts: 22
- Joined: Tue Jul 26, 2016 1:35 am
- Contact:
Re: Windows Headless 14.20 Doesn't Respect Mods
I'm sorry, I really need to stop replying using my phone.johnmegacycle wrote:You guys have been amazing and that looks like that was it.
My bat file needed some small tweaking, but the straight zip and not the installer was my issue.
I"ll do more tweaking for ports and such later, but the mods loaded right up and I'm good to go.
Task scheduler and NSSM work like a charm. ^_^
The installer was the issue. The straight zip worked great.