Message of the day (motd) & server configuration - midspace/Space-Engineers-Admin-script-mod GitHub Wiki

On the first start your server will create two files. One is a config file (it's named like 'Config_{worldId}.cfg') the other contains your message of the day (usually named like 'Motd_{suffix}.txt). Simply type any text in the motd file, save it and it will appear in a mission screen when you join the server. But keep in mind that you need to restart the server once you edited the file to make the changes appear ingame. We'll add a command for dealing with anything related to the motd later. If the file doesn't contain any text, the motd is disabled thus no mission screen will appear.

File locations

Configuration files will be stored in the following locations.

Single player and privately hosted games: %AppData%\SpaceEngineers\Storage\316190120.sbm_midspace.adminscripts

Dedicated Server: %AppData%\SpaceEngineersDedicated\Storage\316190120.sbm_midspace.adminscripts

Dedicated Server service are stored under name of the Service instance: C:\ProgramData\SpaceEngineersDedicated\{ServiceName}\Storage\316190120.sbm_midspace.adminscripts

Configuration:

The other file contains the server configuration. The file is XML based, for learning how to use XML please visit http://www.w3schools.com/xml/. The server configuration contains several settings and we might add some more later. Currently it contains the following: - 'WorldLocation'
This is not a setting at all. It just let you know to which world this cfg is connected so that you don't have to search which one has the id the file name contains.
  • 'MotdFileSuffix'
    This setting refers to the suffix of your motd file. By changing it you can set several worlds to one motd file or each world to another one. If you change it and no file with this suffix can be found, a new empty motd file will be created. By default it is the name of the world.

  • 'MotdHeadLine'
    With this setting you can set a title to your message of the day. It will appear as the objective of the mission screen the motd is displayed in. Don't use too many characters here otherwise they might appear outside the mission screen. About 30 characters should be fine in most cases.

  • 'MotdShowInChat'
    If this is set to true, the motd will appear as a chat message instead of a mission screen. Keep in mind that the head line will not appear in chat.

  • 'LogPrivateMessages'
    This setting determines if private messages are logged or not. By default the logging is enabled.

  • 'ForceBannedPlayers'
    The information about forcebanned players is stored here. I do not recommend making changes here.

  • 'AdminLevel'
    This setting sets the level for admins. By default it is 100.

  • 'EnableLog'
    This setting determines if debug information is logged. Usually you don't need to as the information is not relevant for you. By default the logging is disabled

  • 'NoGrindIndestructible'
    This setting determines if ships that are set as indestructible can be grinded or not. By default the grinding is allowed.
    Example: /config ngi true

Motd variables:

There are some variables you can use in the text of the motd that will be initialized when the server starts. Currently the following are available: - `%SERVER_NAME%` - will be replaced by the server's name. - `%SERVER_PORT%` - will be replaced by the server's port. - `%WORLD_NAME%` - will be replaced by the loaded world's name. - `%USER_NAME%` - will be replaced by the user's own name.

If you have ideas for further variables please let us know.

Chat Commands

The following are Admin only commands for setting configuration:

Command: /cfg motd
Sets the content of the message of the day. Note that if you set the motd to an empty value it won't be displayed. You will need to save any changes (see /cfg save below).
Examples:
/cfg MessageOfTheDay Welcome to our server.

The following example can be done by pasting your multiple lines text directly into the chat bar and pressing Enter:

/cfg motd Welcome to our server.
Please enjoy your time.
Obey the rules set out below

Command: /cfg motdsic
Determines if the message of the day is shown in chat or in a dialog. Only True or False is valid. You will need to save any changes (see /cfg save below).
Examples:
/cfg motdsic true
/cfg MotdShowInChat false - alternate

Command: /cfg motdhl
Sets the headline of the message of the day. Note that it won't be saved until the server shuts down even though it is active. If someone reloads the config before it is saved (manually or at shutdown) the headline will be changed back to that one in the config file. Only shown in dialog.
Examples:
/cfg motdhl Welcome on the server!
/cfg MotdHeadLine Welcome on the server! - alternative

Command: /cfg adminlevel
Sets the default level for admins to a certain level. Please note that levels that were already set won't be changed.

Command: /cfg ngi
Determines if it is allowed to grind ships that are set indestructible.
Examples:
/cfg ngi true - stops grinders from working on indestructible ships.
/cfg NoGrindIndestructible false - alternate. Allows grinders to work on indestructible ships.

Command: /cfg save
Saves the config to the files. If you have made changes to your Admin configuration, they will need to be saved with this command.

Command: /cfg reload
Reloads the config from the files and reverts any changes you made since the last save.

Command: /cfg show
Shows the config.

⚠️ **GitHub.com Fallback** ⚠️