Docs
Exports & Public API
Atlas facade methods you should call from gameplay scripts.
Import once
lua
shared_script '@atlas_core/imports.lua'Prefer Atlas.* over calling exports.atlas_core:* from random resources.
Core
| Call | Side | Returns |
|---|---|---|
Atlas.IsReady() | both | boolean |
Atlas.GetVersion() | both | { name, version, apiVersion } |
Atlas.GetHealth() | both | health snapshot |
Players & characters (server)
lua
Atlas.Players.Get(source)
Atlas.Players.SelectCharacter(source, characterUid)
Atlas.Characters.Get(source)
Atlas.Characters.GetPosition(source)
Atlas.Characters.SavePosition(source, x, y, z, heading)
Atlas.Permissions.Has(source, 'permission.name')Money (server)
Amounts are major units (dollars). Core stores cents internally.
lua
Atlas.Money.Get(source, 'cash')
Atlas.Money.Add(source, 'bank', 500)
Atlas.Money.Remove(source, 'cash', 50)
Atlas.Money.GetAccounts(source) -- { cash, bank }Status (server)
lua
Atlas.Status.Get(source) -- table
Atlas.Status.Get(source, 'hunger') -- number
Atlas.Status.Set(source, 'thirst', 80)
Atlas.Status.Add(source, 'stress', -5)
Atlas.Status.Save(source)Jobs (server)
lua
Atlas.Jobs.GetDefinitions()
Atlas.Jobs.Get(source)
Atlas.Jobs.Set(source, 'police', 2)
Atlas.Jobs.SetDuty(source, true)Inventory (server)
Via atlas_inventory bridge — still through Atlas.Inventory:
lua
local result = Atlas.Inventory.Add(source, 'water', 1)
-- { ok = true, data = ... } or { ok = false, error = '...' }Same shape for Remove, GetCount, CanCarry.
Atlas