CoD4X Server and b3 helpsetting up b3 to work with cod4x

Post Reply
User avatar

Topic author
Gen Stranger
KAB Administrator
Posts: 256
Joined: Mon Jan 19, 2004 6:28 pm
Zodiac: Gemini
Contact:

setting up b3 to work with cod4x

Post by Gen Stranger » Thu May 18, 2017 4:25 pm

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

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 8 times
big-brother-bot-1.9.2.zip
B3-192 python version
(1.21 MiB) Downloaded 8 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.amd64.msi
Python 64 bit
(18.48 MiB) Downloaded 2 times
python-2.7.10.amd64.msi
Python 64 bit
(18.48 MiB) Downloaded 2 times
python-2.7.10.msi
Python reg version non 64 bit
(17.57 MiB) Downloaded 2 times
python-2.7.10.msi
Python reg version non 64 bit
(17.57 MiB) Downloaded 2 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.


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

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

//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 3 times
b3plugin_auth.zip
B3-Auth (b3 hide)
(3.4 KiB) Downloaded 3 times
put the auth.py in the b3 extplugins directory and the
plugin_auth.xml in the extplugins/conf directory


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: 256
Joined: Mon Jan 19, 2004 6:28 pm
Zodiac: Gemini
Contact:

Re: setting up b3 to work with cod4x

Post by Gen Stranger » Fri Jan 26, 2018 10:23 pm

I forgot to add this to the setup without it will not work
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.5.win32-py2.7.exe
Mysql-Python needed to make b3 run
(1.01 MiB) Downloaded 3 times
MySQL-python-1.2.5.win32-py2.7.exe
Mysql-Python needed to make b3 run
(1.01 MiB) Downloaded 3 times
Gen Stranger
Stranger-KAB

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest