Using Mods on Dedicated Servers

From Avorion Wiki
Jump to: navigation, search

Dedicated servers can have workshop mods and non-workshop mods configured.

Workshop mods are the recommended way of handling things, because workshop mods can be downloaded automatically by both server and client, and be kept up to date

Note: Achievements are disabled when using mods!

Installation[edit | edit source]

Workshop Mods[edit | edit source]

Workshop mods will be downloaded automatically and kept up to date by the server on every start, so you can skip this part.

Non-Workshop Mods[edit | edit source]

Non-Workshop mods must be installed and maintained manually. Download the mods from the mod portal of your choice; Afterwards you can put them wherever you want, you just have to configure your server to find them.

Configuration[edit | edit source]

To enable mods on dedicated servers, create a modconfig.lua file in your server's galaxy folder.

|--mods/          <--- You can place mods here if you want (but you don't have to, I'm not your boss)
|--workshop/      <--- Server downloads workshop mods here by default
|--modconfig.lua  <--- Configure mods in this file

modconfig.lua[edit | edit source]

modconfig.lua Example:

 1 modLocation = "" 
 2 forceEnabling = false
 4 local prefix = "/home/sid_1549528/avorionStable/galaxies/avorion_galaxy/mods/"
 5 mods =
 6 {
 7     {workshopid = "1769379152"},
 8     {workshopid = "1817506461"},
 9     {workshopid = "1688279692"},
10     {workshopid = "1819452708"},
11     {workshopid = "1897578544"},
12     {workshopid = "1868721180"},
13     {workshopid = "1751636748"},
14     {path = prefix .. "mymod"}, 
15     {path = prefix .. "AnotherMod"},
17     -- mods using both 'path' and 'workshopid': server will load the mod from the path and clients will download and use it automatically from the workshop
18 }
20 -- these are allowed mods, that can run on the client only (ie. UI mods)
21 allowed =
22 {
23     {id = "1222005920"},
24     {id = "1664452070"},
25     {id = "ThatOneUIMod"},
26 }
  • modLocation configures the location the server to download workshop mods into. If empty, it will download to [galaxy folder]/workshop/. If nil, it will download to the folder configured in server.ini. If that is nil as well, it will default back to [galaxy folder]/workshop/
  • forceEnabling mods will be enabled by force. Prints errors, but enables mods nevertheless. Only recommended for people who know what they're doing.
  • allowed configures mods that are allowed, but not required on clients
  • mods configures mods that are running on the server, either by workshop ID or path.
    • If a path is set and no workshop ID, then the server will load the mod from the path and connecting players will have to install the mod themselves.
    • If a workshop ID is set and no path, the server will download the mod from the workshop and tell clients about workshop mod IDs so they can download and enable them before connecting to the server.
    • If both are set, the server will load the mod from the path, and tell clients the workshop ID so they can download it. Using only workshop IDs is highly recommended for public servers.

In order to get the id of a workshop mod, go to its workshop site, and look at the last number of its URL. That's your mod's id.

So for, the ID would be 1682700568.

Things to Note[edit | edit source]

  • Server always enables all loaded mods. If you want to disable a mod, comment out the corresponding part of the lua file.
  • Server will prefer workshop mods over "path" mods. Without ID conflicts you won't have to worry about this, so make sure there are none!
  • If both path and workshopid are set, then the server will load the mod from the given path, but will tell clients the workshop id so they can download and enable them. So make sure there are no version mismatches.

See Also[edit | edit source]