From e592a739eba67dd4f7afc901ffd46c85c2ddbcd5 Mon Sep 17 00:00:00 2001
From: j <okp57855@psoxs.com>
Date: Thu, 23 Nov 2017 23:04:52 +1300
Subject: [PATCH] new content,bug fixes and sorting.

---
 src/init/storyInit.tw                       |  51 +-
 src/uncategorized/BackwardsCompatibility.tw |  68 +-
 src/uncategorized/SFMBarracks.tw            | 995 +++++++++++---------
 src/uncategorized/securityForceEOWReport.tw | 230 +++--
 4 files changed, 711 insertions(+), 633 deletions(-)

diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index a53ee2e3dea..8d65abcefaa 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -703,14 +703,6 @@ DairyRestraintsSetting($dairyRestraintsSetting)
 <<set $FCTVshow = 0>>
 <<set $lastShow = 0>>
 <<set $randShow = 0>>
-<<set $MercenariesMessageSent = 0>>
-<<set $SpecialForcesMessageSent = 0>>
-<<set $BodyguardHasSucessfullyRecivedSignal = 0>>
-<<set $finalChoice = "none">>
-<<set $eliteTotal = 12>>
-<<set $eliteDead = 0>>
-<<set $eliteVegetable = 0>>
-<<set $eliteFate = 0>>
 
 <<set $schoolSuggestion = 0>>
 <<set $TSS = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
@@ -1151,25 +1143,24 @@ FertilityAge($fertilityAge)
 <<set $SFMODToggle = 0>>					/* Does the player want to see the SF module at all? */
 
 /* Initial events and presentation logic */
-<<set $securityForceCreate = 0>> 					/* Has the player chosen to create the SF? Used for initial events */
-<<set $securityForceEventSeen = 0>>					/* Has the player seen the SF event? Used to avoid re-event */
-<<set $securityForceName = "Special Force">>		/* What is the SF called? */
-<<set $securityForceActive = 0>>					/* SF is active - activates end of turn screen logic */
+<<set $securityForceCreate = 0>> 				/* Has the player chosen to create the SF? Used for initial events */
+<<set $securityForceEventSeen = 0>>				/* Has the player seen the SF event? Used to avoid re-event */
+<<set $securityForceName = "Special Force">>			/* What is the SF called? */
+<<set $securityForceActive = 0>>				/* SF is active - activates end of turn screen logic */
 
 /* SF control panel and logic */
 <<set $securityForceSubsidyActive = 0>>				/* Is the player having to subsidize the SF? */
-<<set $securityForceRecruit = 0>>					/* How many recruits has the SF attracted this week? Used in recruitment calcs */
-<<set $securityForceTrade = 0>>						/* How much trade has the SF encouraged this week? Used for rep calcs */
-<<set $securityForceBooty = 0>>						/* How much money has the SF made this week? Used in money calcs */
-<<set $securityForceIncome = 0>>					/* What was the final, adjusted take for the SF this week? Used for EOW text */
+<<set $securityForceRecruit = 0>>				/* How many recruits has the SF attracted this week? Used in recruitment calcs */
+<<set $securityForceTrade = 0>>					/* How much trade has the SF encouraged this week? Used for rep calcs */
+<<set $securityForceBooty = 0>>					/* How much money has the SF made this week? Used in money calcs */
+<<set $securityForceIncome = 0>>				/* What was the final, adjusted take for the SF this week? Used for EOW text */
 <<set $securityForceProfitable = 0>>				/* Is the SF profitable? Used for EOW text */
 <<set $securityForceFocus = "recruit">>				/* What is the SF's assigned job? */
-<<set $securityForceRulesOfEngagement = "hold">>	/* What are the SF's ROE outside the arcology? */
-<<set $securityForceAccountability = "strict">>		/* Is the SF being held accountable for its actions outside the arcology? */
-<<set $securityForceDepravity = 0>>					/* How depraved has the SF become? Used for flavor text injections. */
+<<set $securityForceRulesOfEngagement = "hold">>		/* What are the SF's ROE outside the arcology? */
+<<set $securityForceAccountability = "strict">>			/* Is the SF being held accountable for its actions outside the arcology? */
+<<set $securityForceDepravity = 0>>				/* How depraved has the SF become? Used for flavor text injections. */
 <<set $securityForceUpgradeToken = 0>>				/* Flag to keep track of single upgrade/week. */
-<<set $securityForceUpgradeTokenReset = 0>>			/* The above hasn't been reset yet. Self tracking. */
-<<set $securityForceGiftToken = 0>>					/* Flag to keep track of single gift/week. */
+<<set $securityForceGiftToken = 0>>				/* Flag to keep track of single gift/week. */
 
 /* Personnel/Gear */
 <<set $securityForceArcologyUpgrades = 0>>			/* How many militarized arcology upgrades has the player bought? */
@@ -1177,27 +1168,29 @@ FertilityAge($fertilityAge)
 <<set $securityForceInfantryPower = 0>>				/* How many infantry upgrades has the player bought? */
 <<set $securityForceStimulantPower = 0>>			/* How many stimulant upgrades has the player bought? */
 <<set $securityForceVehiclePower = 0>>				/* How many vehicle upgrades has the player bought? */
+<<set $securityForceHeavyBattleTank = 0>>			/* Has the SF found a busted down heavy battle tank begging for work? */
 <<set $securityForceAircraftPower = 0>>				/* How many aircraft upgrades has the player bought? */
 <<set $securityForceSpacePlanePower = 0>>			/* Has the SF found a busted down spaceplane begging for work? */
 <<set $securityForceFortressZeppelin = 0>>			/* Has the SF found a busted down fortress zeppelin begging for work? */
-<<set $securityForceAC130 = 0>>						/* Has the SF found a busted down AC-130 begging for work? */
+<<set $securityForceAC130 = 0>>					/* Has the SF found a busted down AC-130 begging for work? */
 <<set $securityForceDronePower = 0>>				/* How many drone upgrades has the player bought? */
 <<set $securityForceSatalitePower = 0>>				/* Has the SF commendeered a satellite relay? */
 <<set $securityForceGiantRobot = 0>>				/* Has the player assembled a makeshift giant robot */
 <<set $securityForceMissileSilo = 0>>				/* Has the SF found a disused missile silo in need of reassignement?*/
 <<set $securityForceAircraftCarrier = 0>> 			/* Has the SF found a busted down aircraft carrier begging for work? */
-<<set $securityForceSubmarine = 0>>					/* Has the SF found a busted down submarine begging for work? */		
+<<set $securityForceSubmarine = 0>>				/* Has the SF found a busted down submarine begging for work? */		
+<<set $securityForceHeavyAmphibiousTransport = 0>>		/* Has the SF found a busted down heavy amphibious transport begging for work? */
 <<set $securityForceMissionEfficiency = 1>>			/* How efficient is the SF at completing its assigned task? (Upgrades*Drug Multiplier) */
 
 /* FacilitySupport */
-<<set $FacilitySupportSlaves = 0>>
 <<set $Lieutenantcolonel = 0>>
+<<set $FacilitySupportSlaves = 0>>
 <<set $FacilitySupportfficiency = 0>>
 <<set $FacilitySupportUpgrade = 0>>
 
 /* Colonel */ 
 <<set $securityForceSexedColonelToken = 0>>			/* Has the player sexed The colonel this week? */
-<<set $ColonelCore = 0>>							/* What is the core of The Colonel? */
+<<set $ColonelCore = 0>>						/* What is the core of The Colonel? */
 <<set $securityForceColonelToken = 0>>				/* Flag to keep track of talking to the colonel. */
 <<set $securityForceColonelSexed = 0>>				/* Has the player sexed The colonel this week? */ 	
 
@@ -1205,10 +1198,10 @@ FertilityAge($fertilityAge)
 <<set $TradeShowAttendanceGranted = 0>>				/* Has The Colonel been allowed to go the TradeShow? */
 <<set $OverallTradeShowAttendance = 0>>				/* how many times has The Colonel gone to the TradeShow */
 <<set $CurrentTradeShowAttendance = 0>>				/* Has the Colonel attended the current TradeShow? */
-<<set $TradeShowIncome = 0>>						/* How much was The Colonel able to make at the TradeShow selling generic scematics? */
-<<set $TotalTradeShowIncome = 0>>					/* Total TradeShowIncome */
-<<set $TradeShowHelots = 0>>						/* How many menail slaves were sent as a bonus from generic scematic sales during the current TradeShow?
-<<set $TotalTradeShowHelots = 0>>					/* Total number of menail slaves acquired via the Trade Show */
+<<set $TradeShowIncome = 0>>					/* How much was The Colonel able to make at the TradeShow selling generic scematics? */
+<<set $TotalTradeShowIncome = 0>>				/* Total TradeShowIncome */
+<<set $TradeShowHelots = 0>>					/* How many menail slaves were sent as a bonus from generic scematic sales during the current TradeShow?
+<<set $TotalTradeShowHelots = 0>>				/* Total number of menail slaves acquired via the Trade Show */
 
 				
 /* Misc mod variables */
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index fbb75d2dfb0..0bd16bde936 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -571,62 +571,19 @@
 <</if>>
 <<if ndef $cheatModeM>>
 	<<set $cheatModeM = 1>>
-<</if>>
-<<if ndef $MercenariesMessageSent>>
-<<set $MercenariesMessageSent = 0>>
-<</if>>
-<<if ndef $SpecialForcesMessageSent>>
-<<set $SpecialForcesMessageSent = 0>>
-<</if>>
-<<if ndef $BodyguardHasSucessfullyRecivedSignal>>
-<<set $BodyguardHasSucessfullyRecivedSignal = 0>>
-<</if>>
-<<if ndef $finalChoice>>
-<<set $finalChoice = "none">>
-<</if>>
-<<if ndef $eliteTotal>>
-<<set $eliteTotal = 12>>
-<</if>>
-<<if ndef $eliteDead>>
-<<set $eliteDead = 0>>
-<</if>>
-<<if ndef $eliteVegetable>>
-<<set $eliteVegetable = 0>>
-<</if>>
-<<if ndef $eliteFate>>
-<<set $eliteFate = 0>>
-<</if>>
-<<if ndef $DOLFigureHeadFamilyStatuesChildren>>
-	<<set $DOLFigureHeadFamilyStatuesChildren = 0>>
-<</if>>
-<<if ndef $DOLFigureHeadFamilyStatuesEscorts>>
-	<<set $DOLFigureHeadFamilyStatuesEscorts = 0>>
-<</if>>
 
 /* SF anon additional Special Force Variables [SFVAR] */
 
 /* SF control panel and logic */
-<<set $securityForceUpgradeTokenReset = 0>>
+
 
 /* Personnel/Gear  */
+<</if>>
+<<if ndef $securityForceHeavyBattleTank>>
+	<<set $securityForceHeavyBattleTank = 0>>
 <<if ndef $securityForceColonelToken>>
 	<<set $securityForceColonelToken = 0>>
 <</if>>
-<<if ndef $SSLevelBarracks>>
-	<<set $SSLevelBarracks = 0>>
-<</if>>
-<<if ndef $SSLevelArmoury>>
-	<<set $SSLevelArmoury = 0>>
-<</if>>
-<<if ndef $SSLevelStimulantLab>>
-	<<set $SSLevelStimulantLab = 0>>
-<</if>>
-<<if ndef $SSLevelGarage>>
-	<<set $SSLevelGarage = 0>>
-<</if>>
-<<if ndef $SSLevelHangar>>
-	<<set $SSLevelHangar = 0>>
-<</if>>
 <<if ndef $securityForceSpacePlanePower>>
 	<<set $securityForceSpacePlanePower = 0>>
 <</if>>
@@ -636,12 +593,6 @@
 <<if ndef $securityForceAC130>>
 	<<set $securityForceAC130 = 0>>
 <</if>>
-<<if ndef $SSLevelDroneBay>>
-	<<set $SSLevelDroneBay = 0>>
-<</if>>
-<<if ndef $SSLevelLaunchBay>>
-	<<set $SSLevelLaunchBay = 0>>
-<</if>>
 <<if ndef $securityForceSatalitePower>>
 	<<set $securityForceSatalitePower = 0>>
 <</if>>
@@ -679,6 +630,9 @@
 	<<set $facilitysupportName = "standard">>
 <</if>>
 
