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

Closed Thread
 
Thread Tools Display Modes
Old 2007-01-31, 15:21   #1
Rhino
Retired PR Developer
Supporting Member

Rhino's Avatar
Arrow Setting Up the BF2 Editor for PR Mapping/Modding

Description:
This tutorial is so you can setup a modification that is more or less a clone of the PR mod but can be used for map editing, map testing and general modding without conflicting with your main PR and BF2 files so you can still play in public servers with normal PR or BF2.


Tools Required:
  • 7Zip ~ A tool like win zip, but better in many ways. Used to compress and exstract .zip and .rar files.
    (Download: WinRAR download and support)
  • BF2 Editor v3~ used to crate maps etc. Install into your main PR folder.
    (Download: PR - BF2 Editor v3 [BETA], Debugger files Both are required!) - All files in preditor.zip go in Program Files (x86)/Project Reality/Project Reality BF2/ or where you installed PR:BF2. Debugger files should be extracted according to the debugger setup tutorial linked above.

--------------------------------------------------------------------------------------------------------

BF2Editor Installer

A script which makes it easier to set up the BF2 Editor. Instead of doing steps 1, 2, 3, 4, 7 and partially step 6 from this tutorial, you can just run the PREI.exe. It is recommended that you run the script with the most recent version of PR installed on your machine, otherwise the installed content will be outdated.

Step 5 is not automated neither is all of Step 6 ( the part where we have to use the mod manager of the editor to choose what content to load and how we have to run the BF2Editor in windows XP compatibility mode.)

Download both the PREI.exe and PREI_CORE.zip. Move both files to the PR installation directory (default: "C:\Program Files x86\Project Reality\Project Reality BF2"). It is recommended to launch the installer as an administrator.

PREI.exe

PREI_CORE.zip

--------------------------------------------------------------------------------------------------------

1. Getting Started
First you need the most recent versions of the BF2 Editor and PR installed on your machine before you can continue.

For this Tut I'm going to be using BF2 Editor v3(linked above) and PR v1.3

This tutorial should be more or less compatible with other versions of PR and the BF2 editor but may vary slightly, will try to keep this tut upto date as best as possible with any major changes, thou you should use the most upto date versions of each available to you.


2. Cloning the mod
Once you have done that, we can now get down to business.

First go to: "C:\Program Files x86\Project Reality\Project Reality\mods" (default install path, may vary)
You will see in that folder a "pr" folder, and maybe more if you have other mods installed but we only need the pr folder.

Copy and paste the "pr" folder into the same folder so you end up with a "copy of pr" folder. It may take a few mins for it to clone the pr mod folder since it is quite large...

3. Creating "pr_edit"
Now rename your "copy of pr" folder to "pr_edit".

4. Getting your content ready
So now we have our basic mod setup but we still need to do some work before this can be usable by the editor. We need to extract all content that is currently compressed into .zip files so that the editor can open them. We do this as follows:

go to: "C:\Program Files x86\Project Reality\Project Reality BF2\mods\pr_edit\content" and locate the following zip files:
  • objects_common_client & objects_common_server
  • objects_statics_client & objects_statics_server
  • objects_vehicles_client & objects_vehicles_server
  • objects_weapons_client & objects_weapons_server

Copy them all to "C:\Program Files x86\Project Reality\Project Reality BF2\mods\pr_edit\objects". If this folder doesn't exist you have to create it.

Select all of the .zip files, right click on them and click "Extract Here". This will take some time like above, and overwrite any files it asks you to.

What we have done here is allow the editor to read the PR object files as the editor dose not like looking inside .zips for files and can't edit them if they are in a .zip


5. Setting up your Lightmap Samples
NOTE: These are not initially required & are only required if you lightmap your map in the BF2 Editor, which is not recommended and it is recommended that you generate your lightmaps in 3DsMax (click here for more info) for better and quicker results, and do not require these samples.
In the final stages of crating a polished map, it is necessary to generate lightmaps for your terrain and static objects. Lightmaps in a nutshell are pre-calculated light so the client ingame dose not need to have his CPU maxed out working where all the shadows are going to be etc. To be able to generate lightmaps for your static objects, you will need to have lightmap samples for them (unless you want to generate your lightmaps in 3DsMax and not in the BF2 Editor but that is some pretty advanced stuff there). So unless you do not plan on generating any lightmaps for any maps (ie, you only want to do coding or gameplayobject tweaking), you will need to install these lightmap samples.

