Skip to content
RPaladin edited this page Nov 19, 2022 · 47 revisions

How it Works

The Armory engine is distributed as a Blender add-on & external SDK.

Installation

  1. Download the latest Blender 3.3.x LTS version.
    NOTE: Blender 2.9.3 LTS and earlier versions are no longer supported and not compatible with Armory.

  2. Download and unpack the Armory SDK.

    "Where should I unpack the SDK?"

    You can unpack the SDK virtually everywhere, but to prevent strange errors:

    • Make sure it is not in a location where Blender or Armory do not have the permission to read, write or execute files (e.g. in C:\Program Files\ on Windows).
    • Do not save the SDK in a path that is handled by a cloud software (e.g. OneDrive), the software might remove files on your local drive after synchronization with the cloud.

    The same goes for your personal project files!

  3. In Blender, navigate to Edit - User Preferences:

image

  1. Navigate to the Add-ons panel:

    image

  2. Click the Install... button:

    image

  3. Navigate to your extracted armsdk folder, then select the addon script armory.py:

image

  1. Once the addon is successfully installed, enter the keyword "armory" into the search-bar:

    image

  2. Finally, enable the Armory add-on via the checkbox that should now be accessible/visible:

    image

If you experience issues installing or using Armory, please look at Wiki: Troubleshooting first. You can also open an issue in the issue tracker on GitHub.

How to Verify Armory is Installed Correctly

  • Click on the small arrow that is to the left of the enabled addon checkbox in order to open the Armory settings page.

    • Check whether the SDK Path field that points to the Armory SDK folder is correct. The SDK folder is the folder that contains all of the sub-folders: armory, iron, Kha, Krom, etc).

      IF the SDK Path is blank: fill in the SDK Path field by clicking on the folder icon, then navigate to the file path at which you have stored the Armory SDK folder and then click on the Accept button.

  • Save your .blend file and hit the Play (F5) button, located in the Properties - Render - Armory Player panel to test whether the installation was successful.

  • If you do not see any user-interface relating to Armory in Blender, check the console for error messages.
    On Windows the console can be opened via Window - Toggle System Console, on other operating systems you need to run Blender from a terminal to see the console output.

Next Steps

Armory comes with a version of Haxe and Kha, so you do not need to install those components independently.

Continue to the Playground tutorial to learn more. There is also a list of tutorials made by the community.

Code Editor

You can choose which external code-editor Armory should open scripts in.

  • In Blender, navigate to the User Preferences Editor.

  • Navigate to the Add-ons tab.

  • Locate to your installed Armory add-on.

  • Toggle Show Advanced.

  • Under Code Editor, select the external editor you wish to use.

System Default

Armory tries to automatically select the correct editor. This works as follows:
If an environment variable VISUAL is set, the editor is selected from the path specified there. If VISUAL does not exist, the environment variable EDITOR; which is actually intended for console-based editors, is used instead. If both variables do not exist, the operating system tries to choose the correct editor itself.

VS Code (recommended) | Kode Studio

1. Download and install Visual Studio Code and the Kha Extension pack or Kode Studio.

2. Open Armory addon's settings on the Blender Settings.

3. Toggle Show Advanced if it's disabled.

4. Select the VS Code | Kode Studio option in the Code Editor dropdown.

5. Point Code Editor Executable to the executable file of your installed copy:

  • For Windows, it may be in one of the following directories, depending of the version you have installed:

    • C:\Program Files (x86)\Microsoft VS Code\

    • C:\Program Files\Microsoft VS Code\

    • C:\Users\{UserName}\AppData\Local\Programs\Microsoft VS Code\

  • For Linux, by default it's installed in /usr/bin/code or snap/bin/code if you are using snap.

You can check the install dir by running which code or whereis code in the terminal.

Setting up VS Code

6. Finally, to make sure the Kha Extension Pack uses the correct versions of Haxe, Kha and Krom:

  1. Open the command palette by pressing F1.

  2. Then type Preferences: Open User Settings (JSON) and click on the option with that label.

    To change the configuration on a per-project basis, select Preferences: Open Workspace Settings (JSON) instead.

  3. Paste the following three lines at the end of the now opened settings.json file inside the brackets:

    "haxe.executable": "<ArmorySDK>/Kha/Tools/<OS>/haxe",
    "kha.khaPath": "<ArmorySDK>/Kha",
    "krom.kromPath": "<ArmorySDK>/Krom"

    Replace <ArmorySDK> with your SDK path and <OS> with the folder in <ArmorySDK>/Kha/Tools that matches your operating system. On Windows, you need to append .exe to the path.

    Save the file after adding and modifying these lines and you're good to go!

Sublime Text

  • Download Sublime Text + (optional) Haxe Bundle from Sublime's PackageControl

  • In the Armory preferences, point Code Editor Executable to the executable file of your installed copy like it is explained in the section for VSCode above.

  • Then, for each project a basic _[project_name].sublime-project_ file gets created upon export if it doesn't exist yet.

Custom

  • Point Code Editor Executable to the executable file of your custom editor.
Clone this wiki locally