SEServerExtender / EssentialsPlugin

Dedicated Essentials Plugin
GNU Lesser General Public License v3.0
18 stars 18 forks source link

Dedicated Server Essentials - Plugin

Requirements

This plugin requires SEServerExtender v1.85.08 or above. Please download and install that first from https://github.com/SEServerExtender/SEServerExtender. 6 This plugin requires a workshop mod. This mod acts as a gateway between the client and server and is required for some functionality to work (private messaging, faction messaging, command hiding): http://steamcommunity.com/sharedfiles/filedetails/?id=559202083

This plugin is available at github at: https://github.com/SEServerExtender/EssentialsPlugin/releases

Please post issues you have with the plugin at: https://github.com/SEServerExtender/EssentialsPlugin/issues

Overview

This plugin is aimed at being an essential plugin to run on dedicated servers with Extender. It will cover a lot of very basic requirements for server administration. This plugin looks to really show off how valuable server extender can be, by providing a lot of built in cleaning and administrative options and commands.

There are many options in this plugin, and those options will expand as time goes on. Every section of the plugin can be disabled if desired, to tightly control what an administrator wants to do.

Installation

If you're just using the DLL provided, just copy it into it's own sub directory off the Mods directory of your world instance.

If you want to compile the source provided. Compile and copy the .dll created after compiling of this project into it's own sub directory of your Mods directory of your instance.

Please make sure to add the associated workshop mod as well. It is ID: 559202083. Just add this mod in extender Mods section of the configuration and it will install automatically on restart!

It's that easy!

Major Feature Overview

In depth Feature Analysis

Please note the following commands are all set via the plugin interface.

Automated Backup

This is an option that all administrators should use. It will automatically backup your world save files in a backup directory. It will also compress them down so they don't take up too much room. And lastly this option will also cleanup old backups.

Options:

Automated Restart with Notifications

This option allows you to schedule automated restarts of your server. Sadly the game is not memory leak proof, and a quick restart can fix a lot of issues. This option also comes with the ability to notify your users of impending restarts at timed intervals.

Options:

Note that this feature restarts SESE only. For your server to restart completely, SESE should be launched with the autostart parameter, as follows:

c:\PathToSpaceEngineers\SEServerExtender.exe autostart instance="instance name"

Chat Information Commands with interval based repeats

This option allows you to setup commands that users can access that allow administrators to display server information to the user. The command /info is the base command, and the administrator then defines sub commands to display different types of information. For example defining a sub command 'motd' that gives a general message to users is setup with a sub command of motd. The user then types /info motd to see it. You can then specify if you'd like that message to be displayed for everyone at intervals. So for example you can set it up to send that message once every few hours, even if a player doesn't type the /info motd command.

Options:

Automated Join Messages for new and old players

This option allows you to greet players with a custom message. New and old players can receive different messages. You may also use the %name% tag that will be replaced by a users username. This allows for a highly customized greeting.

Options:

Automated New Player Spawn Movement

This option allows you to move players closer to viable asteroids. A viable asteroid is one that has more than 3 different base materials. It will then move them closer to that asteroid. This is useful for servers with asteroids that are very spread out. Right now the asteroid selected will be random. More options are coming for this

Options:

Player Login Tracking

This option allows administrators to track user logins. This allows administrators to delete grids by owners who no longer login. The first time this is run, it will scan your server logs, and extract older login information so that your login list is up to date.

Options:

Chat Based Settings

All settings are set through the UI, but settings can also be done via chat. Please use the command '/admin settings' to set settings. You can set settings using the set subcommand. You can modify arrays by using the add or remove command. You set sub settings items using the set command as well, examples:

List Examples

Set Examples

Add Examples

Remove Example

Safe Docking

This function allows user to define a "safe docking" zone on a station or ship. When a ship goes into the safe docking zone, it will be allowed to "dock" which removes the ship from the world, allowing the "carrier" ship to move around as fast as it wants without risking exposions due to faulty landing gears / connectors. Once the carrier has stopped, the user is free to undock the ship which places the ship back exactly where they docked it in the ship.

Setting Up A Zone

Setting up a docking zone is simple. The user just creates a zone by place 4 beacon is a square on the same plane. The 4 beacons define the area in which a ship must fly in order to be considered inside a safe docking zone. The zone projects on the Z axis by the shortest distance between the two other axis. For example, if you make a zone that is 10x8, then the full cube dimension will be 10x8x8. A zone is defined by naming all 4 beacons with the same name. The beacons may be disabled as well, but must be 100% built.

Docking command

Advanced Grid Scan

We have added an advanced grid scanning function. This obsoletes the /admin scan cleanup, and replaces it with a more sane version of that. The commands are:

/admin scan grids /admin delete grids (uses the results from scan and just applies a delete)

If you run the scan by itself, it returns all ships. You then apply filters to the scan to weed out ships until you get a list of ships you want.

Filters

Options

