Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
210 lines (151 sloc) 14.5 KB

Colony Commands Mod by Scarabol/Adrenalynn

The mod is now continued by adrenalynn

Special thanks to Tjohei for most of the ideas and feature requests.

Special thanks to Crone for the chat coloring system and score system.

Anti-Grief

This mods adds an anti-griefing mechanism to the server. Regular players can't change 50 blocks around the spawn point and 50 blocks around other player banners. Both values can be adjusted. Furthermore players are auto-jailed if they kill more than 2 foreign colonists, auto-kicked if killing more than 5 and auto-banned if they kill more than 6 foreign colonists. Those values can be configured in the savegame folder, set them to 0 to disable the feature.

Players are also able to whitelist friends by writing /antigrief banner [friendly-player-name] in chat.

Last but not least players with master permission mods.scarabol.antigrief are able to define custom protected areas. Use /antigrief area 10 10 to restrict regular players from changing blocks in an area 10 blocks around your current position.

To disable anti-grief in case you play with friends only, just set the protection ranges in the protection-ranges.json file in your savegame folder to -1 each. The message on joining the server will still show up, but it has no effect then.

Activity-Tracker

This mod adds an player activity tracker. It updates a last seen timestamp for each player, on each player login, logout or world auto-save. Furthermore the total time played is tracked.

Use /lastseen [playername] to view the timestamp for a player.

Use /top time to view a top ranking with the most time played.

Announcements

This mods adds a welcome message and automatic announcements to the game. See announcements.example.json and place it in your savegame folder, like /gamedata/savegames/mysavegamename/announcements.json to activate them.

Events

This mod adds a simple event system. Players with mods.scarabol.commands.events permission can start an event with /eventstart at any position. Then all players are allowed to join using /eventjoin or leave the event with /eventleave. On join the players are warped to the event position. On leave players are warped back to their original position before the event. Same applies if an event is stopped using /eventstop. Stopping an event also requires the mods.scarabol.commands.events permission. There can only be one event at a time.

Colonists Cap

This mod can set a maximum for each players colonists number. Each colonist beyond the limit will be killed. By default the limitation is disabled.

Players with mods.scarabol.commands.colonycap permission can use /colonycap [max-number-of-colonists] [check-interval-delay] to configure a limit or /colonycap -1 to disable the limitation.

Fast Travel System

This allows all players (no permission required) to use /travel to warp themself from a start-point to the travel path end-point.

Creating travel paths requires permission mods.scarabol.commands.travelpaths

Use /travelhere to start a travel path.

Use /travethere to set the end-point of a travel path.

Whispering

Use /whisper [playername] hello friend or /w [playername] hello friend to send a chat message to a specific player instead of the complete server.

Spam-Protect

Use /mute [playername] [minutes] to block a player from EVERY chatting for certain minutes. After timeout the player is automatically unblocked or one can use /unmute [playername] to remove the blocking manually.

Muting and Unmuting players requires the mods.scarabol.commands.mute permission.

Jail System

The jail is an extension for the Anti-Grief system. Admin or staff members can throw players into jail as punishment. A jailed player can only move within the defined jail area. Should a player try to escape repeatedly his/her jail time will be automatically extended (configurable). Getting jailed is also available as punishment option for killing another player's colonists.

Use /setjail [range] to define the server jail at your current position. Parameter range determines how many blocks out the border of the jail is, the default is 5. Notice: The jail will automatically create a protection area with its range. You might want to create a larger protection area instead, depending on your actual jail build.

Use /setjail visitor to define a visitor position for people wanting to visit the jail and its inmates. This position can be outside or inside the jail, visitors are always free to move. Requires permission mods.scarabol.commands.setjailposition

Use /jail {player} [time] {reason} to send a player into jail. The default jail time is 3 minutes or you can specify the exact amount. Reason can be any text (including white spaces) but don't start it with a number (would be taken as time value instead). Requires permission mods.scarabol.commands.jail

Use /jailrelease {player} to release a player from jail for good conduct. Players will be released automatically after their time is done. Requires permission mods.scarabol.commands.jail

Visitors can use /jailvisit to visit the jail (if the visitor position was set). Visitors are completely free to move and can leave anytime. For convenience there is also /jailleave which will warp a visitor to the position where he/she used /jailvisit. Just in case they have no others means to leave. No permissions required for both commands

A jailed player can use /jailtime to check his/her remaining time in jail. Once the time is done the player will be automatically released and teleported to spawn. No permission required

Use /jailrec [player] to check the jail history records. With a player name given it will show all jail records for that player. Without player name it will show the last 10 jail actions. Requires permission mods.scarabol.commands.jail

Configurable Settings
After the first start a new file jail-config.json will be generated at the world save directory (gamedate/savegames/<worldname>).
defaultJailTime: 5 Minutes, can be adjusted to any value
graceEscapeAttempts: 3. Number of escape attempts after which additional jail time is added. Set to 0 to disable.
protection-ranges.json contains a new entry NpcKillsJailThreshold, similar to kick and ban thresholds. If unwanted, set the value higher than the kick threshold to disable jailing as punishment option.

Writing Player Names

A lot of the commands require the name of a player as target. Names of players can sometimes be hard to type due to international character sets. For all commands the name can be specified in different ways:

/command 'player name with blanks' enclose the player name with single quotes.

/command #12345678 use a 8 digit hash instead of the name. The hashes are printed out by the /online id command.

/command <steamid> if all of the above fails one can use the full steamid also

Hiding player from scoring

The /top command provides player scores (number of items, colonists, score, etc). For some servers it might be useful to hide staff from the scores. This can be done by adding the player names to the protection-ranges.json file (per world): "UnscoredPlayers" : [ "player1", "player2", "player3" ]

