How to mod battlefield 2 -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 13 years ago
MODIFYING BATTLEFIELD 2

YOU ARE NOT ALLOWED TO CLAIM THIS DOCUMENT AS YOUR OWN, MODIFY, CHANGE, OR DISTRUBUTE THIS DOCUMENT TO ANYONE ELSE EXCEPT YOURSELF. YOU ARE NOT ALLOWED TO DUPLICATE OR COPY THIS DOCUMENT IN ANY FORM.

If you would like a downloadable version of this document contact [email="smog890@hotmail.com"]smog890@hotmail.com[/email] this version will include the pictures with it. If you would like to see more added to this document or would like to contribute to this document you must contact [email="smog890@hotmail.com"]smog890@hotmail.com[/email].

If you have any questions, comments, or need help for something that is not explained well in this document contact [email="smog890@hotmail.com"]smog890@hotmail.com[/email].

Boot Camp

Setting up the Battlefield 2 Folders:

Battlefield 1942 was a great game to begin with but was very hard to create a mod for it. Battlefield 2 is another great game surpassing 1942 in every way but it is a lot easier to modify the game to your liking. A few steps are needed to set up the game files for your mod so it can be played and you can make changes to the files of Battlefield 2.

The first thing that needs to be done is setting up the files in a new folder that will contain all the Battlefield files that you need to run your mod. To do this go into your main Battlefield folder and click on mods now create a new folder and call it whatever you would like to call it. Now go into the bf2 folder that is in the mod folder and selected everything and copy all of it. Now go into the folder you just created and past everything you just copied from the bf2 folder into it.

Once this is done go start the Battlefield 2 game and get to the main game screen click community and then custom game, once you do this you should see a custom game called whatever you named the folder you created. You can click on this and activate it but there is no need to this yet because it is the same as the bf2 folder that you copied the files from.

Now that you have all of this done exit the game and go back into the custom folder that you created and look for the files that are in WinRar format. These files should show up as a picture that resembles a stack of books if you have WinRar installed on your computer. There are a total of eight files that you will have to un-compiled to do this just click on each of them and let WinRar do the rest for you.

Once you have un-compiled each of these eight files you should now see eight new folders that you can click on and view the contents of. These files contain the inner workings of Battlefield 2 and these are going to be the main files that you will have to modify to create your mod. If everything worked out as stated above the game is now ready to be modified.

Adding Custom Graphic to Community/User mod Section

A few tools are going to needed to start the process of modifying Battlefield 2 and getting your mod set up correctly. I will show you how in this section to create a small custom graphic that will show up under the community/custom games to display your mod logo and talk about some tools that you are going to need.

The first thing that you are going to need is a graphics program such as Paint Shop pro or any other program that can save your pictures or graphics as .png files, a text editor such as notepad will work fine for editing some of the game configurations, and WinRar to un-compile some files that will be used for later making modifications to the game.

Now go into the graphics program that can save your files as .png. Create a custom graphic that will display what your mod is about make the graphic around 300px by 500px. I’m not to sure of the correct size that is needed but the game will adjust it for you if it is too big or to small.

Once you have created the graphic for you mod save it to your main mod folder with it named mod. Make sure it is saved as a .png file or it will not show up in the game. Once you save it go into the Battlefield 2 game go to community/custom games and click once on your mod name. Once you do this you should see the graphic that you just saved in the top right hand corner of the screen.

It’s now time to give the mod a description that will go under your newly created graphic. Exit the game and go into your main mod folder again, you should see a file name Mod and it will be a DESC file. Open that file in notepad, once opened you will see the description that they gave Battlefield 2 under community/ custom game. Now just delete the text and URL’s. Do not delete the code tags such as , , and you needed these.

Now type in a description of your mod between the code tags and if you have a website for you mod put that between the code tags . You can also add your own custom music to be played along with the mod when clicked on, add your music file between the code tags and the version of your mod between the code tags.

This is what it looked like after I put in my own description:

If all went as stated above you should see your mod graphic and descriptions when you go into the community/custom game section of the Battlefield 2 game.

This is what my screen looked like after I did all the steps above:

Modifying the Start up Screen

Now that the custom graphic, and description of the mod is created it is now time to customize the start up screen of the mod. When I refer to the start up screen I am referring to when you click on the game desktop icon and the game starts to load. The start up screen contains the dice logo, EA games logo, legal information and the intro movie.

The reason for modifying this is that it you might want to put in your own custom movie for your mod that you have created or might want to stop the EA, Dice logos from appearing on startup of the game including the Battlefield 2 intro movie.

To do this go into your mod folder and find the file called Init it’s file extension is .CON, open that file with notepad. Once you open it you should have something similar or exactly like this in notepad:

[color=green]rem ** gameLogic hasn't been initialized yet **[/color]

[color=green]rem *** These should be noops in server & editor[/color]

