BotDetonator Mutator

  • 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/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice
Status
Not open for further replies.

Ducky

Super Moderator
May 22, 2011
6,358
237
0
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

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
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?
 

[TW]Strago

Tripwire Interactive Staff
Jun 23, 2010
166
204
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>'?
 

[TW]Strago

Tripwire Interactive Staff
Jun 23, 2010
166
204
0
Nope. I'm just typing '<MutateString>' only. So I should add the 'Mutate' in front of it? And then in keybinding 'Mutate KickBotsVote'?

I believe that is correct. 'Mutate' is the console command and the string is a parameter. Add a string for each command you need.
 

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
I believe that is correct. 'Mutate' is the console command and the string is a parameter. Add a string for each command you need.

Ok. Tried it and it does indeed work now. I was the only player on the server so the bots got directly kicked out after I send the command. Thanks for the help :)
 

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
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:

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Decided to leave out the bot harvest protection (can still be found in archive if required to put it back).

Finished the mutator and will submit it to TWI for white-listing.

Please check my OP for more details about this mutator.
 
Last edited:

Cat_in_da_Hat

FNG / Fresh Meat
Dec 11, 2006
1,749
115
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.
 

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
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.
 

Cat_in_da_Hat

FNG / Fresh Meat
Dec 11, 2006
1,749
115
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.
 

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
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:

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
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.
 

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
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:
Status
Not open for further replies.