DESCRIPTION:

This package is a Campaign Framework that can help some crazy guys to add some campaign functionality to Cortex Command while it is officially missing.

Credits:
	Weegee - original creator
	TheLastBanana - some valuable code
	mail2345 - IRC support


WHAT IS IT?	
	
This IS NOT a campaign in any form, this is a thingie that can help you make a campaign if you will develop and add some missions into it. It allows player to select available missions using GUI and start them from a single point on the global map. Next missions are opened when player completes the previous. To achieve this functionality you'll have to add some special code to your missions, but I greatly simplified all the process. Two missions presented in this framework are just examples, they are almost the same and were taken from my Mission Making Tutorial. Although you can run the third mission it is just the copy of the first so you can't reach missions 4-5-6 and so on.


WARNING:

Be sure to have enough modding\lua skills before using this framework.


FEATURES:

- Dynamic customizable mission selection screen
- Linear mission selection mechanism (that means no plot branches just now)


TUTORIAL:

So what should you do to make a mission compatible with this frmework?

First - You must not make your campaign inside CampaignFramework.rte. Create new module, copy CampaignFramework.rte contents to your new module, update all paths in ini files to point at your new module. I'll use default paths as example but you should replace them with paths to your module.

Second you need to add a reference to Lua library to your scene. Add the following lines to your <scene>.ini file:

	PlaceSceneObject = AEmitter
		CopyOf = CampaignFramework.rte/CampaignFrameworkGlobalLibraryStub
		Position = Vector
			X = 0
			Y = 0
			
your mission and scene MUST be inside your campaign module, or you can encounter errors when CC starts.

Next you need to remove you mission point from the map. It is easier to debug you mission using standard map point, to omit it's selections everey time you need to restart your activity, so you can remove the point right before the release. To remove mission point from the map just specify some big X or Y coordinate:

	LocationOnPlanet = Vector
		X = 0
		Y = -2000
	
Next you need to edit CampaignFramework.lua to add you missions to mission selection menu. Just open the file everything is commented. You can select fighting factions for the menu screen to better suit your campaign factions. Everything is the same as in Tartarus.
		
Finally add the line that will unlock the next mission to your victory function in mission Lua script:

	CF_MakeMissionAvailable("CampaignFramework.rte" , 2);
	
This line will unlock mission #2 in module "CampaignFramework.rte". Player's progress is stored inside CampaignData folder in missions.dat file. Every line stores boolean value for every mission that flags if mission available or not. First mission can be true or false, it does not matter. You can edit this file manually just be sure that it exists or scripts would crash.

Guess that's enough. You can PM  weegee for any questions.



