SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Releases > Lua

Thread Tools
Utility Details »»
Version: 0.3a, by Blaze The Cat (& Knuckles) Blaze The Cat is offline
Developer Last Online: Dec 2017

Category: Version: SRB2 Rating: (1 votes - 3.40 average)
Released: 03-16-2017 Last Update: 04-01-2017 Installs: 0
Scripts Is in Beta Stage

This is Utility.

It's simply a server management tool that gives added functionality for play on your server. It's nothing absolutely huge, but it can definitely make games a little more bearable, especially unmanaged ones.

Player Commands

util <parameter> - This will list the commands and variables in Utility. If there is no parameter, it will give you a line by line list. If your parameter is "short" it will give you a short-form list. If you enter a command or a variable as the parameter, it will give you help on that command/variable.
callvote <command> [parameter] <reason> - This will allow you to call a vote to perform a specified command in the server's console. By default, you have kick, exitlevel, timelimit, pointlimit, and map. Exitlevel does not take in a [parameter] and thus it becomes a <reason> instead.
vote <yes/no> - This will let you vote on the currently started vote. There is no reverse after voting, so please be decisive.
showvotecmds - This will list the currently available commands you can call a vote for. An asterisk next to a command means anyone can start a vote for that command. Unstarred commands can only be called for by a server or admin player.
afk - This only works in Co-Op, and will set your player character into AFK mode, freezing you in place, turning you transparent, and counting you as "exiting" for purposes of level completion. It also has a split-screen counterpart, afk2
ignore <node/name> - This lets you ignore chat from a specified node or player name. This works locally to you and does not inform the other player. A dedicated server may not ignore players. If that node becomes no longer valid (i.e. the player left the game) the ignore is cleared for you.
unignore <node/name> - Works the same as ignore but in reverse, as expected.
utilversion - Shows you what version of Utility you are using.
updatename - This is a helper command for updating the dedicated server's name. Because server variables do not properly sync for whatever reason, I had to make a workaround. The name should update on its own, but this is here in the event of a problem.

Admin Commands

sayadmin <msg> - Lets you send a message that only admins can hear. This includes Terminal permissions FULLCONTROL, PLAYERMANAGE, the vanilla admin, and the host. Cool Kids Club unite.
votepermission <command> [allow/deny] - This will enable you to deny or allow certain commands from unprivileged players. Not supplying alloy/deny will show you the current setting. You may also set these permissions with their respective console variables, explained later.
silence <node/name> <seconds> - Allows you to silence a user for a specified period of time. A silenced user cannot use regular chat or team-based chat, but can still privately message other players. Other players can mitigate private messages by ignoring the offending player if they see fit.
unsilence <node/name> - The same as silence, except in reverse.
gametype <mode> - This will let you change the gametype. You will be sent to the first available map for the specified gametype. Your options are: coop, race, competition, match, teammatch, tag, hideandseek, ctf.
csay <message> - This replaces the old and no longer working csay command. It simply takes your message and performs a 5-second notice.
notice <seconds> <message> [delay] - Unlike the old behavior of the csay command, this will put screen messages in a line-up one after the other. This will send a notice for the number of seconds specified, from 1-30, using your message. If a delay is used, your notice will be delayed for that amount of time first, THEN be displayed. If you specify the number of seconds to be zero, specify a message to clear the current list of notices with <message> as the reason to do so.
changesky <node/name> - Allows you to change the current sky for everyone.
changemus <node/name> - Allows you to change the current music for everyone.

Server Commands

dediname <string> - Lets the dedicated server get a name. By default, they are named "Server" so feel free to change that if you wish. A lot better than "Player 1" I hope.

Console Variables

These are all server/admin only.

util_minvoters <1-8> Default: 2 - Lets you define the minimum amount of players needed before a vote can occur. A server or admin always bypasses this limitation.
util_votecmd_<command> <Yes/No> Default: Yes - Replace <command> with a vote command to control whether that command can be publicly controlled or not.
util_vote_time <10-300> Default: 30 - Determines how long a vote should be held up for
util_vote_delay <0-61356675> Default: 300 - This specifies the delay in which a player is able to start another vote after theirs finished, in seconds. All players join with a 30-second delay to prevent rejoin-voting.
util_vote_specvote <Yes/No> Default: Yes - This specifies if spectators count as voters or not. Set this to no if you don't want spectators calling votes or participating in votes. Admins and the server can always call a vote, but cannot participate in a vote of this rule is in place.
util_coop_exittime <0-30> Default: 0 - This allows you to set a time limit until which the level is auto-exited, in minutes. Applies to Co-Op only. An indicator will show at the bottom of the screen once one minute remains. Changing this limit is not retroactive; setting this to 5 minutes after 6 minutes have passed will not end the level.
util_spam_time <0-30> Default: 3 AND util_spam_num <0-30> Default: 5 - These two are partner variables that determine the time frame and number of messages to check, respectively. If the player speaks a certain number of messages in shorter than the specified time, the player gets a 60-second silence. The server is not accounted for in spam prevention.
util_spam_repeats <Yes/No> Default: Yes - When enabled, this will prevent players from saying the same message repeatedly.

