User Tools

Site Tools


prpl:prplreference

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

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

Platform API

<span id="timers"></span>

<span id="strings"></span>

<span id="input"></span>

<span id="lists"></span>

<span id="scripts"></span>

<span id="ships"></span>

<span id="units"></span>

<span id="plasma"></span>

<span id="map_mission"></span>

<span id="screen"></span>

<span id="everything_else_2"></span>

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
setimage removeimages setimageposition
setimagepositionx setimagepositiony setimagepositionz
setimagelayer setimageorder setimagerotation
setimagescale setimagescalex setimagescaley
setimagecolor getimageposition getimagepositionx
getimagepositiony getimagepositionz getimagelayer
getimageorder getimagerotation getimagescale
getimagescalex getimagescaley getimagecolor
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_growstruc 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 growstruc
setemitterparticletype setemitterproductioninterval setemittermaxparticles
setemittermaxtime setemittermaxdistance setemittermaxparticlespeed
setemitterparticlehealth setemittertargetprobability setemitteremittertargetprobability
setemitterrecallrange setemitterdestroyeatedge setemitterdestroyatedge
setemitterenemypattern setemitterbonddistance setemitterbondstiffness
setemitterminchainlength setemittermaxchainlength setemittershapesize
getemitterparticletype getemitterproductioninterval getemittermaxparticles
getemittermaxtime getemittermaxdistance getemittermaxparticlespeed
getemitterparticlehealth getemittertargetprobability getemitteremittertargetprobability
getemitterrecallrange getemitterdestroyeatedge getemitterdestroyatedge
getemitterenemypattern getemitterbonddistance getemitterbondstiffness
getemitterminchainlength getemittermaxchainlength getemittershapesize
setenergysourcerate setenergysourcerange setenergysourcegrowenemyenergymine
getenergysourcerate getenergysourcerange getenergysourcegrowenemyenergymine
getunitlathetargets setunitlathetargets getunitcreateenergysourcewhendestroyed
setunitcreateenergysourcewhendestroyed getunitisenemy setunitisenemy
getunitgrowstruc setunitgrowstruc 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 getshiphullheightgetstruc
getstrucbuiltsetstrucsetstrucbulk
prpl/prplreference.1509407711.txt.gz · Last modified: 2017/10/30 19:55 by GameGibu