Plugins/Essentials

From Torch Wiki
Revision as of 13:25, 7 November 2020 by Bishbash777 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Essentials is a plugin created by the torch team. It has a wide variety of functions. the official version can be downloaded here


Settings

Custom ranks

  • Enable custom ranks: Enable if you would like to enable the custom ranks and permissions system (Restart to take affect)
  • Default rank assignment: The name of the rank a player will automatically assigned when joining the server
  • Override Vanilla/Torch permissions: (USE WITH CARE) Allow players with a low MyPromoteLevel to use high PromoteLevel commands by adding the command to the list of allowed permissions of a specified rank
  • Maxhomes: (TO BE COMPLETE)

Client join tweaks

Warning: Turning on Client tweaks can lead to planets not loading properly for clients! Checking this box will allow you to customize the client join options below.

Pack Respawn

This will add any grids a player can respawn at to the world sent to the player, which means the player will not have to wait in the respawn screen until the grid streams in after joining the server. Enabling this will slightly increase the load of a player join and is not recommended if you use the new respawn system.

The "Pack Respawn" option is configurable by block count in the box below it, setting a maximum of blocks that can get packed into the world send.

Loading Text

This changes the text displayed in the loading screen


Override Default Toolbar

This will allow you to replace the default toolbar of new players with the one you can choose yourself using the "!admin set toolbar" command while in-game.


Compression level

This dropdown menu allows you to compress the data you send to players on join, increasing CPU usage while players join but greatly reducing network load, and letting the client join a bit faster.. It's strongly recommended to use the async join option if you set the compression level high.

NoCompression sends the data at its full size. This takes almost no time to run compression, but significantly increases network load.

Fastest is the default vanilla level. It tries to strike a good balance between final data size and CPU use.

Optimal gives you the highest possible compression ratio (smallest data size) at the cost of high CPU use. This is the default value for Essentials. It's recommended to leave this on Optimal level, and enable async join.

Async join

Checking this option will move most of the client join logic and data compression to a background thread. This reduces lag on the server. It's highly recommended to use this option if you have the compression level set high, or use the pack respawn or pack planets options.

Pack Planets

This packs planets into the world loading. Since planet data is very large, this is only recommended with optimal compression level.

Having async join enabled is also recommended when using this option.

Packing Planets will greatly decrease of loading time for large planet files when used this way and makes joining a server a lot smoother for the players

Auto Commands

Runs a pre-programmed command after a given interval of server uptime or scheduled time.

Setup

  • Name: Command name
  • Interval: The frequency the command will run at. Formatted as HH:MM:SS.
  • Add: Add auto command to list
Triggers

Basic triggers for auto commands.

  • Disabled: Disables a given command.
  • OnStart: Triggers once after start using interval duration from startup. (interval must not be 00:00:00 and must be greater than how long the server takes to fully load)
  • SimSpeed: This trigger will run immediately when SimSpeed drops below what you set in "ratio" then checks every "interval"
  • Vote: Triggered only by vote using "!vote" command
  • Timed: Triggers every X Minutes/Hours set at the "Interval" after the server comes online or after the command was created
  • Scheduled: Triggered by "Scheduled" and does a check every set "Schedule Time"
  • PlayerCount: Triggered by set number of players then checks every "Interval"
  • GridCount: Triggered by set grid number then checks every "Interval"

Schedule

Allows for commands to be run on a fixed schedule. Must use "Scheduled" as trigger.

  • Day of Week: Allows for selection of each day of the week and "All". Does not currently allow for multiple selections.
  • Scheduled Time: The time the auto command will run. Formatted as HH:MM:SS, in 24 hour time "13:00:00" for 1 pm. Time is based on server time. Note: must be set to 00:00:00 for interval-based commands.

Operators/Compare

Operators for auto commands

  • LessThan, Equals, and GreaterThan are use with the triggers; "SimSpeed", "PlayerCount" and "GridCount"

Ratio/Count

  • TriggerCount: used with the triggers; "PlayerCount" and "GridCount"
  • TriggerRatio: used with the the triggers; "Vote" and "SimSpeed". 0.1 = 10% and 1 = 100%

Steps

