Avorion

Avorion

View Stats:
"The D" Jul 3, 2019 @ 2:59pm
Enable mods for Dedicated Server
Hello,
I went to the wiki in regards to this but it still has me confused....

https://avorion.gamepedia.com/Using_Mods_on_Dedicated_Servers

I created a ModConfig.LUA
but could not make sense of certain things or get the server to load the mods

modLocation = ""
-----What does this line mean? Does it point to the Workshop Locations

local prefix = "/home/koonschi/.avorion/mods/"
------Again.. no clue what this directory is supposed to point to.. do i need to copy the workshop files into a specific folder as whatever i have named above or can this point to the avorion workshop folder?

Where do the workshop files need to be and what do these two lines need to reference in order to get the mods to load on a dedicated server?

Thanks
< >
Showing 1-14 of 14 comments
Zantas Aug 22, 2019 @ 9:46pm 
Bump

I'm having the same issue currently. Running a linux server and have the modconfig.lua file in the desired galaxy's folder, but every time i launch the server it says it find 0 mods in the modconfig file and I have checked the workshop folder which is empty.

Below is my current modconfig.lua
modLocation = "" forceEnabling = false -- Docs: https://avorion.gamepedia.com/Using_Mods_on_Dedicated_Servers mods = { {workshopid = "1746985221"}, {workshopid = "1747690472"}, } -- these are allowed mods, that can run on the client only (ie. UI mods) allowed = { }

Any help in resolving this would be much appreciative.
SuperPig Aug 25, 2019 @ 10:57am 
can anyone supply a working modconfig.lua file?? we have the same problem and the guide is somewhat confusing
Salmondude Aug 25, 2019 @ 11:31pm 
dont know if this will help any of you guys but me and a friend had the same issue yesterday and managed to get it working by add this to our modconfig.lua. if u want the file itself feel free to add me and i can send via discord if you have it. hopefully it works for you guys to and be happy modders. we also edited the forum post as it was missing the commas after each line that was part of us not getting it to work....

modLocation = "" forceEnabling = false

local prefix = "/home/koonschi/.avorion/mods/" mods ={

{workshopid = "1819394387"},
{workshopid = "1751636748"},
{workshopid = "1751540023"},
{workshopid = "1819394387"},
{workshopid = "1822252441"},
{workshopid = "1819452708"},
{workshopid = "1722652757"},
{workshopid = "1765619430"},

}
Last edited by Salmondude; Aug 25, 2019 @ 11:32pm
Lyrdian Aug 26, 2019 @ 8:12pm 
Originally posted by salmondude4:
dont know if this will help any of you guys but me and a friend had the same issue yesterday and managed to get it working by add this to our modconfig.lua. if u want the file itself feel free to add me and i can send via discord if you have it. hopefully it works for you guys to and be happy modders. we also edited the forum post as it was missing the commas after each line that was part of us not getting it to work....

modLocation = "" forceEnabling = false

local prefix = "/home/koonschi/.avorion/mods/" mods ={

{workshopid = "1819394387"},
{workshopid = "1751636748"},
{workshopid = "1751540023"},
{workshopid = "1819394387"},
{workshopid = "1822252441"},
{workshopid = "1819452708"},
{workshopid = "1722652757"},
{workshopid = "1765619430"},

}
Do we need to fill in the ModLocation "" section with the workshop folder i made? The wiki made sense and didnt at the same time :D
Salmondude Aug 27, 2019 @ 3:09am 
Originally posted by Lyrdian:
Originally posted by salmondude4:
dont know if this will help any of you guys but me and a friend had the same issue yesterday and managed to get it working by add this to our modconfig.lua. if u want the file itself feel free to add me and i can send via discord if you have it. hopefully it works for you guys to and be happy modders. we also edited the forum post as it was missing the commas after each line that was part of us not getting it to work....

modLocation = "" forceEnabling = false

