User Tools

Site Tools


pf:rpldocs:ships
ships.txt
=CMD
=COMMAND MoveShip (int int int int)
=DESC 
int ARG1: Ship UID<br/>
int ARG2: X cell coordinate to move to<br/>
int ARG3: Y cell coordinate to move to<br/>
int ARG4: Move Mode (0 = normal, 1 = don't rotate when moving)<p/>

Issues a move order to a ship to move to a given cell on the map.
=ENDDESC
=EX 
MoveShip(<-ship 10 42 0)
=ENDEX
=ENDCMD

=CMD
=COMMAND RotateShipToCell (int int int)
=DESC 
int ARG1: Ship UID<br/>
int ARG2: X cell coordinate to rotate to<br/>
int ARG3: Y cell coordinate to rotate to<p/>

Issues a rotate order to a ship to rotate to a given cell.
=ENDDESC
=EX 
RotateShipToCell(<-ship 10 42)
=ENDEX
=ENDCMD

=CMD
=COMMAND RotateShipToPixel (int float float)
=DESC 
int ARG1: Ship UID<br/>
float ARG2: X pixel coordinate to rotate to<br/>
float ARG3: Y pixel coordinate to rotate to<p/>

Issues a rotate order to a ship to rotate to a given pixel.
=ENDDESC
=EX 
RotateShipToPixel(<-ship 40 168)
=ENDEX
=ENDCMD

=CMD
=COMMAND RotateShip (int float)
=DESC 
int ARG1: Ship UID<br/>
float ARG2: Angle in radians to rotate ship to.<p/>

Issues a rotate order to a ship to rotate to a angle in radians.
=ENDDESC
=EX 
RotateShip(<-ship PI div(2))
=ENDEX
=ENDCMD

=CMD
=COMMAND RotateShipDegrees (int float)
=DESC 
int ARG1: Ship UID<br/>
float ARG2: Angle in degrees to rotate ship to.<p/>

Issues a rotate order to a ship to rotate to a angle in degrees.
=ENDDESC
=EX 
RotateShip(<-ship 90)
=ENDEX
=ENDCMD

=CMD
=COMMAND GetShipHullSection (int int int) int
=DESC 
int ARG1: Ship UID<br/>
int ARG2: X coordinate of hull section.<br/>
int ARG3: Y coordinate of hull section<p/>

Gets the hull type of a section of a ship's hull.  0,0 is the lower left corner of the rectangular array that holds the hull sections for a ship. If the X or Y coordinate are out of bounds for this containing array, -1 is returned.  If the X and Y coordinate point to a hull cell that does not exist, 0 is returned.  For all others, the number that is returned describes the hull shape and armor state according to this table<br>
NONE=0, HULL1=1, HULL2=2, HULL3=3, HULL4=4, HULL5=5, HULL6=6, HULL7=7, HULL8=8, HULL9=9, UNUSED=10, ARMOR1=11, ARMOR2=12, ARMOR3=13, ARMOR4=14, ARMOR5=15, ARMOR6=16, ARMOR7=17, ARMOR8=19, ARMOR9=19
=ENDDESC
=EX 
GetShipHullSection(<-ship 3 3) ->shipHull
=ENDEX
=ENDCMD

=CMD
=COMMAND GetShipHullSectionBuilt (int int int) bool
=DESC 
int ARG1: Ship UID<br/>
int ARG2: X coordinate of hull section.<br/>
int ARG3: Y coordinate of hull section<p/>

Gets the build state of a given hull section.  If the X or Y coordinate our out of bounds for the rectangular array that holds the ship's hull sections, false is returned.  If the referenced hull section does not exist, false is returned.  For all other cells, the build state is returned.
=ENDDESC
=EX 
GetShipHullSectionBuilt(<-ship 3 3) ->isBuilt
=ENDEX
=ENDCMD

=CMD
=COMMAND DeleteShipFromSlot (int bool)
=DESC 
int ARG1: Slot ID. Valid slot IDs are 0 to 23 inclusive.<br/>
bool ARG2: Whether the ship associated with the slot should be destroyed (if it exists).<p/>

Removes a ship build button from the ship command bar.
=ENDDESC
=EX 
TODO
=ENDEX
=ENDCMD

=CMD
=COMMAND GetShipFromSlot (int) int
=DESC 
int ARG1: Slot ID. Valid slot IDs are 0 to 23 inclusive.<p/>

Returns the Ship UID for any built ship associated with a given build slot. -1 is returned if there is not ship.
=ENDDESC
=EX 
TODO
=ENDEX
=ENDCMD

=CMD
=COMMAND GetSlotFromShip (int) int
=DESC 
int ARG1: Ship UID<p/>

Returns the build slot associated with a ship.  Returns -1 if the ship doesn't have an associated build slot. 0 to 23 inclusive is the slot range returned.
=ENDDESC
=EX 
TODO
=ENDEX
=ENDCMD

=CMD
=COMMAND GetShipNameFromSlot (int) string
=DESC 
int ARG1: Slot ID. Valid slot IDs are 0 to 23 inclusive.<p/>

Returns the name of the ship associated with a given build slot.  This is the same name that appears on the build button.
=ENDDESC
=EX 
TODO
=ENDEX
=ENDCMD

=CMD
=COMMAND GetShipSlotCount (bool) int
=DESC 
bool ARG1: Whether to only count build slots that have built ships.<p/>

Returns the number of occupied build slots (build slots that have buttons).
=ENDDESC
=EX 
TODO
=ENDEX
=ENDCMD

=CMD
=COMMAND AddStockShipToInventory (string)
=DESC 
int ARG1: The name of the stock ship to add.<p/>

Adds a stock ship to the build inventory panel. If the panel is full, nothing is added.  The names of stock ships are:<br/>
"LATHE", "DESTROYER", "JOVEN", "CRUISER", "RELAY", "TANKER", "GRABBER", "HAMMER", "WOLF", "MARAUDER", "DISCHARGER", "BIGNOSE", "CCLASS", "CARRIER", "VARRO"
=ENDDESC
=EX 
TODO
=ENDEX
=ENDCMD

=CMD
=COMMAND AddCustomShipToInventory (string)
=DESC 
int ARG1: The serialized data that represents a custom ship.<p/>

Adds a custom ship to the build inventory panel. If the panel is full, nothing is added. The data passed in must be a serialized custom ship plan. You can get serialized ship data by clicked the "PRPL Data to Clipboard" button in the ship Editor.
=ENDDESC
=EX 
AddCustomShipToInventory("CgQAcm9vdAMBAHMFAFNoaXAw6QMAbXBzDQAAAAAAoEAAAKBAAADg
QAAAQEAAAOBAAACgQAAAQEAAAOBAAAAgQQAAQEAAACBBAAAQQQAAQEAAACBBAADAQAAAAEAAAHBBAA
AAQQAAAEAAAABBAABwQQAAAEAAAIA/AAAAQQAAAEAAAABBAACAPwAAgEAAAFBBAAAAQQAAgEAAAABB
AABQQQAAgEAAAEBAAAAAQQAAgEAAAABBAABAQAECAGh3EQAAAAECAGhoEQAAAAsCAGhwIQEAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAADwAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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