Skip to content
Engine

Core Concepts

Configuration

Change Engine's settings for your game with one small ModuleScript per module. How overrides merge with defaults, where to put them, what clients can see and the General settings.

How it works

Every service, system and package that has settings ships with defaults. Each reference page ends with a table of every setting, its default and what it does.

To change settings for your game, add a ModuleScript to the Configuration folder inside ServerScriptService.Engine. Name it exactly after the module and return a table with only the settings you change:

ModuleScript: Engine/Configuration/DataService
return {
	AutoSavePeriod = 120,
}

When the module loads, Engine starts from the defaults and replaces each key your table contains. Everything you leave out keeps its default, so your configuration stays small and survives every Engine update.

ServerScriptService
└── Engine
    └── Configuration
        ├── General
        ├── DataService
        ├── ModerationSystem
        └── RateLimiter

Note

The plugin keeps the Configuration folder when you update Engine or switch between automatic and manual updates. Uninstalling removes it, so save it first if you want to keep it.

Rules

  • The name must match exactly. DataService, not Data or DataService.Config. A module with an unknown name is ignored.
  • Return a table. Anything else errors when the module loads: Engine: Configuration/DataService must return a table.
  • Keys replace, they do not merge deeply. If a setting is a table, such as ModerationSystem's Roles, your value replaces the whole table. Copy the entries you want to keep.
  • Settings are read once, when the module loads. Editing a configuration module while the game runs has no effect. Some modules have properties for things you can change at runtime (for example ModerationSystem.SlowMode).
  • Folders are allowed one level deep. You can group modules in folders, such as Configuration/Services/DataService. General must be directly in Configuration.
ModuleScript: Engine/Configuration/ModerationSystem
return {
	CommandPrefix = "!",
	MinAccountAgeDays = 3,
	-- Replaces all roles: include the defaults you still want
	Roles = {
		Owner = { Rank = 1000, Permissions = { "*" } },
		Admin = { Rank = 100, Permissions = { "*" }, GroupRanks = { [1234567] = 250 } },
		Moderator = { Rank = 50, Permissions = { "Warn", "Mute", "Unmute", "Kick", "Ban", "Unban", "Lift", "Notes", "Reports", "Records", "Chat", "ChatBypass", "Commands" }, GroupRanks = { [1234567] = 200 } },
	},
}

Defaults for call parameters

Some methods take an optional parameter whose default comes from a Default<Name> setting. For example, CryptographyService's :Hash(data, algorithm?) uses DefaultHashAlgorithm when you pass no algorithm.

To force every call in your game to use the configured value, add Allow<Name>Override = false. A call that still passes the parameter then errors:

ModuleScript: Engine/Configuration/CryptographyService
return {
	DefaultHashAlgorithm = "SHA3-256",
	AllowHashAlgorithmOverride = false, -- :Hash(data, "MD5") now errors
}

This works for CryptographyService (HashAlgorithm, MacAlgorithm, Encoding, StringEncoding) and SchedulerService (Phase).

What clients can see

When the server starts, Engine copies configuration to ReplicatedStorage.Engine for the modules that also run on the client:

Copied to clientsStays on the server
GeneralServer-only services: CryptographyService, StatisticsService
Shared services, such as NetworkService and UIServiceServer-only systems: PasswordSystem
Server, Client modules: DataService, MonetizationService, EconomySystem, InventorySystem, LeaderboardSystem, ModerationSystem
Packages

Warning

Anything in a configuration module that is copied to clients can be read by exploiters. Keep secrets (webhook URLs, keys, tokens) in the configuration of server-only modules, such as StatisticsService's Webhooks and CryptographyService's keys.

General settings

General holds settings for Engine itself.

Defaults from DefaultConfiguration/General1 settings
SettingDefaultWhat it does
LogServiceLoadsfalsePrint each service's name and load time the first time GetService loads it.

With LogServiceLoads = true, Engine prints a line like Engine: service "DataService" active (loaded in 3.12ms) the first time you get each module, on the server and the client.