Skip to content

Big Brother Bot Setup

nxroo edited this page Jun 5, 2020 · 12 revisions

Windows Setup

Requirements:

  • A working TeknoMW3 Server
  • b3 Python version (to use cod8 parser)
  • Notepad++ (optional, but recommended)

1. TeknoMW3 Server configuration:

  • Your server needs to be running with these launch parameters: -enable_rcon -enable_b3 -secure_b3
  • Set a strong/secure rcon-password in your server.cfg: seta rcon_password “YourRconPassword”
  • Set a name for your server log in your server.cfg. This has to be done for each server you are hosting. seta g_log “ServerName.log”
  • The port defined as net_authPort is the one which b3 will use

2. Downloading and installing required software:

  • Download and install XAMPP:

  • Download XAMPP from HERE

  • Run the XAMPP installer. You only need to install the following components of XAMPP: Apache, MySQL, PHP, phpMyAdmin

  • Important: Before you run XAMPP, right-click the XAMPP shortcut, go to Properties → Compatibility → Check the box Run as Administrator to make sure it’s running with Administrator privileges always, otherwise you might run into errors later

  • Download b3:

  • Download b3 from HERE and extract the archive

  • Download the cod8 parser (cod8.py) from HERE and copy it to your big-brother-bot/b3/parsers directory and replace it. This parser is required to make b3 work with TeknoMW3 servers.

  • Download and install Pyton 2.7 and required dependencies for b3:

  • Download Python 2.7 from HERE

  • Run the Python installer. During the installation process, it will ask you what features you want to install. Important: Make sure to select Add python.exe to Path to install and continue with the installation

  • When Python is installed, you need to install the required dependencies for b3. Open the Command Prompt as Administrator and enter the following commands after each other:

  • python -m pip install --upgrade pip

  • pip install pymysql

  • pip install python-dateutil

  • pip install feedparser

  • pip install requests

3. Setting up a MySQL database for B3:

  • Run the XAMPP Control Panel as Administrator and start Apache and MySQL
  • Open your Web-Browser and go to the address localhost/phpmyadmin, it should login to phpMyAdmin by default which is a graphical user interface to maintain databases
  • In phpMyAdmin, create a new database named b3_db, then import the SQL tables from your b3 directory to this newly created database. The location of the SQL tables is big-brother-bot/b3/sql/mysql/b3.sql
  • Create a new user for the database b3_db with all permissions and remember the credentials. For security reasons only allow access from localhost (can be selected as “Host” when creating a new user)

4. Configuring B3:

  • Generate a b3 config HERE and enter the following settings:
  • Select Call of Duty: Modern Warfare 2 as game (we will change it later to use the cod8 parser mentioned above)
  • Under Database Settings, enter the database information we created in the previous steps
  • Under Game Server Settings, following changes are required: Enter the same rcon-password you set in your server.cfg. Enter the port you defined as net_authPort. Enter the public IP of the host the server is running on. Punkbuster has to be set to off. Enter the path to your server log, e.g. C:\TeknoMW3\scripts\ServerName.log (check “1. TeknoMW3 Server configuration” for more information).
  • Most of the other settings can be kept as they are, but you may want to select which built-in plugins should be used. Highly recommended plugins are: Advertise (for server messages) and IPBan (to ban players IPs)
  • Also, it’s recommended to enable the option Preserve Tips which adds explanations to the settings in the configuration file
  • Save the configuration, download it, rename it to b3.xml or b3.ini (depending what format you chose) and copy this configuration file to big-brother-bot/b3/conf
  • Finally, open the b3.xml / b3.ini with Notepad++ and change the parser to cod8 (make sure you got the right cod8 parser for TeknoMW3, as explained above)

5. Running b3 and getting Super Admin permissions:

  • Once you did all the steps listed above, first run your TeknoMW3 server and then run b3 by going into the b3 directory and double-clicking “b3_run.py”
  • Immediately after running b3, connect to your game server and enter “!iamgod” into the chat to get Super Admin permissions.

Ubuntu Setup

Requirements:

  • A PC with working TeknoMW3 Server and Ubuntu.
  • b3 Python Version (To use Cod8 Parser).

1. Downloading and Installing required softwares:

Run the Following Command as a sudo user to install the required software.

  • sudo apt-get install php5 why php5 you might ask, because it is fully functional as newer versions of php and if you install XLRstats Web, You would require this version of php. You might have to install php5 dependencies to install php5.
  • sudo apt-get install apache2
  • sudo apt-get install mysql-server mysql-client
  • sudo apt-get install phpmyadmin You will be asked to configure phpmyadmin for a webserver. Select apache2 with pressing TAB and Proceed with installation.
  • sudo apt-get install python
  • sudo apt-get install python-mysqld
  • sudo apt-get install python-dateutil
  • sudo pip install PyMySQL

Downloading Other Essential Things.

Downloading b3 from Github: Make a directory for b3 and go to that directory with cd command. Once you are on the directory. run git clone https://github.com/BigBrotherBot/big-brother-bot.git. This will download b3 from Github.

2. Configuration for b3:

  • Making a database for b3: Once Apache2 Server is running, Open your web browser on the local machine. Go to address <ubuntu machine ip>/phpmyadmin and It should login to phpmyadmin by credentials that you have setup while installing phpmyadmin, Create a database named b3_db. After creating the database, Import the sql tables from your b3 directory that you have installed earlier, the location for this file is default as big-brother-bot/b3/sql/mysql/b3.sql. Once you have imported it, Create a user for b3_db with all permissions and remember the credentials. You can make the database accessible for localhost only or AnyHost Depending on your needs.

  • Making b3 configuration file:

You have to create a b3 configuration file, which you can create from their config generator on their website b3 Config. Carefully fill all the information and Select Call of Duty: Modern Warfare 2 as the game (We will change it later when we add cod8 parser), use the Database we have created earlier and write the credential of database user so b3 can access it. Once the Config is generated, Open it with Notepad++ and change the parser to cod8. Copy the config file to b3 directory which is by default big-brother-bot/b3/conf

  • TeknoMW3 Parser:

You would require TeknoMW3 Parser of b3 to have fully functional b3. The parser can be found here.

3. Running b3:

  • Running b3:

Once the whole setup listed above is done. Run b3 by going to your b3 directory and running the command python ./b3_run.py. You might need to run it under screen or any other software that if you disconnect from ssh client, it may not go off.

  • Getting Permissions:

Once this is all setup and running, Go to your game server for which you have just setup b3 and type !iamgod to get Super Admin permissions.