Forums

BF2Statistics.com :: Forums :: BF2Statistics discussion

Installation guide for Single player and Dedicated server with coop or not.

Ryuop

Joined: Mon Jan 30 2006, 08:26AM
Posts: 34
Webserver with stats..

Don´t try this with easyPHP because it will not work.

Install Xampp 1.4.16 in ”C:\xampp”,when that is done start your browser.Type localhost in your

browser, click on phpmyadmin in the left frame. When phpmyadmin is started, type in your

database name e.g ”bf2”, then press create. When it´s done choose SQL. Open

bf2statistics.sql with notepad, the file is in bf2statistics_v1.0.zip, mark everything (ctrl+a),

copy and paste it to text label in SQL and press go. It will take a little while, when that is

done click on the little house in the left frame. Choose Privilege and add user. Username: user

Password: pass, check all global privileges after that click on go. Close your browser.


Copy ASP dir from Bf2statistics_v1.0.zip to ”C:\Xampp\xampp\htdocs” and unzipp

bf2statistics-web_Beta.zip, copy bf2statistics dir from the unzipped folder to

”C:\Xampp\xampp\htdocs”. Go to the ASP dir that you copied to

”C:\Xampp\xampp\htdocs” and open ”Config.php” file,change it to this:

$dbhost = 'localhost'; // database host name
$dbname = 'bf2'; // database name
$dbuser = 'user'; // database user name
$dbpass = 'pass'; // database user password

I assume the path to your installation of battlefield 2 is ”c:\program files\”, if not copy the files to your directory. 8)

Copy Bf2 dir from Bf2statistics_v1.0.zip to ”C:\Program files\Battlefield 2\python\”, click

OK when it ask you to overwrite files,(don´t forget to take a backup of this dir).Open

snapshot.py and change it to this:


HOST = '127.0.0.1' # server ip
PORT = 80 # server http port
PATH = '/ASP/bf2statistics.php' # server path to script
PREFIX = 'BF2LOG' # log file prefix

If you gonna play Coop dedicated or Singleplayer on the same server, use the snapshot.py in the

bf2statistics_v1.0_coop.zip.

In Bf2statistics_v1.0.zip there is a file called make_pid.php, open that file and change it to
this:

/***** EDIT THIS CONFIGURATION INFO ****/

// PATH TO MOD DIRECTORY (NO TRAILING '/')
$modpath = 'c:/program files/battlefield 2/mods/bf2';

// PATH TO PID FILE
$pidfile = 'c:/program files/battlefield 2/mods/bf2/pid.txt';

// NUMBER TO START PID AT
$startpid = 29000000;

// LOCAL USER AND PID
$lan = array('your username ', your PIDNR, you can get it from bf2s.com’);

Then you copy make_pid.php to ”C:\Xampp\xampp\htdocs” and open your browser and type:

localhost/make_pid.php then enter.

Open playermanager.py that resides in ”C:/program files/battlefield 2/python/bf2/” and

change to this:

#################################################################
# server path to script #
PATH = 'c:/program files/ea games/battlefield 2/mods/bf2/pid.txt'
#################################################################

To play Singleplayer make a shortcut to BF2.exe and change the parameters to this:

"C:\Spel\Battlefield 2\BF2.exe" +ranked 1 +ai 1 +gamemode sp1

Start and choose Singleplayer….


If you gonna host a dedicated server and play on another computer then copy

”C:/program files/battlefield 2/python/bf2/” dir to the client computer and open snapshot.py:


HOST = 'Server IP adress' # server ip
PORT = 80 # server http port
PATH = '/ASP/bf2statistics.php' # server path to script
PREFIX = 'BF2LOG' # log file prefix

On the client computer open the ”C:\windows\system32\drivers\etc\host” file and change it to

your server IP adress:

IP server adress bf2web.gamespy.com

Start your dedicated server with these parameters, if you want bots in your server ofcourse:

"C:\Spel\Battlefield 2\BF2.exe" +dedicated +ranked 1 +ai 1 +gamemode sp1


Regards
Ryuop

[ Edited Mon Feb 06 2006, 03:44PM ]

RAMBO91

Joined: Sun Jan 29 2006, 12:45PM
Posts: 7
where would you type the parameters at? (would it be included in the shortcut name?)
Get First Aid Here!!
MrNiceGuy


Joined: Tue Jan 24 2006, 01:32PM
Posts: 619
In the shortcut preferences. (Not name)
RAMBO91

Joined: Sun Jan 29 2006, 12:45PM
Posts: 7
would that be the properties? if so what line do you type it in?
Get First Aid Here!!
MrNiceGuy


Joined: Tue Jan 24 2006, 01:32PM
Posts: 619
OMG! Yes!! Add the line as described in the tutorial.
RAMBO91

Joined: Sun Jan 29 2006, 12:45PM
Posts: 7
Thanks, sorry for my confusion, you are much more familiar at this than me.
RAMBO91

Joined: Sun Jan 29 2006, 12:45PM
Posts: 7
OK its working now!;) but i have a question i keep getting the same award and no weapon unlocks, so is it saving what i earned? And how can I find out where it is saving my stats? ( also i dont know if this is supposed to get this but when i start my game in single player and when i finish a round the stat/player page is blank just the catagories and no numbers or player) thanks
attached a pic of what it looks like*
Image: ../../e107_files/public/1139277231_21_FT320_image1_.jpg
Ryuop

Joined: Mon Jan 30 2006, 08:26AM
Posts: 34
Then you have missed something, I have done this on 4 diffrent computer and it work real fine on all of them.
Seich

Joined: Sat Feb 04 2006, 03:34PM
Posts: 12
I'm trying to start my dedicated server with these parameters:
"C:\Spel\Battlefield 2\BF2.exe" +dedicated +ranked 1 +ai 1 +gamemode sp1"

But server crashes with thi error:
Debug assertion failed.
version: 1.2554-356.0
module: BFknowledge
File D:\DiceCanada_xpack_patch\code\bf2\AI\AIInterface\BFknowledge\BFgame.cpp
Line: 76
Text: GeneralSettings are not available, no settings importade from menu.

When I remove '+ai 1' from this line server launches fine.
How to fix it? I use bf2server 1.12 from in-game directory.
thanx.
Ryuop

Joined: Mon Jan 30 2006, 08:26AM
Posts: 34
Change your maplist.con to this:

maplist.append "Dalian_plant" "sp1" 16
maplist.append "Daqing_oilfields" "sp1" 16
maplist.append "Dragon_Valley" "sp1" 16
maplist.append "FuShe_Pass" "sp1" 16
maplist.append "Gulf_of_Oman" "sp1" 16
maplist.append "Operation_Clean_Sweep" "sp1" 16
maplist.append "Sharqi_Peninsula" "sp1" 16
maplist.append "Songhua_Stalemate" "sp1" 16
maplist.append "Strike_at_Karkand" "sp1" 16
maplist.append "Zatar_Wetlands" "sp1" 16

It´s located in "C:\rogram files\Battlefield 2\mods\bf2\Settings"

When you start the dedicated server wait for it to load to 100%, then in the consol write this: maplist.load it will show you 1 then write this in the console:
admin.runnextlevel after the map is loaded join your game thru connect to ip. Map rotation will also work then.

Moderators: MrNiceGuy, Twhyman, Chump, hurr1k4ne, The Shadow, Wilson212

<< Previous thread | Next thread >>

Jump:     Back to top