Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Droids are mobile game objects (items on the map), and have a huge number of properties and related API features...

 

Properties

Info
Inherits all properties of a Game object (id, x, y, z, player, selected, name, health, armour, thermal, born, etc.) then adds/overrides the properties listed below.
PropertyTypeDescriptionGame version
typeConstantDROID3.1
orderConstant

The current order (task) that the droid is doing:

Child pages (Children Display)
page.order
excerpttrue

... Constants were added over time so check each constant's doc page for version info.

3.1 ...

actionConstant

This is the action that the droid is taking to carry out it's current order, as defined in action.cpp.

Image Removed Currently the DACTION constants aren't exposed by the The constants are not currently exposed to JS API, however you can backport them with backport.daction.js.You can see a list of all actions, the number that represents them and what they mean in action.cpp.full list here: .action.

3.1
droidTypeConstant

Defines what sort of droid it is:

Child pages (Children Display)
page.droidType
excerpttrue

3.1
group

Number

NullNull 

<not defined> 

Defines what group the droid is in, or returns null if the droid isn't in a group.

If the droid isn't in a group then the group property will return null.

Warzone 3.1 and earlier:

If the droid isn't in a group then the group property won't exist!

3.1

Improved in 3.2

experienceNumber

A number representing the droid's experience.

This number can optionally be set using the setDroidExperience() function.

3.1
armed

Number

Null 

Defines the weapon capability remaining, as a percentage, for VTOLs.

Warzone 3.2.0:

If the droid isn't a VTOL, the property returns null.

So, 100 = fully armed, 0 = no shots left (the VTOL needs to go to a reaming pad before it can make more attacks).

Warzone 3.1 and earlier:

  • If the droid isn't a VTOL this property won't exist!
  • The armed property for machinegun and cannon VTOLS was broken in 3.1 branch, but fixed in the 3.2 branch.

3.1→3.2.0

Improved in 3.2

Deprecated in 3.2

isVTOLBoolean

Tells you if the droid is a VTOL or not:

  • true – yes
  • false – no
You can also use the isVTOL() function to find out if a droid object is a VTOL.
3.2
costNumberThe amount of power it cost to create the droid.3.2
isRadarDetectorBoolean

Does the droid have a radar detector turret?

  • true – yes
  • false – no
3.2
range

Number

Null

The maximum range of the droids weapon, or null if not applicable.

(question) It's not clear whether range will be present for sensors.

3.2
isCBBoolean

Does the droid have a counter battery (CB) turret?

  • true – yes
  • false – no
3.2
isSensorBoolean

Does the droid have a sensor turret?

  • true – yes
  • false – no
3.2
canHitAirBoolean

Can the droid attack aircraft (VTOLS / transports)?

  • true – yes
  • false – no
3.2
canHitGroundBoolean

Can the droid attack stuff on the ground (tanks, structures, features, etc)?

  • true – yes
  • false – no
3.2
hasIndirectBoolean

Does this droid have indirect fire capability (eg. artillery)?

  • true – yes
  • false – no
3.2
bodyString

The ID of the body that the droid is using. Some of the more common bodies are listed below:

  • "Body1REC" – Viper
  • "Body5REC" – Cobra
  • "Body11ABT" – Python
  • "Body4ABT" – Bug
  • "Body8MBT" – Scorpion
  • "Body12SUP" – Mantis
  • "Body2SUP" – Leopard
  • "Body6SUPP" – Panther
  • "Body9REC" – Tiger
  • "Body3MBT" – Retaliation
  • "Body7ABT" – Retribution
  • "Body10MBT" – Vengeance
  • "Body13SUP" – Wyvern
  • "Body14SUP" – Dragon
  • "TransporterBody" – Cyborg Transport
  • "SuperTransportBody" – Super Transporter
For a full list, including cyborgs and scavenger bodies, see: body.ini
3.2
propulsionString

The ID of the propulsion that the droid is using.

For a list of propulsion types, see: propulsion.txt

3.2
cargoSizeNumber

The amount of cargoCapacity the droid will consume if loaded in to a transport.

In campaign mode:

  • 1 – for all droids, regardless of body size

In other game modes, the cargo size is based on bodySize:

  • 1 – LIGHT bodies
  • 2 – MEDIUM bodies
  • 3 – HEAVY bodies
3.2
cargoCapacity

Number

<not defied>

For transports only, this defines the total capacity of the cargo hold.

For non-transport droids, the property will be undefined, so you should either check the property exists or that the droid is a transport before attempting to read the value.

3.2
cargoSpace

Number

<not defined>

For transports only, the amount of cargo space remaining.

For non-transport droids, the property will be undefined, so you should either check the property exists or that the droid is a transport before attempting to read the value.

3.2
cargoCount

Number

<not defined>

For transports only, this defines the number of droids in the cargo hold.

For non-transport droids, the property will be undefined, so you should either check the property exists or that the droid is a transport before attempting to read the value.

3.2
bodySizeNumber

The size of the droid's body, which can be used to determine the number of factory modules required to build it.

(question)

before you can build it:

  • LIGHT – All cyborgs, super-cyborgs, scavenger units, Viper, Bug, Leopard, Retaliation
  • MEDIUM – Cyborg transport, Cobra, Scorpion, Panther, Retribution
  • HEAVY – Super transporter, Python, Mantis, Tiger, Vengeance, Wyvern, Dragon

For more information, see: Working with Factories.

3.2
weapons[]Array of Weapon Status

An array containing basic information about the weapons attached to the droid. Each object in the array contains two properties:

  • .id – (not sure if this is implemented yet)
  • .name – the name of the weapon – use getWeaponInfo() if you want to get the associated Weapon Object.
  • .armed – the percentage (0 ≤ armed ≤ 100) of total shots remaining before the weapon needs to re-load or re-arm.
  • .lastFired – the gameTime at which the weapon was last fired
3.2
Div
classbox suggest

Tip:
There's an undocumented feature in the official Warzone Guide that lets you inspect stats for any droid configuration.

Div
classbox
Availability
Status
colourGreen
title3.1 b1+

Droid objects were introduced in:

  • Warzone 3.1 Beta 1 and above
  • Several updates to Base objects since then
  • Lots of new features planned for Warzone 3.2
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Include Page
.jslinks-droids
.jslinks-droids