2--! Created By RJ_RayJay
3--! \section Introduction
4--!
FrameworkZ is
a roleplay
framework for the game Project Zomboid. This
framework is designed to be
a base
for roleplay servers, providing
a variety of features and systems to help server owners create
a unique and enjoyable roleplay experience
for their players.
6--!
FrameworkZ includes
a variety of features and systems to help server owners create
a unique and enjoyable roleplay experience
for their players. Some of the features and systems include:
17--! \section Installation
18--! To install the
FrameworkZ framework, simply download the latest release from the Steam Workshop and add the Workshop ID/Mod ID into your Project Zomboid server
's config file. After installing, you can start your server and the framework will be ready to use. Typically you would also install a gamemode alongside the framework for additional functionality. Refer to your gamemode of choice for additional installation instructions.
20--! The FrameworkZ framework is designed to be easy to use and extend. The framework is built using Lua, a lightweight, multi-paradigm programming language designed primarily for embedded use in applications. The framework is designed to be modular, allowing server owners to easily add, remove, and modify features and systems to suit their needs. The framework also includes extensive documentation to help server owners understand how to use and extend the framework.
21--! \section Contributing
22--! The FrameworkZ framework is an open-source project and we welcome contributions from the community. If you would like to contribute to the framework, you can do so by forking the GitHub repository, making your changes, and submitting a pull request. We also welcome bug reports, feature requests, and feedback from the community. If you have any questions or need help with the framework, you can join the FrameworkZ Discord server and ask for assistance in the #support channel.
24--! The FrameworkZ framework is licensed under the MIT License, a permissive open-source license that allows you to use, modify, and distribute the framework for free. You can find the full text of the MIT License in the LICENSE file included with the framework. We chose the MIT License because we believe in the power of open-source software and want to encourage collaboration and innovation in the Project Zomboid community.
26--! If you need help with the FrameworkZ framework, you can join the FrameworkZ Discord server and ask for assistance in the #support channel. We have a friendly and knowledgeable community that is always willing to help with any questions or issues you may have. We also have a variety of resources available to help you get started with the framework, including documentation, tutorials, and example code.
27--! \section Conclusion
28--! The FrameworkZ framework is a powerful and flexible tool for creating roleplay servers in Project Zomboid. Whether you are a server owner looking to create a unique roleplay experience for your players or a developer looking to contribute to an open-source project, the FrameworkZ framework has something for everyone. We hope you enjoy using the framework and look forward to seeing the amazing roleplay experiences you create with it.
30--! - Steam Workshop: Coming Soon(tm)
31--! - GitHub Repository: https://github.com/Project-Zomboid-FrameworkZ/Framework
32--! - Bug Reports: https://github.com/Project-Zomboid-FrameworkZ/Framework/issues
33--! - Discord Server: https://discord.gg/PgNTyva3xk
34--! - Documentation: https://frameworkz.projectzomboid.life/documentation/
36--! \page global_variables Global Variables
37--! \section FrameworkZ FrameworkZ
39--! The global table that contains all of the framework.
40--! [table]: /variable_types.html#table "table"
41--! \page variable_types Variable Types
42--! \section string string
43--! A string is a sequence of characters. Strings are used to represent text and are enclosed in double quotes or single quotes.
44--! \section boolean boolean
45--! A boolean is a value that can be either true or false. Booleans are used to represent logical values.
46--! \section integer integer
47--! A integer is a numerical value without any decimal points.
48--! \section float float
49--! A float is a numerical value with decimal points.
50--! \section table table
51--! A table is a collection of key-value pairs. It is the only data structure available in Lua that allows you to store data with arbitrary keys and values. Tables are used to represent arrays, sets, records, and other data structures.
52--! \section function function
53--! A function is a block of code that can be called and executed. Functions are used to encapsulate and reuse code.
55--! Nil is a special value that represents the absence of a value. Nil is used to indicate that a variable has no value.
57--! Any is a placeholder that represents any type of value. It is used to indicate that a variable can hold any type of value.
58--! \section mixed mixed
59--! Mixed is a placeholder that represents a combination of different types of values. It is used to indicate that a variable can hold a variety of different types of values.
60--! \section class class
61--! Class is a placeholder that represents a class of objects by a table set to a metatable.
62--! \section object object
63--! Object is a placeholder that represents an instance of a class.
66local isClient = isClient
68--! \brief FrameworkZ global table.
70FrameworkZ = FrameworkZ or {}
72--! \brief Foundation for FrameworkZ.
73--! \class FrameworkZ.Foundation
74FrameworkZ.Foundation = {}
76--FrameworkZ.Foundation.__index = FrameworkZ.Foundation
78--! \brief Modules for FrameworkZ. Extends the framework with additional functionality.
79--! \class FrameworkZ.Modules
80FrameworkZ.Modules = {}
82--! \brief Create a new instance of the FrameworkZ Framework.
83--! \return \table The new instance of the FrameworkZ Framework.
84function FrameworkZ.Foundation.New()
86 version = FrameworkZ.Config.Version
88 object.__index = FrameworkZ.Foundation
90 setmetatable(object, FrameworkZ.Foundation)
95--! \brief Create a new module for the FrameworkZ Framework.
96--! \param MODULE_TABLE \table The table to use as the module.
97--! \param moduleName \string The name of the module.
98--! \return \table The new module.
99function FrameworkZ.Foundation:NewModule(moduleObject, moduleName)
100 if (not FrameworkZ.Modules[moduleName]) then
102 moduleObject.__index = moduleObject
103 setmetatable(object, moduleObject)
104 FrameworkZ.Modules[moduleName] = object
105 --FrameworkZ.Foundation:RegisterModuleHandler(object)
108 return FrameworkZ.Modules[moduleName]
111function FrameworkZ.Foundation:GetModule(moduleName)
112 return FrameworkZ.Modules[moduleName]
115--! \brief Get the meta object stored on a module. Not every module will have a meta object. This is a very specific use case and is used for getting instantiable objects such as PLAYER objects or CHARACTER objects.
116--! \param moduleName \string The name of the module.
117--! \return \table The meta object stored on the module or \nil if nothing was found.
118function FrameworkZ.Foundation:GetModuleMetaObject(moduleName)
119 if FrameworkZ.Modules[moduleName] and FrameworkZ.Modules[moduleName].Meta then
120 return FrameworkZ.Modules[moduleName].Meta
126function FrameworkZ.Foundation:RegisterFramework()
127 FrameworkZ.Foundation:RegisterFrameworkHandler()
130function FrameworkZ.Foundation:RegisterModule(module)
131 FrameworkZ.Foundation:RegisterModuleHandler(module)
134--! \brief Get the version of the FrameworkZ Framework.
135--! \return \string The version of the FrameworkZ Framework.
136function FrameworkZ.Foundation:GetVersion()
140FrameworkZ.Foundation = FrameworkZ.Foundation.New()
147HOOK_CATEGORY_FRAMEWORK = "framework"
148HOOK_CATEGORY_MODULE = "module"
149HOOK_CATEGORY_GAMEMODE = "gamemode"
150HOOK_CATEGORY_PLUGIN = "plugin"
151HOOK_CATEGORY_GENERIC = "generic"
153FrameworkZ.Foundation.HookHandlers = {
161FrameworkZ.Foundation.RegisteredHooks = {
169--! \brief Add a new hook handler to the list.
170--! \param hookName \string The name of the hook handler to add.
171--! \param category \string The category of the hook (framework, module, plugin, generic).
172function FrameworkZ.Foundation:AddHookHandler(hookName, category)
173 category = category or HOOK_CATEGORY_GENERIC
174 self.HookHandlers[category][hookName] = true
177--! \brief Add a new hook handler to the list for all categories.
178--! \param hookName \string The name of the hook handler to add.
179function FrameworkZ.Foundation:AddAllHookHandlers(hookName)
180 FrameworkZ.Foundation:AddHookHandler(hookName, HOOK_CATEGORY_FRAMEWORK)
181 FrameworkZ.Foundation:AddHookHandler(hookName, HOOK_CATEGORY_MODULE)
182 FrameworkZ.Foundation:AddHookHandler(hookName, HOOK_CATEGORY_GAMEMODE)
183 FrameworkZ.Foundation:AddHookHandler(hookName, HOOK_CATEGORY_PLUGIN)
184 FrameworkZ.Foundation:AddHookHandler(hookName, HOOK_CATEGORY_GENERIC)
187--! \brief Remove a hook handler from the list.
188--! \param hookName \string The name of the hook handler to remove.
189--! \param category \string The category of the hook (framework, module, plugin, generic).
190function FrameworkZ.Foundation:RemoveHookHandler(hookName, category)
191 category = category or HOOK_CATEGORY_GENERIC
192 self.HookHandlers[category][hookName] = nil
195--! \brief Register hook handlers for the framework.
196--! \param framework \table The framework table containing the functions.
197function FrameworkZ.Foundation:RegisterFrameworkHandler()
198 self:RegisterHandlers(self, HOOK_CATEGORY_FRAMEWORK)
201--! \brief Unregister hook handlers for the framework.
202--! \param framework \table The framework table containing the functions.
203function FrameworkZ.Foundation:UnregisterFrameworkHandler()
204 self:UnregisterHandlers(self, HOOK_CATEGORY_FRAMEWORK)
207--! \brief Register hook handlers for a module.
208--! \param module \table The module table containing the functions.
209function FrameworkZ.Foundation:RegisterModuleHandler(module)
210 self:RegisterHandlers(module, HOOK_CATEGORY_MODULE)
213--! \brief Unregister hook handlers for a module.
214--! \param module \table The module table containing the functions.
215function FrameworkZ.Foundation:UnregisterModuleHandler(module)
216 self:UnregisterHandlers(module, HOOK_CATEGORY_MODULE)
219--! \brief Register hook handlers for the gamemode.
220--! \param module \table The module table containing the functions.
221function FrameworkZ.Foundation:RegisterGamemodeHandler(gamemode)
222 self:RegisterHandlers(gamemode, HOOK_CATEGORY_GAMEMODE)
225--! \brief Unregister hook handlers for the gamemode.
226--! \param module \table The module table containing the functions.
227function FrameworkZ.Foundation:UnregisterGamemodeHandler(gamemode)
228 self:UnregisterHandlers(gamemode, HOOK_CATEGORY_GAMEMODE)
231--! \brief Register hook handlers for a plugin.
232--! \param plugin \table The plugin table containing the functions.
233function FrameworkZ.Foundation:RegisterPluginHandler(plugin)
234 self:RegisterHandlers(plugin, HOOK_CATEGORY_PLUGIN)
237--! \brief Unregister hook handlers for a plugin.
238--! \param plugin \table The plugin table containing the functions.
239function FrameworkZ.Foundation:UnregisterPluginHandler(plugin)
240 self:UnregisterHandlers(plugin, HOOK_CATEGORY_PLUGIN)
243--! \brief Register hook handlers for a plugin.
244--! \param plugin \table The plugin table containing the functions.
245function FrameworkZ.Foundation:RegisterGenericHandler()
246 self:RegisterHandlers(nil, HOOK_CATEGORY_GENERIC)
249--! \brief Unregister hook handlers for a plugin.
250--! \param plugin \table The plugin table containing the functions.
251function FrameworkZ.Foundation:UnregisterGenericHandler()
252 self:UnregisterHandlers(nil, HOOK_CATEGORY_GENERIC)
255--! \brief Register handlers for a specific category.
256--! \param object \table The object containing the functions.
257--! \param category \string The category of the hook (framework, module, plugin, generic).
258function FrameworkZ.Foundation:RegisterHandlers(objectOrHandlers, category)
259 category = category or HOOK_CATEGORY_GENERIC
260 if not self.HookHandlers[category] then
261 error("Invalid category: " .. tostring(category))
264 -- Iterate over the hook names using pairs since HookHandlers is now a dictionary
265 for hookName, _ in pairs(self.HookHandlers[category]) do
266 if objectOrHandlers and type(objectOrHandlers) == "table" then
267 -- Check if the object/table has a function for the hookName
268 local handlerFunction = objectOrHandlers[hookName]
269 if handlerFunction and type(handlerFunction) == "function" then
270 self:RegisterHandler(hookName, handlerFunction, objectOrHandlers, hookName, category)
273 -- objectOrHandlers is nil or not a table
274 -- Try to get the function from the global environment
275 local handler = _G[hookName]
276 if handler and type(handler) == "function" then
277 self:RegisterHandler(hookName, handler, nil, nil, category)
283--! \brief Unregister handlers for a specific category.
284--! \param object \table The object containing the functions.
285--! \param category \string The category of the hook (framework, module, plugin, generic).
286function FrameworkZ.Foundation:UnregisterHandlers(objectOrHandlers, category)
287 category = category or HOOK_CATEGORY_GENERIC
288 if not self.HookHandlers[category] then
289 error("Invalid category: " .. tostring(category))
292 for hookName, _ in pairs(self.HookHandlers[category]) do
293 if objectOrHandlers and type(objectOrHandlers) == "table" then
294 local handlerFunction = objectOrHandlers[hookName]
295 if handlerFunction and type(handlerFunction) == "function" then
296 self:UnregisterHandler(hookName, handlerFunction, objectOrHandlers, hookName, category)
299 local handler = _G[hookName]
300 if handler and type(handler) == "function" then
301 self:UnregisterHandler(hookName, handler, nil, nil, category)
307--! \brief Register a handler for a hook.
308--! \param hookName \string The name of the hook.
309--! \param handler \function The function to call when the hook is executed.
310--! \param object \table (Optional) The object containing the function.
311--! \param functionName \string (Optional) The name of the function to call.
312--! \param category \string The category of the hook (framework, module, plugin, generic).
313function FrameworkZ.Foundation:RegisterHandler(hookName, handler, object, functionName, category)
314 category = category or HOOK_CATEGORY_GENERIC
315 self.RegisteredHooks[category][hookName] = self.RegisteredHooks[category][hookName] or {}
317 if object and functionName then
318 table.insert(self.RegisteredHooks[category][hookName], {
319 handler = function(...)
320 object[functionName](object, ...)
323 functionName = functionName
326 table.insert(self.RegisteredHooks[category][hookName], handler)
331--! \brief Unregister a handler from a hook.
332--! \param hookName \string The name of the hook.
333--! \param handler \function The function to unregister.
334--! \param object \table (Optional) The object containing the function.
335--! \param functionName \string (Optional) The name of the function to unregister.
336--! \param category \string The category of the hook (framework, module, plugin, generic).
337function FrameworkZ.Foundation:UnregisterHandler(hookName, handler, object, functionName, category)
338 category = category or HOOK_CATEGORY_GENERIC
339 local hooks = self.RegisteredHooks[category] and self.RegisteredHooks[category][hookName]
341 for i = #hooks, 1, -1 do
342 if object and functionName then
343 if hooks[i].object == object and hooks[i].functionName == functionName then
344 table.remove(hooks, i)
348 if hooks[i] == handler then
349 table.remove(hooks, i)
357--! \brief Execute hooks.
358--! \param hookName \string The name of the hook.
359--! \param category \string The category of the hook (framework, module, plugin, generic).
360--! \param ... \vararg Additional arguments to pass to the hook functions.
361function FrameworkZ.Foundation.ExecuteHook(hookName, category, ...)
362 category = category or HOOK_CATEGORY_GENERIC
363 if FrameworkZ.Foundation.RegisteredHooks[category] and FrameworkZ.Foundation.RegisteredHooks[category][hookName] then
364 for _, func in ipairs(FrameworkZ.Foundation.RegisteredHooks[category][hookName]) do
365 if type(func) == "table" and func.handler then
366 if select("#", ...) == 0 then
372 if select("#", ...) == 0 then
382--! \brief Execute all of the hooks.
383--! \param hookName \string The name of the hook.
384--! \param ... \vararg Additional arguments to pass to the hook functions.
385function FrameworkZ.Foundation.ExecuteAllHooks(hookName, ...)
386 for category, _ in pairs(FrameworkZ.Foundation.RegisteredHooks) do
387 FrameworkZ.Foundation.ExecuteHook(hookName, category, ...)
391--! \brief Execute the framework hooks.
392--! \param hookName \string The name of the hook.
393--! \param ... \vararg Additional arguments to pass to the hook functions.
394function FrameworkZ.Foundation.ExecuteFrameworkHooks(hookName, ...)
395 local category = HOOK_CATEGORY_FRAMEWORK
396 if FrameworkZ.Foundation.RegisteredHooks[category] and FrameworkZ.Foundation.RegisteredHooks[category][hookName] then
397 for _, func in ipairs(FrameworkZ.Foundation.RegisteredHooks[category][hookName]) do
398 if type(func) == "table" and func.handler then
399 if select("#", ...) == 0 then
405 if select("#", ...) == 0 then
415--! \brief Execute module hooks.
416--! \param hookName \string The name of the hook.
417--! \param ... \vararg Additional arguments to pass to the hook functions.
418function FrameworkZ.Foundation.ExecuteModuleHooks(hookName, ...)
419 local category = HOOK_CATEGORY_MODULE
420 if FrameworkZ.Foundation.RegisteredHooks[category] and FrameworkZ.Foundation.RegisteredHooks[category][hookName] then
421 for _, func in ipairs(FrameworkZ.Foundation.RegisteredHooks[category][hookName]) do
422 if type(func) == "table" and func.handler then
423 if select("#", ...) == 0 then
429 if select("#", ...) == 0 then
439--! \brief Execute the gamemode hooks.
440--! \param hookName \string The name of the hook.
441--! \param ... \vararg Additional arguments to pass to the hook functions.
442function FrameworkZ.Foundation.ExecuteGamemodeHooks(hookName, ...)
443 local category = HOOK_CATEGORY_GAMEMODE
444 if FrameworkZ.Foundation.RegisteredHooks[category] and FrameworkZ.Foundation.RegisteredHooks[category][hookName] then
445 for _, func in ipairs(FrameworkZ.Foundation.RegisteredHooks[category][hookName]) do
446 if type(func) == "table" and func.handler then
447 if select("#", ...) == 0 then
453 if select("#", ...) == 0 then
463--! \brief Execute plugin hooks.
464--! \param hookName \string The name of the hook.
465--! \param ... \vararg Additional arguments to pass to the hook functions.
466function FrameworkZ.Foundation.ExecutePluginHooks(hookName, ...)
467 local category = HOOK_CATEGORY_PLUGIN
468 if FrameworkZ.Foundation.RegisteredHooks[category] and FrameworkZ.Foundation.RegisteredHooks[category][hookName] then
469 for _, func in ipairs(FrameworkZ.Foundation.RegisteredHooks[category][hookName]) do
470 if type(func) == "table" and func.handler then
471 if select("#", ...) == 0 then
477 if select("#", ...) == 0 then
487--! \brief Execute generic hooks.
488--! \param hookName \string The name of the hook.
489--! \param ... \vararg Additional arguments to pass to the hook functions.
490function FrameworkZ.Foundation.ExecuteGenericHooks(hookName, ...)
491 local category = HOOK_CATEGORY_GENERIC
492 if FrameworkZ.Foundation.RegisteredHooks[category] and FrameworkZ.Foundation.RegisteredHooks[category][hookName] then
493 for _, func in ipairs(FrameworkZ.Foundation.RegisteredHooks[category][hookName]) do
494 if type(func) == "table" and func.handler then
495 if select("#", ...) == 0 then
501 if select("#", ...) == 0 then
517--! \brief Called when the game starts. Executes the OnGameStart function for all modules.
518function FrameworkZ.Foundation:OnGameStart()
519 FrameworkZ.Foundation.ExecuteFrameworkHooks("PreInitializeClient", getPlayer())
522function FrameworkZ.Foundation:PreInitializeClient()
523 FrameworkZ.Foundation.ExecuteModuleHooks("PreInitializeClient", getPlayer())
524 FrameworkZ.Foundation.ExecuteGamemodeHooks("PreInitializeClient", getPlayer())
525 FrameworkZ.Foundation.ExecutePluginHooks("PreInitializeClient", getPlayer())
527 FrameworkZ.Foundation.ExecuteFrameworkHooks("InitializeClient", getPlayer())
529FrameworkZ.Foundation:AddAllHookHandlers("PreInitializeClient")
531function FrameworkZ.Foundation:InitializeClient()
532 FrameworkZ.Timers:Simple(FrameworkZ.Config.InitializationDuration, function()
533 FrameworkZ.Foundation.ExecuteModuleHooks("InitializeClient", getPlayer())
534 FrameworkZ.Foundation.ExecuteGamemodeHooks("InitializeClient", getPlayer())
535 FrameworkZ.Foundation.ExecutePluginHooks("InitializeClient", getPlayer())
537 FrameworkZ.Foundation.ExecuteFrameworkHooks("PostInitializeClient", getPlayer())
540FrameworkZ.Foundation:AddAllHookHandlers("InitializeClient")
542function FrameworkZ.Foundation:PostInitializeClient()
543 FrameworkZ.Foundation.ExecuteModuleHooks("PostInitializeClient", getPlayer())
544 FrameworkZ.Foundation.ExecuteGamemodeHooks("PostInitializeClient", getPlayer())
545 FrameworkZ.Foundation.ExecutePluginHooks("PostInitializeClient", getPlayer())
547FrameworkZ.Foundation:AddAllHookHandlers("PostInitializeClient")
549function FrameworkZ.Foundation:OnMainMenuEnter()
550 FrameworkZ.Foundation.ExecuteFrameworkHooks("OnOpenEscapeMenu", getPlayer())
553function FrameworkZ.Foundation:OnOpenEscapeMenu()
554 FrameworkZ.Foundation.ExecuteModuleHooks("OnOpenEscapeMenu", getPlayer())
555 FrameworkZ.Foundation.ExecuteGamemodeHooks("OnOpenEscapeMenu", getPlayer())
556 FrameworkZ.Foundation.ExecutePluginHooks("OnOpenEscapeMenu", getPlayer())
558FrameworkZ.Foundation:AddAllHookHandlers("OnOpenEscapeMenu")
560if not isClient() then
562 --! \brief Called when the server starts. Executes the OnServerStarted function for all modules.
563 function FrameworkZ.Foundation.OnServerStarted()
564 for k, v in pairs(FrameworkZ.Modules) do
565 if v.OnServerStarted then
570 Events.OnServerStarted.Add(FrameworkZ.Foundation.OnServerStarted)
void HOOK_CATEGORY_FRAMEWORK()
void HOOK_CATEGORY_GAMEMODE()
void HOOK_CATEGORY_PLUGIN()
void HOOK_CATEGORY_MODULE()
void HOOK_CATEGORY_GENERIC()
void if objectOrHandlers and type objectOrHandlers()
void local handlerFunction()
void if select("#",...)()
void processingNotification backgroundColor a()
Foundation for FrameworkZ.
void UnregisterGamemodeHandler(gamemode)
Unregister hook handlers for the gamemode.
table GetModuleMetaObject(moduleName)
Get the meta object stored on a module. Not every module will have a meta object. This is a very spec...
void RegisterGamemodeHandler(gamemode)
Register hook handlers for the gamemode.
void RegisterHandler(hookName, handler, object, functionName, category)
Register a handler for a hook.
void RegisterHandlers(objectOrHandlers, category)
Register handlers for a specific category.
void PostInitializeClient()
void ExecuteGamemodeHooks(hookName,...)
Execute the gamemode hooks.
string GetVersion()
Get the version of the FrameworkZ Framework.
void AddAllHookHandlers(hookName)
Add a new hook handler to the list for all categories.
table NewModule(moduleObject, moduleName)
Create a new module for the FrameworkZ Framework.
void UnregisterGenericHandler()
Unregister hook handlers for a plugin.
void ExecuteHook(hookName, category,...)
Execute hooks.
void RegisterModuleHandler(module)
Register hook handlers for a module.
void RegisterPluginHandler(plugin)
Register hook handlers for a plugin.
void RegisterFrameworkHandler()
Register hook handlers for the framework.
void ExecuteFrameworkHooks(hookName,...)
Execute the framework hooks.
void RegisterGenericHandler()
Register hook handlers for a plugin.
void UnregisterPluginHandler(plugin)
Unregister hook handlers for a plugin.
void OnServerStarted()
Called when the server starts. Executes the OnServerStarted function for all modules.
void UnregisterHandler(hookName, handler, object, functionName, category)
Unregister a handler from a hook.
table New()
Create a new instance of the FrameworkZ Framework.
void ExecuteAllHooks(hookName,...)
Execute all of the hooks.
void GetModule(moduleName)
void UnregisterModuleHandler(module)
Unregister hook handlers for a module.
void ExecutePluginHooks(hookName,...)
Execute plugin hooks.
void ExecuteGenericHooks(hookName,...)
Execute generic hooks.
void RemoveHookHandler(hookName, category)
Remove a hook handler from the list.
void UnregisterFrameworkHandler()
Unregister hook handlers for the framework.
void PreInitializeClient()
void UnregisterHandlers(objectOrHandlers, category)
Unregister handlers for a specific category.
void AddHookHandler(hookName, category)
Add a new hook handler to the list.
void ExecuteModuleHooks(hookName,...)
Execute module hooks.
void OnGameStart()
Called when the game starts. Executes the OnGameStart function for all modules.
void RegisterModule(module)