Download the following master set. This includes BF2 static lightmaps samples and custom PR statics lightmap samples.
  1. First download the PR lightmap samples here: https://files.realitymod.com/lightma...prbf2_1613.zip (2GB)(Last Updated for PR:BF2 v1.6.1.3, 4th of June 2020)
  2. Once downloaded, extract the .zip to: "C:\Program Files x86\Project Reality\Project Reality BF2\mods\pr_edit" and overwrite anything it asks you to.

6. Setting up your editor

Now we need to set up the editor to work with our new pr_edit so you can load all the statics etc.

First its best if you install these files that will help you crate maps for PR by making the editor more compatible with PR's settings etc. Download this .rar and install it into your main PR folder so the folders match. (overwrite any files it asks you to).
Inside it are a few editor files and little extras to help you
Download: https://files.realitymod.com/resources/PR_EDIT.rar


Now after you have done that, start the editor(always start editor in Win XP compatibility!) and when it gets to the "Select Startup MOD" Screen, click on "pr_edit" and press ok.

Should load up pretty fast as, at the moment, it's not set to load up much.

Now we need to go to the mod manager to tell it what we want it to load. In the toolbar of the bf2 editor go to: Mod > Mod Manager...

In the Mod Manager click on the tab "Editor Content" and in there check every box in the list. If it has a white box next to it it is unchecked and will not load, if it has a green box it is checked and will load the content related to it. (IE: Common, Dynamic Objects, Effects, etc.)

Then click ok, will take a few mins to sort it out.

7. The Layer Properties Window

Due to the addition of 128 player layers and game modes that weren't used in vanilla BF2, you now need to alter the LayerInit.con.

1) If you have the editor open, go ahead and close it.
2) Go to this folder: "Project Reality BF2/bf2editor/mods/pr_edit"
3) Open the file called "LayerInit.con"
4) Delete the text and copy this in its place:

Code:
Code:
LayerManager.CreateDefaultFilter gpm_cq "AAS"
LayerManager.CreateDefaultFilter gpm_cnc "Command & Control"
LayerManager.CreateDefaultFilter gpm_insurgency "Insurgency"
LayerManager.CreateDefaultFilter gpm_skirmish "Skirmish"
LayerManager.CreateDefaultFilter gpm_vehicles "Vehicle Warfare"
LayerManager.CreateDefaultFilter gpm_coop "Coop"

LayerManager.CreateDefaultPlayerFilter "16"
LayerManager.CreateDefaultPlayerFilter "32"
LayerManager.CreateDefaultPlayerFilter "64"
LayerManager.CreateDefaultPlayerFilter "128"
5) Save the file and open the editor.

Now when you create a new layer, the editor will show the following window, giving you all the options you need for PRmaps:



8. Advanced Tips
Now your editor is basically set up to map for PR without conflicting with your other files etc.

If you have already started a map, and want to now work on it with your new pr_edit mod, all you need to do is copy the map folder from "/*mod name*/levels/" and copy the map from there to "/pr_edit/levels/" then load up the editor and you will be able to load it etc

If you add new custom statics or w/e you want in your map, simply put them into your pr_edit mod in the right place, and if you also want to test with them pack them up into the .zips

Pack includes a "reminder" which is a little pin, that wont show up ingame etc. Place these on bugs etc or things that you need to redo or w/e, then you can browse though all the reminder pins in your map when you want to sort out the bugs.

In the pr_edit folder, you'll notice shortcuts so you can load BF2 using the pr_edit folder and check out your map without altering the main pr folder. Those shortcuts have been set up for the default location, so (depending on your computer configuration) you may have to right click on the shortcuts and change the location in the properties window so it points to the correct folder.

A complete list with good Mapping tutorials can be found here.

Hope this helps you make some new maps for PR!



(Last Updated: June, 2020 - Updated samples for 1.6.1.3)

Rhino is offline
Last edited by Suchar; 2023-02-28 at 19:40.. Reason: Deleted an obsolete note about object spwner templates
Old 2007-02-03, 17:16   #2
IronTaxi
Retired PR Developer

IronTaxi's Avatar
Default

another thing that i have always done is to unload all of the pieces of the editor i dont need... fro example the effects,material,animation editors...i basically need the terrain and static/primary editor only so unload all others and the loading time goes way down...

i believe its in the mod manager..

IronTaxi is offline
Old 2010-01-30, 14:55   #3
Rhino
Retired PR Developer
Supporting Member