local prefix = "/home/koonschi/.avorion/mods/" mods ={

{workshopid = "1819394387"},
{workshopid = "1751636748"},
{workshopid = "1751540023"},
{workshopid = "1819394387"},
{workshopid = "1822252441"},
{workshopid = "1819452708"},
{workshopid = "1722652757"},
{workshopid = "1765619430"},

}
Do we need to fill in the ModLocation "" section with the workshop folder i made? The wiki made sense and didnt at the same time :D




Nope you should not have to the workshop folder gets made on its own when the server downloads the mods for you :) all u have to do is copy and paste what i gave you there and replace the mods ids with what u want in the modconfig.lua <----(like that no caps or anything) andit should be good to go up above is exactly how i have it on my server :).
Last edited by Salmondude; Aug 27, 2019 @ 3:11am
Lyrdian Aug 29, 2019 @ 6:03pm 
Originally posted by salmondude4:
Originally posted by Lyrdian:
Do we need to fill in the ModLocation "" section with the workshop folder i made? The wiki made sense and didnt at the same time :D




Nope you should not have to the workshop folder gets made on its own when the server downloads the mods for you :) all u have to do is copy and paste what i gave you there and replace the mods ids with what u want in the modconfig.lua <----(like that no caps or anything) andit should be good to go up above is exactly how i have it on my server :).
actually got it working and forgot to post, thanks all :)
Salmondude Aug 31, 2019 @ 3:59am 
Originally posted by Lyrdian:
Originally posted by salmondude4:




Nope you should not have to the workshop folder gets made on its own when the server downloads the mods for you :) all u have to do is copy and paste what i gave you there and replace the mods ids with what u want in the modconfig.lua <----(like that no caps or anything) andit should be good to go up above is exactly how i have it on my server :).
actually got it working and forgot to post, thanks all :)

No problem dude glad u got it working, happy gaming :)
"The D" Aug 31, 2019 @ 6:40pm 
Since around 2 updates ago where u can launch the server from within the game i have not used/needed the mod.lua file, but i only ever play with one other person
TheRedEyedSniper Mar 31, 2020 @ 7:10am 
Originally posted by Lyrdian:
Originally posted by salmondude4:




Nope you should not have to the workshop folder gets made on its own when the server downloads the mods for you :) all u have to do is copy and paste what i gave you there and replace the mods ids with what u want in the modconfig.lua <----(like that no caps or anything) andit should be good to go up above is exactly how i have it on my server :).
actually got it working and forgot to post, thanks all :)





how did you get it to work?
Abstract-Player Apr 12, 2020 @ 4:14am 
I'm using Windows. I have to start a local server by hand ( ..\gamedirectory\server.bat ). Here is what I found out after hours of tryouts.

.. exchange **username** to what ever your Windows username is.
.. exchange **savegame** to what ever your savegame/galaxy name is.

Go to the following folder:
"C:\Users\**username**\AppData\Roaming\Avorion\galaxies\**savegame**\"

There you will find a "mods" folder.

Create a new file in your galaxies folder:
"modconfig.lua"

Copy/paste this into the new file:
scriptCachingEnabled = true modLocation = "" forceEnabling = false local prefix = "C:/Users/**username**/AppData/Roaming/Avorion/galaxies/**savegame**/" mods = { {path = prefix .. "mods/1793763687"}, {path = prefix .. "mods/181651♥♥♥♥"}, }

There are two options:
1) server is using local stored mods
2) server is downloading / using Steam workshop mods

Using local mods is what you see above. Inside mods={} you have to enlist the used mods. Path means that you tell the server where to find the mods. The "prefix" behind "path =" means that the server has to use the "local prefix" from line 6.

To say it clear:
{path = prefix .. "mods/1793763687"},
.. is the same as:
"C:/Users/**username**/AppData/Roaming/Avorion/galaxies/**savegame**/mods/1793763687"
.. but with "prefix" the devs give us the ability to clean up our config file.

IMPORTANT: Windows is using \ to separate folders. This is unknown in unix / linux systems. So you have to exchange all \ from your galaxy- and mods-path to /.

This means, the following addres:
"C:\Users\**username**\AppData\Roaming\Avorion\galaxies\**savegame**\mods\1793763687"
.. will become:
"C:/Users/**username**/AppData/Roaming/Avorion/galaxies/**savegame**/mods/1793763687"

