DUXPLIMA Documentation

Stats and leaderboards

The six tracked stats, the payout rules, and the in-world boards.

The six stats

Leaderstats = {
    Enabled = true,
    Wins = "Wins",
    Losses = "Losses",
    GamesPlayed = "Games",
    HighScore = "HighScore",
    Strikes = "Strikes",
    Spares = "Spares",
    StartValues = { Wins = 0, Losses = 0, Games = 0, HighScore = 0, Strikes = 0, Spares = 0 },
},
StatMeaning
WinsGames with the highest score
LossesGames finished without winning
GamesPlayedEvery finished game
HighScoreBest single game, out of 300
StrikesLifetime strikes
SparesLifetime spares

The names on the right are the column titles in the player list. Rename them to fit your game, or set Enabled = false to keep the list clean while still recording everything in the profile.

HighScore is the interesting one for a leaderboard: it rewards a perfect game rather than sheer volume, which is what a bowling alley should celebrate.

Rewards

Rewards = { Win = 0, Play = 0, PayMultiplayerOnly = true },
FieldDefaultPaid
Win0To the winner
Play0To everyone who finished
PayMultiplayerOnlytrueOnly pay when two or more players were in the game

Both amounts are zero as shipped, so nothing is paid until you decide otherwise.

PayMultiplayerOnly is the anti-farming switch and it should stay on. Without it a player can bowl alone, badly, for as long as they like and be paid for each game.

The in-world boards

Leaderboard = {
    WorkspaceFolder = "uxrBowlingWorkspace",
    BoardsFolder = "Leaderboards",
    Stats = { "Wins", "Losses", "HighScore", "Strikes" },
    TopN = 25,
    RefreshSeconds = 60,
    Store = { Prefix = "uxrBW_LB", Version = 1 },
},

Build them in Workspace/uxrBowlingWorkspace/Leaderboards, one model per entry in Stats.

Model nameShows
<Stat>LeaderboardThe global top players across every server
<Stat>ServerLeaderboardOnly the players in this server

Each board needs a ListPart.ListGui.ScrollingFrame holding a Template row with RankTextLabel, NameTextLabel and ValueTextLabel. Everything else about the row is your design.

Stats ships with four of the six. Add Games or Spares if you want boards for them; each entry needs its own board model.

Bumping Store.Version starts a fresh season on every board at once without touching profiles.

Global boards stay empty in Studio

They read ordered stores that only the live game writes to. Test your row layout against a server board, which is built from connected players and works anywhere.

The lane monitor

If the lane model has a Lane<i>Monitor part, the scorecard is drawn on it: the frames, the running total and whose turn it is.

It is optional. Without it players read the scorecard from their own interface, which every player has anyway. The monitor is what makes a lane feel like a lane to somebody walking past.

Where progress is saved

Profile = { Store = "uxrBW_Profile_v1", AutosaveSeconds = 60 },

One profile per player holding the six stats and the balance. Changing Store gives everyone a fresh profile, which is the deliberate way to wipe after a big change.

That is separate from Leaderboard.Store.Version, which resets only the boards.