These options can have fields with spaces in it, but if there are spaces, the entire option must be enclosed in quotes, for example: "hasdisplayname:Respawn Ship:exact"

Examples

Timed Cleanup and Triggered Cleanup

You can setup timed and triggered cleanups based on the advanced grid scanning above.

Timed Cleanups

Timed cleanups occur at a timed interval. They are pretty straightforward, in that you specify a time of day, and it runs on that time.

Timed Cleanup Items Options:

Triggered Cleanups

These are cleanups that occur when a certian capacity is met. So if the ScanCommand returns a certain number of grids that's greater than the capacity set, the cleanup is triggered.

Triggered Cleanup Items Options:

Notification Items

These are items that let you give text notifications to users about pending cleanups. These occur a set time before a cleanup takes place. They will not run if the TimeBeforeCleanup is higher than the actual MinutesAfterCapacity for a triggered cleanup item.

Cleanup Notification Item Options:

Dynamic Entity Management

This option, when turned on, automatically manages entities in the world. The biggest issue with Space Engineers currently is when a dedicated server gets a lot of entities, it's UPS drops due to GameLogic. This is almost always due to having too many entities in the world. This system manages them by removing / disabling entities in the world that no one can see, or are generally doing nothing. This helps improve UPS greatly as these entities no longer get processed. The system is complex and updates to it are ongoing, but many servers now use it with great success.

Dynamic turret management is another dynamic setting that lets the server control all the turrets in the world. The server will turn off all turrets if no one is around, but if an enemy or neutral player comes close, it will turn them back on. This effectively rids the server of lag created by having active turrets always running.

All conceals and reveals are logged in your C:/path/to/instance/Logs/ directory.

Options:

Waypoint System

Waypoints are ways of placing hud markers at locations that appear for you at all time. They are personal and no one else can see them except the person who placed them. (This will expand to faction waypoints soon). Waypoints are not blocks, and you do not place them by hand, you place them via a command and use the coordinate system built into essentials (that displays at the top).

Options:

Block Enforcement

Block enforcement allows you to enforce block type counts on grids so that a user does not exceed a limit you set. If they exceed that limit, the new blocks are removed forcefully. This allow strict control of some lag inducing blocks so that users do not abuse them (for example drills, or turrets).

Options:

Block Enforcement Item

Reserved Slots

