Configuration
Theme the pack and tune every game's difficulty.
Theme the pack and tune every game's difficulty.
You edit two files:
config.lua — difficulty (server-side, the source of truth). Every result is re-checked here.config.js — theme (visual only). No build, read live; restart the resource after a change.Difficulty lives in config.lua on purpose. The server generates and validates each
challenge, so the interface can never grant a success on its own.
config.jswindow.CONFIG = {
theme: {
primaryColor: "#148CE1",
},
};theme.primaryColorstringoptionalMain accent color used across every game (highlights, active states, progress). Any hex value. Default #148CE1.
config.luaConfig.defaultDifficulty = 'medium'
Config.difficulty = {
wires = {
easy = { wireCount = 3, duration = 15000 },
medium = { wireCount = 4, duration = 12000 },
hard = { wireCount = 5, duration = 10000 },
},
pattern = {
easy = { gridSize = 5, staticCount = 3, noiseSpeed = 300, duration = 15000 },
medium = { gridSize = 6, staticCount = 4, noiseSpeed = 200, duration = 12000 },
hard = { gridSize = 6, staticCount = 5, noiseSpeed = 120, duration = 10000 },
},
sequence = {
easy = { length = 4, duration = 15000 },
medium = { length = 5, duration = 12000 },
hard = { length = 7, duration = 10000 },
},
lockpick = {
easy = { tolerance = 14, duration = 15000 },
medium = { tolerance = 10, duration = 12000 },
hard = { tolerance = 7, duration = 10000 },
},
}Config.defaultDifficultystringoptionalDifficulty used when a call doesn't pass one. easy, medium or hard. Default medium.
durationnumberoptionalTime limit for the game, in milliseconds. Present on every level of every game. When it runs out, the game fails.
wires.wireCountnumberoptionalNumber of wire pairs to connect. More wires = harder.
pattern.gridSizenumberoptionalSize of the grid (e.g. 6 = 6×6).
pattern.staticCountnumberoptionalHow many cells to find and memorize in the noise.
pattern.noiseSpeednumberoptionalHow fast the background noise refreshes, in ms. Lower = more distracting.
sequence.lengthnumberoptionalNumber of steps in the sequence to repeat.
lockpick.tolerancenumberoptionalMargin around the sweet spot, in degrees. Smaller = harder.
There is also a hidden dev level per game (near-infinite timer) handy for testing —
call it with play(game, { difficulty = 'dev' }).