
DPSWAP allows allegiance to make a difference in multiplayer.  There is nothing worse than 
having your own ships and such shooting at you.  This program fixes that problem.


DPSWAP version 1.2

By: Michael Neus  aka  RCAF_GunsJmd/GunsJammed

Email:   GunsJammed@hotmail.com

Web site
http://www.geocities.com/gunsjammed


For use with CFS/CFS2


Original program (version 1.0) written at the request of JG2_Bud_Flight


Disclaimer
----------

Use at your own risk.  The author of the DPSWAP is not liable for any problems caused
by this program.


Distribution
------------

You are free to do with this program as you see fit.  It is FREEWARE, and always will be.


Installation
------------

Place the zip file in your CFS or CFS2 main folder.  Extract using Winzip.  Make sure you have
'Use folder names' checked.  This will create a DPSWAP folder in your CFS or CFS2 main folder
and will put the DPSWAP.EXE, IDLIST.TXT and README.TXT files in that folder.  Create a shortcut
on your desktop to make it easier to use.  If you install in both CFS and CFS2, create a 
shortcut to each DPSWAP exe file and rename as needed, i.e. "Shortcut to DPSwap for CFS2".


Files included in this package
------------------------------

DPSWAP.EXE	The program, will be found in the DPSWAP folder in your CFS2 main folder if
		you install correctly.
IDLIST.TXT	ID's of all known objects in CFS1/CFS2.  Used by DPSWAP if it can't find
		the ID of an object in the current multiplayer.mis file.
README.TXT	This file



About the program
-----------------

If you have an earlier version installed, restore the originals first, the delete the DPSWAP folder,
and install the new version. 

BEFORE RUNNING THE PROGRAM FOR THE FIRST TIME!!!!
Make sure that the stock DP's in the OBJECTS_DP (and the each of the SHIPS sub-folders in CFS2) are
the originals.  This also applies to any add-on ships you might have.  If the DP is supposed to
have guns, make sure you don't have versions that have these guns stripped.  Also, make sure
that ALLEGIANCE is set correctly in these DP's.  This mainly applies to add-on ships.

Possible allegiance values are:

  In CFS,
	0 = No allegiance, will shoot at everyone
	1 = Great Britain
	2 = Germany
	3 = US

  In CFS2
	0 = No allegiance, will shoot at everyone
	1 = Great Britain
	2 = Germany
	3 = US
	4 = Japan


Note that these allegiances have been updated.  The information given in readme.txt in version
1.1 was incorrect.  Germany and Japan were switched around.  More testing with the CFS2 mission
builder showed that I goofed.  While this doesn't really affect how DPSwap works, it just wasn't
quite right.

There is a bit of a problem with some of the DP's in CFS2.  All the American ships have an
allegiance of 1.  This is not a big problem since DPSwap treats 1 and 3 the same.

However, the objects that were brought over to CFS2 from CFS1 are also incorrect.  Again, the
American objects have an alleigiance of 1.  Again, not a big problem.  HOWEVER, the German objects
have an allegiance of 3!!!!  This means they are considered to be allies of the US and Britain.
Not good.  I have posted on my site fixed versions of these object DP's.

These allegiances are correct to the best of my knowledge.  If anyone knows that these values
are in error, please contact me ASAP.



The first time you run the program, it will create the backups of all DP's that contain guns.

Then a dialog will come up.  Select which side you will fly for (or select "Restore DP's" if you
are going to fly offline).  Then click "Swap".

The selection you chose the last time you ran the program will be selected when you run the
program again.

When you click on "Swap", the appropriate versions of the DP's will be written back into
the original OBJECTS_DP and SHIPS folders.

If you selected "Allies" or "Axis", the enemy DP's will be written without changes, but the
friendly DP's will have the gunstations section stripped, thereby eliminating the guns.

Allegiance is determined as follows:

1. If a unit section in the multiplayer.mis file contains an allegiance, that allegiance will
   be used for that unit type.