+<<if ndef $Lieutenantcolonel>>
+	<<set $Lieutenantcolonel = 0>>
+<</if>>
 <<if ndef $FacilitySupportSlaves>>
 	<<set $FacilitySupportSlaves = 0>>
 <</if>>
@@ -686,16 +640,10 @@
 <<if ndef $FacilitySupportfficiency>>
 	<<set $FacilitySupportfficiency = 0>>
 <</if>>
-
-<<if ndef $Lieutenantcolonel>>
-	<<set $Lieutenantcolonel = 0>>
-<</if>>
-
 <<if ndef $FacilitySupportUpgrade>>
 	<<set $FacilitySupportUpgrade = 0>>
 <</if>>
 
-
 /* Colonel /*
 <<if $colonelCore != "shell shocked">>
 	<<set $colonelCore = "shell shocked">>
@@ -2834,4 +2782,4 @@ Done!
 <<if $secExp == 1>>
 <br>
 <<include "SecExpBackwardCompatibility">>
-<</if>>
\ No newline at end of file
+<</if>>
diff --git a/src/uncategorized/SFMBarracks.tw b/src/uncategorized/SFMBarracks.tw
index 1e769f12630..e4be53562f0 100644
--- a/src/uncategorized/SFMBarracks.tw
+++ b/src/uncategorized/SFMBarracks.tw
@@ -2,6 +2,9 @@
 <<if ndef $securityForceUpgradeTokenReset>>
 	<<set $securityForceUpgradeTokenReset = 0>>
 <</if>>
+<<if ndef $FacilitySupport>>
+	<<set $FacilitySupport = 0>>
+<</if>>
 
 <<set _N1 = 2>>
 <<set _N2 = 2>>
@@ -17,14 +20,15 @@
 <</if>>
 
 /* The upgrades are currently ordered as:
-	Barracks(13)
+	Barracks(16)
 		securityForceArcologyUpgrades(16)
 	Armory(11)
 		securityForceInfantryPower(11)
 	Stimulant Lab(9)
 		securityForceStimulantPower(9)
-	<<if $securityForceArcologyUpgrades >= 1>>Garage(7)
+	<<if $securityForceArcologyUpgrades >= 1>>Garage(10)
 		securityForceVehiclePower(7)
+		securityForceHeavyBattleTank(3)
 	<</if>>
 	<<if $securityForceArcologyUpgrades >= 4>>Hangar(27)
 		securityForceAircraftPower(8)
@@ -42,7 +46,7 @@
 	<</if>>
 	securityForceX
 
-($terrain == "oceanic")
+<<if $terrain == "oceanic" || $terrain == "marine">>
 	<<if $securityForceArcologyUpgrades >= 4>>Launch Bay(17)
 		securityForceSatalitePower(17)
 	<</if>>
@@ -52,24 +56,46 @@
 		securityForceHeavyAmphibiousTransport (3)
 securityForceX */
 
-<<if $terrain != "oceanic">>
-	<<set _SFNO = $securityForceArcologyUpgrades+$securityForceInfantryPower+$securityForceStimulantPower+$securityForceVehiclePower+$securityForceAircraftPower+$securityForceSpacePlanePower+$securityForceFortressZeppelin+$securityForceDronePower+$securityForceSatalitePower+$securityForceGiantRobot+$securityForceMissileSilo>>
-	<<set _max = 105>>
+<<set _Barracks = $securityForceArcologyUpgrades>>
+<<set _BarracksMax = 16>>
+
+<<set _Armoury = $securityForceInfantryPower>>
+<<set _ArmouryMax = 11>>
+
+<<set _StimulantLab = $securityForceInfantryPower>>
+<<set _StimulantLabMax = 9>>
+
+<<set _Garage = $securityForceVehiclePower+$securityForceHeavyBattleTank>>
+<<set _GarageMax = 10>>
+
+<<set _Hangar = $securityForceAircraftPower+$securityForceSpacePlanePower+$securityForceFortressZeppelin+$securityForceAC130>>
+<<set _HangarMax = 27>>
+
+<<set _DroneBay = $securityForceDronePower>>
+<<set _DroneBayMax = 6>>
+
+<<set _LaunchBayNO = $securityForceSatalitePower+$securityForceGiantRobot+$securityForceMissileSilo>>
+<<set _LaunchBayNOMax = 29>>
+<<set _LaunchBayO = $securityForceSatalitePower>>
+<<set _LaunchBayOMax = 17>>
+
+<<if $terrain != "oceanic" || $terrain == "marine">>
+	<<set _SFNO = _Barracks+_Armoury+_StimulantLab+_Garage+_Hangar+_DroneBay+_LaunchBayNO>>
+	<<set _max = _BarracksMax+_ArmouryMax+_StimulantLabMax+_GarageMax+_HangarMax+_DroneBayMax+_LaunchBayNOMax>>
 	<<set _SFO = 0>>
-	<<set _NavalYard = 0>>
+	<<set _NavalYard = 0>> 
 	<<set _NavalYardMax = 0>>
-<<elseif $terrain == "oceanic">>
-	<<set _SFO = $securityForceArcologyUpgrades+$securityForceInfantryPower+$securityForceStimulantPower+$securityForceVehiclePower+$securityForceAircraftPower+$securityForceSpacePlanePower+$securityForceFortressZeppelin+$securityForceDronePower+$securityForceSatalitePower+$securityForceAircraftCarrier+$securityForceSubmarine+$securityForceHeavyAmphibiousTransport>>
-	<<set _max = 105>>
-	<<set _SFNO = 0>>
+<<elseif $terrain == "oceanic" || $terrain == "marine">>
 	<<set _NavalYard = $securityForceAircraftCarrier+$securityForceSubmarine+$securityForceHeavyAmphibiousTransport>>
 	<<set _NavalYardMax = 12>>
+	<<set _SFO = _Barracks+_Armoury+_StimulantLab+_Garage+_Hangar+_DroneBay+_LaunchBayO+_NavalYard>>
+	<<set _max = _BarracksMax+_ArmouryMax+_StimulantLabMax+_GarageMax+_HangarMax+_DroneBayMax+_LaunchBayOMax>>
+	<<set _SFNO = 0>>
 <</if>>
 
 <<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Barracks">>
-The Special Force (SF) is called <<textbox "$securityForceName" $securityForceName "SFM Barracks">> .
-<br>
-//The barracks of $securityForceName is located in the arcology's lower levels, occupying unneeded warehouse space. It is not accessible to the general citizenry, but your personal elevator has express service to it. As you step off, two soldiers in combat armour manning the entry checkpoint tense and raise their weapons, before nodding respectfully and stepping aside, allowing their patron entry. The barracks is cavernous, containing areas for the soldiers to sleep and keep their belongings, areas for the storage and maintenance of their weapons and equipment, and common areas for them to amuse themselves, since they rarely mix with your citizens on the upper levels. You survey the facilities.//
+[[Test Event|Security Force Naming-Colonel]]<br>
+//The barracks of <<textbox "$securityForceName" $securityForceName "SFM Barracks">> is located in the lower levels of $arcologies[0].name, occupying unneeded warehouse space. It is not accessible to the general citizenry, but your personal elevator has express service to it. As you step off, two soldiers in combat armour manning the entry checkpoint tense and raise their weapons, before nodding respectfully and stepping aside, allowing their patron entry. The barracks is cavernous, containing areas for the soldiers to sleep and keep their belongings, areas for the storage and maintenance of their weapons and equipment, and common areas for them to amuse themselves, since they rarely mix with your citizens on the upper levels. You survey the facilities.//
 
 <br><br>
 
@@ -212,9 +238,18 @@ The Special Force (SF) is called <<textbox "$securityForceName" $securityForceNa
 <<elseif $securityForceVehiclePower == 7>>
 	The garage has replaced both its armoured and support vehicles with the most advanced light and medium variants possible, making the mobile unit of $securityForceName far superior to anything in the arcology's immediate area.
 <</if>>
+
+/* 3 upgrades */
+<<if $securityForceHeavyBattleTank == 1>>
+	A basic heavy battle tank has been 'borrowed' from the old world.
+<<elseif $securityForceHeavyBattleTank == 2>>
+	Modernised the heavy battle tank's armor.
+<<elseif $securityForceHeavyBattleTank == 3>>
+	Modernised the heavy battle tank's armor and upgradeded the main gun to a 140 inch barrel.
+<</if>>
 <</if>>
 
-<<if $securityForceArcologyUpgrades >= 4>>
+<<if $securityForceArcologyUpgrades >= 4 && _Hangar > 0>>
 <br><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ''Hangar:''
 <br>
@@ -315,7 +350,7 @@ The Special Force (SF) is called <<textbox "$securityForceName" $securityForceNa
 <</if>>
 <</if>>
 
-<<if $securityForceArcologyUpgrades >= 4>>
+<<if $securityForceArcologyUpgrades >= 4 && _LaunchBay > 0>>
 <br><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ''Launch Bay:''
 <<if $securityForceSatalitePower > 0>>
@@ -395,7 +430,7 @@ The Special Force (SF) is called <<textbox "$securityForceName" $securityForceNa
 <</if>>
 <</if>>
 
-<<if $terrain == "oceanic">>
+<<if $terrain == "oceanic" || $terrain == "marine" && _NavalYard > 0>>
 <br><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ''Naval Yard:''
 <<if $securityForceAircraftCarrier > 0>>
@@ -416,13 +451,13 @@ The Special Force (SF) is called <<textbox "$securityForceName" $securityForceNa
 	/* 5 upgrades */ 
 	<<if $securityForceSubmarine == 1>>
 	A basic submarine has been 'borrowed' from the old world.
-	<<elseif $securityForcesubmarine == 2>>
+	<<elseif $securityForceSubmarine == 2>>
 	Modernized the submarine's engines for silence.
-	<<elseif $securityForcesubmarine == 3>>
+	<<elseif $securityForceSubmarine == 3>>
 	Modernized the submarine's engines for silence.Upgraded the submarine's hull for silence.
-	<<elseif $securityForcesubmarine == 4>>
+	<<elseif $securityForceSubmarine == 4>>
 	Modernized the submarine's engines for silence.Upgraded the submarine's hull for silence and weaponry.
-	<<elseif $securityForcesubmarine == 5>>
+	<<elseif $securityForceSubmarine == 5>>
 	Modernized the submarine's engines for silence.Upgraded the submarine's hull for silence, weaponry and air scrubbers, allowing the sub to stay submerged for longer.
 	<</if>>
 <</if>>
@@ -440,7 +475,7 @@ The Special Force (SF) is called <<textbox "$securityForceName" $securityForceNa
 <</if>>
 <br><br>
 
-//You continue towards the common area, the soldiers you pass nodding respectfully, saluting, or giving slight bows, as they please, to you. You pass the briefing areas, and can see the officers and sergeants of the force conferring over planning tables and display screens regarding their upcoming deployments.//
+//You continue towards the common area, the soldiers you pass nodding respectfully, saluting, or giving slight bows, as they please, to you. You pass the briefing areas, the officers and sergeants of the force are conferring over planning tables and display screens regarding their upcoming deployments.//
 
 <br><br>
 
@@ -538,7 +573,7 @@ The Special Force (SF) is called <<textbox "$securityForceName" $securityForceNa
 				_Name picks up a tablet. "Sure boss," she says, "we had a nice score this week. Looters fucked up and left a bunch of nice shit behind." She taps a few commands on the tablet. "@@.green;There's your cut,@@¤_EnvCash1"
 			<</if>>
 			<<set $securityForceGiftToken = 1>>
-			<<set $cash += _EnvCash1>>
+			<<set $cash += _EnvCash1*(_SFNO/10 || _SFO/10)>>
 		<</replace>>
 		<</link>>
 		<<if $rep < 15000 && $CurrentTradeShowAttendance == 0>>
@@ -607,474 +642,528 @@ The Special Force (SF) is called <<textbox "$securityForceName" $securityForceNa
 	<br><br>So far, you have currently discussed increasing the frequency of upgrading $securityForceName per week _Name <<if $securityForceUpgradeTokenReset == 1>>once<<else>>$securityForceUpgradeTokenReset times<</if>>.
 <</if>>
 
