How to edit files while playing tutorial - Battlefield 2 (2025)

This tutorial will help you and save you valuable time modding the game when you play it in real time.

Well let's start

Here are the prerequisites :

  • Battlefield 2 already installed
  • Notepad++ Link
  • Winrar or any software for extract .zip
  • A mod to edit, never edit the folder *mods/bf2/.. >Tutorial Link (see rule n°1)
What is this for ?

Well you know, modding means that we have to modify files, and launch the game to see if everything is good, close it, and that everytime..

So the goal is to save as much time as possible, and to be able to edit files WHILE PLAYING !Here are the steps to follow :
I use bf2 without going through my mod so that everyone understands

How to edit files while playing tutorial - Battlefield 2 (1)

Open your mod and create a "scripts" folder (or name it whatever you want, you will have to copy the name later.

How to edit files while playing tutorial - Battlefield 2 (2)

Open the "scripts" folder, and create a .con file and name it, in my case is "weaponsSettings.con"
Then after, open the .con file and add this into it, BE CAREFUL OF SPACES :"If v_arg1 == editing"

It should give this :

How to edit files while playing tutorial - Battlefield 2 (3)

Save it and leave it aside for a while.

Now be careful, don't miss the crucial step, we will have to edit a file in menu_server.zip.
Go to > menu_server.zip/HUD/HudSetup/Communication/HudElementsRadioComm.con

And then you need to add a line here :
"hudBuilder.setButtonNodeConCmd "run scripts/weaponsSettings.con editing" 0"

It should give this :
How to edit files while playing tutorial - Battlefield 2 (4)

Save it.

So what did we do? We used the "enemy spot" button in the game (Key A - azerty or q for qwerty) to activate the script which will change the files in game, remember that it will always be impossible to edit the .zip files when the game is running, but don't worry, it won't be a problem.

Now here's the fun part, you can now open the game (of course in windowed mod), and launch a map alone, try not to use bots when you do this, it could do weird things.

Okay now that you are in game, open your file in the script, and open objects_server.zip (or the zip in which you would like to make your modifications.

How to edit files while playing tutorial - Battlefield 2 (5)Now we're going to do a few things, let's start something simple, change the number of bullets/magazine of my ak101, go to objects_server.zip/weapons/handheld/RURIF_AK101/RURIF_AK101.tweak

Open it, and just copy the name of the weapon and the component you are going to modify into your script and save it, pay attention to spaces, do it like the screenshot below :

How to edit files while playing tutorial - Battlefield 2 (6)

Obviously, add the lines you want, you can edit EVERYTHING, weapons, engine, deviation, speed, sounds, effects

Be careful though, everything you enter in the script is only for testing, once the game is closed, don't forget to report the values/modifications in your zip files !

Each line that you write in the script will overwrite the previous value, for example putting a 100 bullet magazine will replace the previous value, nothing will add together

Don't like the changes? Do you want to go back? Re-enter the previous values ​​and save the script, deleting the lines will not change anything.

Well let's go back to our ak101 with 30 bullets by default, let's give him 500 for example :

How to edit files while playing tutorial - Battlefield 2 (7)

Did you save the script and nothing changed? This is normal, remember, we configured the script on the spot button, press "A" (or q) and click on "spotted"

Still nothing changed? This is still normal, most modifications require the player to commit suicide (while carrying a weapon) or exit and re-enter the stationary vehicle/weapon for the modifications to take place.

After suicide, the magic happens :

How to edit files while playing tutorial - Battlefield 2 (8)

And here is an example of what we can do, the script is very useful especially for modifying vehicle engines, and object/hud positions, as well as sounds, camera and effects, you can add lines afterwards, it's entirely possible, for the HUD it is an a little different, here are the lines to use :

For the hud position : (hudBuilder.setActiveObject)

hudBuilder.setNodePos 274 175

(first value is axe "x" , second is "y")

For the size :

hudBuilder.setNodeSize 256 256

For example I want to move the hud of the igla

enter the name of the hud igla in the script :

How to edit files while playing tutorial - Battlefield 2 (9)

Change the position value for example, save, press "spotted" and exit/re-enter the igla :
Magic happend again

How to edit files while playing tutorial - Battlefield 2 (10)

Well of course it's just a demo, it's not really useful to move the hud of the bf2 igla !

And don't forget, When you exit the game the changes are lost, so to keep the changes, you have edit the files in the zip.

And here I think it's quite detailed, I took a really long time to write all this, don't hesitate to leave a comment to let me know if it was useful to you :)

Thanks to @EUWINPRO for the help !

For more information, join the discord modding server : Discord invite
If you want to save that tutorial, use chrome, then print tool, and save to .pdf

See you soon on the Battlefield

Ryan_Production

How to edit files while playing tutorial - Battlefield 2 (2025)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Prof. Nancy Dach

Last Updated:

Views: 6459

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Prof. Nancy Dach

Birthday: 1993-08-23

Address: 569 Waelchi Ports, South Blainebury, LA 11589

Phone: +9958996486049

Job: Sales Manager

Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.