AFK Bots -- Mutator For Unreal Tournament (UT99)
Author: Marscaleb
version 1.0 (2026-8-16)

Overview:
This mutator will replace players who are not actively playing with a bot.

The intent is for events and LAN parties where a computer may remain continually connected to a game but people might be coming and going as they please.  This way there are not players just standing around doing nothing; such players are taken out of the game and a bot is added to replace them, keeping the player count at its designed value.

When a game starts, players will default into an "AFK Mode" unless they have already pressed [Fire] to signal that they are ready.  Players in AFK mode will be silently removed from gameplay; they still show up in the player list but can't interact and will just be a camera floating in the level like a spectator.  Messages will appear on their screen encouraging them to play.  After a few seconds of being in AFK mode a bot will be spawned to replace the AFK player, and the player's view will spectate that bot.
Simply press [Fire] at any time to rejoin the match.  If a bot has been spawned to replace the player, it will be taken out.

This mutator works well when partnered with the AutoFill mutator.
This mutator is only intended for network games.


********************************************************************************************
Installation:
1) Copy the contents of this zip into the System folder of your Unreal Tournament directory.
2) Likewise copy those files to the System folder of all machines intended to connect as clients to your game.
3) Edit the AFKBots.ini file to your liking on the machine that will run the server.
4) On the server, edit UnrealTournament.ini, and in the section [Engine.GameEngine] add the line:
ServerPackages=AFKBots
at the bottom, with all the other "ServerPackages" lines.  If you do not do this, the mutator will not run properly on the clients and they will not see the messages displayed on their screen.


********************************************************************************************
Options for AFKBots.ini:

SDelay: Gates how fast a freshly-spawned player is put into AFK mode.  You should likely only need to leave this at 1.

bCoopStart: Set this True for gametypes that do not utilize the default ElapsedTime or RemainingTime variables.
i.e. CoopGames/SP Games etc.    Can also be used with practice matches or Tournament Games that require pressing fire
to start the match.  If true it should replace the default Waiting state with the AFK enhanced waiting state.
If False in practice or Tournament Mode games, you will have the default waiting state until fire is pressed once and
then the enhanced SpecStart mode should begin.

bReturnIfDeadTooLong: If true, a player who dies and doesn't respawn will be forced into AFK mode.  If false, players can only enter AFK mode if they are not active when the match starts.  (Best when left "true".)

HeaderText: A line of text displayed at the top of the screen for players who are in AFK mode.  Ideally set to a welcome message for the event.  Leave as blank if you don't want anything to be displayed.

BannerText: A larger piece of text displayed in the center of the screen, meant to be eye-catching for anyone walking by the unnattended computer.  Change it to BannerText="" if you don't want anything to display.

bFlashingBanner: If true, the banner text will cycle through colors to make itself more eye-catching.  If false, it will just remain the default blue.

NotReadyText/ReadyText/inGameText: These are strings that are displayed to inform the player to press [Fire] to join the match.  There's really no point in changing them but they can be if you desire.


********************************************************************************************
Credits:

This mutator is based on SpecStart, orignally created by Mr.Loathsome (who has since passed away.  Thank you for your work!)

This version was created by Caleb Child.
Thanks to all the people on UT99.org who helped me write the code:
Barbie
sektor2111
lol
ShaiHulud
OjitroC



********************************************************************************************
Version History:

1.0 (2026-8-16) - Initial release