-<<set _Hangar = $securityForceAircraftPower+$securityForceSpacePlanePower+$securityForceFortressZeppelin+$securityForceAC130>>
-<<set _LaunchBayNO = $securityForceSatalitePower+$securityForceGiantRobot+$securityForceMissileSilo>>
-<<set _LaunchBayO = $securityForceSatalitePower>>
-
-<<if $securityForceUpgradeToken == 0 && (_SFNO < _max || _SFO < _max)>>
+<<if $securityForceUpgradeToken == 0 && _SFNO < _max || _SFO < _max>>
 <span id="resultX">
-<br><br>Which facility or equipment do you wish _Name to upgrade this week?
+	<br><br>Which facility or equipment do you wish _Name to upgrade this week?
 
-	<<if $securityForceArcologyUpgrades < 5>>
-		<br><<link "Barracks">>
-		<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "Expanding the facilities here should help us support more cool shit." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceArcologyUpgrades++, $cash -= 100000*_Env>>
-		<</replace>>
-		<</link>> // Costs ¤<<print 100000*_Env>> //
-	<<elseif $securityForceArcologyUpgrades < 16 && $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceDronePower >= 5 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5>>
-		<<if $securityForceArcologyUpgrades == 5>>
-			<<set _arcCost = 15000000>>
-		<<elseif $securityForceArcologyUpgrades == 6>>
-			<<set _arcCost = 20000000>>
-		<<elseif $securityForceArcologyUpgrades == 7>>
-			<<set _arcCost = 35000000>>
-		<<elseif $securityForceArcologyUpgrades == 8>>
-			<<set _arcCost = 55000000>>
-		<<elseif $securityForceArcologyUpgrades == 9>>
-			<<set _arcCost = 125000000>>
-		<<elseif $securityForceArcologyUpgrades == 10>>
-			<<set _arcCost = 350000000>>
-		<<elseif $securityForceArcologyUpgrades == 11>>
-			<<set _arcCost = 600000000>>
-		<<elseif $securityForceArcologyUpgrades == 12>>
-			<<set _arcCost = 2500000000>>
-		<<elseif $securityForceArcologyUpgrades == 13>>
-			<<set _arcCost = 5000000000>>
-		<<elseif $securityForceArcologyUpgrades == 14>>
-			<<set _arcCost = 6000000000>>
-		<<elseif $securityForceArcologyUpgrades == 15>>
-			<<set _arcCost = 16000000000>>
-		<</if>>
-		<br><<link "Barracks">>
-		<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "Expanding the facilities here should help us support more cool shit." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceArcologyUpgrades++, $cash -= _arcCost*_Env>>
-		<</replace>>
-		<</link>> // Costs ¤<<print _arcCost*_Env>> //
-	<<elseif $securityForceArcologyUpgrades == 12 && $securityForceInfantryPower >= 11 && $securityForceStimulantPower >= 7 && $securityForceVehiclePower >= 7 && $securityForceAircraftPower >= 8 && $securityForceSpacePlanePower >= 11 && $securityForceFortressZeppelin >= 3 && $securityForceAC130 >= 5 && $securityForceDronePower >= 6 && $securityForceSatalitePower >= 16>>
-		<br><<link "Barracks">>
-		<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "Expanding the facilities here should help us support more cool shit." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceArcologyUpgrades++, $cash -=  _arcCost*_Env>>
-		<</replace>>
-		<</link>> // Costs ¤<<print _arcCost*_Env>> //
-	<<elseif $securityForceArcologyUpgrades == 13 && $securityForceArcologyUpgrades < 16>>
-		<br><<link "Barracks">>
-		<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "Expanding the facilities here should help us support more cool shit." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceArcologyUpgrades++, $cash -=  _arcCost*_Env>>
-		<</replace>>
-		<</link>> // Costs ¤<<print _arcCost*_Env>> //
-	<</if>>
-	<<if $securityForceArcologyUpgrades == 5 || $securityForceArcologyUpgrades == 16>>
-		<br>//$securityForceName has fully upgraded the barracks to support it's activities//
-	<</if>>
-			
-	<<if $securityForceInfantryPower < 5>>
-		<br><<link "Armoury">>
-			<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "The boys'll like having some new guns and armour to help them out there." She laughs. "Don't think the poor bastards they'll be shooting will thank you though." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceInfantryPower++, $cash -= 40000*_Env>>
-			<</replace>>
-		<</link>> // Costs ¤<<print40000*_Env>> //<br>
-	<<elseif $securityForceInfantryPower < 11 && $securityForceVehiclePower >= 5 && $securityForceDronePower >= 5 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5>>
-		<br><<link "Armoury">>
-			<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "The boys'll like having some new guns and armour to help them out there." She laughs. "Don't think the poor bastards they'll be shooting will thank you though." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceInfantryPower++, $cash -= 4500000*_Env>>
-			<</replace>>
-		<</link>> // Costs ¤<<print 4500000*_Env>> //
-	<</if>>
-	<<if $securityForceInfantryPower == 5 || $securityForceInfantryPower == 11>>
-		<br>//$securityForceName has fully upgraded the armoury to support it's activities.//
-	<</if>>
-	
-		<<if $securityForceStimulantPower < 5>>
-		<br><<link "Stimulant Lab">>
+		<<if _Barracks < 5>>
+			<br><<link "Barracks">>
 			<<replace "#resultX">>
-			<br>"Sure, boss." she says, nodding. "The boys are going to like hearing that they'll be getting new stims. Some of them can't get enough." She laughs, sweeping her arm at a corner of the throne, where dozens of empty stimulant injectors are piled. "I might be one of them. Either way, the fucks out there aren't going to like us once we're on the new juice." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceStimulantPower++, $cash -= 40000*_Env>>
+				"Sure, boss." she says, nodding. "Expanding the facilities here should help us support more cool shit." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _Barracks++, $cash -= 100000*_Env>>
 			<</replace>>
-		<</link>> // Costs ¤<<print 40000*_Env>> //<br>
-	<<elseif $securityForceStimulantPower > 5 && $securityForceStimulantPower < 9 && $securityForceArcologyUpgrades >= 5 && $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceDronePower >= 5 && $securityForceAircraftPower >= 5>>
-		<<if $securityForceStimulantPower == 6>>
-			<<set _drugCost = 2265000>>
-		<<elseif $securityForceStimulantPower == 7>>
-			<<set _drugCost = 200000000000>>
-		<<elseif $securityForceStimulantPower == 8>>
-			<<set _drugCost = 250000000000>>
-		<</if>>
-		<br><<link "Stimulant Lab">>
+			<</link>> // Costs ¤<<print 100000*_Env>> //
+		<<elseif _Barracks < 16 && $securityForceVehiclePower >= 5 && _Armoury >= 5 && _DroneBay >= 5 && $securityForceAircraftPower >= 5 && _StimulantLab >= 5>>
+			<<if _Barracks == 5>>
+				<<set _arcCost = 15000000>>
+			<<elseif _Barracks == 6>>
+				<<set _arcCost = 20000000>>
+			<<elseif _Barracks == 7>>
+				<<set _arcCost = 35000000>>
+			<<elseif _Barracks == 8>>
+				<<set _arcCost = 55000000>>
+			<<elseif _Barracks == 9>>
+				<<set _arcCost = 125000000>>
+			<<elseif _Barracks == 10>>
+				<<set _arcCost = 350000000>>
+			<<elseif _Barracks == 11>>
+				<<set _arcCost = 600000000>>
+			<<elseif _Barracks == 12>>
+				<<set _arcCost = 2500000000>>
+			<<elseif _Barracks == 13>>
+				<<set _arcCost = 5000000000>>
+			<<elseif _Barracks == 14>>
+				<<set _arcCost = 6000000000>>
+			<<elseif _Barracks == 15>>
+				<<set _arcCost = 16000000000>>
+			<</if>>
+			<br><<link "Barracks">>
 			<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "The boys are going to like hearing that they'll be getting new stims. Some of them can't get enough." She laughs, sweeping her arm at a corner of the throne, where dozens of empty stimulant injectors are piled. "I might be one of them. Either way, the fucks out there aren't going to like us once we're on the new juice." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceStimulantPower++, $cash -= _drugCost*_Env>>
+				"Sure, boss." she says, nodding. "Expanding the facilities here should help us support more cool shit." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _Barracks++, $cash -= _arcCost*_Env>>
 			<</replace>>
-		<</link>> // Costs ¤<<print _drugCost*_Env>> //
-	<<elseif $securityForceStimulantPower == 7 && $securityForceInfantryPower >= 11 && $securityForceVehiclePower >= 7 && $securityForceAircraftPower >= 8 && $securityForceSpacePlanePower >= 11 && $securityForceFortressZeppelin >= 3 && $securityForceAC130 >= 5 && $securityForceDronePower >= 6 && $securityForceSatalitePower >= 16 $securityForceArcologyUpgrades >= 13>>
-		<br><<link "Stimulant Lab">>
+			<</link>> // Costs ¤<<print _arcCost*_Env>> //
+		<<elseif _Barracks == 12 && _Armoury >= 11 && _StimulantLab >= 7 && $securityForceVehiclePower >= 7 && $securityForceAircraftPower >= 8 && $securityForceSpacePlanePower >= 11 && $securityForceFortressZeppelin >= 3 && $securityForceAC130 >= 5 && _DroneBay >= 6 && $securityForceSatalitePower >= 16>>
+			<br><<link "Barracks">>
 			<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "The boys are going to like hearing that they'll be getting new stims. Some of them can't get enough." She laughs, sweeping her arm at a corner of the throne, where dozens of empty stimulant injectors are piled. "I might be one of them. Either way, the fucks out there aren't going to like us once we're on the new juice." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceStimulantPower++, $cash -= _drugCost*_Env>>
+				"Sure, boss." she says, nodding. "Expanding the facilities here should help us support more cool shit." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _Barracks++, $cash -=  _arcCost*_Env>>
 			<</replace>>
-		<</link>> // Costs ¤<<print _drugCost*_Env>> //
-	<<elseif $securityForceStimulantPower == 5 || $securityForceStimulantPower == 9>>
-		<br>//$securityForceName has fully upgraded the stimulant lab to support it's activities.//
-	<</if>>
-			
-	<<if $securityForceVehiclePower < 5 && $securityForceArcologyUpgrades >= 1>>
-		<br><<link "Garage">>
+			<</link>> // Costs ¤<<print _arcCost*_Env>> //
+		<<elseif _Barracks == 13>>
+			<br><<link "Barracks">>
 			<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "Some new wheels should help a lot." She laughs. "The scum out there don't seem to like it when we roll up on them in something better than their piece of shit junkers." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceVehiclePower++, $cash -= 60000*_Env>>
+				"Sure, boss." she says, nodding. "Expanding the facilities here should help us support more cool shit." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _Barracks++, $cash -=  _arcCost*_Env>>
 			<</replace>>
-		<</link>>// Costs ¤60000*_Env //
-	<<elseif $securityForceVehiclePower < 7 && $securityForceArcologyUpgrades >= 5 && $securityForceAircraftPower >= 5 && $securityForceDronePower >= 5 && $securityForceStimulantPower >= 5 && $securityForceInfantryPower >= 5>>
-		<<if $securityForceVehiclePower < 6>>
-			<<set _vehCost = 2500000>>
-		<<elseif $securityForceVehiclePower == 6>>
-			<<set _vehCost = 3000000>>
+			<</link>> // Costs ¤<<print _arcCost*_Env>> //
+		<</if>>
+		<<if _Barracks == 5 || _Barracks == 16>>
+			<br>//$securityForceName has fully upgraded the barracks to support it's activities//
 		<</if>>
-		<br><<link "Garage">>
-			<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "Some new wheels should help a lot." She laughs. "The scum out there don't seem to like it when we roll up on them in something better than their piece of shit junkers." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceVehiclePower++, $cash -= _vehCost*_Env>>
-			<</replace>>
-		<</link>> // Costs ¤<<print _vehCost*_Env>> //
-	<</if>>
-	<<if $securityForceVehiclePower == 5 || $securityForceVehiclePower == 7>>
-		<br>//$securityForceName has fully upgraded the vehicle fleet to support it's activities.//
-	<<else>>
-		<br>//More barracks infrastructure upgrades are needed before the vehicle fleet can be expanded.//
-	<</if>>
-		
-	<<if $securityForceArcologyUpgrades >= 4>> 
-	<<if _Hangar < 27>>
-	<br><<link "Hangar">>
-	<<replace "#resultX">>
-		<br><br>"Which unit do you wish to upgrade or 'borrow'?"
-	<span id="resultY">
-	<<link "Go back">>
-		<<goto "SFM Barracks">>
-	<</link>>
 		
