Making Bots Work With Your Map
After making a map in the Level Editor, the AI bots in Awesomenauts will not function without adding AI nodes and paths.
This section informs you on how to make the default Awesomenauts bots work with custom maps.
Adding AI Nodes, pathing edges and Named Areas[edit | edit source]
Before starting, it is recommended to open a Template level with AI objects, like TemplateLanes, and explore the settings. Enable "AI objects" in the editor to show them. The second checkbox allows you to change them and move them.
To add your own AI nodes, simply cycle throught the creation list till you find "Create AINode". Click it and a node will appear on screen. Like any other object, you can also copy-paste nodes using cntrl-c and cntrl-v. Leave the variables alone for now. These nodes will be used by the AI bots to get from one point to another.
To add AI path edges, select two AI nodes (hold cntrl) and click the following icon in the editor:
A line should appear between the nodes. Now the AI bots will know that taking a path between these two nodes might be an option for them.
Named Areas are also used to help the AI bots know what to do. Specifically they tell a bot where they are and allow for forced behaviour. Enable "Named areas" in the editor to show them in the Template maps. To add a new one, cycle throught the creation list and click "Create NamedArea". These can be named to enforce certain behavious. A reference to all used names is in the section below.
Starting the level with only some nodes and path edges still is not enough. Try it and bots will most likely get stuck quickly. Nodes and areas will need to have the proper names.
Naming AI Nodes[edit | edit source]
AI nodes need names in order for the AI to understand which node to path towards. You can give a node a name by selecting it and filling in the "name" variable.
Here is a list of the most relevant names for AI Nodes and their function. Some names end with _0, this means this node is for the RED side of the map. Change it into _1, will make it work for the BLUE side.
These nodes are essential to any proper AI supported map:
|REGENHOME_0||place in shop, used to determine where shop/home is|
|UPPERLANE||place in middle of upper lane, used to move to upper lane (important for AI when they get out of droppods you need either an UPPERLANE or BOTTOMLANE)|
|BOTTOMLANE||place in middle of bottom lane, used to move to bottom lane (important for AI when they get out of droppods you need either an UPPERLANE or BOTTOMLANE)|
|FINALSTAND_0||place in front of base, used to determine where to go for attacking the base|
|behindDrill_0||place behind base, used to determine where to go for defending the base|
|bottomFirstTower_0||place in front of bottom first tower, used to determine where to go for attacking/defending the turret|
|bottomSecondTower_0||place in front of bottom second tower, used to determine where to go for attacking/defending the turret|
|upperFirstTower_0||place in front of upper first tower, used to determine where to go for attacking/defending the turret|
|upperSecondTower_0||place in front of upper second tower, used to determine where to go for attacking/defending the turret|
Other useful node names:
|FIRSTHP_0||place on an HP pack (close to base)|
|UPPERHP_0||place on an HP pack (upper lane)|
|BOTTOMHP_0||place on an HP pack (bottom lane)|
|CENTERHP||place on an HP pack (center of map)|
|healthBehindSolarBoss_0||place on an HP pack (near solar boss)|
|UPPERLANESECOND_0||place in upper lane on specified side, used for pushing|
|BOTTOMLANESECOND_0||place in bottom lane on specified side, used for pushing|
|NEUTRALSIDESPOT_0||place in jungle near sides|
|NEUTRALCENTERSPOT_0||place in jungle in center|
|NEUTRALUPPERSPOT_0||place in jungle upper area|
|NEUTRAL_hallway_0||place in jungle|
|aboveNeutralSideSpot_0||place above neutral side spot node, often used by fliers|
|aboveTopLane_0||place above upper lane, often used by fliers|
|aboveBase_0||place above base, often used by fliers|
|aboveBottomFirstTower_0||place above bottom first tower, often used by fliers|
|aboveBottomSecondTower_0||place above bottom second tower, often used by fliers|
|aboveUpperFirstTower_0||place above upper first tower, often used by fliers|
|aboveUpperSecondTower_0||place above upper second tower, often used by fliers|
|solarboss_0||place near solar boss|
|belowLaunch_0||place below a jump pad, used to jump when below a jump pad|
|jumppadCenter_0||place near jumppad, used to go to a jump pad|
|hideAreaTop||place in top hide area, used for hiding|
|hideAreaCentre||place in center hide area, used for hiding|
|hideAreaBottom||place in bottom hide area, used for hiding|
|hideAreaSide_0||place in side hide area, used for hiding|
|invisibilityItem||place near point of interest, used by invisibility orb in Aiguillon|
|TELEPORT_IN||place on portal entrance, used to go in portal|
|TELEPORT_OUT||place on portal exit, used to go out of portal|
AI Path Edge variables[edit | edit source]
AI Path Edges can also be selected. They have a set of variables that can be changed to change the behaviour of bots further. Here are the variables, their possible values and function.
|Variable name||Possible values||Function|
|direction||BOTH, AB, BA||the direction this connection connects nodes, used to limit the direction the AI can go, visualised by an arrow on the connection|
|classes||any naut class name, empty||used to limit the connection to or from certain nauts, often used to make nodes purely for fliers|
|including||true/false||setting this to true will make the classes variable ONLY used the specified classes, while setting it to false will EXCLUDE the specific classes|
|allowed Teams||TEAM_ZERO, TEAM_ONE, empty||used to limit the connection for a certain team, leave empty to make it neutral|
|check collision||true/false||used if the AI should check if there is collision between the nodes, if so, the connection will be ignored; often used for team walls and turrets|
|weight||a numerical value||how “easy” the AI sees this path, the lower the number, the more likely it will take it|
Named Area names[edit | edit source]
Named areas are essential to making the AI work well. Like before, it is recommended to check out the Template levels before adding any to your own map. Here is a list of names for most Named areas and their functions. Some names end with _0, this means this node is for the RED side of the map. Change it into _1, will make it work for the BLUE side.
These Named Areas are essential to any proper AI supported map:
|Named Area name||Function|
|STARTAREA||used to check if inside the droppod area|
|NOFLYZONE||used to limit fliers and multi jumpers|
|HEALAREA||used to check if inside the heal area|
|TELEPORTPOSITIONZERO||used to determine where red player/AI teleport leads to|
|TELEPORTPOSITIONONE||used to determine where blue player/AI teleport leads to|
|AREAHOME||used to check if inside of shop|
|AREAHOME_0||used to check if near a base|
|AREAUPPER_0||used to check if in upper lane on specified side|
|AREABOTTOM_0||used to check if in bottom lane on specified side|
|AREACENTER||used to check if in center of the map|
|AREAFIRST_0||used to check if behind all turrets|
Droid AI specific named area names:
|Named Area name||Function|
|GOUPSTOPZERO||used by red droids to wait for an elevator|
|GOUPSTOPONE||used by blue droids to wait for an elevator|
|GOUPJUMP||used by droids (using aiFileName "AIMeleeCreepUp") to force a jump|
|GOUPSUPER||used by super droids to force a jump|
|GODOWNJUMP||used by droids to force dropping down a glass platform|
Other useful named area names:
|Named Area name||Function|
|HEALAREACLOSE||used to check if the hear area is close|
|BASETOP||used to check if on top of base|
|CREEP_AREA||used to check if in the creep area (where they walk)|
|JUNGLE||used to check if in the jungle area|
|JUNGLE_0||used to check if in a side specific jungle area|
|AREACENTERBOTTOM||used to check if in bottom center of the map|
|NODOUBLEJUMP||used to limit multi jumpers|
|CORNER_STUCK||used to get check if stuck in a corner, mostly used for fliers|
|HIDE_AREA||used to check if in a hide area|
|HIDE_AREA_TOP||used to check if in upper hide area|
|HIDE_AREA_BOTTOM||used to check if in bottom hide area|
|HIDE_AREA_SIDE_0||used to check if in side hide area|
|SOLAR_BOSS_WARNING_0||used to check if near solar boss|
|FREECREEPS||used in AIStation to press the creep button|
|ABOVEENEMYJUMPPAD||used to check if above an enemy jump pad|
|DONTFLY||used to limit a flier’s flight|
|FLYUP||used to encourage a flier’s flight|
|BOTSTOP||used to make a bot stop for a very short duration, also works mid-air|
|HAZARDAREA||used to check if above the worm button to press it|
|WORM_AREA||used to check if in worm’s reach|
|NEAR_WORM_AREA||used to check if near the worm|
|NEAR_WORM_BUTTON||used to check someone is near the worm button|
|ABOVE_WORM_BUTTON||used to check if someone is on the button|
|DROPWARNING||used to limit a drop down from platforms|
|PITAREA||used to check if in an area with a pit|
|DEADLY_DROP||used to check if falling into a pit|
|CAPTUREAREA_0||used to destroy creep and press CAPTUREBUTTON_0 when the behavior AICreepFlag is used|
Final pointers[edit | edit source]
- Do not touch the uniqueID variable in a AI node. Duplicate IDs will break the AI. Same applies for duplicate names.
- Make sure all AI nodes are connected.
- If an area has no Named Area box, you are most likely missing some boxes.
- With custom AI's, you can easily make bots react to your own Named areas.
- There is an "ideal distance" between nodes, the next node should be reachable through a simple action (for example: walk left + jump).
- For a better understanding of how bots use nodes to move around, Joost wrote a detailed blog post about it.
- Trial and Error is the key to success!