Versions Compared

Key

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

...

  • name – the AIs name that will be displayed to end-users when they set up a skirmish or multiplayer game
  • js – the filename of the AI javascript file (which must be in same folder as the ".ai" file)

Challenge scripts

Challenges may load scripts as well, if a [scripts] section is present in the challenge file, and has the keys ”extra” or ”rules”.

...

Code Block
themeEclipse
languagenone
titleSetting player 2 to use the Semperfi AI
linenumberstrue
[player_2]
team = 1
difficulty = "Medium"
position = 4
ai = semperfi.js

See also: Create an AI that's only available in challenges

Events

The code in a javascript file is triggered by specially named functions called Events.

...