• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Beta Release BotDetonator Mutator

Status
Not open for further replies.

Ducky

Super Moderator
May 22, 2011
6,358
237
Netherlands
I started a project for a bot detonator mutator. The name sounds odd, but the mutator will actually kick all bots as soon as a defined condition is reached.

I hope this mutator will reduce the complains about servers that are running bots. The mutator gives the ability to players to vote to kick all bots. Even so can admins set values which will arrange that bots do leave if for example 4 players are present. The admin can for example put 20 initial bots on his server to attract players. Then all bots will be removed if for example 4 real players have joined.
It will also prevent that people use the bots for easy XP gaining.

If the bots are all kicked out, then they will not leave any weapons behind on the battle-field. This will prevent that players vote away the bots to get there weapons.

New console commands:

  • Mutate KickBots
    This will start a vote session to kick all the bots. The command can be entered by any player.
  • Mutate AdminKickBots
    All bots will directly be removed. Only admins can use this command.
  • Mutate AdminSpawnBots [<number>]
    If used without parameter number, then all bots will directly be put back on the map. This will only work if MinPlayers is set to any value higher than zero and if the bots were removed because of a successful kick vote or admin kick command.
    This command can only be used by admins.
    If parameter number is greater than zero, then the number of bots will be added (split over both teams). The number of bots can not exceed MaxPlayers.
The above three commands can be entered on the in-game console. It is also possible to bind them to and key in your ROInput.ini file. This is the ROInput.ini on the players computer and not the one on the server.



Download:

The mutator can be found here: http://forums.tripwireinteractive.com/showpost.php?p=1121822&postcount=21


Installation:

  1. Download the mutator from above location
  2. Extract all files from the archive
  3. Place the config\defaultbotdetonator.ini and config\ROBotDetonator.ini files in the rogame\config folder on your server
  4. Place the cookedpcserver\BotDetonator.u file in the rogame\cookedpcserver folder on your server
  5. Restart your server(you need to do this or else the server will not find the mutator)

Activation:

  1. Open your servers web-admin tool
  2. Go to the Change Map page
  3. Select your game type and map
  4. At the Additional URL variables field you add ?mutator=BotDetonator.BotDetonator
  5. Now load the map
If you have more than one mutator running on your server, then you can load them with
Code:
?mutator=BotDetonator.BotDetonator,Mutator1.Mutator1,Mutator2.Mutator2
Configuration:

The configuration can be set in ROBotDetonator.ini (see installation instructions). These are the properties:

  • bKickBotsOnPlayerCount
    If true, then players will be kicked if the number of human players is equal to or above KickBotsPlayerCount. If bAllowBotsToReturn is true, then the bots will return if the number of human players becomes less than KickBotsPlayerCount.
    Default: true
  • KickBotsPlayerCount
    If bKickBotsOnPlayerCount is true, then all bots will be kicked if the number of human players is equal to or above this value. If bAllowBotsToReturn is true, then the bots will return if the number of human players becomes less than KickBotsPlayerCount.
    Default: 4
  • bAllowBotsToReturn
    If true and bKickBotsOnPlayerCount is also true, then the bots will return if the number of human players becomes less than KickBotsPlayerCount.
    Default: true
  • bKickAllBotsVoteEnabled
    If true, then players can vote to kick the bots.
    See also KickBotsVotePercentage and VoteTimeSpan.
    Default: true
  • KickBotsVotePercentage
    If bKickAllBotsVoteEnabled is true, then all bots will be kicked if the number of votes is equal to or above this percentage.
    All votes have to be made within VoteTimeSpan or else the voting is cancelled. A second vote by the same person will cancel his previous vote.
    Default: 50.0 (%)
  • VoteTimeSpan
    The time span in which all players should vote. The time span starts directly after a player initiates a vote (first kick bots vote). All votes will be cancelled if this time expires.
    See also bKickAllBotsVoteEnabled and KickBotsVotePercentage.
    Default: 120.0 (seconds)
  • bDetonateInsteadOfKick
    If set to true, then the bots will detonate (the protected area animation) instead of just die when kicked out.
    Default: false
  • bNotificationMessageEnabled
    If true, then a notification message will be send to a recently spawned player. The message will give him a brief instruction on how to submit a kick all bots vote. The messages will not appear if the voting is disabled or if there are no bots.
    See also MutatorNotificationMessageDelay
    Default: true
  • MutatorNotificationMessageDelay
    Delay time between player spawn time and displaying the notification message.
    See also bNotificationMessageEnabled
    Default: 10 seconds (minimal: 0; maximal 20)
  • bEnableLogging
    Config variable for enabling/disabling debug info logging (for debugging purpose).
    Default: false
The mutator is not yet white-listed. For now the server will become unranked if you use this mutator.


Sources (for those that want to see the inside of the mutator):

The mutator sources can be found in on an SVN server. The SVN repository can be accessed from here: https://82.169.110.143:8443/svn/BotDetonator/trunk

Read-only account:
Username: guest
No password required!
 
Last edited:
  • Like