-		<<if $securityForceAircraftPower < 5>>
-			<br><<link "Light and medium aircraft">>
-				<<replace "#resultY">>
-				"Sure, boss." she says, nodding. "Some new VTOLs would be great." She laughs. "They're the real multiplier over the scum out there. Not much a looter gang can do against air support." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceAircraftPower++, $cash -= 70000*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print 70000*_Env>> //
-		<<elseif $securityForceAircraftPower < 8 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceDronePower >= 5>>
-			<<if $securityForceAircraftPower == 5>>
-				<<set _airCost = 2750000>>
-			<<elseif $securityForceAircraftPower == 6>>
-				<<set _airCost = 3250000>>
-			<<elseif $securityForceAircraftPower == 7>>
-				<<set _airCost = 5750000>>	
-			<</if>>
-			<br><<link "Light and medium aircraft">>
-				<<replace "#resultY">>
-				"Sure, boss." she says, nodding. "Some new VTOLs would be great." She laughs. "They're the real multiplier over the scum out there. Not much a looter gang can do against air support." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceAircraftPower++, $cash -= _airCost*_Env>>
+		/*
+		<<if $FacilitySupport == 0>>
+			<br><<link "Facility Support">>
+				<<replace "#resultX">>
+				"Sure, boss." she says, nodding. "Creating  a specialised area for any slaves you send to assist us will benefical to everyone."
+				<<set $securityForceUpgradeToken = 1, _Armoury++, $cash -= 150000000*_Env*(_SFNO/100 || _SFO/100)>>
 				<</replace>>
-			<</link>> // Costs ¤<<print  _airCost*_Env>> //
-		<</if>>
-		<<if $securityForceAircraftPower == 5 || $securityForceAircraftPower == 8>>
-			<br>$securityForceName has fully upgraded the air fleet to support it's activities.//
-		<<else>>
-			<br>//More barracks infrastructure upgrades are needed before the air fleet can be expanded.//
+			<</link>> // Costs ¤<<print 150000000*_Env*(_SFNO/100 || _SFO/100)>> //
 		<</if>>
+		*/
 				
-		<<if $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceVehiclePower >= 5 && $securityForceDronePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceSpacePlanePower < 1>>
-			<br><<link "A space plane">>
-				<<replace "#resultY">>
-				"Sure, boss." she says, nodding. "A orbital plane should help a lot." She laughs. "The scum out there don't seem to like it when we have eyes they can't hit." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceSpacePlanePower++, $cash -= 4750000*_Env>>
+		<<if _Armoury < 5>>
+			<br><<link "Armoury">>
+				<<replace "#resultX">>
+				"Sure, boss." she says, nodding. "The boys'll like having some new guns and armour to help them out there." She laughs. "Don't think the poor bastards they'll be shooting will thank you though." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _Armoury++, $cash -= 40000*_Env>>
 				<</replace>>
-			<</link>> // Costs ¤<<print 4750000*_Env>> //
-		<<elseif $securityForceSpacePlanePower >= 1 && $securityForceSpacePlanePower < 11>>
-			<<if $securityForceSpacePlanePower < 4>>
-				<<set _spCost = 50000000>>
-			<<elseif $securityForceSpacePlanePower == 4>>
-				<<set _spCost = 75000000>>
-			<<elseif $securityForceSpacePlanePower == 5>>
-				<<set _spCost = 85000000>>
-			<<elseif $securityForceSpacePlanePower == 6>>
-				<<set _spCost = 95000000>>
-			<<elseif $securityForceSpacePlanePower == 7>>
-				<<set _spCost = 125000000>>
-			<<elseif $securityForceSpacePlanePower == 8>>
-				<<set _spCost = 175000000>>
-			<<elseif $securityForceSpacePlanePower == 9>>
-				<<set _spCost = 250000000>>
-			<<elseif $securityForceSpacePlanePower == 10>>
-				<<set _spCost = 350000000>>
-			<</if>>
-			<br><<link "Space plane">>
-				<<replace "#resultY">>
-				"Sure, boss." she says, nodding. "Upgrading the orbital plane should help a lot." She laughs. "The scum out there don't seem to like it when we have eyes they can't hit." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceSpacePlanePower++, $cash -= _spCost*_Env>>
+			<</link>> // Costs ¤<<print 40000*_Env>> //<br>
+		<<elseif _Armoury < 11 && $securityForceVehiclePower >= 5 && _DroneBay >= 5 && $securityForceAircraftPower >= 5 && _StimulantLab >= 5 && _Barracks >= 5>>
+			<br><<link "Armoury">>
+				<<replace "#resultX">>
+					"Sure, boss." she says, nodding. "The boys'll like having some new guns and armour to help them out there." She laughs. "Don't think the poor bastards they'll be shooting will thank you though." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _Armoury++, $cash -= 4500000*_Env>>
 				<</replace>>
-			<</link>> // Costs ¤<<print  _spCost*_Env>> //
+			<</link>> // Costs ¤<<print 4500000*_Env>> //
 		<</if>>
-		<<if $securityForceSpacePlanePower == 11>>
-			<br>//$securityForceName has fully upgraded the space plane to support it's activities.//
+		<<if _Armoury == 5 || _Armoury == 11>>
+			<br>//$securityForceName has fully upgraded the armoury to support it's activities.//
 		<</if>>
-				
-		<<if $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceVehiclePower >= 5 && $securityForceDronePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceFortressZeppelin < 1>>
-			<br><<link "A fortress zeppelin">>
-				<<replace "#resultY">>
-				"Sure, boss." she says, nodding. "A fortress zeppelin would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceFortressZeppelin++, $cash -= 30000000*_Env>>
-				<</replace>><</link>> // Costs ¤<<print 30000000*_Env>> //
-		<<elseif $securityForceFortressZeppelin >= 1 && $securityForceFortressZeppelin < 3>>
-			<br><<link "Fortress zeppelin">>
-				<<replace "#resultY">>
-				"Sure, boss." she says, nodding. "Upgrading the Fortress Zeppelin, should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceFortressZeppelin++, $cash -= 20000000*_Env>>
+		
+			<<if _StimulantLab < 5>>
+			<br><<link "Stimulant Lab">>
+				<<replace "#resultX">>
+				"Sure, boss." she says, nodding. "The boys are going to like hearing that they'll be getting new stims. Some of them can't get enough." She laughs, sweeping her arm at a corner of the throne, where dozens of empty stimulant injectors are piled. "I might be one of them. Either way, the fucks out there aren't going to like us once we're on the new juice." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _StimulantLab++, $cash -= 40000*_Env>>
 				<</replace>>
-			<</link>> // Costs ¤<<print  20000000*_Env>> //
-		<</if>>
-		<<if $securityForceFortressZeppelin == 3>>
-			<br>//$securityForceName has fully upgraded the fortress zeppelin to support it's activities.//
-		<</if>>
-
-		<<if $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceVehiclePower >= 5 && $securityForceDronePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceAC130 < 1>>
-			<br><<link "An AC-130">>
-				<<replace "#resultY">>
-				"Sure, boss." she says, nodding. "An AC-130 would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceAC130++, $cash -= 35000000*_Env>>
+			<</link>> // Costs ¤<<print 40000*_Env>> //<br>
+		<<elseif _StimulantLab > 5 && _StimulantLab < 9 && _Barracks >= 5 && $securityForceVehiclePower >= 5 && _Armoury >= 5 && _DroneBay >= 5 && $securityForceAircraftPower >= 5>>
+			<<if _StimulantLab == 6>>
+				<<set _drugCost = 2265000>>
+			<<elseif _StimulantLab == 7>>
+				<<set _drugCost = 200000000000>>
+			<<elseif _StimulantLab == 8>>
+				<<set _drugCost = 250000000000>>
+			<</if>>
+			<br><<link "Stimulant Lab">>
+				<<replace "#resultX">>
+				"Sure, boss." she says, nodding. "The boys are going to like hearing that they'll be getting new stims. Some of them can't get enough." She laughs, sweeping her arm at a corner of the throne, where dozens of empty stimulant injectors are piled. "I might be one of them. Either way, the fucks out there aren't going to like us once we're on the new juice." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _StimulantLab++, $cash -= _drugCost*_Env>>
 				<</replace>>
-			<</link>> // Costs ¤<<print 35000000*_Env>> //
-		<<elseif $securityForceAC130 > 1 && $securityForceAC130 < 5>>
-			<br><<link "AC-130">>
-				<<replace "#resultY">>
-				"Sure, boss." she says, nodding. "Upgrading the AC-130, should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceAC130++, $cash -= 25000000*_Env>>
+			<</link>> // Costs ¤<<print _drugCost*_Env>> //
+		<<elseif _StimulantLab == 7 && _Armoury >= 11 && $securityForceVehiclePower >= 7 && $securityForceAircraftPower >= 8 && $securityForceSpacePlanePower >= 11 && $securityForceFortressZeppelin >= 3 && $securityForceAC130 >= 5 && _DroneBay >= 6 && $securityForceSatalitePower >= 16 && _Barracks >= 13>>
+			<br><<link "Stimulant Lab">>
+				<<replace "#resultX">>
+				"Sure, boss." she says, nodding. "The boys are going to like hearing that they'll be getting new stims. Some of them can't get enough." She laughs, sweeping her arm at a corner of the throne, where dozens of empty stimulant injectors are piled. "I might be one of them. Either way, the fucks out there aren't going to like us once we're on the new juice." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _StimulantLab++, $cash -= _drugCost*_Env>>
 				<</replace>>
-			<</link>> // Costs ¤<<print 25000000*_Env>> //
+			<</link>> // Costs ¤<<print _drugCost*_Env>> //
 		<</if>>
-		<<if $securityForceAC130 == 5>>
-			<br>//$securityForceName has fully upgraded the AC-130 to support it's activities.//
+		<<if _StimulantLab == 5 || _StimulantLab == 9>>
+			<br>//$securityForceName has fully upgraded the stimulant lab to support it's activities.//
 		<</if>>
-	
-	</span>
-	<</replace>>
-	<</link>>
-	<</if>>
-	<</if>>
-	<<if _Hangar >= 27>>//<br>$securityForceName has fully upgraded the hangar to support it's activities.//<</if>>
-	
-	<<if $securityForceDronePower < 5 && $securityForceArcologyUpgrades >= 2>>
-		<br><<link "Drone bay">>
-			<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "Some new drones would be nice." She laughs. "The poor bastards out there shit themselves when they see combat drones fly over the horizon." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceDronePower++, $cash -= 45000*_Env>>
-			<</replace>>
-		<</link>> // Costs ¤<<print 45000*_Env>> //
-	<<elseif $securityForceDronePower < 6 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5>>
-		<br><<link "Drone bay">>
-			<<replace "#resultX">>
-			"Sure, boss." she says, nodding. "Some new drones would be nice." She laughs. "The poor bastards out there shit themselves when they see combat drones fly over the horizon." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-			<<set $securityForceUpgradeToken = 1, $securityForceDronePower++, $cash -= 2000000*_Env>>
-			<</replace>>
-		<</link>> // Costs ¤<<print  2000000*_Env>> //
-	<</if>>
-	<<if $securityForceDronePower == 5 || $securityForceDronePower == 6>>
-		<br>//$securityForceName has fully upgraded the drone bay to support it's activities.//
-	<<else>>
-		<br>//More barracks infrastructure upgrades are needed before the drone bay can be expanded.//
-	<</if>>
-
-<<if $securityForceArcologyUpgrades >= 4>>
-<<if _LaunchBayNO < 29 || _LaunchBayO < 17>>
-	<br><<link "Launch Bay">>
-	<<replace "#resultX">>
-	<br><br>"Which unit do you wish to upgrade or 'borrow'?"
-	<span id="resultZ">
-	<<link "Go back">>
-		<<goto "SFM Barracks">>
-	<</link>>
+				
+		<<if _Barracks >= 1>>
+		<<if _Garage < _GarageMax>>
+		<br><<link "Garage">>
+		<<replace "#resultX">>
+			<br><br>"Which unit do you wish to upgrade or 'borrow'?"
+		<span id="resultB">
+		<<link "Go back">>
+			<<goto "SFM Barracks">>
+		<</link>>	
 		
