Contributed by: Jeff Rivett (site admin) Sunday, October 25 2009 @ 08:01 AM -08
Several people have asked how I modded my server to increase the numbers of tanks and planes, how I added extra planes to carriers, how I changed the types of units spawned and how I was able to do all that without creating new maps that need to be downloaded. Well, read on for the gory details.
Server content check setting
In order for server-side mods to work properly, you have to make a change to your server configuration. In the serversettings.con file, change the game.serverContentCheck setting to '0':
If you don't change this setting, players who try to join your server will see this error message: "DATA DIFFERS FROM SERVER", and they will not be able to join.
Adding more tanks and planes to standard BF42 maps
I modify the maps on my main PC in my regular BF42 client folder, test them there in single player mode, then copy them to the server. You'll need to use WinRFA from the Battlefield Mod Development Toolkit[*1] (see 'Files and links' in the left sidebar).
 Back up the RFA files for the map so you can revert if you mess something up. Or you can just make a backup of the whole maps folder (e.g. copy D:\Battlefield 1942\Mods\bf1942\Archives\bf1942\levels to C:\BF1942MapBackups).
 Create a folder for your work (e.g. C:\BF1942Data). We'll call this the main data folder.
 One by one, using WinRFA, open and extract all the files for the map (e.g. \Battlefield 1942\Mods\bf1942\Archives\bf1942\levels\Tobruk.rfa, Tobruk_001.rfa, Tobruk_003.rfa, etc.) into a subfolder of the main data folder (e.g. C:\BF1942Data\Tobruk). There may be more than one source file, but unpack them all into the same folder.
 You might also want to consider moving the contents of the resulting bf1942\levels\<mapname> folder up to the root of the map folder and deleting the bf1942 folder to keep things simple. For example, move all the files in C:\BF1942Data\Tobruk\bf1942\levels\Tobruk to C:\BF1942\Data\Tobruk and then delete C:\BF1942Data\Tobruk\bf1942. But this is optional.
 Use a text editor such as Notepad to modify the file SinglePlayer\ObjectSpawnTemplates.con, replacing all the lines for each aircraft and tank spawner section after the two lines indicating which aircraft (/tank) will spawn with these lines:
ObjectTemplate.MinSpawnDelay 10 ObjectTemplate.MaxSpawnDelay 15 ObjectTemplate.SpawnDelayAtStart 0 ObjectTemplate.TimeToLive 30 ObjectTemplate.Distance 20 ObjectTemplate.Radius 20 ObjectTemplate.DamageWhenLost 10 ObjectTemplate.MaxNrOfObjectSpawned 6
 SOME maps (XPack1 and XPack2) require that you do the same thing for Conquest\ObjectSpawnTemplates.con as well.
 Repack the modified map directory with WinRFA as follows:
 Delete any additional RFA files in the source folder (Tobruk_000.rfa, Tobruk_003.rfa, etc.) There should be only one big RFA file for the map when you're done.
 Test the map in BF42 in single player mode.
 Copy the new RFA to the same folder on the server and delete the extra RFAs for those maps as well (Tobruk_000.rfa, Tobruk_003.rfa, etc.)
Planes on Carriers
As for changing the carrier spawners, I had forgotten how much of a pain in the ass that was. I eventually figured out that you have to unpack the main OBJECTS.RFA file (in \Battlefield 1942\Mods\bf1942\Archives) and modify the spawners in the carrier objects. For extra carrier planes in Midway, I made the following changes to the Vehicles\Sea\Enterprise\Objects.con file in the unpacked OBJECTS.RFA:
rem *** Enterprise_corsairSpawner *** ObjectTemplate.create ObjectSpawner Enterprise_corsairSpawner ObjectTemplate.setObjectTemplate 1 corsair ObjectTemplate.setObjectTemplate 2 corsair ObjectTemplate.minSpawnDelay 10 ObjectTemplate.maxSpawnDelay 10 ObjectTemplate.TimeToLive 120 ObjectTemplate.Distance 20 ObjectTemplate.spawnOffset 0/0/0 ObjectTemplate.holdObject 1 ObjectTemplate.team 1 ObjectTemplate.MaxNrOfObjectSpawned 6 rem *** Enterprise_sbdSpawner *** ObjectTemplate.create ObjectSpawner Enterprise_sbdSpawner ObjectTemplate.setObjectTemplate 1 SBD ObjectTemplate.setObjectTemplate 2 SBD ObjectTemplate.minSpawnDelay 10 ObjectTemplate.maxSpawnDelay 10 ObjectTemplate.TimeToLive 120 ObjectTemplate.Distance 20 ObjectTemplate.spawnOffset 0/0/0 ObjectTemplate.holdObject 1 ObjectTemplate.team 1 ObjectTemplate.MaxNrOfObjectSpawned 6
As well as similar changes to the Shokaku objects.con.
When re-packing the Objects.rfa file using WinRFA, the base path is just Objects.
Finally, if you want a certain kind of plane, tank or any other type of unit to spawn instead of what currently spawns somewhere, you should be able to simply change the name of the unit in SinglePlayer\ObjectSpawnTemplates.con. For example, in Guadalcanal, to change a Corsair spawner to a Mustang spawner, this:
ObjectTemplate.create ObjectSpawner FighterSpawner ObjectTemplate.setObjectTemplate 2 corsair
ObjectTemplate.create ObjectSpawner FighterSpawner ObjectTemplate.setObjectTemplate 2 mustang