Production tracking

Production tracking allows to track the production of items per day or multiple days. Every day in the morning the player will receive a status messages showing the total amounts.

/production add|list|remove {item} [interval]
Use add to track production for a item, the interval defaults to 1 day but you can also request a multiple day interval
Use list to show all tracked items and remove to stop tracking for an item.

Further Commands

/help
Requires no permission. Shows a list of available commands. One can add a text filter optionally to search for specific commands, like /help jail, for example.
The other variant of this command is /help admin which list all admin commands. Permission mods.scarabol.commands.adminhelp is required for that.
/bannername
Requires no permission
Tells you the name of the owner of the closest banner.
/online
Requires no permission
Lists all online player names.
/online id lists the players including a 8 digit hash which can be used instead of the player name for all commands
/top [score|food|colonists|time|itemtypename]
Requires no permission
Shows a top 10 ranking for the given category or item type
/serverpop
Requires no permission
Shows current server population.
/stuck
Requires no permission
If you don't move for 1 minute, you're warped back to spawn.
/itemid
Requires no permission
Prints all items and their key currently stored in the players inventory. Useful for trade and trash.
/trade [playername] [itemname] [amount]
Requires no permission
Transfers the given amount of items from your stockpile to the other players stockpile.
Example: /trade MyFriend planks 100
/trash [itemname] [amount]
Requires no permission
Deletes number of items from your stockpile and inventory.
/warp [targetplayername]
Requires permission: mods.scarabol.commands.warp.self
Warps to the given playernames position.
/warp [targetplayername] [teleportplayername]
Requires permission: mods.scarabol.commands.warp.player
Warps the second given player to the first given playernames position.
/warpbanner [targetplayername] [teleportplayername]
Requires permission: mods.scarabol.commands.warp.banner
Warps to the first given playernames banner position. If two names are provided, the second player is warped to the firsts banner position.
/warpspawn
Requires permission: mods.scarabol.commands.warp.spawn.self
Warps the calling player to the spawn point.
/warpspawn [teleportplayername]
Requires permission: mods.scarabol.commands.warp.spawn
Warps the given player to the spawn point. If no playername is provided, warps the calling player.
/warpplace [x] [y] [z]
Requires permission: mods.scarabol.commands.warp.place
Warps the calling player to the given position.
/god
Requires permission: mods.scarabol.commands.god
Grants or revokes the calling players super permission. This is handy for admins, who want to try a regular peasants gaming experience.
/ban [playername]
Requires permission: mods.scarabol.commands.ban
Adds a player to the blacklist and kicks him.
/kick [playername]
Requires permission: mods.scarabol.commands.kick
Kicks a player from the server.
/drain
Requires permission: mods.scarabol.commands.drain
Drys out a small lake or puddle with up to 5k blocks.
/cleanbanners
Requires permission: mods.scarabol.commands.cleanbanners
Removes all banners from banner-tracker, which have no banner block in the world. Useful after server crashes.
/killplayer [playername]
Requires permission: mods.scarabol.commands.killplayer
Kills the player with the given playername.
To allow players killing themselfes permission mods.scarabol.commands.killplayer.self can be given.
/killnpcs [playername]
Requires permission: mods.scarabol.commands.killnpcs
Kills all npcs of the given playername. Useful to reduce lag on crowded servers.
To allow players killing their own colonists permission mods.scarabol.commands.killnpcs.self can be given.
/inactive [days]
Requires permission: mods.scarabol.commands.inactive
Lists all players, who have not logged in or out since the last number of days.
/purgeall [days]
Requires permission: mods.scarabol.commands.purgeall
Kills all NPCs and removes banner for each player, who has not logged in or out since the last number of days.
/trashplayer [playername] [itemname] [amount]
Requires permission: mods.scarabol.commands.trashplayer
Removes the given amount and type of items from the given players stockpile and inventory. The playername and itemname can be set to 'all', which is also the default value for amount.
Note: For safety reasons you can't use /trashplayer all all all
/areashow
Checks if the player is inside a custom protection area and will print its coordinates. If not inside an area it will print the closest area nearby instead
/deletejobs [playername]
Requires permission: mods.scarabol.commands.deletejobs
Deletes all jobs for the given player. Blocks will not be refunded. All jobs will be deleted in the background, for large numbers of jobs the command will take a while. If the Banner is already removed the player needs to stay in the area, otherwise the chunks will get unloaded and jobs can no longer be deleted. The command will send an error message if that happens and can be started again.
To allow players deleting their own jobs the permission mods.scarabol.commands.deletejobs.self can be given.
/deletejobspeed [blocks]
Requires permission: mods.scarabol.commands.deletespeedjobs
Per default /deletejobs will delete up to 4 blocks per second. With this command the deletion speed can be adjusted. 8 or maybe even 16 blocks per second can work, depending on server hardware. Larger values will most likely not increase the effective speed anymore.
/spawnnpc {number}
Requires permission: mods.scarabol.commands.npcandbeds
Spawn given number of colonists. Intended for admin/test use, spawning will not cost food and no beds required.
/beds {number}
Requires permission: mods.scarabol.commands.npcandbeds
Create given number of beds around your banner. Intended for admin/test use, beds will be placed in a rectangular spiral form around your banner

Installation

This mod must be installed on the server!

  • download a (compatible) release or build from source code
  • place the unzipped folder inside your ColonySurvival/gamedata/mods/ directory, like ColonySurvival/gamedata/mods/adrenalynn/ColonyCommandsMod

Pull requests welcome!

You can’t perform that action at this time.