-		<<if $securityForceArcologyUpgrades >= 4 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceVehiclePower >= 5 && $securityForceDronePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceSatalitePower < 1>>
-			<br><<link "A satalite">>
-				<<replace "#resultZ">>
-				"Sure, boss." she says, nodding. "A satalite should help a lot." She laughs. "The scum out there don't seem to like it when we have eyes they can't hit." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceSatalitePower++, $cash -= 3750000*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print 3750000*_Env>> //
-		<<elseif $securityForceSatalitePower >= 1 && $securityForceSatalitePower < 17>>
-			<<if $securityForceSatalitePower < 11>>
-				<<set _satCost = 2350000>>
-			<<elseif $securityForceSatalitePower == 11>>
-				<<set _satCost = 150000000>>
-			<<elseif $securityForceSatalitePower == 12>>
-				<<set _satCost = 160000000>>
-			<<elseif $securityForceSatalitePower == 13>>
-				<<set _satCost = 170000000>>
-			<<elseif $securityForceSatalitePower == 14>>
-				<<set _satCost = 180000000>>
-			<<elseif $securityForceSatalitePower == 15>>
-				<<set _satCost = 190000000>>
-			<<elseif $securityForceSatalitePower == 16>>
-				<<set _satCost = 250000000000>>
+			<<if $securityForceVehiclePower < 5>>
+				<br><<link "Light and medium vehicles">>
+					<<replace "#resultB">>
+					"Sure, boss." she says, nodding. "Some new wheels should help a lot." She laughs. "The scum out there don't seem to like it when we roll up on them in something better than their piece of shit junkers." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceVehiclePower++, $cash -= 60000*_Env>>
+					<</replace>>
+				<</link>>// Costs ¤<<print 60000*_Env>> //
+			<<elseif $securityForceVehiclePower < 7 && _Barracks >= 5 && $securityForceAircraftPower >= 5 && _DroneBay >= 5 && _StimulantLab >= 5 && _Armoury >= 5>>
+				<<if $securityForceVehiclePower < 6>>
+					<<set _vehCost = 2500000>>
+				<<elseif $securityForceVehiclePower == 6>>
+					<<set _vehCost = 3000000>>
+				<</if>>
+				<br><<link "Light and medium vehicles">>
+					<<replace "#resultX">>
+					"Sure, boss." she says, nodding. "Some new wheels should help a lot." She laughs. "The scum out there don't seem to like it when we roll up on them in something better than their piece of shit junkers." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceVehiclePower++, $cash -= _vehCost*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print _vehCost*_Env>> //
 			<</if>>
-			<br><<link "Satalite">>
-				<<replace "#resultZ">>
-				"Sure, boss." she says, nodding. "Upgrading the satalite should help a lot." She laughs. "The scum out there don't seem to like it when we have eyes they can't hit." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceSatalitePower++, $cash -= _satCost*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print _satCost*_Env>> //
-	<</if>>
-		<<if $securityForceSatalitePower == 17>>
-			<br>//$securityForceName has fully upgraded the satalite to support it's activities.//
-		<</if>>
-				
-	<<if $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceDronePower >= 5 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceGiantRobot < 1 && $terrain != "oceanic">>
-			<br><<link "A giant robot">>
-				<<replace "#resultZ">>
-				"Sure, boss." she says, nodding. "A giant robot would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceGiantRobot++, $cash -= 50000000*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print 50000000*_Env>> //
-	<<elseif $securityForceGiantRobot > 0 && $securityForceGiantRobot < 10>>
-			<<if $securityForceGiantRobot < 3>>
-				<<set _robCost = 25000000>>
-			<<elseif $securityForceGiantRobot == 3>>
-				<<set _robCost = 45000000>>
-			<<elseif $securityForceGiantRobot == 4>>
-				<<set _robCost = 45000000>>
-			<<elseif $securityForceGiantRobot == 5>>
-				<<set _robCost = 65000000>>
-			<<elseif $securityForceGiantRobot == 6>>
-				<<set _robCost = 85000000>>
-			<<elseif $securityForceGiantRobot == 7>>
-				<<set _robCost = 95000000>>
-			<<elseif $securityForceGiantRobot == 8>>
-				<<set _robCost = 105000000>>
-			<<elseif $securityForceGiantRobot == 9>>
-				<<set _robCost = 2750000000>>
+			<<if $securityForceVehiclePower == 5 || $securityForceVehiclePower == 7>>
+				<br>//$securityForceName has fully upgraded the vehicle fleet to support it's activities.//
+			<<else>>
+				<br>//More barracks infrastructure upgrades are needed before the vehicle fleet can be expanded.//
 			<</if>>
-			<br><<link "Giant robot">>
-				<<replace "#resultZ">>
-				"Sure, boss." she says, nodding. "Upgrading the giant robot, should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceGiantRobot++, $cash -= _robCost*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print _robCost*_Env>> //
-	<</if>>
-		<<if $securityForceGiantRobot == 10>>
-			<br>//$securityForceName has fully upgraded the giant robot to support it's activities.//
+			
+			<<if $securityForceHeavyBattleTank < 1 && $securityForceVehiclePower >= 7>>
+					<br><<link "A heavy battle tank">>
+					<<replace "#resultB">>
+					"Sure, boss." she says, nodding. "A heavy battle tank should help a lot." She laughs. "The scum out there don't seem to like it when we roll up on them in something better than their piece of shit junkers." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceHeavyBattleTank++, $cash -= 60000000*_Env>>
+					<</replace>>
+				<</link>>// Costs ¤<<print 60000000*_Env>> //
+			<<elseif $securityForceHeavyBattleTank >= 1>>
+				<<if $securityForceHeavyBattleTank < 2>>
+					<<set _hbtCost = 75000000>>
+				<<elseif $securityForceHeavyBattleTank == 3>>
+					<<set _hbtCost = 8500000>>
+				<</if>>
+				<br><<link "heavy battle tank">>
+				<<replace "#resultB">>
+					"Sure, boss." she says, nodding. "Upgrading the heavy battle tank should help a lot." She laughs. "The scum out there don't seem to like it when we roll up on them in something better than their piece of shit junkers." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceHeavyBattleTank++, $cash -= _hbtCost*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print _hbtCost*_Env>> //
+			<</if>>
+			<<if $securityForceHeavyBattleTank == 3>>
+				<br>//$securityForceName has fully upgraded the heavy battle tank to support it's activities.//
+			<</if>>
+			
+		</span>
+		<</replace>>
+		<</link>>
 		<</if>>
-		
-	<<if $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceDronePower >= 5 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceMissileSilo < 1 && $terrain != "oceanic">>
-			<br><<link "A missile silo">>
-				<<replace "#resultZ">>
-				"Sure, boss." she says, nodding. "A missile silo would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceMissileSilo++, $cash -= 200000000*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print 200000000*_Env>> //
-	<<elseif $securityForceMissileSilo > 0 && $securityForceMissileSilo < 3>>
-			<<if $securityForceMissileSilo == 1>>
-				<<set _msCost = 250000000>>
-			<<elseif $securityForceMissileSilo == 2>>
-				<<set _msCost = 295000000>>
+		<</if>>
+		<<if _Garage >= _GarageMax>>//<br>$securityForceName has fully upgraded the garage to support it's activities.//<</if>>
+			
+		<<if _Barracks >= 4>> 
+		<<if _Hangar < _HangarMax>>
+		<br><<link "Hangar">>
+		<<replace "#resultX">>
+			<br><br>"Which unit do you wish to upgrade or 'borrow'?"
+		<span id="resultY">
+		<<link "Go back">>
+			<<goto "SFM Barracks">>
+		<</link>>
+			
+			<<if $securityForceAircraftPower < 5>>
+				<br><<link "Light and medium aircraft">>
+					<<replace "#resultY">>
+					"Sure, boss." she says, nodding. "Some new VTOLs would be great." She laughs. "They're the real multiplier over the scum out there. Not much a looter gang can do against air support." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceAircraftPower++, $cash -= 70000*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print 70000*_Env>> //
+			<<elseif $securityForceAircraftPower < 8 && _StimulantLab >= 5 && _Barracks >= 5 && $securityForceVehiclePower >= 5 && _Armoury >= 5 && _DroneBay >= 5>>
+				<<if $securityForceAircraftPower == 5>>
+					<<set _airCost = 2750000>>
+				<<elseif $securityForceAircraftPower == 6>>
+					<<set _airCost = 3250000>>
+				<<elseif $securityForceAircraftPower == 7>>
+					<<set _airCost = 5750000>>	
+				<</if>>
+				<br><<link "Light and medium aircraft">>
+					<<replace "#resultY">>
+					"Sure, boss." she says, nodding. "Some new VTOLs would be great." She laughs. "They're the real multiplier over the scum out there. Not much a looter gang can do against air support." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceAircraftPower++, $cash -= _airCost*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print  _airCost*_Env>> //
+			<</if>>
+			<<if $securityForceAircraftPower == 5 || $securityForceAircraftPower == 8>>
+				<br>$securityForceName has fully upgraded the air fleet to support it's activities.//
+			<<else>>
+				<br>//More barracks infrastructure upgrades are needed before the air fleet can be expanded.//
+			<</if>>
+					
+			<<if $securityForceAircraftPower >= 5 && _StimulantLab >= 5 && _Barracks >= 5 && $securityForceVehiclePower >= 5 && _DroneBay >= 5 && _Armoury >= 5 && $securityForceSpacePlanePower < 1>>
+				<br><<link "A space plane">>
+					<<replace "#resultY">>
+					"Sure, boss." she says, nodding. "A orbital plane should help a lot." She laughs. "The scum out there don't seem to like it when we have eyes they can't hit." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceSpacePlanePower++, $cash -= 4750000*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print 4750000*_Env>> //
+			<<elseif $securityForceSpacePlanePower >= 1>>
+				<<if $securityForceSpacePlanePower < 4>>
+					<<set _spCost = 50000000>>
+				<<elseif $securityForceSpacePlanePower == 4>>
+					<<set _spCost = 75000000>>
+				<<elseif $securityForceSpacePlanePower == 5>>
+					<<set _spCost = 85000000>>
+				<<elseif $securityForceSpacePlanePower == 6>>
+					<<set _spCost = 95000000>>
+				<<elseif $securityForceSpacePlanePower == 7>>
+					<<set _spCost = 125000000>>
+				<<elseif $securityForceSpacePlanePower == 8>>
+					<<set _spCost = 175000000>>
+				<<elseif $securityForceSpacePlanePower == 9>>
+					<<set _spCost = 250000000>>
+				<<elseif $securityForceSpacePlanePower == 10>>
+					<<set _spCost = 350000000>>
+				<</if>>
+				<br><<link "Space plane">>
+					<<replace "#resultY">>
+					"Sure, boss." she says, nodding. "Upgrading the orbital plane should help a lot." She laughs. "The scum out there don't seem to like it when we have eyes they can't hit." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceSpacePlanePower++, $cash -= _spCost*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print  _spCost*_Env>> //
+			<</if>>
+			<<if $securityForceSpacePlanePower == 11>>
+				<br>//$securityForceName has fully upgraded the space plane to support it's activities.//
+			<</if>>
+					
+			<<if $securityForceAircraftPower >= 5 && _StimulantLab >= 5 && _Barracks >= 5 && $securityForceVehiclePower >= 5 && _DroneBay >= 5 && _Armoury >= 5 && $securityForceFortressZeppelin < 1>>
+				<br><<link "A fortress zeppelin">>
+					<<replace "#resultY">>
+					"Sure, boss." she says, nodding. "A fortress zeppelin would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceFortressZeppelin++, $cash -= 30000000*_Env>>
+					<</replace>><</link>> // Costs ¤<<print 30000000*_Env>> //
+			<<elseif $securityForceFortressZeppelin >= 1>>
+				<br><<link "Fortress zeppelin">>
+					<<replace "#resultY">>
+					"Sure, boss." she says, nodding. "Upgrading the Fortress Zeppelin, should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceFortressZeppelin++, $cash -= 20000000*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print  20000000*_Env>> //
+			<</if>>
+			<<if $securityForceFortressZeppelin == 3>>
+				<br>//$securityForceName has fully upgraded the fortress zeppelin to support it's activities.//
+			<</if>>
+
+			<<if $securityForceAircraftPower >= 5 && _StimulantLab >= 5 && _Barracks >= 5 && $securityForceVehiclePower >= 5 && _DroneBay >= 5 && _Armoury >= 5 && $securityForceAC130 < 1>>
+				<br><<link "An AC-130">>
+					<<replace "#resultY">>
+					"Sure, boss." she says, nodding. "An AC-130 would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceAC130++, $cash -= 35000000*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print 35000000*_Env>> //
+			<<elseif $securityForceAC130 > 1 && $securityForceAC130 < 5>>
+				<br><<link "AC-130">>
+					<<replace "#resultY">>
+					"Sure, boss." she says, nodding. "Upgrading the AC-130, should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+					<<set $securityForceUpgradeToken = 1, $securityForceAC130++, $cash -= 25000000*_Env>>
+					<</replace>>
+				<</link>> // Costs ¤<<print 25000000*_Env>> //
+			<</if>>
+			<<if $securityForceAC130 == 5>>
+				<br>//$securityForceName has fully upgraded the AC-130 to support it's activities.//
 			<</if>>
