User Tools

Site Tools


modding:function:shporder

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
modding:function:shporder [2017/03/09 02:23] – Gate order does not require a stargate as a target. You had your chance. 0xabcdefmodding:function:shporder [2017/06/24 02:32] 0xabcdef
Line 16: Line 16:
     * **ship**     * **ship**
       * **order**       * **order**
-        * "guard" +        * **"guard"**: Ship docks with a target and fights enemies that attack or come near the target. Ship gives up attacking an enemy if it is no longer detectable to the target. Ends if **target** is destroyed. 
-          * Target +          * SpaceObject: **target** 
-        * "dock" +        * **"sentry"**: Similar to **guard** but makes the ship hold at its current position and has a duration. Ends when **target** is destroyed 
-          * Target +          * SpaceObject: **target** 
-        * "attack" +          * Integer: Duration in seconds; infinite by default. 
-          * Target +        * **"dock"**: Ship attempts to dock with a target. If no docking ports are available, ship will move back and forth over the target until a port is available. 
-          * [Duration in seconds] +          * SpaceObject: **target** 
-        * "wait" +        * **"attack"**: Ship fires its weapons against a target for a specified duration or until the target is destroyed. 
-          * [Duration in seconds] +          * SpaceObject: **target** 
-        * "gate" +          * [Integer]: Duration in seconds; infinite by default 
-          * Target (does not need to be a stargate) +        * **"wait"**: Ship does absolutely nothing for a specified duration. 
-        * "gateOnThreat" +          * [Integer]: Duration in seconds; infinite by default 
-        * "gateOnStationDestroyed" +        * **"gate"**: Ship attempts to leave the system through an object (typically a stargate). 
-        * "patrol" +          * SpaceObject (does not need to be a stargate): **target** 
-          * Target +        * **"gateOnThreat"**: Ship **wait**s until it is attacked and then attempts to leave the system. This order usually comes after a **dock** order. Ship is considered a subordinate of the object it is docked at. 
-          * Distance +        * **"gateOnStationDestroyed"**: Ship **wait**s until a station is destroyed and then attempts to leave the system. This order usually comes after a **dock** order. Ship is considered a subordinate of the object it is docked at. 
-        * "escort" +        * **"patrol"**: Ship **orbit**s the target at a specified distance and fights enemies that attack or come near the target. Ship gives up fighting an enemy if it is no longer detectable by the target. 
-          * Target +          * SpaceObject: **target** 
-          * [Angle]|[Formation+          * [Integer]: **distance** in light-seconds at which to orbit the target. 
-          * [Distance+        * **"escort"**: Ship **follow**s a target, fighting enemies that attack or come near the target.  Ship gives up fighting an enemy if it is no longer detectable by the target. 
-        * "scavenge" +          * SpaceObject: **target** 
-        * "followPlayerThroughGate" +          * [Integer]: **angle** or **formation** 
-          * Target +          * [Integer]: **distance** 
-        * "attackNearestEnemy" +        * **"scavenge"**: Ship **wanders** around system until there is a wreck with items in it, at which point the ship will **loot** the wreck. Does not retaliate if the wreck is destroyed. 
-        * "tradeRoute" +        * **"followPlayerThroughGate"**: Cannot be given by **shpOrder**; returned by the event **OnPlayerLeftSystem** as **"followPlayer"**. Ship follows the player through the nearest gate. 
-        * "wander" +          * SpaceObject: **target** 
-        * "loot" +        * **"attackNearestEnemy"**: Attack the nearest enemy at the time that this order is assigned. 
-          * Target +        * **"tradeRoute"** 
-        * "hold" +        * **"wander"**: Ship follows a diamond-like path around the system, fighting enemies that attack it 
-          * Duration +        * **"loot"**: Ship takes all items from the target after a few seconds, ignoring cargo space. Ship does not retaliate to attacks while looting. Does not retaliate if target is destroyed. 
-        * "mine" +          * SpaceObject: **target** 
-          * Target +        * **"hold"**: Ship brakes and attempts to stay at its current position, attacking nearby enemies 
-        * "waitForPlayer" +          * Integer: **duration** in seconds 
-        * "attackPlayerOnReturn" +        * **"mine"**: 
-        * "follow" +          * SpaceObject: **target** 
-          * Target +        * **"waitForPlayer"**: Cannot be given by **shpOrder**; returned by the event **OnPlayerLeftSystem**. Ship waits for the player to return to the system. 
-        * "navPath" +        * **"attackPlayerOnReturn"**: Usually given during the **OnPlayerLeftSystem** event. Ship will attack player upon gating back into the system. 
-          * Integer ((Unknown)) +        * **"follow"**: Ship follows a target, staying at a position relative to the target and matching the target's direction. 
-        * "goto" +          * SpaceObject: **target** 
-          * Object +          * Integer: Angle in degrees 
-        * "waitForTarget" +          * Integer: Distance in light-seconds 
-          * Target +        * **"navPath"** 
-          * Integer ((Unknown)) +          * ?: **navID** 
-          * Integer ((Unknown)) +        * **"goto"**:  
-        * "waitForEnemy" +          * SpaceObject: **destination** 
-          * Duration +          * Integer: **distance** 
-        * "bombard" +        * **"waitForTarget"**: Ship waits until a target approaches a certain distance or until a certain amount of time passes. 
-          * Target +          * SpaceObject: **target** to wait for. 
-          * Integer ((Unknown)) +          * Integer: **distance** from the target in light-seconds, defaults to detection range. 
-        * "approach" +          * Integer: **duration** in seconds until the wait ends; infinite by default. 
-          * Target +        * **"waitForEnemy"** 
-          * Distance +          * Integer: **duration** in seconds until the wait ends; infinite by default. 
-        * "aim" +        * **"bombard"**: Orders a ship to **attack** a station 
-          * Target +          * SpaceObject (must be a station): **target** 
-        * "orbit" +          * Integer: **duration** in seconds that the ship will spend bombarding 
-          * Target +        * **"approach"**: Ship approaches a target until a certain distance 
-          * Distance +          * SpaceObject: **target** 
-          * Integer ((Unknown)) +          * Integer: **distance** in light-seconds 
-        * "holdCourse" +        * **"aim"**: Ship aims at a target without firing weapons 
-          * Angle +          * SpaceObject: **target** 
-          * Distance +        * **"orbit"**: Ship moves clockwise in a circular path around the target at a specified distance for a specified duration 
-        * "turnTo" +          * SpaceObject: **target** 
-          * Angle (absolute) +          * Integer: **distance** in light-seconds 
-        * "attackHold" +          * Integer: **duration** in seconds 
-          * Target +        * **"holdCourse"**: 
-          * Duration +          * Integer: **angle** in degrees 
-        * "attackStation" +          * Integer: **distance** in light-seconds 
-          * Target +        * **"turnTo"**: 
-          * Integer ((Unknown)) +          * Distance: **angle** (absolute) in degrees 
-        * "fireEvent" Fires the event on the target's event handler. **aShipObj** is the ship that fired it. +        * **"attackHold"**: 
-          * Target +          * SpaceObject: **target** 
-          * String (event name) +          * Integer: **duration** in seconnds 
-        * "waitForUndock" +        * **"attackStation"**: 
-          * Target +          * SpaceObject: **target** 
-          * Duration +          * [?]: **unknown** 
-        * "sendMessage" +        * **"fireEvent"**: Fires the event on the target's event handler. **aShipObj** is the ship that fired it. 
-          * Target +          * SpaceObject: **target** 
-          * Message +          * String: **event** to fire 
-        * "attackArea" +        * **"waitForUndock"**: 
-          * Target ((Unknown)) +          * SpaceObject: **target** 
-          * Integer ((Unknown)) +          * Integer: **duration** 
-          * Integer ((Unknown)) +        * **"sendMessage"**: 
-        * "holdAndAttack" +          * SpaceObject: **target** 
-          * Target +          * String: **message** 
-          * Integer ((Unknown)) +        * **"attackArea"**: Ship attacks all enemies that are within a specified distance of a specified object for a specified time, probably in random order<sup>verify</sup> 
-        * "gotoPos" +          * SpaceObject: **target** 
-          * Position vector +          * Integer: **distance** in light-seconds 
-        * "waitForThreat" +          * [Integer]: **time** in seconds; infinite by default. 
-          Duration +        * **"holdAndAttack"**: Same as **attackHold** 
-        "sentry" +          * SpaceObject: **target** to attack 
-          Target +          * Integer: **duration** in seconds 
-          * Integer ((Unknown))+        * **"gotoPos"**: Ship moves to the specified position. 
 +          * Position: **destination** 
 +        * **"waitForThreat"**: Ship waits until it detects an enemy or the **duration** passes. 
 +          * Integer: **duration** in seconds
 === Example === === Example ===
  
-<code lisp>(shpOrder gPlayerShip 'wait)</code>+<code lisp> 
 + (shpOrder 
 + (random (sysFindObject Nil "s A")) 
 + 'gate 
 + (random (sysFindObject Nil "G A")) 
 + ) 
 +</code> 
 + 
 +Orders a random ship in the system to exit through a random gate as soon as all its orders are done.
  
-Returns True, ordering the player to wait doesn't do much. 
 Return to [[:Functions]] list Return to [[:Functions]] list
  
modding/function/shporder.txt · Last modified: 2017/06/25 05:06 by 0xabcdef