Pulls up a list of current steps in the collection. Steps can be edited by clicking on them, removed or new steps added. Note, steps must be written in order of operation and can not be reordered.

  • Command: The command to be run. Use torch commands with the same syntax as if they are run within the game. !notify "Restart in 1 minutes" 10000
  • Delay: The delay AFTER the current step and before the next step will run. Formatted as HH:MM:SS.
  • Add: Adds step to collection list.
  • Remove: Removes selected step.


Essentials.cfg

If you have a hosted server without access to the GUI, you can add Auto Commands to your Essentials.Cfg. However, as with all Torch configurations, you should only edit the configuration files as a last resort.

The following code with need to be placed within the <AutoCommands> section of the Essentials.cfg.

  1. <AutoCommands> Denotes the start the Auto Command section. This MUST be ahead of all following code.
  2. <AutoCommand> Denotes the start of a new command.
  3. <CommandTrigger>Trigger</CommandTrigger> Use this to set the trigger for the command.
  4. <Compare>LessThan</Compare> Set this operator to your preference for the triggers that supports it.
  5. <Name>Restart</Name> Name of the auto command.
  6. <ScheduledTime>00:00:00</ScheduledTime> The time the auto command will run. Formatted as HH:MM:SS, in 24 hour time "13:00:00" for 1 pm. Time is based on server time. Note: must be set to 00:00:00 for interval-based commands.
  7. <Interval>04:00:00</Interval> The frequency the command will run at. Formatted as HH:MM:SS.
  8. <DayOfWeek>All</DayOfWeek> Allows for selection of each day of the week and "All". Does not currently allow for multiple days of week.
  9. <Steps> Denotes the start of the command steps sections.
  10. <CommandStep> Donotes the start of a new step.
  11. <Delay>00:05:00</Delay> The delay AFTER the current step and before the next step will run. Formatted as HH:MM:SS.
  12. <Command>!notify "Restart in 15 minutes!" 30000</Command> The command to be run. Use torch commands with the same syntax as if they are run within the game.
  13. </CommandStep> Denotes the end of a step. Addtional steps can be added below by repeating code 9-12 below.
  14. </Steps> Denotes the end of the command steps sections.
  15. </AutoCommand> Denotes the end of a the command. Addtional commands can be added by repeating code 2-14 below.
  16. </AutoCommands> Denotes the end the Auto Command section. This MUST be below of all prociding code.

Below is an example of a restart that takes every 4 hours, with notifications every 5 minutes starting 15 minutes prior and clean up commands.

 <AutoCommands>
   <AutoCommand>
     <CommandTrigger>Timed</CommandTrigger>
     <Name>Restart</Name>
     <ScheduledTime>00:00:00</ScheduledTime>
     <Interval>04:00:00</Interval>
     <DayOfWeek>All</DayOfWeek>
     <Steps>
       <CommandStep>
         <Delay>00:05:00</Delay>
         <Command>!notify "********Restart in 15 Minutes!********" 30000</Command>
       </CommandStep>
       <CommandStep>
         <Delay>00:05:00</Delay>
         <Command>!notify "********Restart in 10 Minutes!********" 30000</Command>
       </CommandStep>
       <CommandStep>
         <Delay>00:05:00</Delay>
         <Command>!notify "********Restart in 5 Minutes!********" 30000</Command>
       </CommandStep>
       <CommandStep>
         <Delay>00:00:30</Delay>
         <Command>!notify "********Restart in 1 Minute!********" 30000</Command>
       </CommandStep>
       <CommandStep>
         <Delay>00:00:30</Delay>
         <Command>!save</Command>
       </CommandStep>
       <CommandStep>
         <Delay>00:00:00</Delay>
         <Command>!restart 30</Command>
       </CommandStep>
       <CommandStep>
         <Delay>00:00:00</Delay>
      </CommandStep>
     </Steps>
   </AutoCommand>
 </AutoCommands>

Essentials Chat Commands

Player Commands

Command Description Usage
entities refresh Resyncs all entities for the player running the command !entities refresh
motd Show the server's Message of the Day !motd
vote Starts a vote for a command !vote <String name>
vote cancel Cancels current vote in progress !vote cancel
grids list Lists all grids you own at least 50% of Will give you positions if the server admin enables the option !grids list
whisper Send a private message to another player !w <String playername>
no Cancel your casted vote !no
yes Submit a yes vote !yes

Admin Commands

Command Description Usage Example
entities stop Stops an entity from moving !entities stop <String entityName> !entities stop "That Ship"
entities delete Delete an entity !entities delete <String entityName> !entities delete "That Ship"
entities kill Kill a player !entities kill <String name> !entities kill "John Doe"
entities find Find entities with the given text in their name !entities find <String name> !entities find miner
entities poweroff Power off entities with the given text in their name !entities poweroff <String name> !entities power off miner
entities poweron Power on entities with the given text in their name !entities poweron <String name> !entities power on miner
entities eject Ejects a specific player from any block they are seated in, or all players in the server if run with 'all' !entities eject <String player> !entities eject "John Doe"
grids setowner Sets owner of specified grid !grids setowner <String gridName> <String playerName> !grid setowner "That Ship" "John Doe"
grids static large Makes all large grids static !grids static large !grids static large
grids stopall Stops all moving grids !grids stopall !grids stopall
grids export Export the given grid to the given file name in the form of a raw grid object builder !grids export <String gridName> <String exportName> !grids export "Miner" "Little Miner Mk1"
grids import Import a grid from file and spawn it by the given entity/player !grids import <String gridName> [String targetName] !grids export "Little Miner Mk 1" "John Doe"
say Say a message as the server !say <String message> !say "Don't let Cyberhounds get you Cyberdown!"
teleport Teleport one entity to another !tp <String entityToMove> <String destination> !tp "John Doe" "That Ship"
teleport to Teleport directly to an another entity !tpto <String destination> !tpto "That Ship"
kick Kick a player from the game !kick <String playerName> !kick "John Doe" or !kick 1234567891011
ban Ban a player from the game !ban <String nameOrSteamId> !ban "John Doe" or !ban 1234567891011
unban Unban a player from the game !unban <String nameOrSteamId> !unban "John Doe" or !unban 1234567891011
vote debug Prints out info from the voting module !vote debug !vote debug
vote reset Resets the voting module data including cooldowns !vote reset !vote reset
admin stats Get performance statistics of the server !admin stats !admin stats
admin playercount Gets or sets the max number of players on the server !admin playercount [Int32 count] !admin playercount [Int32 count]
admin playerlist Lists current players on the server !admin playerlist !admin playerlist
admin runauto Runs the auto command with the given name immediately !admin runauto <String name> !admin runauto rulemessages
admin set toolbar Makes your current toolbar the new default toolbar for new players !admin set toolbar !admin set toolbar
admin setrank Set the promote level of a player. Ranks are: None, Scripter, Moderator, Space Master, Admin !admin setrank <String playerNameOrId> <String rank> !admin setrank "John Doe" Admin
admin reserve Add a player to the reserved slots list !admin reserve <String playerNameOrId> !admin reserve "John Doe"
admin unreserve Remove a player from the reserved slots list !admin unreserve <String playerNameOrId> !admin unreserve "John Doe"
admin mute Mutes a user in global chat for the given number of minutes !admin mute <String user> [Int32 timeout] !admin mute "John Doe" 200
admin unmute Removes a chat mute from a user, if they have been muted !admin unmute <String user> !admin unmute "John Doe" 200
admin list mute Lists all muted users, an their timeout, if applciable !admin list mute !admin list mute
admin give Insert an item with a specific quanity into a players inventory !admin give <String Playername> <String type> <String subtype> <Int32 count> !admin give "John Doe" PhysicalGunObject AngleGrinder4Item 1
blocks on type Turn on all blocks of the given type !blocks on type <String type> !blocks on type Refinery
blocks off type Turn off all blocks of the given type !blocks off type <String type> !blocks off type Refinery
blocks remove type Remove all blocks of the given type !blocks remove type <String type> !blocks remove type Refinery
blocks on subtype Turn on all blocks of the given subtype !blocks on subtype <String subtype> !blocks on subtype <String subtype>
blocks off subtype Turn off all blocks of the given subtype !blocks off subtype <String subtype> !blocks off subtype BasicRefinery
blocks remove subtype Remove all blocks of the given subtype !blocks remove subtype <String subtype> !blocks remove subtype BasicRefinery
blocks on general Turn on all blocks of the specified category !blocks on general <String category> !blocks on general "Block Weapons"
blocks off general Turn on all blocks of the specified category !blocks off general <String category> !blocks off general "Block Weapons"
cleanup scan Find grids matching the given conditions !cleanup scan !cleanup scan hastype Beacon
cleanup list Lists grids matching the given conditions !cleanup list !cleanup list hastype Beacon
cleanup delete Delete grids matching the given conditions !cleanup delete !cleanup delete name "NPC"
cleanup delete floatingobjects Deletes floating objects !cleanup delete floatingobjects !cleanup delete floatingobjects
cleanup help Lists all cleanup conditions !cleanup help !cleanup help
voxels reset all Resets all voxel maps !voxels reset all [Boolean deleteStorage] !voxels reset all true
voxels reset planets Resets all planets !voxels reset planets !voxels reset planets
voxels reset planet Resets the planet with a given name !voxels reset planet <String planetName> !voxels reset planet EarthLike429013
voxels cleanup asteroids Resets all asteroids that don't have a grid or player nearby !voxels cleanup asteroids [Boolean deleteStorage] !voxels cleanup asteroids true
voxels cleanup distant Resets all asteroids that don't have a grid or player inside the specified radius !voxels cleanup distant [Double distance] [Boolean deleteStorage] !voxels cleanup distant 500 true
identity clean Remove identities that have not logged on in X days !identity clean <Int32 days> !identity clean 15
identity purge Remove identities AND the grids they own if they have not logged on in X days !identity purge <Int32 days> !identity purge 15
faction clean Removes factions with fewer than the given number of players !faction clean [Int32 memberCount] !faction clean 1
faction remove Removes faction by tag name !faction remove <String tag> !faction remove NPD
faction info Lists members of all factions !faction info !faction info
sandbox clean Cleans up junk data from the sandbox file !sandbox clean !sandbox clean
pr createrank Create new rank object with default data !pr createrank <string rankName> !pr createrank "Moderator"
pr delrank Delete existing rank object !pr delrank <string rankName> !pr delrank "Moderator"
pr setrank Set a players rank level !pr setrank <string playerName, string rankName> !pr setrank "Bishbash777" "Moderator"
pr addinheritance Make a rank inherit other custom ranks permissions !pr addinheritance <string rankName, string inheritanceName> !pr addinheritance "Admin" "Moderator"
pr delinheritance Remove inherited custom rank from main rank !pr delinheritance <string rankName, string inheritanceName> !pr delinheritance "Admin" "Moderator"
pr renamerank Rename existing rank !pr renamerank <string oldName, string newName> !pr renamerank "Moderator" "Helper"
pr setdefaultrank Sets default rank for all new players !pr setdefaultrank <string rankName> !pr setdefaultrank "Player"
pr addperm Allows access to specified command for named rank (Adds !restart to explicity allowed commands... adding a '-' infront of restart will remove it from the explicitly allowed list) - see example !pr addperm <string rankName, string command> !pr addperm "Moderator" "restart" / !pr addperm "Moderator" "-restart"
pr delperm Revokes accesss to specified command for named rank (Adds !restart to explicity blocked commands... adding a '-' infront of restart will remove it from the explicitly blocked list) - see example !pr delperm <string rankName, string command> !pr delperm "Moderator" "stop" / !pr addperm "Moderator" "-stop"
pr addplayerperm Allows access to specified command for named player (Adds !restart to explicity allowed commands... adding a '-' infront of restart will remove it from the explicitly allowed list) - see example !pr addplayerperm <string playernameName, string command> !pr addplayerperm "Bishbash777" "eco give" / !pr addperm "Bishbash777" "-eco give"
pr delplayerperm Revokes accesss to specified command for named player (Adds !restart to explicity blocked commands... adding a '-' infront of restart will remove it from the explicitly blocked list) - see example !pr delplayerperm <string playernameName, string command> !pr delplayerperm "Bishbash777" "eco give" / !pr delplayerperm "Bishbash777" "-eco give"
pr listranks List all valid and loaded ranks !pr listranks !pr listranks