-			<br><<link "Missile silo">>
-				<<replace "#resultZ">>
-				"Sure, boss." she says, nodding. "Upgrading the missile silo, should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceMissileSilo++, $cash -= _msCost*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print _msCost*_Env>> //
-	<</if>>
-		<<if $securityForceMissileSilo == 3>><br>//$securityForceName has fully upgraded the missile silo to support it's activities.//<</if>>
 		
-	</span>
-	<</replace>>
-	<</link>>
-<<elseif _LaunchBayNO >= 29 || _LaunchBayO >= 17>>//<br>$securityForceName has fully upgraded the launch bay to support it's activities.//
-<</if>>
-	
-<<if $terrain == "oceanic">>
-<<if $securityForceAircraftCarrier+$securityForcesubmarine+$securityForceHeavyAmphibiousTransport < 12>>
-	<br><<link "Naval Yard">>
-	<<replace "#resultX">>
-			"Which unit do you wish to upgrade or 'borrow'?"
-	<span id="resultA">
-	<<link "Go back">>
-		<<goto "SFM Barracks">>
-	<</link>>
-	
-		<<if $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceDronePower >= 5 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceAircraftCarrier < 1>>
-			<br><<link "An aircraft carrier">>
-				<<replace "#resultA">>
-				"Sure, boss." she says, nodding. "An aircraft carrier would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceAircraftCarrier++, $cash -= 1500000*_Env>>
-				<</replace>>
-			<</link>> // Costs 1500000*_Env>> //
-		<<elseif $securityForceAircraftCarrier < 4 && $securityForceAircraftCarrier > 0>>
-			<br><<link "Aircraft carrier">>
-				<<replace "#resultA">>
-				"Sure, boss." she says, nodding. "Upgrading the aircraft carrier should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceAircraftCarrier++, $cash -= 25000000*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print 25000000*_Env>> //
+		</span>
+		<</replace>>
+		<</link>>
 		<</if>>
-		<<if $securityForceAircraftCarrier == 4>>
-			<br>//$securityForceName has fully upgraded the aircraft carrier to support it's activities.//
 		<</if>>
-			
-		<<if $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceDronePower >= 5 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForcesubmarine < 1>>
-			<br><<link "A submarine">>
-				<<replace "#resultA">>
-				"Sure, boss." she says, nodding. "A submarine would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForcesubmarine++, $cash -= 1500000*_Env>>
+		<<if _Hangar >= _HangarMax>>//<br>$securityForceName has fully upgraded the hangar to support it's activities.//<</if>>
+		
+		<<if _DroneBay < 5 && _Barracks >= 2>>
+			<br><<link "Drone bay">>
+				<<replace "#resultX">>
+				"Sure, boss." she says, nodding. "Some new drones would be nice." She laughs. "The poor bastards out there shit themselves when they see combat drones fly over the horizon." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _DroneBay++, $cash -= 45000*_Env>>
 				<</replace>>
-			<</link>> // Costs ¤<<print 1500000*_Env>> //
-		<<elseif $securityForcesubmarine < 5 && $securityForcesubmarine > 0>>
-			<<if $securityForcesubmarine < 4>>
-				<<set _subCost = 25000000>>
-			<<elseif $securityForcesubmarine == 4>>
-				<<set _subCost = 85000000>>
-			<</if>>
-			<br><<link "Submarine">>
-				<<replace "#resultA">>
-				"Sure, boss." she says, nodding. "Upgrading the submarine, should help us gain a massive 	advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForcesubmarine++, $cash -= _subCost*_Env>>
+			<</link>> // Costs ¤<<print 45000*_Env>> //
+		<<elseif _DroneBay < 6 && $securityForceAircraftPower >= 5 && _StimulantLab >= 5 && _Barracks >= 5 && $securityForceVehiclePower >= 5 && _Armoury >= 5>>
+			<br><<link "Drone bay">>
+				<<replace "#resultX">>
+				"Sure, boss." she says, nodding. "Some new drones would be nice." She laughs. "The poor bastards out there shit themselves when they see combat drones fly over the horizon." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+				<<set $securityForceUpgradeToken = 1, _DroneBay++, $cash -= 2000000*_Env>>
 				<</replace>>
-			<</link>> // Costs ¤<<print _subCost*_Env>> //
+			<</link>> // Costs ¤<<print  2000000*_Env>> //
 		<</if>>
-		<<if $securityForcesubmarine == 5>>
-			<br>//$securityForceName has fully upgraded the submarine to support it's activities.//
+		<<if _DroneBay == 5 || _DroneBay == 6>>
+			<br>//$securityForceName has fully upgraded the drone bay to support it's activities.//
+		<<else>>
+			<br>//More barracks infrastructure upgrades are needed before the drone bay can be expanded.//
 		<</if>>
 
-		<<if $securityForceVehiclePower >= 5 && $securityForceInfantryPower >= 5 && $securityForceDronePower >= 5 && $securityForceAircraftPower >= 5 && $securityForceStimulantPower >= 5 && $securityForceArcologyUpgrades >= 5 && $securityForceHeavyAmphibiousTransport < 1>>
-			<br><<link "A heavy amphibious transport">>
-				<<replace "#resultA">>
-				"Sure, boss." she says, nodding. "A heavy amphibious transport would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceHeavyAmphibiousTransport++, $cash -= 1500000*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print 50000000*_Env>> //
-		<<elseif $securityForceHeavyAmphibiousTransport < 3 && $securityForceHeavyAmphibiousTransport > 0>>
-			<<elseif $securityForceHeavyAmphibiousTransport == 1>>
-				<<set _hatCost = 150000000>>
-			<<elseif $securityForceHeavyAmphibiousTransport == 2>>
-				<<set _hatCost = 250000000>>
+		<<if _Barracks >= 4>>
+		<<if _LaunchBayNO < _LaunchBayNOMax || _LaunchBayO < _LaunchBayNOMax>>
+			<br><<link "Launch Bay">>
+			<<replace "#resultX">>
+			<br><br>"Which unit do you wish to upgrade or 'borrow'?"
+			<span id="resultZ">
+			<<link "Go back">>
+				<<goto "SFM Barracks">>
+			<</link>>
+				
+				<<if _Barracks >= 4 && $securityForceAircraftPower >= 5 && _StimulantLab >= 5 && _Barracks >= 5 && $securityForceVehiclePower >= 5 && _DroneBay >= 5 && _Armoury >= 5 && $securityForceSatalitePower < 1>>
+					<br><<link "A satalite">>
+						<<replace "#resultZ">>
+						"Sure, boss." she says, nodding. "A satalite should help a lot." She laughs. "The scum out there don't seem to like it when we have eyes they can't hit." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceSatalitePower++, $cash -= 3750000*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print 3750000*_Env>> //
+				<<elseif $securityForceSatalitePower >= 1>>
+					<<if $securityForceSatalitePower < 11>>
+						<<set _satCost = 2350000>>
+					<<elseif $securityForceSatalitePower == 11>>
+						<<set _satCost = 150000000>>
+					<<elseif $securityForceSatalitePower == 12>>
+						<<set _satCost = 160000000>>
+					<<elseif $securityForceSatalitePower == 13>>
+						<<set _satCost = 170000000>>
+					<<elseif $securityForceSatalitePower == 14>>
+						<<set _satCost = 180000000>>
+					<<elseif $securityForceSatalitePower == 15>>
+						<<set _satCost = 190000000>>
+					<<elseif $securityForceSatalitePower == 16>>
+						<<set _satCost = 250000000000>>
+					<</if>>
+					<br><<link "Satalite">>
+						<<replace "#resultZ">>
+						"Sure, boss." she says, nodding. "Upgrading the satalite should help a lot." She laughs. "The scum out there don't seem to like it when we have eyes they can't hit." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceSatalitePower++, $cash -= _satCost*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print _satCost*_Env>> //
 			<</if>>
-			<br><<link "Heavy amphibious transport">>
-				<<replace "#resultA">>
-				"Sure, boss." she says, nodding. "Upgrading the heavy amphibious transport, should help us gain a massive 	advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
-				<<set $securityForceUpgradeToken = 1, $securityForceHeavyAmphibiousTransport++, $cash -= _hatCost*_Env>>
-				<</replace>>
-			<</link>> // Costs ¤<<print _hatCost*_Env>> //
+				<<if $securityForceSatalitePower == 17>>
+					<br>//$securityForceName has fully upgraded the satalite to support it's activities.//
+				<</if>>
+						
+			<<if $securityForceVehiclePower >= 5 && _Armoury >= 5 && _DroneBay >= 5 && $securityForceAircraftPower >= 5 && _StimulantLab >= 5 && _Barracks >= 5 && $securityForceGiantRobot < 1 && $terrain != "oceanic">>
+					<br><<link "A giant robot">>
+						<<replace "#resultZ">>
+						"Sure, boss." she says, nodding. "A giant robot would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceGiantRobot++, $cash -= 50000000*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print 50000000*_Env>> //
+			<<elseif $securityForceGiantRobot >= 1>>
+					<<if $securityForceGiantRobot < 3>>
+						<<set _robCost = 25000000>>
+					<<elseif $securityForceGiantRobot == 3>>
+						<<set _robCost = 45000000>>
+					<<elseif $securityForceGiantRobot == 4>>
+						<<set _robCost = 45000000>>
+					<<elseif $securityForceGiantRobot == 5>>
+						<<set _robCost = 65000000>>
+					<<elseif $securityForceGiantRobot == 6>>
+						<<set _robCost = 85000000>>
+					<<elseif $securityForceGiantRobot == 7>>
+						<<set _robCost = 95000000>>
+					<<elseif $securityForceGiantRobot == 8>>
+						<<set _robCost = 105000000>>
+					<<elseif $securityForceGiantRobot == 9>>
+						<<set _robCost = 2750000000>>
+					<</if>>
+					<br><<link "Giant robot">>
+						<<replace "#resultZ">>
+						"Sure, boss." she says, nodding. "Upgrading the giant robot, should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceGiantRobot++, $cash -= _robCost*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print _robCost*_Env>> //
+			<</if>>
+				<<if $securityForceGiantRobot == 10>>
+					<br>//$securityForceName has fully upgraded the giant robot to support it's activities.//
+				<</if>>
+				
+			<<if $securityForceVehiclePower >= 5 && _Armoury >= 5 && _DroneBay >= 5 && $securityForceAircraftPower >= 5 && _StimulantLab >= 5 && _Barracks >= 5 && $securityForceMissileSilo < 1 && $terrain != "oceanic">>
+					<br><<link "A missile silo">>
+						<<replace "#resultZ">>
+						"Sure, boss." she says, nodding. "A missile silo would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceMissileSilo++, $cash -= 200000000*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print 200000000*_Env>> //
+			<<elseif $securityForceMissileSilo >= 1>>
+					<<if $securityForceMissileSilo == 1>>
+						<<set _msCost = 250000000>>
+					<<elseif $securityForceMissileSilo == 2>>
+						<<set _msCost = 295000000>>
+					<</if>>
+					<br><<link "Missile silo">>
+						<<replace "#resultZ">>
+						"Sure, boss." she says, nodding. "Upgrading the missile silo, should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceMissileSilo++, $cash -= _msCost*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print _msCost*_Env>> //
+			<</if>>
+				<<if $securityForceMissileSilo == 3>><br>//$securityForceName has fully upgraded the missile silo to support it's activities.//<</if>>
+				
+			</span>
+			<</replace>>
+			<</link>>
 		<</if>>
