Age of Empires II AI Tools for Visual Studio (VSCode Edition)
Age of Empires was one of those hit games from the late 90s/ early 2000s that had a neat AI system. We considered the fact that its expert system could possibly be a scripting language. In that case, KnightThyme Tools decided to make a VS Code extension that would bring joy to AoE II content creators (specifically AI makers) anywhere. If you are reading this, then you have installed that extension.
2.1 Rule Counter
The rule counter is a neat visual on the right side of your status bar in which will display the number of rules (indicated by an opening parenthesis followed by "defrule") in your AI script. This can be toggled with a setting.
2.2 Syntax Highlighting
AoE II AI Tools not only contains a rule counter, but it also contains syntax highlighting support as well. As of right now, it is still being worked on. However, it does recognize key tokens such as
As questionable as it seems, there is linting support in AoE II AI Tools. However, it's still incomplete. The good thing is that it does work. The linter was crafted by the books when it comes to diagnostics, so the error codes and other info in Problems are the exact same as what you would see in-game (if you played the AI without fixing the issues first). The following error types are available in AoE II AI Tools:
More errors will be added here in the future.
Snippets were introduced into AoE II AI Tools early on in development, but weren't the focus of the extension until after its alpha release. To improve other features and to help future AI developers, more snippets will be added in the future. As of right now, there are only 4 snippets:
2.5 Signature Help
AoE II AI Tools does have signature help, and the funny thing is that it's stable (yes, it works pretty good). This feature has been tuned over a period of 7 months to ensure that it works properly due to issues that would sometimes pop up in the past with it. An interesting quirk of the signature help feature in AoE II AI Tools is that it can work with Intellisense (specifically, code completion) to give users the correct options for the active parameter (the text highlighted in bold at the top in parentheses). However, that part of this is technically the only part of this feature that is experimental.
2.6 Constant (Symbol) Detection
There is support for Symbols in AoE II AI Tools. However, it only works in Workspace mode, so it shows every symbol in the current directory. The symbols, however, aren't the ones you expect. They are constants, or variables that cannot be changed. You can use the Command Palette to find each symbol. Also, upcoming is a feature for finding references to constants or other
2.7 Codelens support
This feature is present and functional yet. Codelens has been implemented as of February 22nd, 2019. It only shows Codelens results for constants, however. This can be toggle with a setting.
More information will be provided here every update.
2.8 Hover Support
There is hover support in AoE II AI Tools. However, some fields and content is missing as it only shows you the syntax and parameters.
2.9 AI Inspector
The AI Inspector is a special tree-view panel that is automatically added to VSCode when AoE II AI Tools is installed. It's prime function is to show the user information about certain parts of the AI such as constants, files (if loaded), and rules. However, only one works as of right now (Constants). That section of the inspector shows you each constant's name and it's value (an integer from -32768 to 32768) in rows. More updates will ensure all sections are covered by May 2019.
2.10 References Support
There is support for finding references in
The only clear dependency (for testing) is Age of Empires II (Age of Kings or later). If you want to work with UserPatch (UP) you will need one of the following:
4. Extension Settings
This extension contributes the following settings:
5. Known Issues
All issues from the past release have been resolved. However, more will be covered in this section as issues are seen and noted.
If you find an issue, report it.
6. Release Notes
Currently in dev.