:: SecExpBackwardCompatibility [nobr]

<<set $nextButton = "Continue", $nextLink = "Main", $returnTo = "Main">>

/* base stats */
<<run App.SecExp.Check.general()>>
<<if ndef $attackType>>
	<<set $attackType = "none">>
<</if>>
<<if ndef $attackThisWeek>>
	<<set $attackThisWeek = 0>>
<</if>>
<<if ndef $lastAttackWeeks>>
	<<set $lastAttackWeeks = 0>>
<</if>>
<<set $lastRebellionWeeks = Number($lastRebellionWeeks) || 0>>
<<if ndef $hasFoughtOnce>>
	<<set $hasFoughtOnce = 0>>
<</if>>
<<if ndef $hasFoughtMajorBattleOnce>>
	<<set $hasFoughtMajorBattleOnce = 0>>
<</if>>
<<if ndef $hasRebelledOnce>>
	<<set $hasRebelledOnce = 0>>
<</if>>
<<if ndef $majorBattle>>
	<<set $majorBattle = 0>>
<</if>>
<<if ndef $PCvictoryStreak>>
	<<set $PCvictoryStreak = 0>>
<</if>>
<<if ndef $PClossStreak>>
	<<set $PClossStreak = 0>>
<</if>>
<<if ndef $wasToggledBefore>>
	<<set $wasToggledBefore = 0>>
<</if>>
<<if ndef $foughtThisWeek>>
	<<set $foughtThisWeek = 0>>
<</if>>

/* edicts */
<<if ndef $alternativeRents>>
	<<set $alternativeRents = 0>>
<</if>>
<<if ndef $enslavementRights>>
	<<set $enslavementRights = 0>>
<</if>>
<<if ndef $securityExemption>>
	<<set $securityExemption = 0>>
<</if>>
<<if ndef $sellData>>
	<<set $sellData = 0>>
<</if>>
<<if ndef $propCampaignBoost>>
	<<set $propCampaignBoost = 0>>
<</if>>
<<if ndef $slaveWatch>>
	<<set $slaveWatch = 0>>
<</if>>
<<if ndef $subsidyChurch>>
	<<set $subsidyChurch = 0>>
<</if>>
<<if ndef $limitImmigration>>
	<<set $limitImmigration = 0>>
<</if>>
<<if ndef $openBorders>>
	<<set $openBorders = 0>>
<</if>>
<<if ndef $slavesOfficers>>
	<<set $slavesOfficers = 0>>
<</if>>
<<if ndef $martialSchool>>
	<<set $martialSchool = 0>>
<</if>>
<<if ndef $discountMercenaries>>
	<<set $discountMercenaries = 0>>
<</if>>
<<if ndef $militiaFounded>>
	<<set $militiaFounded = 0>>
<</if>>
<<if ndef $recruitVolunteers>>
	<<set $recruitVolunteers = 0>>
<</if>>
<<if ndef $conscription>>
	<<set $conscription = 0>>
<</if>>
<<if ndef $militaryService>>
	<<set $militaryService = 0>>
<</if>>
<<if ndef $militarizedSociety>>
	<<set $militarizedSociety = 0>>
<</if>>
<<if ndef $militaryExemption>>
	<<set $militaryExemption = 0>>
<</if>>
<<if ndef $lowerRquirements>>
	<<set $lowerRquirements = 0>>
<</if>>
<<if ndef $noSubhumansInArmy>>
	<<set $noSubhumansInArmy = 0>>
<</if>>
<<if ndef $pregExemption>>
	<<set $pregExemption = 0>>
<</if>>
<<if ndef $eliteOfficers>>
	<<set $eliteOfficers = 0>>
<</if>>
<<if ndef $liveTargets>>
	<<set $liveTargets = 0>>
<</if>>
<<if ndef $legionTradition>>
	<<set $legionTradition = 0>>
<</if>>
<<if ndef $eagleWarriors>>
	<<set $eagleWarriors = 0>>
<</if>>
<<if ndef $ronin>>
	<<set $ronin = 0>>