[color=green]bf2Engine.playMovie Movies\EA.bik 1[/color]

[color=green]bf2Engine.playMovie Movies\dice.bik 1[/color]

[color=green]bf2Engine.playMovie Movies\legal.bik 1[/color]

[color=green]bf2Engine.playMovie Movies\intro.bik 0[/color]

[color=green]bf2Engine.playMovie Movies\welcome.bik 0[/color]

[color=black] [/color]

[color=black] What all this means is that these are the logos and movies that are played on startup of Battlefield 2 and in sequential order from first to last. If you wanted to add your own custom logo or graphic to play at start up you would insert it here. This will be covered at a later date in time but for right now lets get ride of all this stuff in the folder. Delete the following lines:[/color]

[color=green]bf2Engine.playMovie Movies\EA.bik 1[/color]

[color=green]bf2Engine.playMovie Movies\dice.bik 1[/color]

[color=green]bf2Engine.playMovie Movies\legal.bik 1[/color]

[color=green]bf2Engine.playMovie Movies\intro.bik 0[/color]

[color=green] [/color][color=black]Save the file and exit notepad. Start Battlefield 2 and go into community/custom games and click on your game mod and click activate. This will now cause your mod to activate. It will exit Battlefield 2 and start your mod. When it starts you will notice that the EA, Dice, and legal logos where not displayed and the intro movie was not shown. This is what we wanted to exactly happen. Now you have a mod that will instantly load and take you to the login screen instead of having to wait for five minutes of intro logos and movies to play threw.[/color]

[color=black] This is how the Init file looked after I deleted everything from it:[/color]

[color=green]rem ** gameLogic hasn't been initialized yet **[/color]

[color=green] [/color]

[color=green]rem *** These should be noops in server & editor[/color]

[color=green]bf2Engine.playMovie Movies\welcome.bik 0[/color][color=black][/color]

[color=black] [/color]

[color=black]Note: The .bik format is bink and smackard game video file codec you can go to http://www.radgametools.com/ to find out more about the file extension.[/color]

[color=black] [/color]

[color=black] [/color]

[color=black]Modifying the Scoring System[/color]

[color=black] [/color]

[color=black]To modify the scoring system in Battlefield 2 go to the directory C:\Program Files\EA GAMES\Battlefield 2\mods\YOURMODNAME\python\game open up the file scoringCommon in notepad. You should see something similar to this when you open up the file:[/color]

[color=black] [/color]

[color=black] [/color]The parts that you will have to modify are the SCORE_KILL – SCORE_KILLASSIST_DAMAGE. To do this simply change the numbers such as SCORE_KILL = 5 like I have done. This will make every kill that you get add 5 to your score.

Note: I have modified in the graphic above the SCORE_KILL and SCORE_TEAMKILL it will show up differently when you open the file as SCORE_KILL = 2 and SCORE_TEAMKILL = -4.

When you have set the scores save the file and start the game and run a single player game and start killing. You will notice that your score changes have taken effect and worked.

Note: I have not gone threw the rest of this code to pick it apart to see what it does that will be in a future updates to modifying Battlefield 2.




Guest

I didn't make it!

0 XP

 
#2 13 years ago

visit http://www.geocities.com/smog890/index.html for a nice looking version of this document.




Destrucktion_XL

I like make go boom.

50 XP

19th April 2004

0 Uploads

205 Posts

0 Threads

#3 13 years ago

Terrific job on this modders guide! There is one issue I should bring to attention, this has to do with making your mod distributable. The problem with this method of modding, is that you are copying ALL of the games files into your mod, which is a huge amount of data. probably over a gig. The focus of this problem is the client_objects.zip file and the levels folder. Both of these files are HUGE, and if included in the mod would make it a HUGE download. An experienced modder wants to include only the files they have edited with a mod, since the game will automatically replace only those files during runtime. Until the editor is actually released its going to be mighty hard to make a mod without including duplicates of unedited files. In the 32 man lan mod, the author uses a batch file to copy levels from the bf2 mod into the 32 man lan mod level folder, this is a nice workaround, but the levels are being duplicated and eating up uneccessary file space. In BFV for example, when a mod was created, it created a shortcut to the level files, so that you don't have to include the entire file, just a 1k shortcut. I believe based on the bf2 file structure that its mod tools will work the same way. Creating a link or shortcut to the actual game files when they are not edited. It seems until the editor is released then or unless someone in the community can create a shortcut similar to the ones used in bfv then we are going to all have a hard time creating distributable mods that don't have a huge filesize.




darth_3pio

Gidday Maaate

50 XP

11th April 2008

0 Uploads

27 Posts

0 Threads

#4 10 years ago

about the custom games music, the tool I am using to convert audio to .ogg, the game does not seem to recognise the output audio file. I have linked it correctly but nothing comes out. What tool do you use?