rdk2.txt contains a more up to date list of commands and system variables.

Update: For a robot to recieve requests, it must implement the HandleRequest(id,params) function.
	See Fire.rba for a demonstration

Some Robot Specifics:
Robots are written in VBScript, but the robots should capable of creating activex objects in case someone would prefer to write their own scripting language from scratch or write the robot in another language and compile it to an activex dll (good for large NN's) rather than write the entire robot in vbscript. "Allow Unsafe" must be checked to allow activex objects to be created.
Circle with radius of 17 units
Starting energy of 1000
Starting shields of 1000
Movement energy cost is equal to force needed to reach or maintain speed after 10% air resistance
Robot generates 1 unit of energy per turn. 2 when stalled.
For rotation, robot loses bodyturn/20 + gunturn/100 + radarturn/150 units of energy
Hitting a wall damages your shields. So does hitting a robot or a missile.
When shields reach 0, it is replaced by a costly energy shield, which costs 1 unit of energy per turn.
Scoring is an equal combination of survival and enemies killed. It is as important to kill one enemy as it is to survive halfway through the game.
And there are various other things I can't remember at the moment.
A heading of 0 is north (up). Headings increase clockwise. Headings are between 0 and 360
When the body rotates, the gun and radar rotate with it. When the gun rotates, the radar moves with it.
A robot can move and turn at the same time.
A robot uses it's turn after the core sub exits


Functions:
AngleOf(x,y)
Returns the heading from 0,0 to x,y

LengthOf(x,y)
Returns the distance from 0,0 to x,y

Eval(e)
Allows you to evaluate expressions created at runtime. Useful if you want to simulate custom events.

IsFriend(index)
Returns true if the robot with that index has been assigned to your team.

Request(index,param)
Sends a request to the robot at that index. The param can be of any type. This is mainly for team communication, although the other robot does not have to be on your assigned team. If most robots recognize simple messages like "HATE x" and "CEASEFIRE" (return the passed message to agree) then some level of cooperation may be possible between different robots that are either in low ranks, share a common enemy, or share the same turf and can't afford to keep fighting. But for a robot to want to use this feature it would have to be able to detect if the other robot is keeping up its part of the bargain. This feature is also if you enter more than one of your own robots into a contest.




Subs:
DebugPrint a
Shows contents of a in the seemingly unused grey area beside the arena. Pauses game.

TellAudience a
Mostly for entertainment purposes. Sends a message to all connected users and puts it in the game log. Limit one message per game.

Exec c
Allows you to executes code created in a string at runtime. Useful for robots that change their state frequently.

Fire energy, proximity
Fires an energy missile. When the distance between the edge of the hull of a robot and the edge of the missile goes below the proximity, or the missile hits, the robot, the missile explodes. Missiles damage all robots in area, proportional to 1/distance^2.

Stall x
Completely stalls the robot's systems for x turns. There is an extra gain of 1 unit of energy per turn.

TransferEnergy index, amount
Transfers energy to another robot. 20% of the energy goes to waste.



Robot variables:
Name - Name of your robot
GunTurn - Gun increment per turn. -10 to 10
BodyTurn - -5 to 5
RadarTurn - -15 to 15
DesiredSpeed - Robot will gradually speed up or slow down to match, -10 to 10
RadarArc - 0 to 15. The scan width of the radar in degrees.


Read-only variables:
ArenaHeight
ArenaWidth
BodyAim - heading of robot body
CldAim - Heading of robot in collision
CldEnergy - energy of object in collision
CldID - Robot index of object in collision
CldMissile - Collision with missile or missile blast
CldRobot - Collision with robot
DtcEnergy - energy of detected object
DtcID - index of robot detected
DtcRobot - true if robot is in front of radar
DtcX - x position of detected object
DtcY - y position of detected object
Energy - your energy remaining
GunAim
GunHeat - higher values mean your energy missiles have greatly decreased energy
Index - your index
RadarAim
ScanDist
Shields - amount of shields remaining 0 - 1000
Speed - actual robot speed
X - your x position
Y - your y position
robotcount - number of robots fighting in match
robotsleft - number of robots still alive in this game
gamesleft - number of games remaining

