project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
20 Sep 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
Modding Tutorials Information and tutorials related to modding BF2.

Reply
 
Thread Tools Display Modes
Old 2011-09-04, 04:32   #1
AFsoccer
Retired PR Developer
Supporting Member

AFsoccer's Avatar
Default Running a Map In Dedicated Server Mode

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:
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 |-------------------------------------------------------------------------------|
mapList.append yourmap gpm_cq 64
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

AFsoccer is offline
Last edited by Amok@ndy; 2015-02-19 at 10:01..
Reply With Quote
Old 2015-02-19, 08:54   #2
[R-DEV]​Ason
PR:BF2 Developer
Supporting Member

Ason's Avatar
Default Re: Running a Map In Dedicated Server Mode

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
Ason is offline Reply With Quote
Reply


Tags
dedicated, map, mode, running, server, tutorial

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 08:48.