CoD4X Server and BigBrotherBot (b3) helpHelp for setting up b3 to work with cod4x

Post Reply
User avatar

Topic author
Gen Stranger
KAB Administrator
Posts: 363
Joined: 19 Jan 2004 18:28
20
Contact:

Help for setting up b3 to work with cod4x

Post by Gen Stranger »

------> This setup is for Windows systems only I cannot help with any other operating systems <-----
NOTE this assumes you already have a b3 mysql data base

I have often been asked how I installed b3 and cod4x and got them working
if this is going to be a complete install of b3 and mysql read Mysql for dummies like me WINDOWS only viewtopic.php?f=242&t=5539

I started with a working b3 and cod4 server before updating the b3 and to cod4x

I run both b3 and the cod4x server on a windows 7 enterprise version computer.
please do not ask about other operating systems because I have no idea on them.

Well I started by using the windows version of b3 but soon found I could not use the cod4x.py plugin
since the windows version does not contain a plugins directory.
So I had to switch to

big-brother-bot-1.9.2.zip
B3-192 python version
(1.21 MiB) Downloaded 1188 times
big-brother-bot-1.9.2.zip
B3-192 python version
(1.21 MiB) Downloaded 1188 times
B3 Python Package
Platforms : Windows / Linux / Mac
Requirements : python, python-mysqldb, a mysql database
This is the most common way to install B3. You need to have python installed on your system.

I downloaded the above which contained b3 version 1.9.2

I then downloaded python version 2.7.10 and installed it on my system
python-2.7.10.msi
Python reg version non 64 bit
(17.57 MiB) Downloaded 484 times
python-2.7.10.msi
Python reg version non 64 bit
(17.57 MiB) Downloaded 484 times
I tested to see if it was working by dropping to a command prompt and typing python
it showed the version running so I knew it was working I then typed control z to exit python.
if it does not show type path to make sure c:\python27 is actually in the path
if its not there use google to see how to add it to your path on your operating system.
after you set the path drop to a command prompt again and type python again hopefully it works this time.

you must also install MySQL-python
just run it and it will install and allow b3 to run.
https://pypi.python.org/pypi/MySQL-python/
MySQL-python-1.2.3.win-amd64-py2.7.exe
MySQL-python-1.2.3.win-amd64-py2.7
(1.03 MiB) Downloaded 643 times
MySQL-python-1.2.3.win-amd64-py2.7.exe
MySQL-python-1.2.3.win-amd64-py2.7
(1.03 MiB) Downloaded 643 times
MySQL-python-1.2.5.win32-py2.7.exe
MySQL-python-1.2.5.win32-py2.7
(1.01 MiB) Downloaded 644 times
MySQL-python-1.2.5.win32-py2.7.exe
MySQL-python-1.2.5.win32-py2.7
(1.01 MiB) Downloaded 644 times
please select the correct one 32bit or 64bit
I found they are not interchangeable and will give a database connect error if not the correct one


I then installed b3 by unzipping it in d:\b3-1.9.2 and used my old "b3.xml" since it already had all the setting I needed and would need little adjusting.
If you want to regenerate b3.xml you can invoke the setup procedure with the
command : b3_run -s b3.xml

I then made a b3start.bat file and installed it in the main b3 directory (mine is d:\b3-1.9.2) with this in it.

b3_run.py -c /b3-1.9.2/b3/conf/b3.xml

once I saw that it was working (the b3 window run up)
I shut it down and put the cod4x.py parser in the parsers directory
cod4x.py
B3 Cod4x parser that I use
(5.81 KiB) Downloaded 674 times
cod4x.py
B3 Cod4x parser that I use
(5.81 KiB) Downloaded 674 times

I then changed the parser in the b3.xml
<set name="parser">cod4x</set>

I next edited the cod4x.py by changing the guid length to _guidLength = 18
if you use the paser above there is no need to edit it.

//server setup
in my cod4x config file I added these lines

loadplugin "b3hide"
set b3Prefix "!"
set b3Hide "1"
b3HideLvl "24"
loadplugin simplebanlist
//end server setup

Please note I also used the auth.py plugin
<plugin name="auth" config="d:\b3-1.9.2/b3/extplugins/conf/plugin_auth.xml"/>

