Dictionary
Manage all your game data efficiently with a single, lightweight module. Perfect for items, NPCs, configs, and more.
Full API documentation included inside the module for easy reference and usage.
Features
Centralized game data
Inheritance reduces duplication
Cached for performance
Powerful queries (filter, sort, paginate)
Batch operations
Flexible data sources
Quick Start
local Dictionary = require(script.Dictionary)
-- Global instance
local sword = Dictionary.get("Weapons", "Sword")
-- Custom source
local myDict = Dictionary.new(workspace.GameData)
local potion = myDict:get("Items", "HealthPotion")
Query & Find
local legendary = Dictionary.find("Weapons", {rarity="Legendary"})
local top = Dictionary.query("Weapons")
:where(function(w) return w.damage > 50 end)
:orderBy("damage","desc")
:limit(5)
:execute()
Inheritance
-- BaseSword
return {BaseSword={type="weapon", damage=10, durability=100}}
-- FireSword
return {FireSword={inherits="BaseSword", damage=25, element="Fire"}}
-- Result: type=weapon, damage=25, durability=100, element=Fire
Batch Operations
local batch = Dictionary.batch()
:set("Weapons","NewSword",{damage=30})
:update("Weapons","OldSword",{damage=35})
:delete("Weapons","BrokenSword")
batch:commit()
Utility
Dictionary.hasCategory("Weapons")
Dictionary.hasItem("Weapons","Sword")
Dictionary.listCategories()
Dictionary.listKeys("Weapons")
Dictionary.clearCache()
Dictionary.clearCache("Weapons")
Examples
Epic+ Weapons
local topWeapons = Dictionary.query("Weapons")
:where(function(w) return w.rarity=="Epic" or w.rarity=="Legendary" end)
:orderBy("damage","desc")
:execute()
NPC Quests
local questNPCs = Dictionary.query("NPCs")
:where(function(n) return n.area==currentArea and #n.availableQuests>0 end)
:execute()
Environment Configs
local prod = Dictionary.new(game.ServerStorage.ProdConfig)
local test = Dictionary.new(game.ServerStorage.TestConfig)
local settings = prod:get("Game","Settings")
Download Dictionary and simplify your Roblox data workflow!