FrameworkZ API Documentation - FrameworkZ.Foundation
FrameworkZ.Foundation
Foundational systems for FrameworkZ.
📋 On This Page
- Overview
- Statistics
- Fields14
- FrameworkZ.Foundation
- FrameworkZ.Foundation
- FrameworkZ.Foundation.Events
- FrameworkZ.Foundation.HookHandlers
- FrameworkZ.Foundation.Modules
- FrameworkZ.Foundation.Namespaces
- FrameworkZ.Foundation.NetworksName
- FrameworkZ.Foundation.PendingConfirmations
- FrameworkZ.Foundation.RegisteredHooks
- FrameworkZ.Foundation.StorageName
- FrameworkZ.Foundation.Subscribers
- FrameworkZ.Foundation.SubscribersMeta
- FrameworkZ.Foundation.SyncQueues
- FrameworkZ.Foundation.version
- Methods97
- FrameworkZ.Foundation.Events:EveryDays
- FrameworkZ.Foundation.Events:OnClientCommand
- FrameworkZ.Foundation.Events:OnConnected
- FrameworkZ.Foundation.Events:OnCreatePlayer
- FrameworkZ.Foundation.Events:OnDisconnect
- FrameworkZ.Foundation.Events:OnFillInventoryObjectContextMenu
- FrameworkZ.Foundation.Events:OnFillWorldObjectContextMenu
- FrameworkZ.Foundation.Events:OnGameStart
- FrameworkZ.Foundation.Events:OnInitGlobalModData
- FrameworkZ.Foundation.Events:OnKeyStartPressed
- FrameworkZ.Foundation.Events:OnMainMenuEnter
- FrameworkZ.Foundation.Events:OnObjectLeftMouseButtonDown
- FrameworkZ.Foundation.Events:OnPlayerDeath
- FrameworkZ.Foundation.Events:OnPreFillInventoryObjectContextMenu
- FrameworkZ.Foundation.Events:OnReceiveGlobalModData
- FrameworkZ.Foundation.Events:OnResetLua
- FrameworkZ.Foundation.Events:OnServerCommand
- FrameworkZ.Foundation.Events:OnServerStarted
- FrameworkZ.Foundation:AddAllHookHandlers
- FrameworkZ.Foundation:AddChannel
- FrameworkZ.Foundation:AddHookHandler
- FrameworkZ.Foundation:Broadcast
- FrameworkZ.Foundation:CleanupConfirmations
- FrameworkZ.Foundation:ClearBatchSyncQueue
- FrameworkZ.Foundation:EveryDays
- FrameworkZ.Foundation:ExecuteAllHooks
- FrameworkZ.Foundation:ExecuteFrameworkHooks
- FrameworkZ.Foundation:ExecuteGamemodeHooks
- FrameworkZ.Foundation:ExecuteGenericHooks
- FrameworkZ.Foundation:ExecuteHook
- FrameworkZ.Foundation:ExecuteModuleHooks
- FrameworkZ.Foundation:ExecutePluginHooks
- FrameworkZ.Foundation:Fire
- FrameworkZ.Foundation:GetChannel
- FrameworkZ.Foundation:GetChannelMeta
- FrameworkZ.Foundation:GetData
- FrameworkZ.Foundation:GetLocalData
- FrameworkZ.Foundation:GetModule
- FrameworkZ.Foundation:GetModuleMetaObject
- FrameworkZ.Foundation:GetNamespace
- FrameworkZ.Foundation:GetNestedValue
- FrameworkZ.Foundation:GetSubscribers
- FrameworkZ.Foundation:GetVersion
- FrameworkZ.Foundation:HasChannel
- FrameworkZ.Foundation:HasSubscription
- FrameworkZ.Foundation:Initialize
- FrameworkZ.Foundation:InitializeClient
- FrameworkZ.Foundation:InitializePlayer
- FrameworkZ.Foundation:LogChannels
- FrameworkZ.Foundation:NewModule
- FrameworkZ.Foundation:OnClientCommand
- FrameworkZ.Foundation:OnGameStart
- FrameworkZ.Foundation:OnServerCommand
- FrameworkZ.Foundation:OnServerStarted
- FrameworkZ.Foundation:PathToString
- FrameworkZ.Foundation:PostInitializeClient
- FrameworkZ.Foundation:PreInitializeClient
- FrameworkZ.Foundation:ProcessSaveableData
- FrameworkZ.Foundation:QueueBatchSync
- FrameworkZ.Foundation:RegisterFramework
- FrameworkZ.Foundation:RegisterFrameworkHandler
- FrameworkZ.Foundation:RegisterGamemodeHandler
- FrameworkZ.Foundation:RegisterGenericHandler
- FrameworkZ.Foundation:RegisterHandler
- FrameworkZ.Foundation:RegisterHandlers
- FrameworkZ.Foundation:RegisterModule
- FrameworkZ.Foundation:RegisterModuleHandler
- FrameworkZ.Foundation:RegisterNamespace
- FrameworkZ.Foundation:RegisterPluginHandler
- FrameworkZ.Foundation:RemoveChannel
- FrameworkZ.Foundation:RemoveData
- FrameworkZ.Foundation:RemoveHookHandler
- FrameworkZ.Foundation:RestoreData
- FrameworkZ.Foundation:RestorePlayer
- FrameworkZ.Foundation:SaveData
- FrameworkZ.Foundation:SaveNamespace
- FrameworkZ.Foundation:SendFire
- FrameworkZ.Foundation:SendGet
- FrameworkZ.Foundation:SendSet
- FrameworkZ.Foundation:ServerTick
- FrameworkZ.Foundation:SetData
- FrameworkZ.Foundation:SetLocalData
- FrameworkZ.Foundation:SetNestedValue
- FrameworkZ.Foundation:StartBatchSync
- FrameworkZ.Foundation:StartServerTick
- FrameworkZ.Foundation:Subscribe
- FrameworkZ.Foundation:SyncToPlayer
- FrameworkZ.Foundation:TeleportToLimbo
- FrameworkZ.Foundation:UnregisterFrameworkHandler
- FrameworkZ.Foundation:UnregisterGamemodeHandler
- FrameworkZ.Foundation:UnregisterGenericHandler
- FrameworkZ.Foundation:UnregisterHandler
- FrameworkZ.Foundation:UnregisterHandlers
- FrameworkZ.Foundation:UnregisterModuleHandler
- FrameworkZ.Foundation:UnregisterPluginHandler
- FrameworkZ.Foundation:Unsubscribe
- FrameworkZ.Foundation:Watch
- Functions11
- FrameworkZ.Foundation.New
- FrameworkZ.Foundation.OnGetData
- FrameworkZ.Foundation.OnInitializePlayer
- FrameworkZ.Foundation.OnRemoveData
- FrameworkZ.Foundation.OnSaveData
- FrameworkZ.Foundation.OnSaveNamespace
- FrameworkZ.Foundation.OnSaveNamespace
- FrameworkZ.Foundation.OnSetData
- FrameworkZ.Foundation.OnSync
- FrameworkZ.Foundation.OnSyncBroadcast
- FrameworkZ.Foundation.OnTeleportToLimbo
Fields
14{}FrameworkZ.Foundation.New(){}{ framework = {}, module = {}, gamemode = {}, plugin = {}, generic = {} }FrameworkZ.Foundation.Modules or {}FrameworkZ.Foundation.Namespaces or {}"FZ_NETWORKS"{}{ framework = {}, module = {}, gamemode = {}, plugin = {}, generic = {} }"FZ_STORAGE"{}{}FrameworkZ.Foundation.SyncQueues or {}"1.0.0"Methods
97FrameworkZ.Foundation.Events:EveryDays()
FrameworkZ.Foundation.Events:OnClientCommand(module, command, isoPlayer, arguments)
Parameters
FrameworkZ.Foundation.Events:OnConnected()
FrameworkZ.Foundation.Events:OnCreatePlayer()
FrameworkZ.Foundation.Events:OnDisconnect()
FrameworkZ.Foundation.Events:OnFillInventoryObjectContextMenu(player, context, items)
Parameters
FrameworkZ.Foundation.Events:OnFillWorldObjectContextMenu(playerNumber, context, worldObjects, test)
Parameters
FrameworkZ.Foundation.Events:OnGameStart()
FrameworkZ.Foundation.Events:OnInitGlobalModData(isNewGame)
Parameters
FrameworkZ.Foundation.Events:OnKeyStartPressed(key)
Parameters
FrameworkZ.Foundation.Events:OnMainMenuEnter()
FrameworkZ.Foundation.Events:OnObjectLeftMouseButtonDown(object, x, y)
Parameters
FrameworkZ.Foundation.Events:OnPlayerDeath(player)
Parameters
FrameworkZ.Foundation.Events:OnPreFillInventoryObjectContextMenu(playerID, context, items)
Parameters
FrameworkZ.Foundation.Events:OnReceiveGlobalModData(key, data)
Parameters
FrameworkZ.Foundation.Events:OnResetLua(reason)
Parameters
FrameworkZ.Foundation.Events:OnServerCommand(module, command, arguments)
Parameters
FrameworkZ.Foundation.Events:OnServerStarted()
FrameworkZ.Foundation:AddAllHookHandlers(hookName)
Parameters
FrameworkZ.Foundation:AddChannel(key)
Parameters
FrameworkZ.Foundation:AddHookHandler(hookName, category)
Parameters
FrameworkZ.Foundation:Broadcast(namespace, key, remove)
Parameters
FrameworkZ.Foundation:CleanupConfirmations(timeout)
Parameters
FrameworkZ.Foundation:ClearBatchSyncQueue(isoPlayer)
Parameters
FrameworkZ.Foundation:EveryDays()
FrameworkZ.Foundation:ExecuteAllHooks(hookName, ...)
Parameters
FrameworkZ.Foundation:ExecuteFrameworkHooks(hookName, ...)
Parameters
FrameworkZ.Foundation:ExecuteGamemodeHooks(hookName, ...)
Parameters
FrameworkZ.Foundation:ExecuteGenericHooks(hookName, ...)
Parameters
FrameworkZ.Foundation:ExecuteHook(hookName, category, ...)
Parameters
📝 Notes
When a function is defined and registered as a hook, sometimes it's as an object. However in the definition it could be as some.func() or some:func() (notice the period and colon between the examples). If the function is defined as some:func() then the object is passed as the first argument. If the function is defined as some.func() then the object is not passed as the first argument, in which case we would also need to define some.func_PassOverHookableObject function which must return \boolean true. This tells the hook system to not supply the object as the first argument if the function is apart of an object in the first place. Generic function hooks do not store an object and so do not have to worry about defining that additional property on its own function.
FrameworkZ.Foundation:ExecuteModuleHooks(hookName, ...)
Parameters
FrameworkZ.Foundation:ExecutePluginHooks(hookName, ...)
Parameters
FrameworkZ.Foundation:Fire(key, data, arguments)
Parameters
Returns
FrameworkZ.Foundation:GetChannel(key)
Parameters
Returns
FrameworkZ.Foundation:GetChannelMeta(key)
Parameters
Returns
FrameworkZ.Foundation:GetData(isoPlayer, namespace, keys, subscriptionID, callback)
Parameters
Returns
📝 Notes
If called on the client, the value may only be accessed in the callback immediately, or later after data has synchronized.
FrameworkZ.Foundation:GetLocalData(namespace, keys)
Parameters
Returns
FrameworkZ.Foundation:GetModule(moduleName)
Parameters
Returns
FrameworkZ.Foundation:GetModuleMetaObject(moduleName)
Parameters
Returns
FrameworkZ.Foundation:GetNamespace(namespace)
Parameters
Returns
FrameworkZ.Foundation:GetNestedValue(root, path)
Parameters
Returns
📝 Notes
Example path argument: {"key", "subkey"} == root["key"]["subkey"]
FrameworkZ.Foundation:GetSubscribers(key)
Parameters
Returns
FrameworkZ.Foundation:GetVersion()
Returns
FrameworkZ.Foundation:HasChannel(key)
Parameters
Returns
FrameworkZ.Foundation:HasSubscription(key, id)
Parameters
Returns
FrameworkZ.Foundation:Initialize()
📝 Notes
The LoadGridSquare event is not added to the hook system for performance reasons, as it is called very frequently.
This function wraps the Project Zomboid Events system to integrate with the FrameworkZ hook system, allowing all foundation events to be processed through the hook mechanism.
FrameworkZ.Foundation:InitializeClient(isoPlayer)
Parameters
FrameworkZ.Foundation:InitializePlayer(isoPlayer, playerData, charactersData)
Parameters
Returns
FrameworkZ.Foundation:LogChannels()
FrameworkZ.Foundation:NewModule(moduleObject, moduleName)
Parameters
Returns
FrameworkZ.Foundation:OnClientCommand(module, command, isoPlayer, arguments)
Parameters
📝 Notes
This function is called on the server when a client sends a command to the server. It processes the command and sends a response back to the client using the networking system.
FrameworkZ.Foundation:OnGameStart()
FrameworkZ.Foundation:OnServerCommand(module, command, arguments)
Parameters
📝 Notes
This function is called on the client when the server sends a command to the client. It processes the command and sends a response back to the server using the networking system.
FrameworkZ.Foundation:OnServerStarted()
FrameworkZ.Foundation:PathToString(path)
Parameters
Returns
FrameworkZ.Foundation:PostInitializeClient(player)
Parameters
FrameworkZ.Foundation:PreInitializeClient(isoPlayer)
Parameters
FrameworkZ.Foundation:ProcessSaveableData(object, ignoreList, encodeList)
Parameters
Returns
FrameworkZ.Foundation:QueueBatchSync(isoPlayer, namespace, key)
Parameters
FrameworkZ.Foundation:RegisterFramework()
FrameworkZ.Foundation:RegisterFrameworkHandler()
FrameworkZ.Foundation:RegisterGamemodeHandler(gamemode)
Parameters
FrameworkZ.Foundation:RegisterGenericHandler()
FrameworkZ.Foundation:RegisterHandler(hookName, handler, object, functionName, category)
Parameters
FrameworkZ.Foundation:RegisterHandlers(objectOrHandlers, category)
Parameters
FrameworkZ.Foundation:RegisterModule(module)
Parameters
FrameworkZ.Foundation:RegisterModuleHandler(module)
Parameters
FrameworkZ.Foundation:RegisterNamespace(name)
Parameters
📝 Notes
This must be used in the shared scope within an OnInitGlobalModData function.
FrameworkZ.Foundation:RegisterPluginHandler(plugin)
Parameters
FrameworkZ.Foundation:RemoveChannel(key)
Parameters
FrameworkZ.Foundation:RemoveData(namespace, key)
Parameters
FrameworkZ.Foundation:RemoveHookHandler(hookName, category)
Parameters
FrameworkZ.Foundation:RestoreData(isoPlayer, command, namespace, keys, callback)
Parameters
Returns
FrameworkZ.Foundation:RestorePlayer(isoPlayer, player, username, playerData, charactersData)
Parameters
Returns
FrameworkZ.Foundation:SaveData(isoPlayer)
Parameters
FrameworkZ.Foundation:SaveNamespace(isoPlayer, namespace)
Parameters
FrameworkZ.Foundation:SendFire(isoPlayer, subscriptionID, callback, ...)
Parameters
Returns
FrameworkZ.Foundation:SendGet(key, callback, callbackID, broadcast, ...)
Parameters
FrameworkZ.Foundation:SendSet(key, value, callback, callbackID, broadcast)
Parameters
FrameworkZ.Foundation:ServerTick()
FrameworkZ.Foundation:SetData(isoPlayer, namespace, keys, value, subscriptionID, broadcast, callback)
Parameters
Returns
📝 Notes
If called on the client, the value may only be accessed in the callback immediately, or later after data has synchronized.
FrameworkZ.Foundation:SetLocalData(namespace, keys, value)
Parameters
Returns
FrameworkZ.Foundation:SetNestedValue(root, path, value)
Parameters
Returns
📝 Notes
Example path argument: {"key", "subkey"} == root["key"]["subkey"] = value