Lyra
Advanced player data management with a simple API
Install / Use
/learn @paradoxum-games/LyraREADME
Lyra makes it easy to safely and robustly manage your game's player data. It's designed to handle large amounts of data, prevent common game-breaking bugs, and make it easy to update your data format without breaking existing saves.
Early Development
While Lyra has been tested and is used in production, it's still in early development. Some features, like transactions, while tested in controlled environments, have not yet been battle-tested in production at scale.
Avoid using Lyra in production games where data loss would be catastrophic until it has been tested more thoroughly.
Features
- Transactions - A powerful tool to implement features like trading, while making bugs like item duplication impossible
- Session Locking - Prevents common bugs that lead to corruption and data loss
- Validation - Ensures your data is always in a consistent state
- Auto-Sharding - Handles large data by automatically splitting across multiple DataStore keys
- Migrations - Update your data format without breaking existing saves
- Drop-in - Import your existing data and switch over seamlessly
Quick Start
local store = Lyra.createPlayerStore({
name = "PlayerData",
template = {
coins = 0,
inventory = {},
},
schema = t.strictInterface({
coins = t.number,
inventory = t.table,
}),
})
-- Load data when players join
Players.PlayerAdded:Connect(function(player)
store:loadAsync(player)
end)
-- Free up resources when players leave
Players.PlayerRemoving:Connect(function(player)
store:unloadAsync(player)
end)
-- Update data
store:updateAsync(player, function(data)
data.coins += 100
return true
end)
-- Atomic transactions
store:txAsync({player1, player2}, function(state)
local amount = 50
state[player1].coins -= amount
state[player2].coins += amount
return true
end)
Installation
Add to your wally.toml:
Lyra = "paradoxum-games/lyra@0.6.0"
Check out the documentation for guides, examples, and API reference.
Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
