User Tools

Site Tools


prpl:prplreference

<-PF Home<- PRPL Home

PRPL Reference

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.

Table of Contents

Language API

Debugging

Platform API

Timers

Strings

Input

Lists

Scripts

Ships

Units

Image

Emitters

Particles

Plasma

Struc

Map/Mission

Screen

Everything Else 2

Everything Else 2
usercanceled getupdatecount
randint randfloat randcoords
randcoordsinrange randxcoord randycoord
currentpixelcoords
getbuildslotscreencoords getcontrolpanelbuttonscreencoords gettechpanelvisible
settechpanelvisible celltopixel pixeltocell
createeffect destroyeffect
getallshipsinrange getnearestshipinrange getcoreswithvar
addscripttounit setscriptvar getscriptvar
self getshipattribute setshipattribute
getattribute setattribute getunittype
sethqjumptime setshowspecialending
playsound showconversation showconversationnopause
showconversationautomode closeconversation addconversationmessage
clearconversation destroyconversation conversationshowing
specificconversationshowing settext settextcolor
settextsize settextx settexty
settextrotation settextorder showmessage
showmessagedismissible wasmessagedismissed createindicatorarrow
destroyindicatorarrow setindicatorarrowposition setindicatorarrowrotation
setindicatorarrowcolor distance iseditmode
func call const_lathetargets
const_createenergysourcewhendestroyed const_createampgemwhendestroyed const_isenemy
const_createfootprint const_missiongoal
const_takemapspace const_isbuilding const_isdestroyed
const_ship_isenemy const_ship_hullsize const_ship_hullbuilt
const_ship_cmcost const_ship_cmbuiltamt const_ship_isconnectedtoenergymine
const_coordx const_coordy const_pixelcoordx
const_pixelcoordy const_receivespackets signal_none
signal_sine signal_square signal_triangle
signal_sawtooth signal_random signal_constant
isunit destroyparticle destroybond
createunit destroyunit setunitisgoal:/uid
getunitisgoal unitisdestroyed initcannonshot
initmissile moveship rotateshiptocell
rotateshiptopixel rotateship rotateshipdegrees
getshiphullsection getshiphullsectionbuilt deleteshipfromslot:ance).
getshipfromslot getslotfromship getshipnamefromslot
getshipslotcount addstockshiptoinventory addcustomshiptoinventory
addgameevent addgameeventatcell addgameeventatpixel
setgameeventfadetime setgameeventmessage setgameeventtype
getlandcount getenemymirecount getmirecount
getenergysourcecount getenergysources getrandomenergysource
getglobalstoredenergy setglobalstoredenergy gettechavailability
settechavailability getallowshipamp setallowshipamp
sethullbuildratemod getampgemcount setampgemcount
getmaxblueemergent getmaxredemergent setmaxblueemergent
setmaxredemergent getblueemergentrate getredemergentrate
setblueemergentrate setredemergentrate setpickuptype
setdoppelbehavior setdoppelhomecell createparticle
particleexists getownedparticlecount createbond
bondexists getparticlesinrange getparticlesinradius
getparticlecountinradius getparticleposition setparticleposition
teleportparticle getparticlemaxspeed setparticlemaxspeed
getparticlemaxage setparticlemaxage getparticlemaxdistance
getparticlehealth setparticlemaxdistance setparticlehealth
getparticlemass setparticlemass getparticledrag
setparticledrag setparticleimmediateforce getparticletarget
setparticletarget getparticletargetattractioninterval setparticletargetattractioninterval
getparticletargetattractionforce setparticletargetattractionforce getparticlesameinteraction
getparticlemotion getparticlehasteleported setparticlemotion
setparticlesameinteraction getparticledestroyatedge setparticledestroyatedge
getparticleforceparams setparticleforceparams setparticleforcespeedlimit
setparticleinteractdelay getparticleinteractdelay setparticleforcedirectionrelativeparticle
setparticlereturnwhenrecalled setunitrecallchildparticles getbondmovementparams
setbondmovementparams getbondlength setbondlength
getallconnectedparticles getallconnectedparticlecount getallconnectedbonds
getnearesttarget damageparticle isemergent
isparticle clearallfields setfieldcell
ishqpresent gethqs getland
setland setlandbulk getmire
setmire mireland
setenergysourcerate setenergysourcerange setenergysourcegrowenemyenergymine
getenergysourcerate getenergysourcerange getenergysourcegrowenemyenergymine
getunitlathetargets setunitlathetargets getunitcreateenergysourcewhendestroyed
setunitcreateenergysourcewhendestroyed getunitisenemy setunitisenemy
getunitcreateampgemwhendestroyed
setunitcreateampgemwhendestroyed getunitcreatefootprint setunitcreatefootprint
getunitmissiongoal setunitmissiongoal getunittakemapspace
setunittakemapspace getunitisbuilding setunitisbuilding
getunitcoordx setunitcoordx getunitcoordy
setunitcoordy getunitpixelcoordx setunitpixelcoordx
getunitpixelcoordy setunitpixelcoordy getunitreceivespackets
setunitreceivespackets getunithealth setunithealth
getunitmaxhealth setunitmaxhealth getunitenergy
setunitenergy getunitmaxenergy setunitmaxenergy
getunithashealthbar setunithashealthbar getunithasenergybar
setunithasenergybar getunitenergypackdelay setunitenergypackdelay
getunitparticlesdamage setunitparticlesdamage getunitshiphulldamages
setunitshiphulldamages getunitmiredamages setunitmiredamages
getunitmiredamageamt setunitmiredamageamt setunitlathedamageamt
getunitlathedamageamt setunitcoords getunitcoords
setunitpixelcoords getunitpixelcoords getunitisdestroyed
getshipisdestroyed getshiprotation setshiprotation
getshiprotationdegrees setshiprotationdegrees getshipcoords
setshipcoords setshipcoordx getshipcoordx
setshipcoordy getshipcoordy getshippixelcoords
setshippixelcoords getshippixelcoordx setshippixelcoordx
getshippixelcoordy setshippixelcoordy setshipisenemy
getshipisenemy getshipenergy setshipenergy
getshipenergycap setshipenergycap setshipmodulesammo
getshiphullsize getshiphullbuilt getshipcmcost
getshipcmbuiltamt getshipisconnectedtoenergymine getshiphasamp
getshiphullwidth getshiphullheight
prpl/prplreference.txt · Last modified: 2023/12/02 07:03 by SpeedCZ