- Documentation
- Server
Category
Server
All Lua functions and events in the Server category, on the server and the client.
Server functions 23
getReturns the game type set withGame Type setGameType.getReturns the current loading screen set withLoading Screen setLoadingScreen.getReturns the map name set withMap Name setMapName.getReturns a server rule's value.Rule Value getReturns all server rules as a key → value table.Rule Values getA function for reading a setting from the server configuration file.Server Config Setting getReturns the HTTP server port. The Trilogy Hub server has no separate HTTP server (resource files reach players through the game connection), so it usually returns 0.Server Http Port getReturns the address the server listens on. UsuallyServer Ip "0.0.0.0"(all interfaces); the real address seen from the internet is given bygetServerIpFromMasterServer.getReturns the server address as seen from outside, as reported by the server list.Server Ip From Master Server getReturns the server password.Server Password getReturns the port the server accepts players on.Server Port getReturns the time since the server started, in milliseconds.Server Uptime getReturns server version information as a table.Version removeRemoves a server rule.Rule Value resetRestores the default Trilogy Hub loading screen.Loading Screen setStores the server's game type (e.g.Game Type "Roleplay","Freeroam","DM").setSets a custom server loading screen that players see while joining: a PNG/JPG image from the resource (up to 2 MB), a text and a list of tips shown in turn. The screen belongs to the resource - when it stops, the default Trilogy Hub screen returns.Loading Screen setStores the server's map name.Map Name setChanges the number of server slots at runtime (1-65535). New players are rejected when the server is full; current ones are not kicked. The change lasts until the server restarts.Max Players setStores a server rule (a key-value pair, e.g.Rule Value "discord"→"discord.gg/xyz").setA function for changing a setting in the server configuration file.Server Config Setting setSets or removes the server password at runtime. The server immediately requires the password from new players; the launcher gets the new password with the next server list report (up to 30 seconds) - until then entering the new password may fail. Players already on the server are not kicked.Server Password nil/falseremoves the password.shutdownStops the server (resources getonResourceStop, players are disconnected). The reason goes to the server log. If the server runs under hosting with automatic restart, it will start again.