Expand description
Knowledge about the Lua scripting API of the games.
The API description is not shipped with RPFM. It’s built at runtime from the scripting documentation
bundled with the Assembly Kit (documentation/script/script/), which has two formats:
- Per-page docs (
campaign/*.html,battle/*.html,frontend/*.html): one<dl class="function">block per function, with a typed signature, a parameter table and a list of return values. scripting_doc.html: the game interfaces (FACTION_SCRIPT_INTERFACE, …) with the return type of each of their methods, and the context accessors available on each event.
The docs don’t list every event, nor what the vanilla scripts define beyond the documented libraries,
so both are completed from the vanilla scripts in the dependencies cache. The check submodule uses
this description to check scripts.
Modules§
- check
- Static checks of Lua scripts against the scripting API.
- harness
- Test harness running Lua scripts outside of the game.
Structs§
- LuaAccessor
- A context accessor of an event, like
context:faction(). - LuaApi
- Description of the Lua scripting API of a game.
- LuaFunction
- A documented function.
- LuaParameter
- A parameter of a documented function.
- LuaReturn
- A value returned by a documented function.
Enums§
- LuaCall
Style - How a documented function is called.
- LuaEnvironment
- Game environment in which a script runs.
- LuaHover
Target - Something in a script the docs describe, used to show its docs on hover.
- LuaType
- Type of a value, as described by the docs.
Constants§
- ASSEMBLY_
KIT_ SCRIPT_ DOCS_ PATH - Path of the scripting documentation, relative to the root folder of the Assembly Kit.
Functions§
- vanilla_
scripts - This function returns the vanilla Lua scripts from the dependencies cache.