b3plugin_auth.zip
B3-Auth (b3 hide)
(3.4 KiB) Downloaded 524 times
b3plugin_auth.zip
B3-Auth (b3 hide)
(3.4 KiB) Downloaded 524 times
put the auth.py in the b3 extplugins directory and the
plugin_auth.xml in the extplugins/conf directory
Do not forget to set the passwords for admin levels in plugin_auth.xml


I then started the server and b3 and entered the server to test it and all worked as required
hopefully this will help others.


this is in my b3.xml file adjust it to suite your setup
I changed for this post all sections that say database rcon password etc and used removed database or removed rcon password etc

I also removed most plugins I run just for this messsage

b3.xml file

<?xml version='1.0'?>
<!--
This file is generated by the B3 setup Procedure.
If you want to regenerate this file and make sure the format is
correct, you can invoke the setup procedure with the
command : b3_run -s b3.xml

This is B3 main config file (the one you specify when you run B3 with the
command : b3_run -c b3.xml)

For any change made in this config file, you have to restart the bot.
Whenever you can specify a file/directory path, the following shortcuts
can be used :
@b3 : the folder where B3 code is installed in
@conf : the folder containing this config file
-->
<configuration>
<settings name="b3">
<!-- Define your game: altitude/bf3/bfbc2/cod/cod2/cod4/cod5/cod6/cod7/etpro/homefront/iourt41/moh/oa081/smg/sof2/wop/wop15/ -->
<set name="parser">cod4x</set>

<!-- Your database info: [mysql]://[db-user]:[db-password]@[db-server[:port]]/[db-name] -->

<set name="database">mysql://removed db user:removed db-password@removed database server/removed database name</set>

example <set name="database">mysql://db-user:password@localhost/b3192</set>
note I did not put a port in the line

<!-- Name of the bot -->
<set name="bot_name">b3</set>
<!-- Ingame messages are prefixed with this code, you can use colorcodes -->
<set name="bot_prefix">b3:</set>

<!-- The timezone your bot is in -->
<!-- EST EDT -->
<set name="time_zone">EDT</set>

<set name="time_format">%I:%M%p %Z %m/%d/%y</set>
<!-- How much detail in the logfile: 9 = verbose, 10 = debug, 21 = bot, 22 = console -->
<set name="log_level">21</set>
<!-- Name of the logfile the bot will generate -->
<set name="logfile">b3.log</set>
</settings>
<settings name="server">
<!-- The RCON pass of your gameserver -->

<set name="rcon_password">removed rcon password</set>

<!-- The port the server is running on -->
<set name="port">28960</set>
<!-- The gameserver generates a logfile, put the path and name here -->

<set name="game_log">d:\Activision\cod4x\mods\knife1\games_mp.log</set>

<!-- The public IP your gameserver is residing on -->

<set name="public_ip">removed public ip</set>

<!-- The IP the bot can use to send RCON commands to (127.0.0.1 when on the same box) -->

<set name="rcon_ip">removed rcon ip</set>

<!-- Delay between each log reading. Set a higher value to consume less disk resources or bandwidth if you remotely connect (ftp or http remote log access) -->
<set name="delay">0.33</set>
<!-- Number of lines to process per second. Set a lower value to consume less CPU resources -->
<set name="lines_per_second">50</set>
<!-- Is the gameserver running PunkBuster Anticheat: on/off -->
<set name="punkbuster">off</set>

</settings>
<settings name="update">
<!-- B3 checks if a new version is available at startup. Choose here what channel you want to check against.
Available channels are :
stable : will only show stable releases of B3
beta : will also check if a beta release is available
dev : will also check if a development release is available
If you don't know what channel to use, use 'stable'
-->

<!-- stable, beta or dev -->
<set name="channel">stable</set>
</settings>
<settings name="autodoc">
<!-- Autodoc will generate a user documentation for all B3 commands -->
<!-- by default, a html documentation is created in your conf folder -->

