DUXPLIMA Documentation

Settings

The five config files, the kill switch, data modes, and the folder layout.

The config files

FileHoldsReplicated
Configuration/Shared/Settings.luauThe system switchesYes
Configuration/Shared/TrollSettings.luauThe trolls themselvesYes
Configuration/Shared/DataSettings.luauWhere player data livesYes
Configuration/Shared/MarketplaceSettings.luauPurchase handlingYes
Configuration/Server/ImmunitySettings.luauWho is untouchableNo
Configuration/Server/Hooks.luauYour codeNo
Anything secret belongs in Configuration/Server

Configuration/Shared is copied into ReplicatedStorage, so every client can read all of it. An admin list, a webhook URL or an API key placed there can be read by any player.

The two files under Configuration/Server never leave the server. That is why immunity lives there.

Settings

Enabled = true,
Debug = true,
LogPrefix = "",
Security = { MaxRequestsPerSecond = 10 },
FieldDefaultWhat it does
EnabledtrueThe kill switch
DebugtrueInformational messages in Output
LogPrefix""The tag on every log line. Empty uses the package name
MaxRequestsPerSecond10Per-player request cap

The kill switch

Enabled = false,

Nothing is installed, no remote is created, no service runs. The package sits in ServerScriptService doing nothing.

That is the switch to reach for during an incident, rather than deleting the package and losing your settings with it.

Debug

Ships as true. Turn it off before you go live: it prints informational messages for routine activity. Warnings and errors are always shown either way.

The rate limit

MaxRequestsPerSecond = 10,

Requests above this from a single client are dropped silently. It is exploit protection, not a game rule: normal play stays well below it, so lowering it is safe.

The game rule you actually want to tune is AllCooldown in Targeting and immunity.

Data

StoreName = "",
StudioMode = "Memory",
AutosaveSeconds = 180,
LockStaleSeconds = 600,
LoadAttempts = 5,

Player data here is small: purchase credits and the recent purchase ids used for duplicate protection.

FieldMeaning
StoreNameThe DataStore name. Empty derives uxrTrollSystem_Profile_v1
StudioModeWhat happens when you press Play in Studio
AutosaveSecondsHow often to save. Each save refreshes the session lock
LockStaleSecondsHow long a lock stays valid after its server dies
LoadAttemptsHow many times to try acquiring the lock

Studio modes

ModeBehaviour
"Memory"Nothing is read or written. Every test starts fresh
"Isolated"A separate DataStore named <StoreName>_Studio
"Live"The real DataStore

"Memory" is what you want while building, and it also means you do not need Studio access to API services enabled.

"Isolated" is for checking that saving and loading really work without touching a byte of live data. "Live" is for deliberately debugging one player's saved data, and nothing else.

None of the three has any effect on a published game.

Session locking

A profile is locked by the server holding it, and the lock is refreshed on every autosave. If that server crashes the lock is left behind, and after LockStaleSeconds another server may take it over.

Keep LockStaleSeconds comfortably above AutosaveSeconds. The shipped 600 against 180 gives three chances to refresh before a lock is considered stale.

Do not change StoreName after going live

You lose access to every existing profile, which here means every banked credit and the duplicate-purchase history.

The folder layout

LocationContains
ServerScriptService/uxrTrollSystemThe package. The only design-time copy
ReplicatedStorage/uxrTrollSystemThe Shared half of each folder, plus Remotes and Assets
ServerStorage/uxrTrollSystemThe server-only assets
StarterGui/uxrTrollSystemGuiThe panel

The package splits into five top-level folders:

FolderHolds
ConfigurationEverything you edit
CoreThe bootstrap, networking, logging and the API
LogicThe services: trolls, purchases and profiles
AssetsThe effect parts
InterfaceThe panel

Each of Configuration, Core and Logic has a Shared half that is replicated and a Server half that is not. That split is the whole security model: if something must stay secret, it goes in a Server folder.

Services are discovered, not listed

Every ModuleScript directly inside Logic/Server is loaded as a service, in alphabetical order, and given Init then Start.

Adding a service of your own is a matter of dropping a module in. A service that fails to load logs an error and the rest carry on.

Where to start

You wantEdit
Different trolls or damageTrollSettings.Actions
Less chaosTrollSettings.Limits.AllCooldown
To protect somebodyImmunitySettings
Different chat linesTrollSettings.Announce and the per-troll messages
To sell other products tooMarketplaceSettings.ManageProcessReceipt
To react to trollsHooks and the API
To turn everything offSettings.Enabled