Installing Mods on your Avorion Server
Avorion recently added the ability to automatically download and install content directly from the Steam Workshop.
This is now the method recommended by the developers of Avorion for installing mods, since the server (and the clients) will automatically install, and automatically update any mods from the Workshop. Mods not available on the Steam Workshop can still be used on a server, they just have to be manually installed and must be manually updated from then on.
Workshop mods (automatically installed)
The installation of mods from the Steam Workshop is controlled by creating and editing a file called modconfig.lua
on your server. This file needs to be created or uploaded in the avorion_galaxy
(if you have named your galaxy something other than the default, this folder will correspond to your galaxy's name.) directory on the server. If the server has not been started at least once, you will not see the avorion_galaxy
folder yet. Just start the server up and then stop it, and the game will create that folder.
In the modconfig.lua
file, you will list mods by their Workshop ID numbers, and server will use that list to automatically download and install those mods.
Mods automatically downloaded this way are placed into a workshop
folder in your avorion_galaxy
folder. This folder will need to be created. The folders and files shown in the screen shot below will all be made automatically by the game, when it downloads Workshop mods listed in your modconfig.lua
file.
Inside the workshop directory, mods are stored in the content
folder, in a folder labelled 445220
(the application ID number on steam for the game "avorion"). All the numbered folders inside the 445220
directory will be the downloaded mods from the Steam Workshop.
Manually installed mods
Once you've downloaded the mods you want from your favorite mod portal, simply upload those files to the mods
folder, which may need to be manually created in the avorion_galaxy
folder on the server. This is the recommended place to put all mods you add manually.
In reality, mods can be placed in almost any location, since you will specify their location in the same modconfig.lua
file mentioned above.
Create the config file, modconfig.lua
In your avorion_galaxy
folder, create a text file called modconfig.lua
. On the Nodecraft control panel, when viewing the file manager window, there will be a "create file" button near the top which you can use to make a new file. Or simply upload a file you create on your own computer.
In that file, copy and paste the following text as a starting point:
modLocation = ""
forceEnabling = false
mods =
{
{workshopid = ""},
}
allowed =
{
}
Each section of this config file, and what you need to put in it, will be explained in the following sections.
modLocation = ""
This line is specifying the location of a mods folder other then the default one of /mods
in your galaxy
folder.
forceEnabling = false
It's recommended by the developers of Avorion that force enabling be left turned off, as it can cause some issues which can lead to broken or corrupted save files. This is a feature intended for those people who are in the process of developing their own mods.
mods =
For Workshop mods
In the section that begins with mods =
, put a line for each Steam Workshop mod in between the curly brackets underneath mods =
.
Like for example:
mods =
{
{workshopid = "1691539727"},
{workshopid = "1691591293"}
}
The format above is very important, the workshop ID number must be surrounded by quotes, and the entire line must begin and end with curly brackets, and be followed by a comma, unless it's the last line in the list.
If you want to temporarily disable a specific mod, it's recommended to comment out the line (see section below on "comment characters".
For non-workshop mods (manually installed)
use the following lines in the mods =
section of the config file, in between the curly brackets:
{path = prefix .. "modfilenamehere"}
It's possible to mix both the "workshopid" and "path" in the mods =
section, like the example below:
{workshopid = "1691539727"},
{workshopid = "1691591293"},
{path = prefix .. "mymod"},
{path = prefix .. "AnotherMod"}
allowed =
The allowed =
section is for client side (mostly UI mods) that are allowed on the server. It is optional, and can be left blank, with nothing between the curly brackets.
List Workshop mods in the same format as the mods =
" section above.
Comment characters
When you create the modconfig.lua
, you can add comment lines by using the characters --
anywhere in the file. The --
characters will tell the game to stop processing any instructions past those characters. Comment lines will appear as a light brown text.
Comments can be used at the beginning or end of a line. Just remember that anything after the --
will be ignored by the game.
For example:
Using comments to add the actual name of the mod, like the example of the second line "modlister, by koonschi", can save you a lot of time later on if you need to look up which workshop ID is which actual mod.
Disabling a line in the config
The developer of Avorion does say that disabling a mod can cause situations that lead to corruption of save files. It's recommended to make backups of the server before disabling previously loaded mods. Disabling a mod is probably best done as part of an investigation into issues with the mods, or in preparation for starting a whole new game.
By putting --
at the very beginning of an existing line, you can "turn off" that line.
In screenshot below, by added just the --
at the very beginning of the line, the entire workshopid =
line is effectively removed from the file. The server will reach the first --
, and skip the rest of the line.
Even though that line had a comment at the end, by placing comment characters at the very beginning, the entire line is now just one big "comment" (and will be skipped). Since that was the only line in the mods =
section, the game will now see that section of the modconfig.lua file as being "empty" and will not download any mods.
Start the Server, and the Mods will be Downloaded
Once the modconfig.lua file has been created and added to the server, on the very next startup the game will attempt to download all the mods listed in the file directly from Steam. You will see each mod being downloaded, and the progress of that download in the "console" tab on your Nodecraft control panel for your Avorion server. The screenshot below shows the progress of a single mod being installed.
Immediately following that will be confirmation messages for any new commands being added by the mod, like the two commands added by the mod shown above.
This mod simply lists what mods are installed on the server, and this is done by using the commands mods
or outdatedmods
in chat (if you are authorized as an admin).
Players connecting to server can automatically download mods
After Steam workshop mods are successfully installed on your server, any players that join the server will be shown a list of the installed mods and asked if they would like to install them onto their clients. If they agree, the client will automatically download the matching mods to allow them to play on the server. Players simply need to click the "connect & download" button.