(info) This AI is still in early stages of development.

Babel on Warzone 3.1

Babel handles Warzone 3.1 gracefully...

 

Overview

Babel fills any cracks it finds in the JS API, meaning that it will run fine without modification on Warzone 3.1.

Obviously, because Warzone 3.1 doesn't have chat() and eventChat() features, no messages will be sent or received – this is actually quite useful if you want to test what happens when nobody replies to messages sent by your AI (wink)

Constants

Some Warzone 3.1 releases don't provide all the JS API constants or object .type properties that Babel API requires, so it fills the cracks as and when it finds them.

The following constants and applicable missing .type properties are dealt with should Babel stumble upon them:

Fake Chat

Babel's tower is built on the chat() function, so it's a bit of a problem if it's not found!

Babel creates a fake chat function that works as follows:

  • If the "to" parameter is meeventChat() will be called as if the message you're sending has just been received from someone else.
  • Otherwise, the message you're sending will be echoed to the console().

Should you need to, you can check if the chat() function is fake as follows:

if (chat.name == "fakeChat") {
	// chat messages won't get sent!
}
Availability BETA

Requires:

Contents

Jump to:

Babel API

Topics: