Okom

Bot Backfill - Halo Infinite Script

Bot Backfill

A script that automatically fills bots in the place of missing players and removes excess bots mid-game if players join to fill their spot.

  • Solo
  • Forge
  • Script
  • Resource
Bot Backfill KOTH mode image Bot Backfill FFKOTH mode image Bot Backfill BTB:CTF mode image Bot Backfill CTF mode image
Image 1 thumbnail
Image 2 thumbnail
Image 3 thumbnail
Image 4 thumbnail

Bot Backfill is a modular script that fills in NPC bots into a match in order to substitute players until real players are able to join in. Bot Backfill is easy to use as it only requires a supported mode to be loaded up, which allows for the Bot Backfill functionality to work on any map.

The Bot Backfill logic itself is a custom-made script snippet that can be added onto any existing mode with a feature dubbed 'node mode' in Halo Infinite's Forge. Due to every mode variant requiring a version with the Bot Backfill logic attached, I've created ~80 variants of modes that include the script logic within them. All that the end-user needs to do is to load the desired mode.

The need for the script came from there not already being a solution available that suited my needs. As with many other things of that nature, I took it upon myself to create a solution that not only suited my needs, but took feedback from the community and improved on the design in order to make it even better.

Bookmark the script modes here to use them it in Halo Infinite.


Main node graph logic for the script Logic for bot difficulty and determining largest team Logic for removing and adding bots
Image 1 thumbnail
Image 2 thumbnail
Image 3 thumbnail

The script works by running logic that checks what the player count situation is at the current moment, compares it to a predetermined value of the desired amount of total players and then adds or removes bots based on the needs. This cycle is repeated until the desired conditions are met, at which point the script halts. The script will be ran once again on set triggers such as On Player Joined, On Player Exited and On Player Team Change.

A single bot is added via the pre-game mode options at the start in order to store the bot's difficulty variable for later. This means that the lobby host can also change the difficulty of this first bot in the mode options, resulting in that difficulty being assigned to every bot for the duration of that match.

The logic also has a condition for making sure the team sizes are equal. When bots are added or removed, the script does so by always adding a bot to the smallest team first or removing a bot from the largest team first. In a situation where somehow a team is larger than the other, such as when a player voluntarily switches team, the logic picks up on this anomaly and adjusts the bot count per team accordingly.


Bot Backfill Extraction mode image Bot Backfill Slayer mode image Bot Backfill Infection mode image Bot Backfill Attrition mode image
Image 1 thumbnail
Image 2 thumbnail
Image 3 thumbnail
Image 4 thumbnail

This scripting project taught me the importance of writing modular and future-proof node graph code as I noticed on multiple occasions how easy it was to add onto the script due to the foundation being so strong and easily expandable. When adding new features such as checking the team size, I was able to utilize my modular custom events for adjusting the bot count instead of having to write bespoke logic for that specific action.

This script has had a high positive impact on Halo community members who are looking to host custom game lobbies, but don't quite have the required player count. It has been used to fill in testing lobbies in order to get a full player count experience and I personally always use it when starting up any custom game as it helps with player retention rates due to new players seeing that there are already eight or more players running around on the map instead of just one.


Development summary:

Ring icon on a grid

Script Idea

The idea came from a need for wanting a bot backfill solution that would work on any map. At the time of brainstorming the initial logic, there was no such solution available.

Ring icon on a grid

First release

The first release of the script was not publicized much as I didn't feel like it was fully ready. During this time, I shared the suite of modes with some Forger friends who I got valuable feedback from and was able to add more features.

Ring icon on a grid

Rewrite and more features

After a round of being in the wild with some Forgers helping me find bugs, I got back to the drawing board where I decided to fully rewrite the logic. With a clear intention of the features, this made writing the code cleaner.

Ring icon on a grid

Public release

A suite of around 50 modes with the script were released with a strong feature foundation and a standardized mode naming scheme: "BOT-X | Mode Name" for searchability. The reception of the script from the community was great. Read more

Ring icon on a grid

Bot addition logic update

Bots were being added to the game after the gameplay started, which meant that they spawned in on a bit of a delay. Changes were made to the logic to spawn the bots before gameplay start, which made the bot addition process very seamless. Read more

Ring icon on a grid

Team balance logic update

Following the discovery of an uncommon bug, I added an extra check to the logic that would make sure the two teams were balanced at all times, if possible. This also meant that players could switch teams and still keep a balanced playing field. Read more