Libraries
Libraries are collections of functions that can be used to simplify certain tasks or gather all functions for a certain datatype in one place. For example, the table library is a collection of functions that work with tables, and the math library is a collection of functions for advanced math, such as random, cos, rad, noise, ...
A library's function is accessed with a dot, just like instances. For example, to access the function create of the library table, I would do it this way: table.create().
Out of the box, Powerlang comes with five libraries: math, string, table, retrostudio and compiler. In this guide we will go over the first four, as you likely won't need the compiler library (but if you do, check out Compiler Library).
Advanced Math with math
mathThe math library is a nearly 1:1 port of Roblox's math library: https://create.roblox.com/docs/reference/engine/libraries/math
Due to this, you are advised to check out the Roblox documentation for the library instead.
String Operations with string
stringThe string library makes working with strings easier. It has similarities to Roblox's string library, but is not a 1:1 port.
The string library supports the following functions: split, find, sub, gsub, length, upper, lower and filter. You can find out more in its respective documentation: string.
Table Operations with table
tableThe table library, as you could've already guessed, works with tables (primarily arrays, not dictionaries).
The library supports: create, append, insert, remove, find, sort, and length. You've learned some of these in Tables. Check out its documentation for more information: table
Special Blocks with retrostudio
retrostudioThe retrostudio library was made for blocks in the "Misc" section of the "Misc" tab in Visual Scripting/Block Coding. As you can tell by the official categorization, these cannot be put into any reasonable category, therefore a separate library has been created for them.
You can find all available functions and their descriptions here: retrostudio
The next page is the final page of this guide, where you'll learn comments and flags.
Last updated