Other Notes

Chat is slightly revamped. It should be much easier to see team chat, and far easier to differentiate private messages. The /me chat macro works anywhere now except csay and notice. Unfortunately, csay got broken in the process, so I made a notice command to replace it. The csay is replaced for legacy reasons, simply performing a 5-second notice.
If Terminal is added with this Lua, it will see it and use its symbol system. In addition, players with PLAYERMANAGE and FULLCONTROL permissions (@ or higher) can use all admin-only commands as well, alongside the vanilla admin. No need to use the do command.
You don't need quotation marks for messages since it will concatenate all your arguments for you. This excludes notice, as it has an argument that follows.

If you're looking for cheats, sorry. Utility will never contain any form of Terminal-style cheating.

Anyway, here's hoping you enjoy it. Special thanks to all who helped test this.

Supporters and Co-Authors section is for people who have at least helped in various ways;
  • Kitoko - Script co-author.
  • NotablyPrettyCrazy - Helped a lot with script crash-testing.
  • RedEnchilada - For borrowing the GetSymbol function from Terminal because it's not defined in the global table.
  • SpectrumUK - Also helps with testing by hosting the script and reporting problems.

Download Now

File Type: lua utility-v0.3b.lua (66.8 KB, 410 views)

Supporters / CoAuthors

Show Your Support

  • This addon may not be copied, reproduced or published elsewhere without the author's permission.

Old 05-05-2017   #2
Prime 2.0
Grape flavored
Prime 2.0's Avatar

Welcome to Releases!
Science tells us that nothing can be proven, only rendered more likely to be true. If we do not question what we already know, how can we know, much less admit, when we're wrong? Such things are vital to progress.
Prime 2.0 is online now   Reply With Quote
Old 05-05-2017   #3
GreenKnight9000's Avatar

This looks awesome! definitely using this when I (EVENTUALLY) get a server running!
GreenKnight9000 is online now   Reply With Quote
Old 05-05-2017   #4
The one and only!
MK.exe's Avatar

Nice it got released! will be much more helpful when hosting
Considered Milestones:
Hit a 180 Rail shot
1st person to have a map in releases with Slopes
MK.exe is offline   Reply With Quote
Old 05-14-2017   #5
Blaze The Cat
& Knuckles
Blaze The Cat's Avatar

0.3a is ready.

  • sayadmin - Messages only Terminal @s, Terminal &s, the vanilla admin, and the vanilla server can read.
  • changemus - Change the music for everyone
  • chanesky - Change the sky for everyone.
  • Support for Terminal @ and higher to be able to use admin commands.

  • The command dediname used to not properly update. Now it does.
  • Name fixes for various commands and strings. (Especially command usage)
  • A few other minor tweaks and spelling fixes.

  • Precious hours of sleep.

Last edited by Blaze The Cat; 05-14-2017 at 07:33 AM.
Blaze The Cat is offline   Reply With Quote
Old 05-19-2017   #6
Blaze The Cat
& Knuckles
Blaze The Cat's Avatar

0.3b is ready.

  • Spam prevention! Variables related to it are under util_spam_*. Check help for more information. This includes a 60-second silence to line spam and repetitive message prevention. The host is an exception.
  • macrolist command. - Lists the currently available chat macros. Speaking of macros.
  • There are new macros. $roll will produce a number from 1-100, $coin will flip a coin, $lives will print out your lives count. Oh, and there's also colors too now using /c[letter]. Check the macro list for them.
  • util_vote_specvote will allow you to control whether spectators can vote or not. It will also stop them from calling a vote. Admins may call a vote anytime, however.

  • Warning messages when a command is executed before the Utility-based player variables are ready.
  • Voting correctly checks if there are no players eligible to vote.
  • Dediname properly displays in the help menu.
  • The $time macro properly displays the time now.
  • A few fixes for Terminal admins not able to do things, including the ability to call a vote.
  • A few other minor errors.
  • A few help texts and unnecessary command additions.

  • Silences can now be given a reason. Check the top post for syntax.
  • Vote permission variables were moved to util_votecmd_* to make them no longer obfuscated from the other vote parameters, which are now under util_vote_*.
Blaze The Cat is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:06 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.