To get this working.. you need the mods! Go to Steam workshop and download your mods. My mods are:
1793763687 = Independent Turrets Full Damage
181651♥♥♥♥ = All Turrets Independent

Go to your Steam workshop folder
"Steam\SteamApps\workshop\content\445220\"
.. and copy the mod-folders to the above galaxy\mods folder:
"C:\Users\**username**\AppData\Roaming\Avorion\galaxies\**savegame**\mods\

Adjust the config file.. so that you have one path/prefix-line for each of your mods inside mods={}.

That's all. Start server. Connect to your server. The client should download / use these mods.


If you want option 2) using the Steam workshop.. then you have to write another config file:
scriptCachingEnabled = true modLocation = "" forceEnabling = false local prefix = "" mods = { {workshopid = "1793763687"}, {workshopid = "181651♥♥♥♥"}, } }

You don't need the prefix and no path.

Let the "" at modLocation empty! This means the server will automatically download and store all needed mods from Steam workshop inside this folder:
"C:\Users\**username**\AppData\Roaming\Avorion\galaxies\**savegame**\workshop\"

You maybe need to create the "workshop"-folder inside your savegame/galaxy-folder. You also can use any other location. Then you need to add the path to modLocation. But don't forget about the / and \ inside the path.

IMPORTANT: If you also start your server manually by server.bat file.. then the server cannot connect to Steam. In this case it also cannot use / download Steam workshop mods. This means: You have to download and store the mods manually and add the path with prefix in the config! Otherwise the client will report wrong mod version number 0.0 and disconnect from your server instantly.
Last edited by Abstract-Player; Apr 12, 2020 @ 4:25am
Shrimpins Jun 27, 2021 @ 5:19am 
Originally posted by Abstract-Player:

There are two options:
1) server is using local stored mods
2) server is downloading / using Steam workshop mods
As tedious as it may have been, method 1 you gave worked well. Thanks!
Abstract-Player Jul 4, 2021 @ 2:50pm 
Glad to see that. Was doing a lot of tryouts to figure this out. Thought it could be a good idea to share this..
Parker Jul 8, 2022 @ 5:02am 
Originally posted by Salmondude:
dont know if this will help any of you guys but me and a friend had the same issue yesterday and managed to get it working by add this to our modconfig.lua. if u want the file itself feel free to add me and i can send via discord if you have it. hopefully it works for you guys to and be happy modders. we also edited the forum post as it was missing the commas after each line that was part of us not getting it to work....

modLocation = "" forceEnabling = false

local prefix = "/home/koonschi/.avorion/mods/" mods ={

{workshopid = "1819394387"},
{workshopid = "1751636748"},
{workshopid = "1751540023"},
{workshopid = "1819394387"},
{workshopid = "1822252441"},
{workshopid = "1819452708"},
{workshopid = "1722652757"},
{workshopid = "1765619430"},

}
A little but this is still an ongoing issue I have found out. Would you happen to know if this would work for a rented server with the exact same issue?
Salmondude Jul 8, 2022 @ 5:21am 
Originally posted by Parker:
Originally posted by Salmondude:
dont know if this will help any of you guys but me and a friend had the same issue yesterday and managed to get it working by add this to our modconfig.lua. if u want the file itself feel free to add me and i can send via discord if you have it. hopefully it works for you guys to and be happy modders. we also edited the forum post as it was missing the commas after each line that was part of us not getting it to work....

modLocation = "" forceEnabling = false

local prefix = "/home/koonschi/.avorion/mods/" mods ={

{workshopid = "1819394387"},
{workshopid = "1751636748"},
{workshopid = "1751540023"},
{workshopid = "1819394387"},
{workshopid = "1822252441"},
{workshopid = "1819452708"},
{workshopid = "1722652757"},
{workshopid = "1765619430"},

}
A little but this is still an ongoing issue I have found out. Would you happen to know if this would work for a rented server with the exact same issue?
if they havnt changed or fixed whatever was causing it i dont see why it would not still work my issue was also on a rented server
< >
Showing 1-14 of 14 comments
Per page: 1530 50