-		<<if $securityForceHeavyAmphibiousTransport == 3>><br>//$securityForceName has fully upgraded the heavy amphibious transport to support it's activities.//<</if>>
-	
-	</span>
-	<</replace>>
-<</link>>
-<<elseif $securityForceAircraftCarrier+$securityForcesubmarine+$securityForceHeavyAmphibiousTransport >= 12>><br>//$securityForceName has fully upgraded the Naval Yard to support it's activities.//<</if>>
-<</if>>
+		<</if>>
+		<<if _LaunchBayNO >= _LaunchBayNOMax || _LaunchBayO >= _LaunchBayNOMax>>//<br>$securityForceName has fully upgraded the launch bay to support it's activities.//<</if>>
+
+		<<if _NavalYard < _NavalYardMax>>
+			<br>
+			<<link "Naval Yard">>
+			<<replace "#resultX">>
+				<br><br>"Which unit do you wish to upgrade or 'borrow'?"
+			<span id="resultA">
+				<<link "Go back">>
+					<<goto "SFM Barracks">>
+				<</link>>
+			
+				<<if $securityForceAircraftCarrier < 1>>
+					<br>
+					<<link "An aircraft carrier">>
+						<<replace "#resultA">>
+						"Sure, boss." she says, nodding. "An aircraft carrier would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceAircraftCarrier++, $cash -= 1500000*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print 1500000*_Env>> //
+				<<elseif $securityForceAircraftCarrier >= 1>>
+					<br>
+					<<link "Aircraft carrier">>
+						<<replace "#resultA">>
+						"Sure, boss." she says, nodding. "Upgrading the aircraft carrier should help us gain a massive advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceAircraftCarrier++, $cash -= 25000000*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print 25000000*_Env>> //
+				<</if>>
+				<<if $securityForceAircraftCarrier == 4>>
+					<br>//$securityForceName has fully upgraded the aircraft carrier to support it's activities.//
+				<</if>>
+					
+				<<if $securityForceSubmarine < 1>>
+					<br>
+					<<link "A submarine">>
+						<<replace "#resultA">>
+						"Sure, boss." she says, nodding. "A submarine would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceSubmarine++, $cash -= 1500000*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print 1500000*_Env>> //
+				<<elseif $securityForceSubmarine >= 1>>
+					<<if $securityForceSubmarine < 4>>
+						<<set _subCost = 25000000>>
+					<<elseif $securityForceSubmarine == 4>>
+						<<set _subCost = 85000000>>
+					<</if>>
+					<br>
+					<<link "Submarine">>
+						<<replace "#resultA">>
+						"Sure, boss." she says, nodding. "Upgrading the submarine, should help us gain a massive 	advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceSubmarine++, $cash -= _subCost*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print _subCost*_Env>> //
+				<</if>>
+				<<if $securityForceSubmarine == 5>><br>//$securityForceName has fully upgraded the submarine to support it's activities.//<</if>>
+				
+				<<if $securityForceHeavyAmphibiousTransport < 1>>
+					<br>
+					<<link "A heavy amphibious transport">>
+						<<replace "#resultA">>
+						"Sure, boss." she says, nodding. "A heavy amphibious transport would help a lot." She laughs. "The scum out there don't seem to like it when we have things that their shit equipment can't damage." She picks up a tablet and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceHeavyAmphibiousTransport++, $cash -= 1500000*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print 1500000*_Env>> //
+				<<elseif $securityForceHeavyAmphibiousTransport >= 1>>
+					<<if $securityForceHeavyAmphibiousTransport == 1>>
+						<<set _hatCost = 150000000>>
+					<<elseif $securityForceHeavyAmphibiousTransport == 2>>
+						<<set _hatCost = 250000000>>
+					<</if>>
+					<br>
+					<<link "Heavy amphibious transport">>
+						<<replace "#resultA">>
+						"Sure, boss." she says, nodding. "Upgrading the heavy amphibious transport, should help us gain a massive 	advantage." She laughs, picks up a tablet, and taps a few commands on it. "I'll get right on it."
+						<<set $securityForceUpgradeToken = 1, $securityForceHeavyAmphibiousTransport++, $cash -= _hatCost*_Env>>
+						<</replace>>
+					<</link>> // Costs ¤<<print _hatCost*_Env>> //
+				<</if>>
+				<<if $securityForceHeavyAmphibiousTransport == 3>><br>//$securityForceName has fully upgraded the heavy amphibious transport to support it's activities.//<</if>>
+				
+			</span>
+			<</replace>>
+			<</link>>
+		<</if>>
+		<<if _NavalYard >= _NavalYardMax>><br>$securityForceName has fully upgraded the naval yard to support it's activities.//<</if>>
 	
 </span>
 <</if>>
@@ -1553,4 +1642,4 @@ The Special Force (SF) is called <<textbox "$securityForceName" $securityForceNa
 <<link "Enter $facilitysupportName and send a slave to serve in the HQ and facilities of $securityForceName">>
 	<<goto "FacilitySupport">>
 <</link>>
-*/
+*/
\ No newline at end of file
diff --git a/src/uncategorized/securityForceEOWReport.tw b/src/uncategorized/securityForceEOWReport.tw
index 3186cd41e29..784a45e45f9 100644
--- a/src/uncategorized/securityForceEOWReport.tw
+++ b/src/uncategorized/securityForceEOWReport.tw
@@ -8,8 +8,9 @@ The upgrades are currently ordered as:
 		securityForceInfantryPower(11)
 	Stimulant Lab(9)
 		securityForceStimulantPower(9)
-	<<if $securityForceArcologyUpgrades >= 1>>Garage(7)
+	<<if $securityForceArcologyUpgrades >= 1>>Garage(10)
 		securityForceVehiclePower(7)
+		securityForceHeavyBattleTank(3)
 	<</if>>
 	<<if $securityForceArcologyUpgrades >= 4>>Hangar(27)
 		securityForceAircraftPower(8)
@@ -37,6 +38,18 @@ The upgrades are currently ordered as:
 		securityForceHeavyAmphibiousTransport (3)
 securityForceX 
 */
+<<set _Barracks = $securityForceArcologyUpgrades>>
+<<set _Armoury = $securityForceInfantryPower>>
+<<set _StimulantLab = $securityForceInfantryPower>>
+<<set _Garage = $securityForceVehiclePower+$securityForceHeavyBattleTank>>
+<<set _Hangar = $securityForceAircraftPower+$securityForceSpacePlanePower+$securityForceFortressZeppelin+$securityForceAC130>>
+<<set _DroneBay = $securityForceDronePower>>
+<<set _LaunchBayNO = $securityForceSatalitePower+$securityForceGiantRobot+$securityForceMissileSilo>>
+<<set _LaunchBayO = $securityForceSatalitePower>>
+<<if $terrain == "oceanic">>
+	<<set _NavalYard = $securityForceAircraftCarrier+$securityForceSubmarine+$securityForceHeavyAmphibiousTransport>>
+<</if>>
+
 <<silently>>
 /* Manpower Fluctuation Calculations - loss from attrition, random casualties, etc. Baseline is ~3%/week. Heavier for raiding/slaving, reduced for securing trade. Maxes out between 1000-1500, though never exactly that. If over 1500 for some reason, set to 1455-1495. If under 100, cannot fluctuate further negatively. */
 
@@ -101,32 +114,47 @@ securityForceX
 	<<set $securityForceRecruit = 10>>
 
 	/* Extra recruitment from upgrades, up to an extra 5 per upgrade track (10 for infantry), to a sum of an extra 35/week at full upgrades. */
-	<<if $securityForceArcologyUpgrades > 0>>
-		<<set $securityForceRecruit += ($securityForceArcologyUpgrades)>> <</if>>
-	<<if $securityForceInfantryPower > 0>>
-		<<set $securityForceRecruit += ($securityForceInfantryPower*2)>> <</if>>
-	<<if $securityForceStimulantPower > 0>>
-		<<set $securityForceRecruit += ($securityForceStimulantPower)>> <</if>>
-	<<if $securityForceVehiclePower > 0>>
-		<<set $securityForceRecruit += ($securityForceVehiclePower)>> <</if>>
-	<<if $securityForceAircraftPower > 0>>
-		<<set $securityForceRecruit += ($securityForceAircraftPower)>> <</if>>
-	<<if $securityForceDronePower > 0>>
-		<<set $securityForceRecruit += ($securityForceDronePower)>> <</if>>
-	<<if $securityForceSpacePlanePower > 0>>
-		<<set $securityForceRecruit += ($securityForceSpacePlanePower)>> <</if>>
-	<<if $securityForceSatalitePower > 0>>
-		<<set $securityForceRecruit += ($securityForceSatalitePower)>> <</if>>
-	<<if $securityForceGiantRobot > 0>>
-		<<set $securityForceRecruit += ($securityForceGiantRobot)>> <</if>>
-	<<if $securityForceAircraftCarrier > 0>>
-		<<set $securityForceRecruit += ($securityForceAircraftCarrier)>> <</if>>
-	<<if $securityForceSubmarine > 0>>
-		<<set $securityForceRecruit += ($securityForceSubmarine)>> <</if>>
-	<<if $securityForceFortressZeppelin > 0>>
-		<<set $securityForceRecruit += ($securityForceFortressZeppelin)>> <</if>>
-	<<if $securityForceAC130 > 0>>
-		<<set $securityForceRecruit += ($securityForceAC130)>> <</if>>
+		<<if $securityForceArcologyUpgrades > 0>>
+			<<set $securityForceRecruit += ($securityForceArcologyUpgrades)>> <</if>>
+		<<if $securityForceInfantryPower > 0>>
+			<<set $securityForceRecruit += ($securityForceInfantryPower*2)>> <</if>>
+		<<if $securityForceStimulantPower > 0>>
+			<<set $securityForceRecruit += ($securityForceStimulantPower)>> <</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 1>>
+		<<if $securityForceVehiclePower > 0>>
+			<<set $securityForceRecruit += ($securityForceVehiclePower)>> <</if>>
+	<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 4>>
+		<<if $securityForceAircraftPower > 0>>
+			<<set $securityForceRecruit += ($securityForceAircraftPower)>> <</if>>
+		<<if $securityForceSpacePlanePower > 0>>
+			<<set $securityForceRecruit += ($securityForceSpacePlanePower)>> <</if>>
+		<<if $securityForceFortressZeppelin > 0>>
+			<<set $securityForceRecruit += ($securityForceFortressZeppelin)>> <</if>>
+		<<if $securityForceAC130 > 0>>
+			<<set $securityForceRecruit += ($securityForceAC130)>> <</if>>
+	<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 2>>
+		<<if $securityForceDronePower > 0>>
+			<<set $securityForceRecruit += ($securityForceDronePower)>> <</if>>
+	<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 4>>
+		<<if $securityForceSatalitePower > 0>>
+			<<set $securityForceRecruit += ($securityForceSatalitePower)>> <</if>>
+		<<if $securityForceGiantRobot > 0>>
+			<<set $securityForceRecruit += ($securityForceGiantRobot)>> <</if>>
+	<</if>>
+	
+	<<if $terrain == "oceanic"
+		<<if $securityForceAircraftCarrier > 0>>
+			<<set $securityForceRecruit += ($securityForceAircraftCarrier)>> <</if>>
+		<<if $securityForceSubmarine > 0>>
+			<<set $securityForceRecruit += ($securityForceSubmarine)>> <</if>>
+	<</if>>
 
 	/* If focus is recruit/train, 95% of the above is added to the personnel total of the SF. Else, 25% (which will, at medium/high personnel levels, not wholly counteract attrition, needing some recruitment every so often to keep the total high). */
 	<<if $securityForceFocus == "recruit">>
