2021-02-23 20:45:03 +00:00
#################
Lua API reference
#################
.. toctree ::
2021-04-24 22:55:08 +00:00
:hidden:
2021-02-23 20:45:03 +00:00
2021-04-24 22:55:08 +00:00
engine_handlers
2021-11-18 15:19:54 +00:00
user_interface
2022-01-23 19:49:42 +00:00
aipackages
2022-05-24 19:11:13 +00:00
setting_renderers
2022-01-23 19:49:42 +00:00
events
2021-04-24 22:55:08 +00:00
openmw_util
2021-12-13 23:39:01 +00:00
openmw_storage
2021-04-24 22:55:08 +00:00
openmw_core
2022-03-12 23:38:36 +00:00
openmw_types
2021-04-24 22:55:08 +00:00
openmw_async
openmw_world
openmw_self
openmw_nearby
2021-06-26 21:10:24 +00:00
openmw_input
2021-04-24 22:55:08 +00:00
openmw_ui
2021-11-01 17:39:18 +00:00
openmw_camera
2022-05-14 01:58:00 +00:00
openmw_postprocessing
2022-02-03 01:05:43 +00:00
openmw_debug
2022-01-10 20:04:07 +00:00
openmw_aux_calendar
2021-04-24 22:55:08 +00:00
openmw_aux_util
2021-12-01 20:28:05 +00:00
openmw_aux_time
2022-05-03 17:36:49 +00:00
openmw_aux_ui
2022-01-23 19:49:42 +00:00
interface_ai
2021-11-01 17:39:18 +00:00
interface_camera
2022-05-03 17:36:49 +00:00
interface_mwui
2022-05-01 14:57:33 +00:00
interface_settings
2022-02-21 20:43:27 +00:00
iterables
2021-02-23 20:45:03 +00:00
2021-04-24 22:55:08 +00:00
- :ref: `Engine handlers reference`
2021-11-18 15:19:54 +00:00
- :ref: `User interface reference <User interface reference>`
2021-04-24 22:55:08 +00:00
- `Game object reference <openmw_core.html##(GameObject)> `_
- `Cell reference <openmw_core.html##(Cell)> `_
2022-01-23 19:49:42 +00:00
- :ref: `Built-in AI packages`
- :ref: `Built-in events`
2021-02-23 20:45:03 +00:00
2021-04-24 22:55:08 +00:00
**API packages**
2021-04-02 17:42:19 +00:00
API packages provide functions that can be called by scripts. I.e. it is a script-to-engine interaction.
A package can be loaded with `` require('<package name>') `` .
It can not be overloaded even if there is a lua file with the same name.
The list of available packages is different for global and for local scripts.
Player scripts are local scripts that are attached to a player.
2022-02-03 01:05:43 +00:00
.. include :: tables/packages.rst
2021-02-23 20:45:03 +00:00
2021-04-24 22:55:08 +00:00
**openmw_aux**
`` openmw_aux.* `` are built-in libraries that are itself implemented in Lua. They can not do anything that is not possible with the basic API, they only make it more convenient.
Sources can be found in `` resources/vfs/openmw_aux `` . In theory mods can override them, but it is not recommended.
2022-02-03 01:05:43 +00:00
.. include :: tables/aux_packages.rst
2021-11-01 17:39:18 +00:00
**Interfaces of built-in scripts**
2022-05-01 14:57:33 +00:00
.. list-table ::
:widths: 20 20 60
2021-11-01 17:39:18 +00:00
2022-05-01 14:57:33 +00:00
* - Interface
- Can be used
- Description
* - :ref: `AI <Interface AI>`
- by local scripts
- Control basic AI of NPCs and creatures.
* - :ref: `Camera <Interface Camera>`
- by player scripts
- | Allows to alter behavior of the built-in camera script
| without overriding the script completely.
* - :ref: `Settings <Interface Settings>`
- by player and global scripts
- Save, display and track changes of setting values.
2022-05-14 10:27:30 +00:00
* - :ref: `MWUI <Interface MWUI>`
- by player scripts
- Morrowind-style UI templates.