Rhino's Avatar
Default Re: [Tutorial] Setting up the BF2 Editor for PR mapping/modding

This is not a topic to ask general questions on the editor, if you have a question, make a new topic about it.

Since no one has got this message after it's been repeated many times, I'm now locking this topic and will be cleaning up all the crap.

Cheers, locked.

Rhino is offline
Old 2015-05-31, 12:17   #4
[R-DEV]Mineral
PR:BF2 Lead Designer
Supporting Member
PR Server License Administrator

Mineral's Avatar
Default Re: Setting Up the BF2 Editor for PR Mapping/Modding

Updated for v1.3 and removed all broken image links. I don't have PR installed right now to test this but I'm sure it will work as nothing really changed.

Mineral is offline
Old 2019-06-06, 20:18   #5
[R-DEV]Suchar
PR:BF2 QA Lead
PR Server License Administrator

Suchar's Avatar
Post Re: Setting Up the BF2 Editor for PR Mapping/Modding

The first post has been updated and now you can use a script which will set up the files for the editor as well as the editor itself. I hope it will be a valuable help for beginners since I've seen some people having issues with it.
Now you just need to get used to the red text in the editor. Have fun!

https://www.realitymod.com/forum/uploads/signatures/sigpic98978_4.gif
Suchar is offline
Old 2019-06-06, 22:25   #6
friendly
Default Re: Setting Up the BF2 Editor for PR Mapping/Modding

Last time I installed the editor I couldn't open game maps and received this error: mods\pr_edit\levels\albasrah_2\init.con not found! These are my old notes for reinstalling it that still seem relevant:

5.1 No lightmap samples download
6. No "\project reality\mods\pr\readme" folder

Now my editor crashes when I try to open my own maps so I probably need to reinstall again. I'll try your script because I agree this process should be improved. Some people told me they lost interest in development after failing this obstacle. I hope we can continue to improve!
friendly is offline
Last edited by friendly; 2019-06-06 at 22:32..
Old 2019-06-07, 07:30   #7
[R-DEV]Suchar
PR:BF2 QA Lead
PR Server License Administrator

Suchar's Avatar
Post Re: Setting Up the BF2 Editor for PR Mapping/Modding

Quote:
Originally Posted by friendly View Post
Last time I installed the editor I couldn't open game maps and received this error: mods\pr_edit\levels\albasrah_2\init.con not found!
Try this.

Quote:
Originally Posted by friendly View Post
These are my old notes for reinstalling it that still seem relevant:
5.1 No lightmap samples download
6. No "\project reality\mods\pr\readme" folder
Regarding lightmaps:
Quote:
NOTE: These are not initially required & are only required if you lightmap your map in the BF2 Editor, which is not recommended and it is recommended that you generate your lightmaps in 3DsMax (click here for more info) for better and quicker results, and do not require these samples.
Spawner templates aren't needed. They do not even exist for most of the vehicles I guess.

https://www.realitymod.com/forum/uploads/signatures/sigpic98978_4.gif
Suchar is offline
Last edited by Suchar; 2019-06-07 at 08:01..
Old 2019-06-07, 08:49   #8
[R-DEV]Mineral
PR:BF2 Lead Designer
Supporting Member
PR Server License Administrator

Mineral's Avatar
Default Re: Setting Up the BF2 Editor for PR Mapping/Modding

Use a separate thread for editor issues.

Mineral is offline
Old 2020-05-10, 08:20   #9
[R-DEV]Mats391
PR:BF2 Lead Developer
Supporting Member
PR Server License Administrator

Mats391's Avatar
Default Re: Setting Up the BF2 Editor for PR Mapping/Modding

Added small fix to the editor shaders to no longer show deployables as fully black.

Mineral: TIL that Wire-guided missiles actually use wire
Mats391 is offline
Old 2020-06-04, 16:42   #10
[R-DEV]Mineral
PR:BF2 Lead Designer
Supporting Member
PR Server License Administrator

Mineral's Avatar
Default Re: Setting Up the BF2 Editor for PR Mapping/Modding

Hi, small bump. I've updated the lightmap samples for PR:BF2 1.6.1.3. It's been 4 years since the last one and the link was also dead. So was a good time to redo it

https://files.realitymod.com/lightma...prbf2_1613.zip

Also replaced all downloads with realitymod FTP ones, as one was dead again.

Mineral is offline
Closed Thread


Tags
bf2, editor, mapping or modding, setting, 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 15:42.