dreamworkAPI
Ctrl K
GitHub

dreamwork API

Reference for the dreamwork std environment: libraries, classes (callable tables that construct objects), data types, functions and events.

65libraries
93classes
146types
1890functions & methods

Packages run with std as their environment, so std.print is just print and std.Queue is just Queue. Every entry shows the realms it is available in: serverclientmenu, shared means both server and client.

Press Ctrl K or / to search.

Libraries

library
ascii
An ASCII library that provides functions for this encoding.
library
base16
Base16 (hexadecimal) encoding/decoding library.
library
base32
Base32 encoding/decoding library.
library
base64
Base64 encoding/decoding library.
library
bit
The bit library.
library
bitpack
Library that packs & unpacks bits in integers and bytes.
library
bytepack
Library that packs & unpacks types as bytes.
library
chat
library
checksum
Namespace checksum.
library
class
A library for creating classes, implementing inheritance, and working with the object model in Lua.
library
client
library
color
Library for color manipulation.
library
console
The source engine console library.
library
coroutine
coroutine library
library
crypto
A collection of cryptographic utilities.
library
debug
The debug library is intended to help you debug your scripts, however it also has several other powerful uses.
library
deflate
DEFLATE is a lossless compression format that combines LZ77 and Huffman coding, it is used by zlib, gzip, PNG and ZIP.
library
ffi
The LuaJIT FFI library, allows calling external C functions and using C data structures from pure Lua code.
library
fluent
A port of Project Fluent, the localization system, based on @fluent/bundle.
library
futures
This library provides Python-like futures for asynchronous programming, such as Futures, Tasks, Channels, and async iterators.
library
game
Namespace game.
library
gc
Lua manages memory automatically by running a garbage collector to collect all dead objects (that is, objects that are no longer accessible from Lua).
library
gfx2d
library
gfx3d
The library with powerful set of functions that let you control how the world and its contents are rendered.
library
gzip
gzip is a file format that wraps a DEFLATE stream with a header (file name, comment, time) and a CRC-32 checksum with the size of the original data.
library
hkdf
Namespace hkdf.
library
http
The HTTP library, requests, cookies and helpers for web APIs.
library
i18n
library
input
The input library allows you to manipulate the client's input devices (mouse & keyboard), such as the cursor position and whether a key is pressed or not.
library
ipv4
Provides utility functions for working with Internet Protocol v4 addresses as integers.
library
jit
The jit library is a standard Lua library which provides functions to manipulate the JIT compiler.
library
json
The JSON format is a lightweight data interchange format.
library
level
The game-level library.
library
lua
Lua 5.1 / LuaJIT code library: lexer, parser and generator.
library
lz4
LZ4 is lossless compression algorithm, providing compression speed > 500 MB/s per core (>0.15 Bytes/cycle).
library
lzma
The lzma library, compresses and decompresses strings in the format used by util.Compress.
library
lzw
Lempel–Ziv–Welch (LZW) is a universal lossless compression algorithm created by Abraham Lempel, Jacob Ziv, and Terry Welch.
library
math
The powerful math library.
library
menu
The game's main menu library.
library
mysql
library
null
A sentinel symbol that represents an explicit "no value".
library
os
This library is implemented through table os.
library
pack
Library that packs & unpacks types as strings, same as bytepack does with bytes.
library
path
The file path library.
library
pbkdf2
Namespace pbkdf2.
library
percent
Percent (URL/URI) encoding/decoding library.
library
physics
library
punycode
Punycode encoding/decoding library.
library
raw
Library containing functions for working with raw data.
library
server
The game's server library.
library
sqlite
The local SQLite library wrapper.
library
steam
Steam API library.
library
string
The string type is a sequence of characters.
library
table
The table library is a standard Lua library which provides functions to manipulate tables.
library
time
A library for working with time and date.
library
unicode
The unicode library provides functions for working with unicode code points, unicode escape sequences, case mapping, display width and blocks of UTF-8 strings.
library
unit
Static unit conversion library (convert-units style, no object allocation).
library
utf16
The utf16 library provides functions for the manipulation of UTF-16 strings.
library
utf32
The utf32 library provides functions for the manipulation of UTF-32 strings.
library
utf8
The utf8 library provides functions for the manipulation of UTF-8 strings.
library
uuid
The UUID library, generates, parses and formats RFC 9562 UUIDs.
library
vararg
Provides utility functions for selecting, accessing, modifying, slicing, packing, and unpacking variable-length argument lists.
library
vdf
The KeyValues format is used in the Source engine to store meta data for resources, scripts, materials, VGUI elements, and more..
library
window
The game's window library.
library
zlib
zlib is a data format that wraps a DEFLATE stream with a 2 byte header and an Adler-32 checksum.

Classes

Classes inherit from Object and are created by calling the class table, e.g. Queue().