@@ -157,28 +185,48 @@ securityForceX
 			<<set $securityForceTrade += (0.25*($securityForceInfantryPower))>> <</if>>
 		<<if $securityForceStimulantPower > 0>>
 			<<set $securityForceTrade += (0.25*($securityForceStimulantPower))>> <</if>>
+		
+	<<if $securityForceArcologyUpgrades >= 1>>
 		<<if $securityForceVehiclePower > 0>>
 			<<set $securityForceTrade += (0.25*($securityForceVehiclePower))>> <</if>>
+		<<if $securityForceHeavyBattleTank > 0>>
+			<<set $securityForceTrade += (0.25*($securityForceHeavyBattleTank))>> <</if>>
+	<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 4>>
 		<<if $securityForceAircraftPower > 0>>
 			<<set $securityForceTrade += (0.25*($securityForceAircraftPower))>> <</if>>
-		<<if $securityForceDronePower > 0>>
-			<<set $securityForceTrade += (0.5*($securityForceDronePower))>> <</if>>
 		<<if $securityForceSpacePlanePower > 0>>
 			<<set $securityForceTrade += (0.0025*($securityForceSpacePlanePower))>> <</if>>
 		<<if $securityForceFortressZeppelin > 0>>
 			<<set $securityForceTrade += (0.25*($securityForceFortressZeppelin))>> <</if>>
 		<<if $securityForceAC130 > 0>>
 			<<set $securityForceTrade += (0.25*($securityForceAC130))>> <</if>>
+	<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 2>>
+		<<if $securityForceDronePower > 0>>
+			<<set $securityForceTrade += (0.5*($securityForceDronePower))>> <</if>>
+	<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 4>>
 		<<if $securityForceSatalitePower > 0>>
 			<<set $securityForceTrade += (0.25*($securityForceSatalitePower))>> <</if>>
-		<<if $securityForceGiantRobot > 0>> 
+		<<if $securityForceGiantRobot > 0 && $terrain != "oceanic">> 
 			<<set $securityForceTrade += (0.25*($securityForceGiantRobot))>> <</if>>
+		<<if $securityForceMissileSilo > 0 && $terrain != "oceanic">> 
+			<<set $securityForceTrade += (0.25*($securityForceMissileSilo))>> <</if>>	
+	<</if>>
+	
+	<<if $terrain == "oceanic">>	
 		<<if $securityForceAircraftCarrier > 0>> 
 			<<set $securityForceTrade += (0.25*($securityForceAircraftCarrier))>> <</if>>
 		<<if $securityForceSubmarine > 0>>
 			<<set $securityForceTrade += (0.25*($securityForceSubmarine))>> <</if>>
 		<<if $securityForceHeavyAmphibiousTransport > 0>>
-			<<set $securityForceTrade += (0.25*($securityForceHeavyAmphibiousTransport))>> <</if>>	
+			<<set $securityForceTrade += (0.25*($securityForceHeavyAmphibiousTransport))>> 
+		<</if>>	
+	<</if>>
 			
 	/* Manpower effects - extra 0.5% per 100-gate in terms of manpower. Kicks in at over 200, since some of the SF is on overhead, logistics, repairs, rest, etc. */
 	<<if $securityForcePersonnel > 200>>
@@ -228,63 +276,53 @@ securityForceX
 	<<set _SFNOPercentage = _SFNO*_RaidingEfficienyPercentage>>
 	<<set _SFOPercentage = __SFO*_RaidingEfficienyPercentage>>
 	
-	/* Barracks(16) */
-		<<if $securityForceArcologyUpgrades > 0>>							 /* (16) */						
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceArcologyUpgrades*_RaidingEfficienyPercentage)))>> 
-		<</if>>
-	/* Armory(11) */
-		<<if $securityForceInfantryPower > 0>>								/* 	(11) */							
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceInfantryPower*_RaidingEfficienyPercentage))>> 
-		<</if>> 
-	/* Stimulant Lab(9) */
-		<<if $securityForceStimulantPower > 0>>								/* (9) 	*/ 						
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceStimulantPower*_RaidingEfficienyPercentage)))>> 
-		<</if>> 
-	<<if $securityForceArcologyUpgrades >= 1>>								/* Garage - 7 */
-		<<if $securityForceVehiclePower > 0>>								/* (7)	*/		
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceVehiclePower*_RaidingEfficienyPercentage))>> 
+		<<if $securityForceArcologyUpgrades > 0>>											
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceArcologyUpgrades*_RaidingEfficienyPercentage)))>> <</if>>
+		<<if $securityForceInfantryPower > 0>>													
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceInfantryPower*_RaidingEfficienyPercentage))>> <</if>> 
+		<<if $securityForceStimulantPower > 0>>													
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceStimulantPower*_RaidingEfficienyPercentage)))>> <</if>> 
 		<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 1>>								
+		<<if $securityForceVehiclePower > 0>>										
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceVehiclePower*_RaidingEfficienyPercentage))>> <</if>>
+		<<if $securityForceHeavyBattleTank > 0>> /* (3) */
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceHeavyBattleTank*_RaidingEfficienyPercentage))>> <</if>>
 	<</if>> 
-	<<if $securityForceArcologyUpgrades >= 4>>								/* Hangar - 27 */
-		<<if $securityForceAircraftPower > 0>> 								/*	(8) */					
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceAircraftPower*_RaidingEfficienyPercentage)))>> 
-		<</if>>
-		<<if $securityForceSpacePlanePower > 0>> 							/* (11) */					
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceSpacePlanePower*_RaidingEfficienyPercentage))>> 
-		<</if>>
-		<<if $securityForceFortressZeppelin > 0>> 							/*	(3) */						
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceFortressZeppelin*_RaidingEfficienyPercentage))>> 
-		<</if>>
-		<<if $securityForceAC130 > 0>> 										/*	(5) */							
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceAC130*_RaidingEfficienyPercentage)))>> 
-		<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 4>>								
+		<<if $securityForceAircraftPower > 0>> 												
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceAircraftPower*_RaidingEfficienyPercentage)))>> <</if>>
+		<<if $securityForceSpacePlanePower > 0>> 											
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceSpacePlanePower*_RaidingEfficienyPercentage))>> <</if>>
+		<<if $securityForceFortressZeppelin > 0>> 											
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceFortressZeppelin*_RaidingEfficienyPercentage))>> <</if>>
+		<<if $securityForceAC130 > 0>> 																
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceAC130*_RaidingEfficienyPercentage)))>> <</if>>
 	<</if>>
-	<<if $securityForceArcologyUpgrades >= 2>>								/* Drone Bay - 6 */
-		<<if $securityForceDronePower > 0>> 								/*	(6)	*/							
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceDronePower*_RaidingEfficienyPercentage))>> 
-		<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 2>>								
+		<<if $securityForceDronePower > 0>> 														
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceDronePower*_RaidingEfficienyPercentage))>> <</if>>
 	<</if>>
-	<<if $securityForceArcologyUpgrades >= 4>>								/* Launch Bay - 29 */
-		<<if $securityForceSatalitePower > 0>>	 							/* (17) */
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceSatalitePower*_RaidingEfficienyPercentage)))>> 
-		<</if>>
-		<<if $securityForceGiantRobot > 0 && $terrain != "oceanic">> 		/* (9) 	*/		
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceGiantRobot*_RaidingEfficienyPercentage))>> 
-		<</if>> 
-		<<if $securityForceMissileSilo > 0 && $terrain != "oceanic">> 		/* (3) 	*/
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceMissileSilo*_RaidingEfficienyPercentage))>> 
-		<</if>> 
-	<</if>>
-	<<if $terrain == "oceanic">>											/* Naval Yard - 12 */
-		<<if $securityForceAircraftCarrier > 0>> 							/* (4) */
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*($securityForceAircraftCarrier*_RaidingEfficienyPercentage))>> 
-		<</if>>
-		<<if $securityForceSubmarine > 0>> 									/* (5) */	
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*($securityForceSubmarine*_RaidingEfficienyPercentage))>> 
-		<</if>>
-		<<if $securityForceHeavyAmphibiousTransport > 0>> 					/* (3) */	
-			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*($securityForceHeavyAmphibiousTransport*_RaidingEfficienyPercentage))>> 
-		<</if>>
+	
+	<<if $securityForceArcologyUpgrades >= 4>>								
+		<<if $securityForceSatalitePower > 0>>	 							
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*(1+($securityForceSatalitePower*_RaidingEfficienyPercentage)))>> <</if>>
+		<<if $securityForceGiantRobot > 0 && $terrain != "oceanic">> 			
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceGiantRobot*_RaidingEfficienyPercentage))>> <</if>> 
+		<<if $securityForceMissileSilo > 0 && $terrain != "oceanic">> 	
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency+($securityForceMissileSilo*_RaidingEfficienyPercentage))>> <</if>> 
+	<</if>>
+	
+	<<if $terrain == "oceanic">>										
+		<<if $securityForceAircraftCarrier > 0>> 							
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*($securityForceAircraftCarrier*_RaidingEfficienyPercentage))>> <</if>>
+		<<if $securityForceSubmarine > 0>> 										
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*($securityForceSubmarine*_RaidingEfficienyPercentage))>> <</if>>
+		<<if $securityForceHeavyAmphibiousTransport > 0>> 					
+			<<set $securityForceMissionEfficiency = ($securityForceMissionEfficiency*($securityForceHeavyAmphibiousTransport*_RaidingEfficienyPercentage))>> <</if>>
 	<</if>>
 		
 	/* Colonel */
@@ -540,9 +578,19 @@ securityForceX
 <<elseif $securityForceVehiclePower == 7>>
 	The garage has replaced both its armoured and support vehicles with the most advanced light and medium variants possible, making the mobile unit of the $securityForceName far superior to anything in the arcology's immediate area.
 <</if>>
+
+/* 3 upgrades */
+<<if $securityForceHeavyBattleTank == 1>>
+	A basic heavy battle tank has been 'borrowed' from the old world.
+<<elseif $securityForceHeavyBattleTank == 2>>
+	Modernised the heavy battle tank's armor.
+<<elseif $securityForceHeavyBattleTank == 3>>
+	Modernised the heavy battle tank's armor and upgradeded the main gun to a 140 inch barrel.
 <</if>>
 
-<<if $securityForceArcologyUpgrades >= 4>>
+<</if>>
+
+<<if $securityForceArcologyUpgrades >= 4 && _Hangar > 0>>
 <br><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ''Hangar:''
 <br>
@@ -643,7 +691,7 @@ securityForceX
 <</if>>
 <</if>>
 
-<<if $securityForceArcologyUpgrades >= 4>>
+<<if $securityForceArcologyUpgrades >= 4 && _LaunchBay > 0>>
 <br><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ''Launch Bay:''
 <<if $securityForceSatalitePower > 0>>
@@ -723,7 +771,7 @@ securityForceX
 <</if>>
 <</if>>
 
-<<if $terrain == "oceanic">>
+<<if $terrain == "oceanic" || $terrain == "marine" && _NavalYard > 0>>
 <br><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ''Naval Yard:''
 <<if $securityForceAircraftCarrier > 0>>
@@ -744,13 +792,13 @@ securityForceX
 	/* 5 upgrades */ 
 	<<if $securityForceSubmarine == 1>>
 	A basic submarine has been 'borrowed' from the old world.
-	<<elseif $securityForcesubmarine == 2>>
+	<<elseif $securityForceSubmarine == 2>>
 	Modernized the submarine's engines for silence.
-	<<elseif $securityForcesubmarine == 3>>
+	<<elseif $securityForceSubmarine == 3>>
 	Modernized the submarine's engines for silence.Upgraded the submarine's hull for silence.
-	<<elseif $securityForcesubmarine == 4>>
+	<<elseif $securityForceSubmarine == 4>>
 	Modernized the submarine's engines for silence.Upgraded the submarine's hull for silence and weaponry.
-	<<elseif $securityForcesubmarine == 5>>
+	<<elseif $securityForceSubmarine == 5>>
 	Modernized the submarine's engines for silence.Upgraded the submarine's hull for silence, weaponry and air scrubbers, allowing the sub to stay submerged for longer.
 	<</if>>
 <</if>>
-- 
GitLab