Reserved slots allows you to permanently keep server slots free for whitelisted players. For example, on a server with 30 max players, and 5 reserved slots, 25 players not in the whitelis can connect, but any after that will be rejected with a "Server is full" message (unfortunately I can't send them a custom message, so they get a stock one). Those extra 5 slots will remain available to players in the whitelist.

Miscellaneous Options

Advanced Administrator Chat Commands

We've added new administrator commands that we will expand upon slowly. They will aid in moving grids and stations around, along with trying to keep things clean.

For options, do not include braces. [] stand for required, while () stand for optional.

Scan Commands

Command Options Example
/admin scan area at [x] [y] [z] [radius] /admin scan area at 0 0 0 1000 - This will scan for all ships and stations at position 0 0 0 within 1000m of that point.
/admin scan area towards [sX] [sy] [sz] [tx] [ty] [tz] [distance] [radius] /admin scan area towards 10000 0 0 0 0 0 5000 1000 - This will scan for all ships and stations at position 5000 0 0 within a 1000m radius. It basically starts at position (10000,0,0) and moves towards (0,0,0) by 5000 meters (which is (5000,0,0)). This is useful when moving ships a certain distance in a direction, and this allows you to scan the area before moving them to ensure nothing is there.
/admin scan nobeacon (no options) /admin scan nobeacon - This command scans for ships and stations that have no beacons. This allows you to preview a list of ships before running the cleanup on it in case something is wrong.
/admin scan inactive [days] optional: [ignoreownerless] [ignorenologin] /admin scan inactive 20 - This command scans for ships with owners who haven't logged in in 20 days. If you specify the ignoreownerless option it ignores grids without owners. If you specify the ignorenologin option it ignores grids owned by players with no login information. The /admin delete inactive command works exactly as this command, so you can view what will be deleted with the scan command before commiting to a delete.
/admin scan entityid [entityid] /admin scan entityid 4384938458 - This scans for grid with the entityid of 4384938458

Move commands

Command Options Example
/admin move player position [username] [x] [y] [z] /admin move player position tyrsis 0 0 0 - This moves a player 'tyrsis' to position 0 0 0.
/admin move player to [sourceUsername] [targetUsername or targetGridname] (distance) /admin move player to tyrsis vicious 500 - This moves player 'tyrsis' near player 'vicious' within 500m. Please note that player 'tyrsis' must be in a space suit for this to work (out of cockpit).
/admin move area to position [sx] [sy] [sz] [tx] [ty] [tz] [radius] /admin move area to position 10000 10000 10000 20000 20000 20000 5000 - This would move all ships and stations that are within 5000m of (10000,10000,10000) and move them towards (20000,20000,20000) relative to where they were before they were moved in relation to the original point. So if a ship was 100m from (10000,10000,10000) they would be 100m from (20000,20000,20000) after the move.
/admin move area towards [sx] [sy] [sz] [tx] [ty] [tz] [radius] /admin move area towards 20000 0 0 0 0 0 5000 1000 - This command would move all ships within 1000m of point (20000,0,0) towards (0,0,0) and move them 5000m. So a ship at (20000,0,0) would be moved to (15000,0,0).

Delete commands

Command Options Example
/admin delete grids area [x] [y] [z] [radius] - Deletes all ships and stations in the sphere of radius at position x, y, z
/admin delete ships area [x] [y] [z] [radius] - Deletes all ships in the sphere of radius at position x, y, z
/admin delete stations area [x] [y] [z] [radius] - Deletes all stations in the sphere of radius at position x, y, z
/admin delete nobeacon (no options) /admin delete nobeacon - Deletes all ships that have no beacons. This checks to see if ships are connected via - connector, piston or rotor.
/admin delete inactive [days] optional: [ignoreownerless] [ignorenologin] /admin delete inactive 20 - This deletes all grids owned by users who have no logged in in 20 days. If you specify the "ignoreownerless" option it will not include ownerless grids. If you specify the "ignorenologin" option it will not include grids of users with no login information (for example if you don't have logs old enough for them to have logged in)

Ownership commands

Command Options Example
/admin ownership change [username] [entityId] /admin ownership change tyrsis 4949392 - This will change grid #494392 and make the owner 'tyrsis'
/admin ownership change [username] [grid name] /admin ownership change tyrsis "Voyager" - This will change the grid named "Voyager" and make the owner 'tyrsis'

Utility commands

Command Options Example
/pos (no options) /pos - This gives the user his current X, Y, Z position in the world
/timeleft (no options) /timeleft - this gives the user the amount of time remaining before the next scheduled restart
/msg [username] [message] /msg tyrsis testing a private message - This will send a private message to the user 'tyrsis' with the message 'testing a private message'. This command requires the workshop mod to function properly.
/faction [message] /faction hello everyone in my faction - This will send a private faction only message to all users in the same faction as the user sending it. This command can be shortened to /f
/utility grids list (page number) or dialog /utility grids list 1 - This lists all your grids by name and id. If you have more than 7 ships, the ships are separated into pages. Use a number after /utility grids list to list that specific page. If you do /utility grids list dialog you will get your entire grid list in a nice little dialog.
/utility export server [ship name] /utility export server My Ship - This exports the ship "My Ship" to the server. The ships are exported to an "Exports" directory in the mods directory of the server under the username of the user who exported it.
/settings getblockenforcement (index) Shows a simplified list of block enforcement rules set on the server in a dialog window. Run the command again with the number of a rule to get detailed information on it.

Waypoint commands

Command Options Example
/waypoint add "name" "text on marker" Neutral or Allied or Enemy X Y Z "group" /waypoint add MyWaypoint MyWaypoint neutral 0 0 0 - This adds a green hud marker that shows up at 0 0 0
/waypoint remove "name" /waypoint remove test - This removes the waypoint test
/waypoint list dialog /waypoint list dialog - This list all your waypoints in a dialog
/waypoint factionadd "name" "text on marker" Neutral or Allied or Enemy X Y Z "group" /waypoint factionadd MyFactionPoint MyFactionPoint allied 0 0 0 - This adds an allied hud marker that shows up at 0 0 0
/waypoint factionremove "name" Removes a faction waypoint. Please note if a leader created the waypoint, only a leader can remove the faction waypoint
/waypoint groupadd "group name" "existing waypoint" /waypoint groupadd "Asteroids" "Asteroid1" - This adds the waypoint Asteroid1 to the group Asteroids
/waypoint groupremove "existing waypoint" /waypoint groupremove Asteroid1 - This removes the waypoint Asteroid1 from the group it's in
/waypoint refresh (no options) This refreshes the waypoints in case they didn't load on login
/waypoint toggle "group" /waypoint toggle Asteroids - This turns off all waypoints in the asteroids group.

General admin commands

Command Options Example
/admin backup (no options) Forces the server to take a backup immediately if you have the feature configured.
/admin restart [minutes] Restarts the server after a given time. Note: this will simply shut down the server unless you have correctly configured automatic restarts.
/admin speed [player] [speed] /admin speed rexxar 10 - This will limit the player rexxar to 10m/s, regardless of if they are piloting a ship, sat as a passenger, walking, or using a jetpack.
/admin delete floating (no options) Deletes all floating objects in the world, including ore, components, hand tools, and backpacks.
/admin stop [all, floating, ships] Stops floating objects, ships, or both that are moving and unpiloted.
/admin notify [text color] [seconds] [message] /admin notify Red 5 "test" - This will display a notificaion above the chat area in red texts that stays for 5 seconds.
/admin version (no options) Prints a chat message with the current Essentials version.

Credits: Originally created by Tyrsis Maintained by dodexahedron and rexxar