RE:CORD
Data and persistence

Values and updates

Data and persistence for REC_Core, with configuration and implementation details.
Added
Updated

A namespace separates a feature’s keys from other features. Use a resource name or another stable name agreed by the participating scripts. Pass strings, numbers, booleans, or JSON-serializable tables. setMetadata(..., nil) and setValue(..., nil) remove a key. setCharinfo accepts additional fields and does not rerun the character-creation name and birthdate validators, so callers must validate those edits.

local namespace = GetCurrentResourceName()
local accepted = exports.REC_Core:setValue(playerId, namespace, "tutorialComplete", true)
local completed = exports.REC_Core:getValue(playerId, namespace, "tutorialComplete")

setValues updates the supplied keys and leaves other keys intact. It returns true if at least one key was accepted, so it is not an all-or-nothing batch. An empty input returns false. removeNamespace attempts to remove each key and can still return true when a handler rejects some deletions; inspect the remaining values if complete removal matters.

©2026 RE:CORD Development Group. All rights reserved.