// Mods Handler.
// Worthless Bums 2013.


// Tests the mods system.
// NOTE: Is this still functional? - 10 February 2014
function testModsSystem (%modFilePath)
{//echo("testModsSystem()");
//testModsSystem("/images/WBL.png");
	%aggregateFilePath = "../data/mods/" @ $GameModPath @ %modFilePath;
	//echo("%aggregateFilePath =" SPC %aggregateFilePath);
	%filePath = expandFilename(%aggregateFilePath);
	%file = new fileobject();
	// Open the file for read.
	%ret = %file.OpenForRead(%filePath);
	//echo("%ret =" SPC %ret);
	// Can't open the file.
	if (!%ret)
	{//echo(%aggregateFilePath SPC "does not exist!");
		return false;
	}
	// Can open the file.
	else
	{//echo(%aggregateFilePath SPC "exists!");
		return true;
	}
	// Close the file.
	%file.close();
}


function loadExposedData ()
{//echo("loadExposedData()");
	// Sets the file to directory path: "C:\Users\<user>\AppData\Roaming\Steam Marines\"
	%filePath = getModDataDirectory() @ "data.mod";
	//%filePath = expandFilename(%filePath);
	%dataFile = new fileobject();
	%ret = %dataFile.OpenForRead(%filePath);
	if (!%ret	||
		(%ret	&&														// Can read the file...
		 getWord(%dataFile.ReadLine(), 1) !$= $currentGameVersion))		// ... but it's the wrong version!
	{
		error("     No data.mod file! Creating data.mod file!");
		%dataFile.close();									// Close file.
		%ret = %dataFile.OpenForWrite(getModDataDirectory() @ "data.mod");		// Create file.
		if (%ret)
		{
			// Need to write default data here!
			%dataFile.WriteLine("version " @ $currentGameVersion);
				%dataFile.WriteLine("// Marine Name List.");
					%dataFile.WriteLine("marineNameList" SPC "Maverick");
					%dataFile.WriteLine("marineNameList" SPC "Machine");
					%dataFile.WriteLine("marineNameList" SPC "Acorn");
					%dataFile.WriteLine("marineNameList" SPC "Oak");
					%dataFile.WriteLine("marineNameList" SPC "Border");
					%dataFile.WriteLine("marineNameList" SPC "Laser");
					%dataFile.WriteLine("marineNameList" SPC "Cap");
					%dataFile.WriteLine("marineNameList" SPC "Cyborg");
					%dataFile.WriteLine("marineNameList" SPC "Lupis");
					%dataFile.WriteLine("marineNameList" SPC "Bulwark");
					%dataFile.WriteLine("marineNameList" SPC "Breeze");
					%dataFile.WriteLine("marineNameList" SPC "Wolf");
					%dataFile.WriteLine("marineNameList" SPC "Bear");
					%dataFile.WriteLine("marineNameList" SPC "Lion");
					%dataFile.WriteLine("marineNameList" SPC "Smelter");
					%dataFile.WriteLine("marineNameList" SPC "Gearhead");
					%dataFile.WriteLine("marineNameList" SPC "Cog");
					%dataFile.WriteLine("marineNameList" SPC "Storm");
					%dataFile.WriteLine("marineNameList" SPC "Thunder");
					%dataFile.WriteLine("marineNameList" SPC "Deadeye");
					%dataFile.WriteLine("marineNameList" SPC "Steady");
					%dataFile.WriteLine("marineNameList" SPC "Cobb");
					%dataFile.WriteLine("marineNameList" SPC "Animal");
					%dataFile.WriteLine("marineNameList" SPC "Byte");
					%dataFile.WriteLine("marineNameList" SPC "Bit");
					%dataFile.WriteLine("marineNameList" SPC "Mega");
					%dataFile.WriteLine("marineNameList" SPC "Tetra");
					%dataFile.WriteLine("marineNameList" SPC "Steel");
					%dataFile.WriteLine("marineNameList" SPC "Iron");
					%dataFile.WriteLine("marineNameList" SPC "Point");
					%dataFile.WriteLine("marineNameList" SPC "Blaze");
					%dataFile.WriteLine("marineNameList" SPC "Freeze");
					%dataFile.WriteLine("marineNameList" SPC "Point");
					%dataFile.WriteLine("marineNameList" SPC "Section");
					%dataFile.WriteLine("marineNameList" SPC "Mental");
					%dataFile.WriteLine("marineNameList" SPC "Shadow");
					%dataFile.WriteLine("marineNameList" SPC "Rock");
					%dataFile.WriteLine("marineNameList" SPC "Chowder");
					%dataFile.WriteLine("marineNameList" SPC "Salty");
					%dataFile.WriteLine("marineNameList" SPC "Mac");
					%dataFile.WriteLine("marineNameList" SPC "Zapp");
					%dataFile.WriteLine("marineNameList" SPC "Grinder");
					%dataFile.WriteLine("marineNameList" SPC "Ender");
					%dataFile.WriteLine("marineNameList" SPC "North");
					%dataFile.WriteLine("marineNameList" SPC "South");
					%dataFile.WriteLine("marineNameList" SPC "East");
					%dataFile.WriteLine("marineNameList" SPC "West");
					%dataFile.WriteLine("marineNameList" SPC "Bishop");
					%dataFile.WriteLine("marineNameList" SPC "Knight");
					%dataFile.WriteLine("marineNameList" SPC "Focus");
					%dataFile.WriteLine("marineNameList" SPC "Tiger");
					%dataFile.WriteLine("marineNameList" SPC "Hatter");
					%dataFile.WriteLine("marineNameList" SPC "Boots");
					%dataFile.WriteLine("marineNameList" SPC "Bootsie");
					%dataFile.WriteLine("marineNameList" SPC "Lotus");
					%dataFile.WriteLine("marineNameList" SPC "Bud");
					%dataFile.WriteLine("marineNameList" SPC "Buddy");
					%dataFile.WriteLine("marineNameList" SPC "Joker");
					%dataFile.WriteLine("marineNameList" SPC "Copper");
					%dataFile.WriteLine("marineNameList" SPC "Handy");
					%dataFile.WriteLine("marineNameList" SPC "Bouncer");
					%dataFile.WriteLine("marineNameList" SPC "Rocky");
					%dataFile.WriteLine("marineNameList" SPC "Potter");
					%dataFile.WriteLine("marineNameList" SPC "Clay");
					%dataFile.WriteLine("marineNameList" SPC "Brick");
					%dataFile.WriteLine("marineNameList" SPC "Wildcat");
					%dataFile.WriteLine("marineNameList" SPC "Dynamo");
					%dataFile.WriteLine("marineNameList" SPC "Jacker");
					%dataFile.WriteLine("marineNameList" SPC "Boony");
					%dataFile.WriteLine("marineNameList" SPC "Legs");
					%dataFile.WriteLine("marineNameList" SPC "Rasp");
					%dataFile.WriteLine("marineNameList" SPC "Corn");
					%dataFile.WriteLine("marineNameList" SPC "Berry");
					%dataFile.WriteLine("marineNameList" SPC "Limps");
					%dataFile.WriteLine("marineNameList" SPC "Gimp");
					%dataFile.WriteLine("marineNameList" SPC "Ace");
					%dataFile.WriteLine("marineNameList" SPC "Deuce");
					%dataFile.WriteLine("marineNameList" SPC "Rook");
					%dataFile.WriteLine("marineNameList" SPC "Pawn");
					%dataFile.WriteLine("marineNameList" SPC "Devil");
					%dataFile.WriteLine("marineNameList" SPC "Macabre");
			
				%dataFile.WriteLine("// Hulk Suit Data.");
					// Hulk Suit data.
					%dataFile.WriteLine("hulkSuitHealth"				SPC 10);
					%dataFile.WriteLine("hulkSuitArmor"	 				SPC 5);
					%dataFile.WriteLine("HulkFlamethrowerRange" 		SPC 2);
					%dataFile.WriteLine("HulkFlamethrowerDamage" 		SPC 12);
					
				%dataFile.WriteLine("// Fog-of-War Data.");
					%dataFile.WriteLine("showAndTellWait"				SPC 250);
					%dataFile.WriteLine("fogOfWarPostProccessingDelay"	SPC 125);
					%dataFile.WriteLine("wallDestructionFogDelay"		SPC 100);
				
				%dataFile.WriteLine("// Misc Data.");
					// Misc data.
					%dataFile.WriteLine("maxMonsters" 					SPC 28);
					%dataFile.WriteLine("smashableWallChance" 			SPC 60);
					%dataFile.WriteLine("baseFogTime" 					SPC 60);
					%dataFile.WriteLine("fogIncrementTime" 				SPC 60);
					%dataFile.WriteLine("bulletImpactDelay" 			SPC 200);
					%dataFile.WriteLine("grenadeThrowRange" 			SPC 2);
					%dataFile.WriteLine("normalGrenadeAoeDamage" 		SPC 10);
					%dataFile.WriteLine("trapReductionChance" 			SPC 10);
					%dataFile.WriteLine("consoleSpawnChance" 			SPC 35);
					%dataFile.WriteLine("ConsoleMoneyChance" 			SPC 50);
					%dataFile.WriteLine("LockersUpgradeChance" 			SPC 10);
					%dataFile.WriteLine("PumpPlacementChance" 			SPC 25);
					%dataFile.WriteLine("dispenserSpawnChance" 			SPC 20);
					%dataFile.WriteLine("DispenserMoneyMin" 			SPC 300);
					%dataFile.WriteLine("DispenserMoneyMax" 			SPC 600);
					%dataFile.WriteLine("gratingChance" 				SPC 10);
					%dataFile.WriteLine("gratingMonsterChance" 			SPC 10);
					%dataFile.WriteLine("barrelPlacementChance" 		SPC 4);
					%dataFile.WriteLine("weaponStatReductionChance" 	SPC 10);
					%dataFile.WriteLine("baseTreasureSpawn" 			SPC 3);
					%dataFile.WriteLine("oxygenTankMinimum" 			SPC 4);
					%dataFile.WriteLine("levelsPerDeck" 				SPC 5);
					%dataFile.WriteLine("monsterKillItemSpawnChance" 	SPC 8);
					%dataFile.WriteLine("standardTrapDamage" 			SPC 4);
					%dataFile.WriteLine("squadSlowMotionScale" 			SPC 0.4);
					%dataFile.WriteLine("medicalDeckMedkitDropChance" 	SPC 30);
					%dataFile.WriteLine("autoSwitchSquadMemberDelay" 	SPC 2500);
					%dataFile.WriteLine("laserSightAccuracyBonus" 		SPC 15);
					%dataFile.WriteLine("deckInvasionChance" 			SPC 3);
					%dataFile.WriteLine("HeightAccuracyBonus" 			SPC 50);
					%dataFile.WriteLine("HeightAccuracyPenalty" 		SPC 25);
					%dataFile.WriteLine("MonsterGroupChance" 			SPC 50);
					%dataFile.WriteLine("MonsterSneakRadius" 			SPC 5);
					%dataFile.WriteLine("MonsterChanceToSneak" 			SPC 10);
					%dataFile.WriteLine("MaxMonsterSneakDistance" 		SPC 25);
					%dataFile.WriteLine("monsterBreakPursuitChance" 	SPC 25);
					%dataFile.WriteLine("TrapMaxPerLevel" 				SPC 8);
					%dataFile.WriteLine("TappingMonsterChance" 			SPC 75);
					%dataFile.WriteLine("TappingWallChance" 			SPC 50);
					%dataFile.WriteLine("PortholeSpaceDialogueChance" 	SPC 25);
					%dataFile.WriteLine("plasticExplosiveSpawnChance" 	SPC 10);
					%dataFile.WriteLine("survivorSpawnChance" 			SPC 50);
					%dataFile.WriteLine("MerchantSpecialItemChance" 	SPC 8);
					%dataFile.WriteLine("bashChanceModifier" 			SPC 10);
					%dataFile.WriteLine("armsAccuracyModifier" 			SPC 3);
					%dataFile.WriteLine("crewCorpseChance" 				SPC 5);
					%dataFile.WriteLine("floorMarkingsChance" 			SPC 10);
					%dataFile.WriteLine("grenadeDestroyDoorChance" 		SPC 25);
					%dataFile.WriteLine("medkitHealthGain" 				SPC 5);
					%dataFile.WriteLine("UseSlowdownEffects" 			SPC false);
					%dataFile.WriteLine("MouseFadeTime" 				SPC 5000);
					%dataFile.WriteLine("ShowOnlineScores" 				SPC false);
					%dataFile.WriteLine("levelExperience2" 				SPC 50);
					%dataFile.WriteLine("levelExperience3" 				SPC 125);
					%dataFile.WriteLine("levelExperience4" 				SPC 250);
					%dataFile.WriteLine("levelExperience5" 				SPC 500);
					%dataFile.WriteLine("levelExperience6" 				SPC 999999);
					%dataFile.WriteLine("levelExperience7" 				SPC 9999999);
					%dataFile.WriteLine("levelExperience8" 				SPC 99999999);
					%dataFile.WriteLine("levelExperience9" 				SPC 999999999);
					%dataFile.WriteLine("levelExperience10" 			SPC 9999999999);
					%dataFile.WriteLine("levelExperience11" 			SPC 99999999999);
				
				%dataFile.WriteLine("// Leader Class Active Talent Data.");
					%dataFile.WriteLine("chargeAPCost" 					SPC 3);
					%dataFile.WriteLine("snapShotsAPCost" 				SPC 2);
					%dataFile.WriteLine("radarAPCost" 					SPC 3);
					%dataFile.WriteLine("stimAPCost" 					SPC 3);
					%dataFile.WriteLine("squadStimDamageBoost" 			SPC 2);
					%dataFile.WriteLine("squadStimAccuracyBoost" 		SPC 5);
				%dataFile.WriteLine("// Leader Class Passive Talent Data.");
					%dataFile.WriteLine("ironResolveReduction" 			SPC 25);
					%dataFile.WriteLine("flakRoundsReduction" 			SPC 1);
					%dataFile.WriteLine("fireFighterReduction" 			SPC 25);
					%dataFile.WriteLine("vigilanceEvasion" 				SPC 10);
				
				%dataFile.WriteLine("// Scout Class Active Talent Data.");
					%dataFile.WriteLine("scopedAPCost" 					SPC 3);
						%dataFile.WriteLine("scopedAccuracyBoost" 		SPC 100);
						%dataFile.WriteLine("scopedDamageBoost" 		SPC 2);
					%dataFile.WriteLine("calledShotAPCost" 				SPC 3);
						%dataFile.WriteLine("caledShotAPDeduction" 		SPC 1);
					%dataFile.WriteLine("garroteAPCost" 				SPC 3);
						%dataFile.WriteLine("garroteDamage" 			SPC 10);
					%dataFile.WriteLine("stasisAPCost" 					SPC 4);
				%dataFile.WriteLine("// Scout Class Passive Talent Data.");
					%dataFile.WriteLine("secondSkinAPRatio" 			SPC 50);
					%dataFile.WriteLine("stealthyEvasion" 				SPC 10);
					%dataFile.WriteLine("autoloaderLoadCost" 			SPC 1);
					%dataFile.WriteLine("biohazardDamageBoost" 			SPC 2);
				
				%dataFile.WriteLine("// Grenadier Class Active Talent Data.");
					%dataFile.WriteLine("napalmAPCost" 					SPC 2);
					%dataFile.WriteLine("batterAPCost" 					SPC 2);
					%dataFile.WriteLine("pincerAPCost" 					SPC 2);
						%dataFile.WriteLine("pincerARReduction" 		SPC 1);
					%dataFile.WriteLine("empAPCost" 					SPC 3);
						%dataFile.WriteLine("EmpDamage" 				SPC 9);
						%dataFile.WriteLine("EmpRange" 					SPC 18);
				%dataFile.WriteLine("// Grenadier Class Passive Talent Data.");
					%dataFile.WriteLine("ablativeArmorReduction" 		SPC 25);
				
				%dataFile.WriteLine("// Support Class Active Talent Data.");
					%dataFile.WriteLine("napalmAPCost" 					SPC 2);
						%dataFile.WriteLine("pointBlankArmorReduction" 	SPC 50);
					%dataFile.WriteLine("hailMaryAPCost" 				SPC 2);
						%dataFile.WriteLine("hailMaryAccuracyBoost" 	SPC 10);
						%dataFile.WriteLine("hailMaryRangeBoost" 		SPC 2);
					%dataFile.WriteLine("bulwarkAPCost" 				SPC 3);
					%dataFile.WriteLine("turretAPCost" 					SPC 4);
						%dataFile.WriteLine("squadTurretAmmoCost" 		SPC 2);
				%dataFile.WriteLine("// Support Class Passive Talent Data.");
					%dataFile.WriteLine("sharkRoundsIgnoreArmor" 		SPC 50);
				
				%dataFile.WriteLine("// Engineer Class Active Talent Data.");
					%dataFile.WriteLine("targetScanAPCost" 				SPC 3);
					%dataFile.WriteLine("magFistAPCost" 				SPC 2);
					%dataFile.WriteLine("weldAPCost" 					SPC 2);
					%dataFile.WriteLine("weldARCost" 					SPC 1);
					%dataFile.WriteLine("weldHealthGain" 				SPC 2);
					%dataFile.WriteLine("ammosmithAPCost" 				SPC 3);
				%dataFile.WriteLine("// Engineer Class Passive Talent Data.");
					%dataFile.WriteLine("stunShotsDamageBoost" 				SPC 2);
					%dataFile.WriteLine("activeTargetingAccuracyBoost" 		SPC 15);
					%dataFile.WriteLine("techUpgradeLaserModAccuracyBoost" 	SPC 10);
					%dataFile.WriteLine("techUpgradePlasmaModDamageBoost" 	SPC 4);
				
				// Monster Data
				%dataFile.WriteLine("// Enemy Unit Data.");
				%dataFile.WriteLine("	// NOTE: Range value is tile * 4,");
				%dataFile.WriteLine("	//       e.g. 12 = [3 tiles].");
					%dataFile.WriteLine("// Brute.");
						%dataFile.WriteLine("bruteBaseLevel" 				SPC 1);
						%dataFile.WriteLine("bruteBaseHP" 					SPC 12);
						%dataFile.WriteLine("bruteBaseAP" 					SPC 3);
						%dataFile.WriteLine("bruteBaseAR" 					SPC 2);
						%dataFile.WriteLine("bruteBaseAttack" 				SPC 80);
						%dataFile.WriteLine("bruteBaseEvasion" 				SPC 10);
						%dataFile.WriteLine("bruteBaseCanRange" 			SPC false);
						%dataFile.WriteLine("bruteBaseRange" 				SPC 0);
						%dataFile.WriteLine("bruteBaseMeleeDamage" 			SPC 7);
						%dataFile.WriteLine("bruteBaseMeleeDamageType" 		SPC "physical");
						%dataFile.WriteLine("bruteBaseRangeDamage" 			SPC 10);
						%dataFile.WriteLine("bruteBaseRangeDamageType" 		SPC "physical");
						%dataFile.WriteLine("bruteBaseIsHuman" 				SPC false);
						%dataFile.WriteLine("bruteBaseIsRobot" 				SPC true);
						%dataFile.WriteLine("bruteBaseIsAlien" 				SPC false);
					%dataFile.WriteLine("// Flamejack.");
						%dataFile.WriteLine("flamejackBaseLevel" 				SPC 1);
						%dataFile.WriteLine("flamejackBaseHP" 				SPC 15);
						%dataFile.WriteLine("flamejackBaseAP" 				SPC 3);
						%dataFile.WriteLine("flamejackBaseAR" 				SPC 3);
						%dataFile.WriteLine("flamejackBaseAttack" 			SPC 80);
						%dataFile.WriteLine("flamejackBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("flamejackBaseCanRange" 		SPC true);
						%dataFile.WriteLine("flamejackBaseRange" 			SPC 12);
						%dataFile.WriteLine("flamejackBaseMeleeDamage" 		SPC 5);
						%dataFile.WriteLine("flamejackBaseMeleeDamageType" 	SPC "physical");
						%dataFile.WriteLine("flamejackBaseRangeDamage" 		SPC 8);
						%dataFile.WriteLine("flamejackBaseRangeDamageType" 	SPC "fire");
						%dataFile.WriteLine("flamejackBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("flamejackBaseIsRobot" 			SPC true);
						%dataFile.WriteLine("flamejackBaseIsAlien" 			SPC false);
					%dataFile.WriteLine("// Revenant.");
						%dataFile.WriteLine("revenantBaseLevel" 			SPC 4);
						%dataFile.WriteLine("revenantBaseHP" 				SPC 90);
						%dataFile.WriteLine("revenantBaseAP" 				SPC 5);
						%dataFile.WriteLine("revenantBaseAR" 				SPC 9);
						%dataFile.WriteLine("revenantBaseAttack" 			SPC 75);
						%dataFile.WriteLine("revenantBaseEvasion" 			SPC 30);
						%dataFile.WriteLine("revenantBaseCanRange" 			SPC false);
						%dataFile.WriteLine("revenantBaseRange" 			SPC 0);
						%dataFile.WriteLine("revenantBaseMeleeDamage" 		SPC 5);
						%dataFile.WriteLine("revenantBaseMeleeDamageType" 	SPC "acid");
						%dataFile.WriteLine("revenantBaseRangeDamage" 		SPC 5);
						%dataFile.WriteLine("revenantBaseRangeDamageType" 	SPC "acid");
						%dataFile.WriteLine("revenantBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("revenantBaseIsRobot" 			SPC true);
						%dataFile.WriteLine("revenantBaseIsAlien" 			SPC false);
					%dataFile.WriteLine("// Hulk.");
						%dataFile.WriteLine("hulkBaseLevel" 				SPC 3);
						%dataFile.WriteLine("hulkBaseHP" 					SPC 120);
						%dataFile.WriteLine("hulkBaseAP" 					SPC 4);
						%dataFile.WriteLine("hulkBaseAR" 					SPC 8);
						%dataFile.WriteLine("hulkBaseAttack" 				SPC 75);
						%dataFile.WriteLine("hulkBaseEvasion" 				SPC 15);
						%dataFile.WriteLine("hulkBaseCanRange" 				SPC true);
						%dataFile.WriteLine("hulkBaseRange" 				SPC 12);
						%dataFile.WriteLine("hulkBaseMeleeDamage" 			SPC 15);
						%dataFile.WriteLine("hulkBaseMeleeDamageType"	 	SPC "physical");
						%dataFile.WriteLine("hulkBaseRangeDamage" 			SPC 9);
						%dataFile.WriteLine("hulkBaseRangeDamageType" 		SPC "physical");
						%dataFile.WriteLine("hulkBaseIsHuman" 				SPC false);
						%dataFile.WriteLine("hulkBaseIsRobot" 				SPC true);
						%dataFile.WriteLine("hulkBaseIsAlien" 				SPC false);
					%dataFile.WriteLine("// Bucket.");
						%dataFile.WriteLine("bucketBaseLevel" 				SPC 1);
						%dataFile.WriteLine("bucketBaseHP" 					SPC 18);
						%dataFile.WriteLine("bucketBaseAP" 					SPC 3);
						%dataFile.WriteLine("bucketBaseAR" 					SPC 4);
						%dataFile.WriteLine("bucketBaseAttack" 				SPC 75);
						%dataFile.WriteLine("bucketBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("bucketBaseCanRange" 			SPC false);
						%dataFile.WriteLine("bucketBaseRange" 				SPC 0);
						%dataFile.WriteLine("bucketBaseMeleeDamage" 		SPC 7);
						%dataFile.WriteLine("bucketBaseMeleeDamageType"	 	SPC "physical");
						%dataFile.WriteLine("bucketBaseRangeDamage" 		SPC 7);
						%dataFile.WriteLine("bucketBaseRangeDamageType" 	SPC "physical");
						%dataFile.WriteLine("bucketBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("bucketBaseIsRobot" 			SPC true);
						%dataFile.WriteLine("bucketBaseIsAlien" 			SPC false);
					%dataFile.WriteLine("// Thopter.");
						%dataFile.WriteLine("thopterBaseLevel" 				SPC 1);
						%dataFile.WriteLine("thopterBaseHP" 				SPC 15);
						%dataFile.WriteLine("thopterBaseAP" 				SPC 4);
						%dataFile.WriteLine("thopterBaseAR" 				SPC 4);
						%dataFile.WriteLine("thopterBaseAttack" 			SPC 90);
						%dataFile.WriteLine("thopterBaseEvasion" 			SPC 40);
						%dataFile.WriteLine("thopterBaseCanRange" 			SPC false);
						%dataFile.WriteLine("thopterBaseRange" 				SPC 0);
						%dataFile.WriteLine("thopterBaseMeleeDamage" 		SPC 6);
						%dataFile.WriteLine("thopterBaseMeleeDamageType"	SPC "physical");
						%dataFile.WriteLine("thopterBaseRangeDamage" 		SPC 6);
						%dataFile.WriteLine("thopterBaseRangeDamageType" 	SPC "physical");
						%dataFile.WriteLine("thopterBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("thopterBaseIsRobot" 			SPC true);
						%dataFile.WriteLine("thopterBaseIsAlien" 			SPC false);
					%dataFile.WriteLine("// Ripsaw.");
						%dataFile.WriteLine("ripsawBaseLevel" 				SPC 2);
						%dataFile.WriteLine("ripsawBaseHP" 					SPC 25);
						%dataFile.WriteLine("ripsawBaseAP" 					SPC 4);
						%dataFile.WriteLine("ripsawBaseAR" 					SPC 4);
						%dataFile.WriteLine("ripsawBaseAttack" 				SPC 80);
						%dataFile.WriteLine("ripsawBaseEvasion" 			SPC 25);
						%dataFile.WriteLine("ripsawBaseCanRange" 			SPC false);
						%dataFile.WriteLine("ripsawBaseRange" 				SPC 0);
						%dataFile.WriteLine("ripsawBaseMeleeDamage" 		SPC 12);
						%dataFile.WriteLine("ripsawBaseMeleeDamageType"		SPC "physical");
						%dataFile.WriteLine("ripsawBaseRangeDamage" 		SPC 12);
						%dataFile.WriteLine("ripsawBaseRangeDamageType" 	SPC "physical");
						%dataFile.WriteLine("ripsawBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("ripsawBaseIsRobot" 			SPC false);
						%dataFile.WriteLine("ripsawBaseIsAlien" 			SPC true);
					%dataFile.WriteLine("// Tick.");
						%dataFile.WriteLine("tickBaseLevel" 				SPC 2);
						%dataFile.WriteLine("tickBaseHP" 					SPC 2);
						%dataFile.WriteLine("tickBaseAP" 					SPC 5);
						%dataFile.WriteLine("tickBaseAR" 					SPC 0);
						%dataFile.WriteLine("tickBaseAttack" 				SPC 90);
						%dataFile.WriteLine("tickBaseEvasion" 				SPC 50);
						%dataFile.WriteLine("tickBaseCanRange" 				SPC false);
						%dataFile.WriteLine("tickBaseRange" 				SPC 0);
						%dataFile.WriteLine("tickBaseMeleeDamage" 			SPC 2);
						%dataFile.WriteLine("tickBaseMeleeDamageType"		SPC "physical");
						%dataFile.WriteLine("tickBaseRangeDamage" 			SPC 2);
						%dataFile.WriteLine("tickBaseRangeDamageType" 		SPC "physical");
						%dataFile.WriteLine("tickBaseIsHuman" 				SPC false);
						%dataFile.WriteLine("tickBaseIsRobot" 				SPC true);
						%dataFile.WriteLine("tickBaseIsAlien" 				SPC false);
					%dataFile.WriteLine("// Amputator.");
						%dataFile.WriteLine("amputatorBaseLevel" 			SPC 2);
						%dataFile.WriteLine("amputatorBaseHP" 				SPC 35);
						%dataFile.WriteLine("amputatorBaseAP" 				SPC 3);
						%dataFile.WriteLine("amputatorBaseAR" 				SPC 5);
						%dataFile.WriteLine("amputatorBaseAttack" 			SPC 80);
						%dataFile.WriteLine("amputatorBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("amputatorBaseCanRange" 		SPC false);
						%dataFile.WriteLine("amputatorBaseRange" 			SPC 0);
						%dataFile.WriteLine("amputatorBaseMeleeDamage" 		SPC 12);
						%dataFile.WriteLine("amputatorBaseMeleeDamageType"	SPC "physical");
						%dataFile.WriteLine("amputatorBaseRangeDamage" 		SPC 12);
						%dataFile.WriteLine("amputatorBaseRangeDamageType" 	SPC "physical");
						%dataFile.WriteLine("amputatorBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("amputatorBaseIsRobot" 			SPC true);
						%dataFile.WriteLine("amputatorBaseIsAlien" 			SPC false);
					%dataFile.WriteLine("// Torgon.");
						%dataFile.WriteLine("torgonBaseLevel" 				SPC 2);
						%dataFile.WriteLine("torgonBaseHP" 					SPC 20);
						%dataFile.WriteLine("torgonBaseAP" 					SPC 3);
						%dataFile.WriteLine("torgonBaseAR" 					SPC 6);
						%dataFile.WriteLine("torgonBaseAttack" 				SPC 75);
						%dataFile.WriteLine("torgonBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("torgonBaseCanRange" 			SPC true);
						%dataFile.WriteLine("torgonBaseRange" 				SPC 16);
						%dataFile.WriteLine("torgonBaseMeleeDamage" 		SPC 5);
						%dataFile.WriteLine("torgonBaseMeleeDamageType"		SPC "physical");
						%dataFile.WriteLine("torgonBaseRangeDamage" 		SPC 5);
						%dataFile.WriteLine("torgonBaseRangeDamageType" 	SPC "alien");
						%dataFile.WriteLine("torgonBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("torgonBaseIsRobot" 			SPC false);
						%dataFile.WriteLine("torgonBaseIsAlien" 			SPC true);
					%dataFile.WriteLine("// TorSniper.");
						%dataFile.WriteLine("torsniperBaseLevel" 			SPC 3);
						%dataFile.WriteLine("torsniperBaseHP" 				SPC 15);
						%dataFile.WriteLine("torsniperBaseAP" 				SPC 5);
						%dataFile.WriteLine("torsniperBaseAR" 				SPC 3);
						%dataFile.WriteLine("torsniperBaseAttack" 			SPC 95);
						%dataFile.WriteLine("torsniperBaseEvasion" 			SPC 30);
						%dataFile.WriteLine("torsniperBaseCanRange" 		SPC true);
						%dataFile.WriteLine("torsniperBaseRange" 			SPC 24);
						%dataFile.WriteLine("torsniperBaseMeleeDamage" 		SPC 5);
						%dataFile.WriteLine("torsniperBaseMeleeDamageType"	SPC "physical");
						%dataFile.WriteLine("torsniperBaseRangeDamage" 		SPC 5);
						%dataFile.WriteLine("torsniperBaseRangeDamageType" 	SPC "alien");
						%dataFile.WriteLine("torsniperBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("torsniperBaseIsRobot" 			SPC false);
						%dataFile.WriteLine("torsniperBaseIsAlien" 			SPC true);
					%dataFile.WriteLine("// TorScout.");
						%dataFile.WriteLine("torscoutBaseLevel" 			SPC 2);
						%dataFile.WriteLine("torscoutBaseHP" 				SPC 15);
						%dataFile.WriteLine("torscoutBaseAP" 				SPC 6);
						%dataFile.WriteLine("torscoutBaseAR" 				SPC 2);
						%dataFile.WriteLine("torscoutBaseAttack" 			SPC 80);
						%dataFile.WriteLine("torscoutBaseEvasion" 			SPC 50);
						%dataFile.WriteLine("torscoutBaseCanRange" 			SPC true);
						%dataFile.WriteLine("torscoutBaseRange" 			SPC 12);
						%dataFile.WriteLine("torscoutBaseMeleeDamage" 		SPC 2);
						%dataFile.WriteLine("torscoutBaseMeleeDamageType"	SPC "physical");
						%dataFile.WriteLine("torscoutBaseRangeDamage" 		SPC 4);
						%dataFile.WriteLine("torscoutBaseRangeDamageType" 	SPC "alien");
						%dataFile.WriteLine("torscoutBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("torscoutBaseIsRobot" 			SPC false);
						%dataFile.WriteLine("torscoutBaseIsAlien" 			SPC true);
					%dataFile.WriteLine("// TorChaser.");
						%dataFile.WriteLine("torchaserBaseLevel" 			SPC 3);
						%dataFile.WriteLine("torchaserBaseHP" 				SPC 20);
						%dataFile.WriteLine("torchaserBaseAP" 				SPC 4);
						%dataFile.WriteLine("torchaserBaseAR" 				SPC 10);
						%dataFile.WriteLine("torchaserBaseAttack" 			SPC 70);
						%dataFile.WriteLine("torchaserBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("torchaserBaseCanRange" 		SPC true);
						%dataFile.WriteLine("torchaserBaseRange" 			SPC 12);
						%dataFile.WriteLine("torchaserBaseMeleeDamage" 		SPC 8);
						%dataFile.WriteLine("torchaserBaseMeleeDamageType"	SPC "physical");
						%dataFile.WriteLine("torchaserBaseRangeDamage" 		SPC 8);
						%dataFile.WriteLine("torchaserBaseRangeDamageType" 	SPC "alien");
						%dataFile.WriteLine("torchaserBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("torchaserBaseIsRobot" 			SPC false);
						%dataFile.WriteLine("torchaserBaseIsAlien" 			SPC true);
					%dataFile.WriteLine("// Sapper.");
						%dataFile.WriteLine("sapperBaseLevel" 				SPC 2);
						%dataFile.WriteLine("sapperBaseHP" 					SPC 26);
						%dataFile.WriteLine("sapperBaseAP" 					SPC 2);
						%dataFile.WriteLine("sapperBaseAR" 					SPC 3);
						%dataFile.WriteLine("sapperBaseAttack" 				SPC 90);
						%dataFile.WriteLine("sapperBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("sapperBaseCanRange" 			SPC true);
						%dataFile.WriteLine("sapperBaseRange" 				SPC 16);
						%dataFile.WriteLine("sapperBaseMeleeDamage" 		SPC 5);
						%dataFile.WriteLine("sapperBaseMeleeDamageType"		SPC "physical");
						%dataFile.WriteLine("sapperBaseRangeDamage" 		SPC 6);
						%dataFile.WriteLine("sapperBaseRangeDamageType" 	SPC "explosive");
						%dataFile.WriteLine("sapperBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("sapperBaseIsRobot" 			SPC false);
						%dataFile.WriteLine("sapperBaseIsAlien" 			SPC true);
					%dataFile.WriteLine("// Brainien.");
						%dataFile.WriteLine("brainienBaseLevel" 			SPC 5);
						%dataFile.WriteLine("brainienBaseHP" 				SPC 100);
						%dataFile.WriteLine("brainienBaseAP" 				SPC 5);
						%dataFile.WriteLine("brainienBaseAR" 				SPC 12);
						%dataFile.WriteLine("brainienBaseAttack" 			SPC 90);
						%dataFile.WriteLine("brainienBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("brainienBaseCanRange" 			SPC false);
						%dataFile.WriteLine("brainienBaseRange" 			SPC 0);
						%dataFile.WriteLine("brainienBaseMeleeDamage" 		SPC 6);
						%dataFile.WriteLine("brainienBaseMeleeDamageType"	SPC "physical");
						%dataFile.WriteLine("brainienBaseRangeDamage" 		SPC 6);
						%dataFile.WriteLine("brainienBaseRangeDamageType" 	SPC "physical");
						%dataFile.WriteLine("brainienBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("brainienBaseIsRobot" 			SPC false);
						%dataFile.WriteLine("brainienBaseIsAlien" 			SPC true);
					%dataFile.WriteLine("// Bruton.");
						%dataFile.WriteLine("brutonBaseLevel" 				SPC 1);
						%dataFile.WriteLine("brutonBaseHP" 					SPC 25);
						%dataFile.WriteLine("brutonBaseAP" 					SPC 2);
						%dataFile.WriteLine("brutonBaseAR" 					SPC 3);
						%dataFile.WriteLine("brutonBaseAttack" 				SPC 75);
						%dataFile.WriteLine("brutonBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("brutonBaseCanRange" 			SPC false);
						%dataFile.WriteLine("brutonBaseRange" 				SPC 0);
						%dataFile.WriteLine("brutonBaseMeleeDamage" 		SPC 7);
						%dataFile.WriteLine("brutonBaseMeleeDamageType" 	SPC "physical");
						%dataFile.WriteLine("brutonBaseRangeDamage" 		SPC 10);
						%dataFile.WriteLine("brutonBaseRangeDamageType" 	SPC "physical");
						%dataFile.WriteLine("brutonBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("brutonBaseIsRobot" 			SPC true);
						%dataFile.WriteLine("brutonBaseIsAlien" 			SPC false);
					%dataFile.WriteLine("// Gunship.");
						%dataFile.WriteLine("gunshipBaseLevel" 				SPC 5);
						%dataFile.WriteLine("gunshipBaseHP" 				SPC 250);
						%dataFile.WriteLine("gunshipBaseAP" 				SPC 5);
						%dataFile.WriteLine("gunshipBaseAR" 				SPC 16);
						%dataFile.WriteLine("gunshipBaseAttack" 			SPC 85);
						%dataFile.WriteLine("gunshipBaseEvasion" 			SPC 25);
						%dataFile.WriteLine("gunshipBaseCanRange" 			SPC true);
						%dataFile.WriteLine("gunshipBaseRange" 				SPC 16);
						%dataFile.WriteLine("gunshipBaseMeleeDamage" 		SPC 5);
						%dataFile.WriteLine("gunshipBaseMeleeDamageType" 	SPC "physical");
						%dataFile.WriteLine("gunshipBaseRangeDamage" 		SPC 15);
						%dataFile.WriteLine("gunshipBaseRangeDamageType" 	SPC "energy");
						%dataFile.WriteLine("gunshipBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("gunshipBaseIsRobot" 			SPC true);
						%dataFile.WriteLine("gunshipBaseIsAlien" 			SPC false);
					%dataFile.WriteLine("// Matrix.");
						%dataFile.WriteLine("matrixBaseLevel" 				SPC 5);
						%dataFile.WriteLine("matrixBaseHP" 					SPC 350);
						%dataFile.WriteLine("matrixBaseAP" 					SPC 3);
						%dataFile.WriteLine("matrixBaseAR" 					SPC 30);
						%dataFile.WriteLine("matrixBaseAttack" 				SPC 75);
						%dataFile.WriteLine("matrixBaseEvasion" 			SPC 20);
						%dataFile.WriteLine("matrixBaseCanRange" 			SPC true);
						%dataFile.WriteLine("matrixBaseRange" 				SPC 8);
						%dataFile.WriteLine("matrixBaseMeleeDamage" 		SPC 5);
						%dataFile.WriteLine("matrixBaseMeleeDamageType" 	SPC "fire");
						%dataFile.WriteLine("matrixBaseRangeDamage" 		SPC 7);
						%dataFile.WriteLine("matrixBaseRangeDamageType" 	SPC "electric");
						%dataFile.WriteLine("matrixBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("matrixBaseIsRobot" 			SPC true);
						%dataFile.WriteLine("matrixBaseIsAlien" 			SPC false);
					%dataFile.WriteLine("// Patriarch.");
						%dataFile.WriteLine("patriarchBaseLevel" 			SPC 6);
						%dataFile.WriteLine("patriarchBaseHP" 				SPC 450);
						%dataFile.WriteLine("patriarchBaseAP" 				SPC 6);
						%dataFile.WriteLine("patriarchBaseAR" 				SPC 50);
						%dataFile.WriteLine("patriarchBaseAttack" 			SPC 90);
						%dataFile.WriteLine("patriarchBaseEvasion" 			SPC 50);
						%dataFile.WriteLine("patriarchBaseCanRange" 		SPC true);
						%dataFile.WriteLine("patriarchBaseRange" 			SPC 8);
						%dataFile.WriteLine("patriarchBaseMeleeDamage" 		SPC 8);
						%dataFile.WriteLine("patriarchBaseMeleeDamageType" 	SPC "alien");
						%dataFile.WriteLine("patriarchBaseRangeDamage" 		SPC 12);
						%dataFile.WriteLine("patriarchBaseRangeDamageType" 	SPC "alien");
						%dataFile.WriteLine("patriarchBaseIsHuman" 			SPC false);
						%dataFile.WriteLine("patriarchBaseIsRobot" 			SPC false);
						%dataFile.WriteLine("patriarchBaseIsAlien" 			SPC true);
			
			// Close then open for read/load!
			%dataFile.close();								// Close file.
			%ret = %dataFile.OpenForRead(%filePath);		// Open file for read.
		}
		else
		{
			error("Could not open " @ %filePath @ " for write! Aborting!");
			return false;
		}
	}
	
	// Force slow motion effects off for D3D!
	if (!$ForceOpenGL	&&
		$UseSlowdownEffects)
	{
		error("Don't use slowdown effects with D3D!");
		$UseSlowdownEffects = 0;
	}
	
	// Variables we track in the save file.
	$marineNameList[0] = "";
	$marineNameListLength = 0;
	for (%line = %dataFile.ReadLine(); !(%line $= ""); %line = %dataFile.ReadLine())
	{//echo("checking line!");
		%word = GetWord(%line, 0);
		switch$ (%word)
		{
			// Save State Data.
			case "marineNameList":
				$marineNameList[$marineNameListLength] = restWords(%line);
				$marineNameListLength++;
			
			case "hulkSuitHealth":					$hulkSuitHealth = restWords(%line);
			case "hulkSuitArmor":					$hulkSuitArmor = restWords(%line);
			case "HulkFlamethrowerRange":			$HulkFlamethrowerRange = restWords(%line);
			case "HulkFlamethrowerDamage":			$HulkFlamethrowerDamage = restWords(%line);
			
			case "maxMonsters":						$maxMonsters = restWords(%line);
			case "showAndTellWait":					$showAndTellWait = restWords(%line);
			case "fogOfWarPostProccessingDelay":	$fogOfWarPostProccessingDelay = restWords(%line);
			case "smashableWallChance":				$smashableWallChance = restWords(%line);
			case "wallDestructionFogDelay":			$wallDestructionFogDelay = restWords(%line);
			
			case "baseFogTime":						$baseFogTime = restWords(%line);
			case "fogIncrementTime":				$fogIncrementTime = restWords(%line);
			case "bulletImpactDelay":				$bulletImpactDelay = restWords(%line);
			case "grenadeThrowRange":				$grenadeThrowRange = restWords(%line);
			case "normalGrenadeAoeDamage":			$normalGrenadeAoeDamage = restWords(%line);
			
			case "trapReductionChance":				$trapReductionChance = restWords(%line);
			case "consoleSpawnChance":				$consoleSpawnChance = restWords(%line);
			case "ConsoleMoneyChance":				$ConsoleMoneyChance = restWords(%line);
			case "LockersUpgradeChance":			$LockersUpgradeChance = restWords(%line);
			case "PumpPlacementChance":				$PumpPlacementChance = restWords(%line);
			
			case "dispenserSpawnChance":			$dispenserSpawnChance = restWords(%line);
			case "DispenserMoneyMin":				$DispenserMoneyMin = restWords(%line);
			case "DispenserMoneyMax":				$DispenserMoneyMax = restWords(%line);
			case "gratingChance":					$gratingChance = restWords(%line);
			case "gratingMonsterChance":			$gratingMonsterChance = restWords(%line);
			
			case "barrelPlacementChance":			$barrelPlacementChance = restWords(%line);
			case "weaponStatReductionChance":		$weaponStatReductionChance = restWords(%line);
			case "baseTreasureSpawn":				$baseTreasureSpawn = restWords(%line);
			case "oxygenTankMinimum":				$oxygenTankMinimum = restWords(%line);
			case "levelsPerDeck":					$levelsPerDeck = restWords(%line);
			
			case "monsterKillItemSpawnChance":		$monsterKillItemSpawnChance = restWords(%line);
			case "standardTrapDamage":				$standardTrapDamage = restWords(%line);
			case "squadSlowMotionScale":			$squadSlowMotionScale = restWords(%line);
			case "medicalDeckMedkitDropChance":		$medicalDeckMedkitDropChance = restWords(%line);
			case "autoSwitchSquadMemberDelay":		$autoSwitchSquadMemberDelay = restWords(%line);
			
			case "laserSightAccuracyBonus":			$laserSightAccuracyBonus = restWords(%line);
			case "deckInvasionChance":				$deckInvasionChance = restWords(%line);
			case "HeightAccuracyBonus":				$HeightAccuracyBonus = restWords(%line);
			case "HeightAccuracyPenalty":			$HeightAccuracyPenalty = restWords(%line);
			case "MonsterGroupChance":				$MonsterGroupChance = restWords(%line);
			
			case "MonsterSneakRadius":				$MonsterSneakRadius = restWords(%line);
			case "MonsterChanceToSneak":			$MonsterChanceToSneak = restWords(%line);
			case "MaxMonsterSneakDistance":			$MaxMonsterSneakDistance = restWords(%line);
			case "monsterBreakPursuitChance":		$monsterBreakPursuitChance = restWords(%line);
			case "TrapMaxPerLevel":					$TrapMaxPerLevel = restWords(%line);
			
			case "TappingMonsterChance":			$TappingMonsterChance = restWords(%line);
			case "TappingWallChance":				$TappingWallChance = restWords(%line);
			case "PortholeSpaceDialogueChance":		$PortholeSpaceDialogueChance = restWords(%line);
			case "plasticExplosiveSpawnChance":		$plasticExplosiveSpawnChance = restWords(%line);
			case "survivorSpawnChance":				$survivorSpawnChance = restWords(%line);
			
			case "MerchantSpecialItemChance":		$MerchantSpecialItemChance = restWords(%line);
			case "bashChanceModifier":				$bashChanceModifier = restWords(%line);
			case "armsAccuracyModifier":			$armsAccuracyModifier = restWords(%line);
			case "crewCorpseChance":				$crewCorpseChance = restWords(%line);
			case "floorMarkingsChance":				$floorMarkingsChance = restWords(%line);
			
			case "grenadeDestroyDoorChance":		$grenadeDestroyDoorChance = restWords(%line);
			case "medkitHealthGain":				$medkitHealthGain = restWords(%line);
			case "UseSlowdownEffects":				$UseSlowdownEffects = restWords(%line);
			case "MouseFadeTime":					$MouseFadeTime = restWords(%line);
			case "ShowOnlineScores":				$ShowOnlineScores = restWords(%line);
			
			case "levelExperience2":				$levelExperience2 = restWords(%line);
			case "levelExperience3":				$levelExperience3 = restWords(%line);
			case "levelExperience4":				$levelExperience4 = restWords(%line);
			case "levelExperience5":				$levelExperience5 = restWords(%line);
			case "levelExperience6":				$levelExperience6 = restWords(%line);
			case "levelExperience7":				$levelExperience7 = restWords(%line);
			case "levelExperience8":				$levelExperience8 = restWords(%line);
			case "levelExperience9":				$levelExperience9 = restWords(%line);
			case "levelExperience10":				$levelExperience10 = restWords(%line);
			case "levelExperience11":				$levelExperience11 = restWords(%line);
			
			// Leader class active talents.
			case "chargeAPCost":				$chargeAPCost = restWords(%line);
			case "snapShotsAPCost":				$snapShotsAPCost = restWords(%line);
			case "radarAPCost":					$radarAPCost = restWords(%line);
			case "stimAPCost":					$stimAPCost = restWords(%line);
			case "squadStimDamageBoost":		$squadStimDamageBoost = restWords(%line);
			case "squadStimAccuracyBoost":		$squadStimAccuracyBoost = restWords(%line);
			// Leader class passive talents.
			case "ironResolveReduction":		$ironResolveReduction = restWords(%line);
			case "flakRoundsReduction":			$flakRoundsReduction = restWords(%line);
			case "fireFighterReduction":		$fireFighterReduction = restWords(%line);
			case "vigilanceEvasion":			$vigilanceEvasion = restWords(%line);
			// Scout class active talents.
			case "scopedAPCost":				$scopedAPCost = restWords(%line);
			case "scopedAccuracyBoost":			$scopedAccuracyBoost = restWords(%line);
			case "scopedDamageBoost":			$scopedDamageBoost = restWords(%line);
			case "calledShotAPCost":			$calledShotAPCost = restWords(%line);
			case "caledShotAPDeduction":		$caledShotAPDeduction = restWords(%line);
			case "garroteAPCost":				$garroteAPCost = restWords(%line);
			case "garroteDamage":				$garroteDamage = restWords(%line);
			case "stasisAPCost":				$stasisAPCost = restWords(%line);
			// Scout class passive talents.
			case "secondSkinAPRatio":			$secondSkinAPRatio = restWords(%line);
			case "stealthyEvasion":				$stealthyEvasion = restWords(%line);
			case "autoloaderLoadCost":			$autoloaderLoadCost = restWords(%line);
			case "biohazardDamageBoost":		$biohazardDamageBoost = restWords(%line);
			// Grenadier class active talents.
			case "napalmAPCost":				$napalmAPCost = restWords(%line);
			case "batterAPCost":				$batterAPCost = restWords(%line);
			case "pincerAPCost":				$pincerAPCost = restWords(%line);
			case "pincerARReduction":			$pincerARReduction = restWords(%line);
			case "empAPCost":					$empAPCost = restWords(%line);
			case "EmpDamage":					$EmpDamage = restWords(%line);
			case "EmpRange":					$EmpRange = restWords(%line);
			// Grenadier class passive talents.
			case "ablativeArmorReduction":		$ablativeArmorReduction = restWords(%line);
			// Support class active talents.
			case "pointBlankAPCost":			$pointBlankAPCost = restWords(%line);
			case "pointBlankArmorReduction":	$pointBlankArmorReduction = restWords(%line);
			case "hailMaryAPCost":				$hailMaryAPCost = restWords(%line);
			case "hailMaryAccuracyBoost":		$hailMaryAccuracyBoost = restWords(%line);
			case "hailMaryRangeBoost":			$hailMaryRangeBoost = restWords(%line);
			case "bulwarkAPCost":				$bulwarkAPCost = restWords(%line);
			case "turretAPCost":				$turretAPCost = restWords(%line);
			case "squadTurretAmmoCost":			$squadTurretAmmoCost = restWords(%line);
			// Support class passive talents.
			case "sharkRoundsIgnoreArmor":		$sharkRoundsIgnoreArmor = restWords(%line);
			// Engineer class active talents.
			case "targetScanAPCost":			$targetScanAPCost = restWords(%line);
			case "magFistAPCost":				$magFistAPCost = restWords(%line);
			case "weldAPCost":					$weldAPCost = restWords(%line);
			case "weldARCost":					$weldARCost = restWords(%line);
			case "weldHealthGain":				$weldHealthGain = restWords(%line);
			case "ammosmithAPCost":				$ammosmithAPCost = restWords(%line);
			// Engineer class passive talents.
			case "stunShotsDamageBoost":				$stunShotsDamageBoost = restWords(%line);
			case "activeTargetingAccuracyBoost":		$activeTargetingAccuracyBoost = restWords(%line);
			case "techUpgradeLaserModAccuracyBoost":	$techUpgradeLaserModAccuracyBoost = restWords(%line);
			case "techUpgradePlasmaModDamageBoost":		$techUpgradePlasmaModDamageBoost = restWords(%line);
		
			// Monster Data.
			// Brute.
			case "bruteBaseLevel":					$bruteBaseLevel = restWords(%line);
			case "bruteBaseHP":						$bruteBaseHP = restWords(%line);
			case "bruteBaseAP":						$bruteBaseAP = restWords(%line);
			case "bruteBaseAR":						$bruteBaseAR = restWords(%line);
			case "bruteBaseAttack":					$bruteBaseAttack = restWords(%line);
			case "bruteBaseEvasion":				$bruteBaseEvasion = restWords(%line);
			case "bruteBaseCanRange":				$bruteBaseCanRange = restWords(%line);
			case "bruteBaseRange":					$bruteBaseRange = restWords(%line);
			case "bruteBaseMeleeDamage":			$bruteBaseMeleeDamage = restWords(%line);
			case "bruteBaseMeleeDamageType":		$bruteBaseMeleeDamageType = restWords(%line);
			case "bruteBaseRangeDamage":			$bruteBaseRangeDamage = restWords(%line);
			case "bruteBaseRangeDamageType"	:		$bruteBaseRangeDamageType = restWords(%line);
			case "bruteBaseIsHuman":				$bruteBaseIsHuman = restWords(%line);
			case "bruteBaseIsRobot":				$bruteBaseIsRobot = restWords(%line);
			case "bruteBaseIsAlien":				$bruteBaseIsAlien = restWords(%line);
			// Flamejack.
			case "flamejackBaseLevel":				$flamejackBaseLevel = restWords(%line);
			case "flamejackBaseHP":					$flamejackBaseHP = restWords(%line);
			case "flamejackBaseAP":					$flamejackBaseAP = restWords(%line);
			case "flamejackBaseAR":					$flamejackBaseAR = restWords(%line);
			case "flamejackBaseAttack":				$flamejackBaseAttack = restWords(%line);
			case "flamejackBaseEvasion":			$flamejackBaseEvasion = restWords(%line);
			case "flamejackBaseCanRange":			$flamejackBaseCanRange = restWords(%line);
			case "flamejackBaseRange":				$flamejackBaseRange = restWords(%line);
			case "flamejackBaseMeleeDamage":		$flamejackBaseMeleeDamage = restWords(%line);
			case "flamejackBaseMeleeDamageType":	$flamejackBaseMeleeDamageType = restWords(%line);
			case "flamejackBaseRangeDamage":		$flamejackBaseRangeDamage = restWords(%line);
			case "flamejackBaseRangeDamageType":	$flamejackBaseRangeDamageType = restWords(%line);
			case "flamejackBaseIsHuman":			$flamejackBaseIsHuman = restWords(%line);
			case "flamejackBaseIsRobot":			$flamejackBaseIsRobot = restWords(%line);
			case "flamejackBaseIsAlien":			$flamejackBaseIsAlien = restWords(%line);
			// Revenant.
			case "revenantBaseLevel":				$revenantBaseLevel = restWords(%line);
			case "revenantBaseHP":					$revenantBaseHP = restWords(%line);
			case "revenantBaseAP":					$revenantBaseAP = restWords(%line);
			case "revenantBaseAR":					$revenantBaseAR = restWords(%line);
			case "revenantBaseAttack":				$revenantBaseAttack = restWords(%line);
			case "revenantBaseEvasion":				$revenantBaseEvasion = restWords(%line);
			case "revenantBaseCanRange":			$revenantBaseCanRange = restWords(%line);
			case "revenantBaseRange":				$revenantBaseRange = restWords(%line);
			case "revenantBaseMeleeDamage":			$revenantBaseMeleeDamage = restWords(%line);
			case "revenantBaseMeleeDamageType":		$revenantBaseMeleeDamageType = restWords(%line);
			case "revenantBaseRangeDamage":			$revenantBaseRangeDamage = restWords(%line);
			case "revenantBaseRangeDamageType":		$revenantBaseRangeDamageType = restWords(%line);
			case "revenantBaseIsHuman":				$revenantBaseIsHuman = restWords(%line);
			case "revenantBaseIsRobot":				$revenantBaseIsRobot = restWords(%line);
			case "revenantBaseIsAlien":				$revenantBaseIsAlien = restWords(%line);
			// Hulk.
			case "hulkBaseLevel":					$hulkBaseLevel = restWords(%line);
			case "hulkBaseHP":						$hulkBaseHP = restWords(%line);
			case "hulkBaseAP":						$hulkBaseAP = restWords(%line);
			case "hulkBaseAR":						$hulkBaseAR = restWords(%line);
			case "hulkBaseAttack":					$hulkBaseAttack = restWords(%line);
			case "hulkBaseEvasion":					$hulkBaseEvasion = restWords(%line);
			case "hulkBaseCanRange":				$hulkBaseCanRange = restWords(%line);
			case "hulkBaseRange":					$hulkBaseRange = restWords(%line);
			case "hulkBaseMeleeDamage":				$hulkBaseMeleeDamage = restWords(%line);
			case "hulkBaseMeleeDamageType":			$hulkBaseMeleeDamageType = restWords(%line);
			case "hulkBaseRangeDamage":				$hulkBaseRangeDamage = restWords(%line);
			case "hulkBaseRangeDamageType":			$hulkBaseRangeDamageType = restWords(%line);
			case "hulkBaseIsHuman":					$hulkBaseIsHuman = restWords(%line);
			case "hulkBaseIsRobot":					$hulkBaseIsRobot = restWords(%line);
			case "hulkBaseIsAlien":					$hulkBaseIsAlien = restWords(%line);
			// Bucket.
			case "bucketBaseLevel":					$bucketBaseLevel = restWords(%line);
			case "bucketBaseHP":					$bucketBaseHP = restWords(%line);
			case "bucketBaseAP":					$bucketBaseAP = restWords(%line);
			case "bucketBaseAR":					$bucketBaseAR = restWords(%line);
			case "bucketBaseAttack":				$bucketBaseAttack = restWords(%line);
			case "bucketBaseEvasion":				$bucketBaseEvasion = restWords(%line);
			case "bucketBaseCanRange":				$bucketBaseCanRange = restWords(%line);
			case "bucketBaseRange":					$bucketBaseRange = restWords(%line);
			case "bucketBaseMeleeDamage":			$bucketBaseMeleeDamage = restWords(%line);
			case "bucketBaseMeleeDamageType":		$bucketBaseMeleeDamageType = restWords(%line);
			case "bucketBaseRangeDamage":			$bucketBaseRangeDamage = restWords(%line);
			case "bucketBaseRangeDamageType":		$bucketBaseRangeDamageType = restWords(%line);
			case "bucketBaseIsHuman":				$bucketBaseIsHuman = restWords(%line);
			case "bucketBaseIsRobot":				$bucketBaseIsRobot = restWords(%line);
			case "bucketBaseIsAlien":				$bucketBaseIsAlien = restWords(%line);
			// Thopter.
			case "thopterBaseLevel":				$thopterBaseLevel = restWords(%line);
			case "thopterBaseHP":					$thopterBaseHP = restWords(%line);
			case "thopterBaseAP":					$thopterBaseAP = restWords(%line);
			case "thopterBaseAR":					$thopterBaseAR = restWords(%line);
			case "thopterBaseAttack":				$thopterBaseAttack = restWords(%line);
			case "thopterBaseEvasion":				$thopterBaseEvasion = restWords(%line);
			case "thopterBaseCanRange":				$thopterBaseCanRange = restWords(%line);
			case "thopterBaseRange":				$thopterBaseRange = restWords(%line);
			case "thopterBaseMeleeDamage":			$thopterBaseMeleeDamage = restWords(%line);
			case "thopterBaseMeleeDamageType":		$thopterBaseMeleeDamageType = restWords(%line);
			case "thopterBaseRangeDamage":			$thopterBaseRangeDamage = restWords(%line);
			case "thopterBaseRangeDamageType":		$thopterBaseRangeDamageType = restWords(%line);
			case "thopterBaseIsHuman":				$thopterBaseIsHuman = restWords(%line);
			case "thopterBaseIsRobot":				$thopterBaseIsRobot = restWords(%line);
			case "thopterBaseIsAlien":				$thopterBaseIsAlien = restWords(%line);
			// Ripsaw.
			case "ripsawBaseLevel":					$ripsawBaseLevel = restWords(%line);
			case "ripsawBaseHP":					$ripsawBaseHP = restWords(%line);
			case "ripsawBaseAP":					$ripsawBaseAP = restWords(%line);
			case "ripsawBaseAR":					$ripsawBaseAR = restWords(%line);
			case "ripsawBaseAttack":				$ripsawBaseAttack = restWords(%line);
			case "ripsawBaseEvasion":				$ripsawBaseEvasion = restWords(%line);
			case "ripsawBaseCanRange":				$ripsawBaseCanRange = restWords(%line);
			case "ripsawBaseRange":					$ripsawBaseRange = restWords(%line);
			case "ripsawBaseMeleeDamage":			$ripsawBaseMeleeDamage = restWords(%line);
			case "ripsawBaseMeleeDamageType":		$ripsawBaseMeleeDamageType = restWords(%line);
			case "ripsawBaseRangeDamage":			$ripsawBaseRangeDamage = restWords(%line);
			case "ripsawBaseRangeDamageType":		$ripsawBaseRangeDamageType = restWords(%line);
			case "ripsawBaseIsHuman":				$ripsawBaseIsHuman = restWords(%line);
			case "ripsawBaseIsRobot":				$ripsawBaseIsRobot = restWords(%line);
			case "ripsawBaseIsAlien":				$ripsawBaseIsAlien = restWords(%line);
			// Tick.
			case "tickBaseLevel":				$tickBaseLevel = restWords(%line);
			case "tickBaseHP":					$tickBaseHP = restWords(%line);
			case "tickBaseAP":					$tickBaseAP = restWords(%line);
			case "tickBaseAR":					$tickBaseAR = restWords(%line);
			case "tickBaseAttack":				$tickBaseAttack = restWords(%line);
			case "tickBaseEvasion":				$tickBaseEvasion = restWords(%line);
			case "tickBaseCanRange":			$tickBaseCanRange = restWords(%line);
			case "tickBaseRange":				$tickBaseRange = restWords(%line);
			case "tickBaseMeleeDamage":			$tickBaseMeleeDamage = restWords(%line);
			case "tickBaseMeleeDamageType":		$tickBaseMeleeDamageType = restWords(%line);
			case "tickBaseRangeDamage":			$tickBaseRangeDamage = restWords(%line);
			case "tickBaseRangeDamageType":		$tickBaseRangeDamageType = restWords(%line);
			case "tickBaseIsHuman":				$tickBaseIsHuman = restWords(%line);
			case "tickBaseIsRobot":				$tickBaseIsRobot = restWords(%line);
			case "tickBaseIsAlien":				$tickBaseIsAlien = restWords(%line);
			// Amputator.
			case "amputatorBaseLevel":				$amputatorBaseLevel = restWords(%line);
			case "amputatorBaseHP":					$amputatorBaseHP = restWords(%line);
			case "amputatorBaseAP":					$amputatorBaseAP = restWords(%line);
			case "amputatorBaseAR":					$amputatorBaseAR = restWords(%line);
			case "amputatorBaseAttack":				$amputatorBaseAttack = restWords(%line);
			case "amputatorBaseEvasion":			$amputatorBaseEvasion = restWords(%line);
			case "amputatorBaseCanRange":			$amputatorBaseCanRange = restWords(%line);
			case "amputatorBaseRange":				$amputatorBaseRange = restWords(%line);
			case "amputatorBaseMeleeDamage":		$amputatorBaseMeleeDamage = restWords(%line);
			case "amputatorBaseMeleeDamageType":	$amputatorBaseMeleeDamageType = restWords(%line);
			case "amputatorBaseRangeDamage":		$amputatorBaseRangeDamage = restWords(%line);
			case "amputatorBaseRangeDamageType":	$amputatorBaseRangeDamageType = restWords(%line);
			case "amputatorBaseIsHuman":			$amputatorBaseIsHuman = restWords(%line);
			case "amputatorBaseIsRobot":			$amputatorBaseIsRobot = restWords(%line);
			case "amputatorBaseIsAlien":			$amputatorBaseIsAlien = restWords(%line);
			// Torgon.
			case "torgonBaseLevel":					$torgonBaseLevel = restWords(%line);
			case "torgonBaseHP":					$torgonBaseHP = restWords(%line);
			case "torgonBaseAP":					$torgonBaseAP = restWords(%line);
			case "torgonBaseAR":					$torgonBaseAR = restWords(%line);
			case "torgonBaseAttack":				$torgonBaseAttack = restWords(%line);
			case "torgonBaseEvasion":				$torgonBaseEvasion = restWords(%line);
			case "torgonBaseCanRange":				$torgonBaseCanRange = restWords(%line);
			case "torgonBaseRange":					$torgonBaseRange = restWords(%line);
			case "torgonBaseMeleeDamage":			$torgonBaseMeleeDamage = restWords(%line);
			case "torgonBaseMeleeDamageType":		$torgonBaseMeleeDamageType = restWords(%line);
			case "torgonBaseRangeDamage":			$torgonBaseRangeDamage = restWords(%line);
			case "torgonBaseRangeDamageType":		$torgonBaseRangeDamageType = restWords(%line);
			case "torgonBaseIsHuman":				$torgonBaseIsHuman = restWords(%line);
			case "torgonBaseIsRobot":				$torgonBaseIsRobot = restWords(%line);
			case "torgonBaseIsAlien":				$torgonBaseIsAlien = restWords(%line);
			// Torsniper.
			case "torsniperBaseLevel":				$torsniperBaseLevel = restWords(%line);
			case "torsniperBaseHP":					$torsniperBaseHP = restWords(%line);
			case "torsniperBaseAP":					$torsniperBaseAP = restWords(%line);
			case "torsniperBaseAR":					$torsniperBaseAR = restWords(%line);
			case "torsniperBaseAttack":				$torsniperBaseAttack = restWords(%line);
			case "torsniperBaseEvasion":			$torsniperBaseEvasion = restWords(%line);
			case "torsniperBaseCanRange":			$torsniperBaseCanRange = restWords(%line);
			case "torsniperBaseRange":				$torsniperBaseRange = restWords(%line);
			case "torsniperBaseMeleeDamage":		$torsniperBaseMeleeDamage = restWords(%line);
			case "torsniperBaseMeleeDamageType":	$torsniperBaseMeleeDamageType = restWords(%line);
			case "torsniperBaseRangeDamage":		$torsniperBaseRangeDamage = restWords(%line);
			case "torsniperBaseRangeDamageType":	$torsniperBaseRangeDamageType = restWords(%line);
			case "torsniperBaseIsHuman":			$torsniperBaseIsHuman = restWords(%line);
			case "torsniperBaseIsRobot":			$torsniperBaseIsRobot = restWords(%line);
			case "torsniperBaseIsAlien":			$torsniperBaseIsAlien = restWords(%line);
			// Torscout.
			case "torscoutBaseLevel":				$torscoutBaseLevel = restWords(%line);
			case "torscoutBaseHP":					$torscoutBaseHP = restWords(%line);
			case "torscoutBaseAP":					$torscoutBaseAP = restWords(%line);
			case "torscoutBaseAR":					$torscoutBaseAR = restWords(%line);
			case "torscoutBaseAttack":				$torscoutBaseAttack = restWords(%line);
			case "torscoutBaseEvasion":				$torscoutBaseEvasion = restWords(%line);
			case "torscoutBaseCanRange":			$torscoutBaseCanRange = restWords(%line);
			case "torscoutBaseRange":				$torscoutBaseRange = restWords(%line);
			case "torscoutBaseMeleeDamage":			$torscoutBaseMeleeDamage = restWords(%line);
			case "torscoutBaseMeleeDamageType":		$torscoutBaseMeleeDamageType = restWords(%line);
			case "torscoutBaseRangeDamage":			$torscoutBaseRangeDamage = restWords(%line);
			case "torscoutBaseRangeDamageType":		$torscoutBaseRangeDamageType = restWords(%line);
			case "torscoutBaseIsHuman":				$torscoutBaseIsHuman = restWords(%line);
			case "torscoutBaseIsRobot":				$torscoutBaseIsRobot = restWords(%line);
			case "torscoutBaseIsAlien":				$torscoutBaseIsAlien = restWords(%line);
			// Torchaser.
			case "torchaserBaseLevel":				$torchaserBaseLevel = restWords(%line);
			case "torchaserBaseHP":					$torchaserBaseHP = restWords(%line);
			case "torchaserBaseAP":					$torchaserBaseAP = restWords(%line);
			case "torchaserBaseAR":					$torchaserBaseAR = restWords(%line);
			case "torchaserBaseAttack":				$torchaserBaseAttack = restWords(%line);
			case "torchaserBaseEvasion":			$torchaserBaseEvasion = restWords(%line);
			case "torchaserBaseCanRange":			$torchaserBaseCanRange = restWords(%line);
			case "torchaserBaseRange":				$torchaserBaseRange = restWords(%line);
			case "torchaserBaseMeleeDamage":		$torchaserBaseMeleeDamage = restWords(%line);
			case "torchaserBaseMeleeDamageType":	$torchaserBaseMeleeDamageType = restWords(%line);
			case "torchaserBaseRangeDamage":		$torchaserBaseRangeDamage = restWords(%line);
			case "torchaserBaseRangeDamageType":	$torchaserBaseRangeDamageType = restWords(%line);
			case "torchaserBaseIsHuman":			$torchaserBaseIsHuman = restWords(%line);
			case "torchaserBaseIsRobot":			$torchaserBaseIsRobot = restWords(%line);
			case "torchaserBaseIsAlien":			$torchaserBaseIsAlien = restWords(%line);
			// Sapper.
			case "sapperBaseLevel":					$sapperBaseLevel = restWords(%line);
			case "sapperBaseHP":					$sapperBaseHP = restWords(%line);
			case "sapperBaseAP":					$sapperBaseAP = restWords(%line);
			case "sapperBaseAR":					$sapperBaseAR = restWords(%line);
			case "sapperBaseAttack":				$sapperBaseAttack = restWords(%line);
			case "sapperBaseEvasion":				$sapperBaseEvasion = restWords(%line);
			case "sapperBaseCanRange":				$sapperBaseCanRange = restWords(%line);
			case "sapperBaseRange":					$sapperBaseRange = restWords(%line);
			case "sapperBaseMeleeDamage":			$sapperBaseMeleeDamage = restWords(%line);
			case "sapperBaseMeleeDamageType":		$sapperBaseMeleeDamageType = restWords(%line);
			case "sapperBaseRangeDamage":			$sapperBaseRangeDamage = restWords(%line);
			case "sapperBaseRangeDamageType":		$sapperBaseRangeDamageType = restWords(%line);
			case "sapperBaseIsHuman":				$sapperBaseIsHuman = restWords(%line);
			case "sapperBaseIsRobot":				$sapperBaseIsRobot = restWords(%line);
			case "sapperBaseIsAlien":				$sapperBaseIsAlien = restWords(%line);
			// Brainien.
			case "brainienBaseLevel":				$brainienBaseLevel = restWords(%line);
			case "brainienBaseHP":					$brainienBaseHP = restWords(%line);
			case "brainienBaseAP":					$brainienBaseAP = restWords(%line);
			case "brainienBaseAR":					$brainienBaseAR = restWords(%line);
			case "brainienBaseAttack":				$brainienBaseAttack = restWords(%line);
			case "brainienBaseEvasion":				$brainienBaseEvasion = restWords(%line);
			case "brainienBaseCanRange":			$brainienBaseCanRange = restWords(%line);
			case "brainienBaseRange":				$brainienBaseRange = restWords(%line);
			case "brainienBaseMeleeDamage":			$brainienBaseMeleeDamage = restWords(%line);
			case "brainienBaseMeleeDamageType":		$brainienBaseMeleeDamageType = restWords(%line);
			case "brainienBaseRangeDamage":			$brainienBaseRangeDamage = restWords(%line);
			case "brainienBaseRangeDamageType":		$brainienBaseRangeDamageType = restWords(%line);
			case "brainienBaseIsHuman":				$brainienBaseIsHuman = restWords(%line);
			case "brainienBaseIsRobot":				$brainienBaseIsRobot = restWords(%line);
			case "brainienBaseIsAlien":				$brainienBaseIsAlien = restWords(%line);
			// Bruton.
			case "brutonBaseLevel":					$brutonBaseLevel = restWords(%line);
			case "brutonBaseHP":					$brutonBaseHP = restWords(%line);
			case "brutonBaseAP":					$brutonBaseAP = restWords(%line);
			case "brutonBaseAR":					$brutonBaseAR = restWords(%line);
			case "brutonBaseAttack":				$brutonBaseAttack = restWords(%line);
			case "brutonBaseEvasion":				$brutonBaseEvasion = restWords(%line);
			case "brutonBaseCanRange":				$brutonBaseCanRange = restWords(%line);
			case "brutonBaseRange":					$brutonBaseRange = restWords(%line);
			case "brutonBaseMeleeDamage":			$brutonBaseMeleeDamage = restWords(%line);
			case "brutonBaseMeleeDamageType":		$brutonBaseMeleeDamageType = restWords(%line);
			case "brutonBaseRangeDamage":			$brutonBaseRangeDamage = restWords(%line);
			case "brutonBaseRangeDamageType":		$brutonBaseRangeDamageType = restWords(%line);
			case "brutonBaseIsHuman":				$brutonBaseIsHuman = restWords(%line);
			case "brutonBaseIsRobot":				$brutonBaseIsRobot = restWords(%line);
			case "brutonBaseIsAlien":				$brutonBaseIsAlien = restWords(%line);
			// Gunship.
			case "gunshipBaseLevel":				$gunshipBaseLevel = restWords(%line);
			case "gunshipBaseHP":					$gunshipBaseHP = restWords(%line);
			case "gunshipBaseAP":					$gunshipBaseAP = restWords(%line);
			case "gunshipBaseAR":					$gunshipBaseAR = restWords(%line);
			case "gunshipBaseAttack":				$gunshipBaseAttack = restWords(%line);
			case "gunshipBaseEvasion":				$gunshipBaseEvasion = restWords(%line);
			case "gunshipBaseCanRange":				$gunshipBaseCanRange = restWords(%line);
			case "gunshipBaseRange":				$gunshipBaseRange = restWords(%line);
			case "gunshipBaseMeleeDamage":			$gunshipBaseMeleeDamage = restWords(%line);
			case "gunshipBaseMeleeDamageType":		$gunshipBaseMeleeDamageType = restWords(%line);
			case "gunshipBaseRangeDamage":			$gunshipBaseRangeDamage = restWords(%line);
			case "gunshipBaseRangeDamageType":		$gunshipBaseRangeDamageType = restWords(%line);
			case "gunshipBaseIsHuman":				$gunshipBaseIsHuman = restWords(%line);
			case "gunshipBaseIsRobot":				$gunshipBaseIsRobot = restWords(%line);
			case "gunshipBaseIsAlien":				$gunshipBaseIsAlien = restWords(%line);
			// Matrix.
			case "matrixBaseLevel":					$matrixBaseLevel = restWords(%line);
			case "matrixBaseHP":					$matrixBaseHP = restWords(%line);
			case "matrixBaseAP":					$matrixBaseAP = restWords(%line);
			case "matrixBaseAR":					$matrixBaseAR = restWords(%line);
			case "matrixBaseAttack":				$matrixBaseAttack = restWords(%line);
			case "matrixBaseEvasion":				$matrixBaseEvasion = restWords(%line);
			case "matrixBaseCanRange":				$matrixBaseCanRange = restWords(%line);
			case "matrixBaseRange":					$matrixBaseRange = restWords(%line);
			case "matrixBaseMeleeDamage":			$matrixBaseMeleeDamage = restWords(%line);
			case "matrixBaseMeleeDamageType":		$matrixBaseMeleeDamageType = restWords(%line);
			case "matrixBaseRangeDamage":			$matrixBaseRangeDamage = restWords(%line);
			case "matrixBaseRangeDamageType":		$matrixBaseRangeDamageType = restWords(%line);
			case "matrixBaseIsHuman":				$matrixBaseIsHuman = restWords(%line);
			case "matrixBaseIsRobot":				$matrixBaseIsRobot = restWords(%line);
			case "matrixBaseIsAlien":				$matrixBaseIsAlien = restWords(%line);
			// Patriarch.
			case "patriarchBaseLevel":				$patriarchBaseLevel = restWords(%line);
			case "patriarchBaseHP":					$patriarchBaseHP = restWords(%line);
			case "patriarchBaseAP":					$patriarchBaseAP = restWords(%line);
			case "patriarchBaseAR":					$patriarchBaseAR = restWords(%line);
			case "patriarchBaseAttack":				$patriarchBaseAttack = restWords(%line);
			case "patriarchBaseEvasion":			$patriarchBaseEvasion = restWords(%line);
			case "patriarchBaseCanRange":			$patriarchBaseCanRange = restWords(%line);
			case "patriarchBaseRange":				$patriarchBaseRange = restWords(%line);
			case "patriarchBaseMeleeDamage":		$patriarchBaseMeleeDamage = restWords(%line);
			case "patriarchBaseMeleeDamageType":	$patriarchBaseMeleeDamageType = restWords(%line);
			case "patriarchBaseRangeDamage":		$patriarchBaseRangeDamage = restWords(%line);
			case "patriarchBaseRangeDamageType":	$patriarchBaseRangeDamageType = restWords(%line);
			case "patriarchBaseIsHuman":			$patriarchBaseIsHuman = restWords(%line);
			case "patriarchBaseIsRobot":			$patriarchBaseIsRobot = restWords(%line);
			case "patriarchBaseIsAlien":			$patriarchBaseIsAlien = restWords(%line);
		}
	}
	
	// Close the data file.
	%dataFile.close();
	
	return true;
}

function getModDataDirectory ()
{
	return getUserDataDirectory() @ "/Worthless Bums/Steam Marines/";
}
// Loads dialogue data.
function loadDialogueData ()
{//echo("loadDialogueData()");
	// Sets the file to directory path: "C:\Users\<user>\AppData\Roaming\Steam Marines\"
	%filePath = getModDataDirectory() @ "dialogue.mod";
	
	// Load the data.
	// The data file object.
	%dataFile = new fileobject();
	// Check the file open status.
	%ret = %dataFile.OpenForRead(%filePath);
	
	// Can't open the file.
	if (!%ret	||
		(%ret	&&														// Can read the file...
		 getWord(%dataFile.ReadLine(), 1) !$= $currentGameVersion))		// ... but it's the wrong version!
	{
		error("     No dialogue.mod file! Creating dialogue.mod file!");
		%dataFile.close();									// Close file.
		%ret = %dataFile.OpenForWrite(getModDataDirectory() @ "dialogue.mod");		// Create file.
		if (%ret)
		{
			// Need to write default data here!
			%dataFile.WriteLine("version " @ $currentGameVersion);
				%dataFile.WriteLine("// Porthole.");
					%dataFile.WriteLine("porthole" SPC "The ship ain't moving...");
					%dataFile.WriteLine("porthole" SPC "Pretty.");
					%dataFile.WriteLine("porthole" SPC "Where's the fleet?");
					%dataFile.WriteLine("porthole" SPC "How'd those things get aboard?");
					%dataFile.WriteLine("porthole" SPC "Ship's in bad shape...");
					%dataFile.WriteLine("porthole" SPC "We're leaking atmo...");
					%dataFile.WriteLine("porthole" SPC "Twinkle twinkle.");
					%dataFile.WriteLine("porthole" SPC "I shoulda joined the Army.");
					%dataFile.WriteLine("porthole" SPC "Gotta get off this wreck.");
					%dataFile.WriteLine("porthole" SPC "Where are we?");
					%dataFile.WriteLine("porthole" SPC "Kansas this ain't.");
				%dataFile.WriteLine("// No Ammo.");
					%dataFile.WriteLine("noAmmo" SPC "Weapon dry!");
					%dataFile.WriteLine("noAmmo" SPC "No lead left!");
					%dataFile.WriteLine("noAmmo" SPC "Don't click, I need a bang!");
					%dataFile.WriteLine("noAmmo" SPC "... empty.");
					%dataFile.WriteLine("noAmmo" SPC "Empty...");
					%dataFile.WriteLine("noAmmo" SPC "Need to reload!");
					%dataFile.WriteLine("noAmmo" SPC "Zero rounds!");
					%dataFile.WriteLine("noAmmo" SPC "Need ammo!");
					%dataFile.WriteLine("noAmmo" SPC "Nothing to fire!");
					%dataFile.WriteLine("noAmmo" SPC "GOT NOTHIN'.");
					%dataFile.WriteLine("noAmmo" SPC "*Click*");
					%dataFile.WriteLine("noAmmo" SPC "No bang!");
					%dataFile.WriteLine("noAmmo" SPC "No pew pew!");
					%dataFile.WriteLine("noAmmo" SPC "FEED. MY. GUN.");
					%dataFile.WriteLine("noAmmo" SPC "Mag's empty!");
					%dataFile.WriteLine("noAmmo" SPC "I'm dry!");
					%dataFile.WriteLine("noAmmo" SPC "No firepower!");
					%dataFile.WriteLine("noAmmo" SPC "*ClickClick*");
				%dataFile.WriteLine("// Reload.");
					%dataFile.WriteLine("reload" SPC "Reloading!");
					%dataFile.WriteLine("reload" SPC "Swapping mags!");
					%dataFile.WriteLine("reload" SPC "Stupid ammo, get in there!");
					%dataFile.WriteLine("reload" SPC "Ready to rock.");
					%dataFile.WriteLine("reload" SPC "Weapon ready.");
					%dataFile.WriteLine("reload" SPC "Who's hungry?");
					%dataFile.WriteLine("reload" SPC "*Evil cackle.*");
					%dataFile.WriteLine("reload" SPC "One for you, none for me.");
					%dataFile.WriteLine("reload" SPC "Let me at 'em!");
					%dataFile.WriteLine("reload" SPC "Just point me in the right direction.");
					%dataFile.WriteLine("reload" SPC "Reloaded!");
				%dataFile.WriteLine("// Knocked Into Space.");
					%dataFile.WriteLine("knockedIntoSpace" SPC "Oh fu...!");
					%dataFile.WriteLine("knockedIntoSpace" SPC "Oh shi...!");
					%dataFile.WriteLine("knockedIntoSpace" SPC "Bad times...");
					%dataFile.WriteLine("knockedIntoSpace" SPC "YOU DID THIS TO ME.");
					%dataFile.WriteLine("knockedIntoSpace" SPC "Oh crap.");
					%dataFile.WriteLine("knockedIntoSpace" SPC "Are these rated for hard vac?!?");
					%dataFile.WriteLine("knockedIntoSpace" SPC "...");
					%dataFile.WriteLine("knockedIntoSpace" SPC "Permission to die, sir.");
					%dataFile.WriteLine("knockedIntoSpace" SPC "Help! HELP!");
					%dataFile.WriteLine("knockedIntoSpace" SPC "ShitshitshitshitSHIT!");
					%dataFile.WriteLine("knockedIntoSpace" SPC "FNNNNNNNNNNNG.");
				%dataFile.WriteLine("// Alien Merchant.");
					%dataFile.WriteLine("alienMerchant" SPC "What the...?!?");
					%dataFile.WriteLine("alienMerchant" SPC "Holy crap it's moving!");
					%dataFile.WriteLine("alienMerchant" SPC "Is that... human?");
					%dataFile.WriteLine("alienMerchant" SPC "It really wants out.");
					%dataFile.WriteLine("alienMerchant" SPC "Aliens in %##^ing alien tech!");
					%dataFile.WriteLine("alienMerchant" SPC "Trapped. I know the feeling.");
					%dataFile.WriteLine("alienMerchant" SPC "What ARE you?");
					%dataFile.WriteLine("alienMerchant" SPC "At least you're not coming out of the walls.");
					%dataFile.WriteLine("alienMerchant" SPC "Wonder what it tastes like...");
					%dataFile.WriteLine("alienMerchant" SPC "Couldn't get you out if I wanted to...");
					%dataFile.WriteLine("alienMerchant" SPC "Not opening this...");
				%dataFile.WriteLine("// Enemy Down.");
					%dataFile.WriteLine("enemyDown" SPC "Video venatus violentia petat vita.");
					%dataFile.WriteLine("enemyDown" SPC "One for the Corps.");
					%dataFile.WriteLine("enemyDown" SPC "Taken down.");
					%dataFile.WriteLine("enemyDown" SPC "Think it's dead.");
					%dataFile.WriteLine("enemyDown" SPC "Opposition eliminated.");
					%dataFile.WriteLine("enemyDown" SPC "No longer a threat.");
					%dataFile.WriteLine("enemyDown" SPC "Hope that hurt.");
					%dataFile.WriteLine("enemyDown" SPC "$%#@ing toaster!");
					%dataFile.WriteLine("enemyDown" SPC "No ticket.");
					%dataFile.WriteLine("enemyDown" SPC "Not worth the ammo.");
					%dataFile.WriteLine("enemyDown" SPC "Get off my ship.");
					%dataFile.WriteLine("enemyDown" SPC "$%#@ing $%#@!");
					%dataFile.WriteLine("enemyDown" SPC "Oorah!");
					%dataFile.WriteLine("enemyDown" SPC "That all?!?");
					%dataFile.WriteLine("enemyDown" SPC "Another one down.");
					%dataFile.WriteLine("enemyDown" SPC "Terminated.");
					%dataFile.WriteLine("enemyDown" SPC "Target down.");
					%dataFile.WriteLine("enemyDown" SPC "Enemy destroyed!");
					%dataFile.WriteLine("enemyDown" SPC "Target iced.");
					%dataFile.WriteLine("enemyDown" SPC "Neutralized.");
					%dataFile.WriteLine("enemyDown" SPC "&$%^!!");
					%dataFile.WriteLine("enemyDown" SPC "Threat neutralized.");
					%dataFile.WriteLine("enemyDown" SPC "Sixed!");
					%dataFile.WriteLine("enemyDown" SPC "Got it!");
					%dataFile.WriteLine("enemyDown" SPC "Fnnnnnnnng!");
					%dataFile.WriteLine("enemyDown" SPC "Give me another one!");
					%dataFile.WriteLine("enemyDown" SPC "That one's gone.");
					%dataFile.WriteLine("enemyDown" SPC "Superior firepower!");
					%dataFile.WriteLine("enemyDown" SPC "Die already!");
					%dataFile.WriteLine("enemyDown" SPC "Ooooorah!");
					%dataFile.WriteLine("enemyDown" SPC "Sarge woulda loved that!");
					%dataFile.WriteLine("enemyDown" SPC "Did you see that $%&@?!");
					%dataFile.WriteLine("enemyDown" SPC "Bang bang.");
					%dataFile.WriteLine("enemyDown" SPC "Center of mass!");
					%dataFile.WriteLine("enemyDown" SPC "Who's next?");
					%dataFile.WriteLine("enemyDown" SPC "NOT. YOUR. SHIP.");
					%dataFile.WriteLine("enemyDown" SPC "Kill 'em all.");
					%dataFile.WriteLine("enemyDown" SPC "Didn't expect that, eh?");
					%dataFile.WriteLine("enemyDown" SPC "JUST. DIE.");
					%dataFile.WriteLine("enemyDown" SPC "GO. AWAY.");
					%dataFile.WriteLine("enemyDown" SPC "Argh!");
				%dataFile.WriteLine("// Enemy Spotted.");
					%dataFile.WriteLine("enemySpotted" SPC "Enemy spotted!");
					%dataFile.WriteLine("enemySpotted" SPC "Target sighted!");
					%dataFile.WriteLine("enemySpotted" SPC "Tango in sight!");
					%dataFile.WriteLine("enemySpotted" SPC "Threat ahead!");
					%dataFile.WriteLine("enemySpotted" SPC "Look out!");
					%dataFile.WriteLine("enemySpotted" SPC "Gah!");
					%dataFile.WriteLine("enemySpotted" SPC "Eyes on target.");
					%dataFile.WriteLine("enemySpotted" SPC "Over here!");
					%dataFile.WriteLine("enemySpotted" SPC "Intruder spotted!");
					%dataFile.WriteLine("enemySpotted" SPC "Found you!");
					%dataFile.WriteLine("enemySpotted" SPC "Active threat here!");
					%dataFile.WriteLine("enemySpotted" SPC "Got one over here!");
					%dataFile.WriteLine("enemySpotted" SPC "Sighted!");
					%dataFile.WriteLine("enemySpotted" SPC "Target spotted!");
					%dataFile.WriteLine("enemySpotted" SPC "Threat spotted!");
					%dataFile.WriteLine("enemySpotted" SPC "Over there!");
					%dataFile.WriteLine("enemySpotted" SPC "Over here!");
				%dataFile.WriteLine("// Locker Chatter.");
					%dataFile.WriteLine("lockerChatter" SPC "Shiny shiny!");
					%dataFile.WriteLine("lockerChatter" SPC "What have we here?");
					%dataFile.WriteLine("lockerChatter" SPC "What's this?");
					%dataFile.WriteLine("lockerChatter" SPC "Oh baby!");
					%dataFile.WriteLine("lockerChatter" SPC "Looky here.");
					%dataFile.WriteLine("lockerChatter" SPC "Mine!");
					%dataFile.WriteLine("lockerChatter" SPC "Finders keepers.");
					%dataFile.WriteLine("lockerChatter" SPC "Yoink.");
					%dataFile.WriteLine("lockerChatter" SPC "That'll do.");
					%dataFile.WriteLine("lockerChatter" SPC "I'll take that.");
					%dataFile.WriteLine("lockerChatter" SPC "Interesting!");
				%dataFile.WriteLine("// Can't Use Upgrade.");
					%dataFile.WriteLine("cantUseUpgrade" SPC "Where does this go?!");
					%dataFile.WriteLine("cantUseUpgrade" SPC "Doesn't fit...");
					%dataFile.WriteLine("cantUseUpgrade" SPC "...do I throw it?");
					%dataFile.WriteLine("cantUseUpgrade" SPC "How do I use this?");
					%dataFile.WriteLine("cantUseUpgrade" SPC "Err...");
					%dataFile.WriteLine("cantUseUpgrade" SPC "Erm...");
					%dataFile.WriteLine("cantUseUpgrade" SPC "How does this work?");
					%dataFile.WriteLine("cantUseUpgrade" SPC "The hell does this go?!");
					%dataFile.WriteLine("cantUseUpgrade" SPC "Try again?");
					%dataFile.WriteLine("cantUseUpgrade" SPC "Does not compute.");
					%dataFile.WriteLine("cantUseUpgrade" SPC "Uhh... broken?");
				%dataFile.WriteLine("// Laser Mod.");
					%dataFile.WriteLine("laserMod" SPC "Burn, baby, BURN!");
					%dataFile.WriteLine("laserMod" SPC "Pew pew, son.");
					%dataFile.WriteLine("laserMod" SPC "Badass.");
					%dataFile.WriteLine("laserMod" SPC "Come toward the light, %#$@ers!");
					%dataFile.WriteLine("laserMod" SPC "Energy weapon. Aww yeah.");
					%dataFile.WriteLine("laserMod" SPC "Let's rock!");
					%dataFile.WriteLine("laserMod" SPC "Oorah!");
					%dataFile.WriteLine("laserMod" SPC "See it, hit it. Tap tap.");
					%dataFile.WriteLine("laserMod" SPC "*Evil laugh.*");
					%dataFile.WriteLine("laserMod" SPC "Dodge this!");
					%dataFile.WriteLine("laserMod" SPC "If ma could see me now!");
				%dataFile.WriteLine("// Plasma Mod.");
					%dataFile.WriteLine("plasmaMod" SPC "Ultimate badass.");
					%dataFile.WriteLine("plasmaMod" SPC "Let's slag these ^#&%s!");
					%dataFile.WriteLine("plasmaMod" SPC "I love the smell of plasma in the morning.");
					%dataFile.WriteLine("plasmaMod" SPC "Smell that plasma.");
					%dataFile.WriteLine("plasmaMod" SPC "Gimme a target!");
					%dataFile.WriteLine("plasmaMod" SPC "Firepower overwhelming.");
					%dataFile.WriteLine("plasmaMod" SPC "Come at me.");
					%dataFile.WriteLine("plasmaMod" SPC "Need to shoot... something!");
					%dataFile.WriteLine("plasmaMod" SPC "Don't need no 'nades!");
					%dataFile.WriteLine("plasmaMod" SPC "Knock 'em dead.");
					%dataFile.WriteLine("plasmaMod" SPC "This'll take 'em apart.");
				%dataFile.WriteLine("// Marine Death.");
					%dataFile.WriteLine("marineDeath" SPC "died with little dignity.");
					%dataFile.WriteLine("marineDeath" SPC "bit the dust while pissing.");
					%dataFile.WriteLine("marineDeath" SPC "did not perish well.");
					%dataFile.WriteLine("marineDeath" SPC "didn't see that coming.");
					%dataFile.WriteLine("marineDeath" SPC "died poorly.");
					%dataFile.WriteLine("marineDeath" SPC "set a bad example.");
					%dataFile.WriteLine("marineDeath" SPC "died quickly.");
					%dataFile.WriteLine("marineDeath" SPC "died slowly.");
					%dataFile.WriteLine("marineDeath" SPC "was alone in death.");
					%dataFile.WriteLine("marineDeath" SPC "would not be the last.");
					%dataFile.WriteLine("marineDeath" SPC "didn't struggle much.");
					%dataFile.WriteLine("marineDeath" SPC "tried hard, but it wasn't enough.");
					%dataFile.WriteLine("marineDeath" SPC "really wanted to punch that one to death.");
					%dataFile.WriteLine("marineDeath" SPC "really wanted to kick that one into space.");
					%dataFile.WriteLine("marineDeath" SPC "checks out.");
					%dataFile.WriteLine("marineDeath" SPC "checks out early.");
					%dataFile.WriteLine("marineDeath" SPC "gives zero %#@&s.");
					%dataFile.WriteLine("marineDeath" SPC "gives zero shits.");
					%dataFile.WriteLine("marineDeath" SPC "could not give less of a %#@&.");
					%dataFile.WriteLine("marineDeath" SPC "dies for the Corps.");
					%dataFile.WriteLine("marineDeath" SPC "dies for the ship.");
					%dataFile.WriteLine("marineDeath" SPC "dies for nothing.");
					%dataFile.WriteLine("marineDeath" SPC "dies for something.");
					%dataFile.WriteLine("marineDeath" SPC "dies like a fool.");
					%dataFile.WriteLine("marineDeath" SPC "dies like an idiot.");
					%dataFile.WriteLine("marineDeath" SPC "dies without permission.");
					%dataFile.WriteLine("marineDeath" SPC "gives up like a rookie.");
					%dataFile.WriteLine("marineDeath" SPC "can't take any more.");
					%dataFile.WriteLine("marineDeath" SPC "can't take the heat.");
					%dataFile.WriteLine("marineDeath" SPC "can't take the stress.");
					%dataFile.WriteLine("marineDeath" SPC "can't take this chicken shit outfit.");
					%dataFile.WriteLine("marineDeath" SPC "didn't want to die.");
					%dataFile.WriteLine("marineDeath" SPC "didn't want to lose.");
					%dataFile.WriteLine("marineDeath" SPC "screams in bloody agony.");
					%dataFile.WriteLine("marineDeath" SPC "got taken for a ride.");
					%dataFile.WriteLine("marineDeath" SPC "got hosed.");
					%dataFile.WriteLine("marineDeath" SPC "gets beaten to a pulp.");
					%dataFile.WriteLine("marineDeath" SPC "died screaming and pissing.");
					%dataFile.WriteLine("marineDeath" SPC "didn't go down without a fight.");
					%dataFile.WriteLine("marineDeath" SPC "went down without a fight.");
					%dataFile.WriteLine("marineDeath" SPC "was destroyed.");
					%dataFile.WriteLine("marineDeath" SPC "was torn limb from limb.");
					%dataFile.WriteLine("marineDeath" SPC "probably needed more ammo.");
					%dataFile.WriteLine("marineDeath" SPC "could have used a Hulk Suit.");
					%dataFile.WriteLine("marineDeath" SPC "could have used a medkit.");
					%dataFile.WriteLine("marineDeath" SPC "could have used an adrenal shot.");
					%dataFile.WriteLine("marineDeath" SPC "could have used a canteen.");
					%dataFile.WriteLine("marineDeath" SPC "could have used a grenade.");
					%dataFile.WriteLine("marineDeath" SPC "could have used a little help.");
					%dataFile.WriteLine("marineDeath" SPC "needed some help; got none.");
					%dataFile.WriteLine("marineDeath" SPC "needed backup.");
					%dataFile.WriteLine("marineDeath" SPC "should have moved quicker.");
					%dataFile.WriteLine("marineDeath" SPC "shouldn't have stood there.");
					%dataFile.WriteLine("marineDeath" SPC "requires... nope, dead.");
					%dataFile.WriteLine("marineDeath" SPC "was nowhere near retirement.");
					%dataFile.WriteLine("marineDeath" SPC "retires early.");
					%dataFile.WriteLine("marineDeath" SPC "takes a raincheck.");
					%dataFile.WriteLine("marineDeath" SPC "goes down swinging.");
					%dataFile.WriteLine("marineDeath" SPC "takes one for the squad.");
					%dataFile.WriteLine("marineDeath" SPC "takes one for the team.");
					%dataFile.WriteLine("marineDeath" SPC "takes one for the Corps.");
					%dataFile.WriteLine("marineDeath" SPC "wanted one last chance.");
					%dataFile.WriteLine("marineDeath" SPC "was too slow.");
					%dataFile.WriteLine("marineDeath" SPC "could have killed 'em all in real time.");
					%dataFile.WriteLine("marineDeath" SPC "wanted to see Terra Firma.");
					%dataFile.WriteLine("marineDeath" SPC "secretly hated you.");
					%dataFile.WriteLine("marineDeath" SPC "would have made a better librarian.");
					%dataFile.WriteLine("marineDeath" SPC "didn't want to become a zombie.");
					%dataFile.WriteLine("marineDeath" SPC "could have used a chainsaw.");
					%dataFile.WriteLine("marineDeath" SPC "could have used a nuke.");
					%dataFile.WriteLine("marineDeath" SPC "could have used a vacation.");
				%dataFile.WriteLine("// New Game Chatter.");
				%dataFile.WriteLine("// 	This section is broken into chunks of four lines");
				%dataFile.WriteLine("// 	of dialogue each, one for each starting marine.");
					%dataFile.WriteLine("newGameChatter" SPC "I hate cryosleep.");
					%dataFile.WriteLine("newGameChatter" SPC "Shut up.");
					%dataFile.WriteLine("newGameChatter" SPC "What's that sound?");
					%dataFile.WriteLine("newGameChatter" SPC "This isn't right...");
					
					%dataFile.WriteLine("newGameChatter" SPC "Never wake me up like that again.");
					%dataFile.WriteLine("newGameChatter" SPC "Stow it.");
					%dataFile.WriteLine("newGameChatter" SPC "Did you hear that?");
					%dataFile.WriteLine("newGameChatter" SPC "I don't see anything.");
					
					%dataFile.WriteLine("newGameChatter" SPC "We've only got ballistics?");
					%dataFile.WriteLine("newGameChatter" SPC "Suck it up.");
					%dataFile.WriteLine("newGameChatter" SPC "My eyes are playing tricks on me.");
					%dataFile.WriteLine("newGameChatter" SPC "No, they aren't...");
					
					%dataFile.WriteLine("newGameChatter" SPC "Where's Sarge?");
					%dataFile.WriteLine("newGameChatter" SPC "Sarge ain't here!");
					%dataFile.WriteLine("newGameChatter" SPC "Shut up and listen.");
					%dataFile.WriteLine("newGameChatter" SPC "I don't hear anything!");
					
					%dataFile.WriteLine("newGameChatter" SPC "What's going on?");
					%dataFile.WriteLine("newGameChatter" SPC "Open your eyes and LOOK!");
					%dataFile.WriteLine("newGameChatter" SPC "Did you hear that?");
					%dataFile.WriteLine("newGameChatter" SPC "I didn't hear $%^&!!");
					
					%dataFile.WriteLine("newGameChatter" SPC "Just five more minutes...");
					%dataFile.WriteLine("newGameChatter" SPC "Button your lip and look alive!");
					%dataFile.WriteLine("newGameChatter" SPC "Who made you Sarge?");
					%dataFile.WriteLine("newGameChatter" SPC "Shut up! Where is everyone?");
					
					%dataFile.WriteLine("newGameChatter" SPC "I felt the impact in my sleep...");
					%dataFile.WriteLine("newGameChatter" SPC "Where's the med officer?");
					%dataFile.WriteLine("newGameChatter" SPC "Get up and look alive!");
					%dataFile.WriteLine("newGameChatter" SPC "Where's the door?");
					
					%dataFile.WriteLine("newGameChatter" SPC "I was having a nightmare anyway.");
					%dataFile.WriteLine("newGameChatter" SPC "Must have been the nitro.");
					%dataFile.WriteLine("newGameChatter" SPC "We got power? Lights are running...");
					%dataFile.WriteLine("newGameChatter" SPC "Where's the crew?");
					
					%dataFile.WriteLine("newGameChatter" SPC "This better not be a drill.");
					%dataFile.WriteLine("newGameChatter" SPC "Like on Titan?");
					%dataFile.WriteLine("newGameChatter" SPC "I don't want to remember that.");
					%dataFile.WriteLine("newGameChatter" SPC "I don't think this is a drill...");
					
					%dataFile.WriteLine("newGameChatter" SPC "I don't think this is a drill...");
					%dataFile.WriteLine("newGameChatter" SPC "Wait, let me...");
					%dataFile.WriteLine("newGameChatter" SPC "Check your weapon, marine.");
					%dataFile.WriteLine("newGameChatter" SPC "Get it together!");
					
					%dataFile.WriteLine("newGameChatter" SPC "Deck integrity is shaky...");
					%dataFile.WriteLine("newGameChatter" SPC "Oxygen good?");
					%dataFile.WriteLine("newGameChatter" SPC "Good to go.");
					%dataFile.WriteLine("newGameChatter" SPC "In the green.");
					
					%dataFile.WriteLine("newGameChatter" SPC "No friendlies.");
					%dataFile.WriteLine("newGameChatter" SPC "No hostiles.");
					%dataFile.WriteLine("newGameChatter" SPC "Worse than having no friendlies.");
					%dataFile.WriteLine("newGameChatter" SPC "No shit.");
					
					%dataFile.WriteLine("newGameChatter" SPC "Suit feels like a hundred pounds.");
					%dataFile.WriteLine("newGameChatter" SPC "Suits ARE a hundred pounds.");
					%dataFile.WriteLine("newGameChatter" SPC "Gas compressors must have a leak.");
					%dataFile.WriteLine("newGameChatter" SPC "We're all getting fat.");
					
					%dataFile.WriteLine("newGameChatter" SPC "My mag boots aren't working.");
					%dataFile.WriteLine("newGameChatter" SPC "Here, let me...");
					%dataFile.WriteLine("newGameChatter" SPC "How do these things work?");
					%dataFile.WriteLine("newGameChatter" SPC "Dammit you're all thumbs.");
					
					%dataFile.WriteLine("newGameChatter" SPC "Emergency wakeup with no flashing lights.");
					%dataFile.WriteLine("newGameChatter" SPC "That's novel, eh?");
					%dataFile.WriteLine("newGameChatter" SPC "Training exercise I bet.");
					%dataFile.WriteLine("newGameChatter" SPC "Hundred credits says you're wrong.");
					
					%dataFile.WriteLine("newGameChatter" SPC "Where're the techs?");
					%dataFile.WriteLine("newGameChatter" SPC "I'll take a medic, thanks.");
					%dataFile.WriteLine("newGameChatter" SPC "Where's EVERYONE?");
					%dataFile.WriteLine("newGameChatter" SPC "Get up. Find them.");
					
					%dataFile.WriteLine("newGameChatter" SPC "Cold. Always cold.");
					%dataFile.WriteLine("newGameChatter" SPC "What I'd give for a hot shower.");
					%dataFile.WriteLine("newGameChatter" SPC "None of that steam disinfectant crap.");
					%dataFile.WriteLine("newGameChatter" SPC "Bubble bath for me.");
					
					%dataFile.WriteLine("newGameChatter" SPC "What was that?");
					%dataFile.WriteLine("newGameChatter" SPC "Us getting kicked out of cryo.");
					%dataFile.WriteLine("newGameChatter" SPC "No, the other thing.");
					%dataFile.WriteLine("newGameChatter" SPC "What other thing?");
					
					%dataFile.WriteLine("newGameChatter" SPC "What's going on?");
					%dataFile.WriteLine("newGameChatter" SPC "No officer on deck.");
					%dataFile.WriteLine("newGameChatter" SPC "Orders?");
					%dataFile.WriteLine("newGameChatter" SPC "You don't listen too well, marine.");
					
					%dataFile.WriteLine("newGameChatter" SPC "Don't point that at me.");
					%dataFile.WriteLine("newGameChatter" SPC "Sorry.");
					%dataFile.WriteLine("newGameChatter" SPC "I swear...");
					%dataFile.WriteLine("newGameChatter" SPC "Trigger discipline, everyone.");
					
					%dataFile.WriteLine("newGameChatter" SPC "What's that smell?");
					%dataFile.WriteLine("newGameChatter" SPC "Ozone?");
					%dataFile.WriteLine("newGameChatter" SPC "Cryo gel?");
					%dataFile.WriteLine("newGameChatter" SPC "Corpses.");
					
					%dataFile.WriteLine("newGameChatter" SPC "This bucket's barely holding.");
					%dataFile.WriteLine("newGameChatter" SPC "Step lightly then.");
					%dataFile.WriteLine("newGameChatter" SPC "Want me to do a jig?");
					%dataFile.WriteLine("newGameChatter" SPC "Shut up. SHUT UP.");
					
					%dataFile.WriteLine("newGameChatter" SPC "We should sterilize the whole ship.");
					%dataFile.WriteLine("newGameChatter" SPC "Not your call, marine.");
					%dataFile.WriteLine("newGameChatter" SPC "Ship is crawling, I can feel it.");
					%dataFile.WriteLine("newGameChatter" SPC "Yeah...");
					
					%dataFile.WriteLine("newGameChatter" SPC "What I'd give for a...");
					%dataFile.WriteLine("newGameChatter" SPC "Flamethrower?");
					%dataFile.WriteLine("newGameChatter" SPC "Nuke?");
					%dataFile.WriteLine("newGameChatter" SPC "Cryosleep Bar?");
					
					%dataFile.WriteLine("newGameChatter" SPC "Think we missed the party.");
					%dataFile.WriteLine("newGameChatter" SPC "I'm getting too old for this %#$@.");
					%dataFile.WriteLine("newGameChatter" SPC "Retirement, here we come.");
					%dataFile.WriteLine("newGameChatter" SPC "*Crack.* Ow!");
					
					%dataFile.WriteLine("newGameChatter" SPC "My neck...");
					%dataFile.WriteLine("newGameChatter" SPC "My back...");
					%dataFile.WriteLine("newGameChatter" SPC "My... butt.");
					%dataFile.WriteLine("newGameChatter" SPC "You old $#%$!");
					
					%dataFile.WriteLine("newGameChatter" SPC "Pass the sugar.");
					%dataFile.WriteLine("newGameChatter" SPC "Wake up.");
					%dataFile.WriteLine("newGameChatter" SPC "YOU wake up.");
					%dataFile.WriteLine("newGameChatter" SPC "I'M AWAKE.");
					
					%dataFile.WriteLine("newGameChatter" SPC "I swear to piss if this is a drill.");
					%dataFile.WriteLine("newGameChatter" SPC "It better be a drill.");
					%dataFile.WriteLine("newGameChatter" SPC "#$%@ing ballistics?!");
					%dataFile.WriteLine("newGameChatter" SPC "When was this made? XXth century?");
					
					%dataFile.WriteLine("newGameChatter" SPC "Knock knock.");
					%dataFile.WriteLine("newGameChatter" SPC "Shut up.");
					%dataFile.WriteLine("newGameChatter" SPC "Who's there?");
					%dataFile.WriteLine("newGameChatter" SPC "I hate you all.");
					
					%dataFile.WriteLine("newGameChatter" SPC "Wakey wakey.");
					%dataFile.WriteLine("newGameChatter" SPC "I'm gonna transfer to the army.");
					%dataFile.WriteLine("newGameChatter" SPC "Like it's better there?");
					%dataFile.WriteLine("newGameChatter" SPC "I think they have nukes, so yeah.");
					
				%dataFile.WriteLine("// New Game Plus Chatter.");
				%dataFile.WriteLine("// 	This section is broken into chunks of four lines");
				%dataFile.WriteLine("// 	of dialogue each, one for each marine.");
				%dataFile.WriteLine("// 	Since the player may have less than four marines");
				%dataFile.WriteLine("// 	at the start of NG+, keep comments independent!");
					%dataFile.WriteLine("newGamePlusChatter" SPC "This ship looks the same as the last.");
					%dataFile.WriteLine("newGamePlusChatter" SPC "%^&$ed up.");
					%dataFile.WriteLine("newGamePlusChatter" SPC "This layout...");
					%dataFile.WriteLine("newGamePlusChatter" SPC "Move out!");
					
					%dataFile.WriteLine("newGamePlusChatter" SPC "Same shit, different day.");
					%dataFile.WriteLine("newGamePlusChatter" SPC "Need more energy weapons...");
					%dataFile.WriteLine("newGamePlusChatter" SPC "We should blow the walls.");
					%dataFile.WriteLine("newGamePlusChatter" SPC "Aww crap.");
			
			// Close then open for read/load!
			%dataFile.close();								// Close file.
			%ret = %dataFile.OpenForRead(%filePath);		// Open file for read.
		}
		else
		{
			error("Could not open " @ %filePath @ " for write! Aborting!");
			return false;
		}
	}
	
	// Variables we track in the save file.
	$PortholeDialogueList[0] = "";
	$PortholeDialogueListLength = 0;
	$NoAmmoDialogueList[0] = "";
	$NoAmmoDialogueListLength = 0;
	$ReloadDialogueList[0] = "";
	$ReloadDialogueListLength = 0;
	$KnockedIntoSpaceDialogueList[0] = "";
	$KnockedIntoSpaceDialogueListLength = 0;
	$AlienMerchantDialogueList[0] = "";
	$AlienMerchantDialogueListLength = 0;
	$NeedReloadDialogueList[0] = "";
	$NeedReloadDialogueListLength = 0;
	$EnemyDownDialogueList[0] = "";
	$EnemyDownDialogueListLength = 0;
	$EnemySpottedDialogueList[0] = "";
	$EnemySpottedDialogueListLength = 0;
	$LockerChatterDialogueList[0] = "";
	$LockerChatterDialogueListLength = 0;
	$CantUseUpgradeDialogueList[0] = "";
	$CantUseUpgradeDialogueListLength = 0;
	$LaserModDialogueList[0] = "";
	$LaserModDialogueListLength = 0;
	$PlasmaModDialogueList[0] = "";
	$PlasmaModDialogueListLength = 0;
	$MarineDeathDialogueList[0] = "";
	$MarineDeathDialogueListLength = 0;
	$NewGameChatterDialogueList[0] = "";
	$NewGameChatterDialogueListLength = 0;
	$NewGamePlusChatterDialogueList[0] = "";
	$NewGamePlusChatterDialogueListLength = 0;
	for (%line = %dataFile.ReadLine(); !(%line $= ""); %line = %dataFile.ReadLine())
	{//echo("checking line!");
		// Get a line.
		%word = GetWord(%line, 0);
		
		// Load each parameter by line keyword.
		switch$ (%word)
		{
			// Save State Data.
			case "porthole":
				$PortholeDialogueList[$PortholeDialogueListLength] = restWords(%line);
				$PortholeDialogueListLength++;
			case "noAmmo":
				$NoAmmoDialogueList[$NoAmmoDialogueListLength] = restWords(%line);
				$NoAmmoDialogueListLength++;
			case "reload":
				$ReloadDialogueList[$ReloadDialogueListLength] = restWords(%line);
				$ReloadDialogueListLength++;
			case "knockedIntoSpace":
				$KnockedIntoSpaceDialogueList[$KnockedIntoSpaceDialogueListLength] = restWords(%line);
				$KnockedIntoSpaceDialogueListLength++;
			case "alienMerchant":
				$AlienMerchantDialogueList[$AlienMerchantDialogueListLength] = restWords(%line);
				$AlienMerchantDialogueListLength++;
			case "needReload":
				$NeedReloadDialogueList[$NeedReloadDialogueListLength] = restWords(%line);
				$NeedReloadDialogueListLength++;
			case "enemyDown":
				$EnemyDownDialogueList[$EnemyDownDialogueListLength] = restWords(%line);
				$EnemyDownDialogueListLength++;
			case "enemySpotted":
				$EnemySpottedDialogueList[$EnemySpottedDialogueListLength] = restWords(%line);
				$EnemySpottedDialogueListLength++;
			case "lockerChatter":
				$LockerChatterDialogueList[$LockerChatterDialogueListLength] = restWords(%line);
				$LockerChatterDialogueListLength++;
			case "cantUseUpgrade":
				$CantUseUpgradeDialogueList[$CantUseUpgradeDialogueListLength] = restWords(%line);
				$CantUseUpgradeDialogueListLength++;
			case "laserMod":
				$LaserModDialogueList[$LaserModDialogueListLength] = restWords(%line);
				$LaserModDialogueListLength++;
			case "plasmaMod":
				$PlasmaModDialogueList[$PlasmaModDialogueListLength] = restWords(%line);
				$PlasmaModDialogueListLength++;
			case "marineDeath":
				$MarineDeathDialogueList[$MarineDeathDialogueListLength] = restWords(%line);
				$MarineDeathDialogueListLength++;
			case "newGameChatter":
				$NewGameChatterDialogueList[$NewGameChatterDialogueListLength] = restWords(%line);
				$NewGameChatterDialogueListLength++;
			case "newGamePlusChatter":
				$NewGamePlusChatterDialogueList[$NewGamePlusChatterDialogueListLength] = restWords(%line);
				$NewGamePlusChatterDialogueListLength++;
		}
	}
	
	// Close the data file.
	%dataFile.close();
	
	return true;
}