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)
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
Open your mod and create a "scripts" folder (or name it whatever you want, you will have to copy the name later.

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 :
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 :
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.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 :
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.
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 :
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"
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 :
Change the position value for example, save, press "spotted" and exit/re-enter the igla :
Magic happend again
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