<!-- html, htmltable or xml -->
<set name="type">html</set>
<!-- if you want to exclude commands reserved for higher levels -->
<set name="maxlevel">100</set>
<!-- Destination can be a file or a ftp url -->
<set name="destination">b3_doc.htm</set>
</settings>
<settings name="messages">
<set name="kicked_by">$clientname^7 was kicked by $adminname^7 $reason</set>
<set name="kicked">$clientname^7 was kicked $reason</set>
<set name="banned_by">$clientname^7 was banned by $adminname^7 $reason</set>
<set name="banned">$clientname^7 was banned $reason</set>
<set name="temp_banned_by">$clientname^7 was temp banned by $adminname^7 for $banduration^7 $reason</set>
<set name="temp_banned">$clientname^7 was temp banned for $banduration^7 $reason</set>
<set name="unbanned_by">$clientname^7 was un-banned by $adminname^7 $reason</set>
<set name="unbanned">$clientname^7 was un-banned $reason</set>
</settings>
<settings name="plugins">
<set name="external_dir">@b3/extplugins</set>
</settings>
<plugins>

<!-- I removed most of the plugin for this message -->
<plugin name="admin" config="d:\b3-1.9.2/b3/conf/plugin_admin.xml"/>
<plugin name="pingwatch" config="d:\b3-1.9.2/b3/conf/plugin_pingwatch.xml"/>
<plugin name="auth" config="d:\b3-1.9.2/b3/extplugins/conf/plugin_auth.xml"/>
<plugin name="xlrstats" config="d:\b3-1.9.2/b3/extplugins/conf/xlrstats.xml"/>
</plugins>
</configuration>
Gen Stranger
Stranger-KAB
User avatar

Topic author
Gen Stranger
KAB Administrator
Posts: 363
Joined: 19 Jan 2004 18:28
20
Contact:

Re: Help for setting up b3 to work with cod4x

Post by Gen Stranger »

I forgot to post
Do not forget to edit plugin_auth.xml setting the passwords for the levels of admins
I added it to the post above also
Gen Stranger
Stranger-KAB
User avatar

Topic author
Gen Stranger
KAB Administrator
Posts: 363
Joined: 19 Jan 2004 18:28
20
Contact:

Installing python27

Post by Gen Stranger »

I noticed that each time I installed python27 it did not add the python directory to the path
drop to a command prompt and type path at the end should be c:\ptyhon27 if its not there you have to manually add it
DO NOT say path c:\python27 it will overwrite your original path
use google to find out how to edit your path on your system and add it there
Gen Stranger
Stranger-KAB

warlock99
Registered
Posts: 28
Joined: 11 Nov 2018 11:54
5
Contact:

Re: Help for setting up b3 to work with cod4x

Post by warlock99 »

Gen Stranger wrote: 18 May 2017 16:25 b3HideLvl "24"
I don't understand this function. Is it for b3 admin gourp lvl? like 20-40-60-80-100?
If its not, what value should I put it in ? You've said to set it in 10 in another post viewtopic.php?f=242&t=5461
But in this post you've said 24
My b3 is working but I'm just a little curious to know
User avatar

Topic author
Gen Stranger
KAB Administrator
Posts: 363
Joined: 19 Jan 2004 18:28
20
Contact:

Re: Help for setting up b3 to work with cod4x

Post by Gen Stranger »

warlock99 wrote: 18 Nov 2018 04:08
Gen Stranger wrote: 18 May 2017 16:25 b3HideLvl "24"
I don't understand this function. Is it for b3 admin gourp lvl? like 20-40-60-80-100?
If its not, what value should I put it in ? You've said to set it in 10 in another post viewtopic.php?f=242&t=5461
But in this post you've said 24
My b3 is working but I'm just a little curious to know
the first post was from cod4x.me on the setting of 10
in this post I stated in my cod4x config file I added these lines which had 24 listed mainly because I have different groups then what comes with B3 (I did not take that into account when I made that post) and since I did not want anyone' !command hidden below group KAB which is 25 I set the level to 24. so the guest,moderator, reg,and user will not be hidden all else will be hidden.
here are my groups

Admin 40
Fulladmin 60
Senior Admin 80
Super Admin 95
Super Admin 100
Super Admin 99
reg 2
user 1
Admin+ 45
Moderator+1 30
Moderator+2 35
Admin+2 55
Admin+1 50
Full Admin+ 65
Full Admin+1 70
Full Admin+2 75
Senior Admin 85
Senior Admin+1 90
KAB 25
Moderator 16
guest 0
Gen Stranger
Stranger-KAB

warlock99
Registered
Posts: 28
Joined: 11 Nov 2018 11:54
5
Contact:

Re: Help for setting up b3 to work with cod4x

Post by warlock99 »

Thanks that makes it clear for me to understand. :)
Post Reply