Module game_data_lua.database
The database library offers multiple useful functions to get all information in one object about a player, a construct, an organization or an element.
The database is defined by a Lua file within your Dual Universe installation, view it at:
...\Dual Universe\Game\data\lua\database.lua
Functions
getPlayer (id) | Returns all info about a given player, identified by its id. |
getMasterPlayer (unit) | Returns all informations about the player running the script. |
getOrganization (id) | Returns all informations about the given organization, identified by its id. |
getConstruct (radar, id) | Returns all info about a given construct, identified by its id and seen from a radar. |
getElement (core, id) | Returns all info about a given element, identified by its id and coupled to a core unit. |
Functions
- getPlayer (id)
-
Returns all info about a given player, identified by its id.
Parameters:
- id integer The player ID.
Returns:
-
table
The player structure.
- getMasterPlayer (unit)
-
Returns all informations about the player running the script.
Parameters:
- unit table The unit object.
Returns:
-
table
The player structure.
- getOrganization (id)
-
Returns all informations about the given organization, identified by its id.
Parameters:
- id integer The organization id.
Returns:
-
table
The organization structure.
- getConstruct (radar, id)
-
Returns all info about a given construct, identified by its id and seen from a radar.
Parameters:
- radar table The radar object.
- id integer The construct ID.
Returns:
-
table
The construct structure.
- getElement (core, id)
-
Returns all info about a given element, identified by its id and coupled to a core unit.
Parameters:
- core table The core unit object.
- id integer The element ID.
Returns:
-
table
The construct structure.