Server Side Modding

The Official Modding Resource for Battlefield 1942 and Battlefield Vietnam
It is currently Mon Oct 19, 2009 5:30 pm

All times are UTC - 6 hours [ DST ]

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

How To Replace Vehicles

Open your prepped map file. Under the Conquest folder you should have two files: ObjectSpawnTemplates.con and ObjectSpawns.con. For replacing vehicles, the only file you'll need to edit is the ObjectSpawnTemplates.con.

Click on the file, and it will display in the lower box.

Each template starts with the line ObjectTemplate.create ObjectSpawner x where x denotes the spawner's name (do not change this name). Underneath that you'll have objecttemplate 1 and objecttemplate 2. The Coalition is always team 2, and Iraq is always team 1. After the spaces are the objects that will spawn. You can replace these with whatever objects you'd like. Refer to the objects list for the available objects. All you gotta do is copy and paste what you want for each team.

That's it! When you are done, click the little save icon, minimize everything by highlight "bf1942" and build the rfa. To test it out, put the map into your maps folder. With the example above, every place that a DPV would normally spawn for team 1, an abrams will spawn instead. As for all the other numbers you see, you can change those as well. For SpawnDelayAtStart, you can enter a value of 1(on) or 0(off).

Things you can change are underlined:

ObjectTemplate.create ObjectSpawner heavytankspawner
ObjectTemplate.setObjectTemplate 2 M1A1
ObjectTemplate.setObjectTemplate 1 T72
ObjectTemplate.MinSpawnDelay 40
ObjectTemplate.MaxSpawnDelay 60
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10

How To Add Vehicles

Open your prepped map file. Under the Conquest folder you should have two files: ObjectSpawnTemplates.con and ObjectSpawns.con. For adding vehicles, the file you'll need to edit is the ObjectSpawns.con.

Click on the file, and it will display in the lower box.

At this point you should already know how to replace vehicles. You cannot add or delete the ObjectSpawnTemplates, but you can edit the existing ones. It's quite possible that you may have a heavytankspawner that spawns a humvee and a bdrm. Because the spawner name won't always point to what actually spawns, it's good practice to leave notes within the ObjectSpawns.con. Every line with rem in front of it is a programmer's remark--it's not actual code. So if you will be adding heavytankspawners that don't spawn tanks, leave yourself note in the ObjectSawns.con. Trust me! It can and will get confusing later down the road.


rem *** Actually Spawns a Humvee and BDRM ***
Object.create heavytankspawner

That said, let's get to adding vehicles. You'll see that for every object spawn, there is a line containing its absolute position, rotation, and OSId.

The absolute postion refers to the objects exact place on the map with coordinates x/z/y. For the object roation, the only number you'll probably need to change is the x value which is in degrees. Most values you'll sea for this range from -180 to 180. I haven't seen many values for 270, but it should work as well. The OSId is the number identifier given to the flags on the map.

Like I mentioned earlier, it's a good idea to have BattleCraft42. You can open the maps with it and physically see where the coordinates are on the map. For DC maps that were originally on BF1942, you'll have to open the bf1942 version 1st, then you can open the DC version.

If the original makers of the map were good to you, they would have put the ObjectSpawns.con in an orderly arrangement, where each flag's object spawns will be grouped together. If not, that sux and they are gay. Anyway, to add new objects, what I do is copy one of the objects that are already there, paste it in the right (orderly) place, and change the coordinates, OSId, and spawner label to my liking. I use BC42 to get the positioning right. As mentioned above, if the spawner you are using doesn't spawn what it's named after, leave yourself a note!

rem   Like this
After adding all the objects you want, click the little save icon, and build the rfa the same way as before.

*If you want to delete objects, the ObjectsSpawns.con is the place to do so. You can either highlight and delete, or just add "rem" in front of each of the objectsSpawn's lines so you can easily put it back later or just use it as a reference point.


No materials may be duplicated under any circumstances.