2. If a unit section does not contain an allegiance, the alligience in the unit type section that
   applies to that unit will be used.

3. If neither the unit not the unit type sections contain an allegiance for an object, the objects
   DP file will be checked for an allegiance.

4. If no allegiance is found in the previous 3 steps, the object is considered to have an allegiance
   of zero, and will keep its guns.

I went to this extreme to attempt to make things as painless as possible when creating missions.
I found that this was really the only way to handle all of the stock missions in CFS and CFS2, and
to also deal with the infrastructures possible in CFS2.  Infrastructures don't provide a way (at
least within the CFS2 mission editor) to define allegiance.

Warning!!! Because of the fact that an objects DP either keeps it's guns, or loses them (it can't
be both), you cannot use a given object in a mission on both the Allied and Axis sides and expect
this to work.  If you wish to put an object on both sides, create a copy of the object and give it
a different name.  And you may want to change the allegiance if there is one in the copy.


In the DP's of friendly objects in the mission, all the gunstations will be deleted, and the
[GUNSTATION] section will have a comment stating that my program deleted them.  Also, entries
are placed in the DPSWAP.INI [STRIPPED_DPS] section so you can see at a glance which DP's have
been affected.


Also, for all objects found in the mission that have guns, the CDP's will be deleted so you
will be sure that CFS/CFS2 will create new CDP's.



This is meant to be used with MultiSwap.  All players swap to a mission.  Then before launching,
players determine which side they will be on (American or Japanese), run DPSWAP, select that
side, and 'Swap' the DP's.  Once all players have done this, the host can launch.

For players joining late, I suggest guessing which team you will end up on, and swapping to
that team's DP's.  The worst that can happen is you guess wrong, and have to exit the game
to swap the other way.  Therefore, this is probably best used for semi-organized mission play.


Version info
------------

Vers 1.2

	Only objects/ships found in the current multiplayer.mis file will get their guns stripped.
	Negeleted to mention this when I first made version 1.1 available.

	Additional note.  Re-backing up ONLY applies to ADDED objects or ships only, not modified
	objects or ships.  If you wish to modify an existing DP, it is best to create a new ship
	or object (can be a copy of an existing one with a new name), and work with that new object.
	Another possible way to handle this is to "Restore DP's" and then delete the dpswap.ini file.
	Make whatever changes you like to the objects/ships DP's.  The next time you run DPSwap, it
	will create a new backup.

	Changes in this version:

	Added message boxes that pop up to let you know when DPSwap has completed a task.  In version
	1.0, the progress bar sorta did this.  Due to changes made in version 1.1, things happened so
	fast that the progress bar was a waste, so I eliminated it.  However, this made it difficult
	to know if DPSwap had actually done anything when you clicked on a button.  The message boxes
	now let you know that something has happened.

	Fixed a minor bug that would set LAST_SAVE as 3 (when doing a Re-backup if I remeber correctly).
	If memory serves me, it didn't really affect the functionality of the program.  Just wasn't 
	right.

	Changed the title of the window to reflect the fact that the program works for both versions
	of CFS.  Oops.

	Changed so that entries in the STRIPPED_DPS section of the INI file say 'guns stripped' instead
	of 'gone'.

Vers 1.1	

	Changed so it now works with CFS or CFS2.

	Changed name of "Write DP's" button to "Swap"

	Added "Re-backup" button to allow re-backing up if new ships or objects are added.  The
	program will automatically restore the originals first.

	Changed so only the DP's that contain guns are backed up.

	Changed so the multiplayer.mis file is also included when determining allegiance.

	Changed the radio buttons so they now are for Allied/Axis (to include CFS1) instead
	of US/Japan.

	Due to the fact that the changes I have made the program swap faster, I removed the
	progress bar.

Vers 1.0

	Original release for CFS2 only.


Guess that's about it.

Good luck, and have fun.


Guns

