backport.dorder.js

Overview

Adds missing DORDER (droid order) constants that are applicable to the .order property of Droid objects.

Availability

 Requires backport.js

Compatible with all versions of Warzone from 3.1 Beta 1 and above.

If constants are already defined, dorder.js will not overwrite them.

Notes

The JS API is gradually exposing more of the DORDER constants over time, however most of the constants are usable with releases going right back to 3.1 Beta 1.

To use dorder.js, download it and include() it in your script - all missing orders will automatically be defined ready for use in your script. Existing constants will not be overwritten.

The C++ code has a DORDER_TEMP_HOLD while the JS API has a DORDER_HOLD – I've chosen to use the JS API's name as it's going to be more widely documented.

Some of the orders can't currently be issued to a droid via a script - for example there's no function capable of accepting the parameters required for DORDER_LINEBUILD, and the game is hard-coded to prevent AI players from using DORDER_RECOVER.

Full list of constants

Here's a list of all the DORDER constants you'll have after including dorder.js in your script:

  • DORDER_REPAIRInstruct a construction droid to repair a damaged Structure object.
  • DORDER_DROIDREPAIRInstruct a repair droid to repair a damaged Droid object.
  • DORDER_PATROLInstruct a droid to patrol between it's current location and a specified location, attacking any enemies it detects along the way.
  • DORDER_DEMOLISHInstruct a construction droid to demolish one of your structures.
  • DORDER_STOPInstruct a droid to stop what it's doing.
  • DORDER_COMMANDERSUPPORTAssign an attacker droid to a commander droid so that it will attack whatever the commander droid targets.
  • DORDER_MOVEInstruct a droid to move to a new location.
  • DORDER_RTBInstruct a droid to return to your base.
  • DORDER_FIRESUPPORTAssign a attacker droid to a sensor droid so that it can attack whatever the sensor droid targets.
  • DORDER_RECYCLERecycle a droid...
  • DORDER_REARMInstruct a VTOL to return to a rearming pad for repairs and rearming.
  • DORDER_LINEBUILDIndicates that a construction droid is building a line of structures (eg. a long wall).
  • DORDER_ATTACKInstruct a droid to attack something.
  • DORDER_BUILDInstruct a construction droid to build a Structure object at a specific location.
  • DORDER_NONEIndicates that a droid is currently idle.
  • DORDER_RETREATInstruct a droid to retreat to a pre-defined retreat point. Does not retreat to HQ! Read docs before using!
  • DORDER_DESTRUCTInstruct a droid to self-destruct!
  • DORDER_RTR_SPECIFIEDInstruct a land droid to go to a specific repair facility for repairs.
  • DORDER_OBSERVEInstruct a sensor droid to observe (target) a Droid object, Structure object, or even a Feature object.
  • DORDER_SCOUTInstruct a droid to "scout" to a new location.
  • DORDER_HOLDInstruct the droid to hold its current position until instructed otherwise.
  • DORDER_CIRCLEInstruct a VTOL to circle around a specific location.
  • DORDER_UNUSEDAs it's name suggests, this constant is not used.
  • DORDER_EMBARK
  • DORDER_RTRInstruct a land droid to go to a repair facility for repairs.
  • DORDER_TEMP_HOLDUse DORDER_HOLD instead of DORDER_TEMP_HOLD.
  • DORDER_GUARDInstruct a droid to guard a structure.
  • DORDER_DISEMBARK
  • DORDER_RECOVEROrder a droid to recover a collectible item such as an oil barrel or artefact (crate).
  • DORDER_HELPBUILDInstruct a construction droid to help with an existing structure building site.

Script

  File Modified

JavaScript File dorder_0.1.js Adds missing DORDER constants

Mar 03, 2012 by Aubergine

JavaScript File dorder_0.2.js Updated to use backport.js

Mar 05, 2012 by Aubergine

See also

  • Droids – quick reference of JS API features relating to droids
  • Droid object – query a droid's existing order via the .order property
  • .order – documentation of order constants + example code
  • orderDroid() – give a droid a simple order (that's not based on an object or location)
  • backport.orderDroid.js – backport the orderDroid() function to earlier versions of the game & add support for some additional orders
  • orderDroidBuild() – tell a droid to build a structure
  • orderDroidLoc() – tell a droid to perform an order in relation to a map location
  • orderDroidObj() – tell a droid to perform an order in relation to a game object