class
Addon
The Garry's Mod addon (.gma) archive.
class
Adler32
The Adler-32 checksum calculation object.
class
Angle3
A 3D angle object ( pitch, yaw, roll in degrees ) in Source engine convention.
class
AsyncError
An error raised during asynchronous/coroutine execution, whose traceback additionally reports the thread it occurred in.
class
AsyncFileSystemError
An error raised when an asynchronous file system operation fails.
class
AudioStream
The audio stream object.
class
BigFixed
Represents an arbitrary-precision signed fixed-point decimal number.
class
BigInteger
Represents an arbitrary-precision signed integer.
class
BinaryReader
A cursor over an immutable binary string, reads values one after another from any bit position.
class
BinaryWriter
A growable binary buffer, writes values one after another at any bit position.
class
checksum.CRC16
The class used to create new CRC-16 checksum calculation instances.
class
checksum.CRC32
The CRC-32 checksum calculation object.
class
checksum.CRC8
The CRC-8 checksum calculation object.
class
Class
A general structure for every class that created with class library.
class
Client
class
CompileError
An error that occurs when the compiler encounters an issue.
class
console.Command
The console command object.
class
console.Logger
The logger object.
class
console.Variable
The console variable object.
class
crypto.Hash
The static fields shared by all hash classes, e.g. crypto.SHA256.
class
crypto.MD5
MD5 object.
class
crypto.SHA1
SHA1 object.
class
crypto.SHA256
SHA256 object.
class
crypto.SHA384
SHA384 object.
class
crypto.SHA512
SHA512 object.
class
DecodeError
An error raised when encoded data (JSON, VDF, ...) cannot be decoded because it is malformed.
class
deflate.Compressor
The DEFLATE stream compressor object.
class
deflate.Decompressor
The DEFLATE stream decompressor object.
class
Directory
The directory object.
class
Emitter
A minimal event registry shared by every instance of a class.
class
EncodeError
An error raised when a value cannot be encoded into a data format (JSON, VDF, ...) because the format cannot represent it.
class
EndOfFileError
An error raised when a read operation unexpectedly reaches the end of a stream, file, or buffer before completing.
class
Entity
class
Error
The base error object used throughout dreamwork.
class
Event
A named list of handlers called one after another, a simpler Hook.
class
File
The file object.
class
Fletcher16
The Fletcher-16 checksum calculation object.
class
Fletcher32
The Fletcher-32 checksum calculation object.
class
FluentBundle
The collection of messages of one locale, formats them with variables.
class
FluentDateTime
The date and time, Unix timestamps must be wrapped in it to be formatted as dates.
class
FluentError
An error raised while formatting Fluent messages, e.g. a missing variable or message.
class
FluentNone
The missing value, formatted as {name} to show what failed to resolve.
class
FluentNumber
The number with formatting options, numbers passed as variables are wrapped in it automatically.
class
FluentResource
The parsed FTL ( Fluent Translation List ) source.
class
FluentType
The base of values with custom formatting, inherit it to pass custom objects as variables.
class
Future
Futures are objects that hold the result that can be assigned asynchronously they can be awaited to get the result or add callback with :addCallback(...) metho…
class
futures.Channel
A channel is a queue-type object that can be used by multiple coroutines.
class
futures.Task
Async task object.
class
Gamemode
class
gzip.Compressor
The gzip stream compressor object.
class
gzip.Decompressor
The gzip stream decompressor object.
class
Hook
A hook is a named, prioritized event pipeline that other code can attach handlers to and later call to run them.
class
HTMLNode
A HTML node object, representing an element, or the document itself with name #document.
class
http.CookieJar
A cookie jar, stores cookies from Set-Cookie response headers and builds the Cookie request header, following RFC 6265.
class
http.Server
An HTTP server backed by HolyLib's httpserver.
class
http.Server.Request
An incoming request delivered to an http.Server route handler.
class
http.Server.Response
The response writer for an http.Server route handler.
class
HTTPError
An error raised when an HTTP request fails or its response has an unexpected status code.
class
IPv6
An object that represents an Internet Protocol v6 address as eight 16-bit groups.
class
lua.SyntaxError
An error raised when Lua code cannot be parsed.
class
Message
A named channel that sends data through hidden console commands, so it also works between the menu and the client states, where the net library doesn't.
class
Mixin
A mixin is an ordered chain of transformer functions.
class
Model
class
Network
A named two-way channel between the server and the clients built on top of the engine net library, without its 64 KiB message limit.
class
Node
A node in a generic tree structure.
class
NotImplementedError
An error raised when a called feature, method, or function has not been implemented yet.
class
Object
A base for objects that were created by class library.
class
Quaternion
A quaternion object, mostly used to represent rotations without gimbal lock.
class
Queue
A queue is a first-in-first-out (FIFO) data structure object.
class
RuntimeError
An error raised for generic runtime failures that don't fall into any more specific error category.
class
sqlite.Blob
A blob query parameter.
class
Stack
A stack is a last-in-first-out (LIFO) data structure object.
class
steam.Identifier
A Steam ID, the identifier of a Steam account.
class
SteamError
An error raised when a Steam API call fails.
class
Tar
The tar (.tar) archive.
class
Timer
The timer object.
class
TypeError
An error raised when a value does not match the type expected by an operation, function argument, or field.
class
URL
A parsed URL, see the URL Standard.
class
URL.SearchParams
A list of query parameters, stored as { name, value } pairs in order.
class
ValueError
An error raised when a value has the correct type but is otherwise invalid or out of the accepted range for an operation.
class
Vector2
A 2D vector object, e.g. a screen position or a size.
class
Vector3
A 3D vector object in Source engine coordinates.
class
Version
A semantic version object.
class
ViewportLayout
A named set of CSS / viewport length descriptors that resolve to floored pixels and refresh when the window is resized.
class
VMatrix
A 4x4 transformation matrix object ( rotation, scale and translation ) in Source engine layout.
class
WASM
A WebAssembly module instantiated inside a headless WebClient (Chromium).
class
WASMError
An error raised by the WebAssembly runtime (compile / link / trap / bad export access).
class
WebClient
A headless HTML panel for running browser JavaScript, WebSockets and other web APIs from Lua without painting a visible UI.
class
WebSocket
A WebSocket client. Backends are tried in order: gwsockets, tungstenite, then a WebClient / browser fallback on client and menu.
class
XMLNode
A XML node object, representing a node in an XML document.
class
Zip
The zip (.zip) archive.
class
zlib.Compressor
The zlib stream compressor object.
class
zlib.Decompressor
The zlib stream decompressor object.
Generated from the dreamwork meta branch.