This is an old revision of the document!
<!--In order to align tables in the two columns, I used a hack.
I placed only one table in a column, created a column break, placed the opposing table and then
ended the column formatting. Rinse/repeat. Essentially two tables are paired in a set of columns
and this pattern is then repeated. -->
<-PF Home<- PRPL Home
This reference is divided into two major sections with many subsections in each of those. The purpose of this reference is to provide an index to all commands in the language, and define the input required and the output produced by each command. In many instances a short example of the use of the command is provided.
The Language API (Application Programming Interface) is related and common in many languages - these are used to control program execution and are part of the core language.
The rest of PRPL is contained in the Platform API and is PF-specific. These govern the behavior of objects in the PF game.
To get started, review the CRPL overview and the programming tutorial. If you seek to write neater code, read the style guide. If you are familiar with CRPL, and wish to learn the new language features, the upgrade notes are for you. There is also an alphabetic list of commands in the language. In addition, you can examine map resources from other maps and missions from the game.
Please note that much of this documentation was generated rather than written. Any help in editing is appreciated.
Editors help: Pages follow this template.
Utility: List of unit types
Note on IDs: UID is generally used here to refer to a unit. SID is for ships, PID for particles. However, from CRPL, UID may be used to refer to any of these.
Language API |
Platform API |
|
Strings | ||
---|---|---|
Concat | Substring | StartsWith |
EndsWith | Split | StringToList |
ToUpper | ToLower | StringLength |
StringReplace | CR | LF |
DoubleQuote |
Input | ||
---|---|---|
GetKey | GetKeyDown | GetKeyUp |
GetMouseButton | GetMouseButtonDown | GetMouseButtonUp |
GetMouseScreenPosition | GetMouseScreenPixelPosition | |
GetMouseCell | GetMousePosition |
Scripts | ||
---|---|---|
NotPersist | InvocationCount | GetType |
CurrentCoords | CurrentX | CurrentY |
SetCurrentCoords | SetCurrentX | SetCurrentY |
operatewhilepaused | Self |
Units | ||
---|---|---|
SetUnitCurrentCoords | SetUnitCurrentX | SetUnitCurrentY |
GetUnitTransformPosition | getallunitsinrange | SetUnitSelectable |
Plasma | ||
---|---|---|
GetBluePlasmaDecayMax | GetRedPlasmaDecayMax | SetBluePlasmaDecayMax |
SetRedPlasmaDecayMax | GetPlasma | SetPlasma |
SetPlasmaBulk | GetPlasmaDecay |
<span id="map_mission"></span>
Screen | ||
---|---|---|
screenwidth | screenheight | setscreenmode |
setscreencoords | setscreencoordx | setscreencoordy |
setscreenpixelcoords | setscreenpixelcoordx | setscreenpixelcoordy |
<span id="everything_else_2"></span>