Version 1.75 is now released. This update includes some major performance optimizations and a couple security fixes, as well as a couple new features and many improvements. But in the name of compatibility, this could seriously break with plugins you may have installed. Read the changes section for more details.
Additions
-
BaseAdmin themes can now be loaded directly through the loader instead of having to create your own FeatureModule to inject them or fork the module.
-
‘chatmute’ command. This command is infinitely more secure than the legacy mute and unmute commands. It only functions with the new TextChatService.
-
New “Modern” theme.
use the command “theme Modern” to use it.
Fixes
It’s been a while, but I haven’t fixed very many things, mostly because last version was a stable release. If there’s an issue, inform me by replying, and I’ll have it fixed.
-
A side effect of the new environment update removes the GuiService environment finder. This allows it to be used in many more contexts and fixes existing issues with existing contexts.
-
Fixed genericListForInstances.
-
Fixed a bug where the errors would be suppressed without reason when running a command. This was due to the tasks update not having the correct time fallback.
Changes (read if you experience compatibility issues, mind the wall of text)
IMPORTANT:
BaseAdmin no longer uses the legacy getfenv
function for its internals. This change provides benefits to BaseAdmin’s optimizations but may also seriously impact compatibility. Here’s what’s changed:
New “environment” variable. You can access most of the stuff you could using getfenv
from anywhere without having to specify a level.
The new plugin template no longer requires init
to be called before accessing the plugin. It returns the data
table, which contains init
as a function. Don’t worry, init
will certainly be called before the plugin is used.
How to identify the version of your plugin template, and what to change
There are three plugin template versions. I call them legacy, ENV, and new.
Here’s what legacy looks like:
As you can see, it returns ‘data’. But it also does not have an init function. This form of plugin template is NO LONGER SUPPORTED! I don’t expect any of you to be using this version. If you are, you can use the loadversion command to load AdminSuite version 1.48 or 1.37. There are two variants to this plugin version, but the 2nd one broke long ago (and was used in a beta of 1.37 but made its way to the example in the loader).
Here’s what the ENV plugin template looks like:
The ENV plugin template returns an
init
function to obtain the environment, and then returns data
. This plugin template is deprecated, but it still works for the time being. Chances are you have this plugin template installed, so you will need to upgrade it.
New plugin template:
The new template will return data
AND have an init
function. templateVersion
is for future compatibility but is not required. You only need to modify one variable in the plugin essentials.
To migrate your ENV plugin, you will need to change the bottom init
section from this:
function init()
env = getfenv(2)
return data
end
return init
to this:
function data.init(newEnv)
env = newEnv
end
data.templateVersion = 1
return data
After you’ve replaced the ENV plugin with the new template, you should be good to go. Keep in mind that there’s certain variables that the new environment might not yet support, so keep reading for more information about compatibility.
Features and services now use the new environment. This includes the features loader, and all built in services. External features should not be affected by this change as the environment is passed as a parameter instead of relying on an initialization function, so the feature should see no difference.
The new environment does not have as many variables as the old one.
This is going to be the thing that keeps you up at 3 AM if you have an old plugin or feature. I’ll simplify this for you.
Variables the old environment has:
doEverything
getCommandRank
getFastCommandRank
Cdisplay
ModulesHandler
commandcheck
getMessage
getPlayers
CdisplayNotification
CdisplayHint
isRankHigher
preventJoin
var
notifyplayersystemmessage
script
getCommand
muteUnmute
t
isVip
CdisplayMessage
init
useCommand
purchase
getFilteredMessage
rankAllowed
getPlayerRun
isRankAllowed
http
Variables the new environment has:
getFilteredMessage
getFastCommandRank
Cdisplay
notifyplayersystemmessage
var
CdisplayNotification
CdisplayHint
isRankHigher
script
ModulesHandler
rankAllowed
t
isVip
getPlayerRun
getCommand
useCommand
purchase
getMessage
getCommandRank
CdisplayMessage
isRankAllowed
getPlayers
preventJoin
Some of the globals (such as SERVERPLAYER
) were never meant to be accessed directly through env
. They were always in var
, which is a store for variables and functions inside the MainModule. Some functions like commandcheck
are deprecated since version 1.65 and used internally. Others like init
are internal functions used by BasicCommands and running them elsewhere might break the system or duplicate it. Don’t worry about those.
If you find that your plugin needs something on the new environment that isn’t here, please reply to this post and I’ll add it. I do not want to clutter the environment with unnecessary material.
Services compatibility
Services are a similar story to plugins, but less complex. At the moment, services are treated identically, but this is subject to change.
The ModulesHandler service detects if the service is compatible with the new environment via the nonlgcy
variable in each service. Regardless, they are currently treated the same. If your service runs into issues that cannot be solved by adding something to the new environment, please tell me and I’ll add a compatibility layer for this variable.
Version 1.48 (ENV commands beta) loaded with the ‘loadversion’ command does not have the new environment update applied for compatibility reasons.
Improvements:
-
GamePIN is more secure (security patch 9) and can run when the game starts. More details in the loader update. GamePIN now has new command ‘eplock’ that will enforce the PIN on the existing players. It also has the ‘getpin’ command that can be used to obtain the current PIN.
-
Removed legacy datastore bloat in the MainModule. This speeds up loading time by a little bit.
-
The “GuiSystemAdder” module will add the systems to new themes in real time. Don’t rely on this too much, as I’m planning to update the GUIs in the future to automatically add these instances when they’re actually used to conserve memory.
-
The command bar, which was untouched since version 1.71 (almost a year ago), now has new optimizations. Firstly, it now uses
task.wait
instead ofwait
, so it should feel more responsive. Secondly, the remote event is now stored in ReplicatedStorage under the name “BaseAdminCommandBarSendRemote” (very catchy) so there is no longer a remote for each player. -
“version” init module now has an internal variable that determines if it should output the release in the beta “roadmap” format or the normal format. This is a simple change that only benefits me, who updates this module and adds beta version formatting to the version.
-
Miscellaneous optimizations in the MainModule.
-
notifyplayersystemmessage
will nowprint
the message if it detects the user is SERVERPLAYER (7) or RESERVEDPLAYER (5.5). -
Changed more of the
wait
s totask.wait
in older commands, modules, and GUI scripts. -
Some commands that teleported the player to some random places were affected by a change (the place was moderated). I changed the teleport ID of that place to one that isn’t deleted.
-
The welcome message is friendlier.
-
Updated ‘hover’ GUI script. It is now more fluid and is framerate independent.
Changes
-
init modules now have a third argument. The third argument is the new environment.
-
Entirely removed obsolete ‘flush’ command.
-
Entirely removed legacy ‘spazzy’ command.
-
GuiService will now position the windows in a random variation.
Loader updates:
New version: 0.79. The last version was version 0.782, which was released over a year ago.
About GamePIN
In the startup section, you can add these commands to automate GamePIN:
config.Startup = {
--Add commands for when the game starts. FINALLY released in BaseAdmin v1.49
--do not add prefixes
PlayerJoin = {
--You can add commands you would like to run automatically when the player joins.
--Use %s for the player's name, example: pm %s hello
},
ServerStart = {
--You can add commands here that you would like to run when the server starts.
'setrandompin',
'splock true',
'eplock'
}
}
This example uses GamePIN to set a random PIN, lock the game, and enforce the PIN on all players currently in the server.
Advanced section finally released in new versions! You can add your own themes too!
The advanced section currently controls very little settings at the moment. This is what we currently have:
config.advanced = {
tasks = {
CommandTasksMax = 20
},
UI = {
ErrorTweenTime = 3,
DefaultTheme = "Example",
ForceTheme = true
}
}
Note: some of the settings are NOT the defaults. If you want the default, make it nil or comment it out like always.
“DefaultTheme” corresponds to a theme in the extThemes folder. You can add your own if you want. Enabling this will make the default BaseAdmin GuiService theme the value.
“ForceTheme”, when enabled, will not allow the user to use any theme other than the default.
I’ve added a template for new themes in a folder called “extThemes”. Documentation inside the loader was improved.
Known issues:
The error notification sometimes makes duplicates of itself.
Clearing up some old claims I've made
There was no wizard created, it was just the deleteuserdata command.
SafeServer is deprecated and will be revamped in a future version. It’s an anti-exploit that prevents instance-based attacks but can easily be bypassed. It was designed to prevent one single physics exploit on the client. It stopped working about two years ago and has not been touched since.
This was an issue with studio.
You can now do this by using env.ModulesHandler
directly!
This has been reverted back since then and I’ve not told you guys! Not only did this double the memory used by commands, but it was also not providing very necessary security benefits, if any. The only use case for this is if you’re installing hundreds of thousands of plugins that you cannot verify the security of.
You should still use useCommand
. It is a wrapper for running commands that also detects if the user has a sufficient rank. It will return the string “restricted” if the command cannot run because of permission issues.
Do not hesitate to ask a question if you’re confused, no matter how small. Suggestions are also welcome!
As always, please report any issues you encounter due to this update (I usually don’t test every single feature included in BaseAdmin). If you really need an older version of BaseAdmin to keep your game functioning, I’ll be able to provide it here, when asked.
Edit 9/27/2023: Features such as BaseAdminSafeServer and BaseAdminIntegratedSSecurity are officially deprecated as of version 1.73. Forgot to clarify this in the update post. These features will be removed soon after a few subsequent releases. Nobody should be using these features anyways as they are disabled by default.