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.

MyAwesomeGalaxy/
|--alliances/
|--factions/
|--mods/          <--- You can place mods here if you want (but you don't have to, I'm not the boss of you)
|--players/
|--sectors/
|--workshop/      <--- Server downloads workshop mods here by default
|--server.ini
|--modconfig.lua  <--- Configure mods in this file

modconfig.lua[edit | edit source]

modconfig.lua Example:

modLocation = "" 
forceEnabling = false

local prefix = " /home/sid_1549528/avorionStable/galaxies/avorion_galaxy/modconfig.lua. "
mods =
{
    {workshopid = "1769379152"},
    {workshopid = "1817506461"},
    {workshopid = "1688279692"},
    {workshopid = "1819452708"},
    {workshopid = "1897578544"},
    {workshopid = "1868721180"},
    {workshopid = "1751636748"},
    {path = prefix .. "mymod"}, 
    {path = prefix .. "AnotherMod"},

    -- 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
}

-- these are allowed mods, that can run on the client only (ie. UI mods)
allowed =
{
    {id = "1222005920"},
    {id = "1664452070"},
    {id = "ThatOneUIMod"},
}
  • 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 https://steamcommunity.com/sharedfiles/filedetails/?id=1682700568, 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]