Configuration (Server-Side Internals)
Several core behaviors of DataReplicator are controlled by constants at the top of the Core.lua (server-side) script. While the default values are balanced for general use, you can fine-tune them to match the specific needs of your game.
RATE_LIMIT_BUCKET_CAPACITY(number, default:100)The maximum number of requests a player's "token bucket" can hold. This determines the size of a legitimate "burst" of requests a client can make before being limited. Higher values are more forgiving to short, intense bursts of activity.
RATE_LIMIT_TOKEN_REFILL_RATE(number, default:2.5)The number of tokens added back to a player's bucket per second. This determines the sustained, long-term request rate a player can maintain.
REPUTATION_UNREGISTERED_KEY_PENALTY(number, default:5)The penalty score added when a client requests a key that has never been registered with
:RegisterKey()or:Create(). This is a strong indicator of malicious probing by an exploiter.REPUTATION_UNAUTHORIZED_PENALTY(number, default:25)The penalty score added when a client's request is denied by the
:SetAuthorizationCallback(). This is an even stronger indicator of malicious behavior.REPUTATION_SUSPICIOUS_THRESHOLD(number, default:50)The penalty score at which a player is flagged as "suspicious." Once this threshold is crossed, any future rate-limiting cooldowns they receive will be significantly longer, as defined by
DYNAMIC_PENALTY_SUSPICIOUS_MULTIPLIER.REPUTATION_DECAY_RATE_PER_SECOND(number, default:0.5)The rate at which a player's penalty score decreases over time. This "forgiveness" factor ensures that a player who accidentally triggered a penalty due to a lag spike or a minor bug isn't permanently flagged.
DYNAMIC_PENALTY_COOLDOWNS(table, default:{ [1] = 5, [2] = 20, [3] = 60 })A table defining the escalating cooldown durations (in seconds) for rate-limiting offenses. The key is the offense number. The system will use the highest defined cooldown for any subsequent offenses (e.g., the 4th, 5th, etc., offense will also use the 60-second cooldown).
DYNAMIC_PENALTY_SUSPICIOUS_MULTIPLIER(number, default:3)A multiplier applied to the cooldown duration if the offending player is currently flagged as "suspicious" (i.e., their
PenaltyScoreis above theREPUTATION_SUSPICIOUS_THRESHOLD). This makes penalties for consistently badly-behaved clients much harsher.
(These values are currently internal and must be changed in the Core.lua script. A future version may expose a configuration function.)
Last updated