Battlefield Modding

The Official Modding Resource for Battlefield 1942 and Battlefield Vietnam

Getting Started
Getting Started
Prepping Your Files
  Testing Methods
Auto-Start Map
True Testing Enviroment
General How-To's
Stop Base Camping
Removing Out Of Bounds
Stop Base Camping 2
Disabling Parachutes
Add Repair Points
Add Spawn Points
Main Base Swapping
Modifying the Point System
Conquest Ticket System
Making CTF Versions of Maps
Vehicle How-To's
Replace/Add Vehicles
Lock Vehicles
Partially Disabling Vehicles
Totally Disabling Vehicles
Making a Carbomb
Adding Nitrous
Making Amphibious
Performance Tweaking
Adding Healing Supply
Adding/Changing/Removing Carrier Vehicles
Weapon How-To's
Spawn Weapon Kits
Change the Weapon Kits of Soldiers
Modifying Weapon Attributes
Disabling Weapons
Modifying the Damage System
Disabling Overheating
Fix Wall Hacks
How to Fix Wall/Floor Hacks
Basrah's Edge
Lost Village
Al Khafji Docks
El Alamein
Other Fixes
Leaning F16 Fix
Glass Humvee
Oil Fields Exploding A-10
Operation Bragg Fixes
Object List
Weapon Kits List
Global Object Spawners
Global Soldier Spawns
Projectile Material Numbers

Getting Started

In order to make your server-side mod, you'll need to get a few programs. I'm sure there are a number of programs you can use, but I'll give you the links for what I think are the easiest to use.

First, you'll need to get Col. Cruachan's RFA Explorer. You'll use this program to edit the code for the maps, and build the rfa's. Included with the program is information on how to use it. Also, in order for this program to work fully, you'll need to install the .NET Framework.

Another useful program to have is BattleCraft '42, which gives a visual aspect of the modding. You can also use it to copy and paste coordinates.


For those of you who are brand new to editing rfa code, I'll try to give you a brief explanatation of what you'll be dealing with. All of the files you will be modifying are .rfa's. Think of them as zip files which contain files and folders. The files you'll be editing are .con files. These can be opened up with any basic text editer like notepad. For most of what you'll be doing, there are two main files you'll work with: ObjectSpawnTemplates.con and ObjectSpawns.con.

ObjectSpawnTemplates.con- When you think of a template, you imagine something having a preset format. Templates set the standard for creating things, and in this case, they give properties to objects that spawn while in-game. Each template is set up in this basic format:

ObjectTemplate.create ObjectSpawner lighttankspawner
ObjectTemplate.setObjectTemplate 2 M2A3
ObjectTemplate.setObjectTemplate 1 BMP2
ObjectTemplate.MinSpawnDelay 35
ObjectTemplate.MaxSpawnDelay 40
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10

The 1st line creates an object spawner, which will spawn objects at a defined location. It also sets a name for the spawner (in this case "lighttankspawner"). Depending on who is holding the nearby flag, it will either spawn a M2A3 or a BMP2. The Coalition is always team 2, and Opposition team 1. That's what those two numbers are referring two in lines 2 & 3.

MinSpawnDelay and MaxSpawnDelay give the min and max times for an object to spawn (in seconds).SpawnDelayAtStart will keep objects from spawning immediately at the start of the game by applying the Min & MaxSpawnDelays. "0" means the delay is off. "1" turns it on.

TimeToLive is the time the vehicle will live w/o an occupant after it travels a certain Distance. DamageWhenLost is the damage the vehicle gives off when it explodes.

The Replace Vehicles section will cover the ObjectSpawnTemplates.con in more detail.

ObjectSpawns.con- Now that you have a template for you objects, you need to give the object spawner locations to spawn, which is set up like this:

Object.create lighttankspawner 
Object.absolutePosition 1730.5/60/801
Object.rotation -90.684/0.00691445/-0.0197906
Object.setOSId 4
Object.setTeam 2

The Add Vehicles (scroll down) section will cover the ObjectSpawns.con in more detail.

No materials may be duplicated under any circumstances.