A record of all changes to the Javascript API features since it's initial release...

 

Overview

Warzone's JS API is still relatively new and undergoing regular changes, most of which are addition of new features.

If you want to make a mod that uses scripting, it's important to be aware of the of compatibility between different releases, especially during beta release cycles.

The following information is available:

The script

Needs technical review

To gather information I made a fake AI script that, after a 15 second delay, lists all JS API features in the AI's console (so you need to enter debug mode and switch to the AI player to see the list).

Here's that script:

var globalobj = this;


function tracebot() {
  console("game version "+version);
  
  var gk = Object.keys(globalobj);
 
  var alphaSort = function(a,b) {
    if (a<b) return -1;
    if (a>b) return 1;
    return 0;
  }
  gk.sort(alphaSort);
  var ar = [];
  
  while (gk.length) {
    ar.push(gk.pop());
    if (ar.length>8) {
      console(ar.join(','));
      ar = [];
    }
  }
  if (ar.length) console(ar.join(','));
}
function eventStartLevel() {
  setTimer("tracebot",15000);
}

After outputting the list, I screen grab the console and then manually update the table further up this page.

Gallery of screen grabs:

A huge thanks to Artofeel and NoQ for getting 3.1 Beta 1 screenshots!

Compatibility Matrix

Articles: