Naev

Naev Lua API

This is the API used in Naev to interact with the game from Lua.

Lua is a relatively simple scripting language used for a large portion of Naev's content. Missions, events, GUIs and AIs are all written using Lua and Naev's API, as are many minor features such as system backgrounds, reputation handling and others.

The Wiki has an in-depth mission tutorial covering both missions and events, and the API documentation provides common usage examples for each function.

Most API modules can also be used from the in-game Lua console (accessible by pressing F2 by default) for cheating experimenting to your heart's content.

Modules

ai Controls the Pilot AI.
cinema Functions for handling cinematic scenes.
vn Visual Novel API for Naev
escort Library for dealing with escorts in missions.
fleet Functions for adding fleets of pilots.
format Provides string formatting and interpolation facilities.
lazyload Laziest lib there is.
linenoise Command-line library.
lmisn Mission helper utilities.
lmusic Small music handling library.
love_shaders A module containing a diversity of Love2D shaders for use in Naev.
asteroid Lua bindings to interact with asteroid.
audio Lua bindings to interact with audio.
bkg Lua bindings to interact with the background.
camera Lua bindings to interact with the Camera.
canvas Lua bindings to interact with canvass.
colour Lua bindings to interact with colours.
commodity Lua bindings to interact with commodities.
data Lua bindings to interact with datas.
diff Lua bindings to apply/remove Universe Diffs.
evt Event system Lua bindings.
faction Lua bindings to deal with factions.
file Lua bindings to interact with files.
font Lua bindings to interact with fonts.
gfx Lua bindings to interact with rendering and the Naev graphical environment.
gui Lua bindings to interact with the GUI elements.
hook Lua bindings to manipulate hooks.
jump This module allows you to handle the jumps from Lua.
linopt Lua bindings to interact with linopts.
misn Mission Lua bindings.
munition Lua bindings to interact with munitions.
music Music Lua module.
naev Naev generic Lua bindings.
news Lua bindings to interact with the news.
outfit Lua bindings to interact with outfits.
pilot Lua bindings to interact with pilots.
pilotoutfit Lua bindings to interact with pilot outfits.
player Lua bindings to interact with the player.
rnd Bindings for interacting with the random number generator.
safelanes Lua accessor functions to safe lane information.
shader Lua bindings to interact with shaders.
ship Lua bindings to interact with ships.
shiplog Bindings for adding log entries to the ship log.
spfx Lua bindings to interact with spfx.
spob This module allows you to handle the spobs from Lua.
system Lua system module.
tex Lua bindings to interact with OpenGL textures.
time Bindings for interacting with the time.
tk Bindings for interacting with the Toolkit.
transform Lua bindings to interact with transforms.
var Mission variable Lua bindings.
vec2 Represents a 2D vector in Lua.
equipopt.optimize Equips pilots based on mixed integer linear programming.
pilotai Pilot AI helper utilities.
portrait Functions for handling portraits in Naev.
pp_shaders Post-processing shader library for Lua.
prng Simple deterministic Lua PRNG.
prob Probability-related utilities.
proximity Provides a composable proximity callback: you can use "proximity" as a hook, with the function to call if the player's in range as an argument.
swapship Utility to swap the player's ship.
vntk Small wrapper around vn to do toolkit type stuff.
generated by LDoc 1.5.0 Last updated 2024-11-21 07:14:26