Reactions: Cultivator
I'm having a problem to get the voting to work. I have overwritten the Mutate function in my mutator. Normally that one should be called if a console command isn't handled by some other mod or game engine, but it looks as if the Mutate function is never called at all. Just a simple mutator with only this will not even list the log in the server logs. Is there anybody out there that can help me with this?
Code:
class MyMutator extends Mutator;

function PostBeginPlay()
{
    `Log("[COLOR=Yellow]MyMutator is active!!![/COLOR]",, 'MyMutator');
    super.PostBeginPlay();
}

function Mutate(string MutateString, PlayerController Sender)
{
    `Log("[B][COLOR=Red]Mutate[/COLOR][/B]",, 'MyMutator');
    super.Mutate(MutateString, Sender);
}

function ModifyPlayer(Pawn Other)
{
    `Log("[COLOR=Yellow]ModifyPlayer[/COLOR]",, 'MyMutator');
    super.ModifyPlayer(Other);
}

function NotifyLogin(Controller NewPlayer)
{
    `Log("[COLOR=Yellow]NotifyLogin[/COLOR]",, 'MyMutator');
    super.NotifyLogin(NewPlayer);
}

function NotifyLogout(Controller Exiting)
{
    `Log("[COLOR=Yellow]NotifyLogout[/COLOR]",, 'MyMutator');
    super.NotifyLogout(Exiting);
}

defaultproperties
{
    GroupNames=("Mutators")
}
With the above (not much of a) mutator I do see all the yellow lines in the server logs, but never the red lines. Not even after a full round and after typing lots of none TWI commands in the console.
Anybody?
 
Upvote 0
I'm having a problem to get the voting to work. I have overwritten the Mutate function in my mutator. Normally that one should be called if a console command isn't handled by some other mod or game engine, but it looks as if the Mutate function is never called at all. Just a simple mutator with only this will not even list the log in the server logs. Is there anybody out there that can help me with this?

Are you invoking the function using console command 'Mutate <MutateString>'?
 
Upvote 0
Implemented most of the functionality and tested:

  • KickBots vote command --> working :)
  • AdminKickBots command --> working :)
  • AdminSpawnBots command --> working :)
  • Auto kick bots on current player count --> working :)
  • Auto spawn bots on low player count --> working :)
  • Bots harvest protection --> not working :(
    Looks like we are missing a mutator hook. Submitted a bug report for that one (see http://forums.tripwireinteractive.com/showthread.php?t=75880)
Binary can be obtained here:
http://82.169.122.43:8443/svn/Binaries/BotDetonator/trunk/BotDetonator.u

Username: guest
No password required!
 
Last edited:
Upvote 0
I have been trying to kick bots through the 'management console' through the webadmin.

Have entered

Mutate AdminKickBots

But get no noticeable response?

I don't use the in-game console for admin stuff. I dont even know how to log in through the in game version. It is just so quick and easy to have a web browser open with the web admin and jump out of game.
 
Upvote 0
I have been trying to kick bots through the 'management console' through the webadmin.

Have entered

Mutate AdminKickBots

But get no noticeable response?

I don't use the in-game console for admin stuff. I dont even know how to log in through the in game version. It is just so quick and easy to have a web browser open with the web admin and jump out of game.

It doesn't work trough the management console. It only works on the in-game console. You need to login as an admin (in-game) and then open the console and enter the command.
 
Upvote 0
Hi ducky,

What about the tank bots. Once the 'no bots' threshold has been met does this mean tank bots do not happen?

Just got a situation where tanks explode shortly after spawn and i have only seen it happen recently and only after the bot detonator has kicked all the bots.

Makes the tank commander most upset when not only his crew burns into flames but his tank also suicides.

Edit - this might be cause by something completely different.
 
Upvote 0
Hi ducky,

What about the tank bots. Once the 'no bots' threshold has been met does this mean tank bots do not happen?

Just got a situation where tanks explode shortly after spawn and i have only seen it happen recently and only after the bot detonator has kicked all the bots.

Makes the tank commander most upset when not only his crew burns into flames but his tank also suicides.

Edit - this might be cause by something completely different.

Hi Cat,

Only infantry bots will be kicked. Any bots attached to a vehicle will stay in-game. The mutator does also put a message in the chat window when the bots are kicked out. Please keep an eye on that. You can also enable the mutators server logs by enabling it in the mutators ini file. It will then write an entry in the log files if bots are kicked, and also the reason why.

Edit:
If a tank commander is in the tank and the bots would be kicked, then the tank should not even explode at all unless the tank commander would die too at that same moment.

Edit 2:
Did test it and indeed the tank blows up. I will look a bit deeper into the reason.
 
Last edited:
Upvote 0
Well, I was saying this, because our hardcore server can't use the mutator anymore without being unranked, since I restarted it yesterday. So I assumed that another version was white-listed, but not released yet.

I did not get any feedback from TWI about the new version already being white-listed or not. I just tested both the old and the new release. The old release now makes the server unranked. The new release does keep it ranked, so they already did white-list my new release. The download link in the OP does point to the new release.
 
Last edited:
Upvote 0
Status
Not open for further replies.