Help for setting up b3 to work with cod4x
Posted: 18 May 2017 16:25
------> 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
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
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/ 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
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"/>
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>
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
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
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/ 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
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"/>
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>