<</if>>
<<if ndef $sunTzu>>
	<<set $sunTzu = 0>>
<</if>>
<<if ndef $mamluks>>
	<<set $mamluks = 0>>
<</if>>
<<if ndef $pharaonTradition>>
	<<set $pharaonTradition = 0>>
<</if>>
<<if ndef $weaponsLaw>>
	<<set $weaponsLaw = 3>>
<</if>>
<<if ndef $soldierWages>>
	<<set $soldierWages = 1>>
<</if>>
<<if ndef $militiaSoldierPrivilege>>
	<<set $militiaSoldierPrivilege = 0>>
<</if>>
<<if ndef $slaveSoldierPrivilege>>
	<<set $slaveSoldierPrivilege = 0>>
<</if>>
<<if ndef $mercSoldierPrivilege>>
	<<set $mercSoldierPrivilege = 0>>
<</if>>
<<if ndef $tradeLegalAid>>
	<<set $tradeLegalAid = 0>>
<</if>>
<<if ndef $taxTrade>>
	<<set $taxTrade = 0>>
<</if>>

/* buildings */
<<if ndef $secHQ>>
	<<set $secHQ = 0>>
<</if>>
<<if ndef $secMenials>>
	<<set $secMenials = $secHelots || 0>>
	<<unset $secHelots>>
<</if>>
<<if ndef $secUpgrades >>
	<<set $secUpgrades = {
	nanoCams: 0,
	cyberBots: 0,
	eyeScan: 0,
	cryptoAnalyzer: 0,
	coldstorage: 0}>>
<</if>>
<<if ndef $crimeUpgrades>>
	<<set $crimeUpgrades = {
	autoTrial: 0,
	autoArchive: 0,
	worldProfiler: 0,
	advForensic: 0}>>
<</if>>
<<if ndef $intelUpgrades>>
	<<set $intelUpgrades = {
	sensors: 0,
	radar: 0,
	signalIntercept: 0}>>
<</if>>
<<if ndef $readinessUpgrades>>
	<<set $readinessUpgrades = {
	earlyWarn: 0,
	rapidPlatforms: 0,
	pathways: 0,
	rapidVehicles: 0}>>
<</if>>
<<if ndef $riotCenter>>
	<<set $riotCenter = 0>>
<</if>>
<<if ndef $riotUpgrades>>
	<<set $riotUpgrades = {
	freeMedia: 0,
	rapidUnit: 0,
	rapidUnitSpeed: 0}>>
<</if>>
<<if ndef $fort>>
	<<set $fort = {
	reactor: 0,
	waterway: 0,
	assistant: 0}>>
<</if>>
<<if ndef $sentUnitCooldown>>
	<<set $sentUnitCooldown = 0>>
<</if>>
<<if ndef $advancedRiotEquip>>
	<<set $advancedRiotEquip = 0>>
<</if>>
<<if ndef $brainImplant>>
	<<set $brainImplant = -1>>
<</if>>
<<if ndef $brainImplantProject>>
	<<set $brainImplantProject = 0>>
<</if>>
<<if def $weapHelots>>
	<<set $weapMenials = $weapHelots || 0>>
	<<unset $weapHelots>>
<</if>>
<<if ndef $weapManu>>
	<<set $weapManu = 0>>
<</if>>
<<if ndef $weapProductivity>>
	<<set $weapProductivity = 1>>
<</if>>
<<if ndef $weapLab>>
	<<set $weapLab = 1>>
<</if>>
<<if ndef $baseUpgradeTime>>
	<<set $baseUpgradeTime = 10>>
<</if>>
<<if ndef $weapUpgrades>>
	<<set $weapUpgrades = []>>
<</if>>
<<if ndef $currentUpgrade>>
	<<set $currentUpgrade = {
	ID: 0,
	name: " ",
	unit: 0,
	type: 0,
	time: 0,
	value: 0}>>
<<else>>
	<<if ndef $currentUpgrade.ID>>
		<<if $currentUpgrade.name == "magnetic based ballistic weaponry">>
			<<set $currentUpgrade.ID = 0>>
		<<elseif $currentUpgrade.name == "ceramo-metallic alloys">>
			<<set $currentUpgrade.ID = 1>>
		<<elseif $currentUpgrade.name == "rapid action stimulants">>
			<<set $currentUpgrade.ID = 2>>
		<<elseif $currentUpgrade.name == "fast response neural stimulant">>
			<<set $currentUpgrade.ID = 3>>
		<<elseif $currentUpgrade.name == "universal cyber enhancements">>
			<<set $currentUpgrade.ID = 4>>
		<<elseif $currentUpgrade.name == "remote neural links">>
			<<set $currentUpgrade.ID = 5>>
		<<elseif $currentUpgrade.name == "combined training regimens with the special force">>
			<<set $currentUpgrade.ID = 6>>
		<<elseif $currentUpgrade.name == "a variant of the stimulant cocktail that the special force created">>
			<<set $currentUpgrade.ID = 7>>
		<<elseif $currentUpgrade.name == "a mesh network based off the custom network of the special force">>
			<<set $currentUpgrade.ID = 8>>
		<<elseif $currentUpgrade.name == "dynamic battle aware AI">>
			<<set $currentUpgrade.ID = -1>>
		<<elseif $currentUpgrade.name == "adaptive armored frames">>
			<<set $currentUpgrade.ID = -2>>
		<<elseif $currentUpgrade.name == "advanced synthetic alloys">>
			<<set $currentUpgrade.ID = -3>>
		<</if>>
	<</if>>
<</if>>
<<if ndef $droneUpgrades>>
	<<set $droneUpgrades = {
	attack: 0,
	defense: 0,
	hp:0}>>
<<elseif $droneUpgrades == null>>
	<<set $droneUpgrades = {
	attack: 0,
	defense: 0,
	hp:0}>>
<<else>>
	<<if Number.isInteger($droneUpgrades)>>
		<<unset $droneUpgrades>>
		<<set $droneUpgrades = {
		attack: 0,
		defense: 0,
		hp:0}>>
	<</if>>
	<<if ndef $droneUpgrades.attack || !Number.isInteger($droneUpgrades.attack)>>
		<<set $droneUpgrades.attack = 0>>
	<</if>>
	<<if ndef $droneUpgrades.defense || !Number.isInteger($droneUpgrades.defense)>>
		<<set $droneUpgrades.defense = 0>>
	<</if>>
	<<if ndef $droneUpgrades.hp || !Number.isInteger($droneUpgrades.hp)>>
		<<set $droneUpgrades.hp = 0>>
	<</if>>
<</if>>
<<if ndef $humanUpgrade>>
	<<set $humanUpgrade = {
	attack: 0,
	defense: 0,
	hp:0,
	morale: 0}>>
<<elseif $humanUpgrade == null>>
	<<set $humanUpgrade = {
	attack: 0,
	defense: 0,
	hp:0,
	morale: 0}>>
<<else>>
	<<if Number.isInteger($humanUpgrade)>>
		<<unset $humanUpgrade>>
		<<set $humanUpgrade = {
		attack: 0,
		defense: 0,
		hp:0,
		morale: 0}>>
	<</if>>
	<<if ndef $humanUpgrade.attack || !Number.isInteger($humanUpgrade.attack)>>
		<<set $humanUpgrade.attack = 0>>
	<</if>>
	<<if ndef $humanUpgrade.defense || !Number.isInteger($humanUpgrade.defense)>>
		<<set $humanUpgrade.defense = 0>>
	<</if>>
	<<if ndef $humanUpgrade.hp || !Number.isInteger($humanUpgrade.hp)>>
		<<set $humanUpgrade.hp = 0>>
	<</if>>
	<<if ndef $humanUpgrade.morale || !Number.isInteger($humanUpgrade.morale)>>
		<<set $humanUpgrade.morale = 0>>
	<</if>>
<</if>>
<<if ndef $sellTo>>
	<<set $sellTo = {
	citizen: 1,
	raiders: 1,
	oldWorld: 1,
	FC: 1}>>
<</if>>
<<if ndef $completedUpgrades>>
	<<set $completedUpgrades = []>>
<</if>>
<<if ndef $transportHub>>
	<<set $transportHub = 0>>
<</if>>
<<if ndef $airport>>
	<<set $airport = 1>>
<</if>>
<<if ndef $railway>>
	<<set $railway = 1>>
<</if>>
<<if ndef $docks>>
	<<set $docks = 1>>
<</if>>
<<if ndef $hubSecurity>>
	<<set $hubSecurity = 1>>
<</if>>

/* events */
<<if ndef $smilingManProgress>>
	<<set $smilingManProgress = 0>>
<</if>>
<<if ndef $investedFunds>>
	<<set $investedFunds = 0>>
<</if>>
<<if ndef $relationshipLM>>
	<<set $relationshipLM = 0>>
<</if>>
<<if ndef $captureRoute>>
	<<set $captureRoute = 0>>
<</if>>
<<if ndef $collaborationRoute>>
	<<set $collaborationRoute = 0>>
<</if>>
<<if ndef $smilingManWeek>>
	<<set $smilingManWeek = 0>>
<</if>>
<<if ndef $globalCrisisWeeks>>
	<<set $globalCrisisWeeks = 0>>
<</if>>
<<if ndef $smilingManFate>>
	<<set $smilingManFate = 4>>
<</if>>

/* rebellions */
<<if ndef $tension>>
	<<set $tension = 0>>
<</if>>
<<if ndef $slaveProgress>>
	<<set $slaveProgress = 0>>
<</if>>
<<if ndef $citizenProgress>>
	<<set $citizenProgress = 0>>
<</if>>
<<if ndef $slaveRebellionEventFires>>
	<<set $slaveRebellionEventFires = 0>>
<</if>>
<<if ndef $citizenRebellionEventFires>>
	<<set $citizenRebellionEventFires = 0>>
<</if>>
<<if ndef $slaveRebellion>>
	<<set $slaveRebellion = 0>>
<</if>>
<<if ndef $citizenRebellion>>
	<<set $citizenRebellion = 0>>
<</if>>
<<if ndef $rebellingUnits>>
	<<set $rebellingUnits = []>>
<</if>>
<<if ndef $engageRule>>
	<<set $engageRule = 0>>
<</if>>
<<if ndef $irregulars>>
	<<set $irregulars = 0>>
<</if>>
<<if ndef $rebellingMilitia>>
	<<set $rebellingMilitia = 0>>
<</if>>
<<if ndef $rebellingSlaves>>
	<<set $rebellingSlaves = 0>>
<</if>>
<<if ndef $rebellingMercs>>
	<<set $rebellingMercs = 0>>
<</if>>
<<if ndef $repairTime>>
	<<set $repairTime = 3>>
<</if>>
<<if ndef $arcRepairTime>>
	<<set $arcRepairTime = 0>>
<</if>>
<<if ndef $garrison>>
	<<set $garrison = {
	penthouse: 0,
	reactor: 0,
	assistant: 0,
	waterway: 0,
	reactorTime: 0,
	assistantTime: 0,
	waterwayTime: 0}>>
<<else>>
	<<if ndef $garrison.penthouse>>
		<<set $garrison.penthouse = 0>>
	<</if>>
	<<if ndef $garrison.reactor>>
		<<set $garrison.reactor = 0>>
	<</if>>
	<<if ndef $garrison.assistant>>
		<<set $garrison.assistant = 0>>
	<</if>>
	<<if ndef $garrison.waterway>>
		<<set $garrison.waterway = 0>>
	<</if>>
	<<if ndef $garrison.reactorTime>>
		<<set $garrison.reactorTime = 0>>
	<</if>>
	<<if ndef $garrison.assistantTime>>
		<<set $garrison.assistantTime = 0>>
	<</if>>
	<<if ndef $garrison.waterwayTime>>
		<<set $garrison.waterwayTime = 0>>
	<</if>>
<</if>>
<<if ndef $rebellionsCount>>
	<<set $rebellionsCount = 0>>
<</if>>
<<if ndef $PCrebWon>>
	<<set $PCrebWon = 0>>
<</if>>
<<if ndef $PCrebLoss>>
	<<set $PCrebLoss = 0>>
<</if>>

/* armed forces stats */
<<if ndef $targetUnit>>
	<<set $targetUnit = 0>>
<</if>>
<<if ndef $targetIndex>>
	<<set $targetIndex = 0>>
<</if>>
<<if ndef $secBotsCost>>
	<<set $secBotsCost = 500>>
<</if>>
<<if ndef $secBotsUpgradeCost>>
	<<set $secBotsUpgradeCost = 250>>
<</if>>
<<if ndef $equipUpgradeCost>>
	<<set $equipUpgradeCost = 250>>
<</if>>
<<if ndef $maxTroops>>
	<<set $maxTroops = 30>>
<</if>>
<<if ndef $militiaFounded>>
	<<set $militiaFounded = 0>>
<</if>>
<<if ndef $militiaTotalManpower>>
	<<set $militiaTotalManpower = 0>>
<</if>>
<<if ndef $militiaFreeManpower>>
	<<set $militiaFreeManpower = 0>>
<</if>>
<<if ndef $militiaEmployedManpower>>
	<<set $militiaEmployedManpower = 0>>
<</if>>
<<if ndef $militiaTotalCasualties>>
	<<set $militiaTotalCasualties = 0>>
<</if>>
<<if ndef $slavesOfficers>>
	<<set $slavesOfficers = 0>>
<</if>>
<<if ndef $slavesEmployedManpower>>
	<<set $slavesEmployedManpower = 0>>
<</if>>
<<if ndef $slavesTotalCasualties>>
	<<set $slavesTotalCasualties = 0>>
<</if>>
<<if ndef $slavesMaxTroops>>
	<<set $slavesMaxTroops = 30>>
<</if>>
<<if ndef $mercTotalManpower>>
	<<set $mercTotalManpower = 0>>
<</if>>
<<if ndef $mercFreeManpower>>
	<<set $mercFreeManpower = 0>>
<</if>>
<<if ndef mercEmployedManpower>>
	<<set $mercEmployedManpower = 0>>
<</if>>
<<if ndef $mercTotalCasualties>>
	<<set $mercTotalCasualties = 0>>
<</if>>
<<if ndef $militiaLoyalty>>
	<<set $militiaLoyalty = 0>>
<</if>>
<<if ndef $slaveArmyLoyalty>>
	<<set $slaveArmyLoyalty = 0>>
<</if>>
<<if ndef $mercLoyalty>>
	<<set $mercLoyalty = 0>>
<</if>>
<<if ndef $createdSlavesUnits>>
	<<set $createdSlavesUnits = 0>>
<</if>>
<<if ndef $createdMilitiaUnits>>
	<<set $createdMilitiaUnits = 0>>
<</if>>
<<if ndef $createdMercUnits>>
	<<set $createdMercUnits = 0>>
<</if>>

/* battle relevant vars */
<<if ndef $slaveVictories>>
	<<set $slaveVictories = []>>
<</if>>
<<if ndef $slaveIncreasedPrestige>>
	<<set $slaveIncreasedPrestige = 0>>
<</if>>
<<if ndef $totalKills>>
	<<set $totalKills = 0>>
<</if>>
<<if ndef $battlesCount>>
	<<set $battlesCount = 0>>
<</if>>
<<if ndef $majorBattlesCount>>
	<<set $majorBattlesCount = 0>>
<</if>>
<<if ndef $chosenTactic>>
	<<set $chosenTactic = "none">>
<</if>>
<<if ndef $leadingTroops>>
	<<set $leadingTroops = "none">>
<</if>>
<<if ndef $attackTroops>>
	<<set $attackTroops = 0>>
<</if>>
<<if ndef $attackEquip>>
	<<set $attackEquip = 0>>
<</if>>
<<if ndef $battleTerrain>>
	<<set $battleTerrain = "none">>
<</if>>
<<if ndef $maxTurns>>
	<<set $maxTurns = 10>>
<</if>>
<<if ndef $battleResult>>
	<<set $battleResult = 4>>				/* sets $battleResult value outside accepted range (-3,3) to avoid evaluation problems */
<</if>>
<<if ndef $losses>>
	<<set $losses = 0>>
<</if>>
<<if ndef $enemyLosses>>
	<<set $enemyLosses = 0>>
<</if>>
<<if ndef $battleTurns>>
	<<set $battleTurns = 0>>
<</if>>
<<if ndef $tacticsSuccessful>>
	<<set $tacticsSuccessful = 0>>
<</if>>
<<if ndef $leaderWounded>>
	<<set $leaderWounded = 0>>				/* 0=no wound, 1=mute, 2=blind, 3=amputee, 4=health */
<</if>>
<<if ndef $gainedCombat>>
	<<set $gainedCombat = 0>>
<</if>>
<<if ndef $gainedWarfare>>
	<<set $gainedWarfare = 0>>
<</if>>
<<if ndef $expectedEquip>>
	<<set $expectedEquip = 0>>
<</if>>
<<if ndef $estimatedMen>>
	<<set $estimatedMen = 0>>
<</if>>
<<if ndef $SFIntervention>>
	<<set $SFIntervention = 0>>
<</if>>
<<if ndef $carriableSoldiers>>
	<<set $carriableSoldiers = 0>>
<</if>>
<<if ndef $SFatk>>
	<<set $SFatk = 0>>
<</if>>
<<if ndef $SFdef>>
	<<set $SFdef = 0>>
<</if>>
<<if ndef $SFhp>>
	<<set $SFhp = 0>>
<</if>>
<<if ndef $rebellingID>>
	<<set $rebellingID = []>>
<</if>>
<<if ndef $saveValid>>
	<<set $saveValid = 0>>
<</if>>
<<if ndef $lastSelection>>
	<<set $lastSelection = []>>
<</if>>

/* statistics */
<<if ndef $equipMod>>
	<<set $equipMod = 0.15>>
<</if>>
<<if ndef $secBotsBaseAttack>>
	<<set $secBotsBaseAttack = 7 + $droneUpgrades.attack>>
<</if>>
<<if ndef $secBotsBaseDefense>>
	<<set $secBotsBaseDefense = 3 + $droneUpgrades.defense>>
<</if>>
<<if ndef $secBotsMorale>>
	<<set $secBotsMorale = 200>>
<</if>>
<<if ndef $secBotsBaseHp>>
	<<set $secBotsBaseHp = 3 + $droneUpgrades.hp>>
<</if>>
<<if ndef $militiaBaseAttack>>
	<<set $militiaBaseAttack = 7 + $humanUpgrade.attack>>
<</if>>
<<if ndef $militiaBaseDefense>>
	<<set $militiaBaseDefense = 5 + $humanUpgrade.defense>>
<</if>>
<<if ndef $militiaBaseMorale>>
	<<set $militiaBaseMorale = 140 + $humanUpgrade.morale>>
<</if>>
<<if ndef $militiaBaseHp>>
	<<set $militiaBaseHp = 3 + $humanUpgrade.hp>>
<</if>>
<<if ndef $slaveBaseAttack>>
	<<set $slaveBaseAttack = 8 + $humanUpgrade.attack>>
<</if>>
<<if ndef $slaveBaseDefense>>
	<<set $slaveBaseDefense = 3 + $humanUpgrade.defense>>
<</if>>
<<if ndef $slaveBaseMorale>>
	<<set $slaveBaseMorale = 110 + $humanUpgrade.morale>>
<</if>>
<<if ndef $slaveBaseHp>>
	<<set $slaveBaseHp = 3 + $humanUpgrade.hp>>
<</if>>
<<if ndef $mercBaseAttack>>
	<<set $mercBaseAttack = 8 + $humanUpgrade.attack>>
<</if>>
<<if ndef $mercBaseDefense>>
	<<set $mercBaseDefense = 4 + $humanUpgrade.defense>>
<</if>>
<<if ndef $mercBaseMorale>>
	<<set $mercBaseMorale = 125 + $humanUpgrade.morale>>
<</if>>
<<if ndef $mercBaseHp>>
	<<set $mercBaseHp = 4 + $humanUpgrade.hp>>
<</if>>
<<if ndef $SFBaseAttack>>
	<<set $SFBaseAttack = 8 + $humanUpgrade.attack>>
<</if>>
<<if ndef $SFBaseDefense>>
	<<set $SFBaseDefense = 4 + $humanUpgrade.defense>>
<</if>>
<<if ndef $SFBaseMorale>>
	<<set $SFBaseMorale = 140 + $humanUpgrade.morale>>
<</if>>
<<if ndef $SFBaseHp>>
	<<set $SFBaseHp = 4 + $humanUpgrade.hp>>
<</if>>

<<if ndef $raBaseAttack>>
	<<set $raBaseAttack = 7>>
<</if>>
<<if ndef $raBaseDefense>>
	<<set $raBaseDefense = 2>>
<</if>>
<<if ndef $raBaseMorale>>
	<<set $raBaseMorale = 100>>
<</if>>
<<if ndef $raBaseHp>>
	<<set $raBaseHp = 2>>
<</if>>
<<if ndef $fcBaseAttack>>
	<<set $fcBaseAttack = 6>>
<</if>>
<<if ndef $fcBaseDefense>>
	<<set $fcBaseDefense = 4>>
<</if>>
<<if ndef $fcBaseMorale>>
	<<set $fcBaseMorale = 130>>
<</if>>
<<if ndef $fcBaseHp>>
	<<set $fcBaseHp = 3>>
<</if>>
<<if ndef $owBaseAttack>>
	<<set $owBaseAttack = 8>>
<</if>>
<<if ndef $owBaseDefense>>
	<<set $owBaseDefense = 4>>
<</if>>
<<if ndef $owBaseMorale>>
	<<set $owBaseMorale = 110>>
<</if>>
<<if ndef $owBaseHp>>
	<<set $owBaseHp = 2>>
<</if>>
<<if ndef $ffBaseAttack>>
	<<set $ffBaseAttack = 9>>
<</if>>
<<if ndef $ffBaseDefense>>
	<<set $ffBaseDefense = 2>>
<</if>>
<<if ndef $ffBaseMorale>>
	<<set $ffBaseMorale = 160>>
<</if>>
<<if ndef $ffBaseHp>>
	<<set $ffBaseHp = 2>>
<</if>>

/* units */
<<if ndef $militiaUnits>>
	<<set $militiaUnits = []>>
<</if>>
<<if ndef $slaveUnits>>
	<<set $slaveUnits = []>>
<</if>>
<<if ndef $mercUnits>>
	<<set $mercUnits = []>>
<</if>>

/* SFanon additions */
<<if ndef $SFSupportLevel>>
	<<set $SFSupportLevel = 0>>
<</if>>
<<if ndef $secUpgrades.coldstorage>>
	<<set $secUpgrades.coldstorage = 0>>
<</if>>
<<if ndef $SFGear>>
	<<set $SFGear = 0>>
<</if>>
<<if ndef $SavedLeader>>
	<<set $SavedLeader = $leadingTroops>>
<</if>>
<<if ndef $SavedSFI>>
	<<set $SavedSFI = $SFIntervention>>
<</if>>

/* recalculation widgets */
<<fixBrokenUnits>>
<<fixBrokenStats>>
<<recalcManpower>>
<<recalcBaseStats>>
<<set $wasToggledBefore = 1>>

<br>Missing Security Expansion variables set. All done!

src/Mods/SecExp/SecExpBackwardCompatibility.tw