Server mods are uploaded to the server then downloaded and mounted (loaded) on each client to change the experience for all players.
Only server mods can change the unit roster or unit specs in a multiplayer game.
There are three basic types of server mods:
- user interface (UI)
- simple unit
- complex balance / overhaul
UI server mods can modify the user experience in the new game lobby and live game.
Examples of simple unit server mods are:
- change unit specs
- remove a unit eg Ragnarok
- add a new type of unit
Some aspects of units can be changed in a client mod:
- visual effects
- build eg area separation
Server mods should NOT:
- install outside of current game
- make changes to user settings or data without permission
- take over PA in any way eg full screen with no cancel option
- prevent players from leaving game
- show inappropriate content
Badly behaved server mods will be killed.
Server mods have to be uploaded to the server and then downloaded to every client.
Minimise the size of your server mod by:
- splitting all files not needed by the server into a companion client mod
- separate any client files not needed to play the game into another separate client mod eg start scene / server browser / settings / branding
- merge or include during build any dependent mods that do not need to be separate eg xenophobia
The final setup would be:
- host server mod (only files needed by the server for creating a mod game)
- optional player companion client mod (files needed to join or spectate a mod game / replay)
- optional UI / branding client mod (start, settings, server browser, intro, etc)
- server mod depends on player companion mod and UI / branding client mod
- no dependencies for player companion client mod
- no dependencies for optional client mod
Installing the main server mod will install the client mods.
The companion client mod can be disabled to improve startup performance on slower systems.
The companion client mod will be automatically mounted when hosting, spectating or joining a mod game.
The UI / branding client mod can also be disabled.
To enable (re)publishing of filesytem server mods in live games while testing:
- replace /server-script/main.js with https://cdn.palobby.com/server-script/main.js
- replace /server-script/states/lobby.js with https://cdn.palobby.com/server-script/states/lobby.js
- start your local server with
The default key binding for (re)publishing server mods is
control-alt-p (settings > keyboard > dev mode > publish server mods)
Changes to unit specs will be applied to new units (existing units are not updated).
This functionality may cause lots of crashes.
Use a free code editor like Visual Studio Code to prevent instant crashes due to JSON errors.