Page 1 of 1

Running a Map In Dedicated Server Mode

Posted: 2011-09-04 04:32
by AFsoccer
How to load a map in Dedicated Server mode

As most of you already know, the easiest way to test a WIP map is to load it in "local mode". Basically, you create an "info" folder with a .desc file and all that stuff that is covered in other tutorials. Then you load PR, select "deployment", and then "create local".

However, running a map in local mode has its drawbacks. For one, large, detailed maps will often have a consistent lag spike when run in local mode. There are also some issues where things won't work exactly as expected, so before you throw your hands up in frustration try running the map in "dedicated server" mode. This tutorial will explain how.


1. Have a map ready enough to load (with spawn points, etc... just like when loading it in local mode).

2. Edit battlefield 2/mods/pr_edit/settings/maplist.con so that your map is first on the list. To do this, find another map's layer that's the same as the one you want to run and copy it. Then past it where you see the red text in the example below:

Code: Select all

rem |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rem |-------------------------------------------------------------------------------|
rem |                          Project Reality Map List                             |
rem |-------------------------------------------------------------------------------|
rem |  16/32/64 does not represent player size, instead, different vehicle layouts  |
rem |-------------------------------------------------------------------------------|
rem |  16 = Infantry Layer - Light transport vehicles only                          |
rem |  32 = Alternative Layer - An alternative layout to the standard layout        |
rem |  64 = Standard Layer - Full amount of vehicles                                |
rem |-------------------------------------------------------------------------------|
rem |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

rem maplist.append <mapname> <gamemode> <layer>

rem |-------------------------------------------------------------------------------|
rem |      Conquest (AAS) - Assault and Secure. Default Project Reality Gamemode    |
rem |-------------------------------------------------------------------------------|
[color=Red]mapList.append yourmap gpm_cq 64[/color]
mapList.append asad_khal gpm_cq 16
mapList.append asad_khal gpm_cq 32
mapList.append asad_khal gpm_cq 64
mapList.append battle_for_qinling gpm_cq 16
mapList.append battle_for_qinling gpm_cq 32
mapList.append battle_for_qinling gpm_cq 64
mapList.append beirut gpm_cq 16
mapList.append beirut gpm_cq 32
mapList.append beirut gpm_cq 64
mapList.append burning_sands gpm_cq 16
mapList.append burning_sands gpm_cq 32
etc. etc. 
It doesn't matter that it's not an AAS layer that you're running, but your map does have to be first on the list. Use the copy/pasted line to edit your map's name in the place of the map name that you copied.

3. Go to the EA/Battlefield folder and create a shortcut of the file called "bf2_w32ded.exe". Once the shortcut is created, you can move it to where ever you want, such as on your desktop, etc.

4. Edit shortcut parameters by right clicking on the shortcut and selecting properties. Make sure the "shortcut" tab is active, then add the following text to the end of the "Target" line, as seen below:

"F:\Program Files (x86)\EA GAMES\Battlefield 2\bf2_w32ded.exe" +modPath mods/pr_edit

In case it's hard to see, you should have a space after the quotation marks and then this: +modPath mods/pr_edit. Click OK.

5. Now double click on the shortcut to start the program. The server window will appear and you should see your map's name, layer, and mod folder.

Before you proceed, write down the IP number that shows up on this screen. Write it down.

6. Run "Project Reality EDIT" in your pr_edit folder.

7. Choose "deployment" and then "join internet" and then finally "join IP". A box will appear where you type in the IP address that you just wrote down.

8. The game should now be loading your map, using a dedicated server which acts and behaves just like a real server would. Success. :)


NOTE: This also works the same for debugger servers, however you need your server shortcut to be as:
...\BF2_r.exe" +dedicated 1 +developer 1 +ignoreAsserts 1 +multi 1 +modPath mods/pr_edit

And your client shortcut to be as:
...\BF2_r.exe" +fullscreen 0 +developer 1 +ignoreAsserts 1 +restart 1 +multi 1 +modPath mods/pr_edit

Re: Running a Map In Dedicated Server Mode

Posted: 2015-02-19 08:54
by Ason
When I press project_reality EDIT in the pr_edit folder I get an error saying it can't find ...battlefield2\mods\pr\pr.exe