Enemy Editor
Editor Tool created for Level Designers in Bean Engine for Spite: Bleeding Skies

Reasons for the tool
While working on the enemy AI in Spite: Bleeding Skies I wanted our level designers to be able to tweak values for each enemy type without having to ask a programmer. I also wanted them to be able to use their time effectively by being able to tweak values without having to restart the exe-file after every change. This tool has been a staple at Water Leaks Studio and has been of value for every game project we have created.
Features
All menues in the editor are made using ImGui and the functionality of the editor is made with our student made engine called Bean Engine.
Changing basic values per enemy in realtime
The first available feature was the ability to choose an enemy type and change basic values like speed, vision radius, idle duration, max health, attack distance and damage dealth. When clicking "Apply Changes", the changed values would be applied to all enemies of that type and updated in the open exe. This made it easier for level design to change values often and quickly reach the variation they wanted.



Read specific enemy & behavior tree
The level designers asked for more information on specific enemies, like being able to see what node in their behavior tree they were currently in and position. I implemented the feature to right click an enemy to get a rundown of their entire behavior tree to show what options they had to choose from and how the behavior tree was built. For easier readability I added a marker that would show the user which enemy they have selected.



Documentation
As documentation I added a post on our Notion (our platform for important information).
Click here to see the documentation
Prerequisites
1. You’ll need a Level Scene with Enemies in it.
- Please note: your changes will not be saved once you exit the game. You will have to input your changes in the appropriate json file
How to change enemy values in the Enemy Editor
1. Open up your Level Scene with enemies in it.
2. Press key “V” on your keyboard to show the enemy editor. That will open an ImGui window that should look like this:

3. Now you can click on the button with your chosen enemy type to show their values.
- Please note: You will need that enemy in your scene for the values to show up. Otherwise, you will get an Error message like this:

4. When you’ve clicked on the button with the enemy of your choice, you’ll get a pop up menu showing the current values of chosen enemy. You can change these values however you want and click “Apply Changes” when you’re done.
- Please note: “Apply Changes” will change ALL enemies of this type.

How to see enemy Behavior Tree
1. Right click on the enemy you’d like to inspect. This will spawn a cone above the enemy’s head to make it easier for you to know which enemy you’re inspecting.

2. Click on the button “See behaviour tree” to get the pop showing information about that specific enemy.

3. You’ll now get a Popup showing specific details about the enemy you’ve selected. Enemy type shows you the type of enemy you’ve selected. Current position gives you the position of the enemy. Current direction gives you the velocity vector used to calculate trajectory Current Node shows the active node in the behaviour tree. Below the current node you will be able to see the entire behaviour tree. Tabs means that the node is part of the node above.
4. When you right click on something that’s not an enemy, the behaviour tree window will close and you’ll no longer have a selected enemy.

Further Improvements
When I have more time I would like to add pop up warnings instead of the warnings only showing up in the consol window. Right now it looks like the picture below, but in my experience people usually disregard or ignore messages in the console window. Therefore I would like for there to be pop ups on screen to guide the user better.

I would also like to add more features like a button to automatically update the json file with the values when level design are done tweaking instead of them having to open the json files and input the values diretly.
Another improvement I would like to implement is the ability for level design to create their own behavior trees for each enemy and save these presets for the program to access when creating enemies.