Appearance
Core Data Types
PlayerData
The main data structure for player information, based on your DefaultData module.
lua
export type PlayerData = typeof(DefaultData)Example DefaultData structure:
lua
{
Coins = 0,
Level = 1,
Experience = 0,
Inventory = {},
Settings = {
MusicEnabled = true,
SoundEnabled = true,
},
Plot = {
Likes = 0,
Size = 1,
Buildings = {},
},
Stats = {
TotalPlayTime = 0,
GamesPlayed = 0,
HighScore = 0,
},
Achievements = {},
-- NEW: Leaderstats configuration
leaderstats = {
["💰 Coins"] = "Coins",
["⭐ Level"] = "Level",
["👍 Likes"] = "Plot.Likes"
}
}Path Types
ValuePath
String type for dot-separated data paths.
lua
export type ValuePath = stringExamples:
lua
"Coins" -- Top-level access
"Plot.Likes" -- Nested access
"Settings.MusicEnabled" -- Deep nesting
"Stats.HighScore" -- Any depth
"Plot.Buildings.House.Level" -- Complex nestingArrayPath
String type for paths to array/list data structures.
lua
export type ArrayPath = stringExamples:
lua
"Inventory" -- Top-level array
"Plot.Buildings" -- Nested array
"Achievements" -- List of achievements
"Stats.RecentScores" -- Nested score arrayDictPath
String type for paths to dictionary/table data structures.
lua
export type DictPath = stringExamples:
lua
"Settings" -- Settings dictionary
"Plot.Buildings" -- Building configuration
"Stats" -- Player statistics
"Inventory.Equipped" -- Equipment slots