--------------------------------------------------------------------------------
-------------- META MOD LUA FRAMEWORK 2.1 Multi Edition ------------------------ 
--- for C&C3 Kane's Wrath, C&C3 Tiberium Wars, BFME2 1.09, BFME2 ROTWK 2.02 ----
---------------------by MJJSTRAL aka MetaIdea ----------------------------------
--------------------------------------------------------------------------------

GAME_ACTIVE = SAGE_GAME --"BFME2_ROTWK_2.02" --"C&C3KW", "C&C3TW", "BFME2_1.09", 

MetaModInit = false
function MetaModInitEssential()
	if EvaluateCondition("IS_GAME_MODE_ACTIVE", "ringheroes") then
		--ExecuteAction("DISPLAY_NOTIFICATION_BOX", "Generic", "RULE:AllowRingHeroes", 5)
	end
	--ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", CoroutineMaster, "MainCoroutine", NeutralTeam, "((0.00,0.00,0.00))", 0)
	GlobalTeamTable = GetValidTeamList()
	AdminTeamName=GlobalTeamTable[1]
	ExecuteAction("SET_FPS_LIMIT", 60)
	InitiateMapExtendEvaluator()
	MetaModInit = true
end

CoroutineMaster = "MainCoroutine"

BFMEII_METAMOD =
[[
	-----------------------------------------------------------------------------------
	-----------------BFME II ROTWK EXCLUSIVE META MOD ADAPTION-------------------
	-----------------------------------------------------------------------------------
	BFMEIIROTWK_ACTIVE = 1
	
	MainFolder="MetaModIO" --"BFMEII-ROTWK-2.02-MetaModIO"
	ProcessName="game.dat"
	GENERIC_DUMMY = "MenPorter"
	
	CNC3EP1FOLDERPATH = {
	[[C:\Users\]] .. getenv("USERNAME") .. [[\Documents\]]
	}
	
	CNC3EP1FOLDER = { 
		[[Meine Der Herr der Ringe™, Aufstieg des Hexenkönigs™-Dateien]],
		""
	}
	
	function RunExternalLuaScript2(self)
		dofile([[C:\X\_GameUserData\Documents\Meine Der Herr der Ringe™, Aufstieg des Hexenkönigs™-Dateien\]] .. MainFolder .. [[\LIVE_INPUT.lua]]) --temporary
		--dofile([[scripts.lua]])
		ExecuteAction("DISPLAY_TEXT", "EXTERNAL LUA SCRIPT EXECUTED")
	end
	
	function DISABLED_print(output, display_time)
		if display_time == nil then display_time = 3 end
		output = tostring(output)
		ExecuteAction("DISPLAY_NOTIFICATION_BOX", "Generic", "\n\n\n\n" .. output .. "\n", display_time) --45 max per line
		--ExecuteAction("SHOW_MILITARY_CAPTION", "\n\n\n\n" .. output .. "\n", display_time)
	end
	
	function SelectMetaControlTabMenu(self)
		if MetaModInit == false then MetaModInitEssential() end
		local TeamName = GetTeamName(self)
		local TempObjectRef = RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE", "MetaMenu", TeamName, TempObjectRef)
		if not EvaluateCondition("NAMED_NOT_DESTROYED", TempObjectRef) then 
			--ExecuteAction("CREATE_OBJECT", "MetaMenu", TeamName, "((0.00,0.00,0.00))", 0)
			ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "MetaMenu_0", "MetaMenu", TeamName, "((0.00,0.00,0.00))", 0)
			ExecuteAction("UNIT_TELEPORT_TO_WAYPOINT", "MetaMenu_0", GetPlayerStartWaypointByTeam(TeamName))
			--ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "MetaMenu_0", TeamName, GetPlayerStartWaypointByTeam(TeamName))
		end
		ExecuteAction("OBJECT_FORCE_SELECT", TeamName, "MetaMenu", "0", "placeholder")   --if "0" changed to "1" centerview
		--local deselect1 = function() ExecuteAction("DESELECT") end
		--local deselect2 = function() ExecuteAction("UNIT_CLEAR_MODELCONDITION",GetObj.TableByHashAndTeam("1050534791",%TeamName),"SELECTED") end
		--SetScriptTimerFast(0.01,deselect1)
		--SetScriptTimer(1,deselect2)
	end
	
	KindOfTable=KindOfTable_BFMEIIROTWK
	KindOfIndexTable=KindOfTable_BFMEIIROTWK_
	CountTeamsKindOf = CountTeamsKindOf_BFME2ROTWK
	
	function SpawnMyHero(self)
		ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "CreateAHero", GetTeamName(self), GetPlayerStartWaypointByTeam(GetTeamName(self)))
	end	
	
	function CountTeamsKindOf(team, kindof)
		for i=1,7777,1 do	
			if not EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, i, KindOfTable[kindof]) then
				return (i-1)
			end
		end
		return 0
	end

	NotificationBoxTypes = { "BonusObjectiveCompleted", "Generic", "HeroDeath", "HeroEarnedAward", "HeroGranted",
	"HeroInitialSpawn", "HeroRespawn", "Hint", "Instructional", "NewBonusObjective", "NewObjective", "ObjectiveCompleted",
	"ObjectiveReminder" }
	
	NAOD.RoundType={
		["StandardSpawner"]=NAOD.StandardSpawner,
		["RandomUnitTypeSwarm"]=NAOD.RandomUnitTypeSwarm,
		["RandomUnitCategorySwarm"]=NAOD.RandomUnitCategorySwarm,
		["Endboss"]=NAOD.Endboss1
	}
	
	NAOD.RandomRoundType={
		["RandomUnitTypeSwarm"]=NAOD.RandomUnitTypeSwarm,
		["RandomUnitCategorySwarm"]=NAOD.RandomUnitCategorySwarm,
	} 

	NAOD.UnitTableCategories = { "Infantry1","Infantry2","Infantry3","Vehicle1","Vehicle2","Vehicle3","Vehicle4","Air1","Air2","AntiAir","AntiInfantry","Distance"}
	NAOD.UnitTable = {}
	NAOD.UnitTable.Infantry1 = OBJECT_TYPE_LIST_INFANTRY_HORDE
	NAOD.UnitTable.Infantry2 = OBJECT_TYPE_LIST_INFANTRY_HORDE
	NAOD.UnitTable.Infantry3 = OBJECT_TYPE_LIST_HERO
	NAOD.UnitTable.Vehicle1  = OBJECT_TYPE_LIST_CAVALRY
	NAOD.UnitTable.Vehicle2  = OBJECT_TYPE_LIST_HORDE
	NAOD.UnitTable.Vehicle3  = OBJECT_TYPE_LIST_MONSTER
	NAOD.UnitTable.Vehicle4  = OBJECT_TYPE_LIST_TOP
	NAOD.UnitTable.Air1      = OBJECT_TYPE_LIST_ORC
	NAOD.UnitTable.Air2      = OBJECT_TYPE_LIST_BIG_MONSTER
	NAOD.UnitTable.AntiAir   = OBJECT_TYPE_LIST_ARCHER_HORDE
	NAOD.UnitTable.AntiInfantry = OBJECT_TYPE_LIST_CAVALRY
	NAOD.UnitTable.Distance  = OBJECT_TYPE_LIST_MACHINE
	NAOD.UnitTable.Engineers = OBJECT_TYPE_LIST_ANIMALS
	NAOD.UnitTable.Misc      = OBJECT_TYPE_LIST_SUMMONED
	
	WeaponNameTable={}
	SpecialPowerNameTable={}
	UpgradeNameTable={}
	CommandButtonTable={}
	CampaignFlagTypeIndexTable={}
	MusicTracksTable = {}
	Movies={}
	--EvaEventTable={}
	MissionDialogue={}
	Sounds={}
	ObjectTypeTable=BFMEII_ROTWK_OBJECT_LIST_ALL
	WorldBuilderObjectTypeTable={}
	ObjectHashIndexTypeTable={}
	WorldBuilderNonLuaObjectsTypeTable={}
	RelevantObjectTypeTable=RelevantObjectTypeTable_BFME2_ROTWK
	RelevantNonLuaObjectsTypeTable=RelevantNonLuaObjectsTypeTable_BFME2_ROTWK
	NonLuaObjectsTypeTable=RelevantNonLuaObjectsTypeTable_BFME2_ROTWK
	RelevantObjectHashIndexTypeTable={}
	TemplateExclusionTable={}
	DiplObjectExclusionList = {}
	AllUnitsTypesTable={"CreateAHero"}
	OCLSpawnExtenderTable={}
	
	CoordinateHelperTable = {}
	CoordinateHelperTable["Initialized"]=0
	CoordinateHelperObjectTable = {}
	CoordinateHelperObjectTable["CoordinateAnchor"] = {}
	CoordinateHelperObjectTable["CoordinateAdd1X"] = {}
	CoordinateHelperObjectTable["CoordinateAdd10X"] = {}
	CoordinateHelperObjectTable["CoordinateAdd100X"] = {}
	CoordinateHelperObjectTable["CoordinateAdd1000X"] = {}
	CoordinateHelperObjectTable["CoordinateAdd1Y"] = {}
	CoordinateHelperObjectTable["CoordinateAdd10Y"] = {}
	CoordinateHelperObjectTable["CoordinateAdd100Y"] = {}
	CoordinateHelperObjectTable["CoordinateAdd1000Y"] = {}
	CoordinateHelperObjectTable["CoordinateAnchor"]["name"]="CoordinateAnchor"
	CoordinateHelperObjectTable["CoordinateAdd1X"]["name"]="CoordinateAdd1X"
	CoordinateHelperObjectTable["CoordinateAdd10X"]["name"]="CoordinateAdd10X"
	CoordinateHelperObjectTable["CoordinateAdd100X"]["name"]="CoordinateAdd100X"
	CoordinateHelperObjectTable["CoordinateAdd1000X"]["name"]="CoordinateAdd1000X"
	CoordinateHelperObjectTable["CoordinateAdd1Y"]["name"]="CoordinateAdd1Y"
	CoordinateHelperObjectTable["CoordinateAdd10Y"]["name"]="CoordinateAdd10Y"
	CoordinateHelperObjectTable["CoordinateAdd100Y"]["name"]="CoordinateAdd100Y"
	CoordinateHelperObjectTable["CoordinateAdd1000Y"]["name"]="CoordinateAdd1000Y"
	CoordinateHelperObjectTable["CoordinateAnchor"]["coord"]="x"
	CoordinateHelperObjectTable["CoordinateAdd1X"]["coord"]="x"
	CoordinateHelperObjectTable["CoordinateAdd10X"]["coord"]="x"
	CoordinateHelperObjectTable["CoordinateAdd100X"]["coord"]="x"
	CoordinateHelperObjectTable["CoordinateAdd1000X"]["coord"]="x"
	CoordinateHelperObjectTable["CoordinateAdd1Y"]["coord"]="y"
	CoordinateHelperObjectTable["CoordinateAdd10Y"]["coord"]="y"
	CoordinateHelperObjectTable["CoordinateAdd100Y"]["coord"]="y"
	CoordinateHelperObjectTable["CoordinateAdd1000Y"]["coord"]="y"
	CoordinateHelperObjectTable["CoordinateAnchor"]["add"]=0
	CoordinateHelperObjectTable["CoordinateAdd1X"]["add"]=1
	CoordinateHelperObjectTable["CoordinateAdd10X"]["add"]=10
	CoordinateHelperObjectTable["CoordinateAdd100X"]["add"]=100
	CoordinateHelperObjectTable["CoordinateAdd1000X"]["add"]=1000
	CoordinateHelperObjectTable["CoordinateAdd1Y"]["add"]=1
	CoordinateHelperObjectTable["CoordinateAdd10Y"]["add"]=10
	CoordinateHelperObjectTable["CoordinateAdd100Y"]["add"]=100
	CoordinateHelperObjectTable["CoordinateAdd1000Y"]["add"]=1000
]]

CreateAHeroParts = 
{ "SWORD","BOW","BOW_03","BOW_04","BOW_05","TRUNK01","STAFF_LIGHT","OBJECT01","SHIELD01","SHIELD_01","SPEAR",
"SHIELD_B","SHIELD_C","SHIELD_D","B_SHIELD","WEAPON_A","WEAPON_B","WEAPON_C","WEAPON_D","AXE02","AxeWeapon",
"Belthronding","Mithlondrecurve","Dwarf_Axe01","FireBrand","FireBrand_SM","FireBrand_FX01","FireBrand_FX02",
"Gurthang","Gurthang_SM","HeroOfTheWestShield","HeroOfTheWestShield_SM","MithlondBow","TrollBane","TrollBane_SM",
"TrollBane_FX01","TrollBane_FX02","TrollMace","TrollSword","WestronSword","WestronSword","WestronSword_SM",
"WizardStaff01","WizStaff01_FX01","WizStaff01_FX2","WizStaff01_FX3","WizStaff01_FX4","WizardStaff02",
"WizStaff02_FX1","WizardStaff03","WizStaff03_FX01","WizStaff03_FX02","WizardStaff04","WizStaff04_FX01",
"WizStaff04_FX02","WizStaff04_FX03","WizStaff04_FX04","WizStaff04_FX05","WizStaff04_FX06","WizStaff04_FX07",
"WizardSword","CMSword01","CMSword02","CHEST_00","CHEST_01","CHEST_02","BOOT_00","BOOT_01","BOOT_02","BOOT_03",
"BOOT_04","BOOT_05","BOOT_06","SHLD_00","SHLD_01","SHLD_02","SHLD_03","SHLD_04","SLDR_00","SLDR_01","SLDR_02",
"SLDR_03","SLDR_04","SLDR_05","SLDR_06","Shield_1OG","Shield_2OG","HAIR_00","HAIR_01","HLMT_00","HLMT_01",
"HLMT_02","HLMT_03","HLMT_04","HLMT_05","HLMT_06","HLMT_07","HLMT_07_LOD1","HLMT_08","HLMT_09","GNLT_00",
"GNLT_01","GNLT_02","GNLT_03","GNLT_04","GNLT_05","GNLT_06","GNLT_07","GNLT_08","GHLT_08","GNLT_09","GNLT_09_LOD1",
"GNLT_10","SPR_01","PAXE_01","PAXE_01_LOD1","SWRD_01","SWRD_02","SWRD_03","SWRD_04","SWRD_05","SWD_01","SWD_02",
"SWD_03","SWD_04","STFF_05","STFF_06","objSLDR_01","objSLDR_02","objSLDR_03","objHLMT_01","objHLMT_02","objHLMT_03",
"objHLMT_04","Uruk_Sword_01","Uruk_Sword_02","Uruk_Sword_03","TrollTree","TrollHammer","CLUB_01","CLUB_02","CLUB_03",
"HMR_01","HMR_02","HMR_03","HMR_04","AXE_01","AXE_02","AXE_03","BARREL","OBJECT02", "ARROW","PLANE02" }

BFMEII_ROTWK_OBJECT_LIST_ALL = {
"AIBaseMarkerBase","AIFlag","AmonSulGate","AmonSulKeep","AmonSulMallornTree","AmonSulTower","AmonSulTower2","AmonSulWall","AmonSulWall45","AngFornostSmallSpire","AngFornostSpire","AngFornost_FallingTower","AngFornost_WallSegment","AngForStronghold","AngmarBannerDireSnowTroll","AngmarBannerHillTroll","AngmarBannerOrcWarrior","AngmarBannerSnowTroll",
"AngmarBannerWolfRider","AngmarBarracks","AngmarBattleTowerExpansion","AngmarCatapultExpansion","AngmarCitadelCarnDum","AngmarDarkDunedain","AngmarDarkDunedainHorde","AngmarDarkRanger","AngmarDarkRangerHorde","AngmarDarkRangersSummonEgg","AngmarDen","AngmarDireWolf","AngmarDireWolfHorde","AngmarForgeWorks","AngmarFortress","AngmarFortressCitadel","AngmarFortressExpansionPadCorner","AngmarFortressSpikes",
"AngmarHallofTwilight","AngmarHillTroll","AngmarHillTrollHorde","AngmarHourOfTheWitchKingEgg","AngmarHwaldar","AngmarInfantryBanner","AngmarKarsh","AngmarKennelExpansion","AngmarLongIceShotObject","AngmarMill","AngmarMorgramir","AngmarNecroAcolyte","AngmarNecromancerBanner","AngmarNecromancerHorde","AngmarOrcWarrior","AngmarOrcWarriors","AngmarPorter","AngmarRhudaurSlinger",
"AngmarRhudaurSlingers","AngmarRhudaurSpearman","AngmarRhudaurSpearmen","AngmarRogash","AngmarSentryTower_Independent","AngmarShadeWolf","AngmarSnowTroll","AngmarSnowTrollHorde","AngmarSummonOrcEgg","AngmarThrallMaster","AngmarThrallMasterBanner","AngmarThrallMasterWolfBanner","AngmarTrollSlingDeadHulk","AngmarWallCatapultSmall","AngmarWallCliffCap","AngmarWallGateSmall","AngmarWallHubSmall","AngmarWallHubSmallExpansion",
"AngmarWallPosternGateSmall","AngmarWallSegmentSmall","AngmarWallTowerSmall","AngmarWolfRider","AngmarWolfRiders","AngmarWorker","AnimalWanderPoint","AragornKnife","ArgonathStatues","ArnorArcher","ArnorArcherHorde","ArnorArcherRange","ArnorArgeleb","ArnorArrowTowerExpansion","ArnorArvedui","ArnorArveleg","ArnorBarracks","ArnorBaseDefenceFoundation",
"ArnorBaseTower","ArnorBaseWall","ArnorBaseWallTreb","ArnorBuildingFoundation","ArnorCampKeep","ArnorCampKeepSymbioticBase","ArnorCaptain","ArnorCaptainStealthless","ArnorCastleBarracks_temp","ArnorCastleBaseKeep","ArnorCastleBookEnd","ArnorCastleFoundation_temp","ArnorCastleGateTower","ArnorCastleKeep","ArnorCastleKeep_temp","ArnorCastleWallHub","ArnorCastleWallSegment","ArnorCastleWallTower",
"ArnorCastleWallTrebuchet","ArnorCastleWallUpgradeNode","ArnorCastleWall_temp","ArnorCavalry","ArnorCavalryBanner","ArnorDunedainAlliesSummonEgg","ArnorElvenBarracks","ArnorFarmInterface","ArnorFighter","ArnorFighterHorde","ArnorForbiddenPool","ArnorForge","ArnorFortress","ArnorFortressCitadel","ArnorFortressExpansionPadCorner","ArnorGarrisonTowerExpansion","ArnorGate","ArnorGBCampFloor",
"ArnorGBCampWall","ArnorGBCampWallC","ArnorGBCastleElevator","ArnorGBCastleFloor","ArnorGBCastleGate","ArnorGBCastleTrebuchet","ArnorGBCastleWallF","ArnorGBCastleWallG","ArnorGBCastleWallR","ArnorGBCastleWallsA","ArnorGBCastleWallsBT","ArnorGBCastleWallT1","ArnorGBCastleWallT2","ArnorGBMGateDoor","ArnorGreatKeep","ArnorInfantryBanner","ArnorInnerWall","ArnorKeep",
"ArnorKnightHorde","ArnorMallornTree","ArnorMarketPlace","ArnorPorter","ArnorRanger","ArnorRangerHorde","ArnorRangersSummonEgg","ArnorSentryTower","ArnorSilverTree","ArnorStable","ArnorStatue","ArnorTent","ArnorTowerShieldGuard","ArnorTowerShieldGuardHorde","ArnorTrebuchetDeadHulk","ArnorTrebuchetExpansion","ArnorWallCliffCap","ArnorWallFoundation",
"ArnorWallGate","ArnorWallGateSmall","ArnorWallHubSmall","ArnorWallHubSmallExpansion","ArnorWallHubSmallUpgradeable","ArnorWallPosternGate","ArnorWallPosternGateSmall","ArnorWallRamp","ArnorWallSegmentSmall","ArnorWallTowerSmall","ArnorWallTrebuchetSmall","ArnorWallUpgradeNodeSmall","ArnorWell","ArnorWhiteTower","ArnorWorker","ArnorWorkshop","ArrowVolleyExplosion","ArwenFlood",
"AtmoClouds","Avalanchechunk","Bag","BalrogOPT","BaradDur","BaradDur1","BaradDur2","BaradDur3","BaradDur4","BaradDur5","BaradDur6","BaradDur7","BaradDur8","BaradDur9","BaradDurCINE","Barrel02","BarrelKeg","Barricade01",
"Barricade01d","Barricade02d","Barricade03d","BarricadeMain","BarricadeMainD","BarricadeMainD_Structure","BarricadeSharp","BarricadeSharp_Destructible","BarricadeSharp_Structure","BarrowCorruptProxy","BarrowWight","BarrowWightLair","BarrowWightSummonEgg","Bat","BatteringRam","BattleFlag","BattleWagonArrow","Beams",
"Bear","Bench01","Bench02","BigDustCloud","BirdEmitter","BlueMountainBridge","BlueMountainGate","BlueMountainsGateDoors","BlueMountainWall","BlueMtnArch01","BlueMtnBanner","BlueMtnBridge","BlueMtncatapult","BlueMtnCol","BlueMtnColD","BlueMtnCorner","BlueMtnCorner2","BlueMtnDestructableDoor",
"BlueMtnEdge","BlueMtnEdgeBridge","BlueMtnEdgeCorner","BlueMtnEdgeNiche","BlueMtnEdgeWall","BlueMtnFloor01","BlueMtnGateDoors","BlueMtnGodRay","BlueMtnLadder","BlueMtnMainGate","BlueMtnNiche","BlueMtnPropTrack","BlueMtnRubble","BlueMtnRubble2","BlueMtnSecret","BlueMtnStair","BlueMtnStairAngle","BlueMtnStairLeft",
"BlueMtnStairRight","BlueMtnStep","BlueMtnThrone","BlueMtnTorch","BlueMtntower","BlueMtntower2","BlueMtnTrack","BlueMtnTrackDown","BlueMtnTrackEnd","BlueMtnTrackMiddle","BlueMtnTrackTurn","BlueMtnWall01","BlueMtnWall03","BlueMtnWallDamage","BlueMtnWallDamage2","BlueMtnWallDamage3","BlueMtnWell","BlueMtnWheel",
"BlueMtnWheel2","Boar","BoatDeathSplash","BombsStack","BrandSpecialArrow","BrokenDoor","BrokenFurniture","BuildingDamageBits01","BuildingDamageBits02","BuildingDamageBits03","BuildingDamageBits04","BuildingGenBitTemplate","BuildingGenBitTemplateAnimated","CampFlag","CampFlagNE","CampFlagNW","CampFlagSE","CampFlagSW",
"CampOnly01","CampOnly02","CampOnly03","CampOnly05","CampOnly06","CampOnly07","CampOnly08","CaptureFlag","CarnDumMainGate","Cart01","Cart02","CartBigBomb","CartBomb","CartPiece","CartWheel","CartWreck","CastleBookEnd","CastleFlag",
"CatapultWreck01","Cauldron","CaveTrollLair","CBHobbitBldg01","CBHobbitBldg02","CelduinDockSegmentA","CelduinDockSegmentB","CelduinDockSegmentC","CelduinDockSegmentD","CelduinDockSegmentE","CelduinDockSegmentF","CelduinDockSegmentG","CelduinDockSegmentH","CelduinDockSegmentI","CelduinDockSegmentJ","CelduinDockSegmentK","CelduinDockSegmentL","CelduinDockSegmentM",
"CelduinDockSegmentN","CelduinDockSegmentO","CelduinDockSegmentP","CelduinDockSegmentQ","CelduinDockSegmentR","CelduinDrawBridge01","Celduin_Barrel01","Celduin_Barrel02","Celduin_Barrel03","Celduin_Barrel04","Celduin_Boat01","Celduin_Boat02","Celduin_Boat03","Celduin_Boat04","Celduin_Boat05","Celduin_FishNet01","Celduin_FishNet02","Celduin_FishNet03",
"ChainFence","Chest01","Chest02","Chest03","Chest04","ChestMetal01","ChestMetal02","Chicken","CINE_Pine1","CINE_Pine2","CINE_SkyboxMoat","CloudBreakSunbeam","CloudBreak_Healing","ColorTableTestOBJ","Cow","Crate01","CrateBombs","CrateBombsSpill",
"CreateAHero","CreateAHeroBreadCrumb_Level1","CreateAHeroBreadCrumb_Level2","CreateAHeroBreadCrumb_Level3","CreateAHeroCarosel01","CreateAHeroFamiliar_Base","CreateAHeroOilDrum_Level1","CreateAHeroOilDrum_Level2","CreateAHeroOilDrum_Level3","CreateAHeroTornado_Level1","CreateAHeroTornado_Level2","CreateAHeroTornado_Level3","CreateaHero_Gondor01","CreateaHero_Gondor02","CreateaHero_Gondor03","CreateaHero_Gondor04","CreateaHero_Gondor05","CreateaHero_Gondor06",
"CreateaHero_Gondor07","CreateaHero_Ise01","Create_A_Hero_Platform","Crebain","CropBundle","CropBundle2","CropBundle3","CropPile","Crow","Crow_Perched","DaleBuilding01","DaleBuilding02","DaleBuilding03","DaleBuilding04","DaleBuilding05","DaleBuilding06","DaleBuilding07","DaleBuilding08",
"DaleFountain","Daleprops1","Daleprops2","Daleprops3","Daleprops4","DarkFortress","DarkFortress_Post","DarkFortress_Spire1","DarkFortress_Spire2","DarknessCaster","DarknessWeatherChanger","DeadOrcA","DeadOrcB","DeadOrcC","DeadOrcD","DeadOrcE","DeadOrcF","DeadOrcG",
"DeathCage","DeathCage02","DeerMale","DireWolfLair","Dog","DoGoldurWallCatapultSmall","DoGoldurWallHubSmall","DoGoldurWallHubSmall_Damagable","DoGoldurWallTowerSmall","DolGoldurCastle","DolGoldurMainGate","DolGoldurPrison","DolGoldurSmallGate","DolGoldurStatue","DolGoldurWallSegmentSmall","DolGoldurWallSegmentSmall_Damagable","Dove_Perched","Dove_white_in_game",
"DragonBones","Drogoth","DryDock","Duck","DunedainAlliesSummonEgg","DurinsTower01","DwarfBarracks","DwarvenArcheryRange","DwarvenAxe","DwarvenAxeBombard","DwarvenAxeBombardForgedBlade","DwarvenAxeForgedBlade","DwarvenAxeThrower","DwarvenAxeThrowerHorde","DwarvenBanner","DwarvenBattleWagonAxeThrower","DwarvenBattleWagonBannerCarrier","DwarvenBattleWagonMenOfDale",
"DwarvenBattleWagonPhalanx","DwarvenBunker","DwarvenCaptainofDale","DwarvenCastleWallCatapult","DwarvenCastleWallGate","DwarvenCastleWallHub","DwarvenCastleWallSegment","DwarvenCastleWallTower","DwarvenCatapult","DwarvenCatapultExpansion","DwarvenDain","DwarvenDemolisher","DwarvenEngineer","DwarvenEreborTowerTowerExpansion","DwarvenFortress","DwarvenFortressCitadel","DwarvenFortressExpansionPadCorner","DwarvenGloin",
"DwarvenGloin_Temp","DwarvenGuardian","DwarvenGuardianHorde","DwarvenGuardian_C","DwarvenGuardian_C_static","DwarvenHallExpansion","DwarvenHearth","DwarvenMagicDoor","DwarvenMenOfDale","DwarvenMenOfDaleAlliesSummonEgg","DwarvenMenOfDaleHorde","DwarvenMightyCatapultMith","DwarvenMiner","DwarvenPhalanx","DwarvenPhalanxHorde","DwarvenPorter","DwarvenSentryTower_Independent","DwarvenSiegeWorks",
"DwarvenStatue","DwarvenSummonedCitadel","DwarvenSummonedCitadelEgg","DwarvenSummonedCitadelExpansionPad","DwarvenSummonedCitadelKeep","DwarvenWallCatapultSmall","DwarvenWallCliffCap","DwarvenWallGateSmall","DwarvenWallHubSmall","DwarvenWallHubSmallExpansion","DwarvenWallPosternGate","DwarvenWallPosternGateSmall","DwarvenWallSegmentSmall","DwarvenWallTowerSmall","DwarvenWorker","DwarvenZerker","DwarvenZerkerHorde","DwarvishRuinSnow01",
"DwarvishRuinSnow02","DwarvishRuinSnow03","DwarvishRuinSnow04","DwarvishRuinSnow05","DwarvishRuinSnow06","DwarvishRuinSnow07","Easterling_Banner","Easterling_Banner2","Easterling_Banner3","Easterling_Banner4","Easterling_Barracks","Easterling_House_01","Easterling_House_02","Easterling_Rack1","Easterling_Rack2","Easterling_Temple","Easterling_Tower","Easterling_WindMill",
"EBCampFence","EBCampFloor","EBCastleFloor","EBGarrisonableTower","EconomyPlotFlag","EconomyPlotFlag_GondorPreBuilt01","EconomyPlotFlag_GondorPreBuilt02","EconomyPlotFlag_GondorPreBuilt03","EconomyPlotFlag_GondorPreBuilt04","EconomyPlotFlag_GondorPreBuilt05","EconomyPlotFlag_GondorPreBuilt06","EconomyPlotFlag_GondorPreBuilt07","EconomyPlotFlag_GondorPreBuilt08","Egret","ElkFemale","ElkMale","ElrondWhirlwind","ElvenAlliesSummonEgg",
"ElvenArwen","ElvenBanner","ElvenBarracks","ElvenBarracksBFME1","ElvenBattleTower","ElvenBuildingFoundation","ElvenCampKeep","ElvenCastleBaseKeep","ElvenCastleWallGate","ElvenCastleWallHub","ElvenCastleWallHubExpansion","ElvenCastleWallSegment","ElvenCitadel","ElvenCivilianFarm01","ElvenCivilianFarm02","ElvenCivilianFarm03","ElvenCivilianFarm04","ElvenCivilianFarm05",
"ElvenElrond","ElvenEntMoot","ElvenFloodgateExpansion","ElvenFortress","ElvenFortressCrystalMoat","ElvenFortressExpansionPadCorner","ElvenGaladriel","ElvenGlorfindel","ElvenGreenPasture","ElvenHaldir","ElvenImladrisWarrior","ElvenLorienArcher","ElvenLorienArcherHorde","ElvenLorienWarrior","ElvenLorienWarriorHorde","ElvenMallornTree","ElvenMirkwoodArcher","ElvenMirkwoodArcherBanner",
"ElvenMirkwoodArcherHorde","ElvenMirrorOfGaladriel","ElvenMithlondSentryHorde","ElvenPorter","ElvenRivendellArcher","ElvenRivendellArcherHorde","ElvenRivendellLancer","ElvenRivendellLancerBanner","ElvenRivendellLancerHorde","ElvenRuinSnowy01","ElvenRuinSnowy02","ElvenRuinSnowy03","ElvenSentryTower","ElvenShipwreck01","ElvenShipwreck02","ElvenShip_Interface","ElvenStatue","ElvenThranduil",
"ElvenTransportShip","ElvenVigilantEntExpansion","ElvenWallCliffCap","ElvenWatchtowerExpansion","ElvenWhirlpool","ElvenWoodFlowerGrass","ElvenWoodGrass","ElvenWoodTree","ElvenWorker","EnshroudingMistPing","EntBuildingFoundation","EreaborGarrisonableTowerExt","EreborArch01","EreborBanner","EreborBBQ01","EreborBridge","EreborCart01","EreborCart02",
"EreborCart03","Ereborcatapult","EreborCeiling01","EreborCeiling02","EreborCeilingUp","EreborCeilingUp02","EreborCeilingUp03","EreborCeilingUp04","EreborCeilingUpC","EreborCorner01","EreborCorner02","Ereborcorner03","EreborCutter01","EreborDestructableDoor","EreborEdge","EreborEdgeCave","EreborEdgeCorner","EreborEdgeEnd",
"EreborEdgeNiche","EreborEdgeSpout","EreborEdgeWall","EreborFloor01","EreborGateDoors","EreborGold01","EreborLadder","EreborMainGate","EreborNiche01","EreborPropTrack","EreborRack01","EreborRack02","EreborStair","EreborStairAngle","EreborStairLeft","EreborStairRight","EreborStep","EreborTable01",
"EreborThrone","EreborTorch","Erebortower","Erebortower2","EreborTrack","EreborTrackDown","EreborTrackEnd","EreborTrackMiddle","EreborTrackTurn","EreborWall01","EreborWall02","EreborWallDown","EreborWallTall","EreborWallUp","EreborWell","EreborWheel","EreborWheel2","EregionForge",
"EttenmoorsGoblinKingFortress01","EttenmoorsGoblinKingFortress02","EttenmoorsGoblinKingFortress03","EttenmoorsGoblinKingFortressTower","EttenmoorsGoblinKingWall1","EttenmoorsGoblinKingWall1_unclimbable","EttenmoorsGoblinKingWall2","EttenmoorsGoblinKingWall3","EttenmoorsGoblinKingWall4","EttenmoorsShrub01","EttenmoorsShrub02","EttenmoorsShrub03","EvilFactionArrow","EvilFactionArrowBombard","EvilFactionFireArrow","EvilFactionFireArrowBombard","EvilFactionIceArrow","EvilFactionIceArrowBombard",
"EvilFactionShatteredArrowBit01","EvilManCorsairObsolete","EvilMenBlackRider","EvilMenTransportShip","EvilPort","EvilSentryTower","EvilShip_Interface","ExpansionFlag","ExpObj01","EyeOfSauron","EyeOfSauronFromRing","FangornTrollCave","FaramirSpecialArrow","FarmInterface","FearRadiator","FeedingTroughs","FellStrengthWeaponObject","FireBonfire",
"FireBonfireBigSmoke","FireCampfire","FireCampfireNight","FireDrakeLair","FirePit","Fireworks1","Fireworks2","Fish","Flag","Flag01","Flag02","Flag02_Camp","Flag03","Flag03_Camp","Flag04","Flag04_Camp","Flood","FloodgateFlood",
"FloodHorse","Footprints","ForBRamp1","ForBRamp2","ForBWall1","ForBWall2","ForBWall3","ForBWall4","ForBWall5","ForBWallPosternGate","ForlindonShrub01","ForlindonShrub02","ForlindonShrub03","FornostBrokenStatue1","FornostBrokenStatue2","FornostBrokenStatue3","FornostBuildingGov","FornostGate",
"FornostGate2","FornostGateGuard","FornostGateGuard2","FornostGateGuardDamaged","FornostGateLarge","FornostSmallTowerDamaged","FornostSmallWallDamaged","FornostSuperWeapon","Fornost_FallingTower","ForStronghold","FreezingRainCaster","FreezingRainWeatherChanger","Furnace","GaladrielTornado","GandalfLevelUpBeam","GBCampFloor","GBCampWall","GBCampWallC",
"GBCastleElevator","GBCastleFloor","GBCastleGate","GBCastleTrebuchet","GBCastleWallF","GBCastleWallG","GBCastleWallR","GBCastleWallsA","GBCastleWallsBT","GBCastleWallT1","GBCastleWallT2","GBCSigFire","GBFireObject","GBFSetTest","GBFSetTestRamp","GBGHTowerA","GBLiteBall","GBmagicDoor",
"GBMGateDoor","GBWTOPColumn1","GBWTOPColumn2","GBWTOPColumn3","GBWTOPColumn4","GBWTopRBud1","GBWTopRBud2","GBWTopRBud3","GBWTopStair","GBWTopStatue1","GBWTopStatue2","GBWTopStatue3","GBWTOPTemp","GBWTopWall1","GBWTopWall2","GBWTopWall3","GBWTopWall4","GenericBridge",
"GenericHarvestOnlyOptimizedTree","GenericHarvestOnlyOptimizedTreeA","GenericInteractableOptimizedDeadTree","GenericInteractableOptimizedTree","GenericNONInteractableOptimizedDeadTree","GenericNONInteractableOptimizedTree","GenericTorch","GenericTorch2","GHGarrisonableTower","GiantSpider","GladdenFieldsShrub01","GladdenFieldsShrub02","GladdenFieldsShrub03","Goat","GoatFemale","GoatMale","GoblinArcher","GoblinArcherHorde",
"GoblinBuildingFoundation","GoblinCampKeep","GoblinCave","GoblinCaveTroll","GoblinFighter","GoblinFighterHorde","GoblinFissure","GoblinSpiderRider","GoblinSpiderRiderBanner","GoblinSpiderRiderHorde","GondorAmonHenB1","GondorAmonHenB2","GondorAmonHenB3","GondorAmonHenB4","GondorAmonHenB5","GondorAmonHenC1","GondorAmonHenC2","GondorAmonHenC3",
"GondorAmonHenC4","GondorAmonHenC5","GondorAmonHenR1","GondorAmonHenR2","GondorAmonHenR3","GondorAmonHenS1","GondorAmonHenS2","GondorAmonHenS3","GondorAmonHenS4","GondorAmonHenS5","GondorAmonHenSP","GondorAmonHenW1","GondorAmonHenW2","GondorAmonHenW3","GondorAmonHenW4","GondorAmonHenW5","GondorAragorn","GondorArcher",
"GondorArcherFireArrow","GondorArcherFireArrowBombard","GondorArcherHorde","GondorArcherRange","GondorArmyofTheDeadEgg","GondorArmyofTheDeadSmallEgg","GondorArmyofTheDeadSmallEggs","GondorBarracks","GondorBaseDefenceFoundation","GondorBaseTower","GondorBaseWall","GondorBaseWallTreb","GondorBoromir","GondorBoromir_H","GondorBoromir_L","GondorBoromir_M","GondorBuildingFoundation","GondorBuildingGeneral01",
"GondorBuildingGeneral02","GondorBuildingGeneral03","GondorBuildingGeneral04","GondorBuildingGeneral05","GondorBuildingGeneral06","GondorBuildingGeneral07","GondorBuildingGeneral08","GondorBuildingGeneral09","GondorBuildingGeneral10","GondorBuildingGeneral11","GondorBuildingGeneral11NoFireD1","GondorBuildingGeneral11NoFireD2","GondorBuildingGeneral12","GondorBuildingGeneral13","GondorBuildingGeneral14","GondorBuildingGeneral15","GondorBuildingGeneral15NoFireD1","GondorBuildingGeneral15NoFireD2",
"GondorBuildingGeneral16","GondorBuildingGeneral17","GondorBuildingGeneral17NoFireD1","GondorBuildingGeneral17NoFireD2","GondorBuildingGeneral18","GondorBuildingGeneral19","GondorBuildingGeneral19NoFireD1","GondorBuildingGeneral19NoFireD2","GondorBuildingGeneral20","GondorBuildingGeneral21","GondorBuildingGeneral22","GondorBuildingGeneral23","GondorBuildingGeneral24","GondorBuildingGeneral25","GondorBuildingGeneral26","GondorBuildingGeneral27","GondorBuildingGeneral28","GondorBuildingGeneral29",
"GondorBuildingGeneral30","GondorBuildingGeneral31","GondorBuildingGeneral32","GondorBuildingGeneral32NoFireD1","GondorBuildingGeneral32NoFireD2","GondorBuildingGeneral33","GondorBuildingGeneral34","GondorBuildingGeneral35","GondorBuildingGeneral36","GondorBuildingGeneral37","GondorBuildingGeneral38","GondorBuildingGeneral39","GondorBuildingGeneral40","GondorBuildingGeneral41","GondorBuildingGeneral42","GondorBuildingGeneral43","GondorBuildingGeneral44","GondorBuildingGeneral45",
"GondorBuildingGeneral46","GondorBuildingGeneral47","GondorBuildingGeneral48","GondorBuildingGeneral49","GondorBuildingGeneral50","GondorBuildingGeneral51","GondorBuildingGeneral52","GondorBuildingGeneral53","GondorBuildingGeneral54","GondorBuildingGeneral55","GondorBuildingGeneral56","GondorBuildingGeneral57","GondorBuildingGeneral58","GondorBuildingGeneral59","GondorBuildingGeneral60","GondorBuildingGeneral61","GondorBuildingGeneral62","GondorBuildingGeneral63",
"GondorBuildingGeneral64","GondorBuildingGeneral65","GondorBuildingGeneral66","GondorBuildingGeneral67","GondorBuildingGeneral68","GondorBuildingGeneral69","GondorBuildingGeneral70","GondorBuildingGeneral71","GondorBuildingGeneral72","GondorBuildingGeneral73","GondorBuildingGeneral74","GondorBuildingGeneral75","GondorBuildingGeneral76","GondorBuildingGeneral77","GondorBuildingGeneral78","GondorBuildingGenericNew01","GondorBuildingGenericNew01Rubble","GondorBuildingGenericNew01Snow",
"GondorBuildingGenericNew02","GondorBuildingGenericNew02Rubble","GondorBuildingGenericNew02Snow","GondorBuildingGenericNew03","GondorBuildingGenericNew03Rubble","GondorBuildingGenericNew03Snow","GondorBuildingGenericNew04","GondorBuildingGenericNew04Rubble","GondorBuildingGenericNew04Snow","GondorBuildingGenericNew05","GondorBuildingGenericNew05Rubble","GondorBuildingGenericNew05Snow","GondorBuildingGenericNew06","GondorBuildingGenericNew06Rubble","GondorBuildingGenericNew06Snow","GondorBuildingGenericNew07","GondorBuildingGenericNew07Rubble","GondorBuildingGenericNew07Snow",
"GondorBuildingGenericNew08","GondorBuildingGenericNew08Rubble","GondorBuildingGenericNew08Snow","GondorBuildingIthilien01","GondorBuildingIthilien02","GondorBuildingIthilien03","GondorBuildingIthilien04","GondorBuildingIthilien05","GondorBuildingIthilien06","GondorBuildingIthilien07","GondorBuildingIthilien08","GondorBuildingIthilien09","GondorBuildingIthilien10","GondorBuildingIthilien11","GondorBuildingIthilien12","GondorBuildingIthilien13","GondorBuildingIthilien14","GondorBuildingIthilien15",
"GondorBuildingIthilien16","GondorBuildingIthilien17","GondorBuildingIthilien18","GondorBuildingIthilien19","GondorBuildingIthilien20","GondorBuildingIthilien21","GondorBuildingIthilien22","GondorBuildingIthilien23","GondorBuildingIthilien24","GondorBuildingIthilien25","GondorBuildingIthilien26","GondorBuildingIthilien27","GondorBuildingIthilien28","GondorBuildingIthilien29","GondorBuildingIthilien30","GondorBuildingIthilien31","GondorBuildingIthilien32","GondorBuildingIthilien45",
"GondorBuildingIthilien46","GondorBuildingIthilien47","GondorBuildingIthilien48","GondorBuildingIthilien50","GondorBuildingIthilien51","GondorBuildingSizeTemplate","GondorBuildingTopDetail","GondorCampKeep","GondorCampKeepSymbioticBase","GondorCaptain","GondorCastleBarracks_temp","GondorCastleBaseKeep","GondorCastleBridge","GondorCastleElevator","GondorCastleFoundation_temp","GondorCastleGateL","GondorCastleGateR","GondorCastleGateTower",
"GondorCastleKeep","GondorCastleKeep_temp","GondorCastleUpgrade","GondorCastleWall","GondorCastleWallHub","GondorCastleWallSegment","GondorCastleWallTower","GondorCastleWallTrebuchet","GondorCastleWallUpgradeNode","GondorCastleWall_temp","GondorCatacombs","GondorCavalry","GondorCavalryBanner","GondorCavalryDeadRiderB","GondorCavalryDeadRiderD","GondorCivilianFemaleHorde","GondorCivilianMaleHorde","GondorDamrod",
"GondorDeadRiderDEDA","GondorDenethor","GondorEarnur","GondorFaramir","GondorFighter","GondorFighterHorde","GondorForbiddenPool","GondorForge","GondorGandalf","GondorGandalfWhite_H","GondorGandalfWhite_L","GondorGandalfWhite_M","GondorGate","GondorGreatKeep","GondorGwaihir","GondorHeroStatue","GondorHseHeal","GondorInfantryBanner",
"GondorInnerWall","GondorIsildur","GondorIthilienBridge","GondorIthilienBridge2","GondorKeep","GondorKnightHorde","GondorKnightsofDol","GondorKnightsofDolHorde","GondorMarketPlace","GondorRanger","GondorRangerHorde","GondorRangerNoStealth","GondorRangersSummonEgg","GondorSentryTower","GondorSilverTree","GondorStable","GondorStatue","GondorTent",
"GondorTowerShieldGuard","GondorTowerShieldGuardGeneric","GondorTowerShieldGuardHorde","GondorTownsman","GondorTownsmanTorch","GondorTownsPair","GondorTownsWoman","GondorTrebuchetDeadHulk","GondorWallFoundation","GondorWell","GondorWhiteTower","GondorWoodCutter","GondorWoodDock","GondorWorker","GondorWorkshop","GoodFactionArrow","GoodFactionArrowBombard","GoodFactionArrowDeadeye",
"GoodFactionFireArrow","GoodFactionFireArrowBombard","GoodFactionShatteredArrowBit01","GoodPort","GrassEregion01","GUGandalfHeavenRays","HaradBuildingArmyK","HaradBuildingBarrack","HaradBuildingBarrack2","HaradBuildingChurch","HaradBuildingFarm","HaradBuildingFoundation","HaradBuildingWatch","HaradCampFlag","HaradCampKeep","HaradFence","HarlindonRuin01","HarlindonRuin02",
"HarlindonRuin03","HarlindonRuin04","HarlindonRuin05","HarlindonRuin06","HarlindonRuin07","HarlindonRuin08","HarlindonRuin09","HarlindonRuin10","HarlindonRuin11","HarlindonRuin12","HarlindonRuin13","HarlindonRuin14","HarlindonRuin15","HarlindonRuin16","HarlindonRuin17","HarlindonRuin18","HarlindonRuin19","HarlindonRuin20",
"Haystack","HealSpellHordeReplenishPing","Helm'sDeep_DeepingWall","Helm'sDeep_DeepingWallDrain","Helm'sDeep_KeepWall","Helm'sDeep_MainWall","Helm'sDeep_Ramp","HelmsDeepArcade","HelmsDeepCauseway","HelmsDeepCulvert","HelmsDeepdiSectionA6","HelmsDeepdiSectionA7","HelmsDeepdiSectionA8","HelmsDeepdiStair1","HelmsDeepdiStair2","HelmsDeepdiStep1","HelmsDeepdiStep2","HelmsDeepdiWall1",
"HelmsDeepdiWall2","HelmsDeepdiWall2_Prop","HelmsDeepdoBridge1","HelmsDeepdoSectionA2","HelmsDeepdoSectionA2_Prop","HelmsDeepdoSectionA5","HelmsDeepdoSectionB1","HelmsDeepdoSectionD","HelmsDeepdoStairsA1","HelmsDeepdoStairsA4","HelmsDeepdoStairsA5","HelmsDeepdwStairsA1","HelmsDeepdwStairsA2","HelmsDeepGate","HelmsDeepGate1","HelmsDeepGate2","HelmsDeepGatehouseCenter","HelmsDeepGatehouseLeft",
"HelmsDeepGatehouseRight","HelmsDeepkiSectionA3","HelmsDeepkiSectionA4","HelmsDeepkiSectionA5","HelmsDeepkiSectionB","HelmsDeepPavement01","HelmsDeepPavement02","HelmsDeepRampart02","HelmsDeepRampart03","HelmsDeepRampart04","HelmsDeepRampart05","HelmsDeepRampart05a","HelmsDeepRampartInvisible","HelmsDeepSectionAi","HelmsDeepSectionB","HelmsDeepSectionC","HelmsDeepTower","HighPass_FallingIceTower",
"Hillman1SummonEgg","Hillman2SummonEgg","HillTrollLair","HobbitCivilian","HobbitCivilianHorde","HobbitsSummonEgg","HobbitWorkPit","HorseGrazing","IBCampFloor","IBCastleFloor","Idle_Drogoth_WH","ImladrisWarriorHorde","InchRuler","Incinerator","IndestructibleThing","InGameMarker","InGameMarker2","Inn",
"InternalShipEvilArcher","InternalShipGoodArcher","InvisibleCollision01","IronHillsBridge01","IsengardArmory","IsengardBallistaExpansion","IsengardBanner","IsengardBannerOrc","IsengardBaseDefenceFoundation","IsengardBatteringRam","IsengardBattleTower","IsengardBerserkerHorde","IsengardBeserker","IsengardBuildingFoundation","IsengardCampCentralTent","IsengardCampFlag","IsengardCampKeep","IsengardCastleBaseKeep",
"IsengardCastleFlag","IsengardCastleGate1","IsengardCastleGate2","IsengardCastleWallA","IsengardCastleWallB","IsengardCastleWallGate","IsengardCastleWallHub","IsengardCastleWallHubExpansion","IsengardCastleWallSegment","IsengardDam","IsengardDetonateRangedObj","IsengardEconomyKeep","IsengardExplosivePileOfLeaves","IsengardFanatic","IsengardFence","IsengardFighter","IsengardFighterHorde","IsengardFortress",
"IsengardFortressCitadel","IsengardFortressExpansionPadCorner","IsengardGrima","IsengardLurtz","IsengardMineLauncherExpansion","IsengardMurderOfCrows","IsengardOrcOverseer","IsengardOrthancDoor","IsengardPikemanHorde","IsengardPorter","IsengardRamCrew","IsengardSaruman","IsengardScaffolding01","IsengardScaffolding02","IsengardScaffolding03","IsengardScaffolding04","IsengardScaffolding05","IsengardScaffolding06",
"IsengardScaffolding08","IsengardScaffolding09","IsengardScaffolding10","IsengardScaffolding12","IsengardScaffolding13","IsengardScaffolding16","IsengardScaffolding17","IsengardSharku","IsengardSiegeLadder","IsengardSiegeWorks","IsengardTavern","IsengardTent","IsengardTent2","IsengardTowerExpansion","IsengardTowerOfOrthanc","IsengardTowerOfOrthancMPSA","IsengardUrukCrossbow","IsengardUrukCrossbowHorde",
"IsengardUrukPit","IsengardWallCliffCap","IsengardWargPack","IsengardWargPackHorde","IsengardWargPit","IsengardWargRider","IsengardWargRiderBanner","IsengardWargRiderHorde","IsengardWargSentry","IsengardWildman","IsengardWildmanAxe","IsengardWildmanAxeHorde","IsengardWildmanBanner","IsengardWildmanHorde","IsengardWormTongue","IthilienSupplies01","IthilienSupplies02","IthilienSupplies03",
"IthilienSupplies04","IthilienSupplies05","IthilienWeapRackSprs","IvoryTowerVisionBase","LakeCoast01","LakeCoast02","LakeCoast03","LakeRipple","LBBoatRepairShack","LBhouses_01","LBhouses_02","LBhouses_03","LBhouses_04","LBhouses_05","LBhouses_06","LBhouses_07","LBhouses_08","LBhouses_09",
"LBhouses_10","LBhouses_11","LBhouses_12","LBhouses_13","LBhouses_14","LB_LightHouse","LegolasSpecialArrow","LesserWight","Level1Spy","Level2Spy","Lightning","LindonElvenWarrior","LindonWarriorHorde","LogBlock01","LogBlock02","LothlorienBridge","LothlorienElrondsHouse1","LothlorienElrondsHouse2",
"LothlorienHouse1","LothlorienHouse2","LothlorienHouse3","LothlorienHouse4","LothlorienHouse5","LothlorienTreeHouse1","LothlorienTreeHouse2","LumberMill","MapRevealPing","Marker","MBCampFloor","MBCastleFloor","MBMMBridge","MBMMGateA","MBMMGateB","MBMMGateC","MBMMStatue1","MBMMTemp",
"MBMMTower","MBMMTowerRubble","MBMMWallA","MBMMWallA1","MBMMWallAB","MBMMWallAC","MBMMWallAT","MBMMWallB","MBMMWallB1","MBMMWallC","MBMMWallCEnd","MBMMWallCEnd1","MBMMWallD","MenArrowTowerExpansion","MenFortress","MenFortressCitadel","MenFortressExpansionPadCorner","MenGarrisonTowerExpansion",
"MenLongShotObject","MenPorter","MenTrebuchetExpansion","MenWallCliffCap","MenWallGate","MenWallGateSmall","MenWallHubSmall","MenWallHubSmallExpansion","MenWallHubSmallUpgradeable","MenWallPosternGate","MenWallPosternGateSmall","MenWallRamp","MenWallSegmentSmall","MenWallTowerSmall","MenWallTrebuchetSmall","MenWallUpgradeNodeSmall","MinasMorgulShrub01","MinasMorgulShrub02",
"MinasWallA_BOOKEND","MineShaft_Interface","MinisBridge1","MinisBridge2","MinisBridge3","MinisBridge4","MinisBridge5","MinisBridge6","MinisBridge7","MinisBridge8","MinisBridge9","MinisBridgeDoor","MinisBridgeDoor2","MinisFlag1","MinisGate1","MinisGate2","MinisGate3","MinisGate4",
"MinisGate4R","MinisGate5","MinisGate6","MinisGate7","MinisGate8","MinisGate9","MinisGateDoor","MinisGateDoorLR","MinisGround1","MinisGround2","MinisGround3","MinisRefMountain","MinisStoneGuard1","MinisStoneGuard2","MinisTop1","MinisTop2","MinisTop3","MinisTop4",
"MinisTop5","MinisTop6","MinisTopBackNonFading","MinisTopOpt","MinisWallA","MinisWallAR","MinisWallAT","MinisWallATrebuchet","MinisWallB","MinisWallBBuildingA","MinisWallBBuildingB","MinisWallBBuildingC","MinisWallBBuildingD","MinisWallBR","MinisWallBT","MinisWallBTUpgrade","MinisWallBuilding01","MinisWallBuilding02",
"MinisWallBuilding03","MinisWallBuilding04","MinisWallBuilding05","MinisWallC","MinisWallCBuildingA","MinisWallCBuildingB","MinisWallCBuildingC","MinisWallCBuildingD","MinisWallCR","MinisWallD","MinisWallDBuildingA","MinisWallDBuildingB","MinisWallDBuildingC","MinorSpider","MirkBridge","MirkwoodShrub01","MirkwoodShrub02","MirkwoodShrub03",
"MirkwoodShrub04","MMBMMRuin1","MMBMMRuin2","MMBMMRuin3","MMBMMRuin4","MMBMMRuin5","MMBMMRuin6","MMBMMRuin7","MMBMMRuin8","MMDBalinDrA","MMDBalinDrB","MMDGateA","Monument01","Monument02","Monument03","MordorArcher","MordorArcherHorde","MordorAshFall",
"MordorAttackTroll","MordorBalrog","MordorBalrogDeath","MordorBalrogEgg","MordorBalrogEggPlaceHolder","MordorBalrog_NOFIRE","MordorBanner","MordorBannerOrc","MordorBannerOrcNew","MordorBarracks","MordorBarricade","MordorBase","MordorBaseDefenceFoundation","MordorBaseFoundation","MordorBase_DEMO","MordorBattleTower","MordorBlackGate01","MordorBlackGate02",
"MordorBlackGate02EX","MordorBlackGate03","MordorBlackGate04","MordorBlackGate05","MordorBlackGate05EX","MordorBlackGate06","MordorBlackGateLeft","MordorBlackGateRight","MordorBlackOrc","MordorBlackOrcHorde","MordorBlackRider","MordorBlackRiderHorde","MordorBuildingFoundation","MordorBuildingSizeTemplate","MordorCampCentralTent","MordorCampFlag","MordorCampFlag2","MordorCampKeep",
"MordorCastleFlag","MordorCastleWallGate","MordorCastleWallHub","MordorCastleWallSegment","MordorCatapult","MordorCatapultDeadHulk","MordorCatapult_Celduin","MordorCaveTroll","MordorCirithUngolBridgeA","MordorCirithUngolBridgeB","MordorCirithUngolBridgeC","MordorCirithUngolGateDoor","MordorCirithUngolStairA","MordorCirithUngolStairB","MordorCirithUngolStairC","MordorCirithUngolStairD","MordorCirithUngolTowerA","MordorCirithUngolTowerB",
"MordorCirithUngolTowerC","MordorCirithUngolTowerC_Prop","MordorCirithUngolWallA","MordorCirithUngolWallC","MordorCirithUngolWallC_Prop","MordorCirithUngolWallD","MordorCirithUngolWallE","MordorCirithUngolWallG","MordorCirithUngolWallJ","MordorCirithUngolWallK","MordorCirithUngolWallN","MordorCirithUngolWallQ","MordorCirithUngolWallR","MordorCirithUngolWallS","MordorCirithUngolWallT","MordorCirithUngolWallU","MordorCorsairBanner","MordorCorsairsOfUmbar",
"MordorCorsairsOfUmbarHorde","MordorDrummerTroll","MordorDrummerTroll_Temp","MordorEasterling","MordorEasterlingGeneric","MordorEasterlingHorde","MordorEasterlingHordeObsolete","MordorEconomyKeep","MordorEyeOfSauron","MordorFellBeastInterface","MordorFence","MordorFighter","MordorFighterHorde","MordorFire","MordorFortress","MordorFortressBarricadeExpansion","MordorFortressCitadel","MordorFortressExpansionPadCorner",
"MordorFortressLavaMoat","MordorGateWatchersExpansion","MordorGoblinArcher","MordorGoblinFighterHorde","MordorGoblinSwordsman","MordorGothmog","MordorGothmogWarg","MordorGrond","MordorGrondCrew","MordorHaradrimArcher","MordorHaradrimArcherHorde","MordorHaradrimHordeObsolete","MordorHaradrimLancerHordeObsolete","MordorHaradrimObsolete","MordorHaradrimPalace","MordorHaradrimRider","MordorHaradrimRiderBanner","MordorHaradrimRiderHorde",
"MordorHaradrimSandboxObsolete","MordorHaradTent1","MordorKingPalace","MordorMountainTroll","MordorMountDoom","MordorMouthOfSauron","MordorMumakilPen","MordorOrcFletcher","MordorOrcPit","MordorOrcScout_Horde","MordorOrcScout_Unit","MordorPagoda","MordorPorter","MordorSauron","MordorShelob","MordorSiegeTower","MordorSiegeTowerCrew","MordorSiegeWorks",
"MordorSoldOfRhun","MordorTavern","MordorTent","MordorTent2","MordorTributeCart","MordorTrollCage","MordorUmbarTavernObsolete","MordorWallCatapultExpansion","MordorWargHorde","MordorWorker","MordorWitchKing","MoriarGoblinLair","MTFinalTest","MTGate","MTMountain","MTsmokeMedium","MTTopBuilding1","MTTopBuilding2",
"MTTopBuilding3","MTTopBuilding4","MTTopBuilding5","MTWallA","MTWallARamp","MTWallB","MTWallBRamp","MTWallBRampC","MTWallC","MTWallCRamp","MTWallD","MTWallDRamp","MTWallE","MTWallERamp","MTWall_Building01","MTWall_Building02","MTWall_Building03","MTWall_Building04",
"MTWall_Building05","MTWall_Building06a","MTWall_Building06b","MTWall_Building06c","MTWall_Building06d","MTWall_Building07","MTWall_Building08","MTWall_Building09","MTWall_Building10","MTWall_Building11","MTWall_Building12","MTWall_Building13","MTWall_Building14a","MTWall_Building14b","MTWall_Building15","MTWall_Building16","MTWall_Building17a","MTWall_Building17b",
"MTWall_Building18","MTWall_Building19","MTWall_Building20","MTWall_Building21","MTWall_Building22","MTWall_Building23","MTWall_Building24","MTWall_Building25","MTWall_Building26","MTWall_Building27","NecromancerStatue","NeutralDireWolf","NeutralGollum","NeutralStructureHole","NeutralWarg","NightGlow","NoldorWarrior","NoldorWarriorHorde",
"OceanFoamCircle01","OceanFoamCircle02","OldForestShrub01","OldForestShrub02","OldForestShrub03","OldForestShrub04","OldForestShrub05","OldForestShrub06","OldForestShrub07","OldForestShrub08","OldForestShrub09","OptBush01","OptBush02","OptBush03","OptBushLG01","OptBushLG02","OptBushLG03","OptBushLG04",
"OptBushLG05","OptBushLG06","OptBushLG07","OptBushLG08","OptBushLG10","OptFieldBush01","OptFieldBush02","OptFieldBush03","OptFieldBush04","OptFieldBush05","OptGrass01","OptGrass03","OptGrass04","OptGrass05","OptGrass06","OptGrass07","OptGrass08","OptGrass09",
"OptGrass10","OrcBombCart","OrcChief01","OrcChief02","OrcChief03","OrcChief04","OrcChief05","OrcMeatRack01","OrcMeatRack02","OrcTent","OrcTentB","OsgiliathBridge2Center","OsgiliathBridge2Left","OsgiliathBridge2Right","OsgiliathBridgeCenter","OsgiliathBridgeLeft","OsgiliathBridgeRight","OsgiliathPillar01",
"OsgiliathPillar01Snow","OsgiliathPillar02","OsgiliathPillar02Snow","OsgiliathPlot01","OsgiliathPlot02","OsgiliathPlot03","OsgiliathRubble01","OsgiliathRubble01Snow","OsgiliathRubble02","OsgiliathRubble02Snow","OsgiliathRubble03","OsgiliathRubble03Snow","OsgiliathRubble04","OsgiliathRubble04Snow","OsgiliathRuin01","OsgiliathRuin01Snow","OsgiliathRuin02","OsgiliathRuin02Snow",
"OsgiliathRuin03","OsgiliathRuin03Snow","OsgiliathRuin04","OsgiliathRuin04Snow","OsgiliathRuin05","OsgiliathRuin05Snow","OsgiliathRuin06","OsgiliathRuin06Snow","OsgiliathRuin07","OsgiliathRuin07Snow","OsgiliathRuin08","OsgiliathRuin08Snow","OsgiliathRuin09","OsgiliathRuin09Snow","OsgiliathRuin10","OsgiliathRuin10Snow","OsgiliathRuin11","OsgiliathRuin11Snow",
"OsgiliathRuin12","OsgiliathRuin12Snow","OsgiliathRuin13","OsgiliathRuin13Snow","OsgiliathRuin14","OsgiliathRuin14Snow","OsgiliathRuin15","OsgiliathRuin15Snow","OsgiliathRuin16","OsgiliathRuin16Snow","OsgiliathRuin20","OsgiliathRuin20Snow","OsgiliathRuin21","OsgiliathRuin21b","OsgiliathRuin21Snow","OsgiliathRuin22","OsgiliathRuin22Snow","OsgiliathRuin23",
"OsgiliathRuin23Snow","OsgiliathRuin24","OsgiliathRuin24Snow","OsgiliathStairs01","OsgiliathStairs02","OsgiliathStairs03","OsgiliathStatue01","OsgiliathStatue02","OsgiliathStatue03","OsgiliathStatue04","Outpost","PackWolf","PalantirVisionBase","ParticleSysProxy","ParticleSysProxy2","ParticleSysProxy3","PelBush01","PelBush02",
"PelBush03","PhalanxSummonEgg","Pig","PMFence01","PMTomb01","PolesSkull01","PolesSkull02","PolesSkull03","PreBuiltCampFlag_01","PreBuiltCampFlag_02","PreBuiltCampFlag_03","PreBuiltCampFlag_04","PreBuiltCampFlag_05","PreBuiltCampFlag_06","PreBuiltCampFlag_07","PreBuiltCampFlag_08","PTree13_Dead","Rabbit",
"Raccoon","RailTie","RainOfFireExplosion","RBCampFence","RBCampFence2","RBCampFloor","RBCastleFloor","RBHelmsDeepGateDoorBig","RBHelmsDeepGateDoorSmall","RivBellTower","RivBridge","RivCBTower","RivElHouse","RivGate","RivGateLeftSide","RivGateRightSide","RivGazebo","RivGTower",
"RivOPWall1","RivOPWall2","RivOPWall3","RivOPWall4","RivRHall","RivRTower","RivWalkCurv","RivWalkCurvT","RivWalkCurvT1","RivWalkCurvT2","RivWalkCurvT3","RivWalkRamp","RivWalkway","RivWalkway3","RivWalkway3T","RivWalkwayT","RivWalkwayT1","RohanArcher",
"RohanArcherHorde","RohanArcherRange","RohanArmory","RohanBanner","RohanBaseDefenceFoundation","RohanBattleTower","RohanBuildingFoundation","RohanBuildingSizeTemplate","RohanCampKeep","RohanCastleAngl01","RohanCastleAngl02","RohanCastleBaseKeep","RohanCastleBend","RohanCastleBridge","RohanCastleCorn","RohanCastleDoor","RohanCastleElevator","RohanCastleGateL",
"RohanCastleGateLTower","RohanCastleGateR","RohanCastleGateRTower","RohanCastleKeep","RohanCastleTowr","RohanCastleUpgrade","RohanCastleWall","RohanCausewayProp","RohanEdorasBridge","RohanEdorasDoor","RohanEdorasWall","RohanElvenWarrior","RohanElvenWarriorHorde","RohanEntBase","RohanEomer","RohanEowyn","RohanFenceRuin01","RohanFenceRuin02",
"RohanFlag","RohanFrodo","RohanGamling","RohanGate","RohanGenericEnt","RohanGenericVillage","RohanGimli","RohanGoldenHall","RohanHelmsDeepKeep","RohanHeroStatue","RohanHeroStatueNoLeadership","RohanHobbit","RohanHobbitFriendsHorde","RohanHobbitHorde","RohanHobbitNoHeroHorde","RohanHouse01","RohanHouse02","RohanHouse03",
"RohanHouse04","RohanHouse05","RohanInnerWall","RohanLegolas","RohanMerry","RohanOathbreaker","RohanOathbreaker1","RohanOathbreakerHorde","RohanOathbreakersCavalry","RohanPeasant","RohanPeasant1","RohanPeasantHorde","RohanPippin","RohanRefugeeCamp","RohanRefugeeCampA","RohanRefugeeCampB","RohanRefugeeCampC","RohanRohirrim",
"RohanRohirrimBannerRider","RohanRohirrimHorde","RohanRohirrimHordeObsolete","RohanRoyalGuardHorde","RohanRuin01","RohanRuin02","RohanRuin03","RohanSam","RohanSentryTower","RohanSpearmen","RohanSpearmenHorde","RohanStable","RohanTent01","RohanTent02","RohanTheoden","RohanTreeBerd","RohanWall","RohanWallAngl15",
"RohanWallElev","RohanWallFoundation","RohanWallJntI","RohanWallJntO","RohanWallTower","RohanWell","RohanWorker","RohirrimDeadRider","RopeCoil","RuinedTower","RuinedTower_Open","RuinedTower_Open_NoGarr","Sarcophagus","SarumanLightning","SBDock","SBFerry","ShadeCallthePack","ShadeofWolfDeath",
"ShadeofWolfEgg","ShadeofWolfEggPlaceHolder","Sheep","Shield01","Shield02","ShipWright","ShireBagend","ShireGeneric01","ShireGeneric02","ShireGeneric03","ShireGeneric04","ShireGeneric05","ShireGeneric06","ShireGreenDragon","ShireLongbottomFarm","ShireMaggotsFarm","ShireWorkPit","ShroudRevealer_Bombard",
"ShrubShireHedge01","ShrubShireHedge02","ShrubShireHedge03","SignalFire","SinglePlotCampFlag","Skeleton","SlaughterHouse","SnowTrollLair","SnowyShrub01","SnowyShrub02","SnowyShrub03","SnowyShrub04","SnowyShrub05","Sparks","SpellBookArrowVolley","SpellBookArrowVolleyDamager","SpellBookArrowVolleyDamagerEgg","SpellBookArrowVolleyPassiveDamageWeapon",
"SpellBookAvalanche","SpellBookAvalancheEgg","SpellBookAvalancheSecond","SpellBookBlightCompromiseWeapon","SpellBookChillWind","SpellBookDragonStrikeDragon","SpellBookEarthquake","SpellBookFlood","SpellBookRainOfFire","SpellBookRainOfFire02","SpiderLair","SpiderlingsSummonEgg","SpikeBarricade","SpikePatch01","SpikePatch02","SpikeTripod","SpinObject","StructureDwarvenAxe",
"StructureRubblePileSinkAway","SummonedDragon","SummonedDragonCrusher","SummonedDragonEgg","SummonedDragonEggPlaceHolder","SummonRohanRohirrimEgg","SunflareSunbeam","SuperweaponPing","SwordHorizontal","SwordVerticle","Table01","Table02","Table03","Table04","Table05","TacticalMarkerBase","TaintTree","TEMP_Box",
"TEMP_Cylinder_Horizontal_Long","TEMP_Cylinder_Vertical_Long","TEMP_Cylinder_Vertical_Short","Temp_DragonStrike","TEMP_Pyramid_Medium","TEMP_Rectangle_Horizontal","TEMP_Rectangle_Vertical","TEMP_Sphere","TEMP_Trapezoid_Horizontal","Tent01","TEST_FortressWallMiddle","TEST_MinisTirith","TheFiresOfDoom","TheOneTree","ThranSpecialArrow","ThreatFinder","TimberPile01","TimberPile02",
"TimberPile03","TombColumn01","TombColumn01_Camp","TombColumn02","TombColumn03","TombColumn04","TomBombadil","TomBombadilHouse","TomBombadilSummonEgg","Tombstones01","Tower_FromZeroHourThatCanTopple","TownLamp1","TownLamp3","TownLamp4","TRCorner01","TRCorner02","TRCorner03","TreebeardLeadershipObject",
"TreeDead03","TreeDevastation","TreeFallDead01","TreeIronHillsDeadLog01","TreeLothlorien01","TreeLothlorien02","TreeLothlorien12","TreeLothlorien13","TreeLothlorien14","TreeNew01","TreeOldForest04","TreeShire04","TreeSnowyDeadLog01","TrollDrum","UmbarDryDock","UmbarHouse01","UmbarHouse02","Urn01",
"Urn02","VineBarricade01","VineBarricade02","WallConstruction01","WargDeadRider","WargLair","WargSentry","WatcherCaldera","WatcherEgg","WatcherEggPlaceHolder","WatcherHead","WatcherHittingArm","Waterfall","Waterfall1","Waterfall2","Waterfall3","WaterfallC01","WaterfallC02",
"WaterfallC03","WaterfallC04","WaterRipples","WaterRippleSpawn02","WaterRippleSpawn03","WeathertopColumn01","WeathertopColumn02","WeathertopColumn03","WeathertopColumn04","WeathertopRuin01","WeathertopRuin02","WeathertopRuin03","WeathertopRuin04","WeathertopStair","WeathertopStatue01","WeathertopStatue02","WeathertopStatue03","WeathertopTrollStatues",
"WeathertopWall01","WeathertopWall02","WeathertopWall03","WeathertopWall04","WebbedHumanoidWithGondorArcherInside","WebbedHumanoidWithGondorFighterInside","WebbedHumanoidWithIsengardBeserkerInside","WebbedHumanoidWithMordorArcherInside","WebbedHumanoidWithMordorFighterInside","WellOfSoulsWeaponObject","WhtDrftCloud","WildArrowDenExpansion","WildAzog","WildBabyDrakeHorde","WildBannerGoblin","WildBannerMarauder","WildBannerSpiderling_old","WildBannerSpiderRider",
"WildBatCloud","WildBurrowsExpansion","WildCastleWallGate","WildCastleWallHub","WildCastleWallSegment","WildFireDrake","WildFireDrakeEgg","WildFortress","WildFortressCitadel","WildFortressExpansionPadCorner","WildFortressRazorSpines","WildGiantSentryExpansion","WildGoblinKing","WildLaborer","WildmanAxeForgedB","WildMarauderHorde","WildMarauderSwordBanner","WildMarauderSwordHorde",
"WildMarauderSwords","WildMenAlliesSummonEgg","WildmenBuildingHouse","WildmenBuildingHouse2","WildmenBuildingHouse3","WildmenBuildingHouse4","WildmenBuildingHouse5","WildMineShaft","WildMountainGiant","WildMountainGiantSummonEgg","WildPorter","WildSentryTower","WildShelob","WildSkullTotem","WildSpiderHolesExpansion","WildSpiderling","WildSpiderlingHorde","WildSpiderPit",
"WildStructureHole","WildTreasureTrove","WineVat","Wolf","WoodBeams02","WoodPylon","WOR_ArnorCastleBaseKeep","WOR_DolGoldurCastle","WOR_EreborThrone","WOR_GondorCastleBaseKeep","WOR_HelmsDeepArcade","WOR_IsengardCastleBaseKeep","WOR_MBMMTower","WOR_RivElHouse","WotR202PowerGranter","WtrflHaze","WtrflSteam","WtrRiplsSmall","Wyrm","WyrmEgg"
}

OBJECT_TYPE_LIST_HERO = {
"AngmarHwaldar",
"AngmarKarsh",
"AngmarMorgramir",
"AngmarRogash",
"AngmarShadeWolf",
"ArnorArgeleb",
"ArnorArvedui",
"ArnorArveleg",
"ArnorCaptain",
"ArnorCaptainStealthless",
"CreateAHero",
"CreateAHeroTornado_Level1",
"CreateAHeroTornado_Level2",
"CreateAHeroTornado_Level3",
"Crebain",
"Drogoth",
"DwarvenCaptainofDale",
"DwarvenDain",
"DwarvenGloin",
"DwarvenGloin_Temp",
"ElrondWhirlwind",
"ElvenArwen",
"ElvenElrond",
"ElvenGaladriel",
"ElvenGlorfindel",
"ElvenHaldir",
"ElvenThranduil",
"EvilMenBlackRider",
"EyeOfSauron",
"GaladrielTornado",
"GondorAragorn",
"GondorBoromir",
"GondorDamrod",
"GondorEarnur",
"GondorFaramir",
"GondorGandalf",
"GondorGandalfWhite_H",
"GondorGandalfWhite_L",
"GondorGandalfWhite_M",
"GondorGwaihir",
"GondorIsildur",
"IsengardLurtz",
"IsengardMurderOfCrows",
"IsengardSaruman",
"IsengardSharku",
"IsengardWormTongue",
"Marker",
"MordorBalrog",
"MordorFellBeastInterface",
"MordorGothmog",
"MordorMouthOfSauron",
"MordorSauron",
"MordorShelob",
"MordorWitchKing",
"NeutralGollum",
"OrcChief01",
"OrcChief02",
"OrcChief03",
"OrcChief04",
"OrcChief05",
"RohanEomer",
"RohanEowyn",
"RohanFrodo",
"RohanGamling",
"RohanGimli",
"RohanHobbitHorde",
"RohanLegolas",
"RohanMerry",
"RohanPippin",
"RohanSam",
"RohanTheoden",
"RohanTreeBerd",
"SummonedDragon",
"TomBombadil",
"WildAzog",
"WildBatCloud",
"WildGoblinKing",
"WildShelob",
"Wyrm"
}

OBJECT_TYPE_LIST_ARCHER = {
"AngmarDarkRanger",
"AngmarDarkRangerHorde",
"AngmarHwaldar",
"AngmarNecroAcolyte",
"AngmarNecromancerBanner",
"AngmarNecromancerHorde",
"AngmarRhudaurSlinger",
"AngmarRhudaurSlingers",
"ArnorArcher",
"ArnorArcherHorde",
"ArnorRanger",
"ArnorRangerHorde",
"DwarvenAxeThrower",
"DwarvenAxeThrowerHorde",
"DwarvenBattleWagonAxeThrower",
"DwarvenBattleWagonMenOfDale",
"DwarvenMenOfDale",
"DwarvenMenOfDaleHorde",
"ElvenImladrisWarrior",
"ElvenLorienArcher",
"ElvenLorienArcherHorde",
"ElvenMirkwoodArcher",
"ElvenMirkwoodArcherHorde",
"GoblinArcher",
"GoblinArcherHorde",
"GoblinSpiderRider",
"GoblinSpiderRiderBanner",
"GoblinSpiderRiderHorde",
"GondorArcher",
"GondorArcherHorde",
"GondorRanger",
"GondorRangerHorde",
"ImladrisWarriorHorde",
"IsengardLurtz",
"IsengardUrukCrossbow",
"IsengardUrukCrossbowHorde",
"IsengardWildmanAxe",
"IsengardWildmanAxeHorde",
"LindonElvenWarrior",
"LindonWarriorHorde",
"MordorArcher",
"MordorArcherHorde",
"MordorGoblinArcher",
"MordorGothmog",
"MordorHaradrimArcher",
"MordorHaradrimArcherHorde",
"MordorHaradrimHordeObsolete",
"MordorHaradrimLancerHordeObsolete",
"NoldorWarrior",
"NoldorWarriorHorde",
"OrcChief01",
"OrcChief02",
"OrcChief03",
"OrcChief04",
"OrcChief05",
"RohanArcher",
"RohanArcherHorde",
"RohanElvenWarrior",
"RohanElvenWarriorHorde",
"RohanHobbitFriendsHorde",
"RohanHobbitHorde"
 }
 
OBJECT_TYPE_LIST_INFANTRY_HORDE= {
"AngmarDarkDunedainHorde",
"AngmarDarkRangerHorde",
"AngmarDireWolfHorde",
"AngmarHillTrollHorde",
"AngmarNecromancerHorde",
"AngmarOrcWarriors",
"AngmarRhudaurSlingers",
"AngmarRhudaurSpearmen",
"ArnorArcherHorde",
"ArnorFighterHorde",
"ArnorRangerHorde",
"ArnorTowerShieldGuardHorde",
"DwarvenAxeThrowerHorde",
"DwarvenGuardianHorde",
"DwarvenMenOfDaleHorde",
"DwarvenPhalanxHorde",
"DwarvenZerkerHorde",
"ElvenLorienArcherHorde",
"ElvenLorienWarriorHorde",
"ElvenMirkwoodArcherHorde",
"ElvenMithlondSentryHorde",
"GoblinArcherHorde",
"GoblinFighterHorde",
"GondorArcherHorde",
"GondorCivilianFemaleHorde",
"GondorCivilianMaleHorde",
"GondorFighterHorde",
"GondorRangerHorde",
"GondorTowerShieldGuardHorde",
"HobbitCivilianHorde",
"ImladrisWarriorHorde",
"IsengardBerserkerHorde",
"IsengardFighterHorde",
"IsengardPikemanHorde",
"IsengardUrukCrossbowHorde",
"IsengardWargPackHorde",
"IsengardWildmanAxeHorde",
"IsengardWildmanHorde",
"LindonWarriorHorde",
"MordorArcherHorde",
"MordorBlackOrcHorde",
"MordorCorsairsOfUmbarHorde",
"MordorEasterlingHorde",
"MordorEasterlingHordeObsolete",
"MordorFighterHorde",
"MordorGoblinFighterHorde",
"MordorHaradrimArcherHorde",
"MordorHaradrimHordeObsolete",
"MordorHaradrimLancerHordeObsolete",
"MordorOrcScout_Horde",
"NoldorWarriorHorde",
"RohanArcherHorde",
"RohanElvenWarriorHorde",
"RohanHobbitFriendsHorde",
"RohanHobbitHorde",
"RohanHobbitNoHeroHorde",
"RohanOathbreakerHorde",
"RohanPeasantHorde",
"RohanSpearmenHorde",
"WildMarauderHorde",
"WildMarauderSwordHorde",
"WildSpiderlingHorde"
}

OBJECT_TYPE_LIST_ARCHER_HORDE = {
"AngmarDarkRangerHorde",
"AngmarNecromancerHorde",
"AngmarRhudaurSlingers",
"ArnorArcherHorde",
"ArnorRangerHorde",
"DwarvenAxeThrowerHorde",
"DwarvenMenOfDaleHorde",
"ElvenLorienArcherHorde",
"ElvenMirkwoodArcherHorde",
"GoblinArcherHorde",
"GoblinSpiderRiderHorde",
"GondorArcherHorde",
"GondorRangerHorde",
"ImladrisWarriorHorde",
"IsengardUrukCrossbowHorde",
"IsengardWildmanAxeHorde",
"LindonWarriorHorde",
"MordorArcherHorde",
"MordorHaradrimArcherHorde",
"MordorHaradrimHordeObsolete",
"MordorHaradrimLancerHordeObsolete",
"NoldorWarriorHorde",
"RohanArcherHorde",
"RohanElvenWarriorHorde",
"RohanHobbitFriendsHorde",
"RohanHobbitHorde"
}

OBJECT_TYPE_LIST_STRUCTURE_MAIN = {
"AmonSulKeep",
"AmonSulMallornTree",
"AngFornostSmallSpire",
"AngFornostSpire",
"AngFornost_FallingTower",
"AngForStronghold",
"AngmarBarracks",
"AngmarBattleTowerExpansion",
"AngmarCatapultExpansion",
"AngmarCitadelCarnDum",
"AngmarDen",
"AngmarForgeWorks",
"AngmarFortressCitadel",
"AngmarHallofTwilight",
"AngmarKennelExpansion",
"AngmarMill",
"AngmarSentryTower_Independent",
"AngmarWallCatapultSmall",
"AngmarWallCliffCap",
"AngmarWallGateSmall",
"AngmarWallHubSmallExpansion",
"AngmarWallPosternGateSmall",
"AngmarWallTowerSmall",
"ArnorArcherRange",
"ArnorArrowTowerExpansion",
"ArnorBarracks",
"ArnorCampKeep",
"ArnorCastleBarracks_temp",
"ArnorCastleBaseKeep",
"ArnorCastleFoundation_temp",
"ArnorCastleKeep",
"ArnorCastleKeep_temp",
"ArnorCastleWall_temp",
"ArnorElvenBarracks",
"ArnorFarmInterface",
"ArnorForbiddenPool",
"ArnorForge",
"ArnorFortressCitadel",
"ArnorGarrisonTowerExpansion",
"ArnorGreatKeep",
"ArnorInnerWall",
"ArnorKeep",
"ArnorMallornTree",
"ArnorMarketPlace",
"ArnorSentryTower",
"ArnorStable",
"ArnorStatue",
"ArnorTent",
"ArnorTrebuchetExpansion",
"ArnorWallCliffCap",
"ArnorWallGateSmall",
"ArnorWallHubSmallExpansion",
"ArnorWallPosternGateSmall",
"ArnorWallTowerSmall",
"ArnorWallTrebuchetSmall",
"ArnorWell",
"ArnorWhiteTower",
"ArnorWorkshop",
"BarrowWightLair",
"BattleFlag",
"BlueMountainGate",
"CaveTrollLair",
"DireWolfLair",
"DolGoldurCastle",
"DryDock",
"DwarfBarracks",
"DwarvenArcheryRange",
"DwarvenBunker",
"DwarvenCastleWallCatapult",
"DwarvenCastleWallGate",
"DwarvenCastleWallTower",
"DwarvenCatapultExpansion",
"DwarvenEreborTowerTowerExpansion",
"DwarvenFortressCitadel",
"DwarvenHallExpansion",
"DwarvenHearth",
"DwarvenSentryTower_Independent",
"DwarvenSiegeWorks",
"DwarvenStatue",
"DwarvenSummonedCitadelKeep",
"DwarvenWallCatapultSmall",
"DwarvenWallCliffCap",
"DwarvenWallGateSmall",
"DwarvenWallHubSmallExpansion",
"DwarvenWallPosternGate",
"DwarvenWallPosternGateSmall",
"DwarvenWallTowerSmall",
"EBGarrisonableTower",
"ElvenBarracks",
"ElvenBarracksBFME1",
"ElvenBattleTower",
"ElvenCampKeep",
"ElvenCastleBaseKeep",
"ElvenCastleWallGate",
"ElvenCastleWallHubExpansion",
"ElvenCitadel",
"ElvenEntMoot",
"ElvenFloodgateExpansion",
"ElvenGreenPasture",
"ElvenMallornTree",
"ElvenMirrorOfGaladriel",
"ElvenSentryTower",
"ElvenStatue",
"ElvenVigilantEntExpansion",
"ElvenWallCliffCap",
"ElvenWatchtowerExpansion",
"EreaborGarrisonableTowerExt",
"EregionForge",
"EttenmoorsGoblinKingWall1",
"EttenmoorsGoblinKingWall1_unclimbable",
"EttenmoorsGoblinKingWall2",
"EttenmoorsGoblinKingWall3",
"EttenmoorsGoblinKingWall4",
"EvilPort",
"EvilSentryTower",
"FarmInterface",
"FireDrakeLair",
"FornostBuildingGov",
"Furnace",
"GBCSigFire",
"GHGarrisonableTower",
"GoblinCampKeep",
"GoblinCave",
"GoblinFissure",
"GondorArcherRange",
"GondorBarracks",
"GondorCampKeep",
"GondorCastleBarracks_temp",
"GondorCastleBaseKeep",
"GondorCastleFoundation_temp",
"GondorCastleKeep",
"GondorCastleKeep_temp",
"GondorCastleWall_temp",
"GondorCatacombs",
"GondorForbiddenPool",
"GondorForge",
"GondorGreatKeep",
"GondorHeroStatue",
"GondorHseHeal",
"GondorInnerWall",
"GondorKeep",
"GondorMarketPlace",
"GondorSentryTower",
"GondorStable",
"GondorStatue",
"GondorTent",
"GondorWell",
"GondorWhiteTower",
"GondorWorkshop",
"GoodPort",
"HaradCampKeep",
"HelmsDeepArcade",
"HelmsDeepdiWall1",
"HelmsDeepdiWall2",
"HelmsDeepGate",
"HelmsDeepGate1",
"HelmsDeepGate2",
"HelmsDeepPavement01",
"HelmsDeepPavement02",
"HelmsDeepTower",
"HillTrollLair",
"Inn",
"IsengardArmory",
"IsengardBallistaExpansion",
"IsengardBattleTower",
"IsengardCampCentralTent",
"IsengardCampKeep",
"IsengardCastleBaseKeep",
"IsengardCastleWallGate",
"IsengardCastleWallHubExpansion",
"IsengardFortressCitadel",
"IsengardMineLauncherExpansion",
"IsengardSiegeWorks",
"IsengardTavern",
"IsengardTent",
"IsengardTent2",
"IsengardTowerExpansion",
"IsengardTowerOfOrthanc",
"IsengardTowerOfOrthancMPSA",
"IsengardUrukPit",
"IsengardWallCliffCap",
"IsengardWargPit",
"IsengardWargSentry",
"LumberMill",
"MBMMTower",
"MenArrowTowerExpansion",
"MenFortressCitadel",
"MenGarrisonTowerExpansion",
"MenTrebuchetExpansion",
"MenWallCliffCap",
"MenWallGateSmall",
"MenWallHubSmallExpansion",
"MenWallPosternGateSmall",
"MenWallTowerSmall",
"MenWallTrebuchetSmall",
"MineShaft_Interface",
"MirkBridge",
"MordorBarracks",
"MordorBase",
"MordorBattleTower",
"MordorBlackGate01",
"MordorBlackGate02",
"MordorBlackGate02EX",
"MordorBlackGate03",
"MordorBlackGate04",
"MordorBlackGate05",
"MordorBlackGate05EX",
"MordorBlackGate06",
"MordorBlackGateLeft",
"MordorBlackGateRight",
"MordorCampCentralTent",
"MordorCampKeep",
"MordorEyeOfSauron",
"MordorFortressBarricadeExpansion",
"MordorFortressCitadel",
"MordorGateWatchersExpansion",
"MordorHaradrimPalace",
"MordorHaradTent1",
"MordorKingPalace",
"MordorMumakilPen",
"MordorOrcFletcher",
"MordorOrcPit",
"MordorPagoda",
"MordorSiegeWorks",
"MordorTavern",
"MordorTrollCage",
"MordorUmbarTavernObsolete",
"MordorWallCatapultExpansion",
"MoriarGoblinLair",
"RivBellTower",
"RivRTower",
"RohanArcherRange",
"RohanArmory",
"RohanBattleTower",
"RohanCampKeep",
"RohanCastleBaseKeep",
"RohanCastleKeep",
"RohanGoldenHall",
"RohanHeroStatue",
"RohanHeroStatueNoLeadership",
"RohanInnerWall",
"RohanRefugeeCamp",
"RohanRefugeeCampA",
"RohanRefugeeCampB",
"RohanRefugeeCampC",
"RohanSentryTower",
"RohanStable",
"RohanWall",
"RohanWell",
"RuinedTower",
"RuinedTower_Open",
"ShipWright",
"ShireGreenDragon",
"SlaughterHouse",
"SnowTrollLair",
"SpiderLair",
"TrollDrum",
"WargLair",
"WildArrowDenExpansion",
"WildBurrowsExpansion",
"WildFortressCitadel",
"WildGiantSentryExpansion",
"WildSentryTower",
"WildSpiderHolesExpansion",
"WildSpiderPit",
"WildTreasureTrove",
"WOR_ArnorCastleBaseKeep",
"WOR_DolGoldurCastle",
"WOR_EreborThrone",
"WOR_GondorCastleBaseKeep",
"WOR_HelmsDeepArcade",
"WOR_IsengardCastleBaseKeep",
"WOR_MBMMTower",
"WOR_RivElHouse"
}

OBJECT_TYPE_LIST_MACHINE = {
"BalrogOPT",
"DwarvenCatapult",
"DwarvenDemolisher",
"IsengardBatteringRam",
"IsengardSiegeLadder",
"MordorBalrog_NOFIRE",
"MordorCatapult",
"MordorCatapult_Celduin",
"MordorGrond",
"MordorSiegeTower"
}

OBJECT_TYPE_LIST_CAVALRY = {
"AngmarBannerSnowTroll",
"AngmarBannerWolfRider",
"AngmarSnowTroll",
"AngmarSnowTrollHorde",
"AngmarThrallMasterWolfBanner",
"AngmarWolfRider",
"AngmarWolfRiders",
"ArnorCavalry",
"ArnorCavalryBanner",
"ArnorKnightHorde",
"ElvenRivendellArcher",
"ElvenRivendellArcherHorde",
"ElvenRivendellLancer",
"ElvenRivendellLancerBanner",
"ElvenRivendellLancerHorde",
"GoblinSpiderRider",
"GoblinSpiderRiderBanner",
"GoblinSpiderRiderHorde",
"GondorCavalry",
"GondorCavalryBanner",
"GondorCavalryDeadRiderB",
"GondorCavalryDeadRiderD",
"GondorDeadRiderDEDA",
"GondorKnightHorde",
"GondorKnightsofDol",
"GondorKnightsofDolHorde",
"IsengardSharku",
"IsengardWargPack",
"IsengardWargPackHorde",
"IsengardWargRider",
"IsengardWargRiderBanner",
"IsengardWargRiderHorde",
"MordorBlackRider",
"MordorBlackRiderHorde",
"MordorGothmogWarg",
"MordorHaradrimRider",
"MordorHaradrimRiderBanner",
"MordorHaradrimRiderHorde",
"MordorWargHorde",
"NeutralDireWolf",
"NeutralWarg",
"RohanBanner",
"RohanOathbreakersCavalry",
"RohanRohirrim",
"RohanRohirrimBannerRider",
"RohanRohirrimHorde",
"RohanRohirrimHordeObsolete",
"RohanRoyalGuardHorde",
"RohirrimDeadRider",
"WargDeadRider",
"WargSentry",
"WildBabyDrakeHorde",
"WildBannerSpiderRider"
}

OBJECT_TYPE_LIST_MONSTER = {
"AngmarRogash",
"AngmarShadeWolf",
"BarrowWight",
"CreateAHeroFamiliar_Base",
"Crebain",
"Drogoth",
"GiantSpider",
"GoblinCaveTroll",
"GondorGwaihir",
"IsengardMurderOfCrows",
"LesserWight",
"MinorSpider",
"MordorAttackTroll",
"MordorBalrog",
"MordorCaveTroll",
"MordorDrummerTroll",
"MordorDrummerTroll_Temp",
"MordorFellBeastInterface",
"MordorGrondCrew",
"MordorMountainTroll",
"MordorShelob",
"MordorSiegeTowerCrew",
"MordorSoldOfRhun",
"RohanEntBase",
"RohanGenericEnt",
"RohanTreeBerd",
"SpellBookDragonStrikeDragon",
"SummonedDragon",
"WatcherHead",
"WatcherHittingArm",
"WildBabyDrakeHorde",
"WildBatCloud",
"WildFireDrake",
"WildMountainGiant",
"WildShelob",
"Wyrm"
}

OBJECT_TYPE_LIST_BIG_MONSTER = {
"AngmarShadeWolf",
"MordorBalrog",
"RohanEntBase",
"RohanGenericEnt",
"RohanTreeBerd",
"WildMountainGiant"
}

OBJECT_TYPE_LIST_TOP = {
"MordorBalrog",
"AngmarShadeWolf",
"WildMountainGiant",
"AngmarRogash",
"AngmarSnowTroll",
"ElvenFortressEagle",
"Drogoth",
"SummonedDragon",
"SummonedDragonEgg",
"GoblinCaveTroll",
"WildFireDrake",
"MordorAttackTroll",
"RohanEntBase",
"RohanEntBirch",
"MordorShelrob",
"IsengardSharku",
"WatcherHead",
"Wyrm",
"Idle_Drogoth_WH"
}

OBJECT_TYPE_LIST_SUMMONED =
{
"AngmarShadeWolf",
"CreateAHeroFamiliar_Base",
"Crebain",
"DwarvenSummonedCitadelKeep",
"MordorBalrog",
"RohanOathbreakerHorde",
"SummonedDragon",
"WatcherHead",
"Wyrm"
}

OBJECT_TYPE_LIST_NO_FREEWILL_ENTER = {
"AngmarShadeWolf",
"Drogoth",
"GoblinCaveTroll",
"GondorGwaihir",
"IsengardSharku",
"MordorAttackTroll",
"MordorBalrog",
"MordorCaveTroll",
"MordorDrummerTroll",
"MordorDrummerTroll_Temp",
"MordorFellBeastInterface",
"MordorMountainTroll",
"SpellBookDragonStrikeDragon",
"WatcherHead",
"WildMountainGiant"
}

OBJECT_TYPE_LIST_ORC = {
"AngmarBannerOrcWarrior",
"AngmarOrcWarrior",
"AngmarOrcWarriors",
"MordorArcher",
"MordorArcherHorde",
"MordorBlackOrc",
"MordorBlackOrcHorde",
"MordorFighter",
"MordorFighterHorde",
"MordorGoblinArcher",
"MordorGoblinFighterHorde",
"MordorGoblinSwordsman",
"MordorWorker",
"WildLaborer"
}

OBJECT_TYPE_LIST_HORDE = {
"AngmarDarkDunedainHorde",
"AngmarDarkRangerHorde",
"AngmarDireWolfHorde",
"AngmarHillTrollHorde",
"AngmarNecromancerHorde",
"AngmarOrcWarriors",
"AngmarRhudaurSlingers",
"AngmarRhudaurSpearmen",
"AngmarSnowTrollHorde",
"AngmarWolfRiders",
"ArnorArcherHorde",
"ArnorFighterHorde",
"ArnorKnightHorde",
"ArnorRangerHorde",
"ArnorTowerShieldGuardHorde",
"DwarvenAxeThrowerHorde",
"DwarvenGuardianHorde",
"DwarvenMenOfDaleHorde",
"DwarvenPhalanxHorde",
"DwarvenZerkerHorde",
"ElvenLorienArcherHorde",
"ElvenLorienWarriorHorde",
"ElvenMirkwoodArcherHorde",
"ElvenMithlondSentryHorde",
"ElvenRivendellArcherHorde",
"ElvenRivendellLancerHorde",
"GoblinArcherHorde",
"GoblinFighterHorde",
"GoblinSpiderRiderHorde",
"GondorArcherHorde",
"GondorCivilianFemaleHorde",
"GondorCivilianMaleHorde",
"GondorFighterHorde",
"GondorKnightHorde",
"GondorKnightsofDolHorde",
"GondorRangerHorde",
"GondorTowerShieldGuardHorde",
"HobbitCivilianHorde",
"ImladrisWarriorHorde",
"IsengardBerserkerHorde",
"IsengardFighterHorde",
"IsengardPikemanHorde",
"IsengardUrukCrossbowHorde",
"IsengardWargPackHorde",
"IsengardWargRiderHorde",
"IsengardWildmanAxeHorde",
"IsengardWildmanHorde",
"LindonWarriorHorde",
"MordorArcherHorde",
"MordorBlackOrcHorde",
"MordorBlackRiderHorde",
"MordorCorsairsOfUmbarHorde",
"MordorEasterlingHorde",
"MordorEasterlingHordeObsolete",
"MordorFighterHorde",
"MordorGoblinFighterHorde",
"MordorHaradrimArcherHorde",
"MordorHaradrimHordeObsolete",
"MordorHaradrimLancerHordeObsolete",
"MordorHaradrimRiderHorde",
"MordorOrcScout_Horde",
"MordorWargHorde",
"NoldorWarriorHorde",
"RohanArcherHorde",
"RohanElvenWarriorHorde",
"RohanHobbitFriendsHorde",
"RohanHobbitHorde",
"RohanHobbitNoHeroHorde",
"RohanOathbreakerHorde",
"RohanPeasantHorde",
"RohanRohirrimHorde",
"RohanRohirrimHordeObsolete",
"RohanRoyalGuardHorde",
"RohanSpearmenHorde",
"WildBabyDrakeHorde",
"WildMarauderHorde",
"WildMarauderSwordHorde",
"WildSpiderlingHorde"
}

OBJECT_TYPE_LIST_ANIMALS = {
"Crow_Perched",
"Dove_Perched",
"Crow",
"Dove_white_in_game",
"Bat",
"GoatMale",
"GoatFemale",
"ElkMale",
"ElkFemale",
"HorseGrazing",
"Chicken",
"Fish",
"Egret",
"Wolf",
"Dog",
"DeerMale",
"Rabbit",
"Raccoon",
"Bear",
"BirdEmitter",
"RockofDOOMEmitter",
"AnimalWanderPoint",
"Pig",
"Duck",
"Boar",
"Cow",
"Sheep",
"TropicalFish"
}

OBJECT_TYPE_LIST_NEUTRAL = {
"MordorBalrog",
"NeutralGollum",
"MordorShelob",
"RohanOathbreaker",
"RohanOathbreaker1",
"RohanOathbreakersCavalry",
"Marker",
"Crebain",
"WildBatCloud",
"IsengardMurderOfCrows",
"RohanPeasant",
"RohanPeasant1",
"RohanPeasantHorde",
"GaladrielTornado",
"ElrondWhirlwind",
"ElvenWhirlpool",
"AngmarShadeWolf",
"ShadeCallthePack"
}

RelevantObjectTypeTable_BFME2_ROTWK = {
"AmonSulKeep",
"AmonSulMallornTree",
"AngFornostSmallSpire",
"AngFornostSpire",
"AngFornost_FallingTower",
"AngForStronghold",
"AngmarBannerOrcWarrior",
"AngmarBannerSnowTroll",
"AngmarBannerWolfRider",
"AngmarBarracks",
"AngmarBattleTowerExpansion",
"AngmarCatapultExpansion",
"AngmarCitadelCarnDum",
"AngmarDarkDunedainHorde",
"AngmarDarkRanger",
"AngmarDarkRangerHorde",
"AngmarDen",
"AngmarDireWolfHorde",
"AngmarForgeWorks",
"AngmarFortressCitadel",
"AngmarHallofTwilight",
"AngmarHillTrollHorde",
"AngmarHwaldar",
"AngmarKarsh",
"AngmarKennelExpansion",
"AngmarMill",
"AngmarMorgramir",
"AngmarNecroAcolyte",
"AngmarNecromancerBanner",
"AngmarNecromancerHorde",
"AngmarOrcWarrior",
"AngmarOrcWarriors",
"AngmarRhudaurSlinger",
"AngmarRhudaurSlingers",
"AngmarRhudaurSpearmen",
"AngmarRogash",
"AngmarSentryTower_Independent",
"AngmarShadeWolf",
"AngmarSnowTroll",
"AngmarSnowTrollHorde",
"AngmarThrallMasterWolfBanner",
"AngmarWallCatapultSmall",
"AngmarWallCliffCap",
"AngmarWallGateSmall",
"AngmarWallHubSmallExpansion",
"AngmarWallPosternGateSmall",
"AngmarWallTowerSmall",
"AngmarWolfRider",
"AngmarWolfRiders",
"ArnorArcher",
"ArnorArcherHorde",
"ArnorArcherRange",
"ArnorArgeleb",
"ArnorArrowTowerExpansion",
"ArnorArvedui",
"ArnorArveleg",
"ArnorBarracks",
"ArnorCampKeep",
"ArnorCaptain",
"ArnorCaptainStealthless",
"ArnorCastleBarracks_temp",
"ArnorCastleBaseKeep",
"ArnorCastleFoundation_temp",
"ArnorCastleKeep",
"ArnorCastleKeep_temp",
"ArnorCastleWall_temp",
"ArnorCavalry",
"ArnorCavalryBanner",
"ArnorElvenBarracks",
"ArnorFarmInterface",
"ArnorFighterHorde",
"ArnorForbiddenPool",
"ArnorForge",
"ArnorFortressCitadel",
"ArnorGarrisonTowerExpansion",
"ArnorGreatKeep",
"ArnorInnerWall",
"ArnorKeep",
"ArnorKnightHorde",
"ArnorMallornTree",
"ArnorMarketPlace",
"ArnorRanger",
"ArnorRangerHorde",
"ArnorSentryTower",
"ArnorStable",
"ArnorStatue",
"ArnorTent",
"ArnorTowerShieldGuardHorde",
"ArnorTrebuchetExpansion",
"ArnorWallCliffCap",
"ArnorWallGateSmall",
"ArnorWallHubSmallExpansion",
"ArnorWallPosternGateSmall",
"ArnorWallTowerSmall",
"ArnorWallTrebuchetSmall",
"ArnorWell",
"ArnorWhiteTower",
"ArnorWorkshop",
"BalrogOPT",
"BarrowWight",
"BarrowWightLair",
"BattleFlag",
"BlueMountainGate",
"CaveTrollLair",
"CreateAHero",
"CreateAHeroFamiliar_Base",
"CreateAHeroTornado_Level1",
"CreateAHeroTornado_Level2",
"CreateAHeroTornado_Level3",
"Crebain",
"DireWolfLair",
"DolGoldurCastle",
"Drogoth",
"DryDock",
"DwarfBarracks",
"DwarvenArcheryRange",
"DwarvenAxeThrower",
"DwarvenAxeThrowerHorde",
"DwarvenBattleWagonAxeThrower",
"DwarvenBattleWagonMenOfDale",
"DwarvenBunker",
"DwarvenCaptainofDale",
"DwarvenCastleWallCatapult",
"DwarvenCastleWallGate",
"DwarvenCastleWallTower",
"DwarvenCatapult",
"DwarvenCatapultExpansion",
"DwarvenDain",
"DwarvenDemolisher",
"DwarvenEreborTowerTowerExpansion",
"DwarvenFortressCitadel",
"DwarvenGloin",
"DwarvenGloin_Temp",
"DwarvenGuardianHorde",
"DwarvenHallExpansion",
"DwarvenHearth",
"DwarvenMenOfDale",
"DwarvenMenOfDaleHorde",
"DwarvenPhalanxHorde",
"DwarvenSentryTower_Independent",
"DwarvenSiegeWorks",
"DwarvenStatue",
"DwarvenSummonedCitadelKeep",
"DwarvenWallCatapultSmall",
"DwarvenWallCliffCap",
"DwarvenWallGateSmall",
"DwarvenWallHubSmallExpansion",
"DwarvenWallPosternGate",
"DwarvenWallPosternGateSmall",
"DwarvenWallTowerSmall",
"DwarvenZerkerHorde",
"EBGarrisonableTower",
"ElrondWhirlwind",
"ElvenArwen",
"ElvenBarracks",
"ElvenBarracksBFME1",
"ElvenBattleTower",
"ElvenCampKeep",
"ElvenCastleBaseKeep",
"ElvenCastleWallGate",
"ElvenCastleWallHubExpansion",
"ElvenCitadel",
"ElvenElrond",
"ElvenEntMoot",
"ElvenFloodgateExpansion",
"ElvenGaladriel",
"ElvenGlorfindel",
"ElvenGreenPasture",
"ElvenHaldir",
"ElvenImladrisWarrior",
"ElvenLorienArcher",
"ElvenLorienArcherHorde",
"ElvenLorienWarriorHorde",
"ElvenMallornTree",
"ElvenMirkwoodArcher",
"ElvenMirkwoodArcherHorde",
"ElvenMirrorOfGaladriel",
"ElvenMithlondSentryHorde",
"ElvenRivendellArcher",
"ElvenRivendellArcherHorde",
"ElvenRivendellLancer",
"ElvenRivendellLancerBanner",
"ElvenRivendellLancerHorde",
"ElvenSentryTower",
"ElvenStatue",
"ElvenThranduil",
"ElvenVigilantEntExpansion",
"ElvenWallCliffCap",
"ElvenWatchtowerExpansion",
"ElvenWhirlpool",
"EreaborGarrisonableTowerExt",
"EregionForge",
"EttenmoorsGoblinKingWall1",
"EttenmoorsGoblinKingWall1_unclimbable",
"EttenmoorsGoblinKingWall2",
"EttenmoorsGoblinKingWall3",
"EttenmoorsGoblinKingWall4",
"EvilMenBlackRider",
"EvilPort",
"EvilSentryTower",
"EyeOfSauron",
"FarmInterface",
"FireDrakeLair",
"FornostBuildingGov",
"Furnace",
"GaladrielTornado",
"GBCSigFire",
"GHGarrisonableTower",
"GiantSpider",
"GoblinArcher",
"GoblinArcherHorde",
"GoblinCampKeep",
"GoblinCave",
"GoblinCaveTroll",
"GoblinFighterHorde",
"GoblinFissure",
"GoblinSpiderRider",
"GoblinSpiderRiderBanner",
"GoblinSpiderRiderHorde",
"GondorAragorn",
"GondorArcher",
"GondorArcherHorde",
"GondorArcherRange",
"GondorBarracks",
"GondorBoromir",
"GondorCampKeep",
"GondorCastleBarracks_temp",
"GondorCastleBaseKeep",
"GondorCastleFoundation_temp",
"GondorCastleKeep",
"GondorCastleKeep_temp",
"GondorCastleWall_temp",
"GondorCatacombs",
"GondorCavalry",
"GondorCavalryBanner",
"GondorCavalryDeadRiderB",
"GondorCavalryDeadRiderD",
"GondorCivilianFemaleHorde",
"GondorCivilianMaleHorde",
"GondorDamrod",
"GondorDeadRiderDEDA",
"GondorEarnur",
"GondorFaramir",
"GondorFighterHorde",
"GondorForbiddenPool",
"GondorForge",
"GondorGandalf",
"GondorGandalfWhite_H",
"GondorGandalfWhite_L",
"GondorGandalfWhite_M",
"GondorGreatKeep",
"GondorGwaihir",
"GondorHeroStatue",
"GondorHseHeal",
"GondorInnerWall",
"GondorIsildur",
"GondorKeep",
"GondorKnightHorde",
"GondorKnightsofDol",
"GondorKnightsofDolHorde",
"GondorMarketPlace",
"GondorRanger",
"GondorRangerHorde",
"GondorSentryTower",
"GondorStable",
"GondorStatue",
"GondorTent",
"GondorTowerShieldGuardHorde",
"GondorWell",
"GondorWhiteTower",
"GondorWorkshop",
"GoodPort",
"HaradCampKeep",
"HelmsDeepArcade",
"HelmsDeepdiWall1",
"HelmsDeepdiWall2",
"HelmsDeepGate",
"HelmsDeepGate1",
"HelmsDeepGate2",
"HelmsDeepPavement01",
"HelmsDeepPavement02",
"HelmsDeepTower",
"HillTrollLair",
"HobbitCivilianHorde",
"ImladrisWarriorHorde",
"Inn",
"IsengardArmory",
"IsengardBallistaExpansion",
"IsengardBatteringRam",
"IsengardBattleTower",
"IsengardBerserkerHorde",
"IsengardCampCentralTent",
"IsengardCampKeep",
"IsengardCastleBaseKeep",
"IsengardCastleWallGate",
"IsengardCastleWallHubExpansion",
"IsengardFighterHorde",
"IsengardFortressCitadel",
"IsengardLurtz",
"IsengardMineLauncherExpansion",
"IsengardMurderOfCrows",
"IsengardPikemanHorde",
"IsengardSaruman",
"IsengardSharku",
"IsengardSiegeLadder",
"IsengardSiegeWorks",
"IsengardTavern",
"IsengardTent",
"IsengardTent2",
"IsengardTowerExpansion",
"IsengardTowerOfOrthanc",
"IsengardTowerOfOrthancMPSA",
"IsengardUrukCrossbow",
"IsengardUrukCrossbowHorde",
"IsengardUrukPit",
"IsengardWallCliffCap",
"IsengardWargPack",
"IsengardWargPackHorde",
"IsengardWargPit",
"IsengardWargRider",
"IsengardWargRiderBanner",
"IsengardWargRiderHorde",
"IsengardWargSentry",
"IsengardWildmanAxe",
"IsengardWildmanAxeHorde",
"IsengardWildmanHorde",
"IsengardWormTongue",
"LesserWight",
"LindonElvenWarrior",
"LindonWarriorHorde",
"LumberMill",
"Marker",
"MBMMTower",
"MenArrowTowerExpansion",
"MenFortressCitadel",
"MenGarrisonTowerExpansion",
"MenTrebuchetExpansion",
"MenWallCliffCap",
"MenWallGateSmall",
"MenWallHubSmallExpansion",
"MenWallPosternGateSmall",
"MenWallTowerSmall",
"MenWallTrebuchetSmall",
"MineShaft_Interface",
"MinorSpider",
"MirkBridge",
"MordorArcher",
"MordorArcherHorde",
"MordorAttackTroll",
"MordorBalrog",
"MordorBalrog_NOFIRE",
"MordorBarracks",
"MordorBase",
"MordorBattleTower",
"MordorBlackGate01",
"MordorBlackGate02",
"MordorBlackGate02EX",
"MordorBlackGate03",
"MordorBlackGate04",
"MordorBlackGate05",
"MordorBlackGate05EX",
"MordorBlackGate06",
"MordorBlackGateLeft",
"MordorBlackGateRight",
"MordorBlackOrc",
"MordorBlackOrcHorde",
"MordorBlackRider",
"MordorBlackRiderHorde",
"MordorCampCentralTent",
"MordorCampKeep",
"MordorCatapult",
"MordorCatapult_Celduin",
"MordorCaveTroll",
"MordorCorsairsOfUmbarHorde",
"MordorDrummerTroll",
"MordorDrummerTroll_Temp",
"MordorEasterlingHorde",
"MordorEasterlingHordeObsolete",
"MordorEyeOfSauron",
"MordorFellBeastInterface",
"MordorFighter",
"MordorFighterHorde",
"MordorFortressBarricadeExpansion",
"MordorFortressCitadel",
"MordorGateWatchersExpansion",
"MordorGoblinArcher",
"MordorGoblinFighterHorde",
"MordorGoblinSwordsman",
"MordorGothmog",
"MordorGothmogWarg",
"MordorGrond",
"MordorGrondCrew",
"MordorHaradrimArcher",
"MordorHaradrimArcherHorde",
"MordorHaradrimHordeObsolete",
"MordorHaradrimLancerHordeObsolete",
"MordorHaradrimPalace",
"MordorHaradrimRider",
"MordorHaradrimRiderBanner",
"MordorHaradrimRiderHorde",
"MordorHaradTent1",
"MordorKingPalace",
"MordorMountainTroll",
"MordorMouthOfSauron",
"MordorMumakilPen",
"MordorOrcFletcher",
"MordorOrcPit",
"MordorOrcScout_Horde",
"MordorPagoda",
"MordorSauron",
"MordorShelob",
"MordorSiegeTower",
"MordorSiegeTowerCrew",
"MordorSiegeWorks",
"MordorSoldOfRhun",
"MordorTavern",
"MordorTrollCage",
"MordorUmbarTavernObsolete",
"MordorWallCatapultExpansion",
"MordorWargHorde",
"MordorWitchKing",
"MordorWorker",
"MoriarGoblinLair",
"NeutralDireWolf",
"NeutralGollum",
"NeutralWarg",
"NoldorWarrior",
"NoldorWarriorHorde",
"OrcChief01",
"OrcChief02",
"OrcChief03",
"OrcChief04",
"OrcChief05",
"RivBellTower",
"RivRTower",
"RohanArcher",
"RohanArcherHorde",
"RohanArcherRange",
"RohanArmory",
"RohanBanner",
"RohanBattleTower",
"RohanCampKeep",
"RohanCastleBaseKeep",
"RohanCastleKeep",
"RohanElvenWarrior",
"RohanElvenWarriorHorde",
"RohanEntBase",
"RohanEomer",
"RohanEowyn",
"RohanFrodo",
"RohanGamling",
"RohanGenericEnt",
"RohanGimli",
"RohanGoldenHall",
"RohanHeroStatue",
"RohanHeroStatueNoLeadership",
"RohanHobbitFriendsHorde",
"RohanHobbitHorde",
"RohanHobbitHorde",
"RohanHobbitNoHeroHorde",
"RohanInnerWall",
"RohanLegolas",
"RohanMerry",
"RohanOathbreaker",
"RohanOathbreaker1",
"RohanOathbreakerHorde",
"RohanOathbreakersCavalry",
"RohanPeasant",
"RohanPeasant1",
"RohanPeasantHorde",
"RohanPippin",
"RohanRefugeeCamp",
"RohanRefugeeCampA",
"RohanRefugeeCampB",
"RohanRefugeeCampC",
"RohanRohirrim",
"RohanRohirrimBannerRider",
"RohanRohirrimHorde",
"RohanRohirrimHordeObsolete",
"RohanRoyalGuardHorde",
"RohanSam",
"RohanSentryTower",
"RohanSpearmenHorde",
"RohanStable",
"RohanTheoden",
"RohanTreeBerd",
"RohanWall",
"RohanWell",
"RohirrimDeadRider",
"RuinedTower",
"RuinedTower_Open",
"ShadeCallthePack",
"ShipWright",
"ShireGreenDragon",
"SlaughterHouse",
"SnowTrollLair",
"SpellBookDragonStrikeDragon",
"SpiderLair",
"SummonedDragon",
"TomBombadil",
"TrollDrum",
"WargDeadRider",
"WargLair",
"WargSentry",
"WatcherHead",
"WatcherHittingArm",
"WildArrowDenExpansion",
"WildAzog",
"WildBabyDrakeHorde",
"WildBannerSpiderRider",
"WildBatCloud",
"WildBurrowsExpansion",
"WildFireDrake",
"WildFortressCitadel",
"WildGiantSentryExpansion",
"WildGoblinKing",
"WildLaborer",
"WildMarauderHorde",
"WildMarauderSwordHorde",
"WildMountainGiant",
"WildMountainGiant",
"WildSentryTower",
"WildShelob",
"WildSpiderHolesExpansion",
"WildSpiderlingHorde",
"WildSpiderPit",
"WildTreasureTrove",
"WOR_ArnorCastleBaseKeep",
"WOR_DolGoldurCastle",
"WOR_EreborThrone",
"WOR_GondorCastleBaseKeep",
"WOR_HelmsDeepArcade",
"WOR_IsengardCastleBaseKeep",
"WOR_MBMMTower",
"WOR_RivElHouse",
"Wyrm"
}

RelevantNonLuaObjectsTypeTable_BFME2_ROTWK={
"AngFornostSmallSpire",
"AngFornostSpire",
"AngFornost_FallingTower",
"AngForStronghold",
"AngmarWallCliffCap",
"AngmarWallGateSmall",
"AngmarWallHubSmallExpansion",
"AngmarWallPosternGateSmall",
"ArnorCampKeep",
"ArnorCastleBarracks_temp",
"ArnorCastleFoundation_temp",
"ArnorCastleKeep",
"ArnorCastleKeep_temp",
"ArnorCastleWall_temp",
"ArnorForbiddenPool",
"ArnorGreatKeep",
"ArnorInnerWall",
"ArnorMarketPlace",
"ArnorStatue",
"ArnorTent",
"ArnorWallCliffCap",
"ArnorWallGateSmall",
"ArnorWallHubSmallExpansion",
"ArnorWallPosternGateSmall",
"ArnorWallTrebuchetSmall",
"ArnorWell",
"ArnorWhiteTower",
"ArnorWorkshop",
"BarrowWightLair",
"BattleFlag",
"BlueMountainGate",
"CaveTrollLair",
"DireWolfLair",
"DolGoldurCastle",
"DryDock",
"DwarvenBunker",
"DwarvenCastleWallCatapult",
"DwarvenCastleWallGate",
"DwarvenHallExpansion",
"DwarvenHearth",
"DwarvenStatue",
"DwarvenWallCatapultSmall",
"DwarvenWallCliffCap",
"DwarvenWallGateSmall",
"DwarvenWallHubSmallExpansion",
"DwarvenWallPosternGate",
"DwarvenWallPosternGateSmall",
"ElvenBarracksBFME1",
"ElvenCampKeep",
"ElvenCastleBaseKeep",
"ElvenCastleWallGate",
"ElvenCastleWallHubExpansion",
"ElvenEntMoot",
"ElvenMirrorOfGaladriel",
"ElvenSentryTower",
"ElvenStatue",
"ElvenWallCliffCap",
"EttenmoorsGoblinKingWall1",
"EttenmoorsGoblinKingWall1_unclimbable",
"EttenmoorsGoblinKingWall2",
"EttenmoorsGoblinKingWall3",
"EttenmoorsGoblinKingWall4",
"EvilPort",
"FireDrakeLair",
"FornostBuildingGov",
"GBCSigFire",
"GoblinCampKeep",
"GoblinFissure",
"GondorCampKeep",
"GondorCastleBarracks_temp",
"GondorCastleFoundation_temp",
"GondorCastleKeep",
"GondorCastleKeep_temp",
"GondorCastleWall_temp",
"GondorCatacombs",
"GondorCavalryDeadRiderB",
"GondorCavalryDeadRiderD",
"GondorDeadRiderDEDA",
"GondorForbiddenPool",
"GondorGreatKeep",
"GondorHeroStatue",
"GondorHseHeal",
"GondorInnerWall",
"GondorMarketPlace",
"GondorStatue",
"GondorTent",
"GondorWell",
"GondorWhiteTower",
"GondorWorkshop",
"GoodPort",
"HaradCampKeep",
"HelmsDeepArcade",
"HelmsDeepdiWall1",
"HelmsDeepdiWall2",
"HelmsDeepGate",
"HelmsDeepGate1",
"HelmsDeepGate2",
"HelmsDeepPavement01",
"HelmsDeepPavement02",
"HelmsDeepTower",
"HillTrollLair",
"Inn",
"IsengardCampCentralTent",
"IsengardCampKeep",
"IsengardCastleBaseKeep",
"IsengardCastleWallGate",
"IsengardCastleWallHubExpansion",
"IsengardTent",
"IsengardTent2",
"IsengardTowerOfOrthanc",
"IsengardTowerOfOrthancMPSA",
"IsengardWallCliffCap",
"IsengardWargSentry",
"MBMMTower",
"MenWallCliffCap",
"MenWallGateSmall",
"MenWallHubSmallExpansion",
"MenWallPosternGateSmall",
"MenWallTrebuchetSmall",
"MineShaft_Interface",
"MirkBridge",
"MordorBarracks",
"MordorBase",
"MordorBlackGate01",
"MordorBlackGate02",
"MordorBlackGate02EX",
"MordorBlackGate03",
"MordorBlackGate04",
"MordorBlackGate05",
"MordorBlackGate05EX",
"MordorBlackGate06",
"MordorBlackGateLeft",
"MordorBlackGateRight",
"MordorCampCentralTent",
"MordorCampKeep",
"MordorEyeOfSauron",
"MordorFortressBarricadeExpansion",
"MordorHaradTent1",
"MordorKingPalace",
"MordorMumakilPen",
"MordorOrcFletcher",
"MordorOrcPit",
"MordorPagoda",
"MordorSiegeWorks",
"MordorTrollCage",
"MordorUmbarTavernObsolete",
"MoriarGoblinLair",
"RivRTower",
"RohanBattleTower",
"RohanCampKeep",
"RohanCastleBaseKeep",
"RohanCastleKeep",
"RohanGoldenHall",
"RohanHeroStatue",
"RohanHeroStatueNoLeadership",
"RohanInnerWall",
"RohanRefugeeCamp",
"RohanRefugeeCampA",
"RohanRefugeeCampB",
"RohanRefugeeCampC",
"RohanWall",
"RohanWell",
"RohirrimDeadRider",
"ShireGreenDragon",
"SnowTrollLair",
"SpiderLair",
"TrollDrum",
"WargDeadRider",
"WargLair",
"WildBurrowsExpansion",
"WildSpiderPit",
"WOR_ArnorCastleBaseKeep",
"WOR_DolGoldurCastle",
"WOR_EreborThrone",
"WOR_GondorCastleBaseKeep",
"WOR_HelmsDeepArcade",
"WOR_IsengardCastleBaseKeep",
"WOR_MBMMTower",
"WOR_RivElHouse"
}

-------------OBJECT LISTS-----------------------------------------

BFMEIIROTWK_OBJECT_TYPE_ALL_LIST_DESC = {
	"all objects", "huge units", "hero", "infantry horde", "archer horde", "archer", "structures (main)", "cavalry", "machine", "big monster", "summoned", "no freewill enter", "orc", "horde", "animals", "neutral"
}

BFMEIIROTWK_OBJECT_TYPE_ALL_LIST = { 
["all objects"]=BFMEII_ROTWK_OBJECT_LIST_ALL,
["hero"]=OBJECT_TYPE_LIST_HERO,
["infantry horde"]=OBJECT_TYPE_LIST_INFANTRY_HORDE, 
["archer horde"]=OBJECT_TYPE_LIST_ARCHER_HORDE, 
["archer"]=OBJECT_TYPE_LIST_ARCHER, 
["structures (main)"]=OBJECT_TYPE_LIST_STRUCTURE_MAIN,
["cavalry"]=OBJECT_TYPE_LIST_CAVALRY, 
["machine"]=OBJECT_TYPE_LIST_MACHINE, 
["monster"]=OBJECT_TYPE_LIST_MONSTER,
["big monster"]=OBJECT_TYPE_LIST_BIG_MONSTER, 
["summoned"]=OBJECT_TYPE_LIST_SUMMONED, 
["no freewill enter"]=OBJECT_TYPE_LIST_NO_FREEWILL_ENTER, 
["orc"]=OBJECT_TYPE_LIST_ORC, 
["horde"]=OBJECT_TYPE_LIST_HORDE,
["animals"]=OBJECT_TYPE_LIST_ANIMALS,
["neutral"]=OBJECT_TYPE_LIST_NEUTRAL,
["huge units"]=OBJECT_TYPE_LIST_TOP
}

KindOfTable_BFMEIIROTWK = {
["OBSTACLE"]=0, ["SELECTABLE"]=1, ["IMMOBILE"]=2, ["CAN_ATTACK"]=3, ["STICK_TO_TERRAIN_SLOPE"]=4, ["CAN_CAST_REFLECTIONS"]=5, ["SHRUBBERY"]=6, ["STRUCTURE"]=7, ["INFANTRY"]=8, ["CAVALRY"]=9, ["MONSTER"]=10, ["MACHINE"]=11, ["AIRCRAFT"]=12, ["HUGE_VEHICLE"]=13, ["DOZER"]=14, ["SWARM_DOZER"]=15, ["HARVESTER"]=16, ["COMMANDCENTER"]=17, 
["CASTLE_CENTER"]=18, ["SALVAGER"]=19, ["WEAPON_SALVAGER"]=20, ["TRANSPORT"]=21, ["BRIDGE"]=22, ["LANDMARK_BRIDGE"]=23, ["BRIDGE_TOWER"]=24, ["PROJECTILE"]=25, ["PRELOAD"]=26, ["NO_GARRISON"]=27, ["CASTLE_KEEP"]=28, ["WAVE_EFFECT"]=29, ["NO_COLLIDE"]=30, ["REPAIR_PAD"]=31, ["HEAL_PAD"]=32, ["STEALTH_GARRISON"]=33, ["SUPPLY_GATHERING_CENTER"]=34, ["AIRFIELD"]=35, 
["DRAWABLE_ONLY"]=36, ["MP_COUNT_FOR_VICTORY"]=37, ["REBUILD_HOLE"]=38, ["SCORE"]=39, ["SCORE_CREATE"]=40, ["SCORE_DESTROY"]=41, ["NO_HEAL_ICON"]=42, ["CAN_RAPPEL"]=43, ["PARACHUTABLE"]=44, ["CAN_BE_REPULSED"]=45, ["MOB_NEXUS"]=46, ["IGNORED_IN_GUI"]=47, ["CRATE"]=48, ["CAPTURABLE"]=49, ["LINKED_TO_FLAG"]=50, ["CLEARED_BY_BUILD"]=51, ["SMALL_MISSILE"]=52, ["ALWAYS_VISIBLE"]=53, 
["UNATTACKABLE"]=54, ["MINE"]=55, ["CLEANUP_HAZARD"]=56, ["PORTABLE_STRUCTURE"]=57, ["ALWAYS_SELECTABLE"]=58, ["ATTACK_NEEDS_LINE_OF_SIGHT"]=59, ["WALK_ON_TOP_OF_WALL"]=60, ["DEFENSIVE_WALL"]=61, ["FS_POWER"]=62, ["FS_FACTORY"]=63, ["FS_BASE_DEFENSE"]=64, ["FS_TECHNOLOGY"]=65, ["AIRCRAFT_PATH_AROUND"]=66, ["LOW_OVERLAPPABLE"]=67, ["FORCEATTACKABLE"]=68, ["AUTO_RALLYPOINT"]=69, ["OATHBREAKER"]=70, ["POWERED"]=71, 
["PRODUCED_AT_HELIPAD"]=72, ["DRONE"]=73, ["CAN_SEE_THROUGH_STRUCTURE"]=74, ["BALLISTIC_MISSILE"]=75, ["CLICK_THROUGH"]=76, ["SUPPLY_SOURCE_ON_PREVIEW"]=77, ["PARACHUTE"]=78, ["GARRISONABLE_UNTIL_DESTROYED"]=79, ["BOAT"]=80, ["IMMUNE_TO_CAPTURE"]=81, ["HULK"]=82, ["SHOW_PORTRAIT_WHEN_CONTROLLED"]=83, ["SPAWNS_ARE_THE_WEAPONS"]=84, ["CANNOT_BUILD_NEAR_SUPPLIES"]=85, ["SUPPLY_SOURCE"]=86, ["REVEAL_TO_ALL"]=87, ["DISGUISER"]=88, ["INERT"]=89, 
["HERO"]=90, ["IGNORES_SELECT_ALL"]=91, ["DONT_AUTO_CRUSH_INFANTRY"]=92, ["SIEGE_TOWER"]=93, ["TREE"]=94, ["SHRUB"]=95, ["CLUB"]=96, ["ROCK"]=97, ["THROWN_OBJECT"]=98, ["GRAB_AND_KILL"]=99, ["OPTIMIZED_PROP"]=100, ["ENVIRONMENT"]=101, ["DEFLECT_BY_SPECIAL_POWER"]=102, ["WORKING_PASSENGER"]=103, ["BASE_FOUNDATION"]=104, ["NEED_BASE_FOUNDATION"]=105, ["REACT_WHEN_SELECTED"]=106, ["GIMLI"]=107, 
["ORC"]=108, ["HORDE"]=109, ["COMBO_HORDE"]=110, ["NONOCCLUDING"]=111, ["NO_FREEWILL_ENTER"]=112, ["CAN_USE_SIEGE_TOWER"]=113, ["CAN_RIDE_SIEGE_LADDER"]=114, ["TACTICAL_MARKER"]=115, ["PATH_THROUGH_EACH_OTHER"]=116, ["NOTIFY_OF_PREATTACK"]=117, ["GARRISON"]=118, ["MELEE_HORDE"]=119, ["BASE_SITE"]=120, ["INERT_SHROUD_REVEALER"]=121, ["OCL_BIT"]=122, ["SPELL_BOOK"]=123, ["DEPRECATED"]=124, ["PATH_THROUGH_INFANTRY"]=125, 
["NO_FORMATION_MOVEMENT"]=126, ["NO_BASE_CAPTURE"]=127, ["ARMY_SUMMARY"]=128, ["HOBBIT"]=129, ["NOT_AUTOACQUIRABLE"]=130, ["URUK"]=131, ["CHUNK_VENDOR"]=132, ["ARCHER"]=133, ["MOVE_ONLY"]=134, ["FS_CASH_PRODUCER"]=135, ["ROCK_VENDOR"]=136, ["BLOCKING_GATE"]=137, ["CAN_RIDE_BATTERING_RAM"]=138, ["SIEGE_LADDER"]=139, ["MINE_TRIGGER"]=140, ["BUFF"]=141, ["GRAB_AND_DROP"]=142, ["PORTER"]=143, 
["SCARY"]=144, ["CRITTER_EMITTER"]=145, ["SALT_LICK"]=146, ["CAN_ATTACK_WALLS"]=147, ["IGNORE_FOR_VICTORY"]=148, ["DO_NOT_CLASSIFY"]=149, ["WALL_UPGRADE"]=150, ["ARMY_OF_DEAD"]=151, ["TAINT"]=152, ["BASE_DEFENSE_FOUNDATION"]=153, ["NOT_SELLABLE"]=154, ["WEBBED"]=155, ["WALL_HUB"]=156, ["BUILD_FOR_FREE"]=157, ["IGNORE_FOR_EVA_SPEECH_POSITION"]=158, ["MADE_OF_WOOD"]=159, ["MADE_OF_METAL"]=160, ["MADE_OF_STONE"]=161, 
["MADE_OF_DIRT"]=162, ["FACE_AWAY_FROM_CASTLE_KEEP"]=163, ["BANNER"]=164, ["I_WANT_TO_EAT_YOU"]=165, ["INDUSTRY_AFFECTED"]=166, ["DWARVENRICHES_AFFECTED"]=167, ["GANDALF"]=168, ["ARAGORN"]=169, ["HAS_HEALTH_BAR"]=170, ["BIG_MONSTER"]=171, ["DEPLOYED_MINE"]=172, ["CANNOT_RETALIATE"]=173, ["CREEP"]=174, ["TAINTEFFECT"]=175, ["TROLL_BUFF_NUGGET"]=176, ["VITAL_FOR_BASE_SURVIVAL"]=177, ["DO_NOT_PICK_ME_WHEN_BUILDING"]=178, ["SUMMONED"]=179, 
["HIDE_IF_FOGGED"]=180, ["ALWAYS_SHOW_HOUSE_COLOR"]=181, ["MOVE_FOR_NOONE"]=182, ["WB_DISPLAY_SCRIPT_NAME"]=183, ["CAN_CLIMB_WALLS"]=184, ["MUMAKIL_BUFF_NUGGET"]=185, ["LARGE_RECTANGLE_PATHFIND"]=186, ["SUBMARINE"]=187, ["PORT"]=188, ["WALL_SEGMENT"]=189, ["CREATE_A_HERO"]=190, ["SHIP"]=191, ["OPTIMIZED_SOUND"]=192, ["PASS_EXPERIENCE_TO_CONTAINED"]=193, ["DOZER_FACTORY"]=194, ["THREAT_FINDER"]=195, ["ECONOMY_STRUCTURE"]=196, ["LIVING_WORLD_BUILDING_MIRROR"]=197, 
["PIKE"]=198, ["NONCOM"]=199, ["OBSOLETE"]=200, ["SCALEABLE_WALL"]=201, ["SKYBOX"]=202, ["WALL_GATE"]=203, ["CAPTUREFLAG"]=204, ["NEUTRALGOLLUM"]=205, ["PASS_EXPERIENCE_TO_CONTAINER"]=206, ["GIANT_BIRD"]=207, ["ORIENTS_TO_CAMERA"]=208, ["NEVER_CULL_FOR_MP"]=209, ["DONT_USE_CANCEL_BUILD_BUTTON"]=210, ["ONE_RING"]=211, ["HEAVY_MELEE_HITTER"]=212, ["DONT_HIDE_IF_FOGGED"]=213, ["CAN_SHOOT_OVER_WALLS"]=214, ["PASS_EXPERIENCE_TO_PRODUCER"]=215, 
["EXPANSION_PAD"]=216, ["AMPHIBIOUS"]=217, ["SUPPORT"]=218, ["TROLL"]=219, ["SIEGEENGINE"]=220, ["HORDE_MONSTER"]=221 }

KindOfTable_BFMEIIROTWK_ = {
"OBSTACLE",
"SELECTABLE",
"IMMOBILE",
"CAN_ATTACK",
"STICK_TO_TERRAIN_SLOPE",
"CAN_CAST_REFLECTIONS",
"SHRUBBERY",
"STRUCTURE",
"INFANTRY",
"CAVALRY",
"MONSTER",
"MACHINE",
"AIRCRAFT",
"HUGE_VEHICLE",
"DOZER",
"SWARM_DOZER",
"HARVESTER",
"COMMANDCENTER",
"CASTLE_CENTER",
"SALVAGER",
"WEAPON_SALVAGER",
"TRANSPORT",
"BRIDGE",
"LANDMARK_BRIDGE",
"BRIDGE_TOWER",
"PROJECTILE",
"PRELOAD",
"NO_GARRISON",
"CASTLE_KEEP",
"WAVE_EFFECT",
"NO_COLLIDE",
"REPAIR_PAD",
"HEAL_PAD",
"STEALTH_GARRISON",
"SUPPLY_GATHERING_CENTER",
"AIRFIELD",
"DRAWABLE_ONLY",
"MP_COUNT_FOR_VICTORY",
"REBUILD_HOLE",
"SCORE",
"SCORE_CREATE",
"SCORE_DESTROY",
"NO_HEAL_ICON",
"CAN_RAPPEL",
"PARACHUTABLE",
"CAN_BE_REPULSED",
"MOB_NEXUS",
"IGNORED_IN_GUI",
"CRATE",
"CAPTURABLE",
"LINKED_TO_FLAG",
"CLEARED_BY_BUILD",
"SMALL_MISSILE",
"ALWAYS_VISIBLE",
"UNATTACKABLE",
"MINE",
"CLEANUP_HAZARD",
"PORTABLE_STRUCTURE",
"ALWAYS_SELECTABLE",
"ATTACK_NEEDS_LINE_OF_SIGHT",
"WALK_ON_TOP_OF_WALL",
"DEFENSIVE_WALL",
"FS_POWER",
"FS_FACTORY",
"FS_BASE_DEFENSE",
"FS_TECHNOLOGY",
"AIRCRAFT_PATH_AROUND",
"LOW_OVERLAPPABLE",
"FORCEATTACKABLE",
"AUTO_RALLYPOINT",
"OATHBREAKER",
"POWERED",
"PRODUCED_AT_HELIPAD",
"DRONE",
"CAN_SEE_THROUGH_STRUCTURE",
"BALLISTIC_MISSILE",
"CLICK_THROUGH",
"SUPPLY_SOURCE_ON_PREVIEW",
"PARACHUTE",
"GARRISONABLE_UNTIL_DESTROYED",
"BOAT",
"IMMUNE_TO_CAPTURE",
"HULK",
"SHOW_PORTRAIT_WHEN_CONTROLLED",
"SPAWNS_ARE_THE_WEAPONS",
"CANNOT_BUILD_NEAR_SUPPLIES",
"SUPPLY_SOURCE",
"REVEAL_TO_ALL",
"DISGUISER",
"INERT",
"HERO",
"IGNORES_SELECT_ALL",
"DONT_AUTO_CRUSH_INFANTRY",
"SIEGE_TOWER",
"TREE",
"SHRUB",
"CLUB",
"ROCK",
"THROWN_OBJECT",
"GRAB_AND_KILL",
"OPTIMIZED_PROP",
"ENVIRONMENT",
"DEFLECT_BY_SPECIAL_POWER",
"WORKING_PASSENGER",
"BASE_FOUNDATION",
"NEED_BASE_FOUNDATION",
"REACT_WHEN_SELECTED",
"GIMLI",
"ORC",
"HORDE",
"COMBO_HORDE",
"NONOCCLUDING",
"NO_FREEWILL_ENTER",
"CAN_USE_SIEGE_TOWER",
"CAN_RIDE_SIEGE_LADDER",
"TACTICAL_MARKER",
"PATH_THROUGH_EACH_OTHER",
"NOTIFY_OF_PREATTACK",
"GARRISON",
"MELEE_HORDE",
"BASE_SITE",
"INERT_SHROUD_REVEALER",
"OCL_BIT",
"SPELL_BOOK",
"DEPRECATED",
"PATH_THROUGH_INFANTRY",
"NO_FORMATION_MOVEMENT",
"NO_BASE_CAPTURE",
"ARMY_SUMMARY",
"HOBBIT",
"NOT_AUTOACQUIRABLE",
"URUK",
"CHUNK_VENDOR",
"ARCHER",
"MOVE_ONLY",
"FS_CASH_PRODUCER",
"ROCK_VENDOR",
"BLOCKING_GATE",
"CAN_RIDE_BATTERING_RAM",
"SIEGE_LADDER",
"MINE_TRIGGER",
"BUFF",
"GRAB_AND_DROP",
"PORTER",
"SCARY",
"CRITTER_EMITTER",
"SALT_LICK",
"CAN_ATTACK_WALLS",
"IGNORE_FOR_VICTORY",
"DO_NOT_CLASSIFY",
"WALL_UPGRADE",
"ARMY_OF_DEAD",
"TAINT",
"BASE_DEFENSE_FOUNDATION",
"NOT_SELLABLE",
"WEBBED",
"WALL_HUB",
"BUILD_FOR_FREE",
"IGNORE_FOR_EVA_SPEECH_POSITION",
"MADE_OF_WOOD",
"MADE_OF_METAL",
"MADE_OF_STONE",
"MADE_OF_DIRT",
"FACE_AWAY_FROM_CASTLE_KEEP",
"BANNER",
"I_WANT_TO_EAT_YOU",
"INDUSTRY_AFFECTED",
"DWARVENRICHES_AFFECTED",
"GANDALF",
"ARAGORN",
"HAS_HEALTH_BAR",
"BIG_MONSTER",
"DEPLOYED_MINE",
"CANNOT_RETALIATE",
"CREEP",
"TAINTEFFECT",
"TROLL_BUFF_NUGGET",
"VITAL_FOR_BASE_SURVIVAL",
"DO_NOT_PICK_ME_WHEN_BUILDING",
"SUMMONED",
"HIDE_IF_FOGGED",
"ALWAYS_SHOW_HOUSE_COLOR",
"MOVE_FOR_NOONE",
"WB_DISPLAY_SCRIPT_NAME",
"CAN_CLIMB_WALLS",
"MUMAKIL_BUFF_NUGGET",
"LARGE_RECTANGLE_PATHFIND",
"SUBMARINE",
"PORT",
"WALL_SEGMENT",
"CREATE_A_HERO",
"SHIP",
"OPTIMIZED_SOUND",
"PASS_EXPERIENCE_TO_CONTAINED",
"DOZER_FACTORY",
"THREAT_FINDER",
"ECONOMY_STRUCTURE",
"LIVING_WORLD_BUILDING_MIRROR",
"PIKE",
"NONCOM",
"OBSOLETE",
"SCALEABLE_WALL",
"SKYBOX",
"WALL_GATE",
"CAPTUREFLAG",
"NEUTRALGOLLUM",
"PASS_EXPERIENCE_TO_CONTAINER",
"GIANT_BIRD",
"ORIENTS_TO_CAMERA",
"NEVER_CULL_FOR_MP",
"DONT_USE_CANCEL_BUILD_BUTTON",
"ONE_RING",
"HEAVY_MELEE_HITTER",
"DONT_HIDE_IF_FOGGED",
"CAN_SHOOT_OVER_WALLS",
"PASS_EXPERIENCE_TO_PRODUCER",
"EXPANSION_PAD",
"AMPHIBIOUS",
"SUPPORT",
"TROLL",
"SIEGEENGINE",
"HORDE_MONSTER"
}

BFME2ROTWK_TEAMLIST = {
"SkirmishAngmar/teamSkirmishAngmar",
"SkirmishDwarves/teamSkirmishDwarves",
"SkirmishElves/teamSkirmishElves",
"SkirmishIsengard/teamSkirmishIsengard",
"SkirmishMen/teamSkirmishMen",
"SkirmishMordor/teamSkirmishMordor",
"SkirmishWild/teamSkirmishWild"
}

function CountTeamsKindOf_BFME2ROTWK(team, kindof) 
	local KindOf_
	if type(kindof) == "number" then KindOf_=kindof
		elseif type(kindof) == "string" then KindOf_=KindOfTable[kindof]
		if KindOf_==nil then KindOf_=KindOfIndexTable[GetIndexOfTableElement(KindOfIndexTable,kindof)-1] end
	end
	local sc=0
	local lower, upper, middle
	upper=1
	while EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, upper, KindOf_) do
		upper=upper*10
		sc=sc+1 if sc >=100000 then return 0 end
	end
	while not EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, floor(upper/2), KindOf_) do
		upper=floor(upper/2)
		sc=sc+1 if sc >=100000 then return 0 end
	end
    lower=floor(upper/2)
	while (upper-lower)>1 do 
		middle=(upper+lower)/2
		if not EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, ceil(middle), KindOf_) then upper=ceil(middle)
		else lower=floor(middle) end
		sc=sc+1 if sc >=100000 then return 0 end
	end   
	middle=ceil((upper+lower)/2)
	if not EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, middle, KindOf_) then return lower
	else return upper end
end

function CountTeamsKindOf_BFME2ROTWK(team, kindof)
	for i=0,100,1 do
		if not EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, i, KindOfTable[kindof]) then
			return (i-1)
		end
	end
	return 0
end

CustomHeroRefInit = false
CustomHeroRef = {}
function GetCustomHeroRef(self)
	if not CustomHeroRefInit then
		for k,v in globals() do
			if strfind(tostring(k), "ObjID") ~= nil then
				if strfind(ObjectDescription(v), "CreateAHero") and GetTeamName(v) == GetTeamName(self) then 
					CustomHeroRef = v
					CustomHeroRefInit = true
					return v 
				end
			end
		end	
		return "not found"
	else 
		return CustomHeroRef
	end
end

HeroCustomizationSave = {}

function RefreshHeroCustomizationSave(CreateAHeroPart, state)
	local EntryFound = false
	for i=1,getn(HeroCustomizationSave),1 do
		if HeroCustomizationSave[i][1] == CreateAHeroPart then 
			HeroCustomizationSave[i][2] = state 
			EntryFound = true
			return
		end
	end
	if not EntryFound then
		tinsert(HeroCustomizationSave, { CreateAHeroPart, state } )
	end
end

function ApplyHeroCustomizationSave()
	local HeroRef = GetCustomHeroRef(self)
	for i=1,getn(HeroCustomizationSave),1 do
		ObjectHideSubObjectPermanently(HeroRef, HeroCustomizationSave[i][1], HeroCustomizationSave[i][2]) 
	end
end

function SaveHeroCustomizationSave()
	local SaveData = ""
	for i=1,getn(HeroCustomizationSave),1 do
		if i==1 then SaveData = "HeroCustomizationSave = {" .. [[{"]] .. HeroCustomizationSave[i][1] .. [[{", ]] .. HeroCustomizationSave[i][2] .. "}"
		elseif i==getn(HeroCustomizationSave) then SaveData = SaveData .. [[{"]] .. HeroCustomizationSave[i][1] .. [[{", ]] .. HeroCustomizationSave[i][2] .. "}}"
		else SaveData = SaveData .. [[, {"]] .. HeroCustomizationSave[i][1] .. [[{", ]] .. HeroCustomizationSave[i][2] .. "}, "
		end	
	end
	WriteToFile(SaveData, GetFilePath() .. "HeroCustomizationSave.lua", "w")
end

function SpawnSuperAngmarShadeWolf()
	local master = spawn("AngmarShadeWolf", GetTeamName(object1))
	UnitColorTable = { ["blue"]=255,["red"]=1,["purple"]=50,["yellow"]=-256,["white"]=-1 }
	ExecuteAction("NAMED_CUSTOM_COLOR", master, UnitColorTable.red)
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", master, "Indestructible", 0) 
	ExecuteAction("NAMED_SET_ATTITUDE",master,Behaviour["Agressive"])
	ExecuteAction("UNIT_SET_FLAME_STATUS", master, 1)
	--ExecuteAction("UNIT_STAND_GROUND", master, 1)
    --ExecuteAction("NAMED_SET_HELD", self, 1)
	-- ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", master, "Enabled", 0) 
	-- ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", master, "Powered", 0) 
end

function SpawnInvincibleCustomHero()
	local master = spawn("CreateAHero", GetTeamName(object1))
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", master, "Indestructible", 0) 
	ExecuteAction("NAMED_SET_ATTITUDE",master,Behaviour["Agressive"])
	ExecuteAction("UNIT_SET_EXPERIENCE_POINTS", master, 50000)
	ExecuteAction("NAMED_SET_SPECIAL_POWER_COUNTDOWN",  master, "SpecialAbilityHeroBlink", 0)
end

-------------------BFME2 CODE END----------------------------------

function ExecuteAction_(...)
	if arg[1] == "" then
		ExecuteAction("TEAM_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING",team,MapScriptName,times)
	else
		--ExecuteAction("TEAM_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING",...)
	end
	--ExecuteAction("TEAM_EXECUTE_SEQUENTIAL_SCRIPT",team,MapScriptName)
	--ExecuteAction("UNIT_EXECUTE_SEQUENTIAL_SCRIPT",object,MapScriptName)
end



-------------------------------------------------------------------
--------GLOBAL VARIABLES-------------------------------------------
-------------------------------------------------------------------
MetaModVersion="2.0"
MainFolder="MetaModIO"
AutostartFile="AUTOSTART_CONFIG.lua"
PreLoadScript=false
PreLoadScriptFilename="PreLoad.lua"
SaveFilename="METAMOD_SAVEDATA"
SaveFilenameBackup="METAMOD_SAVEDATA_BACKUP"
ProcessName="cnc3game.dat"  --TW-PORT
--ProcessName="cnc3ep1.dat"
FilePath = ""--GetFilePath()
AutostartFilePath=""
ExternalFileList={}
ProfileName = "User"

VictoryConditionHelper = "PlayerSpellBook" --"VictoryConditionHelper"
GenericDummy = "PlayerSpellBook" --"GenericDummy"
GenericDummyNull = "PlayerSpellBook" --"GenericDummyNull"
GenericDummyStay = "PlayerSpellBook" --"GenericDummyStay""

CNC3EP1FOLDERPATH = {
	"C:\\Users\\" .. getenv("USERNAME") .. "\\Documents\\",
	"C:\\Users\\" .. getenv("USERNAME") .. "\\AppData\\Roaming\\"
}

CNC3EP1FOLDER = {  
	"Command & Conquer 3 Kane's Wrath",
	"Command & Conquer 3 Kanes Rache",
	"Command & Conquer 3 La Ira de Kane",
	"Command & Conquer 3 La Fureur de Kane",
	"Command & Conquer 3 L'ira di Kane",
	"Command and Conquer 3 Kane’s Wrath",
	"Command & Conquer 3 Gniew Kane'a",
	"Command & Conquer 3 Ярость Кейна",
	"커맨드 & 컨커 3 케인의 분노",
	"《命令与征服3 凯恩之怒》",
	"《命令与征服3 : 凯恩之怒》",
	"《終極動員令3肯恩之怒》",
	"《終極動員令3:肯恩之怒》",
	"《終極動員令3 : 肯恩之怒》",
	"命令与征服3：凯恩之怒",
	"命令与征服3 ： 凯恩之怒",
	"คอมมานด์ & คองเคอร์(tm) 3 เคนแรธ",
	"คอมมานด์ & คองเคอร์ 3 เคนแรธ",
	""
}

function TWPort_CNC3FOLDER()--METAMOD-TW-PORT
	CNC3EP1FOLDER = {  
		"Command & Conquer 3 Tiberium Wars",
		"Command and Conquer 3 Tiberium Wars",
		""
	}
end

DRIVELETTER = {
	"C","D","E","F","G","H","I","J","K","L","M","N","O"
}

LIVE_INPUT_DEFAULT =
[[
ErrorLogToFile=1
ErrorWarnings=2
ErrorExitType=0
ErrorSound=0

out('hello world')
print('hello world')

ExecuteAction('PLAY_SOUND_EFFECT', 'Gui_SFX_GAMEOVER')
ExecuteAction('DISPLAY_TEXT', 'MESSAGE:EXTERNALSCRIPTSUCCESSFUL')	
]]

yes,Yes,YES = 1,1,1
no,No,NO = 0,0,0

------------AUTOCONFIG---------------
AutoConfig_General						= yes
AutoConfig_Skirmish						= yes
AutoConfig_Multiplayer					= yes
AutoConfig_StoryMode					= yes
AutoConfig_GlobalConquestMode	= yes

ModScriptsAutoLoadList					= no
ModScriptsAlwaysOff						= no
LiveInputFile									= "LIVE_INPUT.lua"
LiveOutputFile								= "LIVE_OUTPUT.txt"
TemplatesFile								= "templates.txt"
ErrorFileLog                  = "ErrorLog.txt"
ErrorLogToFile                = yes
ErrorWarnings                 = 2
ErrorExitType                 = 0
ErrorSound                    = 1
Force_Lua_Script_Button       = no
ExternaLuaCodeCoroutine = no
Dev_Mode                      = no

Meta_Control_Options_Tab_Menu = yes
Old_Meta_Control_Option_Bar   = no
Send_Money_Option             = no
No_Superweapons               = yes
No_Superweapons_AI            = yes
Adaptive_Auto_AI_Boost        = no
AI_Boost_Cash_Ammount_PerSec  = 100
AI_Boost_Unit_Spawner         = no
AI_Boost_Include_Human_Player = no
Enable_GuardShieldEmitter     = yes
MetaTabMenuUnitSpawnSelection = "NodCommando"
Human_Player_Indestructible   = no
No_Damage_Start_Time          = 0
AI_Begin_Build_Delay          = 0
InfiniteEnergy                = no
InfiniteProductionSpeed       = no
BuildAnywhere                 = no
No_Tiberium                   = no
Infinite_Tiberium             = no
Disable_Fog_Of_War            = no
Map_Reshroud_Time             = 5
Disable_Map_Borders           = no
Random_Meteorites             = no
Stealth_For_Units_Enabled     = yes
Hulk_Lifetime_Override        = no
Hulk_Lifetime                 = 5.0 
Disable_Scoring               = no
Freeze_Time                   = no
EVA_Disabled                  = no
AI_CoControls_Human_Player    = no
EvolutionaryUnitAI_Available  = yes
Enemy_KindOf_Counter_every10s = no
Enemy_KindOf_Counter_every3s  = no
Enemy_KindOf_Counter_Type     = "VEHICLE"
Allow_MetaMods_Own_Scripts    = no
Force_AI_Boost_ToggleButton   = no

MetaStatsSystemEnabled        = yes
MetaCreditShop_AlwaysOn       = yes
MetaCreditShop_AlwaysOff      = no
MetaCreditShopSpawnTemplate   = "NodBaseTemplate_1"
MetaCreditShop_SandboxMode = 0 --TW-PORT temp change --reverted
MetaCreditShop_RankDependency = 1
MetaCreditShop_CreditDependency = 1

Diplomacy_System              = yes
Diplomacy_Auto_AllianceChange = no

NativeArtOfDefense            = no
NativeArtOfDefense_RoundBased = yes
Max_Waves                     = 7
No_Wave_Limit                 = no
First_Wave_Delay              = 120
Wave_Delay                    = 120
AlliedPlayersNextToEachOther=no

Hero_General_Gamemode         = no
Hero_General_Selection        = "NodAvatar"
Hero_General_Overpowered      = yes
Hero_General_DieLoseCondition = yes

Random_Army_Gamemode          = no
Random_Army_Gamemode_Rounds   = 3

Unit_vs_Unit_Gamemode         = no
Unit_vs_Unit_Selection        = "NodAvatar"   --METAMOD-TW-PORT
Unit_vs_Unit_Random_Unit      = no
Unit_vs_Unit_RoundsToWin      = 3
Unit_vs_Unit_Camera_Follow    = yes

Game_Continue_After_End       = no
Control_AlliedAI_After_Defeat = no
Control_EnemyAI_After_Defeat  = no
Last_Man_Standing             = no

CameraSetupButton             = yes
FirstAndThirdPersonModeButton = yes
FirstAndThirdPersonObserver   = yes
Camera_Hack_1_Enable          = no
Camera_Hack_1_Lock_Zoom       = yes
Camera_Hack_2_Enable          = no
Camera_Hack_2_Cam_Height      = 2.0
Camera_Hack_2_Lock_Zoom       = yes
Camera_Max_Zoomable_Height    = 1.0
Camera_Tilt_Angle             = 1.0
Camera_Clip_Depth             = 3.0

FPS_Limit					  = 40
Game_Simulation_Speed         = 1.0
Particle_Cap_Mode             = no
Bloom_Effect                  = no
Show_HealthBars               = yes
Draw_Behind_Buildings         = no
Terrain_Render_Disabled       = no
Map_Cloud_Speed               = 100
RGB_Override                  = no
RGB_Override_Red              = 0
RGB_Override_Green            = 0
RGB_Override_Blue             = 0

---unused---	
TiberiumCrystals_Counter      = no
--------------------------------------------------
CaptureControlPoint_Gamemode = 0 
CCP_Initialized=0
------------------------------------------
if not GENERIC_DUMMY then GENERIC_DUMMY = "GDIHarvester" end
Human_Players_Count = 0
AI_Players_Count = 0	
GPOT = {} --GlobalPlayerOptionTable
GPOT_Initialized = 0
GlobalTeamTable = {}
HumanPlayerTable = {}
AIPlayerTable = {}
NeutralTeam="/team"  --or "team"
CivilianTeam="PlyrCivilian/teamPlyrCivilian"
CreepsTeam="PlyrCreeps/teamPlyrCreeps"
ObserverTeam="ReplayObserver/teamReplayObserver"
AllTeamsTable={}
LocalClientName=""
LocalClientTeam=""
AdminTeamName=""
LocalClientNameInit=false
MainPlayerName = ""
TeamCommander=""
TeamCommanderTable={}
FilePathInitialized = 0
ObjectTypeListsInitialized = 0
ClientMainPlayer_Initialized=0
MetaCreditShop_Initialized=0
HeroGeneralGamemode_Initialized = 0
UnitVSUnitGamemode_Initialized = 0	
RandomArmy_Initialized = 0	
GameFinishState = 0	
CustomGameFinishConditionCheck = 0	
ShowExternalScriptPath = 1;
object1 = {}
object2 = {}
GlobalObjectsTable = {}		
CurrentObjectRefTable={}
GPUT = {} --GlobalPlayerUnitTable
LuaAutostartState = 0
CameraSetupStateMetaModsOwnScripts = 0
CameraHack1SetupState = 0
CameraHack2SetupState = 0
CameraMaxZoomableHeightSetupState = 0
Camera_Tilt_Angle_SetupState = 0
CamZoomLock_State = 0
Diplomacy_Initial_Setup_State = 0
TeamRelations = {}
RefTable = {}
GTempCounter1 = "GTempCounter1"
GTempCounter2 = "GTempCounter2"
GTempCounter3 = "GTempCounter3"
CounterTable = {}
GCounters_Initialized = 0
TimerTable = {}
TimerCounterCheckerRef = "TimerCounterCheckerRef" 
NumberTimers = 0	   		
TempGlobal=""
LUAAutostartDefault = ""
CAMERA_ANGLE_AND_HEIGHT_LOCK=0
CAMERA_SCROLL_LOCK=0
ShowPlayTime=0
InfiniteTiberium_Status=0
enc_key=5239702094 
SavegameTable = {}
SavegameTablePrevious = {}
Savegame_Initialized = 0
SavegameBackupCreated=false
--SavegameFilepath=GetFilePath() .. SaveFilename
PrimaryModInjection=false
Optional_Victory_Offered = 0
InitStatus={}
StorageTable={}
MultiplayerStatus = 0

NAOD={}
NAOD.UnitTable = {}
NativeArtOfDefense_Initialized = 0
TeamRelationsInitializedForNAOD = 0
StatisticsString=""
TempObject=""

MakeAllSkirmishSidesAIControlledStatus = 0
PlayerSearchString = "Player"

InitTeamRel = nil
TeamRelationsInitialized = 0
GameSetupFunctionReady = 0

GetObj = {}
SetObj = {}
GetTeam = {}
SetTeam = {}

AreaTable={"SiegeGameplayBarrier", "CombatZone", "InnerPerimeter1", "InnerPerimeter2", "InnerPerimeter3", "InnerPerimeter4", "InnerPerimeter5", "InnerPerimeter6", "InnerPerimeter7", "InnerPerimeter8", "OuterPerimeter1", "OuterPerimeter2", "OuterPerimeter3", "OuterPerimeter4", "OuterPerimeter5", "OuterPerimeter6", "OuterPerimeter7", "OuterPerimeter8", "Water Grid", "[Skirmish]EnemyInnerPerimeter", "[Skirmish]EnemyOuterPerimeter", "[Skirmish]MyInnerPerimeter", "[Skirmish]MyOuterPerimeter"}
WaypointTable={"Player_1_Start","Player_2_Start","Player_3_Start","Player_4_Start","Player_5_Start","Player_6_Start","Player_7_Start","Player_8_Start","InitialCameraPosition","Waypoint 1","Waypoint 2","Waypoint 3","Waypoint 4","Waypoint 5","Waypoint 6","Waypoint 7","METAMOD_NAOD_SPAWN_WAYPOINT","METAMOD_NAOD_SPAWN_WAYPOINT_OPTIONAL","METAMOD_NAOD_WAYPOINT_PATH_START","METAMOD_NAOD_WAYPOINT_PATH"}
WaypointDistanceTable = {}

-----------------------------------------------------------------------------
------------CHOOSABLE OPTIONS FOR EXECUTEACTION AND EVALUATECONDITION--------
-----------------------------------------------------------------------------
CompareTable    	  = { LT=0, LE=1, EQ=2, GE=3, GT=4, NE=5, ["<"]=0, ["<="]=1, ["=="]=2, [">="]=3, [">"]=4, ["~="]=5 }   --"LT Less Than" = 0, "LE Less Than or Equal" = 1, "EQ Equal To" = 2, "GE Greater Than or Equal" = 3, "GT Greater" = 4, "NE Not Equal To" = 5
Behaviour      	      = { ["Peaceful"]=0, ["Sleep"]=1, ["Passive"]=2, ["Normal"]=3, ["Alert"]=4, ["Agressive"]=5 }
Behaviour_     	      = { "Peaceful","Sleep","Passive","Normal","Alert","Agressive"}
ApproachPath_    	  = { "Center", "Backdoor", "Flank", "Special"}
ApproachPath   	      = { ["Center"]=0, ["Backdoor"]=1, ["Flank"]=2, ["Special"]=3 }
RadarEventTable 	  = { ["Information"]=0, ["Construction"]=1, ["Upgrade"]=2, ["UnderAttack"]=3, ["Infiltration"]=4, ["Banner"]=5 }	
MathOpTable     	  = { Add=0,Subtract=1,Multiply=2,Divide=3 }	
RelationType    	  = { "Enemy", "Neutral", "Friend" }	
RelationType_   	  = { ["Enemy"]=0, ["Neutral"]= 1, ["Friend"]=2 }	
DistanceTable   	  = { ["near"]=0, ["far"]= 1 }	
SHAKE_INTENSITY       = { ["SUBTLE"]=0, ["NORMAL"]=1, ["STRONG"]=2, ["SEVERE"]=3, ["CINE_EXTREME"]=4, ["CINE_INSANE"]=5 }
PRODUCTION_QUEUE_TAB  = { ["MAIN_STRUCTURE"]=0, ["OTHER_STRUCTURE"]=1, ["INFANTRY"]=2, ["VEHICLE"]=3, ["AIRCRAFT"]=4, ["UPGRADE"]=5 }
BUILDABILITY_TYPE     = { ["YES"]=0, ["IGNORE_PREREQUISITES"]=1, ["NO"]=2, ["ONLY_BY_AI"]=3 }		
STANCE_TYPE           = { ["GUARD"]=0, ["AGGRESSIVE"]=1, ["HOLD_POSITION"]=2, ["HOLD_FIRE"]=3 }		
STANCE_TYPE_          = { "GUARD","AGGRESSIVE","HOLD_POSITION","HOLD_FIRE"}	
MapBorderTable        = { "Orange","Red","Yellow","Green","Blue" }
ValidSourceType       = { ["first_valid_source"]=0, ["all_valid_source"]=1 }
KindOfTableShort      = { ["SELECTABLE"]=1,["TARGETABLE"]=2,["ALLY_TARGETABLE"]=3,["CAN_ATTACK"]=5,["STRUCTURE"]=9,["INFANTRY"]=10,["AIRCRAFT"]=14,["NO_COLLIDE"]=32,["MP_COUNTFOR_VICTORY"]=39,["FS_FACTORY"]=65,["FS_BASE_DEFENSE"]=66,["POWERED"]=73,["VEHICLE"]=215 }	
KindOfIndexTableShort = { "SELECTABLE","TARGETABLE","ALLY_TARGETABLE","CAN_ATTACK","STRUCTURE","INFANTRY","AIRCRAFT","MP_COUNTFOR_VICTORY","FS_FACTORY","FS_BASE_DEFENSE","POWERED","VEHICLE" }
CampaignFlagType      = { ["MM_General_Activate"]=96,["MM_General_PreTacticalCheck"]=97,["MM_General_PostTacticalCheck"]=98,["MM_MetagameActive"]=99}
FactionTable          = { ["CCA0AB62"]="GDI", ["38EA5BC0"]="SteelTalons", ["8E3D36F8"]="ZOCOM", ["ED46C05A"]="Nod",  ["5D10A932"]="BlackHand", ["FB53CCFD"]="MarkedOfKane", ["5B7BAA66"]="Scrin", ["30883A9F"]="Reaper-17", ["92CC2C04"]="Traveler-59", ["C884591E"]="MetaTechCorporation" }
GameFinishType        = { "VICTORY", "QUICKVICTORY", "VICTORY_SCREEN", "OPTIONAL_VICTORY", "DEFEAT", "LOCALDEFEAT" }	
MultiplayerConditions = { "IS_GAME_IN_SKIRMISH_OR_MULTIPLAYER","MULTIPLAYER_ALLIED_DEFEAT","MULTIPLAYER_PLAYER_DEFEAT" }
SpecialWeaponsTable   = { "HeroGeneralWeapon","NuclearMissile","IonCannonWeapon","RiftGeneratorWeapon","EMPControlCenterWeapon" }
AUDIO_REVERB_ROOM_TYPE= { "Alley","Arena","Auditorium","Bathroom","Carpeted Hallway","Cave","City","Concert Hall","Dizzy","Drugged","Forest","Hallway","Hangar","Living Room","Mountains","Padded Cell","Parking Lot","Plain","Psychotic","Quarry","Room","Sewer Pipe","Stone Corridor","Stone Room","Underwater"}
MissionObjectiveStatus			= { ["HIDDEN"]=0, ["ACTIVE"]=1, ["COMPLETED"]=2, ["FAILED"]=3 }
UnitColorTable = { ["normal"]=0, ["blue"]=255,["red"]=1,["purple"]=50,["yellow"]=-256,["white"]=-1 }
UnitColors					= { "normal", "blue","red","purple","yellow","white" }
UISUDSElements		={"MINIMAP","RESOURCE_BAR","POWER_METER","PORTRAIT_UI","TAB_BAR","TAB_BUTTON_GROUPS","TAB_BUTTON_POWER","TAB_BUTTON_INFANTRY","TAB_BUTTON_VEHICLE","TAB_BUTTON_AIRCRAFT","TAB_BUTTON_STRUCTURE","TAB_BUTTON_SUPPORT","UNITCAP"}  --ExecuteAction("FLASH_UI_SUDS_ELEMENT",UISUDSElements[1],1)
UIFixedElements		={"INVALID","ENERGY_METER","SELL_BUTTON","TOGGLE_REPAIR_BUTTON","TOGGLE_POWER_BUTTON","ATTACK_MOVE_BUTTON","FORCE_ATTACK_BUTTON","FORCE_MOVE_BUTTON","REVERSE_MOVE_BUTTON","WAYPOINT_MODE_BUTTON","PLANNING_MODE_BUTTON","STANCE_AGGRESSIVE_BUTTON","STANCE_GUARD_BUTTON","STANCE_HOLD_GROUND_BUTTON","STANCE_HOLD_FIRE_BUTTON","MAIN_STRUCTURE_TAB","OTHER_STRUCTURE_TAB","INFANTRY_TAB","VEHICLE_TAB","AIRCRAFT_TAB","DEBUG_A_BUTTON","DEBUG_B_BUTTON","DEBUG_C_BUTTON","DEBUG_D_BUTTON"}  --ExecuteAction("FLASH_UI_FIXED_ELEMENT",...)
GameModeEnum		={ "ringheroes" }  
GameModeEnumNOT		={"NONE","CAMPAIGN","SKIRMISH","TUTORIAL","MULTIPLAYER","SHELL"}  --EvaluateCondition("IS_GAME_MODE_ACTIVE",...) ?
GameStatsModes		={"CAMPAIGN_GAME","SKIRMISH_GAME","LAN_GAME","ONLINE_UNRANKED_GAME","ONLINE_RANKED_1V1_GAME","ONLINE_RANKED_2V2_GAME","ONLINE_CLAN_1V1_GAME","ONLINE_CLAN_2V2_GAME"}
MetaGameScriptTable = {"SR - Activate","SR - Map Reveal - Timer Expired","SR - Setup - Radar - Activate","SR - Stealth Reveal - Timer Expired"}
NotificationBoxTypes = { "BonusObjectiveCompleted","Generic","HeroDeath","HeroEarnedAward","HeroGranted","HeroInitialSpawn","HeroRespawn","Hint","Instructional","NewBonusObjective","NewObjective","ObjectiveCompleted","ObjectiveReminder"}

EXECUTE_ACTION_TABLE={
	"SUSPEND_BACKGROUND_SOUNDS","RESUME_BACKGROUND_SOUNDS","AUDIO_SET_REVERB_ROOM_TYPE","AUDIO_REMOVE_REVERB","AUDIO_SET_REVERB_SUPPRESSION_POLYGON","AUDIO_REMOVE_REVERB_SUPPRESSION_POLYGON","AUDIO_REMOVE_ALL_REVERB_SUPPRESSION_POLYGONS","PLAY_SOUND_EFFECT","PLAY_SOUND_EFFECT_AT","PLAY_SOUND_EFFECT_AT_TEAM","SOUND_PLAY_NAMED","SPEECH_PLAY","PLAY_SPEECH_AS_IF_IT_WAS_AN_EVA_EVENT","PLAY_SPEECH_AS_IF_IT_WAS_AN_EVA_EVENT_WITH_SUBTITLE","PLAY_SOUND_AS_IF_IT_WAS_AN_EVA_EVENT","PLAY_SOUND_AS_IF_IT_WAS_AN_EVA_EVENT_WITH_SUBTITLE","SOUND_AMBIENT_PAUSE","SOUND_AMBIENT_RESUME","MUSIC_SET_TRACK",
	"AUDIO_PUSH_MUSIC","AUDIO_POP_MUSIC","MUSIC_PLAY_TRACK_FINITE_TIMES","MUSIC_PLAY_TRACK_FINITE_TIMES_AND_NOTIFY","MUSIC_PLAY_TRACK_FINITE_TIMES_AS_SPECIAL_END_OF_LEVEL_MUSIC","MUSIC_PUSH_TRACK_FINITE_TIMES","MUSIC_PUSH_TRACK_FINITE_TIMES_AND_NOTIFY","MUSIC_TURN_OFF_MUSIC_SCRIPTING","MUSIC_RETURN_TO_MUSIC_SCRIPTING","MUSIC_RESET_MUSIC_SCRIPTING_SYSTEM","MUSIC_SCRIPT_SET_TRACK","MUSIC_SCRIPT_PUSH_MUSIC","MUSIC_SCRIPT_PLAY_TRACK_FINITE_TIMES","MUSIC_SCRIPT_PLAY_TRACK_FINITE_TIMES_AND_NOTIFY","MUSIC_SCRIPT_PUSH_TRACK_FINITE_TIMES","MUSIC_SCRIPT_PUSH_TRACK_FINITE_TIMES_AND_NOTIFY",
	"MUSIC_SCRIPT_POP_MUSIC","MUSIC_SET_VOLUME","SOUND_DISABLE_TYPE","SOUND_ENABLE_TYPE","SOUND_REMOVE_TYPE","SOUND_ENABLE_ALL","AUDIO_OVERRIDE_VOLUME_TYPE","AUDIO_RESTORE_VOLUME_TYPE","AUDIO_RESTORE_VOLUME_ALL_TYPE","SOUND_SET_VOLUME","SPEECH_SET_VOLUME","AUDIO_FADE_VOLUME","AUDIO_MAKE_SOUND_IMMUNE_TO_FADE","AUDIO_MAKE_SOUND_SUBJECT_TO_FADE","AUDIO_MAKE_ALL_SOUNDS_SUBJECT_TO_FADE","ENABLE_OBJECT_SOUND","DISABLE_OBJECT_SOUND","ADD_TO_INTELL_DATABASE","BUILD_BASE_BUILDING","BUILD_LIST_MOVE_TO_TOP","BUILD_LIST_ELIMINATE_FOOTPRINT","BUILD_LIST_ELIMINATE_FOOTPRINT_ALL","BUILD_BASE_BUILDING_IN_SLOT",
	"BUILD_BUILDING_ON_FOUNDATION","SKIRMISH_BUILD_BUILDING","AI_PLAYER_BUILD_SUPPLY_CENTER","SKIRMISH_BUILD_BASE_DEFENSE_FRONT","SKIRMISH_BUILD_BASE_DEFENSE_FLANK","SKIRMISH_BUILD_STRUCTURE_FRONT","SKIRMISH_BUILD_STRUCTURE_FLANK","UPGRADE_NEAREST_WALL","SELL_BUILDING_ON_FOUNDATION","ZOOM_CAMERA","FOCAL_LENGTH_CAMERA","PITCH_CAMERA","ROLL_CAMERA","SETUP_CAMERA","OVERSIZE_TERRAIN","OPTIONS_SET_PARTICLE_CAP_MODE","SET_FPS_LIMIT","CAMERA_FADE_ADD","CAMERA_FADE_SUBTRACT","CAMERA_FADE_MULTIPLY","CAMERA_FADE_SATURATE","CAMERA_TETHER_NAMED","CAMERA_STOP_TETHER_NAMED","CAMERA_FOLLOW_NAMED","CAMERA_STOP_FOLLOW",
	"CAMERA_BLOOM_EFFECT_BEGIN","CAMERA_BLOOM_EFFECT_END","MOVE_CAMERA_LOCATOR_ALONG_SPLINE_PATH","LOCK_CAMERA","LOCK_CAMERA_ZOOM","LOCK_CAMERA_ROTATION","LOCK_CAMERA_SCROLL","LOCK_CAMERA_RESET","LOCK_CAMERA_ANGLE_AND_HEIGHT","CAMERA_LETTERBOX_BEGIN","CAMERA_LETTERBOX_END","HIDE_UI","SHOW_UI","TOGGLE_AVI_CAPTURE","MOVE_CAMERA_TO","MOVE_CAMERA_TO_NAMED","CAMERA_RESTRICT_TO_AREA","CAMERA_REMOVE_AREA_RESTRICTION","MOVE_CAMERA_ALONG_SPLINE_PATH","RESET_CAMERA","RESET_CAMERA_TUTORIAL_STATE","MOVE_CAMERA_TO_SELECTION","CAMERA_MOD_FREEZE_TIME","CAMERA_MOD_SET_FINAL_ZOOM","CAMERA_MOD_SET_FINAL_PITCH",
	"CAMERA_MOD_LOOK_TOWARD","CAMERA_MOVE_HOME","MOVE_CAMERA_BY_ANIMATION","ROTATE_CAMERA","ROTATE_CAMERA_TO_ANGLE","ROTATE_CAMERA_LOCKED","CAMERA_LOOK_TOWARD_OBJECT","CAMERA_LOOK_TOWARD_WAYPOINT","CAMERA_ADD_SHAKER_AT","SCREEN_SHAKE","TERRAIN_RENDER_DISABLE","MOVIE_PLAY_FULLSCREEN","MOVIE_PLAY_RADAR","RADAR_CREATE_EVENT","OBJECT_CREATE_RADAR_EVENT","TEAM_CREATE_RADAR_EVENT","DISABLE_INPUT","ENABLE_INPUT","SHOW_MILITARY_CAPTION","DISPLAY_COUNTER","HIDE_COUNTER","DISPLAY_COUNTDOWN_TIMER","HIDE_COUNTDOWN_TIMER","DISABLE_COUNTDOWN_TIMER_DISPLAY","ENABLE_COUNTDOWN_TIMER_DISPLAY","SHOW_MISSION_OBJECTIVE",
	"HIDE_MISSION_OBJECTIVE","LINK_MISSION_OBJECTIVE_TO_OBJECT","LINK_MISSION_OBJECTIVE_TO_WAYPOINT","LINK_MISSION_OBJECTIVE_TO_OBJECT_WITH_PRESENTATION_SETTINGS","LINK_MISSION_OBJECTIVE_TO_WAYPOINT_WITH_PRESENTATION_SETTINGS","MARK_MISSION_OBJECTIVE_COMPLETED","MARK_MISSION_OBJECTIVE_NOT_COMPLETED","SET_MISSION_OBJECTIVE_STATUS","SATELLITE_VIEW_PRESENTATION_FOR_OBJECTIVE","SATELLITE_VIEW_PRESENTATION_FOR_ALL_OBJECTIVES","EVA_SET_ENABLED_DISABLED","OPTIONS_SET_OCCLUSION_MODE","OPTIONS_SET_DRAWICON_UI_MODE","ENABLE_PLANNING_MODE","DISABLE_PLANNING_MODE","LIVING_WORLD_DESPAWN_ARMY",
	"LIVING_WORLD_EXIT_TO_REGION_VIEW","LIVING_WORLD_MOVE_ARMY_TO_POSITION","LIVING_WORLD_MOVE_ARMY_TO_ZONE","LIVING_WORLD_SPAWN_ARMY_AT_POSITION","LIVING_WORLD_SPAWN_ARMY_IN_ZONE","PLAYER_SET_RANKLEVELLIMIT","ENABLE_SCORING","DISABLE_SCORING","TECHTREE_MODIFY_BUILDABILITY_OBJECT","WAREHOUSE_SET_VALUE","CHOOSE_VICTIM_ALWAYS_USES_NORMAL","OBJECT_ALLOW_BONUSES","MAP_EXIT","WATER_CHANGE_HEIGHT","MAP_SWITCH_BORDER","MAP_CHANGE_CLOUD_SPEED","DELETE_ALL_UNMANNED","SCRIPTING_OVERRIDE_HULK_LIFETIME","MAP_REVEAL_AT_WAYPOINT","MAP_REVEAL_IN_TRIGGER","MAP_SHROUD_AT_WAYPOINT","MAP_REVEAL_ALL",
	"MAP_REVEAL_ALL_PERM","MAP_REVEAL_ALL_UNDO_PERM","MAP_SHROUD_ALL","MAP_SHROUD_SET_RESHROUD_TIME","DISABLE_BORDER_SHROUD","ENABLE_BORDER_SHROUD","MAP_REVEAL_PERMANENTLY_AT_WAYPOINT","MAP_UNDO_REVEAL_PERMANENTLY_AT_WAYPOINT","MAP_REVEAL_PERMANENTLY_IN_TRIGGER","MAP_UNDO_REVEAL_PERMANENTLY_IN_TRIGGER","SET_LOGIC_FOG_STATE","VICTORY_SCREEN","VICTORY","QUICKVICTORY","OPTIONAL_VICTORY","DEFEAT","LOCALDEFEAT","PLAYER_AI_CHANGEBASEBUILDER","PLAYER_AI_CHANGEUNITBUILDER","PLAYER_AI_CHANGETEAMBUILDER","PLAYER_AI_CHANGEECONOMYBUILDER","PLAYER_AI_CHANGEWALLBUILDER","PLAYER_AI_CHANGEUNITUPGRADER",
	"PLAYER_AI_CHANGESCIENCEUPGRADER","PLAYER_AI_CHANGETACTICAL","UNIT_AI_TRANSFER_ALL","PLAYER_RELATES_PLAYER","PLAYER_SET_OVERRIDE_RELATION_TO_TEAM","PLAYER_ASSIMILATE_WITH_ARMY_BY_NAME","ALLOW_DISALLOW_ONE_BUILDING","ALLOW_DISALLOW_ALL_BUILDINGS","SET_BASE_CONSTRUCTION_SPEED","PLAYER_DISABLE_BASE_CONSTRUCTION","PLAYER_DISABLE_UNIT_CONSTRUCTION","PLAYER_ENABLE_BASE_CONSTRUCTION","PLAYER_ENABLE_UNIT_CONSTRUCTION","TOGGLE_AUTO_BUILD","PLAYER_DISABLE_FACTORIES","PLAYER_ENABLE_FACTORIES","OVERRIDE_PLAYER_COMMAND_POINTS","SET_HERO_EXPERIENCE_SHARING","PLAYER_ADD_RANKLEVEL","PLAYER_SET_RANKLEVEL",
	"PLAYER_AFFECT_RECEIVING_EXPERIENCE","PLAYER_EXIT_ALL_BUILDINGS","PLAYER_HUNT","PLAYER_SET_MONEY","PLAYER_GIVE_MONEY","PLAYER_SELL_EVERYTHING","PLAYER_KILL","PLAYER_TRANSFER_OWNERSHIP_PLAYER","PLAYER_EXCLUDE_FROM_SCORE_SCREEN","SELECT_OBJECT","DESELECT","FIRE_SPECIAL_POWER_ON_NEAREST_OBJECTTYPE","FIRE_SPECIAL_POWER_ON_NEAREST_OBJECTTYPE_BY_PLAYER","FIRE_SPECIAL_POWER_ON_TEAM","PLAYER_SPECIAL_POWER_AVAILABILITY","AI_PLAYER_BUILD_UPGRADE","GIVE_PLAYER_UPGRADE","PLAYER_GRANT_SCIENCE","PLAYER_PURCHASE_SCIENCE","PLAYER_SCIENCE_AVAILABILITY","PLAYER_SELECT_SKILLSET","PLAYER_SET_MAX_SPELLPOINTS",
	"PLAYER_UNIT_TYPE_SPECIAL_POWER_IGNORE_REQUIREMENTS","NAMED_APPLY_ATTACK_PRIORITY_SET","TEAM_APPLY_ATTACK_PRIORITY_SET","SET_ATTACK_PRIORITY_THING","SET_ATTACK_PRIORITY_KIND_OF","SET_DEFAULT_ATTACK_PRIORITY","SET_COUNTER","SET_COUNTER_IN_SECONDS","SET_COUNTER_TO_COUNTER","SET_PLAYER_MONEY_TO_COUNTER","SET_UNIT_EXPERIENCE_TO_COUNTER","SET_UNIT_HEALTH_PERCENTAGE_TO_COUNTER","SET_UNIT_UNREST_PERCENTAGE_TO_COUNTER","SET_PLAYER_COMMAND_POINTS_USED_TO_COUNTER","SET_PLAYER_COMMAND_POINTS_AVAILABLE_TO_COUNTER","SET_PLAYER_COMMAND_POINTS_TOTAL_TO_COUNTER","SET_COMMAND_POINTS_TO_BUILD_TEAM_TO_COUNTER",
	"SET_PLAYER_KILLS_OF_TYPE_TO_COUNTER","SET_PLAYER_KILLS_OF_KINDOF_TO_COUNTER","SET_PLAYER_OWNERSHIP_OF_TYPE_COUNTER","SET_PLAYER_OWNERSHIP_OF_TYPE_COUNTER_INCLUDE_DEAD","SET_COUNTER_TO_NUMBER_OBJECTS_PLAYER_OWNES_WITH_MODELCONDITION","SET_COUNTER_TO_NUMBER_OBJECTS_PLAYER_OWNS_WITH_KINDOF","SET_RANDOM_COUNTER","SET_COUNTER_TO_CLIENT_RANDOM_VALUE","SET_RANDOM_COUNTER_IN_SECONDS","COUNTER_MATH_COUNTER","COUNTER_MATH_VALUE","INCREMENT_COUNTER","DECREMENT_COUNTER","NO_OP","DEBUG_MESSAGE_BOX","DEBUG_STRING","DEBUG_CRASH_BOX","SET_FLAG","SET_FLAG_TO_FLAG","ENABLE_HOUSE_COLOR","IDLE_ALL_UNITS",
	"OBJECTLIST_ADDOBJECTTYPE","OBJECTLIST_REMOVEOBJECTTYPE","SET_UNIT_REFERENCE","SET_TEAM_REFERENCE","SET_UNIT_REFERENCE_TO_REFERENCE","SET_TEAM_REFERENCE_TO_REFERNECE","FIND_HOME_BASE_OF_PLAYER","SET_REF_TO_NEREST_TEAM_OF_TYPE_OWNED_BY_PLAYER","SET_REF_TO_NEREST_TEAM_OF_UNNAMED_TYPE_OWNED_BY_PLAYER","ENABLE_SCRIPT","DISABLE_SCRIPT","CALL_SUBROUTINE","FREEZE_TIME","UNFREEZE_TIME","SET_TIMER","SET_RANDOM_TIMER","SET_METAGAME_TURN_TIMER","STOP_TIMER","RESTART_TIMER","SET_MILLISECOND_TIMER","SET_RANDOM_MSEC_TIMER","ADD_TO_MSEC_TIMER","SUB_FROM_MSEC_TIMER","TEAM_HUNT","TEAM_HARVEST",
	"TEAM_ATTACK_TEAM","TEAM_ATTACK_NAMED","TEAM_CAPTURE_NEAREST_UNOWNED_FACTION_UNIT","TEAM_RECRUIT_UNITS","TEAM_RECRUIT_UNITS_FROM_TEAM","RECRUIT_COMBO_UNITS_FROM_TEAM","TEAM_USE_COMMANDBUTTON_ABILITY","TEAM_USE_COMMANDBUTTON_ABILITY_ON_NAMED","TEAM_USE_COMMANDBUTTON_ABILITY_AT_WAYPOINT","TEAM_ALL_USE_COMMANDBUTTON_ON_NEAREST_ENEMY_UNIT","TEAM_ALL_USE_COMMANDBUTTON_ON_NEAREST_GARRISONED_BUILDING","TEAM_ALL_USE_COMMANDBUTTON_ON_NEAREST_KINDOF","TEAM_ALL_USE_COMMANDBUTTON_ON_NEAREST_ENEMY_BUILDING","TEAM_ALL_USE_COMMANDBUTTON_ON_NEAREST_ENEMY_BUILDING_CLASS","TEAM_ALL_USE_COMMANDBUTTON_ON_NEAREST_OBJECTTYPE",
	"TEAM_PARTIAL_USE_COMMANDBUTTON","TEAM_SET_AUTO_ABILITY","TEAM_GIVE_EXPERIENCE_LEVEL","TEAM_GIVE_EXPERIENCE_POINTS","TEAM_SET_EXPERIENCE_POINTS","TEAM_GAIN_LEVEL","TEAM_GARRISON_SPECIFIC_BUILDING","TEAM_GARRISON_SPECIFIC_BUILDING_INSTANTLY","TEAM_GARRISON_TEAM_INSTANTLY","TEAM_GARRISON_NEAREST_BUILDING","TEAM_EXIT_ALL_BUILDINGS","TEAM_GUARD","TEAM_GUARD_POSITION","TEAM_GUARD_OBJECT","TEAM_GUARD_TEAM","TEAM_GUARD_AREA","TEAM_GUARD_AREA_FROM_POSITION","TEAM_GUARD_NEAREST_KINDOF","TEAM_GUARD_IN_TUNNEL_NETWORK","TEAM_GUARD_SUPPLY_CENTER","MOVE_TEAM_TO","MOVE_TEAM_HOME","TEAM_FOLLOW_WAYPOINTS",
	"TEAM_FOLLOW_WAYPOINTS_EXACT","TEAM_WANDER_IN_PLACE","TEAM_WANDER","TEAM_PANIC","SKIRMISH_FOLLOW_APPROACH_PATH","SKIRMISH_MOVE_TO_APPROACH_PATH","TEAM_MOVE_TO_NEAREST_OBJECT_OF_TYPE","TEAM_MOVE_TO_NEAREST_OBJECT_OF_TYPE_OWNED_BY_PLAYER","TEAM_MOVE_TO_NEAREST_OBJECT_OF_KINDOF","TEAM_MOVE_TO_NEAREST_OBJECT_OF_KINDOF_OWNED_BY_PLAYER","TEAM_FACE_NAMED","TEAM_FACE_WAYPOINT","TEAM_TELEPORT_TO_WAYPOINT","ATTACK_MOVE_TEAM_TO","ATTACK_MOVE_TEAM_TO_NAMED_OBJECT","TEAM_ATTACK_MOVE_FOLLOW_WAYPOINTS","TEAM_ATTACK_MOVE_TOWARDS_NEAREST_OBJECT_TYPE","ATTACK_MOVE_TEAM_TO_NEAREST_OBJECT_OF_TYPE_OF_PLAYER",
	"TEAM_REPAIR_NEREST","DEPLOY_SIEGE_ON_WAYPOINT","DEPLOY_SIEGE_NEAR_TEAM","TEAM_STOP","TEAM_STOP_AND_DISBAND","TEAM_LOAD_TRANSPORTS","TEAM_ENTER_NAMED","TEAM_EXIT_ALL","TEAM_GIVE_NEAREST_TEAM_UPGRADE","TEAM_GIVE_TEAM_UPGRADE","TEAM_UPGRADE","TEAM_TOGGLE_CLOSE_RANGE_WEAPON","TEAM_AI_TRANSFER","TEAM_TRANSFER_TO_PLAYER","TEAM_SET_OVERRIDE_RELATION_TO_TEAM","TEAM_REMOVE_OVERRIDE_RELATION_TO_TEAM","TEAM_REMOVE_ALL_OVERRIDE_RELATIONS","TEAM_SET_OVERRIDE_RELATION_TO_PLAYER","TEAM_ASSIMILATE_WITH_FIRST_WALK_ON_ARMY","TEAM_ASSIMILATE_WITH_ARMY_BY_NAME","DAMAGE_MEMBERS_OF_TEAM","TEAM_DELETE","TEAM_DELETE_LIVING",
	"TEAM_KILL","TEAM_FLASH","TEAM_FLASH_WHITE","TEAM_SET_HEALTH","REMOVE_REINFORCEMENT_ARMY","CALL_IN_REINFORCEMENTS_WITHOUT_MOVIE","TEAM_EXECUTE_SEQUENTIAL_SCRIPT","TEAM_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING","TEAM_STOP_SEQUENTIAL_SCRIPT","TEAM_GUARD_FOR_FRAMECOUNT","TEAM_IDLE_FOR_FRAMECOUNT","TEAM_GUARD_FOR_SECONDS","TEAM_IDLE_FOR_SECONDS","SKIRMISH_WAIT_FOR_COMMANDBUTTON_AVAILABLE_ALL","SKIRMISH_WAIT_FOR_COMMANDBUTTON_AVAILABLE_PARTIAL","TEAM_WAIT_FOR_NOT_CONTAINED_ALL","TEAM_STAND_GROUND","TEAM_SET_ATTITUDE","TEAM_SET_SLEEP_STATUS","SET_STOPPING_DISTANCE","TEAM_SET_MODELCONDITION","TEAM_SET_MODELCONDITION_FOR_DURATION",
	"TEAM_CLEAR_MODELCONDITION","TEAM_SET_FLAME_STATUS","TEAM_ENABLE_HOUSE_COLOR","TEAM_AFFECT_OBJECT_PANEL_FLAGS","TEAM_SET_AI_RECRUITABLE_FLAG","TEAM_INCREASE_PRIORITY","TEAM_INCREASE_PRIORITY_BY_VALUE","TEAM_DECREASE_PRIORITY","TEAM_DECREASE_PRIORITY_BY_VALUE","RECRUIT_TEAM","RECRUIT_TEAM_AT_TEAM","CREATE_REINFORCEMENT_TEAM","CREATE_REINFORCEMENT_TEAM_AT_UNIT_POSITION","BUILD_TEAM","TEAM_MERGE_INTO_TEAM","TEAM_SET_STATE","TEAM_SET_CUSTOM_STATE","NAMED_ATTACK_NAMED","NAMED_ATTACK_AREA","NAMED_ATTACK_AREA_FOR_SECONDS","NAMED_HUNT","NAMED_ATTACK_TEAM","NAMED_USE_COMMANDBUTTON_ABILITY",
	"NAMED_USE_COMMANDBUTTON_ABILITY_ON_NAMED","NAMED_USE_COMMANDBUTTON_ABILITY_AT_WAYPOINT","NAMED_USE_COMMANDBUTTON_ON_NEAREST_ENEMY_UNIT","NAMED_USE_COMMANDBUTTON_ON_NEAREST_GARRISONED_BUILDING","NAMED_USE_COMMANDBUTTON_ON_NEAREST_KINDOF","NAMED_USE_COMMANDBUTTON_ON_NEAREST_ENEMY_BUILDING","NAMED_USE_COMMANDBUTTON_ON_NEAREST_ENEMY_BUILDING_CLASS","NAMED_USE_COMMANDBUTTON_ON_NEAREST_OBJECTTYPE","NAMED_BUILD_STRUCTURE_AT_WAYPOINT","NAME_SET_AUTO_ABILITY","UNIT_GIVE_EXPERIENCE_LEVEL","UNIT_GIVE_EXPERIENCE_POINTS","UNIT_SET_EXPERIENCE_POINTS","UNIT_SET_MAX_LEVEL","UNIT_GAIN_LEVEL","EXIT_SPECIFIC_BUILDING",
	"NAMED_GARRISON_SPECIFIC_BUILDING","NAMED_GARRISON_SPECIFIC_BUILDING_INSTANTLY","NAMED_GARRISON_NEAREST_BUILDING","NAMED_EXIT_BUILDING","NAMED_GUARD","UNIT_GUARD_NEAREST_KINDOF","UNIT_GUARD_POSITION","UNIT_GUARD_OBJECT","UNIT_GUARD_AREA","UNIT_GUARD_AREA_FROM_POSITION","UNIT_IDLE_FOR_FRAMECOUNT","UNIT_IDLE_FOR_SECONDS","MOVE_NAMED_UNIT_TO","NAMED_FOLLOW_WAYPOINTS","NAMED_FOLLOW_WAYPOINTS_EXACT","NAMED_FACE_NAMED","NAMED_FACE_WAYPOINT","UNIT_TELEPORT_TO_WAYPOINT","ATTACK_MOVE_NAMED_UNIT_TO","UNIT_ATTACK_MOVE_TOWARDS_NEAREST_OBJECT_TYPE","NAMED_ATTACK_FOLLOW_WAYPOINTS","DEPLOY_SIEGE_ON_NAMED_WALL",
	"RETRACT_SIEGE_FROM_WALL","DEPLOY_NAMED_SIEGE_ON_WAYPOINT","NAMED_STOP","NAMED_ENTER_NAMED","NAMED_EXIT_ALL","NAMED_RECEIVE_UPGRADE","NAMED_REMOVE_UPGRADE","UNIT_AI_TRANSFER","NAMED_TRANSFER_OWNERSHIP_PLAYER","UNIT_SET_TEAM","UNIT_ASSIMILATE_WITH_FIRST_WALK_ON_ARMY","UNIT_ASSIMILATE_WITH_ARMY_BY_NAME","NAMED_DAMAGE","KILL_HORDE_MEMBERS","NAMED_DELETE","NAMED_SHOCK","NAMED_KILL","UNIT_DESTROY_ALL_CONTAINED","NAMED_FLASH","NAMED_CUSTOM_COLOR","NAMED_FLASH_WHITE","UNIT_EXECUTE_SEQUENTIAL_SCRIPT","UNIT_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING","UNIT_STOP_SEQUENTIAL_SCRIPT","UNIT_GUARD_FOR_FRAMECOUNT",
	"UNIT_GUARD_FOR_SECONDS","UNIT_STAND_GROUND","NAMED_SET_ATTITUDE","NAMED_SET_SLEEP_STATUS","NAMED_SET_CAMERA_FADING","NAMED_SET_STEALTH_ENABLED","NAMED_SET_STRICT_CONTROL_ENABLED","NAMED_SET_HELD","NAMED_SET_STOPPING_DISTANCE","NAMED_SET_TOPPLE_DIRECTION","UNIT_AFFECT_OBJECT_PANEL_FLAGS","UNIT_SET_MODELCONDITION","UNIT_SET_MODELCONDITION_FOR_DURATION","UNIT_CLEAR_MODELCONDITION","UNIT_SET_FLAME_STATUS","UNIT_ENABLE_HOUSE_COLOR","CREATE_OBJECT","CREATE_NAMED_ON_TEAM_AT_WAYPOINT","CREATE_NAMED_STRIKE_FORCE_ON_TEAM_AT_WAYPOINT","CREATE_NAMED_ON_TEAM_AT_WAYPOINT_WITH_ORIENTATION",
	"CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT","CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT_WITH_ORIENTATION","CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE","CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION","UNIT_SPAWN_NAMED_LOCATION_ORIENTATION","CREATE_DELAYED_CARRYOVER_UNIT_AT_WAYPOINT","CREATE_UNIT_REVIVAL_ENTRY_FROM_DELAYED_CARRYOVER_HERO","CREATE_UNIT_REVIVAL_ENTRY","CREATE_UNIT_REVIVAL_ENTRY_AT_LEVEL","NAMED_TOGGLE_CLOSE_RANGE_WEAPON","NAMED_SET_SPECIAL_WEAPONSET","UNIT_CONTEXT_SENSITIVE_ATTACK","SET_TREE_SWAY","CAMERA_MOD_FREEZE_ANGLE","SET_VISUAL_SPEED_MULTIPLIER","CAMERA_MOD_SET_FINAL_SPEED_MULTIPLIER",
	"CAMERA_MOD_SET_ROLLING_AVERAGE","CAMERA_MOD_FINAL_LOOK_TOWARD","PLAYER_ADD_SKILLPOINTS","NAMED_SET_REPULSOR","TEAM_SET_REPULSOR","DISPLAY_TEXT","DISPLAY_CINEMATIC_TEXT","RESUME_SUPPLY_TRUCKING","TEAM_AVAILABLE_FOR_RECRUITMENT","TEAM_COLLECT_NEARBY_FOR_TEAM","PLAYER_GARRISON_ALL_BUILDINGS","TEAM_SET_STEALTH_ENABLED","CAMERA_SET_AUDIBLE_DISTANCE","NAMED_STOP_SPECIAL_POWER_COUNTDOWN","NAMED_START_SPECIAL_POWER_COUNTDOWN","NAMED_SET_SPECIAL_POWER_COUNTDOWN","PLAYER_SET_SPECIAL_POWER_COUNTDOWN","NAMED_ADD_SPECIAL_POWER_COUNTDOWN","PLAYER_FIRE_SPECIAL_POWER_AT_WAYPOINT","SKIRMISH_FIRE_SPECIAL_POWER_AT_MOST_COST",
	"PLAYER_REPAIR_NAMED_STRUCTURE","NAMED_FIRE_SPECIAL_POWER_AT_WAYPOINT","NAMED_FIRE_SPECIAL_POWER_AT_NAMED","CAMERA_SET_DEFAULT","NAMED_FIRE_WEAPON_FOLLOWING_WAYPOINT_PATH","TEAM_REMOVE_OVERRIDE_RELATION_TO_PLAYER","TEAM_ATTACK_AREA","PLAYER_REMOVE_OVERRIDE_RELATION_TO_TEAM","OBJECT_FORCE_SELECT","SET_CAVE_INDEX","SOUND_REMOVE_ALL_DISABLED","UNIT_MOVE_TOWARDS_NEAREST_OBJECT_TYPE","TEAM_MOVE_TOWARDS_NEAREST_OBJECT_TYPE","SKIRMISH_ATTACK_NEAREST_GROUP_WITH_VALUE","SKIRMISH_PERFORM_COMMANDBUTTON_ON_MOST_VALUABLE_OBJECT","TEAM_SPIN_FOR_FRAMECOUNT","TEAM_SPIN_FOR_SECONDS","TEAM_ALL_USE_COMMANDBUTTON_ON_NAMED",
	"PLAYER_CREATE_TEAM_FROM_CAPTURED_UNITS","TEAM_WAIT_FOR_NOT_CONTAINED_PARTIAL","CAMERA_ENABLE_SLAVE_MODE","CAMERA_DISABLE_SLAVE_MODE","SET_CAMPAIGN_FLAG","REGISTER_OBJECT_VS_OBJECT_KILL_RECORDING","STORE_OBJECT_KILL_COUNT_TO_COUNTER","UNIT_KILL_ALL_IN_AREA","UNIT_SET_STANCE","BUILD_BASE_BUILDING_WITH_TACTIC","BUILD_BASE_BUILDING_PER_TACTIC","BUILD_BASE_BUILDING_PER_TACTICAL_MARKER","CAMEO_FLASH","CHANGE_BURN_RATE_AT_WAYPOINT","CHANGE_BURN_RATE_IN_AREA","CLEAR_MGBATTLE_RESTRICTION","CLOSE_OBJECTIVES_SCREEN","COMMANDBAR_ADD_BUTTON_OBJECTTYPE_SLOT","DIM_WORLD_LIGHTS","DISABLE_OBJECTIVES_SCREEN",
	"DISABLE_SPECIAL_POWER_DISPLAY","DISABLE_SPELL_STORE","DISABLE_UI_BUILD_BUTTON","DISABLE_UI_FIXED_ELEMENT","DISABLE_UI_PLAYER_POWER_BUTTON","DISABLE_UI_UNIT_ABILITY_BUTTON","DISPLAY_NOTIFICATION_BOX","DISPLAY_NOTIFICATION_BOX_WITH_OBJECT_TYPE_IMAGE_OVERRIDE","DISPLAY_TUTORIAL_TEXT","ENABLE_OBJECTIVES_SCREEN","ENABLE_SPECIAL_POWER_DISPLAY","ENABLE_SPELL_STORE","FLASH_OBJECTIVES_BUTTON","FLASH_PLANNING_MODE_BUTTON","FLASH_SPELL_STORE_BUTTON","FLASH_UI_BUILD_BUTTON","FLASH_UI_FIXED_ELEMENT","FLASH_UI_PLAYER_POWER_BUTTON","FLASH_UI_SUDS_ELEMENT","FLASH_UI_UNIT_ABILITY_BUTTON","GATE_CLOSE","GATE_OPEN",
	"GATE_READY","GLOBAL_SET_STEALTH_ENABLED","HERO_SELECT_BUTTON_FLASH","HIDE_TUTORIAL_TEXT","HUMAN_IMPASSABLE_AREA","LIVING_WORLD_ORDER_ARMY_MOVE_TO_ADJACENT_REGION","LIVING_WORLD_SET_ARMY_REF_TO_HERO_ARMY_BY_INDEX","LIVING_WORLD_SET_PLAYER_REF_BY_TEMPLATE","LIVING_WORLD_SET_REGION_REF_TO_ADJACENT_REGION","LIVING_WORLD_SET_REGION_REF_TO_ARMY_REGION","MODIFY_METAGAME_MAX_TIBERIUM","MODIFY_METAGAME_PLAYERS_TIBERIUM","NAMED_BASE_UNPACK","NAMED_BASE_UNPACK_FREE","NAMED_FIRE_METAGAME_OP_INSTANT","NAMED_FIRE_SPECIAL_POWER","NAMED_HIDE_SPECIAL_POWER_DISPLAY","NAMED_SET_EMOTICON","NAMED_SHOW_SPECIAL_POWER_DISPLAY",
	"OPEN_COMMAND_BAR","PLAY_MOVIE_IN_GAME","PLAYER_ALLOW_AI_AUTOACQUIRE","PLAYER_FORCE_EMOTION","PLAYER_GIVE_LIGHT_POINT_LEVEL","PLAYER_GIVE_LIGHT_POINTS","PLAYER_REMOVE_LIGHT_POINT_LEVEL","PLAYER_RESET_LIGHT_POINTS","PLAYER_SET_BASE_POWER","PLAYER_SET_MONEY_CAP","RADAR_DISABLE","RADAR_ENABLE","RADAR_FORCE_ENABLE","RADAR_REVERT_TO_NORMAL","RECOMMENDED","REFRESH_RADAR","REINFORCEMENTS_DISPLAY_BANNER","REMOVE_PLAYER_UPGRADE","RESIZE_VIEW_GUARDBAND","RESTORE_WORLD_LIGHTS","SELECT_BUILDER_BUTTON_FLASH","SET_AVAILABLE_STRIKEFORCES","SET_CAMERA_CLIP_DEPTH_MULTIPLIER","SET_COUNTER_TO_BASE_POPULATION",
	"SET_DISABLE_STRATEGIC_BUILDING","SET_GAMEPLAYMODE_TIMER","SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS","SET_METAGAME_MAX_TIBERIUM","SET_METAGAME_PLAYERS_TIBERIUM","SET_MG_PLAYER_OPS_POINTS_LIMITS","SET_MGBATTLE_RESTRICTION","SET_PLAYER_LIGHT_POINTS_TO_COUNTER","SET_UI_ELEMENT_ENABLED","SET_UNIT_POPULATION_PERCENTAGE_TO_COUNTER","SKIRMISH_AI_MAKE_BASE","SKIRMISH_AI_REBUILD_SYSTEM_SCAN","SKIRMISH_AI_SET_FAVORED_ENEMY","SKIRMISH_AI_USE_REBUILD_SYSTEM","SKIRMISH_AI_USE_REPAIRS","STRINGLIST_ADDSTRIKEFORCE","STRINGLIST_REMOVESTRIKEFORCE","SWITCH_TO_PRODUCTION_QUEUE_TAB","TEAM_ALLOW_AI_AUTOACQUIRE",
	"TEAM_CHANGE_OBJECT_STATUS","TEAM_CONTEXT_SENSITIVE_ATTACK","TEAM_FORCE_EMOTION","TEAM_NEEDS_OPEN_GATE","TEAM_SET_EMOTICON","TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE","TEAM_SET_STRICT_CONTROL_ENABLED","UNIT_ALLOW_AI_AUTOACQUIRE","UNIT_CHANGE_OBJECT_STATUS","UNIT_FORCE_EMOTION","UNIT_SET_HEALTH","WATER_CHANGE_HEIGHT_OVER_TIME"
}

EVALUATE_CONDITION_TABLE={
	"HAS_FINISHED_SPEECH","HAS_FINISHED_AUDIO","MUSIC_IS_PLAYING_FROM_SCRIPT","REGION_CAMPS_SHOULD_UNPACK","OBJECT_OF_TYPE_OR_LIST_INSIDE_REFD_BASE","CAMERA_MOVEMENT_FINISHED","CAMERA_HIT_SPECIFIC_SPLINE_WAYPOINT","CAMERA_ENTERED_AREA","CAMERA_SCROLL_DISTANCE","CAMERA_ROTATE_DISTANCE","CAMERA_ZOOM_DISTANCE","CAMERA_RESET","COMPARE_NUM_PLAYERS_IN_GAME","IS_GAME_IN_SKIRMISH_OR_MULTIPLAYER","IS_GAME_MODE_ACTIVE","BANNER_PRESSED","ZONE_FOCUS_MORE_THAN","MULTIPLAYER_ALLIED_VICTORY","MULTIPLAYER_ALLIED_DEFEAT","MULTIPLAYER_PLAYER_DEFEAT","PLAYER_HAS_COMPARISON_UNIT_TYPE_IN_TRIGGER_AREA",
	"PLAYER_HAS_COMPARISON_UNIT_TYPE_IN_TRIGGER_AREA_COMPLETELY_BUILT","PLAYER_HAS_COMPARISON_UNIT_TYPE_IN_TRIGGER_AREA_WITH_UPGRADE","PLAYER_HAS_COMPARISON_UNIT_KIND_IN_TRIGGER_AREA","SKIRMISH_VALUE_IN_AREA","SKIRMISH_PLAYER_HAS_UNITS_IN_AREA","SKIRMISH_PLAYER_IS_OUTSIDE_AREA","PLAYER_DESTROYED_N_BUILDINGS_PLAYER","PLAYER_HAS_KILLED_KINDOF_UNITS","PLAYER_HAS_KILLED_TYPE_UNITS","SKIRMISH_PLAYER_HAS_BEEN_ATTACKED_BY_PLAYER","NAMED_BASE_UNPACKABLE_FOR_PLAYER","CAN_BUILD_OBJECTTYPE_AT_BASE","HAS_COMMAND_POINTS_TO_BUILD_TEAM","HAS_COMMAND_POINTS_TO_BUILD_UNIT","HAS_EVA_EVENT_PLAYED_IN_LAST_N_SECONDS",
	"IS_NUM_OF_UNITS_BELONGING_TO_PLAYER_NEAR_EVA_EVENT_LAST_PLAYED_LOCATION_COMPARISON_INT","PLAYER_COMPARE_RANK","PLAYER_HAS_OBJECT_OF_VETERANCY","SKIRMISH_PLAYER_FACTION","START_POSITION_IS","BUILDING_ENTERED_BY_PLAYER","SKIRMISH_PLAYER_HAS_COMPARISON_GARRISONED","PLAYER_ISSUED_FORMATION_ORDER","ANY_UNITS_USING_BLOODTHIRSTY","UNIT_IN_ALT_FORMATION","UNIT_HAS_TOGGLED_WEAPON","UNIT_USING_AUTOPICKUP","ANY_HERO_REACHED_RANK","PLAYER_HAS_NUM_UNITS_WITH_UPGRADE","NUM_UNITS_LEVELED_UP","PLAYER_HAS_NUM_UNITS_LOADED_WITH_OBJECT","PLAYER_LOST_OBJECT_TYPE","BUILT_BY_PLAYER","PLAYER_HAS_NUMBER_OBJECTS_WITH_MODELCONDITION",
	"PLAYER_HAS_NUMBER_UNITS_DISTANCE_FROM_OBJECT","PLAYER_HAS_CREDITS","NAMED_OWNED_BY_PLAYER","TEAM_OWNED_BY_PLAYER","PLAYER_HAS_OBJECT_COMPARISON","PLAYER_HAS_N_OR_FEWER_BASES","PLAYER_POWER_COMPARE_PERCENT","PLAYER_EXCESS_POWER_COMPARE_VALUE","PLAYER_TRIGGERED_SPECIAL_POWER_FROM_NAMED","SKIRMISH_FIRE_SPECIAL_POWER_ON_TEAM","TEAM_DISCOVERED","NAMED_DISCOVERED","SKIRMISH_PLAYER_HAS_DISCOVERED_PLAYER","SKIRMISH_SUPPLIES_VALUE_WITHIN_DISTANCE","SUPPLY_SOURCE_SAFE","SUPPLY_SOURCE_ATTACKED","PLAYER_ACQUIRED_SCIENCE","PLAYER_CAN_PURCHASE_SCIENCE","PLAYER_HAS_SCIENCEPURCHASEPOINTS","PLAYER_HAS_REACHED_LEVEL_CAP",
	"PLAYER_BUILT_UPGRADE","DISTANCE_BETWEEN_OBJ","DISTANCE_BETWEEN_TEAM","COUNTER_SECONDS","COUNTER_COUNTER","COUNTER","FLAG","COMPARISON_TREES_IN_TRIGGER_AREA","TIMER_EXPIRED","CONDITION_TRUE","TEAM_INSIDE_AREA_PARTIALLY","TEAM_INSIDE_AREA_ENTIRELY","TEAM_OUTSIDE_AREA_ENTIRELY","TEAM_REACHED_WAYPOINTS_END","TEAM_ENTERED_AREA_ENTIRELY","TEAM_ENTERED_AREA_PARTIALLY","TEAM_EXITED_AREA_ENTIRELY","TEAM_EXITED_AREA_PARTIALLY","TEAM_ATTACKED_BY_PLAYER","TEAM_DESTROYED","TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF","TEAM_HAS_UNITS","TEAM_ATTACKED_BY_OBJECTTYPE","TEAM_CREATED","TEAM_ENTERED_NEAREST_BASE_ENTIRELY",
	"TEAM_ENTERED_NEAREST_BASE_PARTIALLY","TEAM_ENTERED_REFD_BASE_ENTIRELY","TEAM_ENTERED_REFD_BASE_PARTIALLY","TEAM_EXITED_NEAREST_BASE_ENTIRELY","TEAM_EXITED_NEAREST_BASE_PARTIALLY","TEAM_EXITED_REFD_BASE_ENTIRELY","TEAM_EXITED_REFD_BASE_PARTIALLY","SKIRMISH_COMMAND_BUTTON_READY_ALL","SKIRMISH_COMMAND_BUTTON_READY_PARTIAL","EVAL_TEAM_HEALTH","TEAM_ALL_HAS_OBJECT_STATUS","TEAM_SOME_HAVE_OBJECT_STATUS","ENEMY_SIGHTED_BY_TEAM","TEAM_STATE_IS","TEAM_STATE_IS_NOT","TEAM_HAS_CUSTOM_STATE","TEAM_IS_ATTACKED_AND_CANNOT_RETALIATE_ANY","TEAM_IS_ATTACKED_AND_CANNOT_RETALIATE_ALL","TEAM_THREAT_LEVEL",
	"TEAM_IS_LED_BY_UNIT","TEAM_CAN_PATH_INTO_PLAYERS_NEAREST_BASE","TEAM_CAN_PATH_TO_OBJECT","TEAM_CAN_PATH_TO_WAYPOINT","NAMED_INSIDE_AREA","NAMED_OUTSIDE_AREA","NAMED_REACHED_WAYPOINTS_END","NAMED_ENTERED_AREA","NAMED_EXITED_AREA","UNIT_COMPARE_RANK","UNIT_HEALTH","NAMED_DESTROYED","NAMED_DYING","NAMED_TOTALLY_DEAD","NAMED_NOT_DESTROYED","NAMED_ATTACKED_BY_OBJECTTYPE","NAMED_DESTROYED_BY_OBJECTTYPE","NAMED_CREATED","NAMED_ATTACKED_BY_PLAYER","NAMED_ENTERED_NEAREST_BASE","NAMED_EXITED_NEAREST_BASE","NAMED_ENTERED_REFD_BASE","NAMED_EXITED_REFD_BASE","UNIT_IS_ATTACKED_AND_CANNOT_RETALIATE","UNIT_THREAT_LEVEL",
	"UNIT_HAS_PASSENGER","UNIT_HAS_GAINED_LEVEL","UNIT_IS_AT_LEVEL","NAMED_RANK_LEVEL","NAMED_BUILDING_IS_EMPTY","UNIT_HAS_OBJECT_STATUS","UNIT_USING_STANCE","NAMED_SELECTED","TYPE_SELECTED","ENEMY_SIGHTED","TYPE_SIGHTED","UNIT_HAS_NUM_SKILL_POINTS","IS_UNIT_WEBBED","SKIRMISH_UNOWNED_FACTION_UNIT_EXISTS","UNIT_CAN_PATH_TO_OBJECT","UNIT_CAN_PATH_TO_WAYPOINT","UNIT_CAN_PATH_INTO_PLAYERS_NEAREST_BASE","GATE_IS_OPEN","IS_SEIGE_ATTACHED_TO_WALL","HAS_DELAYED_CARRYOVER_UNIT_OF_TYPE","CONDITION_FALSE","PLAYER_ALL_DESTROYED","PLAYER_ALL_BUILDFACILITIES_DESTROYED","MISSION_ATTEMPTS","PLAYER_HAS_N_OR_FEWER_BUILDINGS",
	"PLAYER_HAS_N_OR_FEWER_FACTION_BUILDINGS","PLAYER_HAS_POWER","PLAYER_HAS_NO_POWER","HAS_FINISHED_VIDEO","PLAYER_TRIGGERED_SPECIAL_POWER","PLAYER_TRIGGERED_SPECIAL_POWER_IN_AREA","PLAYER_MIDWAY_SPECIAL_POWER","PLAYER_MIDWAY_SPECIAL_POWER_FROM_NAMED","PLAYER_COMPLETED_SPECIAL_POWER","PLAYER_COMPLETED_SPECIAL_POWER_FROM_NAMED","PLAYER_BUILT_UPGRADE_FROM_NAMED","UNIT_EMPTIED","SKIRMISH_SPECIAL_POWER_READY","SKIRMISH_PLAYER_HAS_PREREQUISITE_TO_BUILD","SKIRMISH_PLAYER_HAS_COMPARISON_CAPTURED_UNITS","SKIRMISH_NAMED_AREA_EXIST","MUSIC_TRACK_HAS_COMPLETED","UNIT_TEST_OBJECT_PANEL_FLAGS","TEST_CAMPAIGN_FLAG",
	"UNIT_HAS_UPGRADE","CAN_BUILD_AT_BASE","BUILDING_GARRISONNED_BY_OBJECT_TYPE","BUILDING_IS_DEFAULT_PRODUCTION","IS_AREA_ON_FIRE","LIVING_WORLD_IS_REGION_REF_BOUND","LOCAL_PLAYER_TARGETING_SPECIAL_POWER","LOCAL_PLAYER_TARGETING_SPECIAL_POWER_FROM_OBJECT","METAGAME_DIALOG_STATE_CHANGE","MGOP_TRIGGERED_BY_NAMED","MGOP_TRIGGERED_BY_NAMED_IN_AREA","MGOP_TRIGGERED_BY_NAMED_ON_OBJECT","MGOP_TRIGGERED_BY_PLAYER","MGOP_TRIGGERED_BY_PLAYER_IN_AREA","MGOP_TRIGGERED_BY_PLAYER_ON_OBJECT","MUSIC_IS_PLAYING_FROM_SCRIPT","OBJECTIVES_SCREEN_IS_OPEN","PLAYER_COMPARE_LIGHT_POINTS","PLAYER_HAS_NUMBER_OBJECTS_WITH_OBJECT_STATUS",
	"PLAYER_IS_IN_PLANNING_MODE","PLAYER_TRIGGERED_SCRIPT_EVENT","SPELL_STORE_IS_OPEN","TEST_METAGAME_KINDOF_IN_AOI_OF_KINDOF","TEST_METAGAME_KINDOF_IN_AOI_OF_UNIT","TEST_METAGAME_LOCAL_PLAYER_STRIKEFORCE_IN_BATTLE_WITH_UNIT","TEST_METAGAME_PLAYER_FLAGS","TEST_METAGAME_TOWER_COUNT","TEST_METAGAME_UNIT_IN_BATTLE_WITH_UNIT","TOGGLE_STANCE_SUBMENU_IS_OPEN","UNIT_SPECIAL_POWER_READY"
}

NATIVE_SCRIPT_FUNCTIONS={
	"ExecuteAction","EvaluateCondition","ObjectDoSpecialPower","ObjectCreateAndFireTempWeapon","ObjectGrantUpgrade","ObjectRemoveUpgrade",
	"ObjectHasUpgrade","ObjectSetObjectStatus","ObjectTestModelCondition","ObjectPlaySound","ObjectSetDelayedDeath",
	"ObjectChangeAllegianceFromNonPlayablePlayer","ObjectForbidPlayerCommands","ObjectDispatchEvent","ObjectSpy","ObjectSetGeometryActive",
	"ObjectHideSubObject","ObjectHideSubObjectPermanently","ObjectCountNearbyEnemies","ObjectDescription","ObjectTeamName","ObjectPlayerSide",
	"ObjectCapturingObjectPlayerSide","ObjectTemplateName","HordeBroadcastEventToMembers","ObjectBroadcastEventToEnemies","ObjectBroadcastEventToAllies",
	"ObjectBroadcastEventToUnits","ObjectBroadcastEventToCivilians","ObjectSetChanting","ObjectSetFearFactor ","ObjectTestCanSufferFear",
	"ObjectEnterFearState","ObjectEnterAlertState","ObjectEnterCowerState","ObjectEnterRampageState","ObjectEnterRunAwayPanicState",
	"ObjectEnterUncontrollableCowerState","GetRandomNumber","GetFrame"
}

NATIVE_SCRIPT_FUNCTIONS_DRAWMODULE={   --usable only in draw module of object declaration
	"CurDrawableObjectStatus","CurDrawableModelcondition","CurDrawableGetCurrentTargetBearing","CurDrawableGetCurrentTargetHeight","CurDrawableGetCurrentTargetDistance",
	"CurDrawableIsCurrentTargetKindof","CurDrawablePrevAnimation","CurDrawablePrevAnimationState","CurDrawablePrevAnimFraction","GetClientRandomNumberReal","GetFrame",
	"CurDrawablePlaySound","CurDrawableAllowToContinue","CurDrawableSetTransitionAnimState","CurDrawableShowModule","CurDrawableHideModule",
	"CurDrawableHideSubObjectPermanently","CurDrawableShowSubObjectPermanently","CurDrawableShowSubObject","CurDrawableHideSubObject"
}

NATIVE_LUA_FUNCTIONS={
	"openfile","closefile","readfrom","read","writeto","write","appendto","remove","rename","flush","seek","tmpname","dofile","dostring","tremove",
	"tinsert","sort","rawgettable","rawsettable","getn","globals","getglobal","setglobal","rawgetglobal","rawsetglobal","rawget","rawset","strlen",
	"strfind","strupper","strlower","strchar","strbyte","strrep","strsub","gsub","tostring","tonumber","format","ascii","sin","cos","tan","asin","acos",
	"atan","atan2","mod","deg","rad","exp","ldexp","frexp","log","log10","floor","ceil","min","max","sqrt","abs","random","randomseed","foreachvar","foreach",
	"foreachi","nextvar","next ","tag","settag","newtag","gettagmethod","settagmethod","copytagmethods","execute","date","clock","setlocale","getenv","exit",
	"type","call","print","assert","error","_ALERT","_ERRORMESSAGE","debug","getinfo","getlocal","setlocal","setcallhook","setlinehook","gcinfo","collectgarbage"
}

NATIVE_LUA_GLOBALE_VARIABLES={
	"_STDIN","_STDOUT","_STDERR","_INPUT","_OUTPUT","PI","_VERSION"
}

WeaponNameTable={
	"AlienAnnihilatorEMPCannonWarhead","AlienAnnihilatorEMPCannon","AlienAnnihilatorPulseCannonA","AlienAnnihilatorPulseCannonB","AlienAnnihilatorPulseCannonC","AlienBuzzerHiveWeapon","AlienBuzzerWeapon","AlienBuzzerWeapon_ClearGarrison","AlienBuzzerWeapon_Combined","AlienBuzzerWeapon_GarrisonedRangeFinder","AlienCorrupterTioxinBlastCannon","AlienDevourerBeamLaser","AlienDevourerBeamLaser_TiberiumEnhanced","AlienEradicatorBlinkWeapon","AlienEradicatorBlinkWeapon2","AlienEradicatorLaserWeapon","AlienPlaceManipulatorDeviceWeaponTrigger",
	"CatalystBuildingDeathWeapon","CatalystInfantryDeathWeapon","MechapedeRangefinder","AlienZeusPlasmaDiskWarhead","AlienZeusPlasmaDiskBattery","AlienEradicatorPlasmaDiskWarheadG","AlienEradicatorPlasmaDiskBatteryG","AlienEradicatorShardWarhead","AlienEradicatorShardWeapon","AlienEradicatorShockTrooperUpgradePlasmaDiskWarhead","AlienEradicatorShockTrooperUpgradePlasmaDisk","AlienGunWalkerPlasmaAutoCannon","AlienPhotonCannonShardLauncherWarhead","AlienPhotonCannonShardLauncherWeapon","AlienPhotonCannonWarhead","AlienPhotonCannonWeapon",
	"HandOfNodBallWarhead","NODHandOfNodDeathWeapon","NODLaserCannonCapacitorsWeapon","NODLaserCannonHubWeapon","NODLaserCannonWeapon","NODObeliskAntiInfantryLaser","NODObeliskLaser","NODObeliskSweepWeapon","NODRocketBunkerSpawnTibCoreWeaponWarhead","NODRocketBunkerSpawnTibCoreWeapon","NODRocketBunkerSpawnWeaponWarhead","NODRocketBunkerSpawnWeapon","NODRocketBunkerHubWeapon","NODShredderTurretSpawnChargedParticleBeamWeapon","NODShredderTurretWarhead","NODShredderTurretSpawnWeapon","ComputerCounterMeasures","NODCatalystMissileLauncher",
	"NODShredderTurretHubWeapon","NuclearMissile","TibVeinDetonation","CloakingFieldKillInfantryWeaponWarhead","CloakingFieldKillInfantryWeapon","MarkedOfKaneShredderTurretSpawnSuperChargedParticleBeamWeapon","AlienPhaseFieldWeaponTrigger","AlienPlanetaryAssaultCarrierWeapon","AlienPlasmaMissileBatteryShardLauncherWarhead","AlienPlasmaMissileBatteryShardLauncherWeapon","AlienPlasmaMissileBatteryWarhead","AlienPlasmaMissileBatteryWeapon","AlienSeekerTankPlasmaDiskLauncherWarhead","AlienSeekerTankPlasmaDiskLauncher","AlienSeekerTankShardLauncherWarhead",
	"RazorDroneSquadRangefinder","RiftGeneratorWeaponTrigger","AlienSeekerTankShardLauncherWeapon","AlienShockTrooperBlinkWeapon","AlienShockTrooperBlinkWeapon2","ShockTrooperRangefinder","AlienStormRiderPlasmaAutocannon","BlackHandCustomWarmechFlamer","BlackHandCustomWarmechUpgradedFlamer","MilitantRocketSquadRangeFinder","StalkerRangefinder","StormColumnLightningWeapon","StormColumnMissileJammerWeapon","NODAttackBikeRocketWarhead","NODAttackBikeRocket","NODAttackBikeRocketTibCoreWarhead","NODAttackBikeRocketTibCore","NODAvatarBeamCannonLaser",
	"NODAvatarCommandeerParalyzeWeapon","NODAvatarCommandeerWeapon","NODAvatarLaser","NODBeamCannonLaser","NODBlackHandFlameTankUpgradedFlamer","NODBlackHandFlamethrowerRangeFinder","NODBuggyEmpBurst","NODBunkerTruckFakeWeapon","NODCommandoLaserCarbine","NODCommandoLaserCarbineContained","NODCommandoSatchelChargeDispatchWeapon","NODCommandoSatchelChargeWarHead","NODCommandoSatchelChargeWeapon","NODFanaticSquadRangeFinder","NODFanaticSquadRangeFinder_InGarrison","NODFlameTankDeathWeapon","NODMilitantSquadRangeFinder","NODFlameTankFlamerWarhead",
	"NODFlameTankFlamer","NODWarmechFlamer","NODWarmechMachinegun","NODWarmechRageGenerator","NODWarmechRocketWarhead","NODWarmechRocket","NODWarmechTibWeaponLeft","NODWarmechTibWeaponRight","NODWarmechTriPointLaser1","NODWarmechTriPointLaser2","NODWarmechTriPointLaser3","NODMobileArtilleryWarhead","NodMobileArtilleryBombardCannon","NodMobileArtilleryCannon","NODRaiderTankCannonWarhead","NODRaiderTankCannon","NODRaiderTankCannonLaser","NODSaboteurPlaceBoobyTrapAtBridgeWeapon","NODSaboteurPlaceBoobyTrapAtBuildingWeapon","NODSaboteurPlaceBoobyTrapAtHuskWeapon",
	"NODSaboteurPlaceBoobyTrapAtTechBuildingWeapon","NODScorpionBuggyGatling","NODScorpionBuggyGatlingLaser","BlackHandTankTankRocketWarhead","BlackHandTankTankRocket","BlackHandTankTankRocketTibCoreWarhead","BlackHandTankTankRocketTibCore","GDIAABattery","GDIAABatteryTungstenAAShells","GDIAAScoutGun","GDIAAScoutTungstenAAShells","GDIAPCAutoCannon","GDIAPCAutoCannonAPAmmo","GDIAPCMinefield","NODVenomMinigun","NODVenomMinigunLaser","FireHawkBombWarhead","GDICommandoRailCarbine","GDICommandoRailCarbineContained","GDICommandoSatchelChargeDispatchWeapon",
	"GDICommandoSatchelChargeWarHead","GDICommandoSatchelChargeWeapon","ZoneTrooperJumpJetWarhead","ZoneTrooperFireJumpJets","GDIFirehawkBombMainLoad","GDIFirehawkHardpointsUpgradeBombMainLoad","GDIFirehawkMissileWarhead","GDIFirehawkHardpointsUpgradeMissileMainLoad","GDIFirehawkMissileMainLoad","GDIGolemCannonWarhead","GDIGolemCannon","GDIGolemCannonRailgun","GDIAPCMissileWarhead","GDIHammerheadChaingun","GDIHammerheadUpgradedChaingun","GDIHarvesterMachineGun","JuggernaughtArtilleryWarhead","GDIJuggernaughtArtillery","IonCannonWeapon","SquadGrenadeRangefinder",
	"JuggernaughtArtilleryWarheadBombard","GDIJuggernaughtArtilleryBombard","MammothTankShellWarhead","GDIMammothTankGun","GDIMammothTankMissileFragmentWarhead","GDIMammothTankRocketPods","MammothTankRailCannon","MARVSonicShellWarhead","GDIMARVCannon","MARVGrenadeSoldierWeaponWarhead","MARVGrenadeSoldierWeapon","MARVRifleWeapon","MARVRocketWeaponWarhead","MARVRocketWeapon","MARVSniperWeapon","ZoneRaiderSonicRifleWarhead","MARVZoneRaiderWeapon","MARVZoneTrooperWeapon","MetaCrushTiberium","SquadMissileRangefinder","GDIOrcaMissileWarhead",
	"GDIOrcaHardpointsUpgradedRocketWeapon","GDIOrcaRocketWeapon","GDIOrcaSensorPodWarhead","GDIOrcaSensorPodWeapon","GDIOrcaSensorStickyPodWarhead","GDIOrcaSensorStickyPodWeapon","GDIPitbullMortarWarhead","GDIPitbullMortar","GDIPitbullRocketWeapon","GDIPredatorTankCannonWarhead","GDIPredatorTankCannon","GDIPredatorTankRailgun","GDIRifleSquadGunRangefinder","GDIShattererShockWaveCannon","GDISonicShockWaveCannon","GDITerrainformingStationSweepWeapon","GDIWatchTowerGun","GDIWatchTowerGunAPAmmo","ShattererSweepWeapon","SquadSniperRangefinder",
	"NODAvatarFlamer","ZoneTrooperSquadRangefinder","SquadGunRangefinder","AlienDevourerBeamLaser_SuperDuperTiberiumEnhanced","AlienShardWalkerBlueShardWeaponWarhead","AlienShardWalkerBlueShardWeapon","AlienShardWalkerWeaponWarhead","AlienShardWalkerWeapon","BehemothBuildAnimationWeapon","CombatEngineerWeapon","CyborgMinigunRangefinder","MarkedOfKaneTibTrooperRangeFinder","MarkedOfKaneVenomSuperChargedParticleBeam","MutantMarauderSquadGunRangeFinder","NODExplosiveChargeWeapon","NODShadowPlaceExplosiveCharge","NODStealthTankRocketWarhead",
	"NODStealthTankRocket","ShadowMachineGunRangefinder","NODStealthTankRocketTibCoreWarhead","NODStealthTankRocketTibCore","NODVertigoBombWarhead","NODVertigoBomb","NODVertigoDisruptionPodWarhead","NODVertigoDisruptionPodWeapon","NODVertigoDisruptionStickyPodWarhead","NODVertigoDisruptionStickyPodWeapon","NODVertigoMachineGun","Reaper17TripodPulseCannonA_SuperDuperTiberiumEnhanced","Reaper17TripodPulseCannonA_TiberiumEnhanced","Reaper17TripodPulseCannonB_SuperDuperTiberiumEnhanced","Reaper17TripodPulseCannonB_TiberiumEnhanced",
	"Reaper17TripodPulseCannonC_SuperDuperTiberiumEnhanced","Reaper17TripodPulseCannonC_TiberiumEnhanced","SteelTalonsBehemothArtillery","CultistMindControlWeaponRangeFinder","OrcaEchoCannonWarhead","OrcaEchoCannon","OverloadBeamSelfStunWeapon","SteelShattererShockWaveCannon","SteelTalonsAdaptiveArmorWeapon","SteelTalonsOverloadBeamWarhead","SteelTalonsImprovedShattererOverloadBeam","TitanCannonWarhead","TitanCannon","TitanCannonRailgun","WolverineMachineGun","WolverineMachineGunAPAmmo","ZOCOMHarvesterMissileWarhead","ZOCOMHarvesterMissileLauncher",
	"AirborneTransportRangefinder","AlienCrystalShieldWeaponTrigger","AlienInvaderFighterCannon","ALIENLaser","AlienLightningSpikeWeapon","AlienMechapedeHeadWeapon","AlienMechapedeProtonCannonWarhead","AlienMechapedeProtonCannon","AlienMechapedeRazorDroneWeapon","AlienMechapedeTiberiumShardWarhead","AlienMechapedeShardWeapon","AlienMechapedeTioxinBlastCannon","AlienMotherShipCatalystCannon100","AlienMotherShipCatalystCannon25","AlienMotherShipCatalystCannon50","AlienMotherShipCatalystCannon75","AlienMothershipDeathWeapon","AlienRazorDroneDeathMine",
	"AlienRazorDroneWeapon","AlienShockTrooperPlasmaDiskWarhead","AlienShockTrooperPlasmaDisk","AlienShockTrooperProtonCannon","AlienStalkerBlueShardWarhead","OverlordsWrathWeapon","OverlordsWrathProjectile","OverlordsWrathMiniWeapon","OverlordsWrathMiniProjectile","OverlordsWrathMiniProjectile2","AlienStalkerBlueShardWeapon","AlienStalkerTiberiumShardWarhead","AlienStalkerShardWeapon","AlienTiberiumAgitationExplosiveWeapon","AlienStalkerTiberiumAgitation","NODBlackHandFlamethrowerWarhead","NODBlackHandFlamethrower","NODBlackHandUpgradedFlamethrower",
	"TiberiumHiveWeapon","NODHallucinogenicWeapon","BlackHandConfessorCabalGrenade","BlueTiberiumCrystalWeapon","ClusterBomblet","CorruptedInfantryWeapon","CultistMindControlWeaponTrigger","GDIBattleBaseCannonWarhead","GDIBattleBaseCannon","GDIBattleBaseMissileWarhead","NODConfessorChargedParticleBeam","NODConfessorMinigun","NODFanaticBomb","NODFanaticCrushedWeapon","NODFanaticDeathBomb","NODMilitantMinigun","NODMilitantRocketWeaponWarhead","NODMilitantRocketWeapon","GDIBattleBaseMissileWeapon","GDIFuelDepotWeapon","GDIGrenadeSoldierEMPGrenadeWarhead",
	"GDIGrenadeSoldierEMPGrenade","GDIGrenadeSoldierGrenadeWarhead","GDIGrenadeSoldierGrenade","GDIMinefieldMine","GDIMissileSoldierMissileWarhead","GDIMissileSoldierMissileLauncher","GDIMjolnirStrikeWarhead","GDIMjolnirStrikeWeaponOne","OrcaVulcanCannon","GDIAirstrikeOrcaWeaponWarhead","GDIAirstrikeOrcaWeapon","GDIBombingRunOrcaWeaponWarhead","GDIBombingRunOrcaWeapon","GDIRifleSoldierRifle","GDIRifleSoldierRifleAPAmmo","GDISniperRifle","GDISpaceCommandShockwaveWeapon","GDISupersonicAirWeapon","IonCannonFinalWeapon","IonCannonWeapon_Stage1",
	"IonCannonWeapon_Stage2","IonCannonWeapon_Stage3","IonCannonWeapon_Stage4","IonCannonWeapon_Stage5","IonCannonWeapon_Stage6","IonStormWeapon","MagneticMineWeapon","MarkedOfKaneCyborgSuperChargedParticleBeam","RailgunAcceleratorDamage","RailgunAcceleratorTrigger","SonicShockwaveWeapon","TerraformingStationIonStormKillerWeapon","ZoneTrooperMachineGun","MarkedOfKaneMagneticMineBombWarhead","MarkedOfKaneMagneticMineBomb","MARVTiberiumFXWeapon","MutantMarauderRifle","NeutralViceroidSpittleWeaponWarhead","NODBurrowMine","NODCatalystCreationWeapon",
	"NODCatalystMissileCatalystWeapon","NODCatalystMissileWeapon","NODConfessorGrenade","NODCyborgChargedParticleBeam","NODImprovedEMPBlastWarhead","NODImprovedCyborgEMPCannon","NODShadowMachinePistol","NODShadowSquadBeaconWarhead","NODShadowSquadBeaconWeapon","TibTrooperBlastCannon","NODEMPBlastWarhead","NODCyborgEMPCannon","NODCyborgMinigun","NODFlameTankDebrisWeapon","NODSaboteurBoobyTrapAtBridgeDeathWeapon","NODSaboteurBoobyTrapAtBridgeWeapon","NODSaboteurBoobyTrapAtBuildingWeapon","NODSaboteurBoobyTrapAtHuskWeapon","NODSaboteurBoobyTrapAtTechBuildingWeapon",
	"RedemptionAnimationWeapon","RedemptionTriggerWeapon","NODAirDispenserBombDummyWarhead","NODAirDispenserBombWarhead","NODAirDispenserBomb","NODMineBombWarhead","NODMineBomb","NODSeedTiberiumFieldWeaponWarhead","NODSeedTiberiumWeapon","RiftGeneratorWeapon","TemporalWormholeWeaponTrigger","TiberiumCrystalWeapon","TiberiumInfestationCrystalWeapon","VeinDetonationRadiusWeapon","NeutralViceroidSpittleWeapon","ZOCOMBombingRunOrcaWeapon","ZoneRaiderRocketPodWarhead","ZoneRaiderRocketPods","ZoneRaiderSonicRifle","AlienAutocannon","AlienBlueShardWarhead","AlienEradicatorPlasmaDiskWarhead",
	"AlienEradicatorPlasmaDiskBattery","AlienMastermindDisintegrator","AlienMetaPhaseFieldWeaponTrigger","AlienPlagueWeapon","AlienSeedTiberiumWeapon","AlienStormRiderPlasmaAutocannonWarhead","AlienStormRiderPlasmaDiskLauncherWarhead","AlienStormRiderPlasmaDiskLauncher","AlienTiberiumShardWarhead","BattleshipArtilleryWarhead","ConfessorSquadLeadershipBuff","DUMMY_IonStormPhaseInitialWeapon","DUMMY_IonStormProjectileWeapon","EMPControlCenterWeapon","EradicatorLeadershipBuff","ExplodingBarrelWeapon","ExplodingParkedVehicleWeapon","FallingBridgePieceWeapon","FirehawkClusterBombWarhead",
	"GDIAPCRocketWeapon","GDIBattleBaseAutoCannon","GDIBattleshipArtilleryBombardWeapon","GDIBattleshipArtilleryBombard","GDIBattleshipArtilleryBombardWeaponFORINTRO","GDIBattleshipArtilleryBombardFORINTRO","GDIBattleshipCannon","GDICommandoStrikeWeaponTrigger","GDIFirehawkClusterBomb","GDIGolemCannonRailgunWarhead","GDIJuggernaughtRocketPodWarhead","GDIJuggernaughtRocketPod","GDIMjolnirStrikeBeacon","GDINuclearMissile","GDIPitbullAutoCannon","GDIPredatorTankRailgunWarhead","GDIRigAutoCannon","GDISPArtilleryEmplacement","GDISpotterRifle","ImprovedShattererOverloadSweepWeapon",
	"ImprovedZTSweepWeapon","MediaBlitzWeapon","MetaIonBlast","MetaNuclearMissile","MetaRiftGenerator","NeutralDefensiveTowerCannonWarhead","NeutralDefensiveTowerCannon","NODAvatarUpgradedFlamer","NODBunkerTruckDeployTrigger","NODHarvesterGatlingGun","NODLsrCann","NODRocketBunkerSpawnWeaponWarhead_GDI_3_4","NODRocketBunkerSpawnWeapon_GDI_3_4","NODVenomChargedParticleBeam","NODVertigoBombWarhead_SPBombingRun","NODVertigoBomb_SPBombingRun","OverlordsWrathSpawnRock","PlanetaryBombardment","PropagandaTowerBuff","SteelTalonsBehemothArtilleryBombard","SteelTalonsBehemothRocketPod","StrikeForceGun","ZoneTrooperSquadFireJumpJets"
}

ObjectStatusTable={
	["DESTROYED"]=0,["CAN_ATTACK"]=1,["UNDER_CONSTRUCTION"]=2,["UNSELECTABLE"]=3,["NO_COLLISIONS"]=4,["NO_ATTACK"]=5,["AIRBORNE_TARGET"]=6,["PARACHUTING"]=7,["REPULSOR"]=8,["DECOY"]=9,["AFLAME"]=10,["BURNED"]=11,["CANNOT_BE_SOLD"]=12,["IS_FIRING_WEAPON"]=13,["IS_BRAKING"]=14,["STEALTHED"]=15,["HIDDEN"]=16,["DETECTED"]=17,["CAN_STEALTH"]=18,["SOLD"]=19,["UNDERGOING_REPAIR"]=20,["RECONSTRUCTING"]=21,["IS_ATTACKING"]=22,["NO_AUTO_ACQUIRE"]=23,
	["USING_ABILITY"]=24,["IS_AIMING_WEAPON"]=25,["NO_ATTACK_FROM_AI"]=26,["IGNORING_STEALTH"]=27,["IS_MELEE_ATTACKING"]=28,["GUARD_SELECTION"]=29,["LEASHED_RETURNING"]=30,["DEATH_1"]=31,["DEATH_2"]=32,["DEATH_3"]=33,["DEATH_4"]=34,["DEATH_5"]=35,["CONTESTED"]=36,["CONTESTING_BUILDING"]=37,["HORDE_MEMBER"]=38,["RIDERLESS"]=39,["RIDER_IS_PILOT"]=40,["RIDER1"]=41,["RIDER2"]=42,["RIDER3"]=43,["RIDER4"]=44,["NO_SHADOW"]=45,["IN_STASIS"]=46,
	["OUT_OF_PHASE"]=47,["NEXT_MOVE_IS_REVERSE"]=48,["IMMOBILE"]=49,["FLEE_OFF_MAP"]=50,["NOT_IN_WORLD"]=51,["INAUDIBLE"]=52,["CHANTING"]=53,["ENRAGED"]=54,["CREATE_DRAWABLE_WITH_LOW_DETAIL"]=55,["SINKING"]=56,["RAMPAGING"]=57,["INSIDE_GARRISON"]=58,["DEPLOYED"]=59,["UNATTACKABLE"]=60,["ENCLOSED"]=61,["TEMPORARILY_DEFECTED"]=62,["TAGGED"]=63,["DEPLOYING"]=64,["PRIMARY_MEMBER_PRESENT"]=65,["PORTER_TAGGED"]=66,["GRAB_AND_DROP"]=67,["STAND_GROUND"]=68,
	["UNCONTROLLABLY_SCARED"]=69,["SPECIAL_ABILITY_PACKING_UNPACKING_OR_USING"]=70,["TIBERIUM_VIBRATING"]=71,["UPDATING_AI"]=72,["CLONED"]=73,["IGNORE_AI_COMMAND"]=74,["RUNNING_DOWN_FROM_BEHIND"]=75,["DO_NOT_SCORE"]=76,["CAN_NOT_WALK_ON"]=77,["MARCH_OF_DEATH"]=78,["DO_NOT_PICK_ME"]=79,["INHERITED_FROM_ALLY_TEAM"]=80,["SWITCHED_WEAPONS"]=81,["END_FIRE_STATE"]=82,["BOOKENDING"]=83,["ELVISH_EXPRESSLY"]=84,["INSIDE_CASTLE"]=85,["BUILD_BEING_CANCELED"]=86,
	["PENDING_CONSTRUCTION"]=87,["PHANTOM_STRUCTURE"]=88,["IN_FORMATION_TEMPLATE"]=89,["IS_LEAVING_FACTORY"]=90,["MOVING_TO_DISMOUNT"]=91,["NO_HERO_PROPERTIES"]=92,["CAN_ENTER_ANYTHING"]=93,["HOLDING_THE_RING"]=94,["INVISIBLE_DETECTED_BY_FRIEND"]=95,["INVISIBLE_DETECTED"]=96,["WORKER_REPAIRING"]=97,["ATTACHED"]=98,["WONT_RIDE_WITH_YOU"]=99,["COMMAND_BUTTON_TOGGLED"]=100,["OCLMONITOR_COMPLETED_TASK"]=101,["OCLMONITOR_MONITOR_RELEASED"]=102,
	["USER_POWERED_DOWN"]=103,["GARRISONED"]=104,["BOOBY_TRAPPED"]=105,["IS_HIDEOUT"]=106,["SUICIDE_BOMBER_HAS_TARGET"]=107,["UNIT_WANTS_TO_REGARRISON"]=108,["IN_COVER"]=109,["DONT_CLEAR_FOR_BUILD"]=110,["MATCH_TARGETS_SPEED"]=111,["HAS_TIBERIUM_GROWTH_MOD"]=112,["HAS_TIBERIUM_UPGRADE"]=113,["STEAL_NEXT_UNIT_TRAPPED"]=114,["DOES_CONTAIN_TIBERIUM"]=115,["IS_BEING_HARVESTED"]=116,["HAS_TIBERIUM_AMMO"]=117,["SHIELDBODY_ENABLED"]=118,["HEALTH_PERCENT_0"]=119,
	["HEALTH_PERCENT_25"]=120,["HEALTH_PERCENT_50"]=121,["HEALTH_PERCENT_75"]=122,["HEALTH_PERCENT_100"]=123,["WEAPON_UPGRADED_01"]=124,["WEAPON_UPGRADED_02"]=125,["WEAPON_UPGRADED_03"]=126,["COMBINED_PARENT"]=127,["COMBINED_CHILD"]=128,["COMBINED_ATTACHED"]=129,["LOADED_FROM_MAP"]=130,["ATTACKING_GARRISONED_STRUCTURE"]=131,["EXITING_COMBINED"]=132,["DELAYED_ENTER_STRUCTURE"]=133,["DOCKING"]=134,["HARVESTING"]=135,["BRIDGE_IMPASSABLE"]=136,["POWERED_DOWN_EMP"]=137,
	["FORCE_ATTACKING"]=138,["FORCE_ATTACK_MOVING"]=139,["SCARED_CIVILIAN_CAR"]=140,["USER_PARALYZED"]=141,["BOOBY_TRAP_EXPLODE"]=142,["IS_ENGAGED"]=143,["CARRYING_FLAG"]=144,["IS_MOVING_TO_RALLY_POINT"]=145,["CAN_SPOT_FOR_BOMBARD"]=146,["AIRCRAFT_IGNORE_SAMEPLAYER_HANGAR_RULE"]=147,["NEXT_MOVE_IS_FORCE_ATTACK_MOVE"]=148,["SPECIALABILITY_ACTIVE"]=149,["CAN_STEALTH_FROM_PRODUCER"]=150,["CAPTURING"]=151,["TIER_2_BASE"]=152,["TIER_3_BASE"]=153,["UPGRADE_BASE_POWER"]=154,
	["UPGRADE_BASE_DEFENSE"]=155,["UPGRADE_BASE_STRAT_1"]=156,["UPGRADE_BASE_STRAT_2"]=157,["UPGRADE_BASE_STRAT_3"]=158,["UPGRADE_BASE_STRAT_4"]=159,["UPGRADE_BASE_STRAT_5"]=160
}

ObjectStatusIndexTable={  --use index-1 for actions not the string
	"DESTROYED","CAN_ATTACK","UNDER_CONSTRUCTION","UNSELECTABLE","NO_COLLISIONS","NO_ATTACK","AIRBORNE_TARGET","PARACHUTING","REPULSOR","DECOY","AFLAME","BURNED","CANNOT_BE_SOLD","IS_FIRING_WEAPON","IS_BRAKING","STEALTHED","HIDDEN","DETECTED","CAN_STEALTH","SOLD","UNDERGOING_REPAIR","RECONSTRUCTING","IS_ATTACKING","NO_AUTO_ACQUIRE","USING_ABILITY","IS_AIMING_WEAPON","NO_ATTACK_FROM_AI",
	"IGNORING_STEALTH","IS_MELEE_ATTACKING","GUARD_SELECTION","LEASHED_RETURNING","DEATH_1","DEATH_2","DEATH_3","DEATH_4","DEATH_5","CONTESTED","CONTESTING_BUILDING","HORDE_MEMBER","RIDERLESS","RIDER_IS_PILOT","RIDER1","RIDER2","RIDER3","RIDER4","NO_SHADOW","IN_STASIS","OUT_OF_PHASE","NEXT_MOVE_IS_REVERSE","IMMOBILE","FLEE_OFF_MAP","NOT_IN_WORLD","INAUDIBLE","CHANTING","ENRAGED","CREATE_DRAWABLE_WITH_LOW_DETAIL",
	"SINKING","RAMPAGING","INSIDE_GARRISON","DEPLOYED","UNATTACKABLE","ENCLOSED","TEMPORARILY_DEFECTED","TAGGED","DEPLOYING","PRIMARY_MEMBER_PRESENT","PORTER_TAGGED","GRAB_AND_DROP","STAND_GROUND","UNCONTROLLABLY_SCARED","SPECIAL_ABILITY_PACKING_UNPACKING_OR_USING","TIBERIUM_VIBRATING","UPDATING_AI","CLONED","IGNORE_AI_COMMAND","RUNNING_DOWN_FROM_BEHIND","DO_NOT_SCORE","CAN_NOT_WALK_ON","MARCH_OF_DEATH","DO_NOT_PICK_ME",
	"INHERITED_FROM_ALLY_TEAM","SWITCHED_WEAPONS","END_FIRE_STATE","BOOKENDING","ELVISH_EXPRESSLY","INSIDE_CASTLE","BUILD_BEING_CANCELED","PENDING_CONSTRUCTION","PHANTOM_STRUCTURE","IN_FORMATION_TEMPLATE","IS_LEAVING_FACTORY","MOVING_TO_DISMOUNT","NO_HERO_PROPERTIES","CAN_ENTER_ANYTHING","HOLDING_THE_RING","INVISIBLE_DETECTED_BY_FRIEND","INVISIBLE_DETECTED","WORKER_REPAIRING","ATTACHED","WONT_RIDE_WITH_YOU","COMMAND_BUTTON_TOGGLED",
	"OCLMONITOR_COMPLETED_TASK","OCLMONITOR_MONITOR_RELEASED","USER_POWERED_DOWN","GARRISONED","BOOBY_TRAPPED","IS_HIDEOUT","SUICIDE_BOMBER_HAS_TARGET","UNIT_WANTS_TO_REGARRISON","IN_COVER","DONT_CLEAR_FOR_BUILD","MATCH_TARGETS_SPEED","HAS_TIBERIUM_GROWTH_MOD","HAS_TIBERIUM_UPGRADE","STEAL_NEXT_UNIT_TRAPPED","DOES_CONTAIN_TIBERIUM","IS_BEING_HARVESTED","HAS_TIBERIUM_AMMO","SHIELDBODY_ENABLED","HEALTH_PERCENT_0","HEALTH_PERCENT_25",
	"HEALTH_PERCENT_50","HEALTH_PERCENT_75","HEALTH_PERCENT_100","WEAPON_UPGRADED_01","WEAPON_UPGRADED_02","WEAPON_UPGRADED_03","COMBINED_PARENT","COMBINED_CHILD","COMBINED_ATTACHED","LOADED_FROM_MAP","ATTACKING_GARRISONED_STRUCTURE","EXITING_COMBINED","DELAYED_ENTER_STRUCTURE","DOCKING","HARVESTING","BRIDGE_IMPASSABLE","POWERED_DOWN_EMP","FORCE_ATTACKING","FORCE_ATTACK_MOVING","SCARED_CIVILIAN_CAR","USER_PARALYZED","BOOBY_TRAP_EXPLODE",
	"IS_ENGAGED","CARRYING_FLAG","IS_MOVING_TO_RALLY_POINT","CAN_SPOT_FOR_BOMBARD","AIRCRAFT_IGNORE_SAMEPLAYER_HANGAR_RULE","NEXT_MOVE_IS_FORCE_ATTACK_MOVE","SPECIALABILITY_ACTIVE","CAN_STEALTH_FROM_PRODUCER","CAPTURING","TIER_2_BASE","TIER_3_BASE","UPGRADE_BASE_POWER","UPGRADE_BASE_DEFENSE","UPGRADE_BASE_STRAT_1","UPGRADE_BASE_STRAT_2","UPGRADE_BASE_STRAT_3","UPGRADE_BASE_STRAT_4","UPGRADE_BASE_STRAT_5"
}

KindOfTable={
	["OBSTACLE"]=0,["SELECTABLE"]=1,["TARGETABLE"]=2,["ALLY_TARGETABLE"]=3,["IMMOBILE"]=4,["CAN_ATTACK"]=5,["STICK_TO_TERRAIN_SLOPE"]=6,["CAN_CAST_REFLECTIONS"]=7,["SHRUBBERY"]=8,["STRUCTURE"]=9,["INFANTRY"]=10,["CAVALRY"]=11,["MONSTER"]=12,["MACHINE"]=13,["AIRCRAFT"]=14,["HUGE_VEHICLE"]=15,["DOZER"]=16,["SWARM_DOZER"]=17,["HARVESTER"]=18,["COMMANDCENTER"]=19,["CASTLE_CENTER"]=20,["SALVAGER"]=21,["WEAPON_SALVAGER"]=22,["TRANSPORT"]=23,["BRIDGE"]=24,["CANT_TOGGLE_POWER"]=25,["SIEGE_WEAPON"]=26,
	["PROJECTILE"]=27,["PRELOAD"]=28,["NO_GARRISON"]=29,["CASTLE_KEEP"]=30,["SHADOW_ULTRA_HIGH_ONLY"]=31,["NO_COLLIDE"]=32,["REPAIR_PAD"]=33,["HEAL_PAD"]=34,["STEALTH_GARRISON"]=35,["SUPPLY_GATHERING_CENTER"]=36,["AIRFIELD"]=37,["DRAWABLE_ONLY"]=38,["MP_COUNT_FOR_VICTORY"]=39,["REBUILD_HOLE"]=40,["SCORE"]=41,["SCORE_CREATE"]=42,["SCORE_DESTROY"]=43,["NO_HEAL_ICON"]=44,["CAN_RAPPEL"]=45,["PARACHUTABLE"]=46,["CAN_BE_REPULSED"]=47,["MOB_NEXUS"]=48,["IGNORED_IN_GUI"]=49,["CRATE"]=50,["CAPTURABLE"]=51,
	["LINKED_TO_FLAG"]=52,["CLEARED_BY_BUILD"]=53,["SMALL_MISSILE"]=54,["ALWAYS_VISIBLE"]=55,["UNATTACKABLE"]=56,["MINE"]=57,["CAN_PLACE_CHARGE"]=58,["PORTABLE_STRUCTURE"]=59,["ALWAYS_SELECTABLE"]=60,["ATTACK_NEEDS_LINE_OF_SIGHT"]=61,["WALK_ON_TOP_OF_WALL"]=62,["DEFENSIVE_WALL"]=63,["FS_POWER"]=64,["FS_FACTORY"]=65,["FS_BASE_DEFENSE"]=66,["FS_TECHNOLOGY"]=67,["AIRCRAFT_PATH_AROUND"]=68,["LOW_OVERLAPPABLE"]=69,["FORCEATTACKABLE"]=70,["AUTO_RALLYPOINT"]=71,["CAN_CAPTURE"]=72,["POWERED"]=73,
	["PRODUCED_AT_HELIPAD"]=74,["DRONE"]=75,["CAN_SEE_THROUGH_STRUCTURE"]=76,["BALLISTIC_MISSILE"]=77,["CLICK_THROUGH"]=78,["SUPPLY_SOURCE_ON_PREVIEW"]=79,["PARACHUTE"]=80,["GARRISONABLE_UNTIL_DESTROYED"]=81,["BOAT"]=82,["IMMUNE_TO_CAPTURE"]=83,["HULK"]=84,["CAN_PLACE_MANIPULATOR"]=85,["SPAWNS_ARE_THE_WEAPONS"]=86,["CANNOT_BUILD_NEAR_SUPPLIES"]=87,["SUPPLY_SOURCE"]=88,["REVEAL_TO_ALL"]=89,["DISGUISER"]=90,["INERT"]=91,["HERO"]=92,["IGNORES_SELECT_ALL"]=93,["DONT_AUTO_CRUSH_INFANTRY"]=94,["SIEGE_TOWER"]=95,
	["TREE"]=96,["SHRUB"]=97,["CLUB"]=98,["ROCK"]=99,["THROWN_OBJECT"]=100,["GRAB_AND_KILL"]=101,["OPTIMIZED_PROP"]=102,["ENVIRONMENT"]=103,["DEFLECT_BY_SPECIAL_POWER"]=104,["WORKING_PASSENGER"]=105,["BASE_FOUNDATION"]=106,["NEED_BASE_FOUNDATION"]=107,["REACT_WHEN_SELECTED"]=108,["CAN_BE_CAPTURED"]=109,["IGNORED_IN_FINDPOSITIONAROUND"]=110,["HORDE"]=111,["COMBO_HORDE"]=112,["NONOCCLUDING"]=113,["NO_FREEWILL_ENTER"]=114,["TIBERIUM_FIELD"]=115,["BEAM_TARGET"]=116,["BEAM_TARGET_REFLECTOR"]=117,
	["TACTICAL_MARKER"]=118,["PATH_THROUGH_EACH_OTHER"]=119,["NOTIFY_OF_PREATTACK"]=120,["GARRISON"]=121,["MELEE_HORDE"]=122,["BASE_SITE"]=123,["INERT_SHROUD_REVEALER"]=124,["OCL_BIT"]=125,["SPELL_BOOK"]=126,["DEPRECATED"]=127,["PATH_THROUGH_INFANTRY"]=128,["NO_FORMATION_MOVEMENT"]=129,["NO_BASE_CAPTURE"]=130,["ARMY_SUMMARY"]=131,["CIVILIAN_UNIT"]=132,["NOT_AUTOACQUIRABLE"]=133,["KEEP_CLASSIFIED_WHEN_DEAD"]=134,["CHUNK_VENDOR"]=135,["ARCHER"]=136,["MOVE_ONLY"]=137,["FS_CASH_PRODUCER"]=138,
	["ROCK_VENDOR"]=139,["BLOCKING_GATE"]=140,["CRANE"]=141,["SIEGE_LADDER"]=142,["MINE_TRIGGER"]=143,["BUFF"]=144,["GRAB_AND_DROP"]=145,["PORTER"]=146,["SCARY"]=147,["CRITTER_EMITTER"]=148,["BROADCASTS_INVISIBILITY"]=149,["CAN_ATTACK_WALLS"]=150,["IGNORE_FOR_VICTORY"]=151,["DO_NOT_CLASSIFY"]=152,["WALL_UPGRADE"]=153,["ARMY_OF_DEAD"]=154,["TAINT"]=155,["BASE_DEFENSE_FOUNDATION"]=156,["NOT_SELLABLE"]=157,["WEBBED"]=158,["WALL_HUB"]=159,["BUILD_FOR_FREE"]=160,["IGNORE_FOR_EVA_SPEECH_POSITION"]=161,
	["MADE_OF_WOOD"]=162,["MADE_OF_METAL"]=163,["MADE_OF_STONE"]=164,["MADE_OF_DIRT"]=165,["FACE_AWAY_FROM_CASTLE_KEEP"]=166,["BANNER"]=167,["META_HORDE"]=168,["CAN_REVERSE_MOVE"]=169,["PASS_EXPERIENCE_TO_SLAVER"]=170,["HAS_HEALTH_BAR"]=171,["BIG_MONSTER"]=172,["DEPLOYED_MINE"]=173,["CANNOT_RETALIATE"]=174,["CREEP"]=175,["TAINTEFFECT"]=176,["POWERED_POWERS_ONLY"]=177,["VITAL_FOR_BASE_SURVIVAL"]=178,["DO_NOT_PICK_ME_WHEN_BUILDING"]=179,["SUMMONED"]=180,["HIDE_IF_FOGGED"]=181,["ALWAYS_SHOW_HOUSE_COLOR"]=182,
	["MOVE_FOR_NOONE"]=183,["WB_DISPLAY_SCRIPT_NAME"]=184,["CAN_CLIMB_WALLS"]=185,["NO_SHADOW"]=186,["LARGE_RECTANGLE_PATHFIND"]=187,["SUBMARINE"]=188,["PORT"]=189,["WALL_SEGMENT"]=190,["SIMPLE_OBJECT_PROP"]=191,["SHIP"]=192,["OPTIMIZED_SOUND"]=193,["PASS_EXPERIENCE_TO_CONTAINED"]=194,["DOZER_FACTORY"]=195,["THREAT_FINDER"]=196,["ECONOMY_STRUCTURE"]=197,["LIVING_WORLD_BUILDING_MIRROR"]=198,["CAN_TOPPLE"]=199,["NONCOM"]=200,["CAN_SKIP_SHADOW"]=201,["SCALEABLE_WALL"]=202,["SKYBOX"]=203,["WALL_GATE"]=204,
	["CAPTUREFLAG"]=205,["NEUTRALGOLLUM"]=206,["PASS_EXPERIENCE_TO_CONTAINER"]=207,["RESIST_EMP"]=208,["ORIENTS_TO_CAMERA"]=209,["NEVER_CULL_FOR_MP"]=210,["DONT_USE_CANCEL_BUILD_BUTTON"]=211,["CIVILIAN_BUILDING"]=212,["HEAVY_MELEE_HITTER"]=213,["DONT_HIDE_IF_FOGGED"]=214,["VEHICLE"]=215,["HARVESTABLE"]=216,["GRABBABLE"]=217,["CONSTRUCTION_YARD"]=218,["CAN_SHOOT_OVER_WALLS"]=219,["PASS_EXPERIENCE_TO_PRODUCER"]=220,["EXPANSION_PAD"]=221,["AMPHIBIOUS"]=222,["SHOW_BEHIND_OCCLUDERS"]=223,["FS_MONEY_STORAGE"]=224,
	["VALID_TARGET_FOR_C4"]=225,["UNIQUE_UNIT"]=226,["SURPRISE_ATTACKER"]=227,["COVER"]=228,["INFILTRATOR"]=229,["BRIDGE_SEGMENT"]=230,["FS_WAR_FACTORY"]=231,["FS_BARRACKS"]=232,["FS_RADAR"]=233,["FS_AIR_FIELD"]=234,["FS_TECH_CENTER"]=235,["TIBERIUM_BASED"]=236,["TIBERIUM"]=237,["CAN_ATTACK_STEALTHED"]=238,["IMMUNE_TO_CYCLONIC_SHOCKWAVE"]=239,["CANNOT_BE_DETECTED"]=240,["AUTO_ACQUIRABLE_BY_AI"]=241,["CRUSHABLE_OBSTACLE"]=242,["NEUTRAL_TECH"]=243,["SUPER_WEAPON"]=244,["HEALED_BY_TIBERIUM"]=245,
	["IGNORE_CAN_NOT_BUILD"]=246,["SKIRMISH_AI_DONT_GARRISON"]=247,["ASSAULT_AIRCRAFT"]=248,["BOMBER_AIRCRAFT"]=249,["ANTI_GARRISON"]=250,["ENGINEER"]=251,["EXPANSION_UNIT"]=252,["OUTPOST"]=253,["BEACON"]=254,["HUSK"]=255,["IGNORE_FORCE_MOVE"]=256,["LINE_OF_SIGHT_IGNORES_BUILDINGS"]=257,["MOTHERSHIP"]=258,["SNIPER"]=259,["ATTACK_FROM_STRUCTURE_ONLY_WHEN_GARRISONED"]=260,["SKIP_DEFECT_IF_UNCOMBINED"]=261,["SKIP_IDLE_WHEN_CAPTURED"]=262,["BRIDGE_ENDCAP"]=263,["BRIDGE_GATEHOUSE"]=264,["CAN_BE_FAVORITE_UNIT"]=265,
	["SLAVE_OWNER"]=266,["MCV"]=267,["CAN_HEAL_ALLIES"]=268,["METAUNIT"]=269,["META_BASE"]=270,["META_CITY"]=271,["META_STRIKEFORCE"]=272,["META_TIBERIUM_NODE"]=273,["META_ICMUMO"]=274,["META_ALIEN_TOWER"]=275,["PROJECT_BUILDABILITY_FOR_ALLIES"]=276,["AA_STRUCT"]=277,["NOD_SUPER_STRUCTURE"]=278,["RELOAD_AIRCRAFT"]=279,["USE_STRICT_PATHING"]=280,["CAN_FIRE_EVEN_IF_CONTAINED_ARE_NOT_IN_RANGE"]=281,["AI_BUZZERS_CANT_ATTACH_TO_ME"]=282
}

KindOfIndexTable={   --use index-1 for actions not the string
	"OBSTACLE","SELECTABLE","TARGETABLE","ALLY_TARGETABLE","IMMOBILE","CAN_ATTACK","STICK_TO_TERRAIN_SLOPE","CAN_CAST_REFLECTIONS","SHRUBBERY","STRUCTURE","INFANTRY","CAVALRY","MONSTER","MACHINE","AIRCRAFT","HUGE_VEHICLE","DOZER","SWARM_DOZER","HARVESTER","COMMANDCENTER","CASTLE_CENTER","SALVAGER","WEAPON_SALVAGER","TRANSPORT","BRIDGE","CANT_TOGGLE_POWER","SIEGE_WEAPON","PROJECTILE","PRELOAD","NO_GARRISON","CASTLE_KEEP",
	"SHADOW_ULTRA_HIGH_ONLY","NO_COLLIDE","REPAIR_PAD","HEAL_PAD","STEALTH_GARRISON","SUPPLY_GATHERING_CENTER","AIRFIELD","DRAWABLE_ONLY","MP_COUNT_FOR_VICTORY","REBUILD_HOLE","SCORE","SCORE_CREATE","SCORE_DESTROY","NO_HEAL_ICON","CAN_RAPPEL","PARACHUTABLE","CAN_BE_REPULSED","MOB_NEXUS","IGNORED_IN_GUI","CRATE","CAPTURABLE","LINKED_TO_FLAG","CLEARED_BY_BUILD","SMALL_MISSILE","ALWAYS_VISIBLE","UNATTACKABLE","MINE","CAN_PLACE_CHARGE",
	"PORTABLE_STRUCTURE","ALWAYS_SELECTABLE","ATTACK_NEEDS_LINE_OF_SIGHT","WALK_ON_TOP_OF_WALL","DEFENSIVE_WALL","FS_POWER","FS_FACTORY","FS_BASE_DEFENSE","FS_TECHNOLOGY","AIRCRAFT_PATH_AROUND","LOW_OVERLAPPABLE","FORCEATTACKABLE","AUTO_RALLYPOINT","CAN_CAPTURE","POWERED","PRODUCED_AT_HELIPAD","DRONE","CAN_SEE_THROUGH_STRUCTURE","BALLISTIC_MISSILE","CLICK_THROUGH","SUPPLY_SOURCE_ON_PREVIEW","PARACHUTE","GARRISONABLE_UNTIL_DESTROYED",
	"BOAT","IMMUNE_TO_CAPTURE","HULK","CAN_PLACE_MANIPULATOR","SPAWNS_ARE_THE_WEAPONS","CANNOT_BUILD_NEAR_SUPPLIES","SUPPLY_SOURCE","REVEAL_TO_ALL","DISGUISER","INERT","HERO","IGNORES_SELECT_ALL","DONT_AUTO_CRUSH_INFANTRY","SIEGE_TOWER","TREE","SHRUB","CLUB","ROCK","THROWN_OBJECT","GRAB_AND_KILL","OPTIMIZED_PROP","ENVIRONMENT","DEFLECT_BY_SPECIAL_POWER","WORKING_PASSENGER","BASE_FOUNDATION","NEED_BASE_FOUNDATION","REACT_WHEN_SELECTED",
	"CAN_BE_CAPTURED","IGNORED_IN_FINDPOSITIONAROUND","HORDE","COMBO_HORDE","NONOCCLUDING","NO_FREEWILL_ENTER","TIBERIUM_FIELD","BEAM_TARGET","BEAM_TARGET_REFLECTOR","TACTICAL_MARKER","PATH_THROUGH_EACH_OTHER","NOTIFY_OF_PREATTACK","GARRISON","MELEE_HORDE","BASE_SITE","INERT_SHROUD_REVEALER","OCL_BIT","SPELL_BOOK","DEPRECATED","PATH_THROUGH_INFANTRY","NO_FORMATION_MOVEMENT","NO_BASE_CAPTURE","ARMY_SUMMARY","CIVILIAN_UNIT","NOT_AUTOACQUIRABLE",
	"KEEP_CLASSIFIED_WHEN_DEAD","CHUNK_VENDOR","ARCHER","MOVE_ONLY","FS_CASH_PRODUCER","ROCK_VENDOR","BLOCKING_GATE","CRANE","SIEGE_LADDER","MINE_TRIGGER","BUFF","GRAB_AND_DROP","PORTER","SCARY","CRITTER_EMITTER","BROADCASTS_INVISIBILITY","CAN_ATTACK_WALLS","IGNORE_FOR_VICTORY","DO_NOT_CLASSIFY","WALL_UPGRADE","ARMY_OF_DEAD","TAINT","BASE_DEFENSE_FOUNDATION","NOT_SELLABLE","WEBBED","WALL_HUB","BUILD_FOR_FREE","IGNORE_FOR_EVA_SPEECH_POSITION",
	"MADE_OF_WOOD","MADE_OF_METAL","MADE_OF_STONE","MADE_OF_DIRT","FACE_AWAY_FROM_CASTLE_KEEP","BANNER","META_HORDE","CAN_REVERSE_MOVE","PASS_EXPERIENCE_TO_SLAVER","HAS_HEALTH_BAR","BIG_MONSTER","DEPLOYED_MINE","CANNOT_RETALIATE","CREEP","TAINTEFFECT","POWERED_POWERS_ONLY","VITAL_FOR_BASE_SURVIVAL","DO_NOT_PICK_ME_WHEN_BUILDING","SUMMONED","HIDE_IF_FOGGED","ALWAYS_SHOW_HOUSE_COLOR","MOVE_FOR_NOONE","WB_DISPLAY_SCRIPT_NAME","CAN_CLIMB_WALLS",
	"NO_SHADOW","LARGE_RECTANGLE_PATHFIND","SUBMARINE","PORT","WALL_SEGMENT","SIMPLE_OBJECT_PROP","SHIP","OPTIMIZED_SOUND","PASS_EXPERIENCE_TO_CONTAINED","DOZER_FACTORY","THREAT_FINDER","ECONOMY_STRUCTURE","LIVING_WORLD_BUILDING_MIRROR","CAN_TOPPLE","NONCOM","CAN_SKIP_SHADOW","SCALEABLE_WALL","SKYBOX","WALL_GATE","CAPTUREFLAG","NEUTRALGOLLUM","PASS_EXPERIENCE_TO_CONTAINER","RESIST_EMP","ORIENTS_TO_CAMERA","NEVER_CULL_FOR_MP",
	"DONT_USE_CANCEL_BUILD_BUTTON","CIVILIAN_BUILDING","HEAVY_MELEE_HITTER","DONT_HIDE_IF_FOGGED","VEHICLE","HARVESTABLE","GRABBABLE","CONSTRUCTION_YARD","CAN_SHOOT_OVER_WALLS","PASS_EXPERIENCE_TO_PRODUCER","EXPANSION_PAD","AMPHIBIOUS","SHOW_BEHIND_OCCLUDERS","FS_MONEY_STORAGE","VALID_TARGET_FOR_C4","UNIQUE_UNIT","SURPRISE_ATTACKER","COVER","INFILTRATOR","BRIDGE_SEGMENT","FS_WAR_FACTORY","FS_BARRACKS","FS_RADAR","FS_AIR_FIELD","FS_TECH_CENTER",
	"TIBERIUM_BASED","TIBERIUM","CAN_ATTACK_STEALTHED","IMMUNE_TO_CYCLONIC_SHOCKWAVE","CANNOT_BE_DETECTED","AUTO_ACQUIRABLE_BY_AI","CRUSHABLE_OBSTACLE","NEUTRAL_TECH","SUPER_WEAPON","HEALED_BY_TIBERIUM","IGNORE_CAN_NOT_BUILD","SKIRMISH_AI_DONT_GARRISON","ASSAULT_AIRCRAFT","BOMBER_AIRCRAFT","ANTI_GARRISON","ENGINEER","EXPANSION_UNIT","OUTPOST","BEACON","HUSK","IGNORE_FORCE_MOVE","LINE_OF_SIGHT_IGNORES_BUILDINGS","MOTHERSHIP","SNIPER",
	"ATTACK_FROM_STRUCTURE_ONLY_WHEN_GARRISONED","SKIP_DEFECT_IF_UNCOMBINED","SKIP_IDLE_WHEN_CAPTURED","BRIDGE_ENDCAP","BRIDGE_GATEHOUSE","CAN_BE_FAVORITE_UNIT","SLAVE_OWNER","MCV","CAN_HEAL_ALLIES","METAUNIT","META_BASE","META_CITY","META_STRIKEFORCE","META_TIBERIUM_NODE","META_ICMUMO","META_ALIEN_TOWER","PROJECT_BUILDABILITY_FOR_ALLIES","AA_STRUCT","NOD_SUPER_STRUCTURE","RELOAD_AIRCRAFT","USE_STRICT_PATHING","CAN_FIRE_EVEN_IF_CONTAINED_ARE_NOT_IN_RANGE","AI_BUZZERS_CANT_ATTACH_TO_ME"
} 

ModelConditionTable={
	"INVALID","TOPPLED","FRONTCRUSHED","BACKCRUSHED","DAMAGED","REALLYDAMAGED","RUBBLE","SPECIAL_DAMAGED","NIGHT","SNOW","PARACHUTING","GARRISONED","ENEMYNEAR","WEAPONSET_VETERAN","WEAPONSET_ELITE","WEAPONSET_HERO","WEAPONSET_PASSENGER_TYPE_ONE","WEAPONSET_PASSENGER_TYPE_TWO","WEAPONSET_PLAYER_UPGRADE","WEAPONSTATE_ONE","WEAPONSTATE_TWO","WEAPONSTATE_THREE","DOOR_1_OPENING","DOOR_1_CLOSING","DOOR_1_WAITING_OPEN","DOOR_1_WAITING_TO_CLOSE",
	"DOOR_2_OPENING","DOOR_2_CLOSING","DOOR_2_WAITING_OPEN","DOOR_2_WAITING_TO_CLOSE","DOOR_3_OPENING","DOOR_3_CLOSING","DOOR_3_WAITING_OPEN","DOOR_3_WAITING_TO_CLOSE","DOOR_4_OPENING","DOOR_4_CLOSING","DOOR_4_WAITING_OPEN","DOOR_4_WAITING_TO_CLOSE","ATTACKING","ATTACKING_STRUCTURE","ATTACKING_POSITION","PREATTACK_A","FIRING_A","FIRING_OR_PREATTACK_A","FIRING_OR_RELOADING_A","BETWEEN_FIRING_SHOTS_A","RELOADING_A","PREATTACK_B","FIRING_B",
	"FIRING_OR_PREATTACK_B","FIRING_OR_RELOADING_B","BETWEEN_FIRING_SHOTS_B","RELOADING_B","PREATTACK_C","FIRING_C","FIRING_OR_PREATTACK_C","FIRING_OR_RELOADING_C","BETWEEN_FIRING_SHOTS_C","RELOADING_C","TURRET_ROTATE","POST_RUBBLE","POST_COLLAPSE","MOVING","DYING","EMOTION_ALERT","EMOTION_AFRAID","EMOTION_TERROR","EMOTION_PANIC","AWAITING_CONSTRUCTION","PARTIALLY_CONSTRUCTED","ACTIVELY_BEING_CONSTRUCTED","UNIT_ACTIVELY_BEING_CONSTRUCTED",
	"PRONE","FREEFALL","ACTIVELY_CONSTRUCTING","CONSTRUCTION_COMPLETE","RADAR_EXTENDING","RADAR_UPGRADED","PANICKING","AFLAME","SMOLDERING","BURNED","DOCKING","DOCKING_BEGINNING","DOCKING_ACTIVE","DOCKING_ENDING","CARRYING","FLOODED","LOADED","PASSENGER","TRANSPORT_MOVING","TRANSPORT_STOPPED","CLUB","JETAFTERBURNER","JETEXHAUST","PACKING","PREPARING","UNPACKING","PACKING_TYPE_1","PACKING_TYPE_2","PACKING_TYPE_3","DEPLOYED","OVER_WATER",
	"POWER_PLANT_UPGRADED","CLIMBING","SOLD","RAPPELLING","ARMED","POWER_PLANT_UPGRADING","BUILD_PLACEMENT_CURSOR","PHANTOM_STRUCTURE","START_CAPTURE","CANCEL_CAPTURE","CAPTURING","MOVING_OUT_OF_THE_WAY","SPECIAL_CHEERING","CONTINUOUS_FIRE_SLOW","CONTINUOUS_FIRE_MEAN","CONTINUOUS_FIRE_FAST","RAISING_FLAG","CAPTURED","EXPLODED_FLAILING","EXPLODED_BOUNCING","SPLATTED","USING_WEAPON_A","USING_WEAPON_B","USING_WEAPON_C","PREORDER","STUNNED_FLAILING",
	"STUNNED","STONED","WANDER","WALKING","CHARGING","TURN_LEFT","TURN_RIGHT","ACCELERATE","DECELERATE","TURN_LEFT_HIGH_SPEED","TURN_RIGHT_HIGH_SPEED","DESTROYED_FRONT","DESTROYED_RIGHT","DESTROYED_BACK","DESTROYED_LEFT","WEAPONSET_GARRISONED","WEAPONLOCK_PRIMARY","WEAPONLOCK_SECONDARY","WEAPONLOCK_TERTIARY","WEAPONLOCK_QUATERNARY","WEAPONLOCK_QUINARY","DEATH_1","DEATH_2","DEATH_3","DEATH_4","DECAY","THROWN_PROJECTILE","ABOUT_TO_HIT","BACKING_UP",
	"ENGAGED","DEFLECT_SPECIAL_POWER","WEAPONSET_CLOSE_RANGE","WEAPONSTATE_CLOSE_RANGE","WEAPONSET_RAMPAGE","RAMPAGE_ANIMATION_ONLY","STUNNED_STANDING_UP","REACT_1","REACT_2","REACT_3","REACT_4","REACT_5","REACT_6","SELECTED","GUARDING","HIT_REACTION","HIT_LEVEL_1","HIT_LEVEL_2","HIT_LEVEL_3","GRAB_BUILDING_CHUNK","DEATH_5","AIM_HIGH","AIM_STRAIGHT","AIM_LOW","AIM_NEAR","AIM_FAR","DIVING","USER_1","USER_2","USER_3","USER_4","USER_5","SWOOPING","BURNT_MODEL",
	"BURNT_TEXTURE","WEAPONSET_CONTESTING_BUILDING","DEBUG","PASSENGER_VARIATION_1","PASSENGER_VARIATION_2","PASSENGER_VARIATION_3","PASSENGER_VARIATION_4","PASSENGER_VARIATION_5","EMOTION_GUNG_HO","EMOTION_LOOK_TO_SKY","EMOTION_CELEBRATING","EMOTION_AMUSED","EMOTION_MORALE_HIGH","EMOTION_MORALE_LOW","EMOTION_COWER","EMOTION_DISSIDENT","USING_SPECIAL_ABILITY","WORLD_BUILDER","SIEGE_CONTAIN","LEVELED","SPECIAL_POWER_1","SPECIAL_POWER_2","SPECIAL_POWER_3","MOUNTED",
	"OATH_FULLFILLED","RESURRECTED","DESTROYED_WEAPON","JUST_BUILT","BASE_BUILD","HERO","RIDER1","RIDER2","RIDER3","RIDER4","RIDER5","RIDER6","RIDER7","RIDER8","WEAPONSET_RIDER1","WEAPONSET_RIDER2","WEAPONSET_RIDER3","WEAPONSET_RIDER4","WEAPONSET_RIDER5","WEAPONSET_RIDER6","WEAPONSET_RIDER7","WEAPONSET_RIDER8","WEAPONSET_SPECIAL_ONE","WEAPONSET_SPECIAL_TWO","WADING","SWIMMING","WEAPONSET_CONTAINED","WEAPONSTATE_CONTAINED","HORDE_EMPTY","SPECIAL_WEAPON_ONE",
	"SPECIAL_WEAPON_TWO","SPECIAL_WEAPON_THREE","WEAPONSET_MOUNTED","EATING","CHANT_FOR_GROND","WEAPONSET_ENRAGED","WEAPONSET_SPECIAL_UPGRADE","RUNNING_OFF_MAP","ATTACHED","PRIMARY_FORMATION","ALTERNATE_FORMATION","HARVEST_PREPARATION","HARVEST_ACTION","SPECIAL_ENEMY_NEAR","HIDDEN","PUTTING_ON_RING","TAKING_OFF_RING","CAPTURE_100","CAPTURE_75","CAPTURE_50","CAPTURE_25","CAPTURE_0","UPGRADE_IVORY_TOWER","UPGRADE_HOUSE_OF_HEALING","UPGRADE_BLANK4","UPGRADE_FORTRESS_MONUMENT",
	"SPECIALPOWER1_READY","SPECIALPOWER2_READY","SPECIALPOWER3_READY","SPECIALPOWER4_READY","SPECIALPOWER5_READY","SPECIALPOWER6_READY","SPECIALPOWER7_READY","SPECIALPOWER8_READY","SPECIALPOWER9_READY","FORTRESS_IMPROVEMENT_1_BUILDING","FORTRESS_IMPROVEMENT_2_BUILDING","FORTRESS_IMPROVEMENT_3_BUILDING","FORTRESS_IMPROVEMENT_4_BUILDING","FORTRESS_IMPROVEMENT_5_BUILDING","FORTRESS_IMPROVEMENT_6_BUILDING","FORTRESS_IMPROVEMENT_7_BUILDING","FORTRESS_IMPROVEMENT_8_BUILDING",
	"FORTRESS_IMPROVEMENT_9_BUILDING","FORTRESS_MONUMENT_CREATURE_AVAILABLE","FORTRESS_MONUMENT_CREATURE_UNAVAILABLE","FORTRESS_MONUMENT_UNDER_CONSTRUCTION","DRILL0","DRILL1","DRILL2","DRILL3","DRILL4","RIDERLESS","DRAFTED","UPGRADED_ARMOR","DISGUISED","WEAPONSET_TOGGLE_1","WEAPONSET_TOGGLE_2","WEAPONSET_TOGGLE_3","WEAPONSET_HERO_MODE","DOCKING_PRE_DOCK","TURRET_ANGLE_0","TURRET_ANGLE_90","TURRET_ANGLE_180","TURRET_ANGLE_270","USING_COMBO_LOCOMOTOR","WAR_CHANT","EMOTION_QUARRELSOME",
	"QUARRELSOME_FIGHTING","UNCONTROLLABLE","INITIAL_ENRAGED","ARMORSET_VETERAN","ARMORSET_ELITE","ARMORSET_HERO","ARMORSET_WEAK_VERSUS_BASEDEFENSES","ARMORSET_ALTERNATE_FORMATION","ARMORSET_MOUNTED","ARMORSET_PLAYER_UPGRADE","ARMORSET_PLAYER_UPGRADE_2","ARMORSET_PLAYER_UPGRADE_3","ARMORSET_UNBESIEGEABLE","EMOTION_TAUNTING","EMOTION_DOOM","EMOTION_POINTING","WEAPON_TOGGLING","INVULNERABLE","MARCHING","UPGRADE_ECONOMY_BONUS","COMING_OUT_OF_FACTORY","DESTROYED_WHILST_BEING_CONSTRUCTED",
	"COLLAPSING","EMOTION_UNCONTROLLABLY_AFRAID","SAIL_FLAPPING","SAIL_BLOWN_RIGHT","SAIL_BLOWN_LEFT","BUILD_VARIATION_ONE","BUILD_VARIATION_TWO","LEASHED_RETURNING","WEAPONSLOTID_01","WEAPONSLOTID_02","WEAPONSLOTID_03","WEAPONSLOTID_04","WEAPONSLOTID_05","DYING_WASMOVING","POPULATION_FULL","POPULATION_SLIGHTLY_LOW","POPULATION_LOW","POPULATION_REALLY_LOW","POPULATION_ZERO","UNREST_FULL","UNREST_SLIGHTLY_LOW","UNREST_LOW","UNREST_REALLY_LOW","UNREST_ZERO","TIBERIUM_FULL","TIBERIUM_SLIGHTLY_LOW",
	"TIBERIUM_LOW","TIBERIUM_REALLY_LOW","TIBERIUM_ZERO","BUILDING_A_METAUNIT","CONSTRUCTING_A_METAUNIT","UNUSED_23","UNUSED_24","UNUSED_25","UNUSED_26","UNUSED_27","UNUSED_28","UNUSED_29","UNUSED_30","UNUSED_31","UNUSED_32","UNUSED_33","UNUSED_34","UNUSED_35","UNUSED_36","UNUSED_37","UNUSED_38","UNUSED_39","UNUSED_40","UNUSED_41","UNUSED_42","UNUSED_43","UNUSED_44","UNUSED_45","UNUSED_46","UNUSED_47","UNUSED_48","UNUSED_49","UNUSED_50","UNUSED_51","UNUSED_52","UNUSED_53","UNUSED_54","UNUSED_55",
	"BASE_TIER_1","BASE_TIER_2","BASE_TIER_3","BASE_POWER","BASE_DEFENSES","BASE_STRATEGIC_BUILDING_1","BASE_STRATEGIC_BUILDING_2","BASE_STRATEGIC_BUILDING_3","BASE_STRATEGIC_BUILDING_4","BASE_STRATEGIC_BUILDING_5","WEAPONSET_UNUSED_WS_01","WEAPONSET_UNUSED_WS_02","WEAPONSET_UNUSED_WS_03","WEAPONSET_UNUSED_WS_04","WEAPONSET_UNUSED_WS_05","WEAPONSET_UNUSED_WS_06","WEAPONSET_UNUSED_WS_07","WEAPONSET_UNUSED_WS_08","WEAPONSET_UNUSED_WS_09","WEAPONSET_UNUSED_WS_10","WEAPONSET_UNUSED_WS_11",
	"WEAPONSET_UNUSED_WS_12","WEAPONSET_UNUSED_WS_13","WEAPONSET_UNUSED_WS_14","WEAPONSET_UNUSED_WS_15","WEAPONSET_UNUSED_WS_16","WEAPONSET_UNUSED_WS_17","WEAPONSET_UNUSED_WS_18","WEAPONSET_UNUSED_WS_19","WEAPONSET_UNUSED_WS_20","WEAPONSET_UNUSED_WS_21","WEAPONSET_UNUSED_WS_22","WEAPONSET_UNUSED_WS_23","WEAPONSET_UNUSED_WS_24","WEAPONSET_UNUSED_WS_25","WEAPONSET_UNUSED_WS_26","WEAPONSET_UNUSED_WS_27","WEAPONSET_UNUSED_WS_28","WEAPONSET_UNUSED_WS_29",
	"WEAPONSET_UNUSED_WS_30","WEAPONSET_UNUSED_WS_31","WEAPONSET_UNUSED_WS_32","FORMATION_PREVIEW","SCALING_WALL","SCALING_WALL_HORDE","ATTACK_MOVING","SWAPPING_TO_WEAPONSET_1","SWAPPING_TO_WEAPONSET_2","SWAPPING_TO_WEAPONSET_3","ARMORSET_UNUSED_01","ARMORSET_UNUSED_02","ARMORSET_UNUSED_03","ARMORSET_UNUSED_04","ARMORSET_UNUSED_05","ARMORSET_UNUSED_06","ARMORSET_UNUSED_07","ARMORSET_UNUSED_08","ARMORSET_UNUSED_09","ARMORSET_UNUSED_10","USER_6","USER_7","USER_8","USER_9","USER_10","USER_11",
	"USER_12","USER_13","USER_14","USER_15","USER_16","USER_17","USER_18","USER_19","USER_20","USER_21","USER_22","USER_23","USER_24","USER_25","USER_26","USER_27","USER_28","USER_29","USER_30","USER_31","USER_32","USER_33","USER_34","USER_35","USER_36","USER_37","USER_38","USER_39","USER_40","USER_41","USER_42","USER_43","USER_44","USER_45","USER_46","USER_47","USER_48","USER_49","USER_50","USER_51","USER_52","USER_53","USER_54","USER_55","USER_56","USER_57","USER_58","USER_59","USER_60","USER_61",
	"USER_62","USER_63","USER_64","USER_65","USER_66","USER_67","USER_68","USER_69","USER_70","USER_71","USER_72","USER_73","USER_74","USER_75","EMOTION_BRACE_FOR_BEING_CRUSHED","PARALYZED","FIRING_D","FIRING_E","BETWEEN_FIRING_SHOTS_D","BETWEEN_FIRING_SHOTS_E","RELOADING_D","RELOADING_E","PREATTACK_D","PREATTACK_E","USING_WEAPON_D","USING_WEAPON_E","FIRING_OR_PREATTACK_D","FIRING_OR_PREATTACK_E","FIRING_OR_RELOADING_D","FIRING_OR_RELOADING_E","BURNINGDEATH","EMOTION_CHEER_FOR_ABOUT_TO_CRUSH",
	"INVISIBLE_STEALTH","INVISIBLE_CAMOUFLAGE","AFFECTED_BY_EMP","UNUSED_EXAMINE_WEAPON_LEFT","UNUSED_EXAMINE_WEAPON_RIGHT","UNUSED_SELECTED_CHEER","UNUSED_IN_CREATION_SCREEN","WEAPONSET_UNUSED_WS_33","WEAPONSET_UNUSED_WS_34","WEAPONSET_UNUSED_WS_35","WEAPONSET_UNUSED_WS_36","WEAPONSET_UNUSED_WS_37","WEAPONSET_UNUSED_WS_38","WEAPONSET_UNUSED_WS_39","WEAPONSET_UNUSED_WS_40","WEAPONSET_UNUSED_WS_41","WEAPONSET_UNUSED_WS_42","WEAPONSET_UNUSED_WS_43","WEAPONSET_UNUSED_WS_44","WEAPONSET_UNUSED_WS_45",
	"WEAPONSET_UNUSED_WS_46","WEAPONSET_UNUSED_WS_47","WEAPONSET_UNUSED_WS_48","WEAPONSET_UNUSED_WS_49","WEAPONSET_UNUSED_WS_50","WEAPONSET_UNUSED_WS_51","WEAPONSET_UNUSED_WS_52","WEAPONSET_UNUSED_WS_53","WEAPONSET_UNUSED_WS_54","WEAPONSET_UNUSED_WS_55","WEAPONSET_UNUSED_WS_56","WEAPONSET_UNUSED_WS_57","WEAPONSET_UNUSED_WS_58","WEAPONSET_UNUSED_WS_59","WEAPONSET_UNUSED_WS_60","WEAPONSET_UNUSED_WS_61","WEAPONSET_UNUSED_WS_62","WEAPONSET_UNUSED_WS_63","WEAPONSET_UNUSED_WS_64","PACKING_TYPE_4","PACKING_TYPE_5",
	"PACKING_TYPE_6","SPECIAL_WEAPON_FOUR","SPECIAL_WEAPON_FIVE","SPECIAL_WEAPON_SIX","INSIDE_GARRISON","TIBERIUM_CRYSTAL_TYPE1","TIBERIUM_CRYSTAL_TYPE2","TIBERIUM_CRYSTAL_TYPE3","TIBERIUM_CRYSTAL_TYPE4","TIBERIUM_CRYSTAL_TYPE5","MARKED_FOR_HUNT_TACTIC","MARKED_FOR_NO_SKIRMISH_RECRUIT","LOCOMOTOR_NORMAL_UPGRADED","LOCOMOTOR_FREEFALL","LOCOMOTOR_WANDER","LOCOMOTOR_PANIC","LOCOMOTOR_TAXIING","LOCOMOTOR_SUPERSONIC","LOCOMOTOR_MOUNTED","LOCOMOTOR_ENRAGED","LOCOMOTOR_SCARED","LOCOMOTOR_CONTAINED","LOCOMOTOR_COMBO",
	"LOCOMOTOR_COMBO2","LOCOMOTOR_COMBO3","LOCOMOTOR_WALL_SCALING","LOCOMOTOR_CHANGING_FIRINGARC","LOCOMOTOR_BURNINGDEATH","SUPPRESSED","MONEY_STORED_AMOUNT_1","MONEY_STORED_AMOUNT_2","MONEY_STORED_AMOUNT_3","MONEY_STORED_AMOUNT_4","PARKINGPLACE_1_DOOR_OPENING","PARKINGPLACE_1_DOOR_OPEN","PARKINGPLACE_1_DOOR_CLOSING","PARKINGPLACE_1_DOOR_CLOSED","PARKINGPLACE_2_DOOR_OPENING","PARKINGPLACE_2_DOOR_OPEN","PARKINGPLACE_2_DOOR_CLOSING","PARKINGPLACE_2_DOOR_CLOSED","PARKINGPLACE_3_DOOR_OPENING",
	"PARKINGPLACE_3_DOOR_OPEN","PARKINGPLACE_3_DOOR_CLOSING","PARKINGPLACE_3_DOOR_CLOSED","PARKINGPLACE_4_DOOR_OPENING","PARKINGPLACE_4_DOOR_OPEN","PARKINGPLACE_4_DOOR_CLOSING","PARKINGPLACE_4_DOOR_CLOSED","VEHICLE_CRUSH_LEFT","VEHICLE_CRUSH_RIGHT","VEHICLE_CRUSH_CENTER","COVER","TIBERIUM_GROWING","HEALTH_PERCENT_0","HEALTH_PERCENT_25","HEALTH_PERCENT_50","HEALTH_PERCENT_75","HEALTH_PERCENT_100","STRUCTURE_UNPACKING","COMBINED_PARENT","COMBINED_CHILD","FLYING","TAKING_OFF","LANDING","UNDERPOWERED","REPAIRING_DISABLED"
}

SpecialPowerNameTable={
	"ALIENTurretBeamSpecialPower","EMPBlast","EMPBlastGetInRange","EmpBurst","EMPGrenadesGetInRange","GDIPredatorRailSpecialPower","ImprovedEMPBlastGetInRange","MetaGameOp_AlienPhaseField","MetaGameOp_AlienPlague","MetaGameOp_AlienPowerPlanetaryBombardment","MetaGameOp_AlienPowerPlanetaryBombardmentWarhead","MetaGameOp_Base_OBTMTA","MetaGameOp_BuildStrikeForce","MetaGameOp_CancelPendingOperation","MetaGameOp_CONSTRUCT_STRATEGIC_BUILDING",
	"MetaGameOp_CONSTRUCT_STRIKE_FORCE_H","MetaGameOp_CONSTRUCT_STRIKE_FORCE_L","MetaGameOp_CONSTRUCT_STRIKE_FORCE_M","MetaGameOp_CONSTRUCT_STRIKE_FORCE_UH","MetaGameOp_CONSTRUCT_STRIKE_FORCE_UL","MetaGameOp_DecommissionBase","MetaGameOp_DecommissionStrikeForce","MetaGameOp_DetailsBase","MetaGameOp_DetailsStrikeForce","MetaGameOp_GDI_FireHawk_Raid","MetaGameOp_GDI_Power_SpecialForces","MetaGameOp_GDI_Refugee_Aid","MetaGameOp_GDICommandoStrike",
	"MetaGameOp_GDIMediaBlitz","MetaGameOp_GDIPowerIonBlast","MetaGameOp_GDIPowerIonBlastWarhead","MetaGameOp_GDIPowerStateOfEmergency","MetaGameOp_GDISkySentry","MetaGameOp_GDISonicAgitation","MetaGameOp_GDIZocomInfiltration","MetaGameOp_InterceptStrikeForce","MetaGameOp_MoveStrikeForce","MetaGameOp_NOD_Fury_Of_Nod","MetaGameOp_Nod_Power_Black_Hand","MetaGameOp_Nod_Power_Friends_Of_Nod","MetaGameOp_Nod_Power_Kane_Lives","MetaGameOp_Nod_Power_Marked_Of_Kane",
	"MetaGameOp_Nod_Power_Stealth_Field","MetaGameOp_NOD_Rise_Insurection","MetaGameOp_NOD_Sabotage","MetaGameOp_NOD_Vertigo_Strike","MetaGameOp_NodPowerNuclearMissile","MetaGameOp_NodPowerNuclearMissileWarhead","MetaGameOp_NodPowerTiberiumProductionSurge","MetaGameOp_NODPowerTraitor","MetaGameOp_RepairBase","MetaGameOp_ResupplyStrikeForce","MetaGameOp_SCRIN_Alien_Dropship","MetaGameOp_SCRIN_BuildTower","MetaGameOp_SCRIN_Eradicate","MetaGameOp_SCRIN_Ichor_Injection",
	"MetaGameOp_SCRIN_Ion_Superstorm","MetaGameOp_SCRIN_Wormhole","MetaGameOp_SCRINPowerRiftGenerator","MetaGameOp_SCRINPowerRiftGeneratorWarhead","MetaGameOp_StrikeForceBuildBase","MetaGameOp_StrikeForcePatrol","MetaGameOp_StrikeForceUpgrade","MetaGameOp_UpgradeBaseDefense","MetaGameOp_UpgradeBasePower","MetaGameOp_UpgradeBaseTier1","MetaGameOp_UpgradeBaseTier2","MetaGameOp_UpgradeBaseTierDone","NODBeamCannonLaserSpecialPower","NodRageGenerator","NODSignatureGenerator",
	"Notify_Base_Airlift","Notify_Base_OBTMTA","Notify_BuildStrikeForce","Notify_CONSTRUCT_STRATEGIC_BUILDING","Notify_CONSTRUCT_STRIKE_FORCE_H","Notify_CONSTRUCT_STRIKE_FORCE_L","Notify_CONSTRUCT_STRIKE_FORCE_M","Notify_CONSTRUCT_STRIKE_FORCE_UH","Notify_CONSTRUCT_STRIKE_FORCE_UL","Notify_FireHawkRaid","Notify_GDIPowerIonBlast","Notify_ICMUMO_Tier1","Notify_MoveStrikeForce","Notify_NukeStrike","Notify_RepairBase","Notify_ResupplyStrikeForce","Notify_StrikeForceBuildBase",
	"Notify_StrikeForceUpgrade","Notify_UpgradeBaseDefense","Notify_UpgradeBaseTier1","Notify_UpgradeBaseTier2","ShadowSquadBeaconGetInRange","SpecialAbilityHarvest","SpecialAbilityStratoFighter","SpecialPower_AlienSeedTiberium","SpecialPower_AlienShockPods","SpecialPower_AOEMindControl","SpecialPower_AvatarBeamCannon","SpecialPower_AvatarCommandeerDestroyBeamCannon","SpecialPower_AvatarCommandeerDestroyBike","SpecialPower_AvatarCommandeerDestroyFlameTank",
	"SpecialPower_AvatarCommandeerDestroyStealthTank","SpecialPower_AvatarCommandeerDispatch","SpecialPower_AvatarCommandeerGetInRange","SpecialPower_AvatarCommandeerGetInRangeBeam","SpecialPower_AvatarCommandeerGetInRangeBike","SpecialPower_AvatarCommandeerGetInRangeFlame","SpecialPower_AvatarCommandeerGetInRangeStealth","SpecialPower_AvatarCommandeerParalyzeBeamCannon","SpecialPower_AvatarCommandeerParalyzeBike","SpecialPower_AvatarCommandeerParalyzeFlameTank",
	"SpecialPower_AvatarCommandeerParalyzeStealthTank","SpecialPower_AvatarFlamer","SpecialPower_AvatarInvisibility","SpecialPower_AvatarStealthDetect","SpecialPower_BattleshipIntroBombard","SpecialPower_BattleshipSpotTargetBombard","SpecialPower_BlackHandConfessorCabalFireGrenade","SpecialPower_BlackHandConfessorCabalGetToGrenadeRange","SpecialPower_BurrowMines","SpecialPower_ChargeDefensesTrigger","SpecialPower_CloakingField","SpecialPower_ConversionBeam",
	"SpecialPower_ConversionBeamUpgraded","SpecialPower_CrystalShield","SpecialPower_CultistMindControl","SpecialPower_CultistMindControlGetInRange","SpecialPower_DecoyTemple","SpecialPower_DeployBunkerTruck","SpecialPower_DeployIonStorm","SpecialPower_DeployIonStormStart","SpecialPower_FireEMPGrenades","SpecialPower_FireOverloadBeamSelfStunWeapon","SpecialPower_GDIBattleshipRemoveLocomotor","SpecialPower_GDICommandoJumpJet_Dispatch","SpecialPower_GliderLand",
	"SpecialPower_GliderLandDispatch","SpecialPower_GliderLandTrigger","SpecialPower_GliderLiftOff","SpecialPower_GliderLiftOffDispatch","SpecialPower_GliderLiftOffTrigger","SpecialPower_GrantPackUpgrade","SpecialPower_GrantUnpackUpgrade","SpecialPower_ImprovedSonicTankOverloadBeam","SpecialPower_JumpJetPlaceSatchelCharge","SpecialPower_JumpJetPlaceSatchelCharge_NOD","SpecialPower_LaserFencing","SpecialPower_LightningSpike","SpecialPower_MagneticMines",
	"SpecialPower_ManipulateObject","SpecialPower_MarkedOfKaneCloakingField","SpecialPower_MechapedeAddDiskModule","SpecialPower_MechapedeAddRazorModule","SpecialPower_MechapedeAddShardModule","SpecialPower_MechapedeAddTioxinModule","SpecialPower_MjolnirStrike","SpecialPower_OverlordsWrath","SpecialPower_PhaseField","SpecialPower_PlaceBoobyTrapAtBridge","SpecialPower_PlaceBoobyTrapAtBuilding","SpecialPower_PlaceBoobyTrapAtHusk","SpecialPower_PlaceBoobyTrapAtTechBuilding",
	"SpecialPower_PlaceBoobyTrapDispatch","SpecialPower_PlaceSatchelCharge","SpecialPower_PlaceSatchelCharge_NOD","SpecialPower_PlaceSatchelChargeSticky_NOD","SpecialPower_PowerSignatureScan","SpecialPower_RailgunAccelerator","SpecialPower_Reaper17TiberiumVibrationScan","SpecialPower_RecallAllAircraft","SpecialPower_Redemption","SpecialPower_ReflectorAttack","SpecialPower_ReturnToDock","SpecialPower_RiftGeneratorWeapon","SpecialPower_SatchelCharge_Dispatch",
	"SpecialPower_SonicRepulsionField","SpecialPower_SpotBeaconBombard","SpecialPower_SpotTargetBombard","SpecialPower_SummonMothership","SpecialPower_SummonTibHive","SpecialPower_SupersonicAirAttack","SpecialPower_Swarm","SpecialPower_TargetedRepairVehicle","SpecialPower_TeleportEradicator","SpecialPower_TemporalWormhole","SpecialPower_TiberiumVibrationScan","SpecialPower_Traveler59WormHole","SpecialPower_UseBlinkPack","SpecialPower_UseTiberiumAgitation",
	"SpecialPower_UseTraveler59BlinkPack","SpecialPower_WormHole","SpecialPowerAirDispersion","SpecialPowerAlienRepairDrones","SpecialPowerBombingRun","SpecialPowerCallAirstrike","SpecialPowerCallAirstrikeSPWashington","SpecialPowerCallForTransportGDI","SpecialPowerCallForTransportNOD","SpecialPowerCallForTransportSteelTalons","SpecialPowerCallForTransportZOCOM","SpecialPowerCallSupportBloodhound","SpecialPowerCallSupportGDIAirborne","SpecialPowerCallSupportHunterKillerTeam",
	"SpecialPowerCallSupportSTBloodhound","SpecialPowerCallSupportZOCOMAirborne","SpecialPowerCallSupportZOCOMBloodhound","SpecialPowerCallSupportZOCOMHunterKillerTeam","SpecialPowerCaptureControlPoint","SpecialPowerCloneObjectSelect","SpecialPowerCloneObjectSpawn","SpecialPowerCombineWithUnit","SpecialPowerComputerCounterMeasures","SpecialPowerDecoyNuclearMissileTimer","SpecialPowerDeployBeacon","SpecialPowerDisguise","SpecialPowerDispatchRadarJammingMissile",
	"SpecialPowerDisruptionPod_Dispatch","SpecialPowerDisruptionPod_Targeted","SpecialPowerDisruptionPod_UnTargeted","SpecialPowerDummyTriggered1","SpecialPowerDummyTriggered2","SpecialPowerDummyTriggered3","SpecialPowerEMPControlCenter","SpecialPowerGDI_APCMinefield","SpecialPowerGDI_SpaceCommandDropPods","SpecialPowerGDI_SpaceCommandShockwaveArtillery","SpecialPowerGDINuclearMissile","SpecialPowerGetToJumpJetRange","SpecialPowerInfantryDigIn","SpecialPowerInfantryDigInTrigger",
	"SpecialPowerIonCannonControlIonCannon","SpecialPowerIonCannonControlIonCannon_2_1","SpecialPowerJumpJetDispatch","SpecialPowerJumpJetHordeTrigger","SpecialPowerLaunchCatalystMissile","SpecialPowerMastermindTeleportObject","SpecialPowerMastermindTeleportObjectSelect","SpecialPowerMoveToPositionAndEvacuate","SpecialPowerNuclearMissile","SpecialPowerProdigyTeleportObject","SpecialPowerProdigyTeleportObjectSelect","SpecialPowerPulseScan","SpecialPowerRadarJamMissile",
	"SpecialPowerRadarScan","SpecialPowerRedShadowStrikeTeam","SpecialPowerReturnToProducer","SpecialPowerSeedTiberium","SpecialPowerSensorPod_Dispatch","SpecialPowerSensorPod_Targeted","SpecialPowerSensorPod_UnTargeted","SpecialPowerTibVeinDetonation","SpecialPowerTriggerJumpJets","SpecialPowerUncombineWithUnit","SpecialPowerZOCOM_SpaceCommandRaiderPods","SpecialPowerZOCOMBombingRun","SteelTalonsAdaptiveArmor","TiberiumAgitationGetInRange"
}

UpgradeNameTable={
	"BasePurchasableUpgrade","InfantryCaptureBuilding","Upgrade_AdaptiveArmor","Upgrade_AlienBlueShardWeapon","Upgrade_AlienFaction","Upgrade_AlienMinorForcefieldGenerator","Upgrade_AlienReactorForcefieldGenerator","Upgrade_AlienShardLaunchers","Upgrade_AlienShockTrooperBlinkPack","Upgrade_AlienShockTrooperPlasmaDiskLauncher","Upgrade_AllFactionUpgrade","Upgrade_AllowStratBuilding1","Upgrade_AllowStratBuilding2","Upgrade_AllowStratBuilding3","Upgrade_AllowStratBuilding4",
	"Upgrade_AllowStratBuilding5","Upgrade_AvatarBeamCannon","Upgrade_AvatarFlamer","Upgrade_AvatarInvisibility","Upgrade_AvatarStealthDetect","Upgrade_Base_Airlift","Upgrade_BlackHandBlackDisciplesUpgrade","Upgrade_BlackHandFaction","Upgrade_BlackHandLiquidTiberiumCore","Upgrade_BlackHandSecretShrinePurifyingFlame","Upgrade_CallSupportUpgrade","Upgrade_CallSupportZOCOMUpgrade","Upgrade_CeramicArmor","Upgrade_CloakingFieldInvisibility","Upgrade_DeployNODBunkerTruck",
	"Upgrade_EasyAIMultiPlayer","Upgrade_EasyAISinglePlayer","Upgrade_EMPGrenades","Upgrade_EradicatorDiscsFront","Upgrade_EradicatorDiscsMiddle","Upgrade_EradicatorDiscsRear","Upgrade_EradicatorHealingFront","Upgrade_EradicatorHealingMiddle","Upgrade_EradicatorHealingRear","Upgrade_EradicatorLaserFront","Upgrade_EradicatorLaserMiddle","Upgrade_EradicatorLaserRear","Upgrade_EradicatorShardsFront","Upgrade_EradicatorShardsMiddle","Upgrade_EradicatorShardsRear","Upgrade_EradicatorTeleportFront",
	"Upgrade_EradicatorTeleportMiddle","Upgrade_EradicatorTeleportRear","Upgrade_FirehawkStratofighterBooster","Upgrade_FortifyBuilding","Upgrade_FusionCore","Upgrade_GDIAPAmmo","Upgrade_GDIArmoryPitbullMortar","Upgrade_GDIArmoryRailgunTech","Upgrade_GDICompositeArmor","Upgrade_GDIFaction","Upgrade_GDIHardpoints","Upgrade_GDITungstenAAShells","Upgrade_HardAIMultiPlayer","Upgrade_HardAISinglePlayer","Upgrade_ICMUMO_TIER1","Upgrade_ICMUMO_TIER2","Upgrade_ICMUMO_TIER3",
	"Upgrade_LaserFencing","Upgrade_MarkedOfKaneCyberneticLegs","Upgrade_MarkedOfKaneFaction","Upgrade_MarkedOfKaneLiquidTiberiumCore","Upgrade_MarkedOfKaneTechCenterSuperChargedParticleBeam","Upgrade_MARVEngineerFrontLeft","Upgrade_MARVEngineerFrontRight","Upgrade_MARVEngineerRearLeft","Upgrade_MARVEngineerRearRight","Upgrade_MARVGrenadeSoldierSquadFrontLeft","Upgrade_MARVGrenadeSoldierSquadFrontRight","Upgrade_MARVGrenadeSoldierSquadRearLeft","Upgrade_MARVGrenadeSoldierSquadRearRight",
	"Upgrade_MARVMissileSquadFrontLeft","Upgrade_MARVMissileSquadFrontRight","Upgrade_MARVMissileSquadRearLeft","Upgrade_MARVMissileSquadRearRight","Upgrade_MARVRifleSquadFrontLeft","Upgrade_MARVRifleSquadFrontRight","Upgrade_MARVRifleSquadRearLeft","Upgrade_MARVRifleSquadRearRight","Upgrade_MARVSniperSquadFrontLeft","Upgrade_MARVSniperSquadFrontRight","Upgrade_MARVSniperSquadRearLeft","Upgrade_MARVSniperSquadRearRight","Upgrade_MARVZoneRaiderSquadFrontLeft","Upgrade_MARVZoneRaiderSquadFrontRight",
	"Upgrade_MARVZoneRaiderSquadRearLeft","Upgrade_MARVZoneRaiderSquadRearRight","Upgrade_MARVZoneTrooperSquadFrontLeft","Upgrade_MARVZoneTrooperSquadFrontRight","Upgrade_MARVZoneTrooperSquadRearLeft","Upgrade_MARVZoneTrooperSquadRearRight","Upgrade_MechapedeDiskWeapon","Upgrade_MechapedeRazorWeapon","Upgrade_MechapedeShardWeapon","Upgrade_MechapedeTioxinWeapon","Upgrade_MediumAIMultiPlayer","Upgrade_MediumAISinglePlayer","Upgrade_MetaBaseDefenses","Upgrade_MetaBaseStratBuilding1",
	"Upgrade_MetaBaseStratBuilding2","Upgrade_MetaBaseStratBuilding3","Upgrade_MetaBaseStratBuilding4","Upgrade_MetaBaseStratBuilding5","Upgrade_MetaBaseTier2","Upgrade_MetaBaseTier3","Upgrade_MissleSolderArmor","Upgrade_MOKDisguise","Upgrade_MotherShipBuilt","Upgrade_MultifunctionUpgradeCenterArmor","Upgrade_MultifunctionUpgradeCenterDamage","Upgrade_MultifunctionUpgradeCenterSpeed","Upgrade_NODConfessorUpgrade","Upgrade_NODDozerBlades","Upgrade_NODEmpBurst","Upgrade_NODFaction",
	"Upgrade_NODLiquidTiberiumCore","Upgrade_NODQuadTurrets","Upgrade_NodRedShadowSquadVeterancy","Upgrade_NODSignatureGenerator","Upgrade_NodTechCenterChargedParticleBeam","Upgrade_NODTechCenterLaserCapacitor","Upgrade_NODTechCenterTibCoreMissiles","Upgrade_NoSpawnUponDestruction","Upgrade_ObjectDefault","Upgrade_Orca_Locomotor","Upgrade_OrcaEchoCannon","Upgrade_OrcaSensorPod","Upgrade_Pack","Upgrade_PowerPlantTurbine","Upgrade_ProductionVeterancy_ELITE","Upgrade_ProductionVeterancy_HEROIC",
	"Upgrade_ProductionVeterancy_VETERAN","Upgrade_Reaper17ConversionReserves","Upgrade_Reaper17Faction","Upgrade_Reaper17FusionCore","Upgrade_Reaper17MinorForcefieldGenerator","Upgrade_Reaper17ReactorForcefieldGenerator","Upgrade_RedeemerFlameThrowerLeft","Upgrade_RedeemerFlameThrowerRight","Upgrade_RedeemerHvyMachineGunLeft","Upgrade_RedeemerHvyMachineGunRight","Upgrade_RedeemerRegenModuleLeft","Upgrade_RedeemerRegenModuleRight","Upgrade_RedeemerRocketPodLeft","Upgrade_RedeemerRocketPodRight",
	"Upgrade_RedeemerTibTrooperLeft","Upgrade_RedeemerTibTrooperRight","Upgrade_ResupplyStrikeForce","Upgrade_SelectLoad_01","Upgrade_SelectLoad_02","Upgrade_SelectLoad_03","Upgrade_SelectLoad_04","Upgrade_SonicRepulsionField","Upgrade_SteelTalonsFaction","Upgrade_SteelTalonsPowerPlantTurbine","Upgrade_Strike_Force","Upgrade_StructureLevel1","Upgrade_StructureLevel2","Upgrade_StructureLevel3","Upgrade_TestBuilding","Upgrade_TestBuilding2","Upgrade_TiberiumInfusion","Upgrade_Traveler59AdvancedArticulators",
	"Upgrade_Traveler59Faction","Upgrade_Traveler59FusionCore","Upgrade_Traveler59ShockTrooperBlinkPack","Upgrade_TravelerEngines","Upgrade_UnPack","Upgrade_UseEmptyCommandSet","Upgrade_VertigoDisruptionPod","Upgrade_Veterancy_ELITE","Upgrade_Veterancy_HEROIC","Upgrade_Veterancy_VETERAN","Upgrade_WormholeMove","Upgrade_ZOCOMFaction","Upgrade_ZOCOMFieldSuits","Upgrade_ZOCOMPowerPlantTurbine","Upgrade_ZoneRaiderAutoInjectors","Upgrade_ZoneRaiderScannerPack","Upgrade_ZoneTrooperAutoInjectors","Upgrade_ZoneTrooperScannerPack"
} 

ObjectPanelFlagsTable={
	"AI Recruitable","Enabled","Indestructible","Player Targetable","Powered","Selectable","Unsellable"
} 

CommandButtonTable={
	"Command_ActivateAdaptiveArmor","Command_AlienAssaultCarrierDeployIonStorm","Command_AlienAssaultCarrierDeployIonStormStart","Command_AlienBlinkMastermindAOEMindControl","Command_AlienMastermindManipulatorDevice","Command_AlienMastermindSelectObjectsForTeleport","Command_AlienMastermindTeleportObjects","Command_AlienMechapedeAddDiskModule","Command_AlienMechapedeAddRazorModule","Command_AlienMechapedeAddShardModule","Command_AlienMechapedeAddTioxinModule","Command_AlienProdigyManipulatorDevice","Command_AlienRecallAllAircraft","Command_AlienRepairDrones","Command_AlienSeedTiberium","Command_AlienShockPods","Command_AlienSummonTibHive",
	"Command_APCMinefield","Command_AttackMove","Command_AvatarCommandeerDispatch","Command_AvatarCommandeerGetInRange","Command_AvatarCommandeerParalyzeBeamCannon","Command_AvatarCommandeerParalyzeBike","Command_AvatarCommandeerParalyzeFlameTank","Command_AvatarCommandeerParalyzeStealthTank","Command_BattleshipBombard","Command_BattleshipBombardFORINTRO","Command_BlackHandBlackDisciplesUpgrade","Command_BlackHandConfessorCabalFireGrenade","Command_BlackHandConfessorCabalSquadFireGrenade","Command_BlackHandUpgradeLiquidTiberiumCore","Command_CallSupportBloodhound","Command_CallSupportGDIAirborne","Command_CallSupportHunterKillerTeam",
	"Command_CallSupportSTBloodhound","Command_CallSupportZOCOMAirborne","Command_CallSupportZOCOMBloodhound","Command_CallSupportZOCOMHunterKillerTeam","Command_CancelUnitCreate","Command_CancelUpgradeCreate","COmmand_CaptureBuilding","Command_CaptureControlPoint","Command_ChargeDefenses","Command_ChemicalPlantTibVeinDetonation","Command_CloakingField","Command_CombineWithUnit","Command_CommandoFireJumpJets","Command_CommandoPlaceSatchelCharge","Command_CommandoPlaceSatchelCharge_Dispatch","Command_CommandPostBombingRun","Command_CommandPostCallAirborne","Command_CommandPostCallBloodhound","Command_CommandPostCallHunterKiller",
	"Command_CommandPostCallSTBloodhound","Command_CommandPostCallZOCOMAirborne","Command_CommandPostCallZOCOMBloodhound","Command_CommandPostCallZOCOMHunterKiller","Command_CommandPostRadarScan","Command_ComputerCounterMeasures","Command_Construct_BlackHandCrane","Command_Construct_BlackHandDropZone","Command_Construct_BlackHandEmissary","Command_Construct_BlackHandHandOfNod","Command_Construct_BlackHandHangar","Command_Construct_BlackHandLaserCannon","Command_Construct_BlackHandObeliskOfLight","Command_Construct_BlackHandOperationsCenter","Command_Construct_BlackHandPowerPlant","Command_Construct_BlackHandPropagandaTower",
	"Command_Construct_BlackHandRefinery","Command_Construct_BlackHandRocketBunker","Command_Construct_BlackHandSecretShrine","Command_Construct_BlackHandShredderTurretHub","Command_Construct_BlackHandTechAssemblyPlant","Command_Construct_BlackHandTempleOfNOD","Command_Construct_BlackHandTiberiumLiquidationFacility","Command_Construct_BlackHandTiberiumSilo","Command_Construct_MarkedOfKaneAirSupport","Command_Construct_MarkedOfKaneBarracks","Command_Construct_MarkedOfKaneCrane","Command_Construct_MarkedOfKaneDisruptionTower","Command_Construct_MarkedOfKaneDropZone","Command_Construct_MarkedOfKaneEmissary","Command_Construct_MarkedOfKaneHangar",
	"Command_Construct_MarkedOfKaneLaserCannon","Command_Construct_MarkedOfKaneObeliskOfLight","Command_Construct_MarkedOfKaneOperationsCenter","Command_Construct_MarkedOfKanePowerPlant","Command_Construct_MarkedOfKanePropagandaTower","Command_Construct_MarkedOfKaneRefinery","Command_Construct_MarkedOfKaneRocketBunker","Command_Construct_MarkedOfKaneSecretShrine","Command_Construct_MarkedOfKaneShredderTurretHub","Command_Construct_MarkedOfKaneTechAssemblyPlant","Command_Construct_MarkedOfKaneTempleOfNOD","Command_Construct_MarkedOfKaneTiberiumLiquidationFacility","Command_Construct_MarkedOfKaneTiberiumSilo","Command_CONSTRUCT_STRATEGIC_BUILDING",
	"Command_ConstructAlienAnnihilatorTripod","Command_ConstructAlienAssimilator","Command_ConstructAlienBlinkMastermind","Command_ConstructAlienBuzzerHive","Command_ConstructAlienBuzzers","Command_ConstructAlienControlCenter","Command_ConstructAlienCorrupter","Command_ConstructAlienCustomizableVehicle","Command_ConstructAlienDevastatorWarship","Command_ConstructAlienDevourerTank","Command_ConstructAlienExplorer","Command_ConstructAlienFoundry","Command_ConstructAlienGateway","Command_ConstructAlienGunWalker","Command_ConstructAlienHarvester","Command_ConstructAlienMastermind","Command_ConstructAlienMCV","Command_ConstructAlienMetaHive",
	"Command_ConstructAlienMetaUnit","Command_ConstructAlienPhotonCannon","Command_ConstructAlienPlanetaryAssaultCarrier","Command_ConstructAlienPlasmaMissileBattery","Command_ConstructAlienPortal","Command_ConstructAlienPowerProjector","Command_ConstructAlienRazorDroneSquad","Command_ConstructAlienReactor","Command_ConstructAlienRiftGenerator","Command_ConstructAlienSeekerTank","Command_ConstructAlienShockTrooperSquad","Command_ConstructAlienSignalTransmitter","Command_ConstructAlienSporePod","Command_FireTiberiumAgitation","Command_ConstructAlienStalkerSquad","Command_ConstructAlienStatisChamber","Command_ConstructAlienStormColumn",
	"Command_ConstructAlienStormRider","Command_ConstructAlienTiberiumTower","Command_ConstructAlienWarpBeacon","Command_ConstructBlackHandAttackBike","Command_ConstructBlackHandBeamCannon","Command_ConstructBlackHandBlackHandSquad","Command_ConstructBlackHandBunkerTruck","Command_ConstructBlackHandCommando","Command_ConstructBlackHandConfessorSquad","Command_ConstructBlackHandCustomWarmech","Command_ConstructBlackHandFanaticSquad","Command_ConstructBlackHandFlameTank","Command_ConstructBlackHandHarvester","Command_ConstructBlackHandMCV","Command_ConstructBlackHandMetaUnit","Command_ConstructBlackHandMilitantRocketSquad",
	"Command_ConstructBlackHandMilitantSquad","Command_ConstructBlackHandMobileArtillery","Command_ConstructBlackHandRaiderTank","Command_ConstructBlackHandSaboteur","Command_ConstructBlackHandScorpionBuggy","Command_ConstructBlackHandStealthTank","Command_ConstructBlackHandVenom","Command_ConstructBlackHandWarMechFacility","Command_ConstructGDIAABattery","Command_ConstructGDIAAScout","Command_ConstructGDIAirSupport","Command_ConstructGDIAirTower","Command_ConstructGDIAPC","Command_ConstructGDIArmory","Command_ConstructGDIBarracks","Command_GDICommandoPlaceSatchelCharge","Command_ConstructGDICommando","Command_ConstructGDICommandPost",
	"Command_ConstructGDICrane","Command_ConstructGDIEngineer","Command_ConstructGDIFireHawk","Command_ConstructGDIGolumCannon","Command_FireEMPGrenades","Command_ConstructGDIGrenadeSoldierSquad","Command_ConstructGDIHammerhead","Command_ConstructGDIHarvester","Command_ConstructGDIIonCannonControl","Command_ConstructGDIJuggernaught","Command_ConstructGDIMammoth","Command_ConstructGDIMarv","Command_ConstructGDIMCV","Command_ConstructGDIMedicalCenter","Command_ConstructGDIMissileSoldierSquad","Command_ConstructGDIOrca","Command_ConstructGDIPitbull","Command_ConstructGDIPowerPlant","Command_ConstructGDIPredator","Command_ConstructGDIReclamatorHub",
	"Command_ConstructGDIRefinery","Command_GDIDigIn","Command_ConstructGDIRifleSoldierSquad","Command_ConstructGDIRig","Command_ConstructGDISniperSquad","Command_ConstructGDISonicTank","Command_ConstructGDISpaceCommandUplink","Command_ConstructGDISurveyor","Command_ConstructGDITerraformingStation","Command_ConstructGDITiberiumSilo","Command_ConstructGDIWallHub","Command_ConstructGDIWarfactory","Command_ConstructGDIWatchTower","Command_ZoneTrooperSquadFireJumpJets","Command_ConstructGDIZoneTrooperSquad","Command_ConstructMarkedOfKaneAttackBike","Command_ConstructMarkedOfKaneAvatar","Command_ConstructMarkedOfKaneBeamCannon",
	"Command_ConstructMarkedOfKaneBunkerTruck","Command_ConstructMarkedOfKaneCommando","Command_ConstructMarkedOfKaneFanaticSquad","Command_ConstructMarkedOfKaneHarvester","Command_NODEMPBlast","Command_ConstructMarkedOfKaneImprovedCyborgInfantrySquad","Command_ConstructMarkedOfKaneMCV","Command_ConstructMarkedOfKaneMetaUnit","Command_ConstructMarkedOfKaneMilitantRocketSquad","Command_ConstructMarkedOfKaneMilitantSquad","Command_ConstructMarkedOfKaneMobileArtillery","Command_ConstructMarkedOfKaneRaiderTank","Command_ConstructMarkedOfKaneSaboteur","Command_ConstructMarkedOfKaneScorpionBuggy","Command_NODShadowSquadDeployBeacon",
	"Command_ConstructMarkedOfKaneShadowSquad","Command_ConstructMarkedOfKaneStealthTank","Command_ConstructMarkedOfKaneTibTrooperSquad","Command_ConstructMarkedOfKaneVenom","Command_ConstructMarkedOfKaneVertigo","Command_ConstructMarkedOfKaneWarMechFacility","Command_ConstructMOKCyborgInfantrySquad","Command_ConstructMutantMarauderSquad","Command_ConstructNODAirSupport","Command_ConstructNODAttackBike","Command_ConstructNODAvatar","Command_ConstructNODBeamCannon","Command_ConstructNODBlackHandSquad","Command_ConstructNODBunkerTruck","Command_ConstructNODCommando","Command_ConstructNODCyborgInfantrySquad","Command_ConstructNODEmissary",
	"Command_ConstructNODFanaticSquad","Command_ConstructNODFlameTank","Command_ConstructNODHarvester","Command_ConstructNODMCV","Command_ConstructNODMetaUnit","Command_ConstructNODMilitantRocketSquad","Command_ConstructNODMilitantSquad","Command_ConstructNODMobileArtillery","Command_ConstructNODRaiderTank","Command_ConstructNODSaboteur","Command_ConstructNODScorpionBuggy","Command_ConstructNODShadowSquad","Command_ConstructNODStealthTank","Command_ConstructNODVenom","Command_ConstructNODVertigo","Command_ConstructNODWarMechFacility","Command_ConstructReaper17AnnihilatorTripod","Command_ConstructReaper17BuzzerHive","Command_ConstructReaper17ControlCenter",
	"Command_ConstructReaper17Corrupter","Command_ConstructReaper17CustomizableVehicle","Command_ConstructReaper17DevourerTank","Command_ConstructReaper17Explorer","Command_ConstructReaper17Foundry","Command_ConstructReaper17Gateway","Command_ConstructReaper17GrowthStimulator","Command_ConstructReaper17Harvester","Command_ConstructReaper17MCV","Command_ConstructReaper17MetaHive","Command_ConstructReaper17MetaUnit","Command_ConstructReaper17PhotonCannon","Command_ConstructReaper17PlasmaMissileBattery","Command_ConstructReaper17Portal","Command_ConstructReaper17PowerProjector","Command_ConstructReaper17Reactor","Command_ConstructReaper17RiftGenerator",
	"Command_ConstructReaper17SeekerTank","Command_ConstructReaper17ShardWalker","Command_ConstructReaper17ShockTrooperSquad","Command_ConstructReaper17SignalTransmitter","Command_ConstructReaper17StalkerSquad","Command_ConstructReaper17StasisChamber","Command_ConstructReaper17StormColumn","Command_ConstructReaper17StormRider","Command_ConstructReaper17TiberiumTower","Command_ConstructReaper17WarpBeacon","Command_ConstructScrinTiberiumHive","Command_ConstructSteelTalonsAABattery","Command_ConstructSteelTalonsAAScout","Command_ConstructSteelTalonsAirSupport","Command_ConstructSteelTalonsAirTower","Command_ConstructSteelTalonsBarracks",
	"Command_ConstructSteelTalonsBehemoth","Command_ConstructSteelTalonsCombatEngineer","Command_ConstructSteelTalonsCommandPost","Command_ConstructSteelTalonsCrane","Command_ConstructSteelTalonsFireHawk","Command_ConstructSteelTalonsGolumCannon","Command_ConstructSteelTalonsGrenadeSoldierSquad","Command_ConstructSteelTalonsHammerhead","Command_ConstructSteelTalonsHeavyHarvester","Command_FireOverloadBeamSelfStunWeapon","Command_ConstructSteelTalonsImprovedSonicTank","Command_ConstructSteelTalonsIonCannonControl","Command_ConstructSteelTalonsMammoth","Command_ConstructSteelTalonsMARV","Command_ConstructSteelTalonsMCV",
	"Command_ConstructSteelTalonsMissileSoldierSquad","Command_ConstructSteelTalonsOrca","Command_ConstructSteelTalonsPitbull","Command_ConstructSteelTalonsPowerPlant","Command_ConstructSteelTalonsPredator","Command_ConstructSteelTalonsReclamatorHub","Command_ConstructSteelTalonsRefinery","Command_ConstructSteelTalonsRepairAPC","Command_ConstructSteelTalonsRifleSoldierSquad","Command_ConstructSteelTalonsRig","Command_ConstructSteelTalonsSpaceCommandUplink","Command_ConstructSteelTalonsSurveyor","Command_ConstructSteelTalonsTechCenter","Command_ConstructSteelTalonsTerraformingStation","Command_ConstructSteelTalonsTiberiumSilo",
	"Command_ConstructSteelTalonsTitan","Command_ConstructSteelTalonsWarfactory","Command_ConstructSteelTalonsWatchTower","Command_ConstructSteelTalonsWolverine","Command_ConstructSteelTalonsZoneTrooperSquad","Command_ConstructTraveler59AnnihilatorTripod","Command_ConstructTraveler59Assimilator","Command_ConstructTraveler59BlinkMastermind","Command_ConstructTraveler59BuzzerHive","Command_ConstructTraveler59ControlCenter","Command_ConstructTraveler59Corrupter","Command_ConstructTraveler59CultistSquad","Command_ConstructTraveler59CustomizableVehicle","Command_ConstructTraveler59DevastatorWarship","Command_ConstructTraveler59Explorer",
	"Command_ConstructTraveler59Foundry","Command_ConstructTraveler59Gateway","Command_ConstructTraveler59GunWalker","Command_ConstructTraveler59Harvester","Command_ConstructTraveler59MCV","Command_ConstructTraveler59MetaHive","Command_ConstructTraveler59MetaUnit","Command_ConstructTraveler59PhotonCannon","Command_ConstructTraveler59PlanetaryAssaultCarrier","Command_ConstructTraveler59PlasmaMissileBattery","Command_ConstructTraveler59Portal","Command_ConstructTraveler59PowerProjector","Command_ConstructTraveler59RazorDroneSquad","Command_ConstructTraveler59Reactor","Command_ConstructTraveler59RiftGenerator","Command_ConstructTraveler59SeekerTank",
	"Command_ConstructTraveler59ShockTrooperSquad","Command_ConstructTraveler59SignalTransmitter","Command_ConstructTraveler59SporePod","Command_ConstructTraveler59StalkerSquad","Command_ConstructTraveler59StatisChamber","Command_ConstructTraveler59StormColumn","Command_ConstructTraveler59StormRider","Command_ConstructTraveler59TiberiumTower","Command_ConstructTraveler59WarpBeacon","Command_ConstructZOCOMAABattery","Command_ConstructZOCOMAAScout","Command_ConstructZOCOMAirSupport","Command_ConstructZOCOMAirTower","Command_ConstructZOCOMAPC","Command_ConstructZOCOMArmory","Command_ConstructZOCOMBarracks","Command_ConstructZOCOMCommando",
	"Command_ConstructZOCOMCommandPost","Command_ConstructZOCOMCrane","Command_ConstructZOCOMEngineer","Command_ConstructZOCOMFireHawk","Command_ConstructZOCOMGolumCannon","Command_ConstructZOCOMGrenadeSoldierSquad","Command_ConstructZOCOMHammerhead","Command_ConstructZOCOMHarvester","Command_ConstructZOCOMImprovedSonicTank","Command_ConstructZOCOMIonCannonControl","Command_ConstructZOCOMJuggernaught","Command_ConstructZOCOMMammoth","Command_ConstructZOCOMMARV","Command_ConstructZOCOMMCV","Command_ConstructZOCOMMedicalCenter","Command_ConstructZOCOMMissileSoldierSquad","Command_ConstructZOCOMOrca","Command_ConstructZOCOMPitbull",
	"Command_ConstructZOCOMPowerPlant","Command_ConstructZOCOMPredator","Command_ConstructZOCOMReclamatorHub","Command_ConstructZOCOMRefinery","Command_ConstructZOCOMRifleSoldierSquad","Command_ConstructZOCOMRig","Command_ConstructZOCOMSniperSquad","Command_ConstructZOCOMSonicTank","Command_ConstructZOCOMSpaceCommandUplink","Command_ConstructZOCOMSurveyor","Command_ConstructZOCOMTerraformingStation","Command_ConstructZOCOMTiberiumSilo","Command_ConstructZOCOMWarFactory","Command_ConstructZOCOMWatchTower","Command_ConstructZOCOMZoneRaiderSquad","Command_CultistMindControlGetInRange","Command_DevourerTankConversionBeam","Command_EMPControlCenterEMP",
	"Command_EMPGrenadesGetInRange","Command_Evacuate","Command_ExitGarrison","Command_FireEmpBurst","Command_FireImprovedSonicTankOverloadBeam","Command_FireRadarJammingMissile","Command_FireRageGenerator","Command_FortifyBuilding","Command_GDI_BeginWallSpan","Command_GDI_FireHawkStratoFighterAbility","Command_GDI_SpaceCommandDropPods","Command_GDI_SpaceCommandShockwaveArtillery","Command_GDIBattleship_RemoveLocomotor","Command_GDICallAirstrike","Command_GDICallForTransportInfantry","Command_GDICallForTransportVehicle","Command_GDIDigInTrigger","Command_GDIIonCannonControlFireIonCannon","Command_GDIRecallAllAircraft","Command_HarvesterReturnToExtractor",
	"Command_HarvesterReturnToRefinery","Command_IonCannonSuperweapon","Command_LaunchCatalystMissile","Command_LightningSpike","Command_MarkedOfKaneCloakingField","Command_MarkedOfKaneMagneticMines","Command_MarkedOfKaneUpgradeLiquidTiberiumCore","Command_MetaGame_BaseGarrison","Command_MetaGame_BuildStrikeForce","Command_MetaGame_OBTMTA","Command_MetaGame_Padding","Command_MetaGame_UpgradeBaseDefense","Command_MetaGame_UpgradeBasePower","Command_MetaGame_UpgradeBaseTier1","Command_MetaGame_UpgradeBaseTier2","Command_MetaGame_UpgradeBaseTierDone","Command_MetaGameCancelPendingOperation","Command_MetaGameDecommissionBase","Command_MetaGameDecommissionStrikeForce",
	"Command_MetaGameDetailsBase","Command_MetaGameDetailsStrikeForce","Command_MetaGameRepairBase","Command_MetaGameResupplyStrikeForce","Command_MetaGameStrikeForceBuildBase","Command_MetaGameStrikeForceIntercept","Command_MetaGameStrikeForceMove","Command_MetaGameStrikeForcePatrol","Command_MetaGameStrikeForceUpgrade","Command_MoveToPositionAndEvacuate","Command_MultifunctionUpgradeCenterArmor","Command_MultifunctionUpgradeCenterDamage","Command_MultifunctionUpgradeCenterSpeed","Command_NOD_BeginWallSpan","Command_NOD_BuildBarracks","Command_NOD_BuildCrane","Command_NOD_BuildDisruptionTower","Command_NOD_BuildDropZone","Command_NOD_BuildHangar",
	"Command_NOD_BuildLaserCannon","Command_NOD_BuildObeliskOfLight","Command_NOD_BuildOperationsCenter","Command_NOD_BuildPowerPlant","Command_NOD_BuildPropagandaTower","Command_NOD_BuildRefinery","Command_NOD_BuildRocketBunker","Command_NOD_BuildSecretShrine","Command_NOD_BuildShredderTurretHub","Command_NOD_BuildTechAssemblyPlant","Command_NOD_BuildTempleOfNOD","Command_NOD_BuildTiberiumLiquidationFacility","Command_NOD_BuildTiberiumSilo","Command_NOD_BuildWallHub","Command_NODAirDispersion","Command_NODBurrowMines","Command_NodCallForTransportInfantry","Command_NodCallForTransportVehicle","Command_NODConfessorUpgrade","Command_NODEMPBlastGetInRange",
	"Command_NODImprovedEMPBlastGetInRange","Command_NODRecallAllAircraft","Command_NODSaboteurPlaceBoobyTrap","Command_NODSeedTiberium","Command_NodShadow_GliderLand","Command_NodShadow_GliderLiftOff","Command_NodShadow_PlaceExplosiveCharges","Command_NODShadowSquadBeaconGetInRange","Command_NODSignatureGenerator","Command_NODUpgradeLiquidTiberiumCore","Command_OrcaPulseScan","Command_OrcaSensorPod","Command_PackALIENMCV","Command_PackGDIMCV","Command_PackNODMCV","Command_PackRig","Command_PowerSignatureScan","Command_PurchaseUpgradeAdaptiveArmor","Command_PurchaseUpgradeAdvancedArticulators","Command_PurchaseUpgradeAlienShardLaunchers","Command_PurchaseUpgradeBlinkPack",
	"Command_PurchaseUpgradeBlueShardWeapon","Command_PurchaseUpgradeCeramicArmor","Command_PurchaseUpgradeChargedParticleBeam","Command_PurchaseUpgradeConversionReserves","Command_PurchaseUpgradeCyberneticLegs","Command_PurchaseUpgradeDisguise","Command_PurchaseUpgradeEchoCannon","Command_PurchaseUpgradeForcefieldGenerator","Command_PurchaseUpgradeGDIAPAmmo","Command_PurchaseUpgradeGDIHardpoints","Command_PurchaseUpgradeGDITungstenAAShells","Command_PurchaseUpgradeMinorForcefieldGenerator","Command_PurchaseUpgradeNODQuadTurrets","Command_PurchaseUpgradeOrcaSensorPod","Command_PurchaseUpgradePitbullMortar","Command_PurchaseUpgradePlasmaDiskLauncher",
	"Command_PurchaseUpgradePurifyingFlame","Command_PurchaseUpgradeReaper17ForcefieldGenerator","Command_PurchaseUpgradeReaper17MinorForcefieldGenerator","Command_PurchaseUpgradeSTAPAmmo","Command_PurchaseUpgradeStratofighterBooster","Command_PurchaseUpgradeSuperChargedParticleBeam","Command_PurchaseUpgradeTankRailgun","Command_PurchaseUpgradeTankRailgunST","Command_PurchaseUpgradeTibCoreMissiles","Command_PurchaseUpgradeTibCoreMissilesBH","Command_PurchaseUpgradeTiberiumInfusion","Command_PurchaseUpgradeTraveler59BlinkPack","Command_PurchaseUpgradeTravelerEngines","Command_PurchaseUpgradeVertigoDisruptionPod","Command_Reaper17TiberiumVibrationScan","Command_Redemption",
	"Command_RedShadowStrikeTeam","Command_ReflectorAttack","Command_RepairVehicle","Command_ReturnToAirfield","Command_ReturnToGravityStabilizer","Command_ReturnToHangar","Command_RiftGeneratorSuperweapon","Command_SelectLoadout_01","Command_SelectLoadout_02","Command_SelectLoadout_03","Command_SelectLoadout_04","Command_SelectObjectsForClone","Command_SetStanceAggressive","Command_SetStanceGuard","Command_SetStanceHoldFire","Command_SetStanceHoldPosition","Command_SpaceCommandGDIDropPods","Command_SpaceCommandGDIShockwave","Command_SpaceCommandZOCOMRaiderPods","Command_SpawnObjectsForClone","Command_SpecialPowerAlienDropship","Command_SpecialPowerAlienPlague",
	"Command_SpecialPowerAlienRepairDrones","Command_SpecialPowerBlackHand","Command_SpecialPowerBuildTower","Command_SpecialPowerCommandoStrike","Command_SpecialPowerCrystalField","Command_SpecialPowerEradicate","Command_SpecialPowerFireHawkRaid","Command_SpecialPowerFriendsOfNod","Command_SpecialPowerFuryOfNod","Command_SpecialPowerIchorInjection","Command_SpecialPowerIonSuperstorm","Command_SpecialPowerKaneLives","Command_SpecialPowerLaserFencing","Command_SpecialPowerMarkedOfKane","Command_SpecialPowerMediaBlitz","Command_SpecialPowerMetaIonBlast","Command_SpecialPowerMetaNodSabotage","Command_SpecialPowerMetaNuclearMissile","Command_SpecialPowerMetaPhaseField",
	"Command_SpecialPowerMetaRiftGenerator","Command_SpecialPowerMetaWormhole","Command_SpecialPowerMjolnirStrike","Command_SpecialPowerNodTraitor","Command_SpecialPowerOverlordsWrath","Command_SpecialPowerPhaseField","Command_SpecialPowerPlanetaryBombardment","Command_SpecialPowerRailgunAccelerator","Command_SpecialPowerRefugeeAid","Command_SpecialPowerRise_Insurection","Command_SpecialPowerSkySentry","Command_SpecialPowerSonicAgitation","Command_SpecialPowerSonicRepulsionField","Command_SpecialPowerSpecialForces","Command_SpecialPowerStateOfEmergency","Command_SpecialPowerStealthField","Command_SpecialPowerSupersonicAirAttack","Command_SpecialPowerSwarm",
	"Command_SpecialPowerTemporalWormhole","Command_SpecialPowerTiberiumProductionSurge","Command_SpecialPowerVertigoStrike","Command_SpecialPowerZocomInfiltration","Command_SpotBeaconBombard","Command_SpotTargetBombard","Command_SteelTalonsCallForTransportInfantry","Command_SteelTalonsCallForTransportVehicle","Command_Stop","Command_SummonMothership","Command_TeleportEradicator","Command_TempleOfNodNuclearMissile","Command_TiberiumFacilityAirDispersion","Command_TiberiumFacilitySeedTiberium","Command_TiberiumVibrationScan","Command_ToggleFormation","Command_Traveler59ProdigySelectObjectsForTeleport","Command_Traveler59ProdigyTeleportObjects","Command_Uncombine",
	"Command_UnPackALIENMCV","Command_UnPackEmissary","Command_UnPackExplorer","Command_UnPackGDIMCV","Command_UnPackNODBunkerTruck","Command_UnPackNODMCV","Command_UnPackRig","Command_UnPackSurveyor","Command_UpgradeCompositeArmor","Command_UpgradedConversionBeam","Command_UpgradeEMPGrenades","Command_UpgradeFieldSuits","Command_UpgradeFusionCore","Command_UpgradeNODDozerBlades","Command_UpgradeNODEmpBurst","Command_UpgradeNODLaserCapacitor","Command_UpgradeNODSignatureGenerator","Command_UpgradePowerPlantTurbine","Command_UpgradeReaper17FusionCore","Command_UpgradeSteelTalonsPowerPlantTurbine","Command_UpgradeTraveler59FusionCore","Command_UpgradeZOCOMPowerPlantTurbine",
	"Command_UpgradeZoneRaiderAutoInjectors","Command_UpgradeZoneRaiderScannerPack","Command_UpgradeZoneTrooperAutoInjectors","Command_UpgradeZoneTrooperScannerPack","Command_UseBlinkPack","Command_UseCultistMindControl","Command_UseTiberiumAgitation","Command_UseTraveler59BlinkPack","Command_VertigoDisruptionPod","Command_ZOCOM_SpaceCommandRaiderPods","Command_ZOCOMCallForTransportInfantry","Command_ZOCOMCallForTransportVehicle","Command_ZOCOMCommandPostBombingRun","Command_ZoneTrooperFireJumpJets","Command_ZoneTrooperSquadGetToJumpJetRange",
	"Command_TogglePower","Command_SelfRepair","Command_Sell","Command_SetDefaultBuilding","Command_DrillUp","Command_StanceDrillDown"
}

CampaignFlagTypeIndexTable={   --use index-1 for actions not the string
	"Use_Alternate_Ending","Use_Alternate_Campaign_Finale","LUNCH_AT_IHOP","GDI_1_2_CampaignFlag_Snipers_Rescued","GDI_1_3_CampaignFlag_Mission_Complete","GDI_4_2_CampaignFlag_PlayedFirst","GDI_4_2_SnipersRescued","GDI_4_2_ZoneTroopersRescued","GDI_4_2_CommandoWin","GDI_4_3_CampaignFlag_PlayedFirst","GDI_4_3_Reinforcements","NOD_1_1_CampaignFlag_LessGroundForces","NOD_1_1_CampaignFlag_Attack_Bike_IDB","NOD_1_2_CampaignFlag_NoOrcas","NOD_4_2_CampaignFlag_IonCannonDestroyed","NOD_5_2_CampaignFlag_Stasis_Chamber_Destroyed",
	"NOD_5_2_CampaignFlag_GravityStabilizer_Destroyed","Alien_1_2_CampaignFlag_Mastermind_Survived","MM_1_DestroyLab_Activated","MM_1_DestroyLab_Completed","MM_1_DestroyLab_Failed","MM_2_DefendLab_Activated","MM_2_DefendLab_Completed","MM_2_DefendLab_Failed","MM_3_CaptureLab_Activated","MM_3_CaptureLab_Completed","MM_3_CaptureLab_Failed","MM_4_DefendConvoy_Activated","MM_4_DefendConvoy_Completed","MM_4_DefendConvoy_Failed","MM_5_DestroyConvoy_Activated","MM_5_DestroyConvoy_Completed","MM_5_DestroyConvoy_Failed",
	"MM_6_PowerDown_Activated","MM_6_PowerDown_Completed","MM_6_PowerDown_Failed","MM_7_8_9_BuildLoc_Activated","MM_7_8_9_BuildLoc_Completed","MM_7_8_9_BuildLoc_Failed","MM_10_11_12_MechCapture_Activated","MM_10_11_12_MechCapture_Completed","MM_10_11_12_MechCapture_Failed","MM_13_14_15_ConyardCapture_Activated","MM_13_14_15_ConyardCapture_Completed","MM_13_14_15_ConyardCapture_Failed","MM_16_17_18_RefineryCapture_Activated","MM_16_17_18_RefineryCapture_Completed","MM_16_17_18_RefineryCapture_Failed",
	"MM_19_TibSpikeCapture_Activated","MM_19_TibSpikeCapture_Completed","MM_19_TibSpikeCapture_Failed","MM_20_Tiberium_Activated","MM_20_Tiberium_Completed","MM_20_Tiberium_Failed","MM_21_CaptureAndHold_Activated","MM_21_CaptureAndHold_Completed","MM_21_CaptureAndHold_Failed","MM_22_23_24_NoAir_Activated","MM_22_23_24_NoAir_Completed","MM_22_23_24_NoAir_Failed","MM_25_26_27_NoArmor_Activated","MM_25_26_27_NoArmor_Completed","MM_25_26_27_NoArmor_Failed","MM_28_29_30_NoInfantry_Activated","MM_28_29_30_NoInfantry_Completed",
	"MM_28_29_30_NoInfantry_Failed","MM_31_SuperWeaponRace_Activated","MM_31_SuperWeaponRace_Completed","MM_31_SuperWeaponRace_Failed","CM_StealthTech_Activated","CM_StealthTech_Completed","CM_StealthTech_Failed","CM_BlackHand_Activated","CM_BlackHand_Completed","CM_BlackHand_Failed","CM_TibResearch_Activated","CM_TibResearch_Completed","CM_TibResearch_Failed","CM_Treasury_Activated","CM_Treasury_Completed","CM_Treasury_Failed","CM_MARV_Activated","CM_MARV_Completed","CM_MARV_Failed","CM_Giraud_Activated","CM_Giraud_Completed",
	"CM_Giraud_Failed","CM_Munich_Activated","CM_Munich_Completed","CM_Munich_Failed","CM_TacitusA_Activated","CM_TacitusA_Completed","CM_TacitusA_Failed","CM_TacitusB_Activated","CM_TacitusB_Completed","CM_TacitusB_Failed","MM_General_Activate","MM_General_PreTacticalCheck","MM_General_PostTacticalCheck","MM_MetagameActive"
} 

MusicTracksTable = {
	"5_1_SHELL_MAIN_MUSIC_360_1","5_1_SHELL_MAIN_MUSIC_360_2","5_1_STARTSCREEN_MUSIC_360","5_1_TOW_MissionSelectScreen_Alien1","5_1_TOW_MissionSelectScreen_Alien2","5_1_TOW_MissionSelectScreen_Alien4","5_1_TOW_MissionSelectScreen_GDI1","5_1_TOW_MissionSelectScreen_GDI1MS","5_1_TOW_MissionSelectScreen_GDI2","5_1_TOW_MissionSelectScreen_GDI3","5_1_TOW_MissionSelectScreen_GDI4","5_1_TOW_MissionSelectScreen_GDI5","5_1_TOW_MissionSelectScreen_Nod1","5_1_TOW_MissionSelectScreen_Nod2","5_1_TOW_MissionSelectScreen_Nod3",
	"5_1_TOW_MissionSelectScreen_Nod4","CNC3_FAILURE","CNC3_SUCCESS","CNC3_SUCCESS_EVIL","CNC3_SUCCESS_EVIL_V1","JC_CNC3EP1_ShellRemix","META_RAM_Music360_LoadScreen","MS_CNC3EP1_KanesWrath","MS_CNC3EP1_KanesWrath_CREDITS","Music_360_Neutral_GAMEOVERMS","Music_360_Shell_MainMS","Music_360_Shell_StartScreenMS","Music_360_Shell_XboxLive_ScreenMS","Music_360_TOW_MissionSelect_Screen_AlienMS","Music_360_TOW_MissionSelect_Screen_GDIMS","Music_360_TOW_MissionSelect_Screen_NodMS","Music_Action","Music_BaseBuilding_Blue","Music_BaseBuilding_Red","Music_BaseBuilding_Unknown",
	"Music_BaseBuilding_Yellow","MUSIC_CM11_EP1","MUSIC_CM26_EP1","MUSIC_CM27_EP1","MUSIC_CM31_EP1","Music_Credits","Music_Explore_Blue","Music_Explore_Red","Music_Explore_Unknown","Music_Explore_Yellow","Music_Explore2_Blue","Music_Explore2_Red","Music_Explore2_Unknown","Music_Explore2_Yellow","Music_MetaGameAutoResolve","Music_MetaGameBattleDefeat","Music_MetaGameBattleVictory","ScoreScreenMusic","ScoreScreenMusic1","ScoreScreenMusic2","ShellLowLOD","SJ_CNC3_AC_ANY_09","SJ_CNC3_AC_ANY_10","SJ_CNC3_EX_ANY_03","SJ_CNC3_EX_ANY_05","SJ_CNC3_EX_ANY_06",
	"SJ_CNC3_EX_ANY_06_CREDITS","SJ_CNC3_EX_ANY_08","SJ_CNC3_EX_RED_01","SJ_CNC3_EX_RED_02","TEMP_RAM_Music360_LoadScreen","TM_CNC3_AC_ANY_01","TM_CNC3_AC_ANY_03","TM_CNC3_AC_ANY_04","TM_CNC3_AC_ANY_05","TM_CNC3_AC_ANY_07","TM_CNC3_AC_ANY_07_CREDITS","TM_CNC3_AC_ANY_08","TM_CNC3_BB_BLU_01","TM_CNC3_BB_BLU_01_moved","TM_CNC3_BB_BLU_02","TM_CNC3_BB_BLU_02_moved","TM_CNC3_BB_BLU_03","TM_CNC3_BB_BLU_04","TM_CNC3_BB_BLU_05","TM_CNC3_BB_RED_01","TM_CNC3_BB_RED_02","TM_CNC3_BB_RED_04","TM_CNC3_BB_YEL_01","TM_CNC3_BB_YEL_02","TM_CNC3_BB_YEL_03","TM_CNC3_EX_ANY_01",
	"TM_CNC3_EX_ANY_01_moved","TM_CNC3_EX_ANY_02","TM_CNC3_EX_ANY_02_moved","TM_CNC3_EX_ANY_04","TM_CNC3_EX_ANY_04_CREDITS","TM_CNC3_EX_ANY_07","TM_CNC3_EX_BLU_01","TM_CNC3_EX_BLU_02","TM_CNC3_EX_BLU_03","TM_CNC3_EX_YEL_01","TM_CNC3_EX_YEL_02","TM_CNC3EP1_ActOnInstinct","TM_CNC3EP1_ActOnInstinct_CREDITS","VolumeSampleMusic"
}

DeathTypesTable = {
	"NONE","NORMAL","CRUSHED","BURNED","EXPLODED","POISONED","TOPPLED","FLOODED","SUICIDED","LASERED","DETONATED","SPLATTED","POISONED_BETA","EXTRA_2","EXTRA_3","EXTRA_4","EXTRA_5","EXTRA_6","EXTRA_7","EXTRA_8","KNOCKBACK","SUPERNATURAL","FADED","SLAUGHTERED","CATALYST"
}

Movies={ 
	"1_0","1_1","1_2","1_3","1_4","1_6","1_7","TH1_1","TH1_2","TH1_3","TH1_4","TH1_5","TH1_6","TH1_7","TH1_8","TH1_9","TH1_10","TH1_11","TH1_13","TH1_14","TH1_15",
	"2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_8","2_9","TH2_1","TH2_2","TH2_3","TH2_4","TH2_5","TH2_6","TH2_7A","TH2_7B","TH2_8","TH2_9","TH2_10","TH2_11","TH2_12",
	"TH2_13","TH2_14","TH2_15","TH2_16","TH2_17","TH2_18","TH2_19","3_0","3_1","3_3","3_4","TH3_1","TH3_2","TH3_3","TH3_4","TH3_5",
	"EALogoMovie","N01A","N42","G47","nVidiaMovie","DellMovie","ESRBMovie","VictoryDefeat","MainMenu","ShellBkg_Default","ShellBkg_XboxLive","AttractMovie"
}

EvaEventTable={
	"AircraftOutOfAmmoDamage","AlliedIonCannonActivated","AlliedIonCannonActivated","AlliedIonCannonDetected","AlliedNuclearMissileLaunched","AlliedRiftGeneratorActivated",
	"AlliedTempleOfNodDetected","AllyCampDestroyed","AllyDefeated","BeaconPlacedAlly","BeaconPlacedPlayer","BridgeRepaired","BuildCancelled","BuildingBeingStolen","BuildingConstructionComplete",
	"BuildingConstructionStarted","BuildingManuallyPoweredDown","BuildingManuallyPoweredUp","BuildingRepaired","BuildingStolen","BuildOnHold","BuildQueuePausedDueToCPLimit",
	"BuildQueuePausedDueToFunds","CampDestroyed","CannotBuildDueToCPLimit","CannotRepairDueToFunds","CannotUsePowerDueToFunds","CastleBreached","CompletedBonusMissionObjective",
	"CompletedMissionObjective","ControlPointCaptured","ControlPointHasBeenCaptured","ControlPointLost","Countdown01","Countdown02","Countdown03","Countdown04","Countdown05",
	"Countdown06","Countdown07","Countdown08","Countdown09","Countdown10MinsInGame","Countdown10SecsInGame","Countdown15MinsInGame","Countdown1MinsInGame",
	"Countdown20MinsInGame","Countdown30SecsInGame","Countdown3MinsInGame","Countdown5MinsInGame","CTFEnemyCapturedFlag","CTFEnemyDroppedFlag","CTFEnemyHasFlag","CTFFlagCaptured",
	"CTFFlagDropped","CTFYouHaveFlag","DamagedByTiberium","DefaultEvaEvent","EmptyEva","EnemyBuildingCaptured","EnemyCampDestroyed","EnemyCampSighted","EnemyCommandoDetected",
	"EnemyDefeated","EnemyEngineerDetected","EnemyIonCannonActivated","EnemyIonCannonDetected","EnemyNuclearMissileLaunched","EnemyRiftGeneratorActivated","EnemyRiftGeneratorDetected",
	"EnemyStealthUnitDiscovered","EnemyTempleOfNodDetected","GeneralLevelUp","GenericEnemyUnitSighted","GenericUnitBeingBurned","HarvesterLost","HarvesterUnderAttack","HuskRepaired",
	"IncomingRadarTransmission","IncomingTransmission","IntelDatabaseEntryReceived","IonCannonReady","LiquidTiberiumBombReady","LocalPlayerDefeated","LocalPlayerVictorious","LowPower",
	"Meva_AutoResolve","Meva_AutoResolveBattleLost","Meva_AutoResolveBattleWon","Meva_BuildBase","Meva_BuildSF","Meva_Cancel","Meva_DecBase","Meva_DecSF","Meva_MoveSF",
	"Meva_Patrola","Meva_Patrolb","Meva_RepairBase","Meva_RepairSF","Meva_UpgBaseDef","Meva_UpgBasePow","Meva_UpgBaseTier","Meva_UpgSF","Meva_YouFiredIC","Meva_YouFiredNuke",
	"Meva_YouFiredRift","MothershipDeployed","NewBonusObjective","NewConstructionOptions","NewMissionObjective","NuclearMissileReady","ObservedPlayerDefeated","OwnIonCannonActivated",
	"OwnLiquidTiberiumBombLaunched","OwnNuclearMissileLaunched","OwnRiftGeneratorActivated","ReinforcementsReady","RiftGeneratorReady","SelectDecoyUnit","SelectSpecialPowerTarget",
	"SelectUnit","SelectWormholeLocation","SiegeBarrierDisengaged","SiegeBarrierEngaged","SiegeCountdown10Mins","SiegeCountdown10Secs","SiegeCountdown15Mins","SiegeCountdown1Mins",
	"SiegeCountdown20Mins","SiegeCountdown30Secs","SiegeCountdown3Mins","SiegeCountdown5Mins","SilosNeeded","StructureCannotBuildDueToFullBuildQueue","StructurePlacementFailed",
	"StructureRepairing","StructureSold","StructureUnderAttack","TiberiumFieldDepleted","UnitAmbushed","UnitConstructionStarted","UnitLost","UnitPromoted","UnitUnderAttack",
	"UnitUnderAttackFromShroudedUnit","UpgradeComplete","WallsBeingClimbed","WarningMothershipDeployed","WorldMustBattle","WorldMustChooseOwner","WorldMustRetreat","WorldRegionLostUncontested"	
}

MissionDialogue={
	"MN11_NodEVA01","MN11_NodEVA02","MN11_NodEVA03","MN11_NodEVA04","MN11_NodEVA05","MN11_NodEVA06","MN11_NodEVA07","MN11_NodEVA08","MN12_NodEVA01",
	"MN12_NodEVA02","MN12_NodEVA03","MN12_NodEVA04","MN12_NodEVA05","MN12_NodEVA06","MN12_NodEVA07","MN12_NodEVA08","MN12_NodEVA09","MN12_NodEVA10",
	"MN12_NodEVA11","MN12_NodEVA12","MN13_NodEVA01","MN13_NodEVA02","MN13_NodEVA03","MN13_NodEVA04","MN13_NodEVA05","MN13_NodEVA06","MN13_NodEVA07",
	"MN13_NodEVA08","MN13_NodEVA09","MN13_NodEVA10","MN14_NodEVA01","MN14_NodEVA02","MN14_NodEVA03","MN14_NodEVA04","MN14_NodEVA05","MN14_NodEVA06",
	"MN14_NodEVA07","MN14_NodEVA08","MN14_NodEVA09","MN14_NodEVA10","MN21_NodEVA01","MN21_NodEVA02","MN21_NodEVA03","MN21_NodEVA04","MN21_NodEVA05",
	"MN21_NodEVA06","MN21_NodEVA07","MN21_NodEVA08","MN21_NodEVA09","MN21_NodEVA10","MN21_NodEVA11","MN21_NodEVA12","MN21_NodEVA13","MN22_NodEVA01",
	"MN22_NodEVA02","MN22_NodEVA03","MN22_NodEVA04","MN22_NodEVA05","MN22_NodEVA06","MN22_NodEVA07","MN22_NodEVA08","MN22_NodEVA09","MN22_NodEVA10",
	"MN23_NodEVA01","MN23_NodEVA02","MN23_NodEVA03","MN23_NodEVA04","MN23_NodEVA05","MN23_NodEVA06","MN23_NodEVA07","MN23_NodEVA08","MN23_NodEVA09",
	"MN24_NodEVA01","MN24_NodEVA02","MN24_NodEVA03","MN24_NodEVA04","MN24_NodEVA05","MN24_NodEVA06","MN24_NodEVA07","MN24_NodEVA08","MN24_NodEVA09",
	"MN24_NodEVA10","MN24_NodEVA11","MN24_NodEVA12","MN24_NodEVA13","MN24_NodEVA14","MN25_NodEVA01","MN25_NodEVA02","MN25_NodEVA03","MN25_NodEVA04",
	"MN25_NodEVA05","MN25_NodEVA06","MN26_NodEVA01","MN26_NodEVA02","MN26_NodEVA03","MN26_NodEVA04","MN26_NodEVA05","MN26_NodEVA06","MN27_NodEVA01",
	"MN27_NodEVA02","MN27_NodEVA03","MN27_NodEVA04","MN27_NodEVA05","MN27_NodEVA06","MN27_NodEVA07","MN27_NodEVA08","MN27_NodEVA09","MN27_NodEVA10",
	"MN27_NodEVA11","MN27_NodEVA12","MN27_NodEVA13","MN27_NodEVA14","MN31_NodEVA01","MN31_NodEVA02","MN31_NodEVA03","MN31_NodEVA04","MN31_NodEVA05",
	"MN31_NodEVA06","MN31_NodEVA07","MN31_NodEVA08","MN31_NodEVA09","MN31_NodEVA10","MN32_NodEVA01","MN32_NodEVA02","MN32_NodEVA03","MN32_NodEVA04",
	"MN32_NodEVA05","MN32_NodEVA06","MN32_NodEVA07","MN32_NodEVA08","MN32_NodEVA09","MN32_NodEVA10","MN32_NodEVA11","MN32_NodEVA12","MN32_NodEVA13",
	"MN32_NodEVA14","MN11_NodSoldier01","MN11_NodSoldier02","MN11_NodSoldier03","MN11_NodSoldier04","MN11_NodSoldier05","MN11_NodSoldier06","MN11_NodSoldier07",
	"MN11_NodSoldier08","MN11_NodSoldier09","MN11_NodSoldier10","MN12_NodSoldier01","MN12_NodSoldier02","MN12_NodSoldier03","MN12_NodSoldier04","MN12_NodSoldier05",
	"MN12_NodSoldier06","MN12_NodSoldier07","MN12_NodSoldier08","MN12_NodSoldier09","MN12_NodSoldier10","MN12_NodSoldier11","MN12_NodSoldier12","MN13_NodSoldier01",
	"MN13_NodSoldier02","MN13_NodSoldier03","MN13_NodSoldier04","MN13_NodSoldier05","MN13_NodSoldier06","MN13_NodSoldier07","MN13_NodSoldier08","MN13_NodSoldier09",
	"MN13_NodSoldier10","MN13_NodSoldier11","MN13_NodSoldier12","MN14_NodSoldier01","MN14_NodSoldier02","MN14_NodSoldier03","MN14_NodSoldier04","MN14_NodSoldier05",
	"MN14_NodSoldier06","MN14_NodSoldier07","MN14_NodSoldier08","MN14_NodSoldier09","MN14_NodSoldier10","MN14_NodSoldier11","MN21_NodSoldier01","MN21_NodSoldier02",
	"MN21_NodSoldier03","MN21_NodSoldier04","MN21_NodSoldier05","MN21_NodSoldier06","MN21_NodSoldier07","MN21_NodSoldier08","MN21_NodSoldier09","MN21_NodSoldier10",
	"MN21_NodSoldier11","MN21_NodSoldier12","MN22_NodSoldier01","MN22_NodSoldier02","MN22_NodSoldier03","MN22_NodSoldier04","MN22_NodSoldier05","MN22_NodSoldier06",
	"MN22_NodSoldier07","MN22_NodSoldier08","MN22_NodSoldier09","MN22_NodSoldier10","MN23_NodSoldier01","MN23_NodSoldier02","MN23_NodSoldier03","MN23_NodSoldier04",
	"MN23_NodSoldier05","MN23_NodSoldier06","MN23_NodSoldier07","MN23_NodSoldier08","MN24_NodSoldier01","MN24_NodSoldier02","MN24_NodSoldier03","MN24_NodSoldier04",
	"MN24_NodSoldier05","MN24_NodSoldier06","MN24_NodSoldier07","MN24_NodSoldier08","MN25_NodSoldier01","MN25_NodSoldier02","MN25_NodSoldier03","MN25_NodSoldier04",
	"MN25_NodSoldier05","MN26_NodSoldier01","MN26_NodSoldier02","MN26_NodSoldier03","MN26_NodSoldier04","MN26_NodSoldier05","MN26_NodSoldier06","MN26_NodSoldier07",
	"MN26_NodSoldier08","MN26_NodSoldier09","MN26_NodSoldier10","MN26_NodSoldier11","MN26_NodSoldier12","MN26_NodSoldier13","MN26_NodSoldier14","MN26_NodSoldier15",
	"MN26_NodSoldier16","MN26_NodSoldier17","MN26_NodSoldier18","MN26_NodSoldier19","MN27_NodSoldier01","MN27_NodSoldier02","MN27_NodSoldier03","MN27_NodSoldier04",
	"MN27_NodSoldier05","MN27_NodSoldier06","MN27_NodSoldier07","MN27_NodSoldier08","MN27_NodSoldier09","MN27_NodSoldier10","MN27_NodSoldier11","MN27_NodSoldier12",
	"MN27_NodSoldier13","MN27_NodSoldier14","MN27_NodSoldier15","MN27_NodSoldier16","MN31_NodSoldier01","MN31_NodSoldier02","MN31_NodSoldier03","MN31_NodSoldier04",
	"MN31_NodSoldier05","MN31_NodSoldier06","MN31_NodSoldier07","MN31_NodSoldier08","MN31_NodSoldier09","MN32_NodSoldier01","MN32_NodSoldier02","MN32_NodSoldier03",
	"MN32_NodSoldier04","MN32_NodSoldier05","MN32_NodSoldier06","MN32_NodSoldier07","MN32_NodSoldier08","MN32_NodSoldier09","MN32_NodSoldier10","MN32_GDISoldier701",
	"MN32_GDISoldier702","MN32_GDISoldier703","MN32_NodEVA15","MN32_NodEVA16","MN32_NodEVA17","MN32_NodEVA18","MN32_NodEVA20","MN32_NodEVA21","MN32_NodEVA22",
	"MN32_NodEVA23","MN32_NodEVA24","MN32_NodSoldier501","MN32_NodSoldier502","MN32_NodSoldier503","MN32_NodSoldier601","MN32_NodSoldier602","MN32_NodSoldier603",
	"MN32_Truck201","Neva_Obj11","Neva_Obj110","Neva_Obj111","Neva_Obj111_alt","Neva_Obj112","Neva_Obj113","Neva_Obj114","Neva_Obj12","Neva_Obj13","Neva_Obj14",
	"Neva_Obj15","Neva_Obj16","Neva_Obj17","Neva_Obj18","Neva_Obj19","Neva_Obj21","Neva_Obj210","Neva_Obj211","Neva_Obj212","Neva_Obj214","Neva_Obj215","Neva_Obj216",
	"Neva_Obj216HintA","Neva_Obj216HintB","Neva_Obj217","Neva_Obj21A","Neva_Obj22","Neva_Obj23","Neva_Obj24","Neva_Obj25","Neva_Obj26","Neva_Obj27","Neva_Obj28",
	"Neva_Obj29","Neva_Obj31","Neva_Obj32","Neva_Obj33","Neva_RTSObj11","Neva_RTSObj12a","Neva_RTSObj12b","Neva_RTSObj12c","Neva_RTSObj13","Neva_RTSObj21",
	"Neva_RTSObj22","Neva_RTSObj23","Neva_RTSObj24","Neva_RTSObj24B","Neva_RTSObj25a","Neva_RTSObj25b","Neva_RTSObj31a","Neva_RTSObj31b","Neva_RTSObj31c",
	"Neva_RTSObj31d","Neva_RTSObj31e","MMTu_TrainingOfficer001","MMTu_TrainingOfficer002","MMTu_TrainingOfficer003","MMTu_TrainingOfficer004","MMTu_TrainingOfficer005",
	"MMTu_TrainingOfficer006","MMTu_TrainingOfficer007","MMTu_TrainingOfficer008","MMTu_TrainingOfficer009","MMTu_TrainingOfficer010","MMTu_TrainingOfficer011",
	"MMTu_TrainingOfficer012","MMTu_TrainingOfficer013","MMTu_TrainingOfficer014","MMTu_TrainingOfficer015","MMTu_TrainingOfficer016","MMTu_TrainingOfficer017",
	"MMTu_TrainingOfficer018","MMTu_TrainingOfficer019","MMTu_TrainingOfficer020","MMTu_TrainingOfficer021","MMTu_TrainingOfficer022","MMTu_TrainingOfficer023",
	"MMTu_TrainingOfficer024","MMTu_TrainingOfficer025","MMTu_TrainingOfficer026","MMTu_TrainingOfficer027","MMTu_TrainingOfficer028","MMTu_TrainingOfficer029",
	"MMTu_TrainingOfficer030","MMTu_TrainingOfficer031","MMTu_TrainingOfficer032","MMTu_TrainingOfficer033","MMTu_TrainingOfficer034","MMTu_TrainingOfficer035",
	"MMTu_TrainingOfficer036","MMTu_TrainingOfficer037","MMTu_TrainingOfficer038","MMTu_TrainingOfficer039","MMTu_TrainingOfficer040","MMTu_TrainingOfficer041",
	"MMTu_TrainingOfficer042","MMTu_TrainingOfficer043","MMTu_TrainingOfficer044","MMTu_TrainingOfficer045","MMTu_TrainingOfficer046","MMTu_TrainingOfficer047",
	"MMTu_TrainingOfficer048","MMTu_TrainingOfficer049","MMTu_TrainingOfficer050","MMTu_TrainingOfficer051","MMTu_TrainingOfficer052","MMTu_TrainingOfficer053",
	"MMTu_TrainingOfficer054","MMTu_TrainingOfficer055","MMTu_TrainingOfficer056","MMTu_TrainingOfficer057","MMTu_TrainingOfficer058","MMTu_TrainingOfficer059",
	"MMTu_TrainingOfficer060","MMTu_TrainingOfficer061","MMTu_TrainingOfficer062","MMTu_TrainingOfficer063","MMTu_TrainingOfficer064","MMTu_TrainingOfficer065",
	"MMTu_TrainingOfficer066","MMTu_TrainingOfficer067","MMTu_TrainingOfficer068","MMTu_TrainingOfficer069","MMTu_TrainingOfficer070","MMTu_TrainingOfficer071",
	"MMTu_TrainingOfficer072","MMTu_TrainingOfficer073","MMTu_TrainingOfficer074","MMTu_TrainingOfficer075","MMTu_TrainingOfficer076","MMTu_TrainingOfficer077",
	"MMTu_TrainingOfficer078","MMTu_TrainingOfficer079","MMTu_TrainingOfficer080","MMTu_TrainingOfficer081","MMTu_TrainingOfficer082","MMTu_TrainingOfficer083",
	"MMTu_TrainingOfficer084","MMTu_TrainingOfficer085","MMTu_TrainingOfficer086","MMTu_TrainingOfficer087","MMTu_TrainingOfficer088","MMTu_TrainingOfficer089",
	"MMTu_TrainingOfficer090","MMTu_TrainingOfficer091","MMTu_TrainingOfficer092","MMTu_TrainingOfficer093","MMTu_TrainingOfficer094","MMTu_TrainingOfficer095",
	"MMTu_TrainingOfficer096","MMTu_TrainingOfficer097","MMTu_TrainingOfficer098","MMTu_TrainingOfficer099","MMTu_TrainingOfficer100","MMTu_TrainingOfficer101",
	"MMTu_TrainingOfficer102","MMTu_TrainingOfficer103","MMTu_TrainingOfficer104","MMTu_TrainingOfficer105","MMTu_TrainingOfficer106","MMTu_TrainingOfficer107",
	"MMTu_TrainingOfficer108","MMTu_TrainingOfficer109","MMTu_TrainingOfficer110","MMTu_TrainingOfficer111","MMTu_TrainingOfficer112","MMTu_TrainingOfficer113",
	"MMTu_TrainingOfficer114","MNTu_RadTrainingOfficer42","MNTu_RadTrainingOfficer43","MNTu_RadTrainingOfficer44","MNTu_RadTrainingOfficer45","MNTu_RadTrainingOfficer46",
	"MNTu_RadTrainingOfficer47","MNTu_RadTrainingOfficer48","MNTu_RadTrainingOfficer49","MNTu_RadTrainingOfficer50","MNTu_TrainingOfficer001","MNTu_TrainingOfficer002",
	"MNTu_TrainingOfficer003","MNTu_TrainingOfficer004","MNTu_TrainingOfficer005","MNTu_TrainingOfficer006","MNTu_TrainingOfficer007","MNTu_TrainingOfficer008","MNTu_TrainingOfficer009",
	"MNTu_TrainingOfficer010","MNTu_TrainingOfficer011","MNTu_TrainingOfficer012","MNTu_TrainingOfficer013","MNTu_TrainingOfficer014","MNTu_TrainingOfficer015","MNTu_TrainingOfficer016",
	"MNTu_TrainingOfficer017","MNTu_TrainingOfficer018","MNTu_TrainingOfficer019","MNTu_TrainingOfficer020","MNTu_TrainingOfficer021","MNTu_TrainingOfficer022","MNTu_TrainingOfficer023",
	"MNTu_TrainingOfficer024","MNTu_TrainingOfficer025","MNTu_TrainingOfficer026","MNTu_TrainingOfficer027","MNTu_TrainingOfficer028","MNTu_TrainingOfficer029","MNTu_TrainingOfficer030",
	"MNTu_TrainingOfficer031","MNTu_TrainingOfficer032","MNTu_TrainingOfficer033","MNTu_TrainingOfficer034","MNTu_TrainingOfficer035","MNTu_TrainingOfficer036","MNTu_TrainingOfficer037",
	"MNTu_TrainingOfficer038","MNTu_TrainingOfficer039","MNTu_TrainingOfficer040","MNTu_TrainingOfficer041","MNTu_TrainingOfficer042","MNTu_TrainingOfficer043","MNTu_TrainingOfficer044",
	"MNTu_TrainingOfficer045","MNTu_TrainingOfficer046","MNTu_TrainingOfficer047","MNTu_TrainingOfficer048","MNTu_TrainingOfficer049","MNTu_TrainingOfficer050","MNTu_TrainingOfficer051",
	"MNTu_TrainingOfficer052","MNTu_TrainingOfficer053","MNTu_TrainingOfficer054","MNTu_TrainingOfficer055","MNTu_TrainingOfficer056","MNTu_TrainingOfficer057","MNTu_TrainingOfficer058",
	"MNTu_TrainingOfficer059","MNTu_TrainingOfficer060","MNTu_TrainingOfficer061","MNTu_TrainingOfficer062","MNTu_TrainingOfficer063","MNTu_TrainingOfficer064","MNTu_TrainingOfficer065",
	"MNTu_TrainingOfficer066","MNTu_TrainingOfficer067","MNTu_TrainingOfficer068","MNTu_TrainingOfficer069","MNTu_TrainingOfficer070","MNTu_TrainingOfficer071","MNTu_TrainingOfficer072",
	"MNTu_TrainingOfficer073","MNTu_TrainingOfficer074","MNTu_TrainingOfficer075","MNTu_TrainingOfficer076","MNTu_TrainingOfficer077","MNTu_TrainingOfficer078","MNTu_TrainingOfficer079",
	"MNTu_TrainingOfficer080","MNTu_TrainingOfficer081","MNTu_TrainingOfficer082","MNTu_TrainingOfficer083","MNTu_TrainingOfficer084","MNTu_TrainingOfficer085","MNTu_TrainingOfficer086",
	"MNTu_TrainingOfficer087","MNTu_TrainingOfficer088","MNTu_TrainingOfficer089","MNTu_TrainingOfficer090","MNTu_TrainingOfficer091","MNTu_TrainingOfficer092","MNTu_TrainingOfficer093",
	"MNTu_TrainingOfficer094","MNTu_TrainingOfficer095","MNTu_TrainingOfficer096","MNTu_TrainingOfficer097","MNTu_TrainingOfficer098","MNTu_TrainingOfficer099","MNTu_TrainingOfficer100",
	"MNTu_TrainingOfficer101","MNTu_TrainingOfficer102","MNTu_TrainingOfficer103","MNTu_TrainingOfficer104","MNTu_RadTrainingOfficer01","MNTu_RadTrainingOfficer02","MNTu_RadTrainingOfficer03",
	"MNTu_RadTrainingOfficer04","MNTu_RadTrainingOfficer05","MNTu_RadTrainingOfficer06","MNTu_RadTrainingOfficer07","MNTu_RadTrainingOfficer08","MNTu_RadTrainingOfficer09",
	"MNTu_RadTrainingOfficer10","MNTu_RadTrainingOfficer11","MNTu_RadTrainingOfficer12","MNTu_RadTrainingOfficer13","MNTu_RadTrainingOfficer14","MNTu_RadTrainingOfficer15",
	"MNTu_RadTrainingOfficer16","MNTu_RadTrainingOfficer17","MNTu_RadTrainingOfficer18","MNTu_RadTrainingOfficer19","MNTu_RadTrainingOfficer20","MNTu_RadTrainingOfficer21",
	"MNTu_RadTrainingOfficer22","MNTu_RadTrainingOfficer23","MNTu_RadTrainingOfficer24","MNTu_RadTrainingOfficer25","MNTu_RadTrainingOfficer26","MNTu_RadTrainingOfficer27",
	"MNTu_RadTrainingOfficer28","MNTu_RadTrainingOfficer29","MNTu_RadTrainingOfficer30","MNTu_RadTrainingOfficer31","MNTu_RadTrainingOfficer32","MNTu_RadTrainingOfficer33",
	"MNTu_RadTrainingOfficer34","MNTu_RadTrainingOfficer35","MNTu_RadTrainingOfficer36","MNTu_RadTrainingOfficer37","MNTu_RadTrainingOfficer38","MNTu_RadTrainingOfficer39",
	"MNTu_RadTrainingOfficer40","MNTu_RadTrainingOfficer41"
}

Sounds={
	"Example_Sound1","Example_Sound2","Example_Sound3","Example_Sound4","Example_Sound5","Example_Sound_which_plays_one_tenth_as_much","GUMissi_wea1firea","GUMissi_wea1fireb","GUMissi_wea1firec","GUMissi_wea1fired","GUMissi_wea1firee","WACreak_metal1a","WACreak_metal1c","WACreak_metal1d","WACreak_metal1e","WACreak_metal1f","WACreak_metal1g","NUInfan_crowAttaa","NUInfan_crowAttab","NUInfan_crowAttac","NUInfan_crowAttad","NUInfan_crowAttae","NUInfan_crowAttaf","NUInfan_crowAttag","NUInfan_crowAttah","NUInfan_crowAttai","NUInfan_crowAttaj","NUInfan_crowMovea","NUInfan_crowMoveb","NUInfan_crowMovec","NUInfan_crowMoved","NUInfan_crowMovee","NUInfan_crowMovef","NUInfan_crowMoveg","NUInfan_crowMoveh","NUInfan_crowMovei","NUInfan_crowMovej","NUInfan_crowMovek","NUInfan_crowMovel","NUInfan_crowMovem","NUInfan_crowMoven","NUInfan_crowSelea","NUInfan_crowSeleb","NUInfan_crowSelec","NUInfan_crowSeled","NUInfan_crowSelee","NUInfan_crowSelef","NUInfan_crowSeleg","NUInfan_crowSeleh","NUInfan_crowSelei","NUInfan_crowSelej","NUInfan_crowSelek","NUInfan_crowSelel","NUInfan_crowSelem","NUInfan_crowSelen","NUInfan_voiEffora","NUInfan_voiEfforb","NUInfan_voiEfforc","NUInfan_voiEfford","NUInfan_voiEffore","NUInfan_voiEfforf","NUInfan_voiEfforg","NUInfan_voiEfforh","NUInfan_voiEffori","NUInfan_voiEfforj","NUInfan_voiEffork","NUInfan_voiEfforl","NUInfan_voiEfform","NUInfan_voiEfforn","NUInfan_voiEfforo","NUInfan_voiEfforp","NUInfan_voiEfforq","NUInfan_voiEfforr","NUInfan_voiEffors","NUInfan_crowAttaa","NUInfan_crowAttab","NUInfan_crowAttac","NUInfan_crowAttad","NUInfan_crowAttae","NUInfan_crowAttaf","NUInfan_crowAttag","NUInfan_crowAttah","NUInfan_crowAttai","NUInfan_crowAttaj","NUInfan_crowMovea","NUInfan_crowMoveb","NUInfan_crowMovec","NUInfan_crowMoved","NUInfan_crowMovee","NUInfan_crowMovef","NUInfan_crowMoveg","NUInfan_crowMoveh","NUInfan_crowMovei","NUInfan_crowMovej","NUInfan_crowMovek","NUInfan_crowMovel","NUInfan_crowMovem","NUInfan_crowMoven","NUInfan_crowSelea","NUInfan_crowSeleb","NUInfan_crowSelec","NUInfan_crowSeled","NUInfan_crowSelee","NUInfan_crowSelef","NUInfan_crowSeleg","NUInfan_crowSeleh","NUInfan_crowSelei","NUInfan_crowSelej","NUInfan_crowSelek","NUInfan_crowSelel","NUInfan_crowSelem","NUInfan_crowSelen","NUInfan_voiEffora","NUInfan_voiEfforb","NUInfan_voiEfforc","NUInfan_voiEfford","NUInfan_voiEffore","NUInfan_voiEfforf","NUInfan_voiEfforg","NUInfan_voiEfforh","NUInfan_voiEffori","NUInfan_voiEfforj","NUInfan_voiEffork","NUInfan_voiEfforl","NUInfan_voiEfform","NUInfan_voiEfforn","NUInfan_voiEfforo","NUInfan_voiEfforp","NUInfan_voiEfforq","NUInfan_voiEfforr","NUInfan_voiEffors","TEMP_EU_Men1_attcG1a","TEMP_EU_Men1_attcG1b","TEMP_EU_Men1_attcG1c","TEMP_EU_Men1_attcG1d","TEMP_EU_Men1_attcG1e","TEMP_EU_Men1_attcG1f","TEMP_EU_Men1_attcG1g","TEMP_EU_Men1_attcG1h","TEMP_EU_Men1_attcG1i","TEMP_EU_Men1_murmG2a","TEMP_EU_Men1_murmG2b","TEMP_EU_Men1_murmG2c","TEMP_EU_Men1_murmG2d","TEMP_EU_Men1_murmG2e","TEMP_EU_Men1_murmG2f","TEMP_EU_Men1_murmG2g","TEMP_EU_Men1_murmG2h","TEMP_EU_Men1_murmG2i","TEMP_EU_Men1_murmG2j","TEMP_EU_Men1_murmG2k","TEMP_EU_Men1_murmG2l","TEMP_EU_Men1_murmG2m","TEMP_EU_Men1_murmG2n","TEMP_EU_Men1_murmG2o","TEMP_EU_Men1_movYela","TEMP_EU_Men1_movYelb","TEMP_EU_Men1_movYelc","TEMP_EU_Men1_movYeld","TEMP_EU_Men1_movYele","TEMP_EU_Men1_movYelf","TEMP_EU_Men1_movYelg","TEMP_EU_Men1_movYelh","TEMP_EU_Men1_movYeli","TEMP_EU_Men1_movYelj","TEMP_EU_Men1_movYelk","TEMP_EU_Men1_movYell","TEMP_EU_Men1_movYelm","TEMP_EU_Men1_movYeln","TEMP_EU_Men1_movYelo","TEMP_EU_Men1_movYelp","TEMP_EU_Men1_movYelq","TEMP_EU_Men1_movYelr","TEMP_EU_Men1_movYels","TEMP_EU_Men1_movYelt","TEMP_EU_Men1_movYelu","TEMP_EU_Men1_movYelv","TEMP_EU_Men1_movYelw","TEMP_EU_Men1_movYelx","TEMP_EU_Men1_movYela","TEMP_EU_Men1_movYelc","TEMP_EU_Men1_movYele","TEMP_EU_Men1_movYelg","TEMP_EU_Men1_movYeli","TEMP_EU_Men1_movYelk","TEMP_EU_Men1_movYelm","TEMP_EU_Men1_movYelo","TEMP_EU_Men1_movYelq","TEMP_EU_Men1_movYels","TEMP_EU_Men1_movYelu","TEMP_EU_Men1_movYelw","TEMP_EU_Men1_movYelb",
	"TEMP_EU_Men1_movYeld","TEMP_EU_Men1_movYelf","TEMP_EU_Men1_movYelh","TEMP_EU_Men1_movYelj","TEMP_EU_Men1_movYell","TEMP_EU_Men1_movYeln","TEMP_EU_Men1_movYelp","TEMP_EU_Men1_movYelr","TEMP_EU_Men1_movYelt","TEMP_EU_Men1_movYelv","TEMP_EU_Men1_movYelx","TEMP_EU_Men1_seleG1a","TEMP_EU_Men1_seleG1b","TEMP_EU_Men1_seleG1c","TEMP_EU_Men1_seleG1d","TEMP_EU_Men1_seleG1e","TEMP_EU_Men1_seleG1f","TEMP_EU_Men1_seleG1g","TEMP_EU_Men1_seleG1h","TEMP_EU_Men1_seleG1i","TEMP_GUCrowd_seleG3a","TEMP_GUCrowd_seleG3a","GUMissi_foleSelea","GUMissi_foleSeleb","GUMissi_foleSelec","GUMissi_foleSeled","GUMissi_foleSelee","GUMissi_foleSelef","AUCulti_folSelecta","AUCulti_folSelectb","AUCulti_folSelectc","AUCulti_folSelectd","AUCulti_folSelecte","AUCulti_folSelectf","AUCulti_folSelectg","AUCulti_folSelecth","GUComma_foleSele","GUEngin_foleSelea","GUEngin_foleSeleb","GUEngin_foleSelec","GUEngin_foleSeled","GUEngin_foleSelee","GUGreda_foleSelea","GUGreda_foleSeleb","GUGreda_foleSelec","GUGreda_foleSeled","GUGreda_foleSelee","GUMissi_foleSelea","GUMissi_foleSeleb","GUMissi_foleSelec","GUMissi_foleSeled","GUMissi_foleSelee","GUMissi_foleSelef","GURifle_foleSelea","GURifle_foleSeleb","GURifle_foleSelec","GURifle_foleSeled","GURifle_foleSelee","GURifle_foleSelef","GURifle_foleSeleg","GURifle_foleSeleh","GUSniper_foleSelea","GUSniper_foleSeleb","GUSniper_foleSelec","GUSniper_foleSeled","GUSniper_foleSelee","GUSniper_foleSelef","GUSniper_foleSelea","GUSniper_foleSeleb","GUSniper_foleSelec","GUSniper_foleSeled","GUSniper_foleSelee","GUSniper_foleSelef","NUConfe_folSelecta","NUConfe_folSelectb","NUConfe_folSelectc","GUZoneT_foleSelea","GUZoneT_foleSeleb","GUZoneT_foleSelec","NUConfe_folSelectg","NUConfe_folSelecth","NUConfe_folSelecti","NUConfe_folSelectj","NUConfe_folSelectk","NUConfe_folSelectl","NUEnlig_folSelecta","NUEnlig_folSelectb","NUEnlig_folSelectc","NUConfe_folSelecta","NUConfe_folSelectb","NUConfe_folSelectc","NUShaSq_airSelea","NUShaSq_airSeleb","NUShaSq_airSelec","NUShaSq_airSeled","NUShaSq_airSelee","NUShaSq_airSelef","GUSniper_foleSelea","GUSniper_foleSeleb","GUSniper_foleSelec","GUSniper_foleSeled","GUSniper_foleSelee","GUSniper_foleSelef","NUConfe_folSelectd","NUConfe_folSelecte","NUConfe_folSelectf","NUTibTr_folSelecta","NUTibTr_folSelectb","NUTibTr_folSelectc","AURazor_moveLoopa","AURazor_moveLoopb","AURazor_moveLoopc","AURazor_moveLoopd","AURazor_moveLoope","AURazor_moveLoopf","AURazor_moveLoopg","AURazor_moveLooph","AURazor_moveLoopi","AURazor_moveLoopj","AURazor_moveLoopk","AURazor_moveLoopl","AURazor_moveLoopa","AURazor_moveLoopb","AURazor_moveLoopc","AURazor_moveLoopd","AURazor_moveLoope","AURazor_moveLoopf","AURazor_moveLoopg","AURazor_moveLooph","AURazor_moveLoopi","AURazor_moveLoopj","AURazor_moveLoopk","AURazor_moveLoopl","GUGrena_moveG1L2a","GUGrena_moveG1L2b","GUGrena_moveG1L2c","GUGrena_moveG1L2d","GUGrena_moveG1L2e","GUGrena_moveG1L2f","GUGrena_moveG1L2g","GUGrena_moveG1L2h","GUGrena_moveG1L2i","GUGrena_moveG1L2j","GUGrena_moveG1L2k","GUGrena_moveG1L2l","GUGrena_moveG1L2m","GUGrena_moveG1L2n","GUGrena_moveG1L2o","GUGrena_moveG1L2p","GUGrena_moveG1L2q","GUMissi_moveG1L2a","GUMissi_moveG1L2b","GUMissi_moveG1L2c","GUMissi_moveG1L2d","GUMissi_moveG1L2e","GUMissi_moveG1L2f","GUMissi_moveG1L2g","GUMissi_moveG1L2h","GUMissi_moveG1L2i","GUMissi_moveG1L2j","GUMissi_moveG1L2k","GUMissi_moveG1L2l","GURifle_moveG1L2a","GURifle_moveG1L2b","GURifle_moveG1L2c","GURifle_moveG1L2d","GURifle_moveG1L2e","GURifle_moveG1L2f","GURifle_moveG1L2g","GUSnipe_moveG1L2a","GUSnipe_moveG1L2b","GUSnipe_moveG1L2c","GUSnipe_moveG1L2d","GUSnipe_moveG1L2e","GUSnipe_moveG1L2f","GUSnipe_moveG1L2g","GUSnipe_moveG1L2h","GUSnipe_moveG1L2i","GUSnipe_moveG1L2j","GUSnipe_moveG1L2k","GUSnipe_moveG1L2l","GUSnipe_moveG1L2m","GUSnipe_moveG1L2n","GUSnipe_moveG1L2o","GUSnipe_moveG1L2p","GUSnipe_moveG1L2q","GUSnipe_moveG1L2r","GUSnipe_moveG1L2s","GUSnipe_moveG1L2t","GUSnipe_moveG1L2u","GUSnipe_moveG1L2v","GUSnipe_moveG1L2w","GUZoneT_moveG1L2a","GUZoneT_moveG1L2b","GUZoneT_moveG1L2c","GUZoneT_moveG1L2d","GUZoneT_moveG1L2e","GUZoneT_moveG1L2f",
	"GUZoneT_moveG1L2g","GUZoneT_moveG1L2h","AUAnnih_footstepa","AUAnnih_footstepb","AUAnnih_footstepc","AUAnnih_footstepd","AUAnnih_footstepe","AUAnnih_footstepf","AUAnnih_footstepg","AUAnnih_footsteph","AUAnnih_footstepi","AUAnnih_footstepj","AUAnnih_footstepk","AUAnnih_footstepl","AUAnnih_footstepm","AUAnnih_footstepn","AUAnnih_footstepo","AUAnnih_footstepp","AUAnnih_footstepa","AUAnnih_footstepb","AUAnnih_footstepc","AUAnnih_footstepd","AUAnnih_footstepe","AUAnnih_footstepf","AUAnnih_footstepg","AUAnnih_footsteph","AUAnnih_footstepi","AUAnnih_footstepj","AUAnnih_footstepk","AUAnnih_footstepl","AUAnnih_footstepm","AUAnnih_footstepn","AUAnnih_footstepo","AUAnnih_footstepp","AUAnnih_sounAttaa","AUAnnih_sounAttab","AUAnnih_sounAttac","AUAnnih_sounAttad","AUAnnih_sounAttae","AUAnnih_sounSelea","AUAnnih_sounSeleb","AUAnnih_sounSelec","AUAnnih_sounSeled","AUAnnih_sounSelee","AUAnnih_sounSelef","AUAnnih_sounSelea","AUAnnih_sounDiea","AUAnnih_sounDieb","AUAnnih_sounDiec","AUAnnih_sounDied","AUAnnih_sounDiee","AUAnnih_waila","AUAnnih_wailb","AUAnnih_wailc","AUAnnih_screama","AUAnnih_screamb","AUAnnih_screamc","AUAnnih_screamd","AUAnnih_sounSeleb","AUAnnih_sounSelec","AUAnnih_sounSeled","AUAnnih_sounSelee","AUAnnih_sounSelef","AUAnnih_sounSeleb","AUAnnih_sounSelec","AUAnnih_sounSeled","AUAnnih_sounSelee","AUAnnih_sounSelef","AUAnnih_wea1Firea","AUAnnih_wea1Fireb","AUAnnih_wea1Firec","AUAnnih_wea1Fired","AUAnnih_wea1Firee","AUAnnih_wea1Firef","AUAnnih_wea1Fireg","AUAnnih_wea1Fireh","AUAnnih_wea1Firea","AUAnnih_wea1Fireb","AUAnnih_wea1Firec","AUAnnih_wea1Fired","AUAnnih_wea1Firee","AUAnnih_wea1Firef","AUAnnih_wea1Fireg","AUAnnih_wea1Fireh","AUAnnih_screama","AUAnnih_screamb","AUAnnih_screamc","AUAnnih_screamd","AUAnnih_waila","AUAnnih_wailb","AUAnnih_wailc","AUDevou_diea","AUDevou_dieb","AUDevou_diec","AUDevou_died","AUDevou_diee","AUDevou_dief","AUAssim_movStarta","AUAssim_movStartb","AUAssim_movStartc","AUAssim_sounAttaa","AUAssim_sounAttab","AUAssim_sounAttac","AUAssim_sounAttad","AUAssim_sounAttae","","AUAssim_sounAttaf","AUAssim_sounAttag","AUAssim_sounAttah","AUAssim_sounAttai","AUAssim_sounAttaj","AUAssim_sounAttaa","AUAssim_sounAttab","AUAssim_sounAttac","AUAssim_sounAttad","AUAssim_sounAttae","","AUAssim_sounAttaf","AUAssim_sounAttag","AUAssim_sounAttah","AUAssim_sounAttai","AUAssim_sounAttaj","AUAssim_sounDiea","AUAssim_sounDieb","AUAssim_sounDiec","AUAssim_sounDied","AUAssim_sounDiee","AUAssim_sounDief","AUAssim_sounDieg","AUAssim_sounDieh","AUAssim_sounDiei","AUAssim_sounDiej","AUAssim_sounDiek","AUAssim_sounMovea","AUAssim_sounMoveb","AUAssim_sounMovec","AUAssim_sounMoved","AUAssim_sounMovee","AUAssim_sounMovef","AUAssim_sounMoveg","AUAssim_sounMoveh","AUAssim_sounMovei","AUAssim_sounMovej","AUAssim_sounMovek","AUAssim_sounMovel","AUAssim_sounMovem","AUAssim_sounMoven","AUAssim_sounMoveo","AUAssim_sounSelea","AUAssim_sounSeleb","AUAssim_sounSelec","AUAssim_sounSeled","AUAssim_sounSelee","AUAssim_sounSelef","AUAssim_sounSeleg","AUAssim_sounSeleh","AUAssim_sounSelei","AUAssim_sounSelej","AUAssim_sounSelek","AUAssim_sounSelel","AUAssim_sounSelem","AUAssim_sounSelen","AUBuzz_idleLoopa","AUBuzz_idleLoopb","AUBuzz_idleLoopc","AUBuzz_idleLoopd","AUBuzz_idleLoope","AUBuzz_idleLoopf","AUBuzz_idleLoopg","AUBuzz_idleLooph","AUBuzze_moveL2a","AUBuzze_moveL2b","AUBuzze_moveL2c","AUBuzze_moveL2d","AUBuzze_moveL2e","AUBuzze_combinea","AUBuzze_combineb","AUBuzze_combinec","AUBuzze_die2a","AUBuzze_die2b","AUBuzze_die2c","AUBuzze_die2d","AUBuzze_die2e","AUBuzze_die2f","AUBuzze_die2g","AUBuzz_sounDiea","AUBuzz_sounDieb","AUBuzz_sounDiec","AUBuzz_sounDied","AUBuzz_sounDiee","AUBuzz_idleLoopa","AUBuzz_idleLoopb","AUBuzz_idleLoopc","AUBuzz_idleLoopd","AUBuzz_idleLoope","AUBuzz_idleLoopf","AUBuzz_idleLoopg","AUBuzz_idleLooph","AUBuzze_moveL2a","AUBuzze_moveL2b","AUBuzze_moveL2c","AUBuzze_moveL2d","AUBuzze_moveL2e","AUBuzz_idleLoopa","AUBuzz_idleLoopb","AUBuzz_idleLoopc","AUBuzz_idleLoopd","AUBuzz_idleLoope","AUBuzz_idleLoopf","AUBuzz_idleLoopg","AUBuzz_idleLooph","AUBuzz_moveStara","AUBuzz_moveStarb","AUBuzz_moveStarc",
	"AUBuzz_moveStard","AUBuzz_moveStare","AUBuzze_sou2Attaa","AUBuzze_sou2Attab","AUBuzze_sou2Attac","AUBuzze_sou2Attad","AUBuzze_mov2Stara","AUBuzze_mov2Starb","AUBuzze_mov2Starc","AUBuzze_mov2Stard","AUBuzze_sounAttaa","AUBuzze_sounAttab","AUBuzze_sounAttac","AUBuzze_sounAttad","AUBuzz_moveAttaa","AUBuzz_moveAttab","AUBuzz_moveAttac","AUBuzz_moveAttad","AUBuzz_moveAttae","AUBuzze_sounSeled","AUBuzze_sou2Movea","AUBuzze_sounSelea","AUBuzze_sounSeleb","AUBuzze_sounSelec","AUBuzze_sounSeled","AUBuzze_sounJoina","AUBuzze_sou2Movea","AUBuzze_sou2Moveb","AUBuzze_sou2Movec","AUBuzze_sou2Moved","AUBuzz_sounSelea","AUBuzz_sounSeleb","AUBuzz_sounSelec","AUBuzz_sounSeled","AUBuzz_sounSelee","AUBuzze_sounSplia","AUBuzze_uncombina","AUBuzze_uncombinb","AUBuzze_uncombinc","AUBuzze_weapFirea","AUBuzze_weapFireb","AUBuzze_weapFirec","AUBuzze_weapFired","AUBuzze_weapFiree","AUBuzze_weapFiref","AUBuzze_weapFireg","AUBuzze_weapFireh","AUBuzze_weapFirei","AUBuzze_weapFirej","AUBuzze_weapFirek","AUCorru_movStarta","AUCorru_movStartb","AUCorru_movStartc","AUCorru_movStartd","AUCorru_movStarte","AUCorru_movStartf","AUCorru_sounAttaa","AUCorru_sounAttab","AUCorru_sounAttac","AUCorru_sounAttad","AUCorru_sounAttae","AUCorru_sounAttaf","AUCorru_sounAttag","AUCorru_sounAttah","AUCorru_sounAttai","AUCorru_sounAttaj","AUCorru_sounCreaa","AUCorru_sounDiea","AUCorru_sounDieb","AUCorru_sounDiec","AUCorru_sounDied","AUCorru_sounDiee","AUCorru_sounDief","AUCorru_sounDieg","AUCorru_sounDieh","AUCorru_sounDiei","AUCorru_sounDiej","AUCorru_sounFirea","AUCorru_sounFireb","AUCorru_weaFir2La","AUCorru_weaFir2Lb","AUCorru_weaFir2Lc","AUCorru_sounMovea","AUCorru_sounMoveb","AUCorru_sounMovec","AUCorru_sounMoved","AUCorru_sounMovee","AUCorru_sounMovef","AUCorru_sounMoveg","AUCorru_sounMoveh","AUCorru_sounMovei","AUCorru_sounSelea","AUCorru_sounSeleb","AUCorru_sounSelec","AUCorru_sounSeled","AUCorru_sounSelee","AUCorru_sounSelef","AUCorru_sounSeleg","AUCorru_sounSeleh","AUCorru_sounSelei","AUCorru_sounSelej","AUCorru_sounSpeca","AUCorru_sounSpecb","AUCorru_sounSpecc","AUCulti_souSelecta","AUCulti_souSelectb","AUCulti_souSelectc","AUCulti_souSelectd","AUCulti_souSelecte","AUCulti_souSelectf","AUCulti_souSelectg","AUCulti_souSelecth","AUCulti_souSelecti","AUCulti_souSelectj","AUCulti_souSelectk","AUCulti_diea","AUCulti_dieb","AUCulti_diec","AUCulti_died","AUCulti_diee","AUCulti_dief","AUCulti_dieg","AUCulti_dieh","AUCulti_diei","AUCulti_diej","AUCulti_diek","AUCulti_diel","AUCulti_diem","AUCulti_dien","AUMaste_maniStara","AUMaste_maniStarb","AUMaste_maniStarc","AUCulti_souAttacka","AUCulti_souAttackb","AUCulti_souAttackc","AUCulti_souAttackd","AUCulti_souAttacke","AUCulti_souAttackf","AUCulti_souAttackg","AUCulti_souAttackh","AUCulti_souMovAtta","AUCulti_souMovAttb","AUCulti_souMovAttc","AUCulti_souMovAttd","AUCulti_souMovAtte","AUCulti_souMovAttf","AUCulti_souMovAttg","AUCulti_souCreatea","AUCulti_souCreateb","AUCulti_souCreatec","AUCulti_souCreated","AUCulti_souCreatee","AUCulti_souCreatef","AUCulti_souDiea","AUCulti_souDieb","AUCulti_souDiec","AUCulti_souDied","AUCulti_souDiee","AUCulti_souDief","AUCulti_souDieg","AUCulti_souDieh","AUCulti_souDiei","AUCulti_souDiej","AUCulti_souDiek","AUCulti_souDiel","AUCulti_souMovea","AUCulti_souMoveb","AUCulti_souMovec","AUCulti_souMoved","AUCulti_souMovee","AUCulti_souMovef","AUCulti_souMoveg","AUCulti_souMoveh","AUCulti_souMovei","AUCulti_souMovej","AUCulti_souGarrisa","AUCulti_souGarrisb","AUCulti_souGarrisc","AUCulti_souGarrisd","AUCulti_souGarrise","AUCulti_souGarrisf","AUCulti_souGarrisg","AUCulti_voiDiea","AUCulti_voiDieb","AUCulti_voiDiec","AUCulti_voiDied","AUCulti_voiDiee","AUCulti_voiDief","AUCulti_voiDieg","AUCulti_voiDieh","AUCulti_voiDiei","AUCulti_voiDiej","AUCulti_voiDiek","AUAnnih_ambiLoo2a","AUAnnih_ambiLoo2b","AUAnnih_ambiLoo2c","AUAnnih_ambiLoo2d","AUAnnih_ambiLoo2e","AUAnnih_ambiLoo2f","AUAnnih_ambiLoo2g","AUAnnih_ambiLoo2h","AUAnnih_ambiLoo2i","AUAnnih_ambiLoo2j","AUAnnih_ambiLoo2k","AUAnnih_ambiLoo2l","AUAnnih_ambiLoo2m","AUAnnih_ambiLoo2n","AUDevas_diea","AUDevas_dieb","AUDevas_diec","AUDevas_died","AUDevas_diee","AUDevas_weaFira","AUDevas_weaFirb","AUDevas_weaFirc",
	"AUDevas_weaFird","AUDevas_shotimpacta","AUDevas_shotimpactb","AUDevas_moveLoopa","AUDevas_moveLoopb","AUDevas_moveLoopc","AUDevas_moveStara","AUDevas_moveStarb","AUDevas_moveStarc","AUDevas_moveStard","AUDevas_moveStare",	"AUDevas_sounAttaa","AUDevas_sounAttab","AUDevas_sounAttac","AUDevas_sounAttad","AUDevas_sounAttae","AUDevas_sounAttaf","AUDevas_sounAttag","AUDevas_sounAttah","AUDevas_sounCreaa","AUDevas_sounDiea","AUDevas_sounDieb","AUDevas_sounDiec","AUDevas_sounDied","AUDevas_sounMovea","AUDevas_sounMoveb","AUDevas_sounMovec","AUDevas_sounMoved","AUDevas_sounMovee","AUDevas_sounMovef","AUDevas_sounMoveg","AUDevas_sounMoveh","AUDevas_sounMovei","AUDevas_sounSelea","AUDevas_sounSeleb","AUDevas_sounSelec","AUDevas_sounSeled","AUDevas_sounSelee","AUDevas_sounSelef","AUDevas_sounSeleg","AUDevas_sounSeleh","AUDevas_sounSelei","AUDevas_sounSpeca","AUDevas_sounSpecb","AUDevas_sounSpecc","AUSeeke_sounSelea","AUSeeke_sounSeleb","AUSeeke_sounSelec","AUSeeke_sounSeled","AUSeeke_sounSelee","AUDevou_wea1Firea","AUDevou_wea1Fireb","AUDevou_wea1Firec","AUDevou_wea1Fired","AUDevou_wea1Firee","AUDevou_wea1Firef","AUDevou_wea1Fireg","AUDevou_wea1Fireh","AUDevou_wea1Firei","AUDevou_wea2Fira","AUDevou_wea2Firb","AUDevou_wea2Firc","AUDevou_wea2Fird","AUDevou_wea2Fire","AUDevou_wea2Firf","AUDevou_wea1Loopa","AUDevou_wea1Loopb","AUDevou_wea1Loopc","AUDevou_wea1Loopd","AUDevou_convBeama","AUDevou_convBeamb","AUDevou_diea","AUDevou_dieb","AUDevou_diec","AUDevou_died","AUDevou_diee","AUDevou_dief","AUSeeke_idleLoopa","AUSeeke_idleLoopb","AUSeeke_idleLoopc","AUSeeke_idleLoopd","AUSeeke_idleLoope","AUSeeke_idleLoopf","AUSeeke_idleLoopg","AUSeeke_idleLooph","AUSeeke_idleLoopi","AUSeeke_idleLoopj","AUSeeke_idleLoopk","AUSeeke_idleLoopl","AUSeeke_moveStara","AUSeeke_moveStarb","AUSeeke_moveStarc","AUSeeke_moveStard","AUSeeke_moveStare","AUSeeke_moveStarf","AUSeeke_moveStarg","AUSeeke_moveStarh","AUSeeke_moveStari","AUDevou_sounAttaa","AUDevou_sounAttab","AUDevou_sounAttac","AUDevou_sounAttad","AUDevou_sounAttae","AUDevou_sounAttaf","AUDevou_sounAttag","AUDevou_sounSpeca","AUDevou_sounCreaa","AUDevou_sounMovea","AUDevou_sounMoveb","AUDevou_sounMovec","AUDevou_sounMoved","AUDevou_sounMovee","AUDevou_sounMovef","AUDevou_sounMoveg","AUDevou_sounMoveh","AUDevou_sou2Selea","AUDevou_sou2Seleb","AUDevou_sou2Selec","AUDevou_sou2Seled","AUDevou_sou2Selee","AUDevou_sou2Selef","AUDevou_sou2Seleg","AUDevou_sou2Seleh","AUDisin_sounAttaa","AUDisin_sounAttab","AUDisin_sounAttac","AUDisin_sounAttad","AUDisin_sounAttae","AUDisin_sounAttaf","AUDisin_sounSelea","AUDisin_sounSeleb","AUDisin_sounSelec","AUDisin_sounSeled","AUDisin_sounSelee","AUDisin_sounSelef","AUDisin_sounDiea","AUDisin_sounDieb","AUDisin_sounDiec","AUDisin_sounDied","AUDisin_sounDiee","AUDisin_sounDief","AUDisin_sounDieg","AUDisin_sounMovea","AUDisin_sounMoveb","AUDisin_sounMovec","AUDisin_sounMoved","AUDisin_sounMovee","AUDisin_sounMovef","AUDisin_sounMoveg","AUDisin_sounSelea","AUDisin_sounSeleb","AUDisin_sounSelec","AUDisin_sounSeled","AUDisin_sounSelee","AUDisin_sounSelef","AURazor_moveStara","AURazor_moveStarb","AURazor_moveStarc","AURazor_moveStard","AURazor_moveStare","AURazor_moveStarf","AURazor_sounSelea","AURazor_sounSeleb","AURazor_sounSelec","AURazor_sounSeled","AURazor_sounSelee","AURazor_sounSelef","AURazor_sounSeleg","AURazor_wea1Firea","AURazor_wea1Fireb","AURazor_wea1Firec","AURazor_wea1Fired","AURazor_wea1Firee","AURazor_wea1Firef","AURazor_wea1Fireg","AURazor_wea1Fireh","AURazor_wea1Firei","AUDrone_moveDeploya","AUDrone_moveDeployb","AUDrone_moveDeployc","AUDrone_moveLoopa","AUDrone_moveLoopb","AUDrone_moveLoopc","AUDrone_moveLoopa","AUDrone_moveLoopb","AUDrone_moveLoopc","AUDrone_moveStara","AUDrone_moveStarb","AUDrone_moveStarc","AUDrone_moveStard","AUDrone_moveStare","AUDrone_sounCreaa","AUDrone_sounCreaa","AUMothe_sounDiea","AUMothe_sounDieb","AUDrone_sounSpecb","AUDrone_sounSelea","AUDrone_sounSeleb","AUDrone_sounSelec","AUDrone_sounSeled","AUDrone_sounSelee","AUDrone_sounSpeca","AUEradi_ambiSelea",
	"AUEradi_ambiSeleb","AUEradi_ambiSelec","AUEradi_ambiSeled","AUEradi_ambiSelee","AUEradi_ambiSelef","AUEradi_ambiSeleg","AUEradi_ambiSeleh","AUEradi_ambiSelei","GUTitan_cannonHitg","WADirt_fall_1a","WADirt_fall_1b","WADirt_fall_1c","WADirt_fall_1d","WADirt_fall_1e","WADirt_fall_1f","WADirt_fall_1g","WADirt_fall_1h","WADirt_fall_1a","WADirt_fall_1b","WADirt_fall_1c","WADirt_fall_1d","WADirt_fall_1e","WADirt_fall_1f","WADirt_fall_1g","WADirt_fall_1h","ASWormh_entera","ASWormh_enterb","ASWormh_enterc","ASWormh_enterd","ASWormh_entere","ASWormh_enterf","GUTitan_cannonHita","GUTitan_cannonHitb","GUTitan_cannonHitc","GUTitan_cannonHitd","GUTitan_cannonHite","GUTitan_cannonHitf","GUTitan_cannonHitg","AUEradi_footstepa","AUEradi_footstepb","AUEradi_footstepc","AUEradi_footstepd","AUEradi_footstepe","Aupgra_AdvaArtia","AUAssim_sounAttaa","AUAssim_sounAttab","AUAssim_sounAttac","AUAssim_sounAttad","AUAssim_sounAttae","","AUAssim_sounAttaf","AUAssim_sounAttag","AUAssim_sounAttah","AUAssim_sounAttai","AUAssim_sounAttaj","AUAssim_sounAttaa","AUAssim_sounAttab","AUAssim_sounAttac","AUAssim_sounAttad","AUAssim_sounAttae","","AUAssim_sounAttaf","AUAssim_sounAttag","AUAssim_sounAttah","AUAssim_sounAttai","AUAssim_sounAttaj","AUEradi_sounAttaa","AUEradi_sounAttab","AUEradi_sounAttac","AUEradi_sounMovea","AUEradi_sounMoveb","AUEradi_sounMovec","AUEradi_sounSelea","AUEradi_sounSeleb","AUEradi_sounCreaa","AUEradi_sounCreaa","AUEradi_sounDiea","AUEradi_sounDieb","AUEradi_sounDiec","AUProdi_sounDiea","AUProdi_sounDieb","AUProdi_sounDiec","AUProdi_sounDied","AUProdi_sounDiee","AUProdi_sounDief","AUProdi_sounDieg","AUProdi_sounDieh","AUProdi_sounDiei","AUProdi_sounDiej","AUEradi_sounAttaa","AUEradi_sounAttab","AUEradi_sounAttac","AUEradi_sounMovea","AUEradi_sounMoveb","AUEradi_sounMovec","AUEradi_sounSelea","AUEradi_sounSeleb","AUEradi_sounAttaa","AUEradi_sounAttab","AUEradi_sounAttac","AUEradi_sounMovea","AUEradi_sounMoveb","AUEradi_sounMovec","AUEradi_sounSelea","AUEradi_sounSeleb","AUAssim_sounAttaa","AUAssim_sounAttab","AUAssim_sounAttac","AUAssim_sounAttad","AUAssim_sounAttae","","AUAssim_sounAttaf","AUAssim_sounAttag","AUAssim_sounAttah","AUAssim_sounAttai","AUAssim_sounAttaj","AUShock_sounTelea","AUShock_sounTeleb","AUHarve_diea","AUDevas_weaFira","AUDevas_weaFirb","AUDevas_weaFirc","AUDevas_weaFird","AUSeeke_shotimpacta","AUSeeke_shotimpactb","AUSeeke_shotimpactc","AUSeeke_shotimpactd","AUExplo_seleAmbia","AUExplo_sounDeploya","AUExplo_sounDeployb","AUExplo_sounDeployc","AUExplo_sounDeployd","AUExplo_diea","AUExplo_dieb","AUExplo_diec","AUExplo_died","AUExplo_idleLoopa","AUExplo_idleLoopb","AUExplo_moveStara","AUExplo_moveStarb","AUExplo_moveStarc","AUExplo_moveStard","AUExplo_sounSpeca","AUExplo_sounMovea","AUExplo_sounMoveb","AUExplo_sounMovec","AUExplo_sounMoved","AUExplo_sounMovee","AUExplo_sounMovef","AUExplo_sounSpecb","AUExplo_sounSelea","AUExplo_sounSeleb","AUExplo_sounSelec","AUExplo_sounSeled","AUExplo_sounSelee","AUExplo_sounSpecb","AUGunWa_moveLoop2a","AUGunWa_moveLoop2b","AUGunWa_moveLoop2c","AUGunWa_moveLoop2d","AUGunWa_moveLoop2e","AUGunWa_moveLoop2f","AUGunWa_moveLoop2g","AUGunWa_moveLoop2h","AUGunWa_moveStara","AUGunWa_moveStarb","AUGunWa_moveStarc","AUGunWa_moveStard","AUGunWa_moveStare","AUGunWa_moveStarf","AUGunWa_moveStarg","AUGunWa_moveStarh","AUStalk_weapFire1a","AUStalk_weapFire1b","AUStalk_weapFire1c","AUStalk_weapFire1d","AUStalk_weapFire1e","AUStalk_weapFire1f","AUStalk_weapFire1g","AUStalk_weapFire1h","AUStalk_weapFire1i","AUStalk_weapFire1a","AUStalk_weapFire1b","AUStalk_weapFire1c","AUStalk_weapFire1d","AUStalk_weapFire1e","AUStalk_weapFire1f","AUStalk_weapFire1g","AUStalk_weapFire1h","AUStalk_weapFire1i","AUStalk_weapFire2a","AUStalk_weapFire2b","AUStalk_weapFire2c","AUStalk_weapFire2d","AUStalk_weapFire2e","AUStalk_weapFire2f","AUStalk_weapFire2g","AUStalk_weapFire2h","AUStalk_weapFire2i","AUStalk_weapFire2a","AUStalk_weapFire2b","AUStalk_weapFire2c","AUStalk_weapFire2d","AUStalk_weapFire2e","AUStalk_weapFire2f","AUStalk_weapFire2g","AUStalk_weapFire2h","AUStalk_weapFire2i","AUGunWa_sounAttaa","AUGunWa_sounAttab",
	"AUGunWa_sounAttac","AUGunWa_sounAttad","AUGunWa_sounAttae","AUGunWa_sounAttaf","AUGunWa_sounAttag","AUGunWa_sounSelea","AUGunWa_sounSeleb","AUGunWa_sounSelec","AUGunWa_sounSeled","AUGunWa_sounSelee","AUGunWa_sounSelef","AUGunWa_sounSeleg","AUGunWa_sounDiea","AUGunWa_sounDieb","AUGunWa_sounDiec","AUGunWa_sounDied","AUGunWa_sounDiee","AUGunWa_sounDief","AUGunWa_sounMovea","AUGunWa_sounMoveb","AUGunWa_sounMovec","AUGunWa_sounMoved","AUGunWa_sounMovee","AUGunWa_sounMovef","AUGunWa_sounMoveg","AUGunWa_sounMoveh","AUGunWa_sounSelea","AUGunWa_sounSeleb","AUGunWa_sounSelec","AUGunWa_sounSeled","AUGunWa_sounSelee","AUGunWa_sounSelef","AUGunWa_sounSeleg","AUGunWa_weaFira","AUGunWa_weaFirb","AUGunWa_weaFirc","AUHarve_moveStara","AUHarve_moveStarb","AUHarve_moveStarc","AUHarve_moveStard","AUHarve_moveStare","AUHarve_moveStarf","AUHarve_ambiSelea","AUHarve_ambiSeleb","AUHarve_ambiSelec","AUHarve_diea","AUHarve_dieb","AUHarve_diec","AUHarve_died","AUHarve_diee","AUHarve_dief","AUPlanet_sounStorm2La","AUPlanet_sounStorm2Lb","AUPlanet_sounStorm2Lc","NIonSt_sparks1a","NIonSt_sparks1b","NIonSt_sparks1c","NIonSt_sparks1d","NIonSt_sparks1e","NIonSt_sparks1f","NIonSt_sparks1g","NIonSt_sparks1h","AUHarve_moveStara","AUHarve_moveStarb","AUHarve_moveStarc","AUHarve_moveStard","AUHarve_moveStare","AUHarve_moveStarf","AUHarve_sounCreaa","AUHarve_sounHarva","AUHarve_sounHarvb","AUHarve_sounHarvc","AUHarve_sounHarvd","AUHarve_sounMovea","AUHarve_sounMoveb","AUHarve_sounMovec","AUHarve_sounMoved","AUHarve_sounMovee","AUHarve_sounMovef","AUHarve_sounMoveg","AUHarve_sounMoveh","AUHarve_sounRetra","AUHarve_sounRetrb","AUHarve_sounRetrc","AUHarve_sounRetrd","AUHarve_sounRetre","AUHarve_sounSelea","AUHarve_sounSeleb","AUHarve_sounSelec","AUHarve_sounSeled","AUHarve_sounSelee","AUMaste_maniStarb","AUMaste_maniStara","AUMaste_maniStarc","AUMaste_manipulaL2a","AUMaste_manipulaL2b","AUMaste_manipulaL2c","AUMaste_movStarta","AUMaste_movStartb","AUMaste_movStartc","AUMaste_sou2Attaa","AUMaste_sou2Attab","AUMaste_sou2Attac","AUMaste_sou2Attad","AUMaste_sou2Selec","AUMaste_sou2Diea","AUMaste_sou2Dieb","AUMaste_sou2Diec","AUMaste_sou2Died","AUMaste_sou2Diee","AUMaste_sou2Movea","AUMaste_sou2Moveb","AUMaste_sou2Movec","AUMaste_sou2Selea","AUMaste_sou2Seleb","AUMaste_sou2Selec","AUMaste_sou2Seled","AUMaste_sou2Selee","AUMaste_sounTakea","AUMaste_sounTakeb","AUMaste_sounTakec","AUMaste_sounTelea","AUMaste_sounTeleb","AUMaste_sounTelec","AUMaste_sounTeled","AUMaste_sounTelea","AUMaste_sounTeleb","AUMaste_sounTelec","AUMaste_sounTeled","AUMaste_teleFira","AUMaste_teleFirb","AUMaste_weaFira","AUMaste_weaFirb","AUMaste_weaFirc","AUMaste_weaFird","AUMecha_create3a","AUMecha_create3b","AUMecha_create3c","AUMecha_create3d","AUMecha_create3e","AUMecha_create3f","AUMecha_sounDiea","AUMecha_sounDieb","AUMecha_sounDiec","AUMecha_sounDied","AUMecha_sounDiee","AUMecha_sounDief","AUMecha_sounDieg","AUMecha_create2a","AUMecha_create2b","AUMecha_create2c","AUMecha_create2d","AUMecha_create2e","AUMecha_create2f","AUMecha_create1a","AUMecha_create1b","AUMecha_create1c","AUMecha_create1d","AUMecha_create1e","AUMecha_create1f","AUMecha_move1L3a","AUMecha_move1L3b","AUMecha_move1L3c","AUMecha_move1L3d","AUMecha_move1L3e","AUMecha_move1L3f","AUMecha_move1L3g","AUMecha_move1L3h","AUMecha_move1L2a","AUMecha_move1L2b","AUMecha_move1L2c","AUMecha_move1L2d","AUMecha_move1L2e","AUMecha_move1L2f","AUMecha_move1L2g","AUMecha_move1L2h","AUMecha_move1L2i","AUMecha_move1L2j","AUMecha_move1L2k","AUMecha_move1L2l","AUMecha_move1L2m","AUMecha_move1L2n","AUMecha_move1L2o","AUMecha_move1L2p","AUMecha_create1a","AUMecha_create1b","AUMecha_create1c","AUMecha_create1d","AUMecha_create1e","AUMecha_create1f","AUMecha_sounAttaa","AUMecha_sounAttab","AUMecha_sounAttac","AUMecha_sounMovea","AUMecha_sounMoveb","AUMecha_sounMovec","AUMecha_sounMoved","AUMecha_sounSelea","AUMecha_sounSeleb","AUMecha_sounSelec","AUMecha_sounSeled","AUMecha_sounCreaa","AUMecha_sounDiea","AUMecha_sounDieb",
	"AUMecha_sounDiec","AUMecha_sounDied","AUMecha_sounDiee","AUMecha_sounDief","AUMecha_sounDieg","AUMecha_sounAttaa","AUMecha_sounAttab","AUMecha_sounAttac","AUMecha_sounMovea","AUMecha_sounMoveb","AUMecha_sounMovec","AUMecha_sounMoved","AUMecha_sounSelea","AUMecha_sounSeleb","AUMecha_sounSelec","AUMecha_sounSeled","AUMecha_sounAttaa","AUMecha_sounAttab","AUMecha_sounAttac","AUMecha_sounMovea","AUMecha_sounMoveb","AUMecha_sounMovec","AUMecha_sounMoved","AUMecha_sounSelea","AUMecha_sounSeleb","AUMecha_sounSelec","AUMecha_sounSeled","AUAnnih_ambiLoo1a","AUAnnih_ambiLoo1b","AUAnnih_ambiLoo1c","AUAnnih_ambiLoo1d","AUAnnih_ambiLoo1e","AUAnnih_ambiLoo1f","AUAnnih_ambiLoo1g","AUAnnih_ambiLoo1h","AUAnnih_ambiLoo1i","AUAnnih_ambiLoo1j","AUAnnih_ambiLoo1k","AUAnnih_ambiLoo1l","AUMothe_moveLoopa","AUMothe_moveLoopb","AUMothe_moveLoopc","AUMothe_moveLoopd","AUMothe_moveLoope","AUMothe_moveLoopf","AUMothe_moveLoopg","AUMothe_moveL2a","AUMothe_moveL2b","AUMothe_moveL2c","AUMothe_moveL2d","AUMothe_moveL2e","AUMothe_moveL2f","AUMothe_moveL2g","AUMothe_moveL2h","AUMothe_sounAttaa","AUMothe_sounAttab","AUMothe_sounAttac","AUMothe_sounAttad","AUMothe_sounCreaa","AUMothe_sounDiea","AUMothe_sounDieb","AUMothe_sounMovea","AUMothe_sounMoveb","AUMothe_sounMovec","AUMothe_sounMoved","AUMothe_sounMovee","AUMothe_sounMovef","AUMothe_sounSelea","AUMothe_sounSeleb","AUMothe_sounSelec","AUMothe_sounSeled","AUMothe_sounSelee","AUMothe_sounSelef","AUMothe_sounSeleg","AUMothe_weaFirea_st","AUMothe_weaFirea_m","AUMothe_weaFirea","AUMothe_weaPowerupa","thisoneisslightlylong","AUMothe_weaPowerupb","AUMothe_weaPowerupa_m","AUPlanet_idleLoopa","AUPlanet_idleLoopb","AUPlanet_idleLoopc","AUPlanet_idleLoopd","AUPlanet_idleLoope","AUPlanet_idleLoopf","AUPlanet_idleLoopg","AUPlanet_moveLoopa","AUPlanet_moveLoopb","AUPlanet_moveLoopc","AUPlanet_moveLoopd","AUPlanet_moveLoope","AUPlanet_moveLoopf","AUPlanet_moveLoopg","AUPlanet_moveLooph","AUPlanet_moveLoopi","AUPlanet_sounAttaa","AUPlanet_sounAttab","AUPlanet_sounAttac","AUPlanet_sounAttad","AUPlanet_sounAttae","AUPlanet_sounAttaf","AUPlanet_sounSelea","AUPlanet_sounSeleb","AUPlanet_sounSelec","AUPlanet_sounSeled","AUPlanet_sounSelee","AUPlanet_sounSelef","AUPlanet_sounSeleg","AUPlanet_sounSeleh","AUPlanet_sounSelei","AUPlanet_sounSelej","AUPlanet_sounSelek","AUPlanet_dieMaina","AUPlanet_dieMainb","AUPlanet_dieMainc","AUPlanet_dieMaind","AUPlanet_dieMaine","AUPlanet_dieSmalla","AUPlanet_dieSmallb","AUPlanet_dieSmallc","AUPlanet_dieSmalld","AUPlanet_dieSmalle","AUPlanet_dieSmallf","AUPlanet_moveStara","AUPlanet_moveStarb","AUPlanet_moveStarc","AUPlanet_moveStard","AUPlanet_moveStare","AUPlanet_moveStarf","AUPlanet_sounSelea","AUPlanet_sounSeleb","AUPlanet_sounSelec","AUPlanet_sounSeled","AUPlanet_sounSelee","AUPlanet_sounSelef","AUPlanet_sounSeleg","AUPlanet_sounSeleh","AUPlanet_sounSelei","AUPlanet_sounSelej","AUPlanet_sounSelek","AUPlanet_sounStorm2La","AUPlanet_sounStorm2Lb","AUPlanet_sounStorm2Lc","NIonSt_sparks1a","NIonSt_sparks1b","NIonSt_sparks1c","NIonSt_sparks1d","NIonSt_sparks1e","NIonSt_sparks1f","NIonSt_sparks1g","NIonSt_sparks1h","AUPlanet_invaWeapa","AUPlanet_invaWeapb","AUPlanet_invaWeapc","AUPlanet_invaWeapd","AUPlanet_invaWeape","AUPlanet_invaWeapf","AUPlanet_invaWeapg","AUPlanet_invaWeaph","AUPlanet_invaWeapi","AUPlanet_invaWeapj","AUPlanet_invaWeapk","AUPlanet_invaWeapl","AUPlanet_invaWeapm","AUPlanet_invaWeapn","AUPlanet_invaMovea","AUPlanet_invaMoveb","AUPlanet_invaMovec","AUPlanet_invaMoved","AUPlanet_invaMovee","AUPlanet_invaLauna","AUPlanet_invaLaunb","AUPlanet_invaLaunc","AUPlanet_invaLaund","AUPlanet_invaLaune","AUPlanet_invaAttaa","AUPlanet_invaAttab","AUPlanet_invaAttac","AUPlanet_invaAttad","AUPlanet_invaAttae","AUPlanet_invaAttaf","AUPlanet_invaAttag","AUPlanet_invaAttah","AUPlanet_invaAttai","AUPlanet_invaAttaj",	"AUPlanet_invaDocka","AUPlanet_invaDockb","AUPlanet_invaDockc","AUPlanet_invaDockd","AUPlanet_invaDocke","AUPlanet_invaDockf","AUPlanet_invaDockg","AUPlanet_invaDockh","AUPlanet_invaDocki","AUPlanet_invaDockj","AUProdi_areaMinda","AUProdi_diea","AUProdi_dieb","AUProdi_diec","AUProdi_died",
	"AUProdi_diee","AUProdi_sounDiea","AUProdi_sounDieb","AUProdi_sounDiec","AUProdi_sounDied","AUProdi_sounDiee","AUProdi_sounDief","AUProdi_sounDieg","AUProdi_sounDieh","AUProdi_sounDiei","AUProdi_sounDiej","AUProdi_sounAreaa","AUProdi_movStarta","AUProdi_movStartb","AUProdi_movStartc","AUProdi_sounBlina","AUProdi_soundCreaa","AUProdi_sounGarria","AUProdi_sounMania","AUProdi_sounMovea","AUProdi_sounMoveb","AUProdi_sounMovec","AUProdi_sounMoved","AUProdi_sounMovee","AUProdi_sounMovef","AUProdi_sounSelea","AUProdi_sounSeleb","AUProdi_sounSelec","AUProdi_sounSeled","AUProdi_sounSelee","AUProdi_sounSelef","AUProdi_sounTelea","AUReTri_wea2Firea","AUReTri_wea2Fireb","AUReTri_wea2Firec","AUReTri_wea2Fired","AUReTri_wea2Firee","AUReTri_wea2Firef","AUReTri_wea2Fireg","AUReTri_wea2Fireh","AUReTri_wea2Firea","AUReTri_wea2Fireb","AUReTri_wea2Firec","AUReTri_wea2Fired","AUReTri_wea2Firee","AUReTri_wea2Firef","AUReTri_wea2Fireg","AUReTri_wea2Fireh","AUDevou_sounSelea","AUDevou_sounSeleb","AUDevou_sounSelec","AUDevou_sounSeled","AUDevou_sounSelee","AUSeeke_Diea","AUSeeke_Dieb","AUSeeke_Diec","AUSeeke_Died","AUShock_wea2Firea","AUShock_wea2Fireb","AUShock_wea2Firec","AUShock_wea2Fired","AUShock_wea2Firee","AUShock_wea2Firef","AUShock_wea2Fireg","AUShock_wea2Fireh","AUShock_wea2Firei","AUShock_wea2Firej","AUShock_wea2Firek","AUShock_wea2Firel","AUShock_wea2Firem","AUShock_wea2Firen","AUShock_wea2Fireo","AUShock_wea2Firep","AUDevou_idleLoopa","AUDevou_idleLoopb","AUDevou_idleLoopc","AUDevou_idleLoopd","AUDevou_idleLoope","AUDevou_idleLoopf","AUDevou_idleLoopg","AUDevou_idleLooph","AUDevou_idleLoopi","AUDevou_idleLoopj","AUDevou_idleLoopk","AUDevou_idleLoopl","AUDevou_moveStara","AUDevou_moveStarb","AUDevou_moveStarc","AUDevou_moveStard","AUDevou_moveStare","AUDevou_moveStarf","AUDevou_moveStarg","AUStalk_weapFire1a","AUStalk_weapFire1b","AUStalk_weapFire1c","AUStalk_weapFire1d","AUStalk_weapFire1e","AUStalk_weapFire1f","AUStalk_weapFire1g","AUStalk_weapFire1h","AUStalk_weapFire1i","AUSeeke_sounAttaa","AUSeeke_sounAttab","AUSeeke_sounAttac","AUSeeke_sounAttad","AUSeeke_sounAttae","AUSeeke_sounCreaa","AUSeeke_sounMovea","AUSeeke_sounMoveb","AUSeeke_sounMovec","AUSeeke_sounMoved","AUSeeke_sounMovee","AUSeeke_sou2Selea","AUSeeke_sou2Seleb","AUSeeke_sou2Selec","AUSeeke_sou2Seled","AUSeeke_sou2Selee","AUSeeke_shotimpacta","AUSeeke_shotimpactb","AUSeeke_shotimpactc","AUSeeke_shotimpactd","AUGunWa_sounAttaa","AUGunWa_sounAttab","AUGunWa_sounAttac","AUGunWa_sounAttad","AUGunWa_sounAttae","AUGunWa_sounAttaf","AUGunWa_sounAttag","AUGunWa_sounSelea","AUGunWa_sounDiea","AUGunWa_sounDieb","AUGunWa_sounDiec","AUGunWa_sounDied","AUGunWa_sounDiee","AUGunWa_sounDief","AUGunWa_sounMovea","AUGunWa_sounMoveb","AUGunWa_sounMovec","AUGunWa_sounMoved","AUGunWa_sounMovee","AUGunWa_sounMovef","AUGunWa_sounMoveg","AUGunWa_sounMoveh","AUGunWa_sounSelea","AUGunWa_sounSeleb","AUGunWa_sounSelec","AUGunWa_sounSeled","AUGunWa_sounSelee","AUGunWa_sounSelef","AUGunWa_sounSeleg","AUShock_teleUpgra","AUShock_teleUpgrb","AUShock_teleUpgrc","AUShock_teleUpgrd","AURazor_moveStara","AURazor_moveStarb","AURazor_moveStarc","AURazor_moveStard","AURazor_moveStare","AURazor_moveStarf","AUShock_wea2Firea","AUShock_wea2Fireb","AUShock_wea2Firec","AUShock_wea2Fired","AUShock_wea2Firee","AUShock_wea2Firef","AUShock_wea2Fireg","AUShock_wea2Fireh","AUShock_wea2Firei","AUShock_wea2Firej","AUShock_wea2Firek","AUShock_wea2Firel","AUShock_wea2Firem","AUShock_wea2Firen","AUShock_wea2Fireo","AUShock_wea2Firep","AUShock_plasUpgra","AUShock_plasUpgrb","AUShock_plasUpgrc","AUShock_plasUpgrd","AUShock_wea1Firea","AUShock_wea1Fireb","AUShock_wea1Firec","AUShock_wea1Fired","AUShock_wea1Firee","AUShock_wea1Firef","AUShock_wea1Fireg","AUShock_wea1Fireh","AUShock_wea1Firei","AUShock_wea1Firej","AUShock_wea1Firek","AUShock_wea1Firel","AUShock_wea1Firem","AUShock_wea1Firen","AUShock_wea1Fireo","NBObeli_wea2Firea","NBObeli_wea2Fireb","NBObeli_wea2Firec","NBObeli_wea2Fired","NBObeli_wea2Firee","NBObeli_wea2Firef","NBObeli_wea2Fireg","NBObeli_wea2Fireh","NBObeli_wea2Firei",
	"NBObeli_wea2Firej","AUShock_sounAttaa","AUShock_sounAttab","AUShock_sounAttac","AUShock_sounAttad","AUShock_sounAttae","AUShock_sounAttaf","AUShock_sounAttag","AUShock_sounAttah","AUShock_sounAttai","AUShock_sounSelea","AUShock_sounSeleb","AUShock_sounSelec","AUShock_sounSeled","AUShock_sounSelee","AUShock_sounSelef","AUShock_sounSeleg","AUShock_sounSeleh","AUShock_sounSelei","AUShock_sounSelej","AUShock_die2a","AUShock_die2b","AUShock_die2c","AUShock_die2d","AUShock_die2e","AUShock_die2f","AUShock_die2g","AUShock_sounDiea","AUShock_sounDieb","AUShock_sounDiec","AUShock_sounDied","AUShock_sounDiee","AUShock_sounDief","AUShock_sounDieg","AUShock_sounDieh","AUShock_sounDiei","AUShock_sounDiej","AUShock_sounDiek","AUShock_sounMovea","AUShock_sounMoveb","AUShock_sounMovec","AUShock_sounMoved","AUShock_sounMovee","AUShock_sounMovef","AUShock_sounMoveg","AUShock_sounMoveh","AUShock_sounMovei","AUShock_sounMovej","AUShock_sounMovek","AUShock_sounMovel","AUShock_sounMovem","AUShock_sounMoven","AUShock_sounMoveo","AUShock_sounMovep","AUShock_sounMoveq","AUShock_sounMover","AUShock_sounSelea","AUShock_sounSeleb","AUShock_sounSelec","AUShock_sounSeled","AUShock_sounSelee","AUShock_sounSelef","AUShock_sounSeleg","AUShock_sounSeleh","AUShock_sounSelei","AUShock_sounSelej","AUShock_sounTelea","AUShock_sounTeleb","AUShock_sounTeleStarta","AUShock_sounTeleStartb","Aupgra_sharLauna","Aupgra_blueShara","AUStalk_weapFire1a","AUStalk_weapFire1b","AUStalk_weapFire1c","AUStalk_weapFire1d","AUStalk_weapFire1e","AUStalk_weapFire1f","AUStalk_weapFire1g","AUStalk_weapFire1h","AUStalk_weapFire1i","AUStalk_weapFire2a","AUStalk_weapFire2b","AUStalk_weapFire2c","AUStalk_weapFire2d","AUStalk_weapFire2e","AUStalk_weapFire2f","AUStalk_weapFire2g","AUStalk_weapFire2h","AUStalk_weapFire2i","AUStalk_sounAttaa","AUStalk_sounAttab","AUStalk_sounAttac","AUStalk_sounAttad","AUStalk_sounAttae","AUStalk_sounAttaf","AUStalk_sounAttag","AUStalk_sounAttah","AUStalk_sounAttai","AUStalk_sounAttaj","AUStalk_sounAttak","AUStalk_sounAttal","AUStalk_sounAttam","AUStalk_sounCreab","AUStalk_sounCreaa","AUStalk_sounDiea","AUStalk_sounDieb","AUStalk_sounDiec","AUStalk_sounDied","AUStalk_sounDiee","AUStalk_sounDief","AUStalk_sounMovea","AUStalk_sounMoveb","AUStalk_sounMovec","AUStalk_sounMoved","AUStalk_sounMovee","AUStalk_sounMovef","AUStalk_sounMoveg","AUStalk_sounMoveh","AUStalk_sounMovei","AUStalk_sounMovej","AUStalk_sounMovek","AUStalk_sounMovel","AUStalk_sounMovem","AUStalk_sounMoven","AUStalk_sounMoveo","AUStalk_sounMovep","AUStalk_sounSelea","AUStalk_sounSeleb","AUStalk_sounSelec","AUStalk_sounSeled","AUStalk_sounSelee","AUStalk_sounSelef","AUStalk_sounSeleg","AUStalk_sounSeleh","AUStalk_sounSelei","AUStalk_sounSelej","AUStalk_sounSelek","AUStalk_sounSelel","AUStalk_sounSelem","AUStalk_sounSelen","AUStalk_sounSpeca","AUStalk_sounCreaa","AUShock_wea1Firea","AUShock_wea1Fireb","AUShock_wea1Firec","AUShock_wea1Fired","AUShock_wea1Firee","AUShock_wea1Firef","AUShock_wea1Fireg","AUShock_wea1Fireh","AUShock_wea1Firei","AUShock_wea1Firej","AUShock_wea1Firek","AUShock_wea1Firel","AUShock_wea1Firem","AUShock_wea1Firen","AUShock_wea1Fireo","AUStalk_weapFire2a","AUStalk_weapFire2b","AUStalk_weapFire2c","AUStalk_weapFire2d","AUStalk_weapFire2e","AUStalk_weapFire2f","AUStalk_weapFire2g","AUStalk_weapFire2h","AUStalk_weapFire2i","NBObeli_wea2Firea","NBObeli_wea2Fireb","NBObeli_wea2Firec","NBObeli_wea2Fired","NBObeli_wea2Firee","NBObeli_wea2Firef","NBObeli_wea2Fireg","NBObeli_wea2Fireh","NBObeli_wea2Firei","NBObeli_wea2Firej","AUStorm_weaFria","AUStorm_weaFrib","AUStorm_weaFric","AUStorm_weaFrid","AUStorm_moveLoopa","AUStorm_moveLoopb","AUStorm_moveLoopc","AUStorm_moveLoopd","AUStorm_moveLoope","AUStorm_moveLoopf","AUStorm_moveLoopg","AUStorm_moveLooph","AUStorm_moveLoopi","AUStorm_moveLoopj","AUStorm_moveLoopk","AUStorm_moveLoopl","AUStorm_moveLoopa","AUStorm_moveLoopb","AUStorm_moveLoopc","AUStorm_moveLoopd","AUStorm_moveLoope","AUStorm_moveLoopf","AUStorm_moveLoopg","AUStorm_moveLooph","AUStorm_moveLoopi","AUStorm_moveLoopj","AUStorm_moveLoopk",
	"AUStorm_moveLoopl","AUStorm_moveStara","AUStorm_moveStarb","AUStorm_moveStarc","AUStorm_moveStard","AUStorm_moveStare","AUStorm_moveStarf","AUStorm_moveStarg","AUStorm_moveStarh","AUStorm_sounDiea","AUStorm_sounDieb","AUStorm_sounDiec","AUStorm_sounDied","AUStorm_sounDiee","AUStorm_sounDief","AUStorm_sounDieg","AUStorm_sounDieh","AUStorm_sounSelea","AUStorm_sounSeleb","AUStorm_sounSelec","AUStorm_sounSeled","AUStorm_sounSelee","AUStorm_sounSelef","AUStorm_sounSeleg",	"AUVicer_sounAttaa","AUVicer_sounAttab","AUVicer_sounAttac","AUVicer_sounAttad","AUVicer_sounAttae","AUVicer_sounAttaf","AUVicer_sounSelea","AUVicer_sounSeleb","AUVicer_sounSelec","AUVicer_sounSeled","AUVicer_sounSelea","AUVicer_sounSeleb","AUVicer_sounSelec","AUVicer_sounSeled","AUVicer_sounSpawa","AUVicer_sounSpawb","AUVicer_sounSpawc","AUVicer_sounSpawd","AUVicer_sounDiea","AUVicer_sounDieb","AUVicer_sounDiec","AUVicer_sounDied","AUVicer_sounDiee","AUVicer_sounSelea","AUVicer_sounSeleb","AUVicer_sounSelec","AUVicer_sounSeled","AUVicer_sounSelea","AUVicer_sounSeleb","AUVicer_sounSelec","AUVicer_sounSeled","GUBatSh_alarma","GPMissi_incominga","GPMissi_incomingb","GPMissi_incomingc","GUBatSh_missFirea","GUBatSh_selecta","GUBatSh_selectb","GUBatSh_selectc","GUComEn_gunFirea","GUComEn_gunFireb","GUComEn_gunFirec","GUComEn_gunFired","GUComEn_gunFiree","GUComEn_gunFiref","GUComEn_gunFireg","GUComEn_gunFireh","GUComEn_gunFirei","GUZoneT_jumpJeta","GUZoneT_jumpJetb","GUZoneT_jumpJetc","GUZoneT_jumpJetd","GUZoneT_jumpJete","GUZoneT_jumpJetf","GUZoneR_jumpLanda","GUZoneR_jumpLandb","GUZoneR_jumpLandc","GUComma_jumpStara","GUComma_jumpStarb","GUComma_jumpStarc","GUComma_jumpStard","GUComma_charBeepa","GUComma_charPlana","GUComma_charPlanb","GUComma_charPlanc","GUComma_charPland","GUComma_charPlane","GUComma_charPlanf","GUComma_charPlang","GUComma_charPlanh","GUComma_gunFire9a","GUComma_gunFire9b","GUComma_gunFire9c","GUComma_gunFire9d","GUComma_gunFire9e","GUComma_gunFire9f","GUComma_gunFire9g","GUComma_gunFire9h","GUComma_gunFire9i","NUShaSq_exploAttaa","NUShaSq_exploAttab","NUShaSq_exploAttac","NUShaSq_exploAttad","NUShaSq_exploAttae","NUShaSq_exploAttaf","NUShaSq_exploAttag","NUShaSq_exploAttai","NUShaSq_exploDebra","NUShaSq_exploDebrb","NUShaSq_exploDebrc","NUShaSq_exploDebrd","NUShaSq_exploDebre","NUShaSq_exploDebrf","NUShaSq_exploDebrg","GUComma_wea1firea","GUComma_wea1fireb","GUComma_wea1firec","GUComma_wea1fired","GUComma_wea1firee","GUComma_wea1firef","GUComma_wea1fireg","GUComma_wea1fireh","GUComma_wea1firei","TEMP_vraplo2a",	"TEMP_vraplo2b",	"TEMP_vraplo2c","GUFireH_flyBya","GUFireH_flyByc","GUFireH_flyByd","GUFireH_flyByb","TEMP_vraplo2a",	"TEMP_vraplo2b",	"TEMP_vraplo2c","GUFireh_firebomb1a","GUFireH_wea1firea","GUFireH_wea1fireb","GUFireH_wea1firec","GUFireH_moveStara","GUFireH_moveStarb","GUFireH_moveStarc","GUFireH_moveStard","GUFireH_moveStare","GUFireH_ambiSelea","GUFireH_ambiSeleb","GUFireH_ambiSelec","GUFireH_ambiSeled","GUFireH_ambiSelee","GUFireH_ambiSelef","GUFireH_ammoLoada","GUFireH_reloadeda","GUComma_charPlana","GUComma_charPlanb","GUComma_charPlanc","GUComma_charPland","GUComma_charPlane","GUComma_charPlanf","GUComma_charPlang","GUComma_charPlanh","GUFireH_reloadeda","GUFireH_ammoLoada","GUFireH_flyBya","GUFireH_flyByb","GUFireH_flyByc","GUFireH_flyByd","GUFireH_StratoFia","GUFireH_StratoFib","GUFireH_StratoFic","GUFireH_StratoFid","GUFireH_flyByb","NURaide_EMPblasta","GUGrena_grenThroa","GUGrena_grenThrob","GUGrena_grenThroc","GUGrena_grenThrod","GUGrena_grenThroe","GUGrena_grenThrof","GUGrena_grenThrog","GUGrena_grenThroh","GUGrena_grenThroi","GUGrena_grenThroj","NUInfan_voiEffora","NUInfan_voiEfforb","NUInfan_voiEfforc","NUInfan_voiEfford","NUInfan_voiEffore","NUInfan_voiEfforf","NUInfan_voiEfforg","NUInfan_voiEfforh","NUInfan_voiEffori","NUInfan_voiEfforj","NUInfan_voiEffork","NUInfan_voiEfforl","NUInfan_voiEfform","NUInfan_voiEfforn","NUInfan_voiEfforo","NUInfan_voiEfforp","NUInfan_voiEfforq","NUInfan_voiEfforr","NUInfan_voiEffors","GUGuard_ambiSelea","GUGuard_ambiSeleb","GUGuard_ambiSelec",
	"GUGuard_ambiSeled","GUGuard_ambiSelee","GUGuard_ambiSelef","GUGuard_gun8Firea","GUGuard_gun8Fireb","GUGuard_gun8Firec","GUGuard_gun8Fired","GUGuard_gun8Firee","GUGuard_gun8Firef","GUGuard_gun8Fireg","GUGuard_gun8Fireh","GUGuard_gun8Firei","GUGuard_gun8Firej","GUGuard_gun8Firek","GUGuard_gun8Firel","GUGuard_gun8Firem","GUGuard_gun8Firen","GUGuard_gun8Fireo","GUGuard_gun8Firep","GUGuard_gun8Fireq","GUGuard_mineDepla","GUGuard_mineDeplb","GUGuard_mineDeplc","GUGuard_mineDepld","GUGuard_minDepBea","GUGuard_mineExpla","GUGuard_mineExplb","GUGuard_mineExplc","GUGuard_mineExpld","GUGuard_mineExple","GUGuard_mineExplf","GUGuard_mineExplg","GUGuard_mineExplh","GUGuard_mineExpli","GUGuard_mineExplj","GUGuard_mineExplk","GUGuard_mineExpll","GUGuard_minDepBeb","GUGuard_minDepBec","GURepai_moveBya","GURepai_moveByb","GURepai_moveByc","GURepai_moveByd","GURepai_moveBye","GUGuard_moveStara","GUGuard_moveStarb","GUGuard_moveStarc","GUGuard_moveStard","GUGuard_moveStare","GUGuard_moveStarf","GUGuard_moveStarg","GUGuard_moveStarh","GUGuard_moveStari","GUGuard_moveStarj","GUGuard_wea1firea","GUGuard_wea1fireb","GUGuard_wea1firec","GUGuard_wea2firea","GUGuard_wea2fireb","GUGuard_wea2firec","GUGuard_wea2fired","GUGuard_wea2firee","GUGuard_wea2firef","GUGuard_wea2fireg","GUGuard_wea2fireh","GUGuard_wea2firei","GUGuard_wea2firej","GUGuard_wea2firek","GUHamme_sounSelea","GUHamme_sounSeleb","GUHamme_sounSelec","GUHamme_sounSeled","GUHamme_sounSelee","GUHamme_sounSelef","GUHamme_sounSele2a","GUHamme_sounSele2b","GUHamme_sounSele2c","GUHamme_sounSele2d","GUHamme_armoUpgra","GUHamme_idleLoopa","GUHamme_idleLoopb","GUHamme_idleLoopc","GUHamme_idleLoopd","GUHamme_idleLoope","GUHamme_idleLoopf","GUHamme_idleLoopg","GUHamme_idleLooph","GUHamme_moveLanda","GUHamme_moveLandb","GUHamme_moveLandc","GUHamme_moveLandd","GUHamme_moveLande","GUHamme_moveLifta","GUHamme_moveLiftb","GUHamme_moveLiftc","GUHamme_moveLiftd","GUHamme_moveLifte","GUHamme_moveBya","GUHamme_moveByb","GUHamme_moveByc","GUHamme_moveByd","GUHamme_moveBye","GUHamme_moveByf","GUHamme_moveByg","GUHamme_moveByh","GUHamme_moveByi","GUHamme_moveByj","GUHamme_moveLoop2a","GUHamme_moveLoop2b","GUHamme_moveLoop2c","GUHamme_moveLoop2d","GUHamme_moveLoop2e","GUHamme_moveStara","GUHamme_moveStarb","GUHamme_moveStarc","GUHamme_moveStard","GUHamme_moveStare","GUHamme_moveStarf","GUHamme_moveStarg","GUHamme_moveStarh","GUHamme_moveStari","GUHamme_moveStarj","GUHamme_moveLanda","GUHamme_moveLandb","GUHamme_moveLandc","GUHamme_moveLandd","GUHamme_moveLande","GUHamme_gunFire1a","GUHamme_gunFire1b","GUHamme_gunFire1c","GUHamme_gunFire1d","GUHamme_gunFire1e","GUHamme_gunFire1f","GUHamme_gunFire1g","GUHamme_gunFire1h","GUHamme_gunFire2a","GUHamme_gunFire2b","GUHamme_gunFire2c","GUHamme_gunFire2d","GUHamme_gunFire2e","GUHamme_gunFire2f","GUHamme_gunFire2g","GUHamme_gunFire2h","GUHamme_wea1Firea","GUHamme_wea1Fireb","GUHamme_wea1Firec","GUHamme_wea1Fired","GUHamme_wea1Firee","GUHamme_wea1Firef","GUHamme_wea1Fireg","GUHamme_wea1Fireh","GUHarve_ambiSelea","GUHarve_ambiSeleb","GUHarve_ambiSelec","chugginglikesound","GUHarve_ambiSeled","GUHarve_ambiSelee","GUHarve_ambiSelef","GUHarve_idleL2a","GUHarve_idleL2b","GUHarve_idleL2c","GUHarve_idleL2d","GUHarve_idleL2e","GUHarve_chuffL2a","GUHarve_chuffL2b","GUHarve_chuffL2c","GUHarve_moveStara","GUHarve_moveStarb","GUHarve_moveStarc","GUHarve_moveStard","GUHarve_moveStare","GUHarve_moveStarf","GUHarve_moveStarg","GUHarve_moveStarh","GUHarve_moveStari","GUHarve_moveStarj","GUHarve_wea1firea","GUHarve_wea1fireb","GUHarve_wea1firec","GUHarve_wea1fired","GUHarve_wea1firee","GUHarve_wea1firef","GUHarve_wea1fireg","GUHarve_wea1fireh","GUHarve_wea1firei","GUHarve_wea1firej","GUHarve_wea1firek","GUHarve_wea1firel","GUHarve_wea1firem","GUHarve_wea1firen","GUHover_moveBya","GUHover_moveByb","GUHover_moveByc","GUHover_moveByd","GUHover_moveBye","GUHover_moveByf",
	"GUJugge_wea3firea","GUJugge_wea3fireb","GUJugge_wea3firec","GUJugge_wea3fired","GUJugge_wea3firee","GUJugge_wea3firef","GUJugge_wea3fireg","GUJugge_wea3fireh","GUJugge_wea3firei","GUJugge_wea3firej","GUJugge_wea3firek","GUJugge_wea3firel","GUJugge_moveStara","GUJugge_moveStarb","GUJugge_moveStarc","GUJugge_moveStard","GUJugge_moveStare","GUJugge_moveSweea","GUJugge_moveSweeb","GUJugge_moveSweec","GUJugge_moveSweed","GUJugge_moveSweee","GUJugge_moveSweef","GUJugge_moveSweeg","GUJugge_moveSweeh","GUJugge_moveSweei","GUJugge_moveSweej","GUJugge_moveSweek","GUJugge_moveSweel","NUTurre_moveStare","NUTurre_moveStarf","NUTurre_moveStarg","NUTurre_moveStarh","GUJugge_sounSelea","GUJugge_sounSeleb","GUJugge_sounSelec","GUJugge_sounSelea","GUJugge_sounSeleb","GUJugge_sounSelec","WUVehic_explMGe","WUVehic_explMGh","GUJugge_wea1firea","GUJugge_wea1fireb","GUJugge_wea1firec","GUJugge_wea1fired","GUJugge_wea2firea","GUJugge_wea2fireb","GUJugge_wea2firec","GUJugge_wea2fired","GUJugge_wea2firee","GUJugge_wea2firef","GUJugge_wea2fireg","GUJugge_wea2fireh","GUJugge_wea2firei","GUJugge_wea2firej","GUJugge_wea3firea","GUJugge_wea3fireb","GUJugge_wea3firec","GUJugge_wea3fired","GUJugge_wea3firee","GUJugge_wea3firef","GUJugge_wea3fireg","GUJugge_wea3fireh","GUJugge_wea3firei","GUJugge_wea3firej","GUJugge_wea3firek","GUJugge_wea3firel","GUPreda_ambiSelea","GUPreda_ambiSeleb","GUPreda_ambiSelec","GUPreda_ambiSeled","GUMammo_wea1firea","GUMammo_wea1fireb","GUMammo_wea1firec","GUMammo_wea1fired","GUMammo_wea1firee","GUMammo_wea1firef","GUMammo_wea1fireg","GUMammo_wea1fireh","GUMammo_wea1firei","GUMammo_wea1firej","GUMammo_wea1firek","GUMammo_wea1firel","GUMammo_wea1echa","GUMammo_wea1echb","GUMammo_wea1echc","GUMammo_wea1echd","GUMammo_wea1eche","GUMammo_wea1firea","GUMammo_wea1fireb","GUMammo_wea1firec","GUMammo_wea1fired","GUMammo_wea1firee","GUMammo_wea1firef","GUMammo_wea1fireg","GUMammo_wea1fireh","GUMammo_wea1firei","GUMammo_wea1firej","GUMammo_wea1firek","GUMammo_wea1firel","GUMammo_wea1echa","GUMammo_wea1echb","GUMammo_wea1echc","GUMammo_wea1echd","GUMammo_wea1eche","GUPreda_wea2firea","GUPreda_wea2fireb","GUPreda_wea2firec","GUPreda_wea2fired","GUPreda_wea2firee","GUPreda_wea2firef","GUPreda_wea2fireg","GUPreda_wea2fireh","GUPreda_wea2firei","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","GUMammo_idleL2a","GUMammo_idleL2b","GUMammo_idleL2c","GUMammo_idleL2d","GUMammo_idleL2e","GUMammo_idleL2f","GUMammo_idleL2g","GUMammo_idleL2h","GUMammo_idleL2i","GUMammo_idleL2j","GUMammo_idleL2k","GUMammo_idleL2l","GUMammo_idleL2m","GUMammo_idleL2n","GUMammo_wea2firea","GUMammo_wea2fireb","GUMammo_wea2firec","GUMammo_wea2fired","GUMammo_moveStara","GUMammo_moveStarb","GUMammo_moveStarc","GUMammo_moveStard","GUMammo_moveStare","GUMammo_moveStarf","GUMammo_moveStarg","GUMammo_moveStarh","TEMP_RadioClickEnd01",	"TEMP_RadioClickEnd02",	"TEMP_RadioClickEnd03","TEMP_RadioClickEnd04",	"TEMP_RadioClickEnd05","TEMP_vovelo2a","TEMP_vovelo2b","GUMarv_sounSelea","GUMarv_sounSeleb","GUMarv_sounSelec","GUMarv_sounSeled","GUMarv_sounSelee","GUMarv_sounSelef","GUMarv_cannFirea","GUMarv_cannFireb","GUMarv_cannFirec","GUMarv_cannFired","GUMarv_cannFiree","GUMarv_cannFiref","GUMarv_cannFireg","GUMarv_cannFireh","GUMarv_cannFirei","GUMarv_cannImpaa","GUMarv_cannImpab","GUMarv_cannImpac","GUMarv_cannImpad","GUMarv_cannImpae","GUMarv_cannImpaf","GUMarv_cannImpag","GUMarv_cannImpah","GUMarv_cannonHita","GUMarv_cannonHitb","GUMarv_cannonHitc","GUMarv_cannonHitd","Nupgra_LaseCapaa","GUUpgra_railCanoa","GUUpgra_railCanob","GUUpgra_railCanoc","GUUpgra_railCanod","GUPitbu_wea2firea","GUPitbu_wea2fireb","GUPitbu_wea2firec","GUPitbu_wea2fired","GUPitbu_wea2firee","GUPitbu_wea2firef","GUHamme_gunFire2c","GUHamme_gunFire2d","GUHamme_gunFire2e","GUHamme_gunFire2f","GUHamme_gunFire2g","GUHamme_gunFire2h","GUMarv_idleLoopa","GUMarv_idleLoopb","GUMarv_idleLoopc","GUMarv_idleLoopd",
	"GUMarv_idleLoope","NBBrown_wea1firea","NBBrown_wea1fireb","NBBrown_wea1firec","NBBrown_wea1fired","NBBrown_wea1firee","NBBrown_wea1firef","NBBrown_wea1fireg","NBBrown_wea1fireh","NBBrown_wea1firei","NBBrown_wea1firej","NBBrown_wea1firek","NBBrown_wea1firel","NBBrown_wea1firem","NBBrown_wea1firen","GUMarv_moveBya","GUMarv_moveByb","GUMarv_moveByc","GUMarv_moveByd","GUMarv_moveBye","GUMarv_moveLoopa","GUMarv_moveLoopb","GUMarv_moveLoopc","GUMarv_moveLoopd","GUMarv_moveLoope","GUMarv_moveLoopf","GUMarv_moveLoopg","GUMarv_moveLooph","GUMarv_moveLoopi","GUMarv_moveLoopj","GUMarv_moveStar1a","GUMarv_moveStar1b","GUMarv_moveStar1c","GUMarv_moveStar1d","GUMarv_moveStar1e","GUMarv_moveStar2a","GUMarv_moveStar2b","GUMarv_moveStar2c","GUMarv_moveStar2d","GUMarv_moveStar2e","GUSnipe_gunFire2a","GUSnipe_gunFire2b","GUSnipe_gunFire2c","GUSnipe_gunFire2d","GUSnipe_gunFire2e","GUSnipe_gunFire2f","GUSnipe_gunFire2g","GUSnipe_gunFire2h","GUSnipe_gunFire2i","GUSnipe_gunFire2j","GUSnipe_gunFire2k","GUSnipe_gunFire2l","GUSnipe_gunFire2m","GUSnipe_gunFire2n","GUSnipe_gunFire2o","GUSnipe_gunFire2p","GUSnipe_gunFire2q","GUSnipe_gunFire2r","GUSnipe_gunFire2s","GUSnipe_gunFire2t","GUSnipe_gunFire2u","GUSnipe_gunFire2v","GUSnipe_gunFire2w","GUZoneR_gunFirea","GUZoneR_gunFireb","GUZoneR_gunFirec","GUZoneR_gunFired","GUZoneR_gunFiree","GUZoneR_gunFiref","GUZoneR_gunFireg","GUZoneR_gunFireh","GUZoneR_gunFirei","GUZoneR_gunFirej","GUZoneR_gunFirek","GUMCV_ambiSelea","GUMCV_ambiSeleb","GUMCV_ambiSelec","GUMCV_ambiSeled","GUMCV_ambiSelee","GUmcv_moveStara","GUmcv_moveStarb","GUmcv_moveStarc","GUmcv_moveStard","GUmcv_moveStare","GUmcv_moveStarf","GUmcv_moveStarg","GUmcv_moveStarh","GUmcv_pakBeda","GUmcv_pak1a","GUmcv_pak2a","GUmcv_pak3a","GUmcv_pak4a","GUmcv_pak5a","GUmcv_upakBeda","GUmcv_upak1a","GUmcv_upak2a","GUmcv_upak3a","GUmcv_upak4a","NBBrown_wea1expla","NBBrown_wea1explb","NBBrown_wea1explc","NBBrown_wea1expld","NBBrown_wea1exple","NBBrown_wea1explf","NBBrown_wea1explg","NBBrown_wea1explh","GUMissi_wea1firea","GUMissi_wea1fireb","GUMissi_wea1firec","GUMissi_wea1fired","GUMissi_wea1firee","GUNukeT_falsStara","GUNukeT_responsea","GUNukeT_responseb","GUNukeT_responsec","GUNukeT_responsed","GUNukeT_responsee","GUOrca_ambiSelea","GUOrca_ambiSeleb","GUOrca_ambiSelec","GUOrca_ambiSeled","GUOrca_ambiSelee","GUOrca_ambiSelef","GUOrca_ammoLoada","GUOrca_reloadeda","GUZoneR_gunFirea","GUZoneR_gunFireb","GUZoneR_gunFirec","GUZoneR_gunFired","GUZoneR_gunFiree","GUZoneR_gunFiref","GUZoneR_gunFireg","GUZoneR_gunFireh","GUZoneR_gunFirei","GUZoneR_gunFirej","GUZoneR_gunFirek","GUOrca_cannUpgra","NUSpect_weapImpa3a","NUSpect_weapImpa3b","NUSpect_weapImpa3c","NUSpect_weapImpa3d","NUSpect_weapImpa3e","NUSpect_weapImpa3f","NUSpect_weapImpa3g","NUSpect_weapImpa3h","NUSpect_weapImpa3i","GUOrca_senPodExpa","GUOrca_sensUpgra","GUOrca_senPodSela","TEMP_RadioClickEnd01",	"TEMP_RadioClickEnd02",	"TEMP_RadioClickEnd03","TEMP_RadioClickEnd04",	"TEMP_RadioClickEnd05","TEMP_B3BomberAmbientLoop01a",	"TEMP_B3BomberAmbientLoop01b",	"TEMP_B3BomberAmbientLoop01c","TEMP_B3BomberAmbientLoop01a","TEMP_B3BomberAmbientLoop01b","TEMP_B3BomberAmbientLoop01c","TEMP_B3BomberAmbientLoop01a","TEMP_B3BomberAmbientLoop01b","TEMP_B3BomberAmbientLoop01c","GUOrca_rockFirea","GUOrca_rockFireb","GUOrca_rockFirec","GUOrca_rockFired","GUOrca_rockFiree","GUOrca_rockFiref","GUOrca_rockFireg","GUOrca_rockFireh","GUOrca_rockFirei","GUOrca_rockFirej","GUOrca_rockExpla","GUOrca_rockExplb","GUOrca_rockExplc","GUOrca_rockExpld","GUOrca_rockExple","GUOrca_rockExplf","GUOrca_rockExplg","GUOrca_rockExplh","GUOrca_rockExpli","GUOrca_rockExplj","GUOrca_rockExplk","GUOrca_pulsScana","GUOrca_pulsScanb","GUOrca_pulsScanc","GUOrca_SensFirea","GUOrca_SensFireb","GUOrca_SensFirec","GUOrca_SensFired","GUOrca_SensFiree","GUOrca_SensImpaa","GUOrca_moveStara","GUOrca_moveStarb","GUOrca_moveStarc","GUOrca_moveStard","GUOrca_moveStare","GUOrca_moveStarf","GUOrca_moveStarg","GUOrca_moveStarh","GUOrca_moveStari","GUOrca_moveStarj",
	"GUOrca_moveStark","GUOrca_moveStarl","GUOrca_moveStarm","GUOrca_wea1fiL2a","GUOrca_wea1fiL2b","GUOrca_wea1fiL2c","GUOrca_wea1fiL2d","GUOrca_wea1fiL2e","GUOrca_wea1fiL2f","GUOrca_wea1fiL2g","GUOrca_wea1fiL2h","GUOrca_wea1fiL2i","GUOrca_wea1win1a","GUOrca_wea1win1b","GUOrca_wea1win1c","GUOrca_wea1win1d","GUOrca_wea1win1e","GUOrca_wea1win3a","GUOrca_wea1win3b","GUOrca_wea1win3c","GUOrca_wea1win3d","GUOrca_wea1win3e","GUOrca_wea1shela","GUOrca_wea1shelb","GUOrca_wea1shelc","GUOrca_wea1sheld","GUOrca_wea1shele","GUOrca_wea1shelf","GUOrca_wea1shela","GUOrca_wea1shelb","GUOrca_wea1shelc","GUOrca_wea1sheld","GUOrca_wea1shele","GUOrca_wea1shelf","GUOrca_wea1zip01","GUOrca_wea1zip02","GUOrca_wea1zip03","GUOrca_wea1zip04","GUOrca_wea1zip05","GUOrca_wea1zip06","GUOrca_wea1zip07","GUOrca_wea1zip08","GUOrca_wea1zip09","GUOrca_wea1zip10","GUOrca_wea1zip11","GUOrca_wea1zip12","GUOrca_wea1zip13","GUOrca_wea1zip14","GUOrca_wea1zip15","GUOrca_wea1zip16","GUOrca_wea1zip17","GUOrca_wea1zip18","GUOrca_wea1zip19","GUOrca_wea1zip20","GUOrca_wea1zip21","GUOrca_wea1zip22","GUOrca_wea1zip23","GUOrca_wea1zip24","GUOrca_wea1zip25","GUOrca_wea1zip26","GUOrca_wea1zip27","GUPitbull_ambiSelea","GUPitbull_ambiSeleb","GUPitbull_ambiSelec","GUPitbull_ambiSeled","GUPitbull_ambiSelee","GUPitbull_ambiSelef","GUPitbull_ambiSeleg","GUPitbull_ambiSeleh","GUPitbu_idleL2a","GUPitbu_idleL2b","GUPitbu_idleL2c","GUPitbu_idleL2d","GUPitbu_idleL2e","GUPitbu_idleL2f","GUPitbu_idleL2g","GUPitbu_idleL2h","GUPitbu_moveStara","GUPitbu_moveStarb","GUPitbu_moveStarc","GUPitbu_moveStard","GUPitbu_moveStare","GUPitbu_moveStarf","GUPitbu_moveStarg","GUPitbu_moveStarh","GUPitbu_wea1firea","GUPitbu_wea1fireb","GUPitbu_wea1firec","GUPitbu_wea1fired","GUPitbu_wea1firee","GUPitbu_wea1firef","GUPitbu_wea1fireg","GUPitbu_wea1fireh","GUPitbu_wea2firea","GUPitbu_wea2fireb","GUPitbu_wea2firec","GUPitbu_wea2fired","GUPitbu_wea2firee","GUPitbu_wea2firef","NUVerti_bombExpla","NUVerti_bombExplb","NUVerti_bombExplc","NUVerti_bombExpld","NUVerti_bombExple","NUVerti_bombExplf","NBBrown_wea1expla","NBBrown_wea1explb","NBBrown_wea1explc","NBBrown_wea1expld","NBBrown_wea1exple","NBBrown_wea1explf","NBBrown_wea1explg","NBBrown_wea1explh","GUMammo_ambiSelea","GUMammo_ambiSeleb","GUMammo_ambiSelec","GUMammo_ambiSeled","GUMammo_ambiSelee","GUPreda_idleL2a","GUPreda_idleL2b","GUPreda_idleL2c","GUPreda_idleL2d","GUPreda_idleL2e","GUPreda_idleL2f","GUPreda_idleL2g","GUPreda_idleL2h","GUPreda_idleL2i","GUPreda_idleL2j","GUPreda_idleL2k","GUPreda_idleL2l","GUPreda_moveStara","GUPreda_moveStarb","GUPreda_moveStarc","GUPreda_moveStard","GUPreda_moveStare","GUPreda_moveStarf","GUPreda_moveStarg","GUPreda_moveStarh","GUPreda_moveStari","GUPreda_wea1firea","GUPreda_wea1fireb","GUPreda_wea1firec","GUPreda_wea1fired","GUPreda_wea1firee","GUPreda_wea1firef","GUPreda_wea1fireg","GUPreda_wea1fireh","GUPreda_wea1firei","GUPreda_wea2firea","GUPreda_wea2fireb","GUPreda_wea2firec","GUPreda_wea2fired","GUPreda_wea2firee","GUPreda_wea2firef","GUPreda_wea2fireg","GUPreda_wea2fireh","GUPreda_wea2firei","TEMP_RadioClickEnd01",	"TEMP_RadioClickEnd02",	"TEMP_RadioClickEnd03","TEMP_RadioClickEnd04",	"TEMP_RadioClickEnd05","GURepai_sparksa","GURepai_sparksb","GURepai_sparksc","GURepai_sparksd","GURepai_sparkse","GURepai_sparksf","GURepai_sparksg","GURepai_sparksh","GURepai_sparksa","GURepai_sparksb","GURepai_sparksc","GURepai_sparksd","GURepai_sparkse","GURepai_sparksf","GURepai_sparksg","GURepai_sparksh","GURepai_idleLoopa","GURepai_idleLoopb","GURepai_idleLoopc","GURepai_idleLoopd","GURepai_idleLoope","GURepai_idleLoopf","GURepai_idleLoopg","GURepai_moveBya","GURepai_moveByb","GURepai_moveByc","GURepai_moveByd","GURepai_moveBye","GUGuard_moveStara","GUGuard_moveStarb","GUGuard_moveStarc","GUGuard_moveStard","GUGuard_moveStare","GUGuard_moveStarf","GUGuard_moveStarg","GUGuard_moveStarh","GUGuard_moveStari","GUGuard_moveStarj","GURepai_sounSelea","GURepai_sounSeleb","GURepai_sounSelec","GURifle_gun5Firea","GURifle_gun5Fireb","GURifle_gun5Firec","GURifle_gun5Fired","GURifle_gun5Firee","GURifle_gun5Firef","GURifle_gun5Fireg",
	"GURifle_gun5Fireh","GURifle_gun5Firei","GURifle_gun5Firej","GURifle_digginL2a","GURifle_digginL2b","GURifle_digginL2c","GURifle_digginL2d","GURifle_digginL2e","GURifle_digginL2f","GURifle_digginL2g","GURifle_digginL2h","GURifle_digginL2i","GURifle_digginL2j","GURifle_digginL2k","GURifle_digginL2l","GURifle_digginL2m","GURifle_digginL2n","GURifle_digginL2o","GURifle_digginL2p","GURig_ambiSelea","GURig_ambiSeleb","GURig_ambiSelec","GURig_ambiSeled","GURig_ambiSelee","NUMcv_pak5a","NUMcv_pak2a","NUMcv_pak4a","GURig_moveStara","GURig_moveStarb","GURig_moveStarc","GURig_moveStard","GURig_moveStare","GURig_moveStarf","GURig_moveStarg","GURig_moveStarh","GURig_moveStari","GURig_wea1firea","GURig_wea1fireb","GURig_wea1firec","GURig_wea1fired","GURig_wea1firee","GURig_wea1firef","GURig_wea1fireg","GURig_wea1fireh","GURig_wea1firei","GURig_wea1firej","GUHarve_ambiSelea","GUHarve_ambiSeled","GUHarve_ambiSelee","GUHarve_ambiSelef","GURough_moveStara","GURough_moveStarb","GURough_moveStarc","GURough_moveStard","GURough_moveStare","GURough_moveStarf","GURough_moveStarg","GURough_moveStarh","TEMP_RadioClickEnd01",	"TEMP_RadioClickEnd02",	"TEMP_RadioClickEnd03","TEMP_RadioClickEnd04",	"TEMP_RadioClickEnd05","GUShatt_idleLoopa","","GUShatt_idleLoopb","GUShatt_idleLoopc","GUShatt_idleLoopd","GUShatt_idleLoope","GUShatt_moveBya","GUShatt_moveByb","GUShatt_moveByc","GUShatt_moveByd","GUShatt_moveBye","GUShatt_moveByf","GUAntiAi_moveStara","GUAntiAi_moveStarb","GUAntiAi_moveStarc","GUAntiAi_moveStard","GUAntiAi_moveStare","GUAntiAi_moveStarf","GUAntiAi_moveStarg","GUShatt_sounSelea","GUShatt_sounSeleb","GUShatt_sounSelec","GUShatt_sounSeled","GUShatt_sounSelee","GUShatt_sounSelef","GUShatt_sounSeleg","GBSonic_weapFirea","GBSonic_weapFireb","GBSonic_weapFirec","GBSonic_weapFired","GBSonic_weapFiree","GBSonic_weapFiref","GBSonic_weapFireg","GBSonic_weapFireh","GBSonic_weapFirei","GBSonic_weapFirej","GBSonic_weapFirek","GBSonic_shockwa1a","GBSonic_shockwa1b","GBSonic_shockwa1c","GBSonic_shockwa1d","GBSonic_shockwa1e","GBSonic_shockwa1f","GBSonic_shockwa2a","GBSonic_shockwa2b","GBSonic_shockwa2c","GBSonic_shockwa2d","GBSonic_shockwa2e","GBSonic_shockwa2f","GUSling_gunFire1a","GUSling_gunFire1b","GUSling_gunFire1c","GUSling_gunFire1d","GUSling_gunFire1e","GUSling_gunFire1f","GUSling_gunFire1g","GUSling_gunFire1h","GUSling_gunFire2a","GUSling_gunFire2b","GUSling_gunFire2c","GUSling_gunFire2d","GUSling_gunFire2e","GUSling_gunFire2f","GUSling_gunFire2g","GUSling_gunFire2h","GUSling_idleLoopa","GUSling_idleLoopb","GUSling_idleLoopc","GUSling_idleLoopd","GUSling_idleLoope","GUSling_idleLoopf","GUSling_moveBya","GUSling_moveByb","GUSling_moveByc","GUSling_moveByd","GUSling_moveBye","GUSling_moveByf","GUSling_moveByg","GUAntiAi_moveBya","GUAntiAi_moveByb","GUAntiAi_moveByc","GUAntiAi_moveByd","GUAntiAi_moveBye","GUAntiAi_moveByf","GUAntiAi_moveByg","GUSling_moveStara","GUSling_moveStarb","GUSling_moveStarc","GUSling_moveStard","GUSling_moveStare","GUSling_moveStarf","GUSling_moveStarg","GUShatt_moveStara","GUShatt_moveStarb","GUShatt_moveStarc","GUShatt_moveStard","GUShatt_moveStare","GUSling_sounSelea","GUSling_sounSeleb","GUSling_sounSelec","GUSling_sounSeled","GUSling_sounSelee","GUSling_sounSelef","GUSling_sounSele2a","GUSling_sounSele2b","GUSling_sounSele2c","GUSling_sounSele2d","GUSling_sounSele2e","GUSling_heavUpgra","NUSpect_weapFire2a","NUSpect_weapFire2b","NUSpect_weapFire2c","NUSpect_weapFire2d","NUSpect_weapFire2e","NUSpect_weapFire2f","NUSpect_weapFire2g","NUSpect_weapFire2h","GUSteel_overBeama","GBSonic_shockwa2a","GBSonic_shockwa2b","GBSonic_shockwa2c","GBSonic_shockwa2d","GBSonic_shockwa2e","GBSonic_shockwa2f","GUSurve_ambiSelea","GUSurve_ambiSeleb","GUSurve_ambiSelec","GUSurve_ambiSeled","GUSurve_ambiSelee","GUmcv_upak1a","GUSurve_idleLoopa","GUSurve_idleLoopb","GUSurve_idleLoopc","GUSurve_idleLoopd","GUSurve_idleLoope","GUSurve_idleLoopf","GUSurve_idleLoopg","GUSurve_MoveStara","GUSurve_MoveStarb","GUSurve_MoveStarc","GUSurve_MoveStard","GUSurve_MoveStare","GUmcv_pak2a","GUmcv_pak5a","GUmcv_upak4a","GUmcv_pak5a","NUMcv_pak3a","NUMcv_pak2a",
	"GUmcv_pak1a","NUMcv_pak4a","GUSnipe_gunFire2a","GUSnipe_gunFire2b","GUSnipe_gunFire2c","GUSnipe_gunFire2d","GUSnipe_gunFire2e","GUSnipe_gunFire2f","GUSnipe_gunFire2g","GUSnipe_gunFire2h","GUSnipe_gunFire2i","GUSnipe_gunFire2j","GUSnipe_gunFire2k","GUSnipe_gunFire2l","GUSnipe_gunFire2m","GUSnipe_gunFire2n","GUSnipe_gunFire2o","GUSnipe_gunFire2p","GUSnipe_gunFire2q","GUSnipe_gunFire2r","GUSnipe_gunFire2s","GUSnipe_gunFire2t","GUSnipe_gunFire2u","GUSnipe_gunFire2v","GUSnipe_gunFire2w","GUSnipe_wea2firea","GUSnipe_wea2fireb","GUSnipe_wea2firec","GUSnipe_wea2fired","GUSnipe_wea2firee","GUSnipe_wea2firef","GUSnipe_wea2fireg","GUSnipe_wea2fireh","GUSnipe_wea2firei","GUSnipe_wea2firej","GUSnipe_wea2firek","GUSnipe_wea2firel","GUSnipe_wea2firem","GUSnipe_wea2firen","GUSnipe_wea2firea","GUSnipe_wea2fireb","GUSnipe_wea2firec","GUSnipe_wea2fired","GUSnipe_wea2firee","GUSnipe_wea2firef","GUSnipe_wea2fireg","GUSnipe_wea2fireh","GUSnipe_wea2firei","GUSnipe_wea2firej","GUSnipe_wea2firek","GUSnipe_wea2firel","GUSnipe_wea2firem","GUSnipe_wea2firen","GUTitan_ambiSelea","GUTitan_ambiSeleb","GUTitan_ambiSelec","GUTitan_ambiSeled","GUTitan_ambiSelee","GUTitan_ambiSelef","GUTitan_cannFirea","GUTitan_cannFireb","GUTitan_cannFirec","GUTitan_cannFired","GUTitan_cannFiree","GUTitan_cannFiref","GUTitan_cannFireg","GUTitan_cannFireh","GUTitan_cannFirei","GUTitan_cannFirej","GUTitan_cannonHita","GUTitan_cannonHitb","GUTitan_cannonHitc","GUTitan_cannonHitd","GUTitan_cannonHite","GUTitan_cannonHitf","GUTitan_cannonHitg","GUJugge_wea3firea","GUJugge_wea3fireb","GUJugge_wea3firec","GUJugge_wea3fired","GUJugge_wea3firee","GUJugge_wea3firef","GUJugge_wea3fireg","GUJugge_wea3fireh","GUJugge_wea3firei","GUJugge_wea3firej","GUJugge_wea3firek","GUJugge_wea3firel","GUJugge_moveStara","GUJugge_moveStarb","GUJugge_moveStarc","GUJugge_moveStard","GUJugge_moveStare","GUV35Ox_movl2a","GUV35Ox_movl2b","GUV35Ox_movl2c","GUV35Ox_movl2d","GUV35Ox_movl2e","GUV35Ox_movl2f","GUV35Ox_movl2g","GUV35Ox_movl2h","GUV35Ox_movl2i","GUV35Ox_movl2j","GUV35Ox_movl2k","GUV35Ox_movl2l","GUV35Ox_moveStara","GUV35Ox_moveStarb","GUV35Ox_moveStarc","GUV35Ox_moveStard","GUV35Ox_moveStare","GUV35Ox_moveStarf","GUV35Ox_moveStarg","GUV35Ox_idlel2a","GUV35Ox_dropa","GUV35Ox_pickupa","GUV35Ox_takeOffa","GUV35Ox_takeOffb","GUV35Ox_takeOffc","GUV35Ox_landa","GUV35Ox_landb","GUV35Ox_landc","GUWolve_ambiSelea","GUWolve_ambiSeleb","GUWolve_ambiSelec","GUWolve_ambiSeled","GUWolve_ambiSelee","GUWolve_ambiSelef","GUInf_B_weapFirea","GUInf_B_weapFireb","GUInf_B_weapFirec","GUInf_B_weapFired","GUInf_B_weapFiree","GUInf_B_weapFiref","GUInf_B_weapFireg","GUInf_B_weapFireh","GUWolve_gunFirea","GUWolve_gunFireb","GUWolve_gunFirec","GUWolve_gunFired","GUWolve_gunFiree","GUWolve_gunFiref","GUWolve_gunFireg","GUWolve_gunFireh","GUWolve_gunFirea","GUWolve_gunFireb","GUWolve_gunFirec","GUWolve_gunFired","GUWolve_gunFiree","GUWolve_gunFiref","GUWolve_gunFireg","GUWolve_gunFireh","GUWolve_footstep1a","GUWolve_footstep1b","GUWolve_footstep1c","GUWolve_footstep1d","GUWolve_footstep1e","GUWolve_footstep1f","GUWolve_footstep1g","GUWolve_footstep2a","GUWolve_footstep2b","GUWolve_footstep2c","GUWolve_footstep2d","GUWolve_footstep2e","GUWolve_footstep2f","GUWolve_footstep2g","GUWolve_footstep2h","GUWolve_footstep2i","GUZoneT_ambiSelea","GUZoneT_ambiSeleb","GUZoneR_jumpLanda","GUZoneR_jumpLandb","GUZoneR_jumpLandc","NBBrown_wea1firea","NBBrown_wea1fireb","NBBrown_wea1firec","NBBrown_wea1fired","NBBrown_wea1firee","NBBrown_wea1firef","NBBrown_wea1fireg","NBBrown_wea1fireh","NBBrown_wea1firei","NBBrown_wea1firej","NBBrown_wea1firek","NBBrown_wea1firel","NBBrown_wea1firem","NBBrown_wea1firen","GUZoneT_missExploa","GUZoneT_missExplob","GUZoneT_missExploc","GUZoneT_missExplod","GUZoneT_missExploe","GUZoneT_missExplof","GUZoneT_missExplog","GUZoneT_missExploh","GUZoneR_gunFirea","GUZoneR_gunFireb","GUZoneR_gunFirec","GUZoneR_gunFired","GUZoneR_gunFiree","GUZoneR_gunFiref","GUZoneR_gunFireg","GUZoneR_gunFireh","GUZoneR_gunFirei","GUZoneR_gunFirej","GUZoneR_gunFirek","NUSpect_weapFire2a","NUSpect_weapFire2b",
	"NUSpect_weapFire2c","NUSpect_weapFire2d","NUSpect_weapFire2e","NUSpect_weapFire2f","NUSpect_weapFire2g","NUSpect_weapFire2h","GUZoneT_ambiSelea","GUZoneT_ambiSeleb","GUZoneR_jumpLanda","GUZoneR_jumpLandb","GUZoneR_jumpLandc","GUComma_jumpStara","GUComma_jumpStarb","GUComma_jumpStarc","GUComma_jumpStard","GUZoneT_wea1firea","GUZoneT_wea1fireb","GUZoneT_wea1firec","GUZoneT_wea1fired","GUZoneT_wea1firee","GUZoneT_jumpJeta","GUZoneT_jumpJetb","GUZoneT_jumpJetc","GUZoneT_jumpJetd","GUZoneT_jumpJete","GUZoneT_jumpJetf","TEMP_RadioClickEnd01",	"TEMP_RadioClickEnd02",	"TEMP_RadioClickEnd03","TEMP_RadioClickEnd04",	"TEMP_RadioClickEnd05","NUAttac_idleLoopa","NUAttac_idleLoopb","NUAttac_idleLoopc","NUAttac_idleLoopd","NUAttac_idleLoope","NUAttac_idleLoopf","NUAttac_idleLoopg","NUAttac_idleLooph","NUAttac_idleLoopi","NUAttac_idleLoopj","NUAttac_idleLoopk","NUAttac_idleLoopl","NUAttac_idleLoopm","NUAttac_idleLoopn","NUAttac_idleLoopo","NUAttac_idleLoopp","NUAttac_idleLoopq","NUAttac_idleLoopr","NUAttac_idleLoops","NUAttac_idleLoopt","NUAttac_missExpla","NUAttac_missExplb","NUAttac_missExplc","NUAttac_missExpld",	"NUAttac_missExple","NUAttac_missExplf","NUAttac_missExplg","NUAttac_missFirea","NUAttac_missFireb","NUAttac_missFirec","NUAttac_missFired","NUAttac_missFiree","NUAttac_missFiref","NUAttac_missFireh","NUAttac_missFirei","NUAttac_missFirej","NUAttac_missFirek","NUAttac_missFirel","NUAttac_missFireg","NUAttac_moveStara","NUAttac_moveStarb","NUAttac_moveStarc","NUAttac_moveStard","NUAttac_moveStare","NUAttac_moveStarf","NUAttac_moveStarg","NUAttac_sounSelea","NUAttac_sounSeleb","NUAttac_sounSelec","NUAttac_sounSeled","WIVehic_weapImpac","WIVehic_weapImpaf","WIVehic_weapImpah","WIVehic_weapImpai","NUAvata_idleLoopa","NUAvata_idleLoopb","NUAvata_idleLoopc","NUAvata_idleLoopd","NUAvata_idleLoope","NUAvata_idleLoopf","NUAvata_idleLoopg","NUAvata_idleLooph","NUAvata_idleLoopi","NUAvata_moveStara","NUAvata_moveStarb","NUAvata_moveStarc","NUAvata_moveStard","NUAvata_moveStare","NUAvata_moveStarf","NUAvata_sounSelea","NUAvata_sounSeleb","NUAvata_sounSelec","NUAvata_sounSeled","NUAvata_sounSelee","NUAvata_footstepa","NUAvata_footstepb","NUAvata_footstepc","NUAvata_footstepd","NUAvata_footstepe","NUAvata_footstepf","NUAvata_footstepg","NUAvata_footsteph","NUAvata_footstepi","NUAvata_footstepj","NUBeamC_wea1Firea","NUBeamC_wea1Fireb","NUBeamC_wea1Firec","NUBeamC_wea1Fired","NUBeamC_wea1Firee","NUBeamC_wea1Firef","NUBeamC_wea1Fireg","NUBeamC_wea1Swela","NUBeamC_wea1Swelb","NUBeamC_wea1Swelc","NUBeamC_wea1Sweld","NUBeamC_wea1Swele","NUBeamC_wea1Swelf","NUAvata_weaLasera","NUAvata_weaLaserb","NUAvata_weaLaserc","NUAvata_weaLaserd","NUAvata_weaLasere","NUAvata_weaLaserf","NUAvata_weaLaserg","NUAvatar_commandea","NUAvatar_commandeb","NUAvatar_commandec","NUAvatar_commanded","NUAvatar_commandee","NUTurre_moveStara","NUTurre_moveStarb","NUTurre_moveStarc","NUTurre_moveStard","NUTurre_moveStare","NUTurre_moveStarf","NUTurre_moveStarg","NUTurre_moveStarh","NUTurre_moveStara","NUTurre_moveStarb","NUTurre_moveStarc","NUTurre_moveStard","NUTurre_moveStare","NUTurre_moveStarf","NUTurre_moveStarg","NUTurre_moveStarh","NUTurre_moveStara","NUTurre_moveStarb","NUTurre_moveStarc","NUTurre_moveStard","GUJugge_sounSelea","GUJugge_sounSeleb","GUJugge_sounSelec","WUVehic_explMGj","WUVehic_explMGk","NUBatSh_sinkb","WIBuild_diea","WIBuild_dieb","WIBuild_diec","WIBuild_died","WIBuild_diee","WIBuild_dief","WIBuild_dieg","WIBuild_dieh","WIBuild_diei","NUBeamC_wea1Firea","NUBeamC_wea1Fireb","NUBeamC_wea1Firec","NUBeamC_wea1Fired","NUBeamC_wea1Firee","NUBeamC_wea1Firef","NUBeamC_wea1Fireg","NUBeamC_wea1Swela","NUBeamC_wea1Swelb","NUBeamC_wea1Swelc","NUBeamC_wea1Sweld","NUBeamC_wea1Swele","NUBeamC_wea1Swelf","NUBeamC_wea1Loopa","NUBeamC_wea1Loopb","NUBeamC_wea1Loopc","NUBeamC_wea1Loopd","NUBeamC_wea1Loope","NUBeamC_wea1Loopf","NUBeamC_wea1Loopg","NUBeamC_wea1Looph","NUBeamC_wea1Loopi","NUBeamC_wea1Loopj","NUBeamC_wea1Loopk","NUBeamC_wea1Loopl","NUBeamC_wea1Loopm","NUBeamC_wea1Loopn","NUBeamC_wea1Loopa",
	"NUBeamC_wea1Loopb","NUBeamC_wea1Loopc","NUBeamC_wea1Loopd","NUBeamC_wea1Loope","NUBeamC_wea1Loopf","NUBeamC_wea1Loopg","NUBeamC_wea1Looph","NUBeamC_wea1Loopi","NUBeamC_wea1Loopj","NUBeamC_wea1Loopk","NUBeamC_wea1Loopl","NUBeamC_wea1Loopm","NUBeamC_wea1Loopn","NUBeamC_idleLoopa","NUBeamC_idleLoopb","NUBeamC_idleLoopc","NUBeamC_idleLoopd","NUBeamC_idleLoope","NUBeamC_idleLoopf","NUBeamC_idleLoopg","NUBeamC_idleLooph","NUBeamC_moveStara","NUBeamC_moveStarb","NUBeamC_moveStarc","NUBeamC_moveStard","NUBeamC_moveStare","NUBeamC_moveStarf","NUBeamC_moveStarg","NUBeamC_moveStarh","NUBeamC_sounSelea","NUBeamC_sounSeleb","NUBeamC_sounSelec","NUBeamC_sounSeled","NUBeamC_sounSelee","NUBeamC_sounSelef","NUBeamC_sounSeleg","NUBeamC_sounSeleh","NUBlack_ambiSelea","NUBlack_ambiSeleb","NUBlack_ambiSelec","NUBlack_ambiSeled","NUBlack_ambiSelee","NUBlack_weaFlarea","NUBlack_weaFlareb","NUBlack_weaFlarec","NUBlack_weaFlared","NUBlack_weaFlaree","NUBlack_weaFlaref","NUBlack_weaFlareg","NUBlack_weaFlareh","NUBlack_weaFlarei","NUBlack_weaFlarej","NUBlack_weaFlarek","NUBlack_weaFlarel","NUBlack_weaFlarem","NUBlack_weaFlaren","NUBlack_weaFlareo","NUBlack_weaFlarep","NUBlack_weaFlareq","NUBlack_weaFlarer","NUBlack_weaFlares","NUBlack_weaFlaret","NUBlack_weaFlareu","NUBlack_weaFlarev","NUBlack_weaFlaL2a","NUBlack_weaFlaL2b","NUBlack_weaFlaL2c","NUBlack_weaFlaL2d","NUBlack_weaFlaL2e","NUBlack_weaFlaL2f","NUBlack_weaFlaL2g","NUBlack_weaFlam1a","NUBlack_weaFlam1b","NUBlack_weaFlam1c","NUBlack_weaFlam1d","NUBlack_weaFlam1e","NUBlack_weaFlam1f","NUBlack_weaFlam1g","NUBlack_weaFlam1h","NUBlack_weaFlam1i","NUBlack_weaFlam1j","NUBlack_weaFlam1k","NUBlack_weaFlam1l","NUBlack_weaFlam1m","NUBlack_weaFlam1n","GUComma_charBeepa","GUComma_charPlana","GUComma_charPlanb","GUComma_charPlanc","GUComma_charPland","GUComma_charPlane","GUComma_charPlanf","GUComma_charPlang","GUComma_charPlanh","NUComma_weapFirea","NUComma_weapFireb","NUComma_weapFirec","NUComma_weapFired","NUComma_weapFirea","NUComma_weapFireb","NUComma_weapFirec","NUComma_weapFired","GUGrena_grenThroa","GUGrena_grenThrob","GUGrena_grenThroc","GUGrena_grenThrod","GUGrena_grenThroe","GUGrena_grenThrof","GUGrena_grenThrog","GUGrena_grenThroh","GUGrena_grenThroi","GUGrena_grenThroj","NUInfan_voiEffora","NUInfan_voiEfforb","NUInfan_voiEfforc","NUInfan_voiEfford","NUInfan_voiEffore","NUInfan_voiEfforf","NUInfan_voiEfforg","NUInfan_voiEfforh","NUInfan_voiEffori","NUInfan_voiEfforj","NUInfan_voiEffork","NUInfan_voiEfforl","NUInfan_voiEfform","NUInfan_voiEfforn","NUInfan_voiEfforo","NUInfan_voiEfforp","NUInfan_voiEfforq","NUInfan_voiEfforr","NUInfan_voiEffors","NUEnlig_charParta","NUEnlig_charPartb","NUEnlig_charPartc","NUEnlig_charPartd","NUEnlig_charParte","NUEnlig_charPartf","NUConfe_grenExpla","NUConfe_grenExplb","NUConfe_grenExplc","GUGrena_grenThroa","GUGrena_grenThrob","GUGrena_grenThroc","GUGrena_grenThrod","GUGrena_grenThroe","GUGrena_grenThrof","GUGrena_grenThrog","GUGrena_grenThroh","GUGrena_grenThroi","GUGrena_grenThroj","GUSnipe_wea2firef","GUSnipe_wea2fireg","GUSnipe_wea2fireh","GUSnipe_wea2firei","GUSnipe_wea2firek","GUSnipe_wea2firel","GUSnipe_wea2firem","GUSnipe_wea2firea","GUSnipe_wea2fireb","GUSnipe_wea2firec","GUSnipe_wea2fired","GUSnipe_wea2firee","GUSnipe_wea2firej","GUSnipe_wea2firen","GUSnipe_wea2firef","GUSnipe_wea2fireg","GUSnipe_wea2fireh","GUSnipe_wea2firei","GUSnipe_wea2firek","GUSnipe_wea2firel","GUSnipe_wea2firem","GUSnipe_wea2firea","GUSnipe_wea2fireb","GUSnipe_wea2firec","GUSnipe_wea2fired","GUSnipe_wea2firee","GUSnipe_wea2firej","GUSnipe_wea2firen","NUConfe_upgradea","NUInfan_voiEffora","NUInfan_voiEfforb","NUInfan_voiEfforc","NUInfan_voiEfford","NUInfan_voiEffore","NUInfan_voiEfforf","NUInfan_voiEfforg","NUInfan_voiEfforh","NUInfan_voiEffori","NUInfan_voiEfforj","NUInfan_voiEffork","NUInfan_voiEfforl","NUInfan_voiEfform","NUInfan_voiEfforn","NUInfan_voiEfforo","NUInfan_voiEfforp","NUInfan_voiEfforq","NUInfan_voiEfforr","NUInfan_voiEffors","NUEmiss_ambiSelea","NUEmiss_ambiSeleb","NUEmiss_ambiSelec","NUEmiss_ambiSeled","NUEmiss_ambiSelee","GUmcv_pak5a","NUEmiss_idleLoopa",
	"NUEmiss_idleLoopb","NUEmiss_idleLoopc","NUEmiss_idleLoopd","NUEmiss_idleLoope","NUEmiss_idleLoopf","NUEmiss_idleLoopg","NUEmiss_idleLooph","NUEmiss_moveStara","NUEmiss_moveStarb","NUEmiss_moveStarc","NUEmiss_moveStard","NUEmiss_moveStare","NUEmiss_moveStarf","GUmcv_pak2a","GUmcv_pak5a","GUmcv_upak4a","GUmcv_pak5a","NUMcv_pak3a","NUMcv_pakBeda","NUMcv_pak2a","GUmcv_pak1a","NUMcv_pak4a","NUEnlig_charParta","NUEnlig_charPartb","NUEnlig_charPartc","NUEnlig_charPartd","NUEnlig_charParte","NUEnlig_charPartf","Nupgra_SupeChara","NUEnlig_supeChara","NUEnlig_supeCharb","NUEnlig_supeCharc","NUEnlig_supeChard","NUEnlig_supeChare","NUEnlig_supeCharf","NUVerti_bombExpla","NUVerti_bombExplb","NUVerti_bombExplc","NUVerti_bombExpld","NUVerti_bombExple","NUVerti_bombExplf","NUFlame_weaFlaml2a","NUFlame_weaFlaml2b","NUFlame_weaFlaml2c","NUFlame_weaFlaml2d","NUFlame_weaFlaml2e","NUFlame_weaFlaml2f","NUFlame_idleLoopa","NUFlame_idleLoopb","NUFlame_idleLoopc","NUFlame_idleLoopd","NUFlame_idleLoope","NUFlame_idleLoopf","NUFlame_idleLoopg","NUFlame_idleLooph","NUFlame_idleLoopi","NUFlame_moveLoopa","NUFlame_moveLoopb","NUFlame_moveLoopc","NUFlame_moveLoopd","NUFlame_moveLoope","NUFlame_moveLoopf","NUFlame_moveLoopg","NUFlame_moveLooph","NUFlame_moveLoopi","NUFlame_moveStara","NUFlame_moveStarb","NUFlame_moveStarc","NUFlame_sounSelea","NUFlame_sounSeleb","NUFlame_sounSelec","NUHarve_idleLoopa","NUHarve_idleLoopb","NUHarve_idleLoopc","NUHarve_idleLoopd","NUHarve_idleLoope","NUHarve_idleLoopf","NUHarve_idleLoopg","NUHarve_ambiDeLoa","NUHarve_ambiDeLob","NUHarve_ambiDeLoc","NUHarve_ambiDeLod","NUHarve_moveStara","NUHarve_moveStarb","NUHarve_moveStarc","NUHarve_moveStard","NUHarve_moveStare","NUHarve_moveStarf","NUHarve_moveStarg","NUHarve_sounSelea","NUHarve_sounSeleb","NUHarve_sounSelec","NUHarve_sounSeled","NUManti_diea","NUManti_dieb","NUManti_diec","NUManti_died","NUManti_movBya","NUManti_movByb","NUManti_movByc","NUManti_movByd","NUManti_movBye","NUManti_movStarta","NUManti_movStartb","NUManti_movStartc","NUManti_movStartd","NUManti_movStarte","NUManti_movStartf","NUManti_movStartg","NUManti_movStarth","NUManti_movStarti","NUManti_movStartj","NUManti_movStartk","NUManti_movStartl","NUManti_souSelecta","NUManti_souSelectb","NUManti_souSelectc","NUManti_souSelectd","NUManti_selecta","NUManti_selectb","NUManti_selectc","NUManti_selectd","NUManti_selecte","NUManti_selectf","NUManti_selectg","NUManti_selecth","NUManti_selecti","NUManti_selectj","NUManti_selectk","NUManti_selectl","NUManti_selectm","NUManti_selectn","NUManti_voiDamagea","NUManti_voiDamageb","NUManti_voiDamagec","NUManti_voiDamaged","NUManti_voiSelec2a","NUManti_voiSelec2c","NUManti_voiSelec2d","NUManti_voiSelec2e","NUManti_voiSelec2e","NUManti_voiSelec2f","NUManti_voiSelec2g","NUManti_voiSelec2h","NUManti_voiSelec2i","NUManti_voiSelec2j","NUManti_voiSelec2k","NUManti_voiSelec2l","NUManti_voiSelec2m","NUManti_voiSelec2n","NUManti_voiSelec2b","NUManti_wea1Firea","NUManti_wea1Fireb","NUManti_wea1Firec","NUManti_wea1Fired","NUManti_wea1Firee","NUManti_wea1Firef","NUManti_wea1Fireg","NUManti_wea1Impaca","NUManti_wea1Impacb","NUManti_wea1Impacc","NUManti_wea1Impacd","NUManti_wea1Impace","NUManti_wea1Impacf","NUManti_wea1Impacg","NUManti_wea2Firea","NUManti_wea2Fireb","NUManti_wea2Firec","NUManti_wea2Fired","NUManti_wea2Firee","NUManti_wea2Firef","NUManti_wea2Fireg","NUManti_wea2Impaca","NUManti_wea2Impacb","NUManti_wea2Impacc","NUManti_wea2Impacd","NUManti_wea2Impace","NUManti_wea2Impacf","NUManti_wea2Impacg","GUNukeT_responsea","GUNukeT_responseb","GUNukeT_responsec","GUNukeT_responsed","GUNukeT_responsee","NURaide_capaFirea","NURaide_capaFireb","NURaide_capaFirec","NURaide_capaFired","NURaide_capaFiree","NURaide_capaFiref","NURaide_capaFireg","NURaide_EMPblasta","NURaide_gunFire1a","NURaide_gunFire1b","NURaide_gunFire1c","NURaide_gunFire1d","NURaide_gunFire1e","NURaide_gunFire1f","NURaide_gunFire1g","NURaide_gunFire1h","NURaide_idleLoopa","NURaide_idleLoopb","NURaide_idleLoopc","NURaide_idleLoopd","NURaide_idleLoope","NURaide_idleLoopf","NURaide_idleLoopg","NURaide_idleLooph",
	"NURaide_moveStara","NURaide_moveStarb","NURaide_moveStarc","NURaide_moveStard","NURaide_moveStare","NURaide_moveStarf","NURaide_sounSelea","NURaide_sounSeleb","NURaide_sounSelec","NURaide_sounSeled","NURecko_deploya","NURecko_dozeUpgra","NURecko_idleLoopa","NURecko_idleLoopb","NURecko_idleLoopc","NURecko_moveBya","NURecko_moveByb","NURecko_moveByc","NURecko_moveByd","NURecko_moveBye","NURecko_moveByf","NURecko_moveByg","NURecko_moveStara","NURecko_moveStarb","NURecko_moveStarc","NURecko_moveStard","NURecko_moveStare","NURecko_moveStarf","NURecko_moveStarg","NURecko_moveStarh","NURecko_selecta","NURecko_sounSelea","NURecko_sounSeleb","NURecko_sounSelec","NURecko_sounSeled","NURecko_sounSelee","WIVehic_weapImpac","WIVehic_weapImpaf","WIVehic_weapImpah","WIVehic_weapImpai","WACreak_tree1_i","GURepai_sparksa","GURepai_sparksb","GURepai_sparksc","GURepai_sparksd","GURepai_sparkse","GURepai_sparksf","GURepai_sparksg","GURepai_sparksh","Nupgra_LaseCapaa","GUUpgra_railCanoa","GUUpgra_railCanob","GUUpgra_railCanoc","GUUpgra_railCanod","NUAwake_gunFirea","NUAwake_gunFireb","NUAwake_gunFirec","NUAwake_gunFired","NUAwake_gunFiree","NUAvata_idleLoopa","NUAvata_idleLoopb","NUAvata_idleLoopc","NUAvata_idleLoopd","NUAvata_idleLoope","NUAvata_idleLoopf","NUAvata_idleLoopg","NUAvata_idleLooph","NUAvata_idleLoopi","NURedee_laseWeap1a","NURedee_laseWeap1b","NURedee_laseWeap1c","NURedee_laseWeap1d","NURedee_laseWeap1e","NURedee_laseWeap1f","NURedee_laseWeap1g","NURedee_laseWeap1h","NURedee_laseWeap2a","NURedee_laseWeap2b","NURedee_laseWeap2c","NURedee_laseWeap2d","NURedee_laseWeap2e","NURedee_laseWeap2f","NURedee_laseWeap2g","NURedee_laseWeap2h","NURedee_laseWeap3a","NURedee_laseWeap3b","NURedee_laseWeap3c","NURedee_laseWeap3d","NURedee_laseWeap3e","NURedee_laseWeap3f","NURedee_laseWeap3g","NURedee_laseWeap3h","NUAvata_moveStara","NUAvata_moveStarb","NUAvata_moveStarc","NUAvata_moveStard","NUAvata_moveStare","NUAvata_moveStarf","NURedee_rageGenea","NURedee_RageGene2","NURedee_rageGeneStereoa","NUAvata_sounSelea","NUAvata_sounSeleb","NUAvata_sounSelec","NUAvata_sounSeled","NUAvata_sounSelee","GBBatte_gunMotL2a","GBBatte_gunMotL2b","GBBatte_gunMotL2c","NUTibTr_gooWeap1a","NUTibTr_gooWeap1b","NUTibTr_gooWeap1c","NUTibTr_gooWeap2La","NUTibTr_gooWeap2Lb","NUTibTr_gooWeap2Lc","NUAvata_footstepa","NUAvata_footstepb","NUAvata_footstepc","NUAvata_footstepd","NUAvata_footstepe","NUAvata_footstepf","NUAvata_footstepg","NUAvata_footsteph","NUAvata_footstepi","NUAvata_footstepj","NURifle_gunFire01","NURifle_gunFire02","NURifle_gunFire03","NURifle_gunFire04","NURifle_gunFire05","NURifle_gunFire06","NURifle_gunFire07","NURifle_gunFire08","NURifle_gunFire09","NURifle_gunFire10","NURifle_gunFire11","NURifle_gunFire12","NURifle_gunFire13","NURifle_gunFire14","NURifle_gunFire15","NURifle_gunFire16","NURifle_gunFire17","NURifle_gunFire18","NURifle_gunFire19","NURifle_gunFire20","NURifle_gunFire21","NURifle_gunFire22","NURifle_gunFire23","NURifle_gunFire24","NURifle_gunFire25","NURifle_gunFire26","NURifle_gunFire27","NURifle_gunFire28","NURifle_gunFire2a","NURifle_gunFire2b","NURifle_gunFire2c","NURifle_gunFire2d","NURifle_gunFire2e","NURifle_gunFire2f","NURifle_gunFire2g","NURocMi_rockLauna","NURocMi_rockLaunb","NURocMi_rockLaunc","NURocMi_rockLaund","NURocMi_rockLaune","NURocMi_rockLaunf","NURocMi_rockLaung","NURocMi_rockLaunh","NURocMi_rockLauni","NURocMi_rockLaunj","GUComma_charBeepa","GUComma_charPlana","GUComma_charPlanb","GUComma_charPlanc","GUComma_charPland","GUComma_charPlane","GUComma_charPlanf","GUComma_charPlang","GUComma_charPlanh","NUScorp_ambiSelea","NUScorp_ambiSeleb","NUScorp_ambiSelec","NUScorp_ambiSeled","NUScorp_ambiSelee","NUScorp_BeamFirea","NUScorp_BeamFireb","NUScorp_BeamFirec","NUScorp_BeamFired","NUScorp_BeamFiree","NUScorp_BeamLoopa","NUScorp_BeamLoopb","NUScorp_BeamLoopc","NUScorp_BeamLoopd","NUScorp_BeamLoope","NUScorp_BeamLoopf","NUScorp_BeamLoopg","NUScorp_BeamLooph","NUScorp_BeamLoopi","NUScorp_BeamSpara","NUScorp_BeamSparb","NUScorp_BeamSparc","NUScorp_BeamSpard","NUScorp_BeamSpare",
	"NUScorp_BeamSparf","NUScorp_BeamSparg","NUScorp_BeamSparh","NUScorp_cannFirea","NUScorp_cannFireb","NUScorp_cannFirec","NUScorp_cannFired","NUScorp_cannFiree","NUScorp_cannFiref","NUScorp_cannFireg","NUScorp_cannFireh","NUScorp_cannFirei","NUScorp_cannExpla","NUScorp_cannExplb","NUScorp_cannExplc","NUScorp_cannExpld","NUScorp_cannExple","NUScorp_cannExplf","NUScorp_cannExplg","NURecko_dozeUpgra","NUScorp_idleLoopa","NUScorp_idleLoopb","NUScorp_idleLoopc","NUScorp_idleLoopd","NUScorp_moveStara","NUScorp_moveStarb","NUScorp_moveStarc","NUScorp_moveStard","NUScorp_moveStare","NUScorp_moveStarf","NUScorp_moveStarg","NUScorp_moveStarh","NUAwake_gunFirea","NUAwake_gunFireb","NUAwake_gunFirec","NUAwake_gunFired","NUAwake_gunFiree","GUHamme_wea1Firea","GUHamme_wea1Fireb","GUHamme_wea1Firec","GUHamme_wea1Fired","GUHamme_wea1Firee","GUHamme_wea1Firef","GUHamme_wea1Fireg","GUHamme_wea1Fireh","NUAwake_empFirea","NURaide_EMPblasta","NUAwake_partUpgra","NUAwake_charFirea","NUAwake_charFireb","NUAwake_charFirec","NUAwake_charFired","NUAwake_sounSelea","NUAwake_sounSeleb","NUAwake_sounSelec","NUSpect_weapFire1a","NUSpect_weapFire1b","NUSpect_weapFire1c","NUSpect_weapFire1d","NUSpect_weapFire1e","NUSpect_weapFire1f","NUSpect_weapFire1g","NUSpect_weapFire1h","NUSpect_weapFire1i","NUSpect_weapFire1j","NUSpect_weapFire1k","NUSpect_weapFire1l","NUSpect_weapFire1m","GUGuard_wea2firea","GUGuard_wea2fireb","GUGuard_wea2firec","GUGuard_wea2fired","GUGuard_wea2firee","GUGuard_wea2firef","GUGuard_wea2fireg","GUGuard_wea2fireh","GUGuard_wea2firei","GUGuard_wea2firej","GUGuard_wea2firek","GUGuard_wea2firea","GUGuard_wea2fireb","GUGuard_wea2firec","GUGuard_wea2fired","GUGuard_wea2firee","GUGuard_wea2firef","GUGuard_wea2fireg","GUGuard_wea2fireh","GUGuard_wea2firei","GUGuard_wea2firej","GUGuard_wea2firek","NUSpect_weapFire1a","NUSpect_weapFire1b","NUSpect_weapFire1c","NUSpect_weapFire1d","NUSpect_weapFire1e","NUSpect_weapFire1f","NUSpect_weapFire1g","NUSpect_weapFire1h","NUSpect_weapFire1i","NUSpect_weapFire1j","NUSpect_weapFire1k","NUSpect_weapFire1l","NUSpect_weapFire1m","NUSpect_weapImpa1a","NUSpect_weapImpa1b","NUSpect_weapImpa1c","NUSpect_weapImpa1d","NUSpect_weapImpa1e","NUSpect_weapImpa1f","NUSpect_weapImpa2a","NUSpect_weapImpa2b","NUSpect_weapImpa2c","NUSpect_weapImpa2d","NUSpect_weapImpa2e","NUSpect_weapImpa2f","NUSpect_weapImpa2g","NUSpect_deploya","NUSpect_idleLoopa","NUSpect_idleLoopb","NUSpect_idleLoopc","NUSpect_idleLoopd","NUSpect_idleLoope","NUSpect_idleLoopf","NUSpect_idleLoopg","NUSpect_idleLooph","NUSpect_moveBya","NUSpect_moveByb","NUSpect_moveByc","NUSpect_moveByd","NUSpect_moveBye","NUSpect_moveByf","NUSpect_moveByg","NUSpect_moveByh","NUSpect_moveByi","NUSpect_moveByj","NUSpect_moveStara","NUSpect_moveStarb","NUSpect_moveStarc","NUSpect_moveStard","NUSpect_moveStare","NUSpect_moveStarf","NUSpect_moveStarg","NUSpect_projFlyBya","NUSpect_projFlyByb","NUSpect_projFlyByc","NUSpect_projFlyByd","NUSpect_sounSelea","NUSpect_sounSeleb","NUSpect_sounSelec","NUSpect_sounSeled","NUSteal_idleLoopa","NUSteal_idleLoopb","NUSteal_idleLoopc","NUSteal_idleLoopd","NUSteal_idleLoope","NUSteal_idleLoopf","NUSteal_idleLoopg","NUSteal_idleLooph","NUSteal_moveStara","NUSteal_moveStarb","NUSteal_moveStarc","NUSteal_moveStard","NUSteal_moveStare","NUSteal_rockExpla","NUSteal_rockExplb","NUSteal_rockExplc","NUSteal_rockExpld","NUSteal_rockExple","NUSteal_rockExplf","NUSteal_rockExplg","NUSteal_rockExplh","NUSteal_rockLauna","NUSteal_rockLaunb","NUSteal_rockLaunc","NUSteal_rockLaund","NUSteal_rockLaune","NUSteal_rockLaunf","NUSteal_rockLauna","NUSteal_rockLaunb","NUSteal_rockLaunc","NUSteal_rockLaund","NUSteal_rockLaune","NUSteal_rockLaunf","NUSteal_rockZipa","NUSteal_rockZipb","NUSteal_rockZipc","NUSteal_rockZipd","NUSteal_stealOna","NUSteal_stealOnb","NUSteal_stealOnc","NUSteal_stealOnd","NUSteal_stealOne","NUSteal_stealOffa","NUSteal_stealOffb","NUSteal_stealOffc","NUSteal_stealOffd","NUSteal_stealOffe","NUSteal_sounSelea","NUSteal_sounSeleb","NUSteal_sounSelec","NUSteal_sounSeled","NUSteal_sounSelee","NUSteal_sounSelef","NUVenom_capaFirea",
	"NUVenom_capaFireb","NUVenom_capaFirec","NUVenom_capaFired","NUVenom_capaFiree","NUVenom_capaFiref","NUVenom_capaFireg","NUVenom_gunFire6a","NUVenom_gunFire6b","NUVenom_gunFire6c","NUVenom_gunFire6d","NUVenom_gunFire6e","NUVenom_gunFire6f","NUVenom_idleLoopa","NUVenom_idleLoopb","NUVenom_idleLoopc","NUVenom_idleLoopd","NUVenom_idleLoope","NUVenom_idleLoopf","NUVenom_idleLoopg","NUVenom_idleLooph","NUVenom_idleLoopi","NUVenom_idleLoopj","NUVenom_idleLoopK","NUVenom_idleLoopL","NUVenom_idleLoopM","NUVenom_idleLoopN","NUVenom_idleLoopO","NUVenom_moveStara","NUVenom_moveStarb","NUVenom_moveStarc","NUVenom_moveStard","NUVenom_moveStare","NUVenom_moveStarf","NUVenom_moveStarg","NUVenom_idleLoopa","NUVenom_idleLoopb","NUVenom_idleLoopc","NUVenom_idleLoopd","NUVenom_idleLoope","NUVenom_idleLoopf","NUVenom_idleLoopg","NUVenom_idleLooph","NUVenom_idleLoopi","NUVenom_idleLoopj","NUVenom_idleLoopK","NUVenom_idleLoopL","NUVenom_idleLoopM","NUVenom_idleLoopN","NUVenom_idleLoopO","NUVenom_moveStara","NUVenom_moveStarb","NUVenom_moveStarc","NUVenom_moveStard","NUVenom_moveStare","NUVenom_moveStarf","NUVenom_moveStarg","NUVenom_signGeneb","NUVenom_signGenea","NUVenom_signGenea","NUVenom_sounSelea","NUVenom_sounSeleb","NUVenom_sounSelec","NUVenom_sounSeled","NUVenom_sounSelee","NPDisPo_explosiona","NUVerti_disPodFira","NUVerti_disPodImpa","NUVerti_disPodSela","GUFireh_firebomb1a","NUVertigo_bombDropa","NUVertigo_bombDropb","NUVertigo_bombDropc","NUVertigo_bombDropd","NUVertigo_bombDrope","NUVertigo_bombDropf","NUVertigo_idleLoopa","NUVertigo_idleLoopb","NUVertigo_sweeLoopa","NUVertigo_sweeLoopb","NUVertigo_sweeLoopc","NUVertigo_sweeLoopd","NUVertigo_sweeLoope","NUVertigo_sweeLoopf","NUVertigo_sweeLoopg","NUVertigo_sweeLooph","NUVertigo_sweeLoopi","NUVertigo_sweeLoopj","NUVertigo_sweeLoopK","NUVertigo_sweeLoopL","NUVerti_ammoLoada","NUVerti_reloadeda","NUVerti_ammoLoada","NUVerti_reloadeda","NUVerti_bombExpla","NUVerti_bombExplb","NUVerti_bombExplc","NUVerti_bombExpld","NUVerti_bombExple","NUVerti_bombExplf","NUVertigo_moveStara","NUVertigo_moveStarb","NUVertigo_moveStarc","NUVertigo_moveStard","NUVertigo_moveStara","NUVertigo_moveStarb","NUVertigo_moveStarc","NUVertigo_moveStard","NUVertigo_moveStara","NUVertigo_moveStarb","NUVertigo_moveStarc","NUVertigo_moveStard","NUVertigo_sounSelea","NUVertigo_sounSeleb","NUVertigo_sounSelec","NUMcv_sounSelea","NUMcv_sounSeleb","NUMcv_sounSelec","NUMcv_sounSeled","NUMcv_sounSelee","NUMcv_sounSelef","NUMcv_moveStara","NUMcv_moveStarb","NUMcv_moveStarc","NUMcv_moveStard","NUMcv_moveStare","NUMcv_moveStarf","NUMcv_moveStara","NUMcv_moveStarb","NUMcv_moveStarc","NUMcv_moveStard","NUMcv_moveStare","NUMcv_moveStarf","NUMcv_moveStara","NUMcv_moveStarb","NUMcv_moveStarc","NUMcv_moveStard","NUMcv_moveStare","NUMcv_moveStarf","NUMcv_moveStepa","NUMcv_moveStepb","NUMcv_moveStepc","NUMcv_moveStepd","NUMcv_moveStepe","NUMcv_moveStepf","NUMcv_moveStepg","NUMcv_moveSteph","NUMcv_moveStepi","NUMcv_moveStepj","NUMcv_moveStepk","NUMcv_moveStepl","NUMcv_moveStepm","NUMcv_moveStepn","NUMcv_moveStepo","NUMcv_moveStepp","NUMcv_moveStara","NUMcv_moveStarb","NUMcv_moveStarc","NUMcv_moveStard","NUMcv_moveStare","NUMcv_moveStarf","NUMcv_sounSelea","NUMcv_sounSeleb","NUMcv_sounSelec","NUMcv_sounSeled","NUMcv_sounSelee","NUMcv_sounSelef","NUMcv_pakBeda","NUMcv_pak1a","NUMcv_pak2a","NUMcv_pak3a","NUMcv_pak4a","NUMcv_pak5a","NUMcv_pak6a","NUMcv_upakBeda","NUMcv_upak1a","NUMcv_upak2a","NUMcv_upak3a","NUMcv_upak4a","NUMcv_upak5a","NUMcv_upak6a","NUMcv_upak7a","NUCarry_idleLoopa","NUCarry_idleLoopb","NUCarry_idleLoopc","NUCarry_idleLoopd","NUCarry_idleLoope","NUCarry_idleLoopf","NUCarry_idleLoopg","NUCarry_idleLooph","NUCarry_moveLoopa","NUCarry_moveLoopb","NUCarry_moveLoopc","NUCarry_moveLoopd","NUCarry_moveLoope","NUCarry_moveLoopf","NUCarry_moveLoopg","NUCarry_moveStara","NUCarry_moveStarb","NUCarry_moveStarc","NUCarry_moveStard","NUCarry_moveStare","NUCarry_moveStarf","NUCarry_moveStarg","NUCarry_moveStarh",
	"NUCarry_sounSelea","NUCarry_sounSeleb","NUCarry_sounSelec","NUCarry_sounSeled","NUCarry_sounSelee","NUCarry_sounSelef","NUCarry_dropa","NUCarry_pickupa","NUCarry_takeOffa","NUCarry_takeOffb","NUCarry_takeOffc","NUCarry_landa","NUCarry_landb","NUCarry_landc","NUShado_artBeaSela","NUShado_beacExploa","NUShaSq_moveLoopa","NUShaSq_moveLoopb","NUShaSq_moveLoopc","NUShaSq_moveLoopd","NUShaSq_moveLoope","NUShaSq_moveLoopf","NUShaSq_moveLoopa","NUShaSq_moveLoopb","NUShaSq_moveLoopc","NUShaSq_moveLoopd","NUShaSq_moveLoope","NUShaSq_moveLoopf","NUShado_flyinga","NUShado_flyingb","NUShado_flyingc","NUShado_flyingd","NUShado_flyinge","NUShado_flyingf","NUShado_flyinga","NUShado_flyingb","NUShado_flyingc","NUShado_flyingd","NUShado_flyinge","NUShado_flyingf","NUShado_footstepa","NUShado_footstepb","NUShado_footstepc","NUShado_footstepd","NUShado_footstepe","NUShado_footstepf","NUShado_footstepg","NUShado_footsteph","NUShado_footstepi","NUShado_footstepj","NUShaSq_moveStara","NUShaSq_moveStarb","NUShaSq_moveStarc","NUShaSq_moveStard","NUShaSq_moveStare","NUShaSq_moveStarf","NUShaSq_moveStarg","NUShaSq_airSelea","NUShaSq_airSeleb","NUShaSq_airSelec","NUShaSq_airSeled","NUShaSq_airSelee","NUShaSq_airSelef","NUShaSq_moveStara","NUShaSq_moveStarb","NUShaSq_moveStarc","NUShaSq_moveStard","NUShaSq_moveStare","NUShaSq_moveStarf","NUShaSq_moveStarg","NUShaSq_airSelea","NUShaSq_airSeleb","NUShaSq_airSelec","NUShaSq_airSeled","NUShaSq_airSelee","NUShaSq_airSelef","NUShaSq_weapFirea","NUShaSq_weapFireb","NUShaSq_weapFirec","NUShaSq_weapFired","NUShaSq_weapFiree","NUShaSq_weapFiref",	"NUShaSq_weapFireg","NUShaSq_exploAttaa","NUShaSq_exploAttab","NUShaSq_exploAttac","NUShaSq_exploAttad","NUShaSq_exploAttae","NUShaSq_exploAttaf","NUShaSq_exploAttag","NUShaSq_exploAttai","NUShaSq_exploLowa","NUShaSq_exploLowb","NUShaSq_exploLowc","NUShaSq_exploDebra","NUShaSq_exploDebrb","NUShaSq_exploDebrc","NUShaSq_exploDebrd","NUShaSq_exploDebre","NUShaSq_exploDebrf","NUShaSq_exploDebrg","NUShaSq_exploTaila","NUShaSq_exploTailb","NUShaSq_exploTailc","NUShaSq_exploTaild","NUShaSq_exploTaile","NUShaSq_exploTailf","NUShaSq_exploAttaa","NUShaSq_exploAttab","NUShaSq_exploAttac","NUShaSq_exploAttad","NUShaSq_exploAttae","NUShaSq_exploAttaf","NUShaSq_exploAttag","NUShaSq_exploAttai","NUShaSq_exploLowa","NUShaSq_exploLowb","NUShaSq_exploLowc","NUShaSq_exploDebra","NUShaSq_exploDebrb","NUShaSq_exploDebrc","NUShaSq_exploDebrd","NUShaSq_exploDebre","NUShaSq_exploDebrf","NUShaSq_exploDebrg","NUShaSq_exploTaila","NUShaSq_exploTailb","NUShaSq_exploTailc","NUShaSq_exploTaild","NUShaSq_exploTaile","NUShaSq_exploTailf","NUTibTr_gooWeap1a","NUTibTr_gooWeap1b","NUTibTr_gooWeap1c","NUTibTr_gooWeap2La","NUTibTr_gooWeap2Lb","NUTibTr_gooWeap2Lc","NUTurre_moveStara","NUTurre_moveStarb","NUTurre_moveStarc","NUTurre_moveStard","NUTurre_moveStare","NUTurre_moveStarf","NUTurre_moveStarg","NUTurre_moveStarh","NUTurre_exploDiea","NUTurre_exploDieb","NUTurre_exploDiec","NUTurre_exploDied","NUTurre_exploDiee","NUTurre_exploDief","NUTurre_exploDieg","NUTurre_exploDieh","NUTurre_exploDiei","NUTurre_exploDiej","NUTurre_geneDepla","NUTurre_geneDeplb","NUTurre_geneDeplc","NUTurre_geneDepld","NUTurre_geneDeple","NUTurre_geneDeplf","NUTurre_geneDeplg","NUTurre_geneDeplh","NUTurre_geneDepli","NBTurre_regeneraa","NBTurre_regenerab","NBTurre_regenerac","NBTurre_regenerad","NURocke_weapFirea","NURocke_weapFireb","NURocke_weapFirec","NURocke_weapFired","NURocke_weapFiree","NURocke_weapFiref","NURocke_weapFireg","NURocke_weapFireh","NURocke_weapFirei","NUShred_weapFirea","NUShred_weapFireb","NUShred_weapFirec","NUShred_weapFired","NUShred_weapFiree","NUShred_weapFiref","NUShred_weapFireg","NUShred_weapFireh","NUShred_weapFirei","NUShred_weapFirej","NUShred_weapFirek","NUShred_weapFirel","NBShred_wea2Firea","NBShred_wea2Fireb","NBShred_wea2Firec","NBShred_wea2Fired","NUShred_weapFirea","NUShred_weapFireb","NUShred_weapFirec","NUShred_weapFired","NUShred_weapFiree","NUShred_weapFiref","NUShred_weapFireg","NUShred_weapFireh","NUShred_weapFirei","NUShred_weapFirej",
	"NUShred_weapFirek","NUShred_weapFirel","NULaser_weapFirea","NULaser_weapFireb","NULaser_weapFirec","NULaser_weapFired","NULaser_weapFiree","NULaser_weapFiref","NULaser_weapFireg","NULaser_weapFireh","NULaser_weapFirei","NULaser_weapFirej","WUUnit_upgradea","WUUnit_upgradeb","WUUnit_upgradec","Aupgra_AdvaArtia","Aupgra_AttenForce","Aupgra_ConveReser","Aupgra_Forcefield","Aupgra_PlasDisca","Aupgra_TraveEngin","GUHamme_armoUpgra","GUUpgra_railCanoa","GUUpgra_railCanob","GUUpgra_railCanoc","GUUpgra_railCanod","Gupgra_Mortara","Gupgra_PowePacka","Gupgra_ScanPacka","NUpgra_BlacDisca","NUBlack_weaFlarea","NUBlack_weaFlarec","Nupgra_cybernLegs","NUpgra_disguisea","Nupgra_disruptPod","Nupgra_EMPcoilsa","Nupgra_LaseCapaa","NUpgra_PuriFlama","NUBlack_ambiSelea","NUBlack_ambiSeleb","NUBlack_ambiSelec","NUBlack_ambiSeled","NUBlack_ambiSelee","Nupgra_quadTurra","Nupgra_quadLasea","Nupgra_quadRocka","Nupgra_quadShrea","Nupgra_quadShrea","Nupgra_SignGenera","Nupgra_TibCorMiss","NUShaSq_exploAttaa","NUShaSq_exploAttab","NUShaSq_exploAttac","NUShaSq_exploAttad","NUShaSq_exploAttae","NUShaSq_exploAttaf","NUShaSq_exploAttag","NUShaSq_exploAttai","NUShaSq_exploLowa","NUShaSq_exploLowb","NUShaSq_exploLowc","NUShaSq_exploDebra","NUShaSq_exploDebrb","NUShaSq_exploDebrc","NUShaSq_exploDebrd","NUShaSq_exploDebre","NUShaSq_exploDebrf","NUShaSq_exploDebrg","NUShaSq_exploTaila","NUShaSq_exploTailb","NUShaSq_exploTailc","NUShaSq_exploTaild","NUShaSq_exploTaile","NUShaSq_exploTailf","WUVehic_explFGa","WUVehic_explFGb","WUVehic_explFGc","WUVehic_explFGd","WUVehic_explFGe","WUVehic_explFGf","WUVehic_explFGg","WUVehic_explFGh","WUVehic_explFGi","WUVehic_explGlasa","WUVehic_explGlasb","WUVehic_explGlasc","WUVehic_explGlasd","WUVehic_explGlase","WUVehic_explGlasf","WUVehic_explGlasg","WUVehic_explGlash","WUVehic_explMetaa","WUVehic_explMetab","WUVehic_explMetac","WUVehic_explMetad","WUVehic_explMetae","WUVehic_explMetaf","WUVehic_explMetag","WUVehic_explFGa","WUVehic_explFGb","WUVehic_explFGc","WUVehic_explFGd","WUVehic_explFGe","WUVehic_explFGf","WUVehic_explFGg","WUVehic_explFGh","WUVehic_explFGi","WUVehic_explBGa","WUVehic_explBGb","WUVehic_explBGc","WUVehic_explBGd","WUVehic_explBGe","WUVehic_explBGf","WUVehic_explBGg","WUVehic_explBGh","WUVehic_explBGi","WUVehic_explBGj","WUVehic_explBGk","WUVehic_explBGl","WUVehic_explBGm","WUVehic_explBGn","WUVehic_explBGo","WUVehic_explBGp","WUVehic_explBGq","WUVehic_explBGr","WUVehic_explFlana","WUVehic_explFlanb","WUVehic_explFlanc","WUVehic_explFland","WUVehic_explFlane","WUVehic_explFlanf","WUVehic_explFlang","WUVehic_explFlanh","WUVehic_explFlani","WUVehic_explFlanj","WUVehic_explFlank","WUVehic_explFlanl","WUVehic_explFlanm","WUVehic_explGlasa","WUVehic_explGlasb","WUVehic_explGlasc","WUVehic_explGlasd","WUVehic_explGlase","WUVehic_explGlasf","WUVehic_explGlasg","WUVehic_explGlash","WUVehic_explMGa","WUVehic_explMGb","WUVehic_explMGc","WUVehic_explMGd","WUVehic_explMGe","WUVehic_explMGf","WUVehic_explMGg","WUVehic_explMGh","WUVehic_explMGi","WUVehic_explMGj","WUVehic_explMGk","WUVehic_explMGl","WUVehic_explMGm","WUVehic_explMGn","WUVehic_explMGo","WUVehic_explMGp","WUVehic_explMGq","WUVehic_explMGr","WUVehic_explMetaa","WUVehic_explMetab","WUVehic_explMetac","WUVehic_explMetad","WUVehic_explMetae","WUVehic_explMetaf","WUVehic_explMetag","WUVehic_explUniqa","WUVehic_explUniqb","WUVehic_explUniqc","WUVehic_explUniqd","WUVehic_explUniqe","WUVehic_explUniqf","WUVehic_explUniqg","WUVehic_explUniqh",	"WUVehic_explUniqi","WUVehic_explUniqj","WUVehic_explUniqk","WUVehic_explMGa","WUVehic_explMGb","WUVehic_explMGc","WUVehic_explMGd","WUVehic_explMGe","WUVehic_explMGf","WUVehic_explMGg","WUVehic_explMGh","WUVehic_explMGi","WUVehic_explMGj","WUVehic_explMGk","WUVehic_explMGl","WUVehic_explMGm","WUVehic_explMGn","WUVehic_explMGo","WUVehic_explMGp","WUVehic_explMGq","WUVehic_explMGr","WUVehic_explFGa","WUVehic_explFGb","WUVehic_explFGc","WUVehic_explFGd","WUVehic_explFGe","WUVehic_explFGf","WUVehic_explFGg","WUVehic_explFGh","WUVehic_explFGi","WUVehic_explUniqa","WUVehic_explUniqb",
	"WUVehic_explUniqc","WUVehic_explUniqd","WUVehic_explUniqe","WUVehic_explUniqf","WUVehic_explUniqg","WUVehic_explUniqh",	"WUVehic_explUniqi","WUVehic_explUniqj","WUVehic_explUniqk","WUVehic_explMGa","WUVehic_explMGb","WUVehic_explMGc","WUVehic_explMGd","WUVehic_explMGe","WUVehic_explMGf","WUVehic_explMGg","WUVehic_explMGh","WUVehic_explMGi","WUVehic_explMGj","WUVehic_explMGk","WUVehic_explMGl","WUVehic_explMGm","WUVehic_explMGn","WUVehic_explMGo","WUVehic_explMGp","WUVehic_explMGq","WUVehic_explMGr","WUVehic_explFGa","WUVehic_explFGb","WUVehic_explFGc","WUVehic_explFGd","WUVehic_explFGe","WUVehic_explFGf","WUVehic_explFGg","WUVehic_explFGh","WUVehic_explFGi","WUVehic_explUniqa","WUVehic_explUniqb","WUVehic_explUniqc","WUVehic_explUniqd","WUVehic_explUniqe","WUVehic_explUniqf","WUVehic_explUniqg","WUVehic_explUniqh",	"WUVehic_explUniqi","WUVehic_explUniqj","WUVehic_explUniqk","WBGarri_selecta","ABBuild_placea","ABBuzze_selecta","AUBuzz_idleLoopa","AUBuzz_idleLoopb","AUBuzz_idleLoopc","AUBuzz_idleLoopd","AUBuzz_idleLoope","AUBuzz_idleLoopf","AUBuzz_idleLoopg","AUBuzz_idleLooph","ABTNode_select","ABDrone_selecta","ABExtra_selecta","ABFound_selecta","ABGravi_selecta","AUBuzze_sounSplia","ABGrowt_selecta","ABGrowt_selecta","ABGravi_recalla","ABLight_selecta","ABLiSpi_spawna","ABNerve_selecta","ABOutpo_selecta","AUExplo_unpackeda","AUExplo_unpackeda","ABPhoto_selecta","AUStalk_weapFire1a","AUStalk_weapFire1b","AUStalk_weapFire1c","AUStalk_weapFire1d","AUStalk_weapFire1e","AUStalk_weapFire1f","AUStalk_weapFire1g","AUStalk_weapFire1h","AUStalk_weapFire1i","ABPlasm_selecta","ABPlasBatt_weaFira","ABPlasBatt_weaFirb","ABPlasBatt_weaFirc","ABPlasBatt_weaFird","AUStalk_weapFire1a","AUStalk_weapFire1b","AUStalk_weapFire1c","AUStalk_weapFire1d","AUStalk_weapFire1e","AUStalk_weapFire1f","AUStalk_weapFire1g","AUStalk_weapFire1h","AUStalk_weapFire1i","ABPorta_selecta","ABReact_selecta","ABReact_upgradea","ABReact_upgradeb","ABReact_upgradec","ABReact_upgradea","ABReact_upgradeb","ABReact_upgradec","ASRepair_starta","ASRepair_startb","ASRepair_loop2a","ASRepair_loop2b","ASRepair_loop2c","ABRiftG_selecta","ASRift_readya","ABRiftG_rift1Loopa","ABRiftG_rift1Loopb","ABRiftG_rift1Loopc","ABRiftG_rift1Loopd","ABRiftG_rift1Loope","ABRiftG_rift1Loopf","ABRiftG_rift1Loopg","ABRiftG_rift1Looph","ABRiftG_rift1Loopi","ABRiftG_rift1Loopj","ABRiftG_rift1Loopk","ABRiftG_rift1Loopl","ABRiftG_rift1Loopm","ABRiftG_rift1Loopn","ABRiftG_rift1Loopo","ABRiftG_rift2Loopa","ABRiftG_rift2Loopb","ABRiftG_rift2Loopc","ABRiftG_rift2Loopd","ABRiftG_rift2Loope","ABRiftG_rift2Loopf","ABRiftG_rift2Loopg","ABRiftG_rift2Looph","ABRiftG_rift2Loopi","ABRiftG_rift2Loopj","ABRiftG_rift2Loopk","ABRiftG_rift2Loopl","ABRiftG_rift2Loopm","ABRiftG_rift2Loopn","ABRiftG_rift2Loopo","ABRiftG_rift2Loopp","ABRiftG_rift2Loopq","ABRiftG_rift2Loopr","ABSigna_selecta","ABStass_selecta","AUPlanet_sounStorm2La","AUPlanet_sounStorm2Lb","AUPlanet_sounStorm2Lc","ABStorm_weapFirea","ABStorm_weapFireb","ABStorm_weapFirec","ABStorm_weapFired","ABStorm_selecta","ABStorm_weapFirea","ABStorm_weapFireb","ABStorm_weapFirec","ABStorm_weapFired","NIonSt_sparks1a","NIonSt_sparks1b","NIonSt_sparks1c","NIonSt_sparks1d","NIonSt_sparks1e","NIonSt_sparks1f","NIonSt_sparks1g","NIonSt_sparks1h","ABTechn_selecta","ABTibHi_selecta","ABFortr_ambiLoopa","ABFortr_ambiLoopb","ABFortr_ambiLoopc","ABFortr_ambiLoopd","ABFortr_ambiLoope","ABFortr_ambiLoopf","ABFortr_ambiLoopg","ABFortr_ambiLooph","ABFortr_ambiLoopi","ABFortr_ambiLoopj","ABFortr_ambiLoopk","ABFortr_ambiLoopl","ABFortr_ambiLoopm","ABFortr_ambiLoopn","ABFortr_ambiLoopo","ABWallH_selecta","ABWallH_selectb","ABWarCh_closea","ABWarCh_opena","ABWarpC_selecta","ABWallH_selecta","ABWarpS_selecta","CBDefen_selecta","CBEMPCo_selecta","CBExpan_selecta","CBMutan_selecta","CBReinf_selecta","CBSubwa_selecta","WASubwa_voxPAa","WASubwa_voxPAb","WASubwa_voxPAc","WASubwa_voxPAd","WASubwa_voxPAe","WASubwa_voxPAf","WASubwa_voxPAg","WASubwa_voxPAh","CBSubwa_selecta","CBSubwa_selecta","CBTiSpi_selecta","CUTruck_hornb","CUTruck_horna","CUTruck_hornb","GURepai_moveBya","GURepai_moveByb","GURepai_moveByc","GURepai_moveByd","GURepai_moveBye","GUNukeT_responsea",
	"GUNukeT_responseb","GUNukeT_responsec","GUNukeT_responsed","GUNukeT_responsee","GUNukeT_responsea","GUNukeT_responseb","GUNukeT_responsec","GUNukeT_responsed","GUNukeT_responsee","GUNukeT_falsStara","GUNukeT_responsea","GUNukeT_responseb","GUNukeT_responsec","GUNukeT_responsed","GUNukeT_responsee","GBAirfi_doorOpena","GBAirfi_doorClosa","GBAirfi_hardUpgra","GBAirfi_selecta","WAAirpo_announce1a","WAAirpo_announce1b","WAAirpo_announce1c",		"WAAirpo_announce2a","WAAirpo_announce2b","WAAirpo_announce2c","WAAirpo_announce2d","GBArmor_EMPgrenaa","GBArmor_suitUpgra","GBTechn_selecta","GBBarra_doorOpena","GBBarra_doorClosa","GBBarra_selecta","GBAABat_selecta","GBBatte_turrMovea","GBBatte_turrMoveb","GBBatte_turrMovec","GBBatte_gunFire5a","GBBatte_gunFire5b","GBBatte_gunFire5c","GBBatte_gunFire5d","GBBatte_gunFire5e","GBBatte_gunMotL2a","GBBatte_gunMotL2b","GBBatte_gunMotL2c","GBComma_wea1firea","GBComma_wea1fireb","GBComma_wea1firec","GBComma_wea1fired","GBComma_wea1firee","GBComma_wea1firef","GBComma_wea1fireg","GBComma_wea1fireh","GBComma_wea1firei","GBComma_wea1firej","NUShred_weapFirea","NUShred_weapFireb","NUShred_weapFirec","NUShred_weapFired","NUShred_weapFiree","NUShred_weapFiref","NUShred_weapFireg","NUShred_weapFireh","NUShred_weapFirei","NUShred_weapFirej","NUShred_weapFirek","NUShred_weapFirel","GBComma_APamUpgra","GBComma_selecta","GBComma_wea1firea","GBComma_wea1fireb","GBComma_wea1firec","GBComma_wea1fired","GBComma_wea1firee","GBComma_wea1firef","GBComma_wea1fireg","GBComma_wea1fireh","GBComma_wea1firei","GBComma_wea1firej","GBComSu_selecta","GBResea_selecta","GBConst_selecta","GBCrane_selecta","GBForwa_selecta","GUGuard_wea1firea","GUGuard_wea1fireb","GUGuard_wea1firec","GBDigin_selecta","GBPillb_selecta","GBComma_wea1firea","GBComma_wea1fireb","GBComma_wea1firec","GBComma_wea1fired","GBComma_wea1firee","GBComma_wea1firef","GBComma_wea1fireg","GBComma_wea1fireh","GBComma_wea1firei","GBComma_wea1firej","GUPreda_wea2firea","GUPreda_wea2fireb","GUPreda_wea2firec","GUPreda_wea2fired","GUPreda_wea2firee","GUPreda_wea2firef","GUPreda_wea2fireg","GUPreda_wea2fireh","GUPreda_wea2firei","GBIonCa_selecta","GBIonCa_startUpa","GBOutpo_selecta","GBOutpo_readya","GBOutpo_readya","GBPillb_selecta","GBMedic_selecta","GBPower_selecta","GBPower_upgradea","GBPower_upgradea","GBPulse_selecta","GBPulse_selecta","GBPulse_beepL2a","GBPulse_beepL2a","GBRadio_selecta","GBRecHu_selecta","GBRecla_selecta","GBRecla_doorClosa","GBRecla_doorOpena","GBResea_selecta","GBRefin_selecta","GBSilo_selecta","GBTerra_selecta","GBSonic_weapFirea","GBSonic_weapFireb","GBSonic_weapFirec","GBSonic_weapFired","GBSonic_weapFiree","GBSonic_weapFiref","GBSonic_weapFireg","GBSonic_weapFireh","GBSonic_weapFirei","GBSonic_weapFirej","GBSonic_weapFirek","GBSonic_shockwa1a","GBSonic_shockwa1b","GBSonic_shockwa1c","GBSonic_shockwa1d","GBSonic_shockwa1e","GBSonic_shockwa1f","GBSonic_shockwa2a","GBSonic_shockwa2b","GBSonic_shockwa2c","GBSonic_shockwa2d","GBSonic_shockwa2e","GBSonic_shockwa2f","GBSpace_selecta","GBSteal_selecta","GBTechC_armoUpgra","GBArmor_selecta","GBWarFa_doorOpena","GBWarFa_doorClosa","GBWarFa_selecta","GBWatch_selecta","NUVenom_gunFire5a","tooshort","NUVenom_gunFire5b","NUVenom_gunFire5c","NUVenom_gunFire5d","NUVenom_gunFire5e","NUVenom_gunFire5f","GBWatch_wea1firea","GBWatch_wea1fireb","GBWatch_wea1firec","GBWatch_wea1fired","GBWatch_wea1firee","GBWatch_wea1firef","GBWatch_wea1fireg","GBWatch_wea1fireh","GBWatch_wea1firei","NBAirSu_selecta","NBAirTo_platRisea","NBAirTo_platLowea","NBHanga_selecta","NSBurro_MineTar2a","NBBrown_wea1expla","NBBrown_wea1explb","NBBrown_wea1explc","NBBrown_wea1expld","NBBrown_wea1exple","NBBrown_wea1explf","NBBrown_wea1explg","NBBrown_wea1explh","NBBrown_wea1firea","NBBrown_wea1fireb","NBBrown_wea1firec","NBBrown_wea1fired","NBBrown_wea1firee","NBBrown_wea1firef","NBBrown_wea1fireg","NBBrown_wea1fireh","NBBrown_wea1firei","NBBrown_wea1firej","NBBrown_wea1firek","NBBrown_wea1firel","NBBrown_wea1firem","NBBrown_wea1firen","NBConst_selecta","NBContr_selecta","NBContr_opena",
	"GBCrane_selecta","NBDisru_selecta","NBDisru_loop1a","thiswavefileisntloopable","NBDisru_loop2a","NBDisru_loop2b","NBDisru_loop2c","NBDisru_loop3a","NBCrane_sinkb","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIWater_explosioa","WIWater_explosiob","WIWater_explosioc","WIWater_explosiod","WIWater_explosioe","WIWater_explosiof","WIWater_explosiog","WIWater_explosioh","WIWater_explosioi","WIWater_explosioj","WIWater_explosiok","NBDropz_selecta","NBWarFa_doorClosa","NBWarFa_doorOpena","NBWarFa_irisClosa","NBWarFa_irisOpena","NBWarFa_closSpina","NBWarFa_openSpina","NBHando_selecta","NBLaser_selecta","NBObeli_weapChara","TEMP_ObeliskChargeUp","NBObeli_wea1Firea","NBObeli_wea1Fireb","NBObeli_wea1Firec","NBObeli_wea1Fired","NBObeli_wea1Firee","NBObeli_wea1Firef","GUZoneT_wea1firea","GUZoneT_wea1fireb","GUZoneT_wea1firec","GUZoneT_wea1fired","GUZoneT_wea1firee","NBObeli_wea2Firea","NBObeli_wea2Fireb","NBObeli_wea2Firec","NBObeli_wea2Fired","NBObeli_wea2Firee","NBObeli_wea2Firef","NBObeli_wea2Fireg","NBObeli_wea2Fireh","NBObeli_wea2Firei","NBObeli_wea2Firej","NBObeli_selecta","NBOpera_selecta","NURecko_dozeUpgra","NBOpera_MisLauncha","NBOpera_latcha","NBOpera_unlatcha","NBOutpo_selecta","GBOutpo_readya","GBOutpo_readya","NBPower_selecta","GBPower_upgradea","GBPower_upgradea","NBTacit_ambiencea","NBTacit_ambienceb","NBTacit_ambiencec","NBTacit_ambienced","NBTacit_ambiencee","NBTacit_ambiencef","GBWarFa_doorOpena","GBWarFa_doorClosa","GBAirfi_doorOpena","GBAirfi_doorClosa","NBRedee_selecta","NBRefin_selecta","NBRocHu_selecta","NBShrin_selecta","NTiber_upgradea","NBShrHu_selecta","NBTechA_selecta","NBTempl_selecta","NBTempl_counterma","NBTiber_selecta","GBSilo_selecta","NBVoice_selecta","WBuild_powerOffa","WPower_offa","WPower_offb","WBuild_powerOffa","WPower_offa","WPower_offb","WBuild_powerOffa","WPower_offa","WPower_offb","WBuild_powerOna","WPower_ona","WBuild_powerOna","WPower_ona","WBuild_powerOna","WPower_ona","WPower_offb","WPower_ona","WPower_downLRa","ABBuild_diea","ABBuild_dieb","ABBuild_diec","ABBuild_died","ABBuild_diee","ABBuild_dief","ABBuild_dieg","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIBuild_diea","WIBuild_dieb","WIBuild_diec","WIBuild_died","WIBuild_diee","WIBuild_dief","WIBuild_dieg","WIBuild_dieh","WIBuild_diei","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_uniqLarg1a","WIExplo_uniqLarg1b","WIExplo_uniqLarg1c","WIExplo_uniqLarg1d","WIExplo_uniqLarg1e","WIExplo_uniqLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIBuild_diea","WIBuild_dieb","WIBuild_diec","WIBuild_died","WIBuild_diee","WIBuild_dief","WIBuild_dieg","WIBuild_dieh","WIBuild_diei","WIExplo_geneLarg1a",
	"WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_uniqLarg1a","WIExplo_uniqLarg1b","WIExplo_uniqLarg1c","WIExplo_uniqLarg1d","WIExplo_uniqLarg1e","WIExplo_uniqLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","ABDamag_lighta","ABDamag_lightb","ABDamag_lightc","ABDamag_lightd","ABDamag_heavya","ABDamag_heavyb","ABDamag_heavyc","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_glasLarg1a","WIExplo_glasLarg1b",
	"WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WIExplo_glasLarg1a","WIExplo_glasLarg1b","WIExplo_glasLarg1c","WIExplo_glasLarg1d","WIExplo_glasLarg1e","WIExplo_glasLarg1f","WIExplo_metaLarg1a","WIExplo_metaLarg1b","WIExplo_metaLarg1c","WIExplo_metaLarg1d","WIExplo_metaLarg1e","WIExplo_metaLarg1f","WIExplo_woodLarg1a","WIExplo_woodLarg1b","WBGarri_entera","WBGarri_exita","WBuild_placea","WBuild_placea","WCrate_pickupa","ASBuzze_swarma","ASBuzze_swarmb","ASForce_starta","ASForce_startb","ASForce_enda","ASForce_endb","ASForce_hita","ASForce_hitb","ASForce_hitc","ASIchor_SeedSpawna","ASIchor_SeedSpawna","ASIchor_SeedBeama","ABLight_weapFirea","ABLight_weapFireb","ABLight_weapFirec","ABLight_weapFired","ABWallH_selecta","ABWallH_selectb","ASOverl_wrath1L2a","ASOverl_wrath1L2b","ASOverl_wrath1L2c","ASOverl_wrath1L2d","ASOverl_wrath1L2e","ASOverl_wrath1L2f","ASOverl_wrath1L2g","ASOverl_wrath1L2h","ASOverl_wrath2L2a","ASOverl_wrath2L2b","ASOverl_wrath2L2c","ASOverl_wrath2L2d","ASOverl_wrath2L2e","ASOverl_wrath2L2f","ASOverl_wrath2L2g","ASOverl_wrath2L2h","ASOverl_wrath2L2i","ASOverl_wratImpaa","ASOverl_wratImpaStereo","GUTitan_cannonHita","NUShaSq_weapFirec","ASPhase_gen1La","ASPhase_gen1Lb","ASPhase_gen2La","ASPhase_gen2Lb","ASPhase_gen2Lc","ASRift_gen3La","ASRift_gen2La","ASRift_gen2Lb","ASRift_gen2Lc","ASRift_gen1La","ASStasi_field2L3a","ASStasi_field2L2a","ASStasi_field2L1a","ASStasi_field1L2a","ASTemWo_HoleL3a","ASTemWo_HoleL2a","ASTemWo_HoleL1a","ASTiber_scanSter","ABWormh_selecta","ASWormh_begin2a","ASWormh_end2a","ASWormh_enda","ASWormh_endb","ASWormh_entera","ASWormh_enterb","ASWormh_enterc","ASWormh_enterd","ASWormh_entere","ASWormh_enterf","ASWormh_entera","ASWormh_enterb","ASWormh_enterc","ASWormh_enterd","ASWormh_entere","ASWormh_enterf","ASWorm_holeL2a","ASWorm_holeL2a","ASWorm_holeL2a","GBIonCa_weapBeama","GBIonCa_weapCresa","GBIonCa_weapLasea","GBIonCa_weapLaseb","GBIonCa_weapLasec","GBIonCa_weapLased","GBIonCa_weapLasee","GBIonCa_weapLasef","GBIonCa_weapLaseg","GBIonCa_weapLaseh","GBIonCa_weapShoca","GBIonCa_weapSphea","NSNucle_explosi2b","GBIonCa_weapShoca","WATiber_cracklea","WATiber_crackleb","WATiber_cracklec","WATiber_crackled","WATiber_cracklee","WATiber_cracklef","WATiber_crackleg","WATiber_cracklea","WATiber_crackleb","WATiber_cracklec","WATiber_crackled","WATiber_cracklee","WATiber_cracklef","WATiber_crackleg","WATiber_cracklea","WATiber_crackleb","WATiber_cracklec","WATiber_crackled","WATiber_cracklee","WATiber_cracklef","WATiber_crackleg","GUMiniO_moveLoopa","GUMiniO_moveLoopb","GUMiniO_moveLoopc","GUMiniO_divea","GUMiniO_weapFirea","GUMiniO_weapFireb","GUMiniO_weapFirec","GUMiniO_weapFired","GUMiniO_weapExpla","GUMiniO_weapExplb","GUMiniO_weapExplc","GUMiniO_weapExpld","GUMiniO_weapExple","GSOrcaA_targBeepa","GUOrca_pulsScana","GUOrca_pulsScanb","GUOrca_pulsScanc","GSRaiAc_casta","GSRaiAc_stripesa","GSRaiAc_stripea","GSRaiAc_stripeb","GSRaiAc_stripec","GSShock_ArtiFire2a","GSShock_ArtiImpaa","GSShock_ArtiImpab","GSShock_ArtiImpac",
	"GSShock_ArtiImpad","GSShock_ArtiImpae","GSShock_ArtiImpaf","GSSonic_repuFiela","GSSuper_explosioa","GUMarv_cannonHita","GUMarv_cannonHitb","GUMarv_cannonHitc","GUMarv_cannonHitd","GSSuper_SonicBy2a","GSSuper_voxa","GSOrcaA_targBeepa","GSThors_beamL2a","GSThors_beamPart2","GSThors_HammImpaa","GSThors_HammImpab","GSThors_HammImpac","GSThors_HammImpad","GSThors_HammImpae","GSThors_HammImpaf","GSThors_HammBysa","GSThors_HammBysb","GSThors_HammBysc","GSThors_HammBysd","GSThors_HammByse","GSThors_HammBysf","GSThors_HammBysg","GSThors_HammBysh","GSDropP_descenda","GSDropP_opena","NBEMP_weapTarga","NBEMP_weapFirea","NBEMP_weapTarga","GUGuard_mineDepla","GUGuard_mineDeplb","GUGuard_mineDeplc","GUGuard_mineDepld","GUGuard_minDepBea","NSBurro_MineTar1b","NSBurro_MineTar4a","NSBurro_MineTar3a","NSCatal_misImp1b","NSCatal_incominga","NSCatal_targCursa","NSCatal_tibeExpla","NSCatal_tibeExplb","NSCatal_tibeExplc","NSCatal_tibeExpld","NSCloak_fieldOna","NSCloak_fieldOnb","NSCloak_fieldOnc","NSCloak_fieldOffa","NSCloak_fieldOffb","NSCloak_fieldOffc","NSDecoy_armya","NSDecoy_killa","NSDecoy_killb","NSDecoy_killc","NSDecoy_killd","NSDecoy_kille","NSDecoy_killf","NSDecoy_killg","NNuMis_launch2a","WMissi_rumbleL2a","WMissi_rumbleL2b","WMissi_rumbleL2c","WMissi_rumbleL2d","NSNucle_explosi2b","NSNucle_incominga","NSNucle_launch1b","NSNucle_launch2b","NSNucle_ready1b","NSNucle_idleLoopa","NSNucle_idleLoopb","NSNucle_idleLoopc","NSPower_SignaScan","NSRadar_jamA2a","NSRadar_jamB2a","NSRadar_jamEnda","NSRadar_jamEndb","NSRadar_launcha","NSRadar_launchb","NSRedem_redemptioa","NSTiber_seedImp1b","NSTiber_seedAmbia","NSTibVa_bombExpla","NSTibVa_bombExplB","NSTibVe_casta","NSTibVe_rumbleLRa","NSTibVe_shattera","NSTibVe_geysera","NSTibVe_geyserb","NSTibVe_geyserc","NSTibVe_geyserd","NSTibVe_geysere","NSTibVe_geyserf","NSTibVe_geyserg","NSTibVe_geyserh","AIShard_impacta","AIShard_impactb","AIShard_impactc","AIShard_impactd","AIShard_impacte","AIShard_impactf","AIShard_impactg","AIShard_impacth","WIBulle_SciFi01","WIBulle_SciFi02","WIBulle_SciFi03","WIBulle_SciFi04","WIBulle_SciFi05","WIBulle_SciFi06","WIBulle_SciFi07","WIBulle_SciFi08","WIBulle_SciFi09","WIBulle_SciFi10","WIBulle_SciFi11","WIBulle_SciFi12","WIBulle_SciFi13","WIBulle_SciFi14","WIBulle_SciFi15","WIBulle_SciFi16","WIBulle_SciFi17","WIBulle_SciFi18","WIBulle_SciFi19","WIBulle_SciFi20","WIBulle_SciFi21","WIBulle_SciFi22","WIBulle_SciFi23","WIBulle_SciFi24","WIBulle_SciFi25","WIBulle_SciFi26","WIBulle_SciFi27","WIBulle_SciFi28","WIBulle_SciFi29","WIBulle_SciFi30","WIBulle_SciFi31","WIBulle_ricoTon01","WIBulle_ricoTon02","WIBulle_ricoTon03","WIBulle_ricoTon04","WIBulle_ricoTon05","WIBulle_ricoTon06","WIBulle_ricoTon07","WIBulle_ricoTon08","WIBulle_ricoTon09","WIBulle_ricoTon10","WIBulle_ricoTon11","WIBulle_ricoTon12","WIBulle_ricoTon13","WIBulle_ricoTon14","WIBulle_ricoTon15","WIBulle_ricoTon16","WIBulle_ricoTon17","WIBulle_ricoTon18","WIBulle_ricoTon19","WIBulle_ricoTon20","WIBulle_ricoTon21","WIBulle_ricoTon22","WIBulle_ricoTon23","WIBulle_ricoTon24","WIBulle_ricoTon25","WIBulle_ricoTon26","WIBulle_ricoTon27","WIBulle_ricoTon28","WIBulle_ricoTon29","WIBulle_ricoTon30","WIBulle_ricoTon31","WIBulle_ricoTon32","WIBulle_ricoTon33","WIBulle_ricoTon34","WIBulle_ricoTon35","WIBulle_ricoTon36","WIBulle_ricoTon37","WIBulle_ricoTon38","WIBulle_ricoTon39","WIBulle_ricoTon40","WIBulle_ricoTon41","WIBulle_ricoTon42","WIBulle_ricoTon43","WIBulle_ricoTon44","WIBulle_ricoTon45","WIBulle_ricoTon46","WIBulle_ricoZip01","WIBulle_ricoZip02","WIBulle_ricoZip03","WIBulle_ricoZip04","WIBulle_ricoZip05","WIBulle_ricoZip06","WIBulle_ricoZip07","WIBulle_ricoZip08","WIBulle_ricoZip09","WIBulle_ricoZip10","WIBulle_ricoZip11","WIBulle_ricoZip12","WIBulle_ricoZip13","WIBulle_ricoZip14","WIBulle_ricoZip15","WIBulle_ricoZip16","WIBulle_ricoZip17","WIBulle_ricoZip18","WIBulle_ricoZip19","WIBulle_ricoZip20","WIBulle_ricoZip21","WIBulle_ricoZip22","WIBulle_ricoZip23","WIBulle_ricoZip24","WIBulle_ricoZip25","WIBulle_ricoZip26","WIBulle_ricoZip27","WIBulle_ricoZip28","WIBulle_ricoZip29","WIBulle_ricoZip30","WIBulle_ricoZip31","WIBulle_ricoZip32",
	"WIBulle_ricoZip33","WIBulle_ricoZip34","WIBulle_ricoZip35","WIBulle_ricoZip36","WIBulle_ricoZip37","WIBulle_ricoZip38","WIBulle_ricoZip39","WIBulle_ricoZip40","WIBulle_ricoZip41","WIBulle_ricoZip42","WIBulle_ricoZip43","WIBulle_ricoZip44","WIBulle_ricoZip45","WIBulle_ricoZip46","WIBulle_ricoZip47","WIBulle_ricoZip48","ASForce_hita","ASForce_hitb","ASForce_hitc","ASForce_hitd","ASForce_hite","ASForce_hitf","ASForce_hitg","ASForce_hith","ASForce_hiti","ASForce_hitSa","ASForce_hitSb","ASForce_hitSc","ASForce_hitSd","ASForce_hitSe","ASForce_hitSf","ASForce_hitSg","ASForce_hitSh","ASForce_hitSi","WIBulle_body01","WIBulle_body02","WIBulle_body03","WIBulle_body04","WIBulle_body05","WIBulle_body06","WIBulle_body07","WIBulle_body08","WIBulle_body09","WIBulle_body10","WIBulle_body11","WIBulle_body12","WIBulle_body13","WIBulle_body14","WIBulle_body15","WIBulle_body16","WIBulle_body17","WIBulle_body18","WIBulle_body19","WIBulle_body20","WIBulle_body21","WIBulle_body22","WIBulle_body23","WIBulle_body24","WIBulle_body25","WIBulle_body26","WIBulle_body27","WIBulle_body28","WIBulle_body29","WIBulle_body30","WIBulle_body31","WIBulle_body32","WIBulle_body33","WIBulle_body34","WIBulle_body35","WIBulle_body36","WIBulle_body37","WIBulle_body38","WIBulle_body39","WIBulle_body40","WIBulle_body41","WIBulle_body42","WIBulle_body43","WIBulle_body44","WIBulle_body45","WIBulle_body46","WIBulle_gener001","WIBulle_gener002","WIBulle_gener003","WIBulle_gener004","WIBulle_gener005","WIBulle_gener006","WIBulle_gener007","WIBulle_gener008","WIBulle_gener009","WIBulle_gener010","WIBulle_gener011","WIBulle_gener012","WIBulle_gener013","WIBulle_gener014","WIBulle_gener015","WIBulle_gener016","WIBulle_gener017","WIBulle_gener018","WIBulle_gener019","WIBulle_gener020","WIBulle_gener021","WIBulle_gener022","WIBulle_gener023","WIBulle_gener024","WIBulle_gener025","WIBulle_gener026","WIBulle_gener027","WIBulle_gener028","WIBulle_gener029","WIBulle_gener030","WIBulle_gener031","WIBulle_gener032","WIBulle_gener033","WIBulle_gener034","WIBulle_gener035","WIBulle_gener036","WIBulle_gener037","WIBulle_gener038","WIBulle_gener039","WIBulle_gener040","WIBulle_gener041","WIBulle_gener042","WIBulle_gener043","WIBulle_gener044","WIBulle_gener045","WIBulle_gener046","WIBulle_gener047","WIBulle_gener048","WIBulle_gener049","WIBulle_gener050","WIBulle_gener051","WIBulle_gener052","WIBulle_gener053","WIBulle_gener054","WIBulle_gener055","WIBulle_gener056","WIBulle_gener057","WIBulle_gener058","WIBulle_gener059","WIBulle_gener060","WIBulle_gener061","WIBulle_gener062","WIBulle_gener063","WIBulle_gener064","WIBulle_gener065","WIBulle_gener066","WIBulle_gener067","WIBulle_gener068","WIBulle_gener069","WIBulle_gener070","WIBulle_gener071","WIBulle_gener072","WIBulle_gener073","WIBulle_gener074","WIBulle_gener075","WIBulle_gener076","WIBulle_gener077","WIBulle_gener078","WIBulle_gener079","WIBulle_gener080","WIBulle_gener081","WIBulle_gener082","WIBulle_gener083","WIBulle_gener084","WIBulle_gener085","WIBulle_gener086","WIBulle_gener087","WIBulle_gener088","WIBulle_gener089","WIBulle_gener090","WIBulle_gener091","WIBulle_gener092","WIBulle_gener093","WIBulle_gener094","WIBulle_gener095","WIBulle_gener096","WIBulle_gener097","WIBulle_gener098","WIBulle_gener099","WIBulle_gener100","WIBulle_gener101","WIBulle_gener102","WIBulle_gener103","WIBulle_gener104","WIBulle_gener105","WIBulle_gener106","WIBulle_gener107","WIBulle_gener108","WIBulle_gener109","WIBulle_gener110","WIBulle_gener111","WIBulle_gener112","WIBulle_gener113","WIBulle_gener114","WIBulle_gener115","WIBulle_gener116","WIBulle_gener117","WIBulle_gener118","WIBulle_gener119","WIBulle_gener120","WIBulle_gener121","WIBulle_gener122","WIBulle_gener123","WIBulle_gener124","WIBulle_gener125","WIBulle_gener126","WIBulle_gener127","WIBulle_generPopa","WIBulle_generPopb","WIBulle_generPopc","WIBulle_generPopd","WIBulle_generPope","WIBulle_generPopf","WIBulle_generPopg","WIBulle_generPoph","WIBulle_generPopi","WIBulle_generPopj","WIBulle_generPopk","WIBulle_generPopl","WIBulle_generPopm","WIBulle_generPopn","WIBulle_generPopo","WIBulle_generPopp","WIBulle_generic1a","WIBulle_generic1b",
	"WIBulle_generic1c","WIBulle_generic1d","WIBulle_generic1e","WIBulle_generic1f","WIBulle_generic1g","WIBulle_generic1h","WIBulle_generic1i","WIBulle_generic1j","WIBulle_generic1k","WIBulle_generic1l","WIBulle_generic1m","WIBulle_glass01","WIBulle_glass02","WIBulle_glass03","WIBulle_glass04","WIBulle_glass05","WIBulle_glass06","WIBulle_glass07","WIBulle_glass08","WIBulle_glass09","WIBulle_glass10","WIBulle_glass11","WIBulle_glass12","WIBulle_glass13","WIBulle_glass14","WIBulle_glass15","WIBulle_glass16","WIBulle_glass17","WIBulle_glass18","WIBulle_glass19","WIBulle_glass20","WIBulle_glass21","WIBulle_glass22","WIBulle_glass23","WIBulle_glass24","WIBulle_glass25","WIBulle_glass26","WIBulle_glass27","WIBulle_glass28","WIBulle_glass29","WIBulle_glass30","WIBulle_glass31","WIBulle_glass32","WIBulle_glass33","WIBulle_glass34","WIBulle_glass35","WIBulle_glass36","WIBulle_glass37","WIBulle_glass38","WIBulle_glass39","WIBulle_glass40","WIBulle_glass41","WIBulle_glass42","WIBulle_metal01","WIBulle_metal02","WIBulle_metal03","WIBulle_metal04","WIBulle_metal05","WIBulle_metal06","WIBulle_metal07","WIBulle_metal08","WIBulle_metal09","WIBulle_metal10","WIBulle_metal11","WIBulle_metal12","WIBulle_metal13","WIBulle_metal14","WIBulle_metal15","WIBulle_metal16","WIBulle_metal17","WIBulle_metal18","WIBulle_metal19","WIBulle_metal20","WIBulle_metal21","WIBulle_metal22","WIBulle_metal23","WIBulle_metal24","WIBulle_metal25","WIBulle_metal26","WIBulle_metal27","WIBulle_metal28","WIBulle_metal29","WIBulle_metal30","WIBulle_metal31","WIBulle_metal32","WIBulle_metal33","WIBulle_metal34","WIBulle_metal35","WIBulle_metal36","WIBulle_metal37","WIBulle_metal38","WIBulle_metal39","WIBulle_metal40","WIBulle_metal41","WIBulle_metal42","WIBulle_metal43","WIBulle_metal44","WIBulle_metal45","WIBulle_metal46","WIBulle_metal47","WIBulle_metal48","WIBulle_metal49","WIBulle_metal50","WIBulle_metal51","WIBulle_metal52","WIBulle_metal53","WIBulle_metal54","WIBulle_metal55","WIBulle_metal56","WIBulle_metal57","WIBulle_metal58","WIBulle_metal59","WIBulle_metal60","WIBulle_metal61","WIBulle_metal62","WIBulle_metal63","WIBulle_metal64","WIBulle_metal65","WIBulle_metal66","WIBulle_metal67","WIBulle_metal68","WIBulle_metal69","WIBulle_metal70","WIBulle_metal71","WIBulle_metal72","WIBulle_metal73","WIBulle_metal74","WIBulle_metal75","WIBulle_metal76","WIBulle_metal77","WIBulle_metal78","WIBulle_metal79","WIBulle_metal80","WIBulle_metal81","WIBulle_metal82","WIBulle_metal83","WIBulle_metal84","WIBulle_watera","WIBulle_waterb","WIBulle_waterc","WIBulle_waterd","WIBulle_watere","WIBulle_waterf","WIBulle_waterg","WIBulle_wood01","WIBulle_wood02","WIBulle_wood03","WIBulle_wood04","WIBulle_wood05","WIBulle_wood06","WIBulle_wood07","WIBulle_wood08","WIBulle_wood09","WIBulle_wood10","WIBulle_wood11","WIBulle_wood12","WIBulle_wood13","WIBulle_wood14","WIBulle_wood15","WIBulle_wood16","WIBulle_wood17","WIBulle_wood18","WIBulle_wood19","WIBulle_wood20","WIBulle_wood21","WIBulle_wood22","WIBulle_wood23","WIBulle_wood24","WIBulle_wood25","WIBulle_wood26","WIBulle_wood27","WIBulle_wood28","WIBulle_wood29","WIBulle_wood30","WIBulle_wood31","WIBulle_wood32","WIBulle_wood33","WIBulle_ricoTon01","WIBulle_ricoTon02","WIBulle_ricoTon03","WIBulle_ricoTon04","WIBulle_ricoTon05","WIBulle_ricoTon06","WIBulle_ricoTon07","WIBulle_ricoTon08","WIBulle_ricoTon09","WIBulle_ricoTon10","WIBulle_ricoTon11","WIBulle_ricoTon12","WIBulle_ricoTon13","WIBulle_ricoTon14","WIBulle_ricoTon15","WIBulle_ricoTon16","WIBulle_ricoTon17","WIBulle_ricoTon18","WIBulle_ricoTon19","WIBulle_ricoTon20","WIBulle_ricoTon21","WIBulle_ricoTon22","WIBulle_ricoTon23","WIBulle_ricoTon24","WIBulle_ricoTon25","WIBulle_ricoTon26","WIBulle_ricoTon27","WIBulle_ricoTon28","WIBulle_ricoTon29","WIBulle_ricoTon30","WIBulle_ricoTon31","WIBulle_ricoTon32","WIBulle_ricoTon33","WIBulle_ricoTon34","WIBulle_ricoTon35","WIBulle_ricoTon36","WIBulle_ricoTon37","WIBulle_ricoTon38","WIBulle_ricoTon39","WIBulle_ricoTon40","WIBulle_ricoTon41","WIBulle_ricoTon42","WIBulle_ricoTon43","WIBulle_ricoTon44","WIBulle_ricoTon45","WIBulle_ricoTon46","WIBulle_ricoZip01","WIBulle_ricoZip02","WIBulle_ricoZip03","WIBulle_ricoZip04","WIBulle_ricoZip05","WIBulle_ricoZip06",
	"WIBulle_ricoZip07","WIBulle_ricoZip08","WIBulle_ricoZip09","WIBulle_ricoZip10","WIBulle_ricoZip11","WIBulle_ricoZip12","WIBulle_ricoZip13","WIBulle_ricoZip14","WIBulle_ricoZip15","WIBulle_ricoZip16","WIBulle_ricoZip17","WIBulle_ricoZip18","WIBulle_ricoZip19","WIBulle_ricoZip20","WIBulle_ricoZip21","WIBulle_ricoZip22","WIBulle_ricoZip23","WIBulle_ricoZip24","WIBulle_ricoZip25","WIBulle_ricoZip26","WIBulle_ricoZip27","WIBulle_ricoZip28","WIBulle_ricoZip29","WIBulle_ricoZip30","WIBulle_ricoZip31","WIBulle_ricoZip32","WIBulle_ricoZip33","WIBulle_ricoZip34","WIBulle_ricoZip35","WIBulle_ricoZip36","WIBulle_ricoZip37","WIBulle_ricoZip38","WIBulle_ricoZip39","WIBulle_ricoZip40","WIBulle_ricoZip41","WIBulle_ricoZip42","WIBulle_ricoZip43","WIBulle_ricoZip44","WIBulle_ricoZip45","WIBulle_ricoZip46","WIBulle_ricoZip47","WIBulle_ricoZip48","WIBulle_body01","WIBulle_body02","WIBulle_body03","WIBulle_body04","WIBulle_body05","WIBulle_body06","WIBulle_body07","WIBulle_body08","WIBulle_body09","WIBulle_body10","WIBulle_body11","WIBulle_body12","WIBulle_body13","WIBulle_body14","WIBulle_body15","WIBulle_body16","WIBulle_body17","WIBulle_body18","WIBulle_body19","WIBulle_body20","WIBulle_body21","WIBulle_body22","WIBulle_body23","WIBulle_body24","WIBulle_body25","WIBulle_body26","WIBulle_body27","WIBulle_body28","WIBulle_body29","WIBulle_body30","WIBulle_body31","WIBulle_body32","WIBulle_body33","WIBulle_body34","WIBulle_body35","WIBulle_body36","WIBulle_body37","WIBulle_body38","WIBulle_body39","WIBulle_body40","WIBulle_body41","WIBulle_body42","WIBulle_body43","WIBulle_body44","WIBulle_body45","WIBulle_body46","WIBulle_gener001","WIBulle_gener002","WIBulle_gener003","WIBulle_gener004","WIBulle_gener005","WIBulle_gener006","WIBulle_gener007","WIBulle_gener008","WIBulle_gener009","WIBulle_gener010","WIBulle_gener011","WIBulle_gener012","WIBulle_gener013","WIBulle_gener014","WIBulle_gener015","WIBulle_gener016","WIBulle_gener017","WIBulle_gener018","WIBulle_gener019","WIBulle_gener020","WIBulle_gener021","WIBulle_gener022","WIBulle_gener023","WIBulle_gener024","WIBulle_gener025","WIBulle_gener026","WIBulle_gener027","WIBulle_gener028","WIBulle_gener029","WIBulle_gener030","WIBulle_gener031","WIBulle_gener032","WIBulle_gener033","WIBulle_gener034","WIBulle_gener035","WIBulle_gener036","WIBulle_gener037","WIBulle_gener038","WIBulle_gener039","WIBulle_gener040","WIBulle_gener041","WIBulle_gener042","WIBulle_gener043","WIBulle_gener044","WIBulle_gener045","WIBulle_gener046","WIBulle_gener047","WIBulle_gener048","WIBulle_gener049","WIBulle_gener050","WIBulle_gener051","WIBulle_gener052","WIBulle_gener053","WIBulle_gener054","WIBulle_gener055","WIBulle_gener056","WIBulle_gener057","WIBulle_gener058","WIBulle_gener059","WIBulle_gener060","WIBulle_gener061","WIBulle_gener062","WIBulle_gener063","WIBulle_gener064","WIBulle_gener065","WIBulle_gener066","WIBulle_gener067","WIBulle_gener068","WIBulle_gener069","WIBulle_gener070","WIBulle_gener071","WIBulle_gener072","WIBulle_gener073","WIBulle_gener074","WIBulle_gener075","WIBulle_gener076","WIBulle_gener077","WIBulle_gener078","WIBulle_gener079","WIBulle_gener080","WIBulle_gener081","WIBulle_gener082","WIBulle_gener083","WIBulle_gener084","WIBulle_gener085","WIBulle_gener086","WIBulle_gener087","WIBulle_gener088","WIBulle_gener089","WIBulle_gener090","WIBulle_gener091","WIBulle_gener092","WIBulle_gener093","WIBulle_gener094","WIBulle_gener095","WIBulle_gener096","WIBulle_gener097","WIBulle_gener098","WIBulle_gener099","WIBulle_gener100","WIBulle_gener101","WIBulle_gener102","WIBulle_gener103","WIBulle_gener104","WIBulle_gener105","WIBulle_gener106","WIBulle_gener107","WIBulle_gener108","WIBulle_gener109","WIBulle_gener110","WIBulle_gener111","WIBulle_gener112","WIBulle_gener113","WIBulle_gener114","WIBulle_gener115","WIBulle_gener116","WIBulle_gener117","WIBulle_gener118","WIBulle_gener119","WIBulle_gener120","WIBulle_gener121","WIBulle_gener122","WIBulle_gener123","WIBulle_gener124","WIBulle_gener125","WIBulle_gener126","WIBulle_gener127","WIBulle_generPopa","WIBulle_generPopb","WIBulle_generPopc","WIBulle_generPopd","WIBulle_generPope","WIBulle_generPopf","WIBulle_generPopg",
	"WIBulle_generPoph","WIBulle_generPopi","WIBulle_generPopj","WIBulle_generPopk","WIBulle_generPopl","WIBulle_generPopm","WIBulle_generPopn","WIBulle_generPopo","WIBulle_generPopp","WIBulle_generic1a","WIBulle_generic1b","WIBulle_generic1c","WIBulle_generic1d","WIBulle_generic1e","WIBulle_generic1f","WIBulle_generic1g","WIBulle_generic1h","WIBulle_generic1i","WIBulle_generic1j","WIBulle_generic1k","WIBulle_generic1l","WIBulle_generic1m","WIBulle_metal01","WIBulle_metal02","WIBulle_metal03","WIBulle_metal04","WIBulle_metal05","WIBulle_metal06","WIBulle_metal07","WIBulle_metal08","WIBulle_metal09","WIBulle_metal10","WIBulle_metal11","WIBulle_metal12","WIBulle_metal13","WIBulle_metal14","WIBulle_metal15","WIBulle_metal16","WIBulle_metal17","WIBulle_metal18","WIBulle_metal19","WIBulle_metal20","WIBulle_metal21","WIBulle_metal22","WIBulle_metal23","WIBulle_metal24","WIBulle_metal25","WIBulle_metal26","WIBulle_metal27","WIBulle_metal28","WIBulle_metal29","WIBulle_metal30","WIBulle_metal31","WIBulle_metal32","WIBulle_metal33","WIBulle_metal34","WIBulle_metal35","WIBulle_metal36","WIBulle_metal37","WIBulle_metal38","WIBulle_metal39","WIBulle_metal40","WIBulle_metal41","WIBulle_metal42","WIBulle_metal43","WIBulle_metal44","WIBulle_metal45","WIBulle_metal46","WIBulle_metal47","WIBulle_metal48","WIBulle_metal49","WIBulle_metal50","WIBulle_metal51","WIBulle_metal52","WIBulle_metal53","WIBulle_metal54","WIBulle_metal55","WIBulle_metal56","WIBulle_metal57","WIBulle_metal58","WIBulle_metal59","WIBulle_metal60","WIBulle_metal61","WIBulle_metal62","WIBulle_metal63","WIBulle_metal64","WIBulle_metal65","WIBulle_metal66","WIBulle_metal67","WIBulle_metal68","WIBulle_metal69","WIBulle_metal70","WIBulle_metal71","WIBulle_metal72","WIBulle_metal73","WIBulle_metal74","WIBulle_metal75","WIBulle_metal76","WIBulle_metal77","WIBulle_metal78","WIBulle_metal79","WIBulle_metal80","WIBulle_metal81","WIBulle_metal82","WIBulle_metal83","WIBulle_metal84","WIBulle_wood01","WIBulle_wood02","WIBulle_wood03","WIBulle_wood04","WIBulle_wood05","WIBulle_wood06","WIBulle_wood07","WIBulle_wood08","WIBulle_wood09","WIBulle_wood10","WIBulle_wood11","WIBulle_wood12","WIBulle_wood13","WIBulle_wood14","WIBulle_wood15","WIBulle_wood16","WIBulle_wood17","WIBulle_wood18","WIBulle_wood19","WIBulle_wood20","WIBulle_wood21","WIBulle_wood22","WIBulle_wood23","WIBulle_wood24","WIBulle_wood25","WIBulle_wood26","WIBulle_wood27","WIBulle_wood28","WIBulle_wood29","WIBulle_wood30","WIBulle_wood31","WIBulle_wood32","WIBulle_wood33","WIBulle_SciFi01","WIBulle_SciFi02","WIBulle_SciFi03","WIBulle_SciFi04","WIBulle_SciFi05","WIBulle_SciFi06","WIBulle_SciFi07","WIBulle_SciFi08","WIBulle_SciFi09","WIBulle_SciFi10","WIBulle_SciFi11","WIBulle_SciFi12","WIBulle_SciFi13","WIBulle_SciFi14","WIBulle_SciFi15","WIBulle_SciFi16","WIBulle_SciFi17","WIBulle_SciFi18","WIBulle_SciFi19","WIBulle_SciFi20","WIBulle_SciFi21","WIBulle_SciFi22","WIBulle_SciFi23","WIBulle_SciFi24","WIBulle_SciFi25","WIBulle_SciFi26","WIBulle_SciFi27","WIBulle_SciFi28","WIBulle_SciFi29","WIBulle_SciFi30","WIBulle_SciFi31","WIBulle_ricoTon01","WIBulle_ricoTon02","WIBulle_ricoTon03","WIBulle_ricoTon04","WIBulle_ricoTon05","WIBulle_ricoTon06","WIBulle_ricoTon07","WIBulle_ricoTon08","WIBulle_ricoTon09","WIBulle_ricoTon10","WIBulle_ricoTon11","WIBulle_ricoTon12","WIBulle_ricoTon13","WIBulle_ricoTon14","WIBulle_ricoTon15","WIBulle_ricoTon16","WIBulle_ricoTon17","WIBulle_ricoTon18","WIBulle_ricoTon19","WIBulle_ricoTon20","WIBulle_ricoTon21","WIBulle_ricoTon22","WIBulle_ricoTon23","WIBulle_ricoTon24","WIBulle_ricoTon25","WIBulle_ricoTon26","WIBulle_ricoTon27","WIBulle_ricoTon28","WIBulle_ricoTon29","WIBulle_ricoTon30","WIBulle_ricoTon31","WIBulle_ricoTon32","WIBulle_ricoTon33","WIBulle_ricoTon34","WIBulle_ricoTon35","WIBulle_ricoTon36","WIBulle_ricoTon37","WIBulle_ricoTon38","WIBulle_ricoTon39","WIBulle_ricoTon40","WIBulle_ricoTon41","WIBulle_ricoTon42","WIBulle_ricoTon43","WIBulle_ricoTon44","WIBulle_ricoTon45","WIBulle_ricoTon46","WIBulle_ricoZip01","WIBulle_ricoZip02","WIBulle_ricoZip03","WIBulle_ricoZip04","WIBulle_ricoZip05","WIBulle_ricoZip06","WIBulle_ricoZip07","WIBulle_ricoZip08","WIBulle_ricoZip09","WIBulle_ricoZip10","WIBulle_ricoZip11",
	"WIBulle_ricoZip12","WIBulle_ricoZip13","WIBulle_ricoZip14","WIBulle_ricoZip15","WIBulle_ricoZip16","WIBulle_ricoZip17","WIBulle_ricoZip18","WIBulle_ricoZip19","WIBulle_ricoZip20","WIBulle_ricoZip21","WIBulle_ricoZip22","WIBulle_ricoZip23","WIBulle_ricoZip24","WIBulle_ricoZip25","WIBulle_ricoZip26","WIBulle_ricoZip27","WIBulle_ricoZip28","WIBulle_ricoZip29","WIBulle_ricoZip30","WIBulle_ricoZip31","WIBulle_ricoZip32","WIBulle_ricoZip33","WIBulle_ricoZip34","WIBulle_ricoZip35","WIBulle_ricoZip36","WIBulle_ricoZip37","WIBulle_ricoZip38","WIBulle_ricoZip39","WIBulle_ricoZip40","WIBulle_ricoZip41","WIBulle_ricoZip42","WIBulle_ricoZip43","WIBulle_ricoZip44","WIBulle_ricoZip45","WIBulle_ricoZip46","WIBulle_ricoZip47","WIBulle_ricoZip48","WIBulle_body01","WIBulle_body02","WIBulle_body03","WIBulle_body04","WIBulle_body05","WIBulle_body06","WIBulle_body07","WIBulle_body08","WIBulle_body09","WIBulle_body10","WIBulle_body11","WIBulle_body12","WIBulle_body13","WIBulle_body14","WIBulle_body15","WIBulle_body16","WIBulle_body17","WIBulle_body18","WIBulle_body19","WIBulle_body20","WIBulle_body21","WIBulle_body22","WIBulle_body23","WIBulle_body24","WIBulle_body25","WIBulle_body26","WIBulle_body27","WIBulle_body28","WIBulle_body29","WIBulle_body30","WIBulle_body31","WIBulle_body32","WIBulle_body33","WIBulle_body34","WIBulle_body35","WIBulle_body36","WIBulle_body37","WIBulle_body38","WIBulle_body39","WIBulle_body40","WIBulle_body41","WIBulle_body42","WIBulle_body43","WIBulle_body44","WIBulle_body45","WIBulle_body46","WIBulle_gener001","WIBulle_gener002","WIBulle_gener003","WIBulle_gener004","WIBulle_gener005","WIBulle_gener006","WIBulle_gener007","WIBulle_gener008","WIBulle_gener009","WIBulle_gener010","WIBulle_gener011","WIBulle_gener012","WIBulle_gener013","WIBulle_gener014","WIBulle_gener015","WIBulle_gener016","WIBulle_gener017","WIBulle_gener018","WIBulle_gener019","WIBulle_gener020","WIBulle_gener021","WIBulle_gener022","WIBulle_gener023","WIBulle_gener024","WIBulle_gener025","WIBulle_gener026","WIBulle_gener027","WIBulle_gener028","WIBulle_gener029","WIBulle_gener030","WIBulle_gener031","WIBulle_gener032","WIBulle_gener033","WIBulle_gener034","WIBulle_gener035","WIBulle_gener036","WIBulle_gener037","WIBulle_gener038","WIBulle_gener039","WIBulle_gener040","WIBulle_gener041","WIBulle_gener042","WIBulle_gener043","WIBulle_gener044","WIBulle_gener045","WIBulle_gener046","WIBulle_gener047","WIBulle_gener048","WIBulle_gener049","WIBulle_gener050","WIBulle_gener051","WIBulle_gener052","WIBulle_gener053","WIBulle_gener054","WIBulle_gener055","WIBulle_gener056","WIBulle_gener057","WIBulle_gener058","WIBulle_gener059","WIBulle_gener060","WIBulle_gener061","WIBulle_gener062","WIBulle_gener063","WIBulle_gener064","WIBulle_gener065","WIBulle_gener066","WIBulle_gener067","WIBulle_gener068","WIBulle_gener069","WIBulle_gener070","WIBulle_gener071","WIBulle_gener072","WIBulle_gener073","WIBulle_gener074","WIBulle_gener075","WIBulle_gener076","WIBulle_gener077","WIBulle_gener078","WIBulle_gener079","WIBulle_gener080","WIBulle_gener081","WIBulle_gener082","WIBulle_gener083","WIBulle_gener084","WIBulle_gener085","WIBulle_gener086","WIBulle_gener087","WIBulle_gener088","WIBulle_gener089","WIBulle_gener090","WIBulle_gener091","WIBulle_gener092","WIBulle_gener093","WIBulle_gener094","WIBulle_gener095","WIBulle_gener096","WIBulle_gener097","WIBulle_gener098","WIBulle_gener099","WIBulle_gener100","WIBulle_gener101","WIBulle_gener102","WIBulle_gener103","WIBulle_gener104","WIBulle_gener105","WIBulle_gener106","WIBulle_gener107","WIBulle_gener108","WIBulle_gener109","WIBulle_gener110","WIBulle_gener111","WIBulle_gener112","WIBulle_gener113","WIBulle_gener114","WIBulle_gener115","WIBulle_gener116","WIBulle_gener117","WIBulle_gener118","WIBulle_gener119","WIBulle_gener120","WIBulle_gener121","WIBulle_gener122","WIBulle_gener123","WIBulle_gener124","WIBulle_gener125","WIBulle_gener126","WIBulle_gener127","WIBulle_generPopa","WIBulle_generPopb","WIBulle_generPopc","WIBulle_generPopd","WIBulle_generPope","WIBulle_generPopf","WIBulle_generPopg","WIBulle_generPoph","WIBulle_generPopi","WIBulle_generPopj","WIBulle_generPopk",
	"WIBulle_generPopl","WIBulle_generPopm","WIBulle_generPopn","WIBulle_generPopo","WIBulle_generPopp","WIBulle_generic1a","WIBulle_generic1b","WIBulle_generic1c","WIBulle_generic1d","WIBulle_generic1e","WIBulle_generic1f","WIBulle_generic1g","WIBulle_generic1h","WIBulle_generic1i","WIBulle_generic1j","WIBulle_generic1k","WIBulle_generic1l","WIBulle_generic1m","WIBulle_glass01","WIBulle_glass02","WIBulle_glass03","WIBulle_glass04","WIBulle_glass05","WIBulle_glass06","WIBulle_glass07","WIBulle_glass08","WIBulle_glass09","WIBulle_glass10","WIBulle_glass11","WIBulle_glass12","WIBulle_glass13","WIBulle_glass14","WIBulle_glass15","WIBulle_glass16","WIBulle_glass17","WIBulle_glass18","WIBulle_glass19","WIBulle_glass20","WIBulle_glass21","WIBulle_glass22","WIBulle_glass23","WIBulle_glass24","WIBulle_glass25","WIBulle_glass26","WIBulle_glass27","WIBulle_glass28","WIBulle_glass29","WIBulle_glass30","WIBulle_glass31","WIBulle_glass32","WIBulle_glass33","WIBulle_glass34","WIBulle_glass35","WIBulle_glass36","WIBulle_glass37","WIBulle_glass38","WIBulle_glass39","WIBulle_glass40","WIBulle_glass41","WIBulle_glass42","WIBulle_metal01","WIBulle_metal02","WIBulle_metal03","WIBulle_metal04","WIBulle_metal05","WIBulle_metal06","WIBulle_metal07","WIBulle_metal08","WIBulle_metal09","WIBulle_metal10","WIBulle_metal11","WIBulle_metal12","WIBulle_metal13","WIBulle_metal14","WIBulle_metal15","WIBulle_metal16","WIBulle_metal17","WIBulle_metal18","WIBulle_metal19","WIBulle_metal20","WIBulle_metal21","WIBulle_metal22","WIBulle_metal23","WIBulle_metal24","WIBulle_metal25","WIBulle_metal26","WIBulle_metal27","WIBulle_metal28","WIBulle_metal29","WIBulle_metal30","WIBulle_metal31","WIBulle_metal32","WIBulle_metal33","WIBulle_metal34","WIBulle_metal35","WIBulle_metal36","WIBulle_metal37","WIBulle_metal38","WIBulle_metal39","WIBulle_metal40","WIBulle_metal41","WIBulle_metal42","WIBulle_metal43","WIBulle_metal44","WIBulle_metal45","WIBulle_metal46","WIBulle_metal47","WIBulle_metal48","WIBulle_metal49","WIBulle_metal50","WIBulle_metal51","WIBulle_metal52","WIBulle_metal53","WIBulle_metal54","WIBulle_metal55","WIBulle_metal56","WIBulle_metal57","WIBulle_metal58","WIBulle_metal59","WIBulle_metal60","WIBulle_metal61","WIBulle_metal62","WIBulle_metal63","WIBulle_metal64","WIBulle_metal65","WIBulle_metal66","WIBulle_metal67","WIBulle_metal68","WIBulle_metal69","WIBulle_metal70","WIBulle_metal71","WIBulle_metal72","WIBulle_metal73","WIBulle_metal74","WIBulle_metal75","WIBulle_metal76","WIBulle_metal77","WIBulle_metal78","WIBulle_metal79","WIBulle_metal80","WIBulle_metal81","WIBulle_metal82","WIBulle_metal83","WIBulle_metal84","WIBulle_watera","WIBulle_waterb","WIBulle_waterc","WIBulle_waterd","WIBulle_watere","WIBulle_waterf","WIBulle_waterg","WIBulle_wood01","WIBulle_wood02","WIBulle_wood03","WIBulle_wood04","WIBulle_wood05","WIBulle_wood06","WIBulle_wood07","WIBulle_wood08","WIBulle_wood09","WIBulle_wood10","WIBulle_wood11","WIBulle_wood12","WIBulle_wood13","WIBulle_wood14","WIBulle_wood15","WIBulle_wood16","WIBulle_wood17","WIBulle_wood18","WIBulle_wood19","WIBulle_wood20","WIBulle_wood21","WIBulle_wood22","WIBulle_wood23","WIBulle_wood24","WIBulle_wood25","WIBulle_wood26","WIBulle_wood27","WIBulle_wood28","WIBulle_wood29","WIBulle_wood30","WIBulle_wood31","WIBulle_wood32","WIBulle_wood33","WIBuild_weaImpa1a","WIBuild_weaImpa1b","WIBuild_weaImpa1c","WIBuild_weaImpa1d","WIBuild_weaImpa1e","WIBuild_weaImpa1f","WIBuild_weaImpa1g","WIBuild_weaImpa1h","WIBuild_weaImpa1i","WIBuild_weaImpa1j","WIBuild_weaImpa1k","WIBuild_weaImpa2a","WIBuild_weaImpa2b","WIBuild_weaImpa2c","WIBuild_weaImpa2d","WIBuild_weaImpa2e","WIBuild_weaImpa2f","WIBuild_weaImpa2g","WIBuild_weaImpa2h","WIBuild_weaImpa2i","WIBuild_weaImpa2j","WIBuild_weaImpa2k","WIVehic_weapImpaa","WIVehic_weapImpab","WIVehic_weapImpac","WIVehic_weapImpad","WIVehic_weapImpae","WIVehic_weapImpaf","WIVehic_weapImpag","WIVehic_weapImpah","WIVehic_weapImpai","WIVehic_weapImpaj","WIVehic_weapImpak","WIVehic_weapImpal","WIVehic_weapImpam","WIVehic_weapImpaa","WIVehic_weapImpab","WIVehic_weapImpac","WIVehic_weapImpad","WIVehic_weapImpae",
	"WIVehic_weapImpaf","WIVehic_weapImpag","WIVehic_weapImpah","WIVehic_weapImpai","WIVehic_weapImpaj","WIVehic_weapImpak","WIVehic_weapImpal","WIVehic_weapImpam","WIVehic_weapImpaa","WIVehic_weapImpab","WIVehic_weapImpac","WIVehic_weapImpad","WIVehic_weapImpae","WIVehic_weapImpaf","WIVehic_weapImpag","WIVehic_weapImpah","WIVehic_weapImpai","WIVehic_weapImpaj","WIVehic_weapImpak","WIVehic_weapImpal","WIVehic_weapImpam","NTiber_crysSelea","NTiber_crysSeleb","NTiber_crysSelec","NTiber_crysSeled","NTiber_crysSelea","NTiber_crysSeleb","NTiber_crysSelec","NTiber_crysSeled","NSCatal_tibeExpla","NSCatal_tibeExplb","NSCatal_tibeExplc","NSCatal_tibeExpld","MBCity_fogHorna","MBCity_fogHornb","MBCity_fogHornc","MBCity_fogHornd","WABell_buoya","WABell_buoyb","WABell_buoyc","WABell_buoyd","WAboat_dockeda","WAboat_dockedb","WAboat_dockedc","WAboat_dockedd","WAboat_dockede","WAboat_dockedf","WAboat_dockedg","WAboat_dockedh","WAboat_dockedi","WAboat_dockedj","WAboat_dockedk","WAboat_dockedl","WAboat_dockedm","WAboat_dockedn","WAboat_dockedo","WAboat_dockedp","WAboat_dockedq","WAboat_dockedr","WAboat_dockeds","WAboat_dockedt","WAboat_dockedu","WAChime_Japanesea","WAChime_Japaneseb","WAChime_Japanesec","WAcity_skylineL2a","WAcity_skylineL2b","WAcity_skylineL2c","WAcity_skylineL2d","WAcity_skylineL2e","WAcity_skylineL2f","WAcity_skylineL2g","WADirt_fall_1a","WADirt_fall_1b","WADirt_fall_1c","WADirt_fall_1d","WADirt_fall_1e","WADirt_fall_1f","WADirt_fall_1g","WADirt_fall_1h","WAfield_calmLoop2a","WAfield_calmLoop2b","WAfield_calmLoop2c","WAfield_calmLoop2d","WAfield_calmLoop2e","WAfield_calmLoop2f","WAFire1_MoriaLa","WAFire1_MoriaLb","WAFire1_MoriaLc","WAFire1_MoriaLd","WAFire1_MoriaLe","WAFire1_MoriaLf","WAFire1_MoriaLg","WAFire1_MoriaLh","WAFire1_MoriaLi","WAFire1_MoriaLj","WAFire1_MoriaLk","WAFire1_MoriaLl","WAFire1_MoriaLm","WAFire1_MoriaLn","WAFire1_MoriaLo","WAOcean_wavesa","WAOcean_wavesb","WAOcean_wavesc","WAOcean_wavesd","WAOcean_wavese","WAOcean_wavesf","WAOcean_wavesg","WARain1_ambienL2a","WARain1_ambienL2b","WARain1_ambienL2c","WARain1_ambienL2d","WARock_tumbl1a","WARock_tumbl1b","WARock_tumbl1c","WARock_tumbl1d","WARock_tumbl1e","WARock_tumbl1f","WARock_tumbl1g","WARock_tumbl1h","WARock_tumbl1i","WARock_tumbl1j","WARock_tumbl1k","WARock_tumbl1l","WARock_tumbl1m","WARock_tumbl1n","WARock_tumbl1o","WACreak_misc1a","WACreak_misc1b",	"WASwamp_ronks1a","WASwamp_ronks1b","WASwamp_ronks1c","WASwamp_ronks1d","WATiber_cracLoopa","WATiber_cracLoopb","WATiber_cracLoopc","WATiber_cracLoopd","WATiber_cracLoope","WATiber_cracLoopf","WATiber_cracLoopg","WATiber_cracklea","WATiber_crackleb","WATiber_cracklec","WATiber_crackled","WATiber_cracklee","WATiber_cracklef","WATiber_crackleg","WAWater_cre1L2a","WAWater_cre1L2b","WAWater_cre1L2c","WAWater_cre1L2d","WAWater_cre2L2a","WAWater_cre2L2b","WAWater_cre2L2c","WAWater_cre2L2d",	"WAWater_dock1_a","WAWater_dock1_b","WAWater_dock1_c","WAWater_dock1_d","WAWater_dock1_e","WAWater_dock1_f","WAWater_dock1_g","WAWater_dock1_h","WAWater_dock1_i","WAWater_dock1_j","WAWater_dock1_k","WAWater_dock1_l","WAWater_dock1_m","WAWater_dock1_n","WAWater_dock1_o","WAWater_dock1_p","WAMoria_water1a","WAMoria_water1b","WAMoria_water1c","WAMoria_water1d","WAMoria_water1e","WAMoria_water1f","WAMoria_water1g","WAMoria_water1h","WAMoria_water1i","WAMoria_water1j","WAMoria_water1k","WAWater_fall1La","WAWater_fall1Lb","WAWater_fall1Lc","WAWater_fall1Ld","WAWater_fall1Le","WAWater_fall1Lf","WAWater_fall1Lg","WAWater_fall1Lh","WAWater_fall1Li","WAWater_fall1Lj","WAWater_fall1Lk","WAWater_fall1Ll","WAWater_fall1Lm","WAWater_fall1Ln","WAWater_fall1Lo","WAFount_wate1La","WAFount_wate1Lb","WAFount_wate1Lc","WAFount_wate1Ld","WAFount_wate1Le","WAFount_wate1Lf","WAFount_wate1Lg","WAFount_wate1Lh","WAFount_wate1Li","WAWater_lake1_a","WAWater_lake1_b","WAWater_lake1_c","WAWater_lake1_d","WAWater_lake1_e","WAWater_lake1_f","WAWater_lake1_g","WAWater_lake1_h","WAWater_lake1_i","WAWater_lake1_j","WAWater_lake1_k","WAWater_riv1L2a","WAWater_riv1L2b","WAWater_riv1L2c","WAWater_riv1L2d",
	"WAWater_riv1L2e","WAWater_riv1L2f","WAWater_riv1L2g","WAWater_riv1L2h","WAWater_riv1L2i","WAWater_riv1L2j","WAWater_riv1L2k","WAWater_riv1L2l","WAWater_riv1L2m","WAWind_mt2a","WAWind_mt2b","WAWind_mt2c","WAWind_mt2d","WAWind_mt2e","WAWind_mt2f","WAWind_mount1a","WAWind_mount1b","WAWind_mount1c","WAWind_cold1a","WAWind_cold1b","WAWind_cold1c","WAWind_cold1d","WAWind_cold1e","WACreak_tree1_a","WACreak_tree1_b","WACreak_tree1_c","WACreak_tree1_d","WACreak_tree1_e","WACreak_tree1_f","WACreak_tree1_g","WACreak_tree1_h","WACreak_tree1_i","WACreak_tree1_j","WACreak_tree1_k","WACreak_tree1_l","WACreak_tree1_m","WACreak_tree1_n","WAAirpo_announce1a","WAAirpo_announce1b","WAAirpo_announce1c","WAAirpo_jibbAnno1f","WAAirpo_jibbAnno1g","WAAirpo_jibbAnno2a","WAAirpo_jibbAnno2b","WAAirpo_jibbAnno2c","WAAirpo_jibbAnno2d","WAAirpo_jibbAnno2e","WAAirpo_jibbBeepa","WAAirpo_jibbAnno2a","WAAirpo_jibbAnno2b","WAAirpo_jibbAnno2c","WAAirpo_jibbAnno2d","WAAirpo_jibbAnno2e","WAAirpo_ambiLoopa","WAAirpo_ambiLoopb","WAAirpo_ambiLoopc","WAAirpo_ambiLoopd","WAAirpo_ambiLoope","WAAirpo_ambiLoopf","WAAirpo_ambiLoopg","WAAirpo_planeBya","WAAirpo_planeByb","WAAirpo_planeByc","WAAirpo_planeByd","WAAirpo_planeBye","WAAirpo_planeByf","WAAlarmSound_loopa","WACamp_foley1a","WACamp_foley1b","WACamp_foley1c","WACamp_foley1d","WACamp_foley1e","WACamp_foley1f","WACamp_foley1g","WACamp_foley1h","WAJunk_glassDropa","WAJunk_glassDropb","WAJunk_glassDropc","WAJunk_glassDropd","WAJunk_glassDrope","WAJunk_glassDropf","WAJunk_glassDropg","WAJunk_glassDroph","WAJunk_glassDropi","WAJunk_glassDropj","WAJunk_glassDropk","WAJunk_metalDropa","WAJunk_metalDropb","WAJunk_metalDropc","WAJunk_metalDropd","WAJunk_metalDrope","WAJunk_metalDropf","WAJunk_metalDropg","WAJunk_metalDroph","WAJunk_metalDropi","WAJunk_metalDropj","WAJunk_metalDropk","WAJunk_metalDropl","WAJunk_woodDropa","WAJunk_woodDropb","WAJunk_woodDropc","WAJunk_woodDropd","WAJunk_woodDrope","WAJunk_woodDropf","WAJunk_woodDropg","WAJunk_woodDroph","WAJunk_woodDropi","WAJunk_woodDropj","WACreak_metal1a","WACreak_metal1c","WACreak_metal1d","WACreak_metal1e","WACreak_metal1f","WACreak_metal1g","WAMetal_ambiHita","WAMetal_ambiHitb","WAMetal_ambiHitc","WAMetal_ambiHitd","WAMetal_ambiHite","WAMetal_ambiHitf","WAMetal_ambiHitg","WAMetal_ambiHith","WAMetal_ambiHiti","WAMetal_ambiHitj","WAMetal_ambiHitk","WAMetal_ambiHitl","WAMetal_ambiHitm","WAMetal_ambiHitn","WAMetal_ambiHito","WAMetal_ambiHitp","WAMetal_ambiHitq","WAMetal_ambiHitr","WAMetal_ambiHits","WAMetal_ambiHitt","WAMetal_ambiHitu","WAMetal_ambiHitv","WAMetal_ambiHitw","WAMetal_ambiHitx","WAMetal_ambiHity","WAMetal_ambiHitz","WATent_flapa","WATent_flapb","WATent_flapc","WATent_flapd","WATent_flape","WATent_flapf","WATent_flapg","WATent_flap2a","WATent_flap2b","WATent_flap2c","WATent_flap2d","WATent_flap2e","WATent_flap2f","WATurbi_windLoopa","WAShutt_wood1_a","WAShutt_wood1_b","WAShutt_wood1_c","WAShutt_wood1_d","WAShutt_wood1_e","WAShutt_wood1_f","WAShutt_wood1_g","WAShutt_wood1_h","WAWood_ambiHita","WAWood_ambiHitb","WAWood_ambiHitc","WAWood_ambiHitd","WAWood_ambiHite","WAWood_ambiHitf","WAWood_ambiHitg","WAWood_ambiHith","WAWood_ambiHiti","WAWood_shuttera","WAWood_shutterb","WAWood_shutterc","WAWood_shutterd","WAWood_shuttere","WAWood_shutterf","WAWood_shutterg","WAWood_shutterh","WABirds_amonh1a","WABirds_amonh1b","WABirds_amonh1c","WABirds_amonh1d","WABirds_amonh1e","WABirds_amonh1f","WABirds_amonh1g","WABirds_amonh1h","WABirds_amonh1i","WABirds_amonh1j","WABirds_amonh2a","WABirds_amonh2b","WABirds_amonh2c","WABirds_amonh2d","WABirds_amonh2e","WABirds_amonh2f","WABirds_amonh2g","WABirds_amonh2h","WABirds_amonh2i","WABirds_amonh2j","WABirds_buzza1a","WABirds_buzza1b","WABirds_buzza1c","WABirds_buzza1d","WABirds_crow1a","WABirds_crow1b","WABirds_crow1c","WABirds_crow1d","WABirds_crow2a","WABirds_crow2b","WABirds_crow2c","WABirds_crow3a","WABirds_crow3b","WABirds_crow3c","WABirds_crow3d","WABirds_crow3e","WABirds_crow4a","WABirds_crow4b",
	"WABirds_crow4c","WABirds_crow4d","WABirds_crow4e","WABirds_deser1a","WABirds_deser1b","WABirds_deser1c","WABirds_deser1d","WABirds_deser1e","WABirds_deser1f","WABirds_deser1g","WABirds_deser1h","WABirds_deser1i","WABirds_deser1j","WABirds_deser1k","WABirds_deser1l","WABirds_falco1a","WABirds_falco1b","WABirds_falco1c","WABirds_falco1d","WABirds_falco1e","WABirds_falco2a","WABirds_falco2b","WABirds_falco2c","WABirds_falco2d","WABirds_mount1a","WABirds_mount1b","WABirds_mount1c","WABirds_mount1d","WABirds_mount2a","WABirds_mount2b","WABirds_mount2c","WABirds_mount2d","WABirds_mount2e","WABirds_mount2f","WABirds_mount2g","WABirds_owl1a","WABirds_owl1b","WABirds_owl1c","WABirds_owl1d","WABirds_owl1e","WABirds_beach1a","WABirds_beach1b","WABirds_beach1c","WABirds_beach1d","WABirds_beach1e","WABird_seagulla","WABird_seagullb","WABird_seagullc","WABird_seagulld","WACreat_bird1_a","WACreat_bird1_b","WACreat_bird1_c","WACreat_bird1_d","WACreat_bird1_e","WACreat_bird1_f","WACreat_howl1_a","WACreat_howl1_b","WACreat_howl1_c","WACreat_howl1_d","WACreat_whist1a","WACreat_whist1b","WACreat_whist1c","WACreat_whist1d","WACreat_whist1e","WACreat_whist1f","WACreat_whist1g","WACreat_whist1h","WACreat_low1a","WACreat_low1b","WACreat_low1c","WACreat_low1d","WACreat_low1e","WACreat_low1f","WACreat_low1g","WACreat_low1h","WACreat_low1i","WACreat_low1j","WACreat_low1k","WACreat_low1l","WACreat_low1m","WACrick_bed1_2a","WACrick_bed1_2b","WACrick_bed1_2c","WACrick_bed1_2d","WACrick_bed1_2e","WACrick_bed1_2f","WACrick_bed2_2a","WACrick_bed2_2b","WACrick_bed2_2c","WACrick_bed2_2d","WACrick_bed2_2e","WACrick_bed2_2f","WACrick_singl1a","WACrick_singl1b","WACrick_singl1c","WACritt_deser1a","WACritt_deser1b","WACritt_deser1c","WACritt_deser2a","WACritt_deser2b","WACritt_deser2c","WACritt_deser2d","WACritt_deser2e","WACritt_deser2f","WADog_bark1a","WADog_bark1b","WADog_bark1c","WADog_bark1d","WADog_bark1e","WADog_bark1f","WADog_bark1g","WADog_bark1h","WADog_bark1i","WADog_bark1j","WADog_bark1k","WADog_bark1l","WADog_bark1m","WADog_bark2a","WADog_bark2b","WADog_bark2c","WADog_bark2d","WADog_bark2e","WADog_bark2f","WADog_bark2g","WADog_bark2h","WADog_bark2i","WADog_bark2j","WADog_bark2k","WADog_bark2l",	"WADog_bark3a","WADog_bark3b","WADog_bark3c","WADog_bark3d","WADog_bark3e","WADog_bark3f","WADog_bark3g","WADog_bark3h","WADog_bark3i","WADog_bark3j","WADog_bark3k","WADog_bark3l","WADog_bark3m","WADog_bark3n","WADog_bark3o","WADog_bark3p","WADog_bark3q","WADog_bark3r","WADog_bark3s","WADog_bark3t","WADog_bark3u","WADog_bark3v","WADog_bark3w","WADog_bark3x","WADog_bark3y","WAField_plainsL2a","WAField_plainsL2b","WAField_plainsL2c","WAField_plainsL2d","WAField_plainsL2e","WAField_plainsL2f","WAFly_buzz1_a","WAFly_buzz1_b","WAFly_buzz1_c","WAFly_buzz1_d","WAFly_buzz1_e","WAFly_buzz1_f","WAFly_buzz1_g","WAFly_buzz1_h","WAFly_buzz1_i","WAFly_buzz1_j","WAFly_buzz1_k","WAFly_buzz1_l","WAFly_buzz1_m",	"WImpac_bodyfalla","WImpac_bodyfallb","WImpac_bodyfallc","WImpac_bodyfalld","WImpac_bodyfalle","WImpac_bodyfallf","WImpac_bodyfallg","WImpac_bodyfallh","WImpac_bodyfalli","WImpac_bodyfallj","WImpac_bodyfallk","WImpac_bodyfalll","WImpac_bodyfallm","WImpac_bodyfalln","WARadio_staticLRa","WARadio_staticLRb","WARadio_staticLRc","WARadio_staticLRd","WBBuild_captureda","WBbuild_repaireda","WURadio_staticOffa","WURadio_staticOffb","WURadio_staticOffc","WURadio_staticOffd","WURadio_staticOffe","WURadio_staticOfff","WURadio_staticOffg","WURadio_staticOffh","WURadio_staticOna","WURadio_staticOnb","WURadio_staticOnc","WURadio_staticOnd","WURadio_staticOne","WURadio_staticOnf","WURadio_staticOng","WURadio_staticAmba","WURadio_staticAmbb","WURadio_staticAmbc","WURadio_staticAmbd","WURadio_staticAmbe","WURadio_staticAmbf","WURadio_staticAmbg","WURadio_staticAmbh","WURadio_staticAmbi","WURadio_staticAmbj","GUMarv_cannImpaa","GUMarv_cannImpab","GUMarv_cannImpac","GUMarv_cannImpad","GUMarv_cannImpae","GUMarv_cannImpaf","GUMarv_cannImpag","GUMarv_cannImpah","CTree_crusha","CTree_crushb","CTree_crushc","CTree_crushd","WIVehic_crusha","WIVehic_crushb",
	"WIVehic_crushc","WIVehic_crushd","WIVehic_crushe","WIVehic_crushf","WIVehic_crushg","WIVehic_crushh","SQUISH5","WIVehic_crusha","WIVehic_crushb","WIVehic_crushc","WIVehic_crushd","WIVehic_crushe","WIVehic_crushf","WIVehic_crushg","WIVehic_crushh","SQUISH5","WVehic_entera","WVehic_enterb","WVehic_exita","WVehic_exitb","WVehic_exitc","WIWood_topplea","WIWood_toppleb","WIWood_topplec","WIWood_toppled","WIWood_topplee","WIWood_topplef","WIWood_toppleg","WIWood_toppleh","WIWood_topplei","WIWood_topplej","WIWood_topplek","WIWood_topplel","WIWood_topplem","WIWood_topplen","WIWood_toppleo","WIWood_crush2a","WIWood_crush2b","WIWood_crush2c","WIWood_crush2d","WIWood_crush2e","WRally_pointa","TOW_SideBoxesOpen_LR","TOW_TerrainScan_LR","UI_SpyCameraDrone","UI_SpyCamera","TEMP_SatCamPan","TEMP_SatCamBegin","TEMP_SatCamZoomOut","TEMP_SatCamZoomIn","TEMP_SatCamEnd","TEMP_SatCamAmbLoop","GUI_spyCamera","GUI_spyCamerb","WCash_dowa","WCash_upd","WCash_upa","WCash_upb","WCash_upc","UIChat_01a","UIChat_01b","UIChat_02a","UIChat_02b","UIChat_03a","UIChat_03b","UIChat_04a","UIChat_04b","UIChat_05a","UIChat_06a","UIChat_07a","UIChat_08a","UIChat_08b","UIChat_08c","UIChat_08d","UIChat_08e","UIChat_01a","UIChat_01b","UIChat_02a","UIChat_02b","UIChat_03a","UIChat_03b","UIChat_04a","UIChat_04b","UIChat_05a","UIChat_06a","UIChat_07a","UIChat_08a","UIChat_08b","UIChat_08c","UIChat_08d","UIChat_08e","WIRadio_clicksA01","WIRadio_clicksA02","WIRadio_clicksA03","WIRadio_clicksA04","WIRadio_clicksA05","WIRadio_clicksA06","WIRadio_clicksA07","WIRadio_clicksA08","WIRadio_clicksA09","WIRadio_clicksA10","WIRadio_clicksA11","WIRadio_clicksA12","WIRadio_clicksA13","WIRadio_clicksA14","WIRadio_clicksA15","WIRadio_clicksA16","WIRadio_clicksA17","WIRadio_clicksA18","WIRadio_clicksA19","WIRadio_clicksA20","WIRadio_clicksA21","WIRadio_clicksA22","WIRadio_clicksA23","WIRadio_clicksA24","WIRadio_clicksA25","WIRadio_clicksA26","WIRadio_clicksA27","WIRadio_clicksA28","WIRadio_clicksA29","WIRadio_clicksA30","WIRadio_clicksA31","WIRadio_clicksA32","WIRadio_clicksA33","WIRadio_clicksA34","WIRadio_clicksA35","WIRadio_clicksA36","GUI_textblip1c","GUI_textblip1a","GUI_textblip1b","UI_AutoMatcha","GUI_textblip1a","WRadar_offa","WRadar_ona","WCash_upd","GUI_AlienRevealButton","GUI_AlienRevealClick","UIChat_01a","USelect_Unavailabled",		"UMouse_Overa_click","UButto_sidebara","Gui_MPCountdown","GUI_ShellClick","GUI_ShellClicka","GUI_ShellClicka","UButto_shelClica",	"UMouse_Selecta","UMouse_overe",	"UMouse_Overa","UMouse_Overb",	"UMouse_Overb_click","UButto_sidebara",		"UBuildQueuea","UButto_sidebara","UButto_sidebara",		"UMouse_Selecta","UButto_sidebara","UButto_sidebara","USelect_Unavailabled","","UButto_sidebara","GUI_AlienRevealButton","GUI_AlienRevealClick","WVetera_levelUpa","STATS_AwardMarked","STATS_BoxesChecked","STATS_LineSweeps","STATS_MissionComplete","STATS_ScreenSwipe","GUI_ShellClick","GUI_ShellClick","ABDrone_selecta","GBConst_selecta","NBConst_selecta","AutoResolve2","AutoResolve","AUShock_wea2Firea","AUShock_wea2Fireb","AUShock_wea2Firec","AUShock_wea2Fired","AUShock_wea2Firee","AUShock_wea2Firef","AUShock_wea2Fireg","AUShock_wea2Fireh","AUShock_wea2Firei","AUShock_wea2Firej","AUShock_wea2Firek","AUShock_wea2Firel","AUShock_wea2Firem","AUShock_wea2Firen","AUShock_wea2Fireo","AUShock_wea2Firep","GUPreda_wea1firea","GUPreda_wea1fireb","GUPreda_wea1firec","GUPreda_wea1fired","GUPreda_wea1firee","GUPreda_wea1firef","GUPreda_wea1fireg","GUPreda_wea1fireh","GUPreda_wea1firei","NUScorp_cannFirea","NUScorp_cannFireb","NUScorp_cannFirec","NUScorp_cannFired","NUScorp_cannFiree","NUScorp_cannFiref","NUScorp_cannFireg","NUScorp_cannFireh","NUScorp_cannFirei","AutoResolve_Win","AutoResolve_Lose","GUComma_charBeepa","ABFortr_ambiLoopa","ABBuild_placea","MS_CommandoStrike","GUMarv_cannonHitd","GSSuper_voxa","CBEMPCo_selecta","MS_EmergencyCleanup","GSRaiAc_casta","MS_EradicatePopulation","ASOverl_wrath1L2c","AUExplo_unpackeda","MS_FuryOfNod","NSDecoy_armya","Aupgra_ConveReser","AUExplo_seleAmbia","ABGrowt_selecta","NUAvatar_commandea","WBbuild_repaireda","NTiber_crysSeled","ASIchor_SeedSpawna",
	"NTiber_crysSeled","ASRepair_startb","GBIonCa_weapShoca","GBIonCa_weapSphea","GBIonCa_startUpa","ABStorm_weapFireb","AUPlanet_sounStorm1La","ABStorm_selecta","MS_RefugeeAid","GBPulse_selecta","GBSteal_selecta","NSNucle_explosi2b","NSNucle_incominga","NSCatal_targCursa","WAAlarmSound_loopa","ASOverl_wratImpaa","GSShock_ArtiImpad","GSShock_ArtiImpae","GSShock_ArtiImpaf","ASOverl_wrath2L2b","ASOverl_wrath2L2e","ABWallH_selectb","GSOrcaA_targBeepa","GUOrca_moveStara","GUOrca_moveStarb","GUOrca_moveStarc","GUOrca_moveStard","GUOrca_moveStare","GUOrca_moveStarf","GUOrca_moveStarg","GUOrca_moveStarh","GUOrca_moveStari","GUOrca_moveStarj","GUOrca_moveStark","GUOrca_moveStarl","GUOrca_moveStarm","GUMiniO_divea","GUMiniO_weapExpla","GUMiniO_weapExplb","GUMiniO_weapExplc","GUMiniO_weapExpld","GUMiniO_weapExple","GUMiniO_weapExpla","GUMiniO_weapExplb","GUMiniO_weapExplc","GUMiniO_weapExpld","GUMiniO_weapExple","GUMiniO_weapExpla","GUMiniO_weapExplb","GUMiniO_weapExplc","GUMiniO_weapExpld","GUMiniO_weapExple","ASPhase_gen1La","ASForce_starta","MS_RaiseInsurrection","NSDecoy_armya","NSBurro_MineTar1b","MS_RefugeeAid","GBMedic_selecta","ASRift_gen1La","ABRiftG_rift1Loopl","MUNodUL_voicSelea","MUNodUL_voicSeleb","MUNodUL_voicSelec","NUBlack_ambiSeleb","NSDecoy_armya","GUOrca_pulsScanc","MS_ZocomInfiltration","CBExpan_selecta","GBRadio_selecta","ASOverl_wrath2L2d","ASTiber_scanSter","NUSteal_stealOnd","NSCloak_fieldOffb","NUSteal_stealOffa","WBBuild_captureda","GUComma_charBeepa","GSOrcaA_targBeepa","NUVertigo_moveStard","NUVerti_bombExplf","NUVertigo_bombDrope","ASTemWo_HoleL1a","ASWormh_begin2a","GSThors_beamPart2","GSThors_HammImpad","GBResea_selecta","GUZoneT_missExploa","STATS_MissionComplete","ABBuild_placea","WBuild_placea","ABBuild_placea","WBuild_placea","WIExplo_geneLarg1a","WIExplo_geneLarg1b","WIExplo_geneLarg1c","WIExplo_geneLarg1d","WIExplo_geneLarg1e","WIExplo_geneLarg1f","GUI_AlienRevealClick","TOW_SideBoxesOpen_LR","UIChat_01a","WBuild_placea","USelect_Unavailabled","ABDamag_lightb","WVetera_levelUpa","ABDamag_heavyc","WBbuild_repaireda","ABPlasm_selecta","NBRocHu_selecta","ABReact_upgradea","GBPower_upgradea","WVetera_levelUpa","NBContr_selecta","GUUpgra_railCanoa","WRally_pointa","UIChat_01a","TOW_SideBoxesOpen_LR","GUI_Meta_MoveMarkerPlacea","GUI_Meta_AttackMarkerPlacea","WUUnit_upgradea","UI_AutoMatcha","UButtongenericb","UButtongenericd","MUAliUL_movLoopa","MUAliLi_movLoopa","MUAliMe_movLoopa","MUAliHe_movLoopa","MUAliUH_movLoopa","MUAliUL_movStarta","MUAliUL_movStartb","MUAliUL_movStartc","MUAliLi_movStarta","MUAliLi_movStartb","MUAliLi_movStartc","MUAliMe_movStarta","MUAliMe_movStartb","MUAliMe_movStartc","MUAliHe_movStarta","MUAliHe_movStartb","MUAliHe_movStartc","MUAliUH_movStarta","MUAliUH_movStartb","MUAliUH_movStartc","MUAliUL_voiSelecta","MUAliUL_voiSelectb","MUAliUL_voiSelectc","MUAliLi_voiSelecta","MUAliLi_voiSelectb","MUAliLi_voiSelectc","MUAliMe_voiSelecta","MUAliMe_voiSelectb","MUAliMe_voiSelectc","MUAliHe_voiSelecta","MUAliHe_voiSelectb","MUAliHe_voiSelectc","MUAliUH_voiSelecta","MUAliUH_voiSelectb","MUAliUH_voiSelectc","MUAliUL_voiSelecta","MUAliUL_voiSelectb","MUAliUL_voiSelectc","MUAliLi_voiSelecta","MUAliLi_voiSelectb","MUAliLi_voiSelectc","MUAliMe_voiSelecta","MUAliMe_voiSelectb","MUAliMe_voiSelectc","MUAliHe_voiSelecta","MUAliHe_voiSelectb","MUAliHe_voiSelectc","MUAliUH_voiSelecta","MUAliUH_voiSelectb","MUAliUH_voiSelectc","GURifle_moveG1L2a","GURifle_moveG1L2b","GURifle_moveG1L2c","GURifle_moveG1L2d","GURifle_moveG1L2e","GURifle_moveG1L2f","GURifle_moveG1L2g","GURepai_moveBya","GURepai_moveByb","GURepai_moveByc","GURepai_moveByd","GURepai_moveBye","GUShatt_moveBya","GUShatt_moveByb","GUShatt_moveByc","GUShatt_moveByd","GUShatt_moveBye","GUShatt_moveByf","GUSling_moveBya","GUSling_moveByb","GUSling_moveByc","GUSling_moveByd","GUSling_moveBye","GUSling_moveByf","GUSling_moveByg","NUFlame_moveLoopa","NUFlame_moveLoopb","NUFlame_moveLoopc","NUFlame_moveLoopd","NUFlame_moveLoope","NUFlame_moveLoopf","NUFlame_moveLoopg","NUFlame_moveLooph","NUFlame_moveLoopi","GUGuard_moveStara","GUGuard_moveStarb","GUGuard_moveStarc",
	"GUGuard_moveStard","GUGuard_moveStare","GUGuard_moveStarf","GUGuard_moveStarg","GUGuard_moveStarh","GUGuard_moveStari","GUGuard_moveStarj","GUPreda_moveStara","GUPreda_moveStarb","GUPreda_moveStarc","GUPreda_moveStard","GUPreda_moveStare","GUPreda_moveStarf","GUPreda_moveStarg","GUPreda_moveStarh","GUPreda_moveStari","GUSling_moveStara","GUSling_moveStarb","GUSling_moveStarc","GUSling_moveStard","GUSling_moveStare","GUSling_moveStarf","GUSling_moveStarg","GUMammo_moveStara","GUMammo_moveStarb","GUMammo_moveStarc","GUMammo_moveStard","GUMammo_moveStare","GUMammo_moveStarf","GUMammo_moveStarg","GUMammo_moveStarh","MUGdiUL_voicSelea","MUGdiUL_voicSeleb","MUGdiUL_voicSelec","MUGdiLi_voicSelea","MUGdiLi_voicSeleb","MUGdiLi_voicSelec","MUGdiMe_voicSelea","MUGdiMe_voicSeleb","MUGdiMe_voicSelec","MUGdiHe_voicSelea","MUGdiHe_voicSeleb","MUGdiHe_voicSelec","MUGdiUH_voicSelea","MUGdiUH_voicSeleb","MUGdiUH_voicSelec","MUGdiUL_voicSelea","MUGdiUL_voicSeleb","MUGdiUL_voicSelec","MUGdiLi_voicSelea","MUGdiLi_voicSeleb","MUGdiLi_voicSelec","MUGdiMe_voicSelea","MUGdiMe_voicSeleb","MUGdiMe_voicSelec","MUGdiHe_voicSelea","MUGdiHe_voicSeleb","MUGdiHe_voicSelec","MUGdiUH_voicSelea","MUGdiUH_voicSeleb","MUGdiUH_voicSelec","GUGrena_moveG1L2a","GUGrena_moveG1L2b","GUGrena_moveG1L2c","GUGrena_moveG1L2d","GUGrena_moveG1L2e","GUGrena_moveG1L2f","GUGrena_moveG1L2g","GUGrena_moveG1L2h","GUGrena_moveG1L2i","GUGrena_moveG1L2j","GUGrena_moveG1L2k","GUGrena_moveG1L2l","GUGrena_moveG1L2m","GUGrena_moveG1L2n","GUGrena_moveG1L2o","GUGrena_moveG1L2p","GUGrena_moveG1L2q","NURecko_moveBya","NURecko_moveByb","NURecko_moveByc","NURecko_moveByd","NURecko_moveBye","NURecko_moveByf","NURecko_moveByg","NUSpect_moveBya","NUSpect_moveByb","NUSpect_moveByc","NUSpect_moveByd","NUSpect_moveBye","NUSpect_moveByf","NUSpect_moveByg","NUSpect_moveByh","NUSpect_moveByi","NUSpect_moveByj","NUFlame_moveLoopa","NUFlame_moveLoopb","NUFlame_moveLoopc","NUFlame_moveLoopd","NUFlame_moveLoope","NUFlame_moveLoopf","NUFlame_moveLoopg","NUFlame_moveLooph","NUFlame_moveLoopi","NUFlame_moveLoopa","NUFlame_moveLoopb","NUFlame_moveLoopc","NUFlame_moveLoopd","NUFlame_moveLoope","NUFlame_moveLoopf","NUFlame_moveLoopg","NUFlame_moveLooph","NUFlame_moveLoopi","NURaide_moveStara","NURaide_moveStarb","NURaide_moveStarc","NURaide_moveStard","NURaide_moveStare","NURaide_moveStarf","NUScorp_moveStara","NUScorp_moveStarb","NUScorp_moveStarc","NUScorp_moveStard","NUScorp_moveStare","NUScorp_moveStarf","NUScorp_moveStarg","NUScorp_moveStarh","NUSpect_moveStara","NUSpect_moveStarb","NUSpect_moveStarc","NUSpect_moveStard","NUSpect_moveStare","NUSpect_moveStarf","NUSpect_moveStarg","NUAvata_moveStara","NUAvata_moveStarb","NUAvata_moveStarc","NUAvata_moveStard","NUAvata_moveStare","NUAvata_moveStarf","MUNodUL_voicSelea","MUNodUL_voicSeleb","MUNodUL_voicSelec","MUNodLi_voicSelea","MUNodLi_voicSeleb","MUNodLi_voicSelec","MUNodMe_voicSelea","MUNodMe_voicSeleb","MUNodMe_voicSelec","MUNodHe_voicSelea","MUNodHe_voicSeleb","MUNodHe_voicSelec","MUNodUH_voicSelea","MUNodUH_voicSeleb","MUNodUH_voicSelec","MUNodUL_voicSelea","MUNodUL_voicSeleb","MUNodUL_voicSelec","MUNodLi_voicSelea","MUNodLi_voicSeleb","MUNodLi_voicSelec","MUNodMe_voicSelea","MUNodMe_voicSeleb","MUNodMe_voicSelec","MUNodHe_voicSelea","MUNodHe_voicSeleb","MUNodHe_voicSelec","MUNodUH_voicSelea","MUNodUH_voicSeleb","MUNodUH_voicSelec","MBCity_ambienca","MBCity_ambiencb","MBCity_ambiencc","MBCity_ambiencd","MBCity_ambience","MBCity_ambiencf","MBCity_ambiencg","MBCity_ambiench","MBCity_ambienci","MBCity_airporta","MBCity_airportb","MBCity_airportc","MBCity_voxa","MBCity_scrapea","MBCity_sirena","MBCity_sirenb","MBCity_sirenc","MBCity_sirend","MBCity_fogHorna","MBCity_fogHornb","MBCity_fogHornc","MBCity_fogHornd","MBCity_harbora","MBCity_harborb","MBCity_harborc","TOW_InitialFlashOpen_LR","TOW_MissionsAppear_LR","TOW_MouseOverMissions_LR","TOW_SelectMission_LR","TOW_SideBoxesOpen_LR","TOW_TerrainScan_LR","GUI_ShellClick","GUI_ShellClick","GUI_ShellClick","GUI_textblip1b",
	"UGlobal_scrolla","UGlobal_scrolla","UMouse_Overa_click","USelect_clickQuada","UButtongenericb","USelect_Unavailabled","UMouse_Overd","UMouse_Overc","UPanel_expand_Quada","UPanel_retract_Quada","UTitle_expand_Quada","UTitle_retract_Quada","UTitle_expand_Quada","UTitle_retract_Quada","UShell_transition_Quada","UTalkh_expand_Quada","UTalkh_expand_Quada","UShell_FocuQuada","UShell_FocuTabQuada","UShell_starPoina","UShell_FocuQuada","UShell_loadQuada","UMouse_Overb","UMouse_Overa","USUDS_Expanda","USUDS_Expanda","USUDS_Expanda","USUDS_Expanda","USUDS_scroUDLRa","USUDS_scroUDLRa","USelect_clickQuadb","USelect_Unavailabled","UButtonselectb","UPowerButtona","GUI_textblip1b","GUI_textblip1b","UObject_comple_Quada","UObject_comple_Quada","UObject_comple_Quada"
}

VoiceSounds={}

-----------------------------------------------------------------------------
------------OBJECTS TABLES---------------------------------------------------
-----------------------------------------------------------------------------

ObjectTypeTable={ 
	"AlienEMP","AlienAnnihilatorTripod","AlienAssimilator","AlienBlinkMastermind","AlienBlueShardProjectile","AlienBlueShardProjectile_Veteran","AlienBuzzerHive","AlienBuzzers","AlienControlCenter","AlienCorrupter","AlienCustomizableVehicle","AlienPlasmaDisk","AlienPlasmaDisk_Veteran","AlienDevastatorWarship","AlienDevourerTank","AlienEradicatorPlasmaDiskLrg_VeteranG","AlienEradicatorPlasmaDiskLrgG","AlienTibShardProjectile",
	"AlienTibShardProjectile_Veteran","AlienEradicatorHexapod","AlienExplorer","AlienFoundry","AlienGateway","AlienGunWalker","AlienHarvester","AlienMastermind","AlienMCV","AlienPhotonCannonProjectile","AlienPhotonCannon","BlackHandCrane","BlackHandDropZone","BlackHandEmissary","NODHandOfNodBallProjectile","BlackHandHandOfNOD","BlackHandHangar","BlackHandLaserCannonSpawn","NODLaserCannonSpawn","BlackHandLaserCannon","BlackHandObelisk",
	"BlackHandOperationsCenter","BlackHandPowerPlant","BlackHandPropagandaTower","BlackHandRefinery","NODRocketBunkerSpawnTibCoreProjectile","NODRocketBunkerSpawnWeaponProjectile","BlackHandRocketBunkerSpawn","NODRocketBunkerSpawn","BlackHandRocketBunker","BlackHandSecretShrine","NODShredderTurretShell","BlackHandShredderTurret","BlackHandShredderTurretHub","BlackHandTechAssemblyPlant","BlackHandTempleOfNOD","BlackHandTiberiumLiquidationFacility",
	"BlackHandTiberiumSilo","MarkedOfKaneAirSupport","MarkedOfKaneCrane","MarkedOfKaneDisruptionTower","MarkedOfKaneDropZone","MarkedOfKaneEmissary","MarkedOfKaneHandOfNOD","MarkedOfKaneHangar","MarkedOfKaneLaserCannonSpawn","MarkedOfKaneLaserCannon","MarkedOfKaneObelisk","NODCloakingFieldInfantryDeathProjectile","MarkedOfKaneOperationsCenter","MarkedOfKanePowerPlant","MarkedOfKanePropagandaTower","MarkedOfKaneRefinery","MarkedOfKaneRocketBunkerSpawn",
	"MarkedOfKaneRocketBunker","MarkedOfKaneSecretShrine","MarkedOfKaneShredderTurret","MarkedOfKaneShredderTurretHub","MarkedOfKaneTechAssemblyPlant","MarkedOfKaneTempleOfNOD","MarkedOfKaneTiberiumLiquidationFacility","MarkedOfKaneTiberiumSilo","MG_Alien_Hive","AlienPlanetaryAssaultCarrier","AlienPlasmaMissileBattery","AlienPortal","AlienPowerProjector","AlienRazorDroneSquad","AlienReactor","AlienRiftGenerator","AlienSeekerTank",
	"AlienShockTrooperSquad","AlienSignalTransmitter","AlienSporePod","AlienStalkerSquad","AlienStatisChamber","AlienStormColumn","AlienStormrider","AlienTiberiumTower","AlienWarpBeacon","ArtilleryShroudRevealer","NODAttackBikeRocketProjectile","NODAttackBikeRocketProjectile_Veteran","NODAttackBikeTibCoreProjectile","NODAttackBikeTibCoreProjectile_Veteran","BlackHandAttackBike","BlackHandBeamCannon","BlackHandBlackHandSquad",
	"BlackHandBunkerTruck","BlackHandCommando","BlackHandConfessorSquad","BlackHandCustomWarmech","BlackHandFanaticSquad","NODBlackHandFlamerProjectile","BlackHandFlameTank","BlackHandHarvester","BlackHandMCV","NODStealthTankRocketProjectile","NODStealthTankRocketProjectile_Veteran","BlackHandMetaUnit","BlackHandMilitantRocketSquad","BlackHandMilitantSquad","NodMobileArtilleryShell","NodMobileArtilleryShell_Veteran","BlackHandMobileArtillery",
	"FXTankShell02_Veteran","NodTankShell","BlackHandRaiderTank","BlackHandSaboteur","BlackHandScorpionBuggy","BlackHandTankRocketProjectile","BlackHandTankRocketProjectile_Veteran","BlackHandTankTibCoreProjectile","BlackHandTankTibCoreProjectile_Veteran","BlackHandStealthTank","BlackHandVenom","FXArtilleryShell","FXArtilleryShell_Veteran","FXTankShell","FXTankShell_Veteran","FXTankShell02","GDIAABattery","GDIAAScout","GDIAirSupport",
	"GDIAirTower","GDIAPC","GDIArmory","GDIBarracks","MG_BlackHand_WarmechFacility","GDICommando","GDICommandPost","GDICrane","GDIEngineer","GDIFirehawkBombProjectile","GDIFirehawkBombProjectile_Veteran","GDIFirehawkMissileProjectile","GDIFirehawkMissileProjectile_Veteran","GDIFireHawk","GDIGolumCannon","GDIGrenadeSoldierSquad","GDIHammerhead","GDIHarvester","GDIIonCannonControl","GDIJuggernaughtBombardShell","GDIJuggernaught",
	"GDIMammothRocketPodMissileProjectile","GDIMammothRocketPodMissileProjectile_Veteran","GDIMammoth","MARVGrenadeSoldierWeaponProjectile","MARVSonicShell","MARVSonicShell_Veteran","ZoneRaiderSonicRifleProjectile","ZoneRaiderSonicRifleProjectile_Veteran","GDIMARV","GDIMCV","GDIMedicalBay","GDIMissileSoldierMissileProjectile","GDIMissileSoldierMissileProjectile_Veteran","GDIMissileSoldierSquad","GDIOrcaMissileProjectile",
	"GDIOrcaMissileProjectile_Veteran","GDIOrcaSensorPodProjectile","GDIOrca","GDIOrcaECHOProjectile","GDIOrcaECHOProjectile_Veteran","GDIPitBullArtilleryProjectile","GDIPitbull","GDIPowerPlant","GDIPredator","GDIRefinery","MG_GDI_ReclamatorHub","GDIRifleSoldierSquad","GDIRig","GDISniperSquad","GDISonicTank","GDISpaceCommandUplink","GDISurveyor","GDITerraformingStation","GDITiberiumSilo","GDIWallHub","GDIWarFactory",
	"GDIWatchTower","GDIZoneTrooperSquad","MarkedOfKaneAttackBike","MarkedOfKaneAvatar","MarkedOfKaneBeamCannon","MarkedOfKaneBunkerTruck","MarkedOfKaneCommando","MarkedOfKaneFanaticSquad","MarkedOfKaneHarvester","MarkedOfKaneImprovedCyborgInfantrySquad","MarkedOfKaneMCV","MarkedOfKaneMetaUnit","MarkedOfKaneMilitantRocketSquad","MarkedOfKaneMilitantSquad","MarkedOfKaneMobileArtillery","MarkedOfKaneRaiderTank","MarkedOfKaneSaboteur",
	"MarkedOfKaneScorpionBuggy","MarkedOfKaneShadowSquad","NODStealthTankTibCoreProjectile","NODStealthTankTibCoreProjectile_Veteran","MarkedOfKaneStealthTank","MarkedOfKaneTibTrooperSquad","MarkedOfKaneVenom","NODVertigoBombProjectile","NODVertigoBombProjectile_Veteran","NODVertigoDisruptionPodProjectile","MarkedOfKaneVertigo","MG_MarkedOfKane_WarmechFacility","MG_NOD_WarmechFacility","MG_Reaper17_Hive","MG_SteelTalons_ReclamatorHub",
	"MG_Traveler59_Hive","MG_ZOCOM_ReclamatorHub","MOKCyborgInfantrySquad","MutantMarauderSquad","NODAirSupport","NODAttackBike","NODAvatar","NODBeamCannon","NODBlackHandSquad","NODBunkerTruck","NODCommando","NODCrane","NODCyborgInfantrySquad","NODDisruptionTower","NODDropZone","NODEmissary","NODFanaticSquad","NODFlameTank","NODHandOfNOD","NODHangar","NODHarvester","NODLaserCannon","NODMCV","NODMetaUnit","NODMilitantRocketSquad",
	"NODMilitantSquad","NODMobileArtillery","NODObelisk","NODOperationsCenter","NODPowerPlant","NODPropagandaTower","NODRaiderTank","NODRefinery","NODRocketBunker","NODSaboteur","NODScorpionBuggy","NODSecretShrine","NODShadowSquad","NODShredderTurret","NODStealthTank","NODVenom","NODVertigo","NODWallHub","Reaper17AnnihilatorTripod","Reaper17BuzzerHive","Reaper17ControlCenter","Reaper17Corrupter","Reaper17CustomizableVehicle",
	"Reaper17DevourerTank","Reaper17EradicatorHexapod","Reaper17Explorer","Reaper17Foundry","Reaper17Gateway","Reaper17GrowthStimulator","Reaper17Harvester","Reaper17MCV","Reaper17PhotonCannon","Reaper17PlasmaMissileBattery","Reaper17Portal","Reaper17PowerProjector","Reaper17Reactor","Reaper17RiftGenerator","Reaper17SeekerTank","Reaper17ShardWalker","Reaper17ShockTrooperSquad","Reaper17SignalTransmitter","Reaper17StalkerSquad",
	"Reaper17StasisChamber","Reaper17StormColumn","Reaper17Stormrider","Reaper17TiberiumTower","Reaper17WarpBeacon","SteelTalonsAABattery","SteelTalonsAAScout","SteelTalonsAirSupport","SteelTalonsAirTower","SteelTalonsBarracks","SteelTalonsBehemoth","SteelTalonsCombatEngineer","SteelTalonsCommandPost","SteelTalonsCrane","SteelTalonsFireHawk","SteelTalonsGolumCannon","SteelTalonsGrenadeSoldierSquad","SteelTalonsHammerhead",
	"SteelTalonsHeavyHarvester","SteelTalonsOverloadBeamProjectile","SteelTalonsImprovedSonicTank","SteelTalonsIonCannonControl","SteelTalonsMammoth","SteelTalonsMARV","SteelTalonsMCV","SteelTalonsMissileSoldierSquad","SteelTalonsOrca","SteelTalonsPitbull","SteelTalonsPowerPlant","SteelTalonsPredator","SteelTalonsRefinery","SteelTalonsRepairAPC","SteelTalonsRifleSoldierSquad","SteelTalonsRig","SteelTalonsSpaceCommandUplink",
	"SteelTalonsSurveyor","SteelTalonsTechCenter","SteelTalonsTerraformingStation","SteelTalonsTiberiumSilo","SteelTalonsTitan","SteelTalonsWarFactory","SteelTalonsWatchTower","SteelTalonsWolverine","SteelTalonsZoneTrooperSquad","Traveler59AnnihilatorTripod","Traveler59Assimilator","Traveler59BlinkMastermind","Traveler59BuzzerHive","Traveler59ControlCenter","Traveler59Corrupter","Traveler59CultistSquad","Traveler59CustomizableVehicle",
	"Traveler59DevastatorWarship","Traveler59EradicatorHexapod","Traveler59Explorer","Traveler59Foundry","Traveler59Gateway","Traveler59GunWalker","Traveler59Harvester","Traveler59MCV","Traveler59PhotonCannon","Traveler59PlanetaryAssaultCarrier","Traveler59PlasmaMissileBattery","Traveler59Portal","Traveler59PowerProjector","Traveler59RazorDroneSquad","Traveler59Reactor","Traveler59RiftGenerator","Traveler59SeekerTank",
	"Traveler59ShockTrooperSquad","Traveler59SignalTransmitter","Traveler59SporePod","Traveler59StalkerSquad","Traveler59StatisChamber","Traveler59StormColumn","Traveler59Stormrider","Traveler59TiberiumTower","Traveler59WarpBeacon","ZOCOMAABattery","ZOCOMAAScout","ZOCOMAirSupport","ZOCOMAirTower","ZOCOMAPC","ZOCOMArmory","ZOCOMBarracks","ZOCOMCommando","ZOCOMCommandPost","ZOCOMCrane","ZOCOMEngineer","ZOCOMFireHawk","ZOCOMGolumCannon",
	"ZOCOMGrenadeSoldierSquad","ZOCOMHammerhead","ZOCOMHarvester","ZOCOMImprovedSonicTank","ZOCOMIonCannonControl","ZOCOMJuggernaught","ZOCOMMammoth","ZOCOMMARV","ZOCOMMCV","ZOCOMMedicalBay","ZOCOMMissileSoldierSquad","ZOCOMOrca","ZOCOMPitbull","ZOCOMPowerPlant","ZOCOMPredator","ZOCOMRefinery","ZOCOMRifleSoldierSquad","ZOCOMRig","ZOCOMSniperSquad","ZOCOMSonicTank","ZOCOMSpaceCommandUplink","ZOCOMSurveyor","ZOCOMTerraformingStation",
	"ZOCOMTiberiumSilo","ZOCOMWarFactory","ZOCOMWatchTower","ZOCOMZoneRaiderSquad","NODShredderTurretHub","NODTechAssemblyPlant","NODTempleOfNOD","NODTiberiumLiquidationFacility","NODTiberiumSilo","ABAVTower","AlienAnnihilatorTripodHusk","AlienBuzzers_Slaved","AlienCrystalShield","ALIENDevastatorDebris_01","ALIENDevastatorDebris_02","ALIENDevastatorDebris_03","ALIENDevastatorDebris_04","ALIENDevastatorDebris_05","ALIENDevastatorDebris_06",
	"ALIENDevourerDebris_01","ALIENDevourerDebris_02","ALIENDevourerDebris_03","ALIENDevourerDebris_04","AlienDronePlatform","ALIENDroneShipDebris_01","ALIENDroneShipDebris_02","ALIENDroneShipDebris_03","ALIENDroneShipDebris_04","ALIENDroneShipDebris_05","ALIENDroneShipDebris_06","ALIENEradicatorDebris_01","ALIENEradicatorDebris_02","ALIENEradicatorDebris_03","ALIENEradicatorDebris_04","ALIENEradicatorDebris_05","ALIENEradicatorDebris_06",
	"ALIENEradicatorDebris_07","ALIENEradicatorDebris_08","ALIENEradicatorDebris_09","ALIENEradicatorDebris_10","AlienEradicatorPlasmaDiskLrg","AlienEradicatorPlasmaDiskLrg_Veteran","AlienGiantTiberiumRock","AlienGiantTiberiumRockFiringMechanism","AlienGiantTiberiumRockTiberiumField","ALIENHarvesterDebris_01","ALIENHarvesterDebris_02","ALIENHarvesterDebris_03","AlienInnerTiberiumRock","AlienInstantRepairProp","AlienInvaderFighter",
	"ALIENInvaderFighterDebris_01","ALIENInvaderFighterDebris_02","ALIENInvaderFighterDebris_03","AlienLightningSpike","AlienMCVUnpacking","AlienMillipedeBody","AlienMillipedeHead","AlienMiniMCVOutpost","AlienMiniTiberiumRock","AlienMiniTiberiumRock2","AlienMiniTiberiumRockFiringMechanism_01","AlienMiniTiberiumRockFiringMechanism_02","AlienMothership","AlienMotherShipBeamEffect100","AlienMotherShipBeamEffect25","AlienMotherShipBeamEffect50",
	"AlienMotherShipBeamEffect75","ALIENMotherShipDebris_01","ALIENMotherShipDebris_02","ALIENMotherShipDebris_03","ALIENMotherShipDebris_04","ALIENMotherShipDebris_05","ALIENMotherShipDebris_06","ALIENMotherShipDebris_07","ALIENMotherShipDebris_08","ALIENMotherShipDebris_09","ALIENMotherShipDebris_10","ALIENMotherShipDebris_11","ALIENMotherShipDebris_12","ALIENMotherShipDebris_13","ALIENMotherShipDebris_14","ALIENMotherShipDebris_15",
	"ALIENMotherShipDebris_16","ALIENMotherShipDebris_17","ALIENMotherShipDebris_18","ALIENMotherShipDebris_19","ALIENMotherShipDebris_20","ALIENMotherShipDebris_21","ALIENMotherShipDebris_22","ALIENMotherShipDebris_23","ALIENMotherShipDebris_24","ALIENMotherShipDebris_25","ALIENMotherShipDebris_26","ALIENMotherShipDebris_27","ALIENMotherShipDebris_28","ALIENOutSideRock1","ALIENOutSideRock6","ALIENOutSideRock8","ALIENPACDebris_01",
	"ALIENPACDebris_02","ALIENPACDebris_03","ALIENPACDebris_04","ALIENPACDebris_05","ALIENPACDebris_06","ALIENPACDebris_07","AlienPlasmaCannon","AlienRazorDrones","AlienReconstructionBaseSpawned","AlienRepairAircraftDrone","AlienRepairDrone","AlienRepairDroneSpawned","AlienRepairDroneTower","AlienSeedTiberiumLaserFX","ALIENSeekerDebris_01","ALIENSeekerDebris_02","ALIENSeekerDebris_03","ALIENSeekerDebris_04","AlienShockTrooper",
	"AlienShockTrooperSquad_Veteran","AlienTibAgitationProjectile","AlienStalker","ALIENStormRiderDebris_01","ALIENStormRiderDebris_02","ALIENStormRiderDebris_03","ALIENSurveyorDebris_01","ALIENSurveyorDebris_02","ALIENSurveyorDebris_03","AlienTiberiumFieldSeeded","AlienTibHive","ALIENTripodDebris_01","ALIENTripodDebris_02","ALIENTripodDebris_03","ALIENTripodDebris_04","AlienWormHole","AlienWormHoleMarker","AlienZeusPlasmaDisk",
	"BlackHandBlackDisciple","BlackHandBlackHand","BlackHandBunkerTruck_Veteran","NODConfessorGrenadeProjectile","BlackHandConfessor","BlackHandConstructionYard","BlackHandCustomWarmechHusk","BlackHandDecoyTempleOfNOD","BlackHandFanatic","BlackHandLaserCannonSpawnHole","BlackHandMilitant","BlackHandMilitantB","NODMilitantRocketWeaponProjectile","NODMilitantRocketWeaponProjectile_Veteran","BlackHandMilitantRocket","BlackHandMiniMCVOutpost",
	"BlackHandPowerStore","BlackHandRocketBunkerSpawnHole","BlackHandShredderTurretSpawnHole","BlackHandVertigo","CivilianTransport","ClusterBombSeed","CorruptedInfantry","EMPField","FXBattleShipShell","FXMammothRocketPodMissile","FXMammothRocketPodMissile_Veteran","GDIAATankDebris_01","GDIAATankDebris_02","GDIAATankDebris_03","GDIAATankDebris_04","GDIAATankDebris_05","GDIAirstrikeOrcaWeaponProjectile","GDIAirstrikeSPBombingRunTarget",
	"GDIAirstrikeSPBombingRunTrigger","GDIAPC_Veteran","GDIAPCDebris_01","GDIAPCDebris_02","GDIAPCDebris_03","GDIAPCDebris_04","GDIAPCDebris_05","GDIBattleBaseMissileProjectile","GDIBattleBase","GDIBattleBaseRepairDrone","GDIBattleshipBombardMissile","GDIBombingRunBeacon","GDIBombingRunOrcaWeaponProjectile","GDICommandPostRadarScanPing","GDICommandPostRadarScanPingEffect","GDIConstructionYard","GDIDigInBuilding","GDIDigInBuildingPlaceholder",
	"GDIDropPod","GDIDropPod_DR01","GDIDropPod_DR02","GDIDropPod_DR03","GDIDropPodBeacon","GDIDropShipDebris_01","GDIDropShipDebris_02","GDIDropShipDebris_03","GDIDropShipDebris_04","GDIDropShipDebris_05","GDIFireHawkDebris_01","GDIFireHawkDebris_02","GDIFireHawkDebris_03","GDIFireHawkDebris_04","GDIFirehawkMissileFragmentProjectile","GDIFuelDepot","GDIGrenadeSoldierEMPGrenadeProjectile","GDIGrenadeSoldierGrenadeProjectile",
	"GDIGrenadeSoldierGrenadeProjectile_Veteran","GDIGrenadeSoldier","GDIHammerheadDebris_01","GDIHammerheadDebris_02","GDIHammerheadDebris_03","GDIHammerheadDebris_04","GDIHammerheadDebris_05","GDIHarvesterDebris_01","GDIHarvesterDebris_02","GDIHarvesterDebris_03","GDIHarvesterDebris_04","GDIHarvesterDebris_05","GDIHvyHarvesterDebris_01","GDIHvyHarvesterDebris_02","GDIHvyHarvesterDebris_03","GDIHvyHarvesterDebris_04","GDIHvyHarvesterDebris_05",
	"GDIJuggDebris_01","GDIJuggDebris_02","GDIJuggDebris_03","GDIJuggDebris_04","GDIJuggernaughtHusk","GDIJuggernaughtRocketPodProjectile","GDIMARVDebris_01","GDIMARVDebris_02","GDIMARVDebris_03","GDIMARVDebris_04","GDIMARVDebris_05","GDIMARVDebris06","GDIMARVDebris07","GDIMARVDebris08","GDIMARVDebris09","GDIMARVDebris10","GDIMCVDebris_01","GDIMCVDebris_02","GDIMCVDebris_03","GDIMCVDebris_04","GDIMCVDebris_05","GDIMechanic","GDIMine","GDIMiniMCVOutpost",
	"GDIMiniOrca","GDIMiniOrcaDebris_01","GDIMiniOrcaDebris_02","GDIMiniOrcaDebris_03","GDIMiniOrcaDebris_04","GDIMiniOrcaDebris_05","GDIMissileSoldier","GDIMissileSoldierMissileFragmentProjectile","GDIMissileSoldierSquad_Veteran","GDIMjolnirStrikeBeacon","GDIMjolnirStrikeProjectile","GDIMjolnirStrikeProjectileStrike","GDIMRTDebris_01","GDIMRTDebris_02","GDIMRTDebris_03","GDIMRTDebris_04","GDIMRTDebris_05","GDINukeSeed","GDIOrca_Airstrike","GDIOrca_BombingRun",
	"GDIOrcaDebris_01","GDIOrcaDebris_02","GDIOrcaDebris_03","GDIOrcaDebris_04","GDIOrcaDebris_05","GDIOrcaDebris_06","GDIOrcaPulseScanPing","GDIOrcaSensorPod","GDIOrcaSensorStickyPod","GDIPitbull_Veteran","GDIPitBullDebris_01","GDIPitBullDebris_02","GDIPitBullDebris_03","GDIPitBullDebris_04","GDIPitBullDebris_05","GDIPitBullDebris_06","GDIPitBullDebris_07","GDIPredatorDebris_01","GDIPredatorDebris_02","GDIPredatorDebris_03","GDIPredatorDebris_04",
	"GDIPredatorDebris_05","GDIRaiderTankDebris_01","GDIRaiderTankDebris_02","GDIRaiderTankDebris_03","GDIRaiderTankDebris_04","GDIRaiderTankDebris_05","GDIRailgunAcceleratorPowerSucker","GDIRepairAircraftDrone","GDIRepairDrone","GDIRifleSoldier","GDIRifleSoldierSquad_Veteran","GDIRigDebris_01","GDIRigDebris_02","GDIRigDebris_03","GDIRigDebris_04","GDIRigDebris_05","GDIShattererDebris_01","GDIShattererDebris_02","GDIShattererDebris_03","GDIShattererDebris_04",
	"GDIShockwaveArtilleryBeacon","GDIShockwaveArtilleryFX","GDIShockwaveArtillerySeed","GDISniper","GDISniperSquad_Veteran","GDISonicShockWaveCannonProjectile","GDISpaceCommandShockwaveProjectile","GDISpotter","GDIStealthTankDebris_01","GDIStealthTankDebris_02","GDIStealthTankDebris_03","GDIStealthTankDebris_04","GDIStealthTankDebris_05","GDISuperSonicAirAttack","GDISuperSonicAirAttackBeacon","GDISUVDebris_01","GDISUVDebris_02","GDISUVDebris_03","GDISUVDebris_04",
	"GDISUVDebris_05","GDITerraformingStationIonStormKiller","GDIV35Ox","GDIV35Ox_CallSupportBloodhound","GDIV35Ox_CallSupportBloodhound_APC","GDIV35Ox_CallSupportGDIAirborne","GDIV35Ox_CallSupportGDIAirborneRockets","GDIV35Ox_CallSupportHunterKillerTeam","GDIV35Ox_Summoned","GDIV35Ox_SummonedForVehicle","GDIWallSegment","GDIWatchTowerGunProjectile","GDIZoneTrooper","GDIZoneTrooperSquad_Veteran","HealCrateMP","MoneyCrateMP","VeterancyCrateMP","GenericCrateSpawner",
	"GenericRadarSupplier","GenericTreeCrusher","IonCannonEffect","IonStorm","IonStormTemporary","LiquidTiberiumTransport","MammothDebris_01","MammothDebris_02","MammothDebris_03","MammothDebris_04","MammothDebris_05","NODMineBombProjectile","MarkedOfKane_DeployMagneticMines","MarkedOfKaneAvatarHusk","MarkedOfKaneConstructionYard","MarkedOfKaneFanatic","NODEMPBlastProjectile","MarkedOfKaneImprovedCyborgInfantry","MarkedOfKaneLaserCannonSpawnHole",
	"MarkedOfKaneMagneticMine","MarkedOfKaneMilitantRocket","MarkedOfKaneMiniMCVOutpost","MarkedOfKanePowerStore","MarkedOfKaneRocketBunkerSpawnHole","NODShadowSquadBeaconProjectile","MarkedOfKaneShadow","MarkedOfKaneShredderTurretSpawnHole","MarkedOfKaneTibTrooper","MG_Alien_LifeFormPlant","MG_Alien_TerraformingNexus","MG_Alien_Tower","MG_GDI_ASATDefense","MG_GDI_IntelCenter","MG_GDI_TiberiumProcessingPlant","MG_NOD_DisruptionGenerator",
	"MG_NOD_TemplePrime","MG_NOD_TiberiumForge","Misc_Flare","Misc_Flare02","Misc_Flare03","Misc_Flare04","MOKCyborgInfantry","MultiplayerBeacon","MutantMarauder","NeutralTransportDebris_01","NeutralTransportDebris_02","NeutralTransportDebris_03","NeutralTransportDebris_04","NeutralTransportDebris_05","NeutralTransportDebris_06","NeutralTransportDebris_07","NeutralViceroidSpittleWeaponProjectile","NODArmageddonBomber","NODArmageddonBomberDebris_01",
	"NODArmageddonBomberDebris_02","NODArmageddonBomberDebris_03","NODArmageddonBomberDebris_04","NODArmageddonBomberDebris_05","NODAttackBikeDebris_01","NODAttackBikeDebris_02","NODAttackBikeDebris_03","NODAttackBikeDebris_04","NODAttackBikeDebris_05","NODAttackBikeDebris_06","NODAvatarDebris_01","NODAvatarDebris_02","NODAvatarDebris_03","NODAvatarHusk","NODBeamDebris_01","NODBeamDebris_02","NODBeamDebris_03","NODBeamDebris_04","NODBeamTarget","NODBlackHand",
	"NODBlackHandStealthTankDebris_01","NODBlackHandStealthTankDebris_02","NODBlackHandStealthTankDebris_03","NODBlackHandStealthTankDebris_04","NODBlackHandStealthTankDebris_05","NODBlackHandStealthTankDebris_06","NODBlackHandStealthTankDebris_07","NODBridgeBoobyTrap","NODBuildingBoobyTrap","NODBunkerTruckDebris_01","NODBunkerTruckDebris_02","NODBunkerTruckDebris_03","NODBunkerTruckDebris_04","NODCarryall","NODCarryAllDebris_01","NODCarryAllDebris_02",
	"NODCarryAllDebris_03","NODCarryAllDebris_04","NODCarryAllDebris_05","NODCarryAllDebris_06","NODCarryallInfantry","NODCarryallVehicle","NODCatalystMissile","NODCatalystMissileBeacon","NODCatalystMissileSeed","NODCatalystSeed","NODConfessor","NODConstructionYard","NODCyborgInfantry","NODExplosiveCharge","NODFanatic","NODFlameTankDebris_01","NODFlameTankDebris_02","NODFlameTankDebris_03","NODFlameTankDebris_04","NODFlameTankDebris_05","NODFuelAirDummyProjectile",
	"NODFuelAirProjectile","NODHarbingerDebris_01","NODHarbingerDebris_02","NODHarbingerDebris_03","NODHarvesterDebris_01","NODHarvesterDebris_02","NODHarvesterDebris_03","NODHarvesterDebris_04","NODHarvesterDebris_05","NODHuskBoobyTrap","NODLaserCannonSpawnHole","NODMarcionTransportDebris_01","NODMarcionTransportDebris_02","NODMarcionTransportDebris_03","NODMarcionTransportDebris_04","NODMarcionTransportDebris_05","NODMarcionTransportDebris_06","NODMarcionTransportDebris_07",
	"NODMarcionTransportDebris_08","NODMetaUnitDebris_01","NODMetaUnitDebris_02","NODMetaUnitDebris_03","NODMetaUnitDebris_04","NODMetaUnitDebris_05","NODMetaUnitDebris_06","NODMetaUnitDebris_07","NODMetaUnitDebris_08","NODMetaUnitDebris_09","NODMetaUnitDebris_10","NODMGAct1PowerStore","NODMilitant","NODMilitantB","NODMilitantRocket","NODMine","NODMiniMCVOutpost","NODNukeSeed","NODRedemptionAnimator","NODRedemptionMaker","NODRepairAircraftDrone","NODRepairDrone",
	"NODRocketBunkerSpawnHole","NODScorpionBuggyDebris_01","NODScorpionBuggyDebris_02","NODScorpionBuggyDebris_03","NODScorpionBuggyDebris_04","NODScorpionBuggyDebris_05","NODScorpionBuggyDebris_06","NODSeedTiberiumBeacon","NODSeedTiberiumProjectile","NODShadow","NODShadowSquad_Veteran","NODShadowSquadBeacon","NODShredderTurretSpawnHole","NodStealthArtilleryDebris_01","NodStealthArtilleryDebris_02","NodStealthArtilleryDebris_03","NodStealthArtilleryDebris_04",
	"NodStealthArtilleryDebris_05","NODSurveyorDebris_01","NODSurveyorDebris_02","NODSurveyorDebris_03","NODSurveyorDebris_04","NODSurveyorDebris_05","NODTechBuildingBoobyTrap","NODTiberiumVaporBeacon","NODVeinDetonation","NODVenomDebris_01","NODVenomDebris_02","NODVenomDebris_03","NODVenomDebris_04","NODVenomDebris_05","NODVenomDebris_06","NODVertigo_AirDispersion","NODVertigo_DeployMines","NODVertigo_SeedTiberium","NODVertigo_SPBombingRunTarget",
	"NODVertigoBomberDebris_01","NODVertigoBomberDebris_02","NODVertigoBomberDebris_03","NODVertigoDisruptionPod","NODVertigoDisruptionStickyPod","NODWallSegment","NukeTransport","NULTTransport","PlanetaryAssaultCarrierIonStorm","PlayerSpellBook","RallyPointMarker","Reaper17AnnihilatorTripodHusk","Reaper17DronePlatform","Reaper17MCVUnpacking","Reaper17MiniMCVOutpost","Reaper17Mothership","Reaper17ShockTrooper","Reaper17Stalker","ReinforcementBayDropship",
	"ReinforcementBayDropshipNOD","RiftGeneratorWeaponObject","SteelTalonsAPC","SteelTalonsAPC_Veteran","SteelTalonsBattleBase","SteelTalonsBehemothDebris_01","SteelTalonsBehemothDebris_02","SteelTalonsBehemothDebris_03","SteelTalonsBehemothDebris_04","SteelTalonsBehemothHusk","SteelTalonsConstructionYard","SteelTalonsGrenadeSoldier","SteelTalonsMiniMCVOutpost","SteelTalonsMissileSoldier","SteelTalonsMissileSoldierSquad_Veteran","SteelTalonsPitbull_Veteran",
	"SteelTalonsRepairAPC_Veteran","SteelTalonsRifleSoldier","SteelTalonsRifleSoldierSquad_Veteran","SteelTalonsSteelShattererDebris_01","SteelTalonsSteelShattererDebris_02","SteelTalonsSteelShattererDebris_03","SteelTalonsSteelShattererDebris_04","SteelTalonsV35Ox_Summoned","SteelTalonsV35Ox_SummonedForVehicle","SteelTalonsWolverine_Veteran","SteelTalonsZoneTrooper","SteelTalonsZoneTrooperSquad_Veteran","STV35Ox_CallSupportBloodhound","STV35Ox_CallSupportBloodhound_WOL",
	"SuperweaponDestroyCiviliansHumanelyObject","TiberiumCrystal","TiberiumCrystalBlue","TiberiumField","TiberiumFieldBlue","TiberiumFieldFromHarvesterDeath","TiberiumFieldFromTiberiumSilo","TiberiumFieldRedZone","TiberiumFieldSeeded","Traveler59AnnihilatorTripodHusk","Traveler59Cultist","Traveler59DronePlatform","Traveler59MCVUnpacking","Traveler59MiniMCVOutpost","Traveler59Mothership","Traveler59RazorDrone","Traveler59ShockTrooper","Traveler59Stalker",
	"Traveler59TemporalWormhole","VeinDetonationChunk","Viceroid","ZOCOMAPC_Veteran","ZOCOMAPCRepairDrone","ZOCOMBattleBase","ZOCOMConstructionYard","ZOCOMDropPod","ZOCOMDropPodBeacon","ZOCOMGrenadeSoldier","ZOCOMJuggernaughtHusk","ZOCOMMiniMCVOutpost","ZOCOMMissileSoldier","ZOCOMMissileSoldierSquad_Veteran","ZOCOMOrca_BombingRun","ZOCOMPitbull_Veteran","ZOCOMRepairAPC","ZOCOMRifleSoldier","ZOCOMRifleSoldierSquad_Veteran","ZOCOMSniper","ZOCOMSniperSquad_Veteran",
	"ZOCOMSpotter","ZOCOMV35Ox_CallSupportHunterKillerTeam","ZOCOMV35Ox_CallSupportZOCOMAirborne","ZOCOMV35Ox_CallSupportZOCOMAirborneRockets","ZOCOMV35Ox_CallSupportZOCOMBloodhound","ZOCOMV35Ox_CallSupportZOCOMBloodhound_APC","ZOCOMV35Ox_Summoned","ZOCOMV35Ox_SummonedForVehicle","ZoneRaiderMissileProjectile","ZoneRaiderMissileProjectile_Veteran","ZOCOMZoneRaider","ZOCOMZoneRaiderSquad_Veteran",
	"GuardShieldEmitter","MetaTechMCV","MetaTechSuperAvatar","MetaTechBarracks","MetaTechCommandPost","MetaTechConstructionYard","MetaTechCrane","MetaTechHangar","MetaTechMedicalBay","MetaTechReclamatorHub","MetaTechTechCenter","MetaTechWarFactory"
}

WorldBuilderObjectTypeTable={
	"ABTower","AF_Build01","AF_Build02","AF_Build03","AF_Build04","AF_Build05","AF_Build06","AF_Prop01","AF_Prop02","AF_Rock01","AF_Rock02","AF_Tree01","AF_Tree02","AF_Tree03","AF_Tree04","AF_Tree05","AF_Wall01","AF_Wall02","AGenericSound","AirstrikeRestrictor","AlienPowerStore","ALIENTripodDebris_05","Amb_AirportAnnouncement1","Amb_AirportAnnouncement2","Amb_AirportPlanesMS","Amb_AlarmKlaxon","Amb_BellBuoy","Amb_Birds1","Amb_Birds2","Amb_BirdsBuzzard","Amb_BirdsCrowMellow","Amb_BirdsCrowSimple","Amb_BirdsCrowSquak","Amb_BirdsCrowWeird",
	"Amb_BirdsDesert","Amb_BirdsFalcon1","Amb_BirdsFalcon2","Amb_BirdsMountain1","Amb_BirdsMountain2","Amb_BirdsOwl","Amb_BirdsSeagull","Amb_BirdsSeagull2","Amb_BoatDockedAtPier","Amb_CampFoley","Amb_ChimeJapanese","Amb_CitySkyline","Amb_Cornfield","Amb_CreatureBird1","Amb_CreatureHowl1","Amb_CreaturesLow1","Amb_CreaturesWhistle1","Amb_CricketsBed1Loop","Amb_CricketsBed2Loop","Amb_CricketSingleChirps1","Amb_CritterDesert1","Amb_CritterDesert2","Amb_DirtFall","Amb_Dog1Barks","Amb_Dog2Barks","Amb_Dog3Barks","Amb_FieldCalm","Amb_FireRubble",
	"Amb_FliesBuzzing","Amb_FogHornDelayedLoop","Amb_JunkGlass","Amb_JunkMetal","Amb_JunkWood","Amb_MetalCreak","Amb_MetalHit","Amb_OceanWaves1","Amb_RockTumbleMedium","Amb_SwampRonks","Amb_TentFlap1","Amb_TentFlap2","Amb_TiberiumGlacierLoopMS","Amb_TurbineWind","Amb_WaterCreek1Loop","Amb_WaterCreek2Loop","Amb_WaterDockLoop","Amb_Waterfall1Loop","Amb_Waterfall2Loop","Amb_WaterLakeLight1","Amb_WaterRiver1Loop","Amb_Wind1","Amb_WindCold1","Amb_WindMountain1","Amb_WoodCreak","Amb_WoodCreakTree1","Amb_WoodHit",
	"Amb_WoodShutter","AmbStream_BlueZone02_IndustrialNight_5point1","AmbStream_BlueZone03_Pristine_5point1","AmbStream_BlueZone04_Damaged_5point1","AmbStream_BlueZone06_Destroyed_5point1","AmbStream_BlueZone07_Apocalypse_5point1","AmbStream_BlueZoneA_5point1","AmbStream_BoatDockedAtPier","AmbStream_CitySkyline","AmbStream_FieldCalm","AmbStream_Metamap_CitySkyline","AmbStream_Rain1","AmbStream_RedZone02_Desolate_5point1","AmbStream_RedZone03_Rubble_5point1","AmbStream_RedZoneA_5point1","AmbStream_YellowZone01_Temperate_5point1",
	"AmbStream_YellowZone02_Desolate_5point1","AmbStream_YellowZone03_Rubble_5point1","AmbStream_YellowZone04_Bleach_5point1","AmbStream_YellowZone05_Jungle_5point1","AS_ITPPwr03","ASPcrate01","ASPcrate02","ASPcrate03","ASPcrate04","ASPFence01","ASPFence02","ASPFence03","ASPFence04","ASPFence05","ASPFence06","ASPFence07","ASPmilemark","ASPpwrline01","ASPrail01","ASPrail02","ASPrailcross","ASPruinbuild","ASPsculp01","ASPsculp02","ASPsculp03","ASPtrack01","ASPtrack02","ASPtrack03","ASPwatow","ASPwheel","ASRocks04","ASRocks05","ASRrocks01",
	"ASRrocks02","ASRrocks03","ASTdead01","ASTdead02","ASTdead02a","ASTdead03","ASTdead04","ASTdead05","ASTdead06","ASTshrub01","ASTshrub02","ASTshrub03","ASTshrub04","ASTtree01","Australian_Apartment_Building_01","Australian_Apartment_Building_02","Australian_Barn_01","Australian_Barn_02","Australian_Factory_01","Australian_Geodesic_Dome_01","Australian_Geodesic_Dome_02","Australian_Geodesic_Dome_03","Australian_Government_Building_01","Australian_Government_Building_02","Australian_Grocery_Store_01","Australian_Hotel_01","Australian_Hotel_02",
	"Australian_House_01","Australian_House_02","Australian_Office_Building_01","Australian_Office_Building_02","Australian_Opera_01","Australian_Outdoor_Mall_01","Australian_Warehouse_01","Australian_Warehouse_02","BlueZoneSkyA","BlueZoneSkyB","BlueZoneStormSkyA","Brazilian_Docks_01","Brazilian_Docks_02","Brazilian_Futuristic_Office_Building_01","Brazilian_Futuristic_Office_Building_02","Brazilian_Futuristic_Office_Building_03","Brazilian_Futuristic_Office_Building_04","Brazilian_Futuristic_Office_Building_05","Brazilian_Futuristic_Office_Building_06","Brazilian_Futuristic_Office_Building_07",
	"Brazilian_Hotel_01","Brazilian_Hotel_02","Brazilian_Mine_Building_01","Brazilian_Mine_Building_02","Brazilian_Oil_Platform_01","Brazilian_Oil_Platform_02","Brazilian_Resort_01","Brazilian_Shack_01","Brazilian_Shack_02","Brazilian_Shack_03","BRBRui01","BRBRui02","BRBRui03","BRBRui04","BRBWat01","Bridge1_Center","Bridge1_Center2","Bridge1_End","Bridge1_End2","Bridge1_GateHouse","Bridge1","Bridge1a","Bridge2_Center","Bridge2_Center2","Bridge2_End","Bridge2_End2","Bridge2_GateHouse","Bridge2","Bridge2a","Bridge3_Center","Bridge3_Center2","Bridge3_End","Bridge3_End2",
	"Bridge3_GateHouse","Bridge3","Bridge3a","BRPAuto01","BRPAuto02","BRPAuto03","BRPAuto04","BRPAuto05","BRPAuto06","BRPAuto07","BRPCrate01","BRPCrate02","BRPDebris01","BRPDebris02","BRPDebris03","BRPDebris04","BRPDebris05","BRPDump01","BRPDump02","BRPFence01","BRPFence02","BRPFence03","BRPFuel01","BRPOilWell02","BRPWheel01","BRRRocks01","BRRRocks02","BRRRocks03","BRTBush01","BRTBush02","BRTBush03","BRTBush04","BRTdead01","BRTshrub01","BRTshrub02","BRTshrub03","CaptureFlag","CBBBuy","CBCHBuild01","CBCHBuild02","CBCHBuild03","CBCHBuild04",
	"CBCHBuild05","CBCHBuild06","CBEgyApt01","CBEgyApt02","CBEgyClov01","CBEgyRuin01","CBEgyRuin02","CBEgyRuin03","CBEgyRuin04","CBEgyRuin05","CBEgyRuin06","CBEgySign01","CBEgyTent01","CBEgyTent02","CBEgyTent03","CBEgyUrba01","CBEgyUrba02","CBGreenhouse01","CBIrrigation01","CBIrrigation02","CBIrrigation03","CBIrrigation04","CBIrrigation05","CBIrrigation06","CBIrrigation07","CBmosque","CBRUBuild01","CBRUBuild02","CBRUBuild03","CBRUBuild04","CBRUBuild05","CBRUBuild06","CBWaterTank01","CDMTower","CHProp01","CHProp02","CHRock01","CHRock02","CHTree01",
	"CHTree02","CHTree03","CHTree04","CHTree05","CHWall01","CHWall02","CHWall03","CIChaingate","CIChainlink","CICone02","CIFreeway","CIFreeway02","CIFreeway03","CIMonorrail","CIMonoTrack","CINE_Bunker","CIPowerTower","CITollbooth","city_buildings2","citybuilding02","CityBuilding04","CityBuilding05","citybuildings2b","CityGarbageBin","CityGarbageCan","CityLight01","CityLight02","CityLight03","CityNewsStand","CitySidewalk","CitySign02","CitySign03","CitySign04","CitySign05","CitySign06","CityTree01","CityTree02","CityTree02b","CityTree02c","CivBunker","CivilianMale1","CivilianWallHub",
	"CivilianWallSegment","ClusterBombSeed","Coast_01","Coast_03","Coast02","ControlPoint","CrateDebris_01","CUAuto01","CUBird01","CUTrain01","DCBBarri01","DCBBrn01","DCBBuck01","DCBBun01","DCBBun02","DCBBurn01","DCBBurn02","DCBBurn03","DCBCargo01","DCBCargo02","DCBCargo03","DCBCargo04","DCBCargo05","DCBCargo06","DCBCargo07","DCBCargo08","DCBCargo09","DCBCargo10","DCBComme01","DCBCra01","DCBCra02","DCBDarMu01","DCBDoc02","DCBDock01","DCBDock02","DCBDock03","DCBDock04","DCBDock05","DCBDock06","DCBDock07","DCBDock08","DCBExecu01",
	"DCBGate01","DCBGateR01","DCBGre01","DCBMagLv_RZ01","DCBMagLv_RZ02","DCBMagLv_RZ03","DCBMagLv_RZ04","DCBMagLv_RZ05","DCBMagLv_RZ06","DCBMagLv_RZ07","DCBMagLv01","DCBMagLv02","DCBMagLv03","DCBMagLv04","DCBMagLv05","DCBMagLv06","DCBMagLv07","DCBOvP01","DCBOvP02","DCBOvP03","DCBOvP04","DCBOvP05","DCBOvP06","DCBParl","DCBPenta01","DCBPentaEn","DCBRuin01","DCBRuin02","DCBRuin03","DCBRuin04","DCBRuin05","DCBSen01","DCBSil01","DCBSil02","DCBTerr_RZ01","DCBTerr_RZ02","DCBTerr_RZ03","DCBTerr_RZ04","DCBTerr_RZ05","DCBTerr_RZ06",
	"DCBTerr01","DCBTerr01b","DCBTerr02","DCBTerr02b","DCBTerr03","DCBTerr04","DCBTerr05","DCBTerr06","DCBTreas01","DCBUrban01","DCBUrban02","DCBUrban03","DCBUrban04","DCBUrban05","DCBUrban06","DCBWhite01","DCBWhiteBan","DCBWhiteBan2","DCBWin01","DCPAuto01","DCPAuto02","DCPAuto03","DCPAuto04","DCPAuto05","DCPAuto06","DCPAuto07","DCPAuto08","DCPBarriR01","DCPBarriR02","DCPBench01","DCPBus","DCPCrane01","DCPDebris01","DCPDebris02","DCPDebris03","DCPDumpster01","DCPFarm01","DCPFarm02","DCPFence01","DCPFence02","DCPFence03","DCPFence04",
	"DCPFence05","DCPFence06","DCPFence07","DCPFence08","DCPFence09","DCPFence10","DCPFence11","DCPFence12","DCPFence13","DCPFence14","DCPFence15","DCPFence16","DCPFlag01","DCPFlag02","DCPFork01","DCPFount01","DCPGate01","DCPGrave01","DCPHavoc01","DCPHolo01","DCPHolo02","DCPHolo03","DCPHolo04","DCPHolo05","DCPHolo06","DCPHolo07","DCPHolo08","DCPIwoJi01","DCPLand01","DCPLonEye","DCPPark01","DCPPark02","DCPPark03","DCPPark04","DCPPhone","DCPPlanter01","DCPPylon01","DCPPylon02","DCPRef01","DCPRef02","DCPRef03","DCPRef04","DCPRef05","DCPRef06",
	"DCPRivWall","DCPRocSign","DCPSign_RZ01","DCPSign_RZ02","DCPSign01","DCPSign02","DCPSign03","DCPSign04","DCPSign05","DCPSign06","DCPSign07","DCPStatue01","DCPStrLi01","DCPStrLi02","DCPStrLi03","DCPStrLi04","DCPStrLi05","DCPStrLi06","DCPStrLi07","DCPStrSign_RZ01","DCPStrSign_RZ02","DCPStrSign_RZ03","DCPStrSign01","DCPStrSign02","DCPStrSign03","DCPSubway","DCPSupply01","DCPSupply02","DCPSupply03","DCPSupply04","DCPSupply05","DCPSupply06","DCPSupply07","DCPSupply08","DCPSupply09","DCPSupply10","DCPTarmac01","DCPTarmac02","DCPTarmac03",
	"DCPTarmac04","DCPTarmac05","DCPTarmac06","DCPTarmac07","DCPTerra01","DCPTireMarks01","DCPTireMarks02","DCPTireMarks03","DCPTireMarks04","DCPTireMarks05","DCPWall01","DCTBush01","DCTBush02","DCTBush03","DCTBush04","DCTBush05","DCTBush06","DCTBush07","DCTCrop01","DCTree01","DCTree02","DCTree03","DCTree04","DCTree05","DCTree05b","DCTree06","DefensiveTower","DestLight_01","EarthMetaGame","Eastern_Europe_Apartment_Building_01","Eastern_Europe_Apartment_Building_02","Eastern_Europe_Apartment_Building_03","Eastern_Europe_Church_01",
	"Eastern_Europe_Church_02","Eastern_Europe_Church_03","Eastern_Europe_Church_04","Eastern_Europe_Church_05","Eastern_Europe_Farm_01","Eastern_Europe_Farm_02","Eastern_Europe_Government_Building_01","Eastern_Europe_Government_Building_02","Eastern_Europe_Hotel_01","Eastern_Europe_Hotel_02","Eastern_Europe_House_01","Eastern_Europe_House_02","Eastern_Europe_House_03","Eastern_Europe_House_04","Eastern_Europe_House_05","Eastern_Europe_Office_Building_01","Eastern_Europe_Office_Building_02","Eastern_Europe_Ruin_01","Eastern_Europe_Ruin_02",
	"Eastern_Europe_Ruin_03","Eastern_Europe_Ruin_04","Eastern_Europe_Ruin_05","Eastern_Europe_Ruin_06","Eastern_Europe_Ruin_07","Eastern_Europe_Ruin_08","Eastern_Europe_Ruin_09","EEBHan01","EEBMkt01","EEBMkt02","EEPAuto01","EEPAuto02","EEPAuto03","EEPAuto04","EEPAuto05","EEPAuto06","EEPAuto07","EEPAuto08","EEPAuto09","EEPBnk01","EEPDebris01","EEPDebris02","EEPDebris03","EEPDebris04","EEPDebris05","EEPDump01","EEPFence01","EEPFence02","EEPFence03","EEPFence04","EEPFence05","EEPFence06","EEPFence07","EEPFnc01","EEPLit01","EEPLit02","EEPpln01",
	"EEPpln02","EEPpwr01","EEPpwr02","EEPpyl01","EEPSgn01","EEPSgn02","EEPSgn03","EEPSgn04","EEPSupply01","EEPwal01","EEPWal02","EEPWal03","EEPWal04","EEPWal05","EEPwal06","EERocks01","EERocks02","EERocks03","EERocks04","EGBMkt01_a","EGBMkt01_c","EGBMkt01_d","EGPBbd01","EGPLit01","EGPLit02","EGPpwr01","EGPpwr02","EGPwal01","EGRLarge01","EGTbush01","EGTbush02","EGTbush03","EGTbush04","Egyptian_Apartment_Building_01","Egyptian_Apartment_Building_02","Egyptian_Apartment_Building_03","Egyptian_Drydock_01","Egyptian_Factory_01","Egyptian_Factory_02",
	"Egyptian_Farm_01","Egyptian_Farm_02","Egyptian_Hotel_01","Egyptian_Hotel_02","Egyptian_Lighthouse_Radar_01","Egyptian_Market_01","Egyptian_Market_01_b","Egyptian_Market_02","Egyptian_Mosque_01","Egyptian_Mosque_02","Egyptian_Office_Building_01","Egyptian_Office_Building_02","Egyptian_Office_Building_03","Egyptian_Office_Building_04","Egyptian_Port_Authority_01","Egyptian_Ruin_01","Egyptian_Ruin_02","Egyptian_Ruin_03","Egyptian_Ship_01","Egyptian_Warehouse_01","Egyptian_Warehouse_02","Egyptian_Warehouse_03","ElectroMagneticPulseControlCenter","ExplodingBarrel",
	"FarmBarn","FarmBarnB","FarmCrop_01","FarmFence","FarmSilo","FarmTractor","FarmWindmill","GBTibWallHub","GDI_Bunker","GDI_GovBldg","GDI_ImportantBuilding","GDI_LabRadarBuilding","GDI_RadioTower_CM11","GDI_StDetect","GDI_StealthLab","GDI_TacBldg","GDI_TibLab","GDI_Treasury","GDI_Wing","GDI_Wing2","GDIAirstrikeSPBombingRunTarget","GDIAirstrikeSPBombingRunTrigger","GDIAlarm","GDIBattleshipBombardMissile","GDICarrier","GDIHovercraft","GDIJuggDebris_05","GDIParkedMiniOrca","GDIParkedOx","GDIPhil","GDIPowerStore","GDITibWallSeg","GenericTreeCrusher",
	"Germany_Apartment_01","Germany_Apartment_02","Germany_Apartment_03","Germany_Apartment_04","Germany_Church_01","Germany_Church_02","Germany_Church_03","Germany_Fountain_01","Germany_Futuristic_Building_01","Germany_Futuristic_Building_02","Germany_Futuristic_Building_03","Germany_Futuristic_Building_04","Germany_Futuristic_Building_05","Germany_Hotel_02","Germany_Iconic_Bridge_01_Center","Germany_Iconic_Bridge_01","Germany_Obelisk_01","Germany_Office_Building_01","Germany_Office_Building_02","Germany_Office_Building_03",
	"Germany_Resort_01","Germany_Ruin_01","Germany_Ruin_02","Germany_Ruin_03","Germany_Ruin_04","Germany_Ruin_05","Germany_Sports_Arena_01","Goddard_Space_Center_Building_01","Goddard_Space_Center_Building_02","Goddard_Space_Center_Building_03","Goddard_Space_Center_Futuristic_Building_01","Goddard_Space_Center_Futuristic_Building_02","Goddard_Space_Center_Futuristic_Building_03","Goddard_Space_Center_Radar_01","Goddard_Space_Center_Rocket_Gantry_01","Goddard_Space_Center_Sign_01","GOTtree01","GRBRuin01","GRBRuin02","GRBRuin03",
	"GRBRuin04","GRBZnE01","GRPAuto01","GRPAuto02","GRPAuto03","GRPAuto04","GRPAuto05","GRPAuto06","GRPAuto07","GRPAuto08","GRPDebris01","GRPDebris02","GRPfence01","GRPFence02","GRPfence03","GRPFence04","GRPFence05","GRPFence06","GRPFence07","GRPfire01","GRPlight01","GRPlight02","GRPlight03","GRPlight04","GRPnews01","GRPplanter01","GRPplanter02","GRPpower01","GRPpower02","GRPpylon01","GRPpylon02","GRPruin01","GRPruin02","GRPruin03","GRPruin04","GRPruin05","GRPRuin06","GRPRuin07","GRPsign01","GRPsign02","GRPsign03","GRPsign04","GRPsign05",
	"GRPStump01","GRPtrain01","GRPtrain02","GRPtrain03","GRPtrain04","GRPtrain05","GRPwall01","GRPwall02","GRPwall02b","GRPwall03","GRPwall04","GRPwall05","GRPwall06","GRTree01","hacorn01","HARoad01","HATree01","HealCrate","Italian_Ruin_01","Italian_Ruin_02","Italian_Ruin_03","Italian_Ruin_04","Italian_Ruin_05","Italian_Ruin_06","Italian_Ruin_07","Italian_Ruin_08","Italian_Ruin_09","Italian_Ruin_10","Italian_Ruin_11","Italian_Ruin_12","Italian_Ruin_13","Italian_Ruin_14","Italian_Ruin_15","Italian_Ruin_16","Italian_Ruin_17","Italian_Ruin_18","Italian_Ruin_19","Italian_Ruin_20",
	"Italian_Ruin_21","Italian_Ruin_22","Italian_Ruin_23","Italian_Ruin_24","Italian_Ruin_25","Italian_Ruin_26","Italian_Ruin_27","ITBRui28","ITBRui29","ITBShk01","ITBShk02","ITBShk03","ITPAuto01","ITPAuto02","ITPAuto03","ITPAuto04","ITPAuto05","ITPAuto06","ITPAuto07","ITPAuto08","ITPBarr01","ITPBarr02","ITPCrate01","ITPCrate02","ITPDeadP01","ITPDeadP02","ITPDeadP03","ITPDeadP04","ITPDebris01","ITPDebris02","ITPDebris03","ITPDebris04","ITPDebris05","ITPDump01","ITPPwr01","ITPPwr02","ITPPwr03","ITRocks01","ITRocks02","ITRocks03","ITRocks04","ITRocks05","ITRocks06",
	"ITRocks07","ITRocks08","ITRocks09","ITRocks10","ITRocks11","ITRocks12","ITRocks13","ITRocks14","MoneyCrate","MutantHovel","NBTibWallHub","NCPDebris01","NCPDebris02","NCPDebris03","NCPDebris04","NCPDebris05","NCPShop01","NCPShop02","NCPShop03","NOD_AirfieldControlTower","NOD_Battleship","Nod_Bunker","NOD_CommandCenter","NOD_CommandCenter2","NOD_CommandCenter3","NOD_CommandCenter4","NOD_DockCargoLoadingCrane","NOD_DockHQ","NOD_DockHQ2","NOD_DockHQ3","NOD_DockHQ4","NOD_IonDisruptionFieldGenerator","NOD_LabRadarBuilding",
	"NOD_LaunchFacility","NOD_ManufacturingFacility1","NOD_ManufacturingFacility2","NOD_ManufacturingFacility3","NOD_NBBHStatue","NOD_NBContNode","NOD_PortAuthority","NOD_Silo","NOD_Silo_LaunchBase","NOD_Silo01","NOD_Silo02","NOD_Silo03","NOD_Silo04","NOD_Silo05","NOD_Silo06","NOD_Silo07","NOD_Silo08","NOD_Silo09","NOD_Silo0CL","NOD_Silo10","NOD_Silo11","NOD_Silo12","NOD_Silo13","NOD_SiloCR","NOD_SiloMis","NOD_StrongholdBuilding1","NOD_StrongholdBuilding2","NOD_StrongholdBuilding2a","NOD_StrongholdBuilding2b","NOD_StrongholdBuilding3",
	"NOD_StrongholdBuilding4","NOD_StrongholdBuilding5","NOD_StrongholdBuilding6","NOD_TemplePrime","NOD_TransportationHubMotorPool","NOD_WeaponsLabFacility","NODAvatarDebris_04","NODCarryall_SP","NODCarryallInfantry_SP_Militants","NODHovercraft","NODMarcionTransport","NODParkedCarryall","NODParkedFlameTank","NODParkedMCV","NODParkedRaiderBuggy","NODParkedRaiderTank","NODParkedStealthTank","NODParkedVenom","NODParkedVertigoBomber","NODPowerStore","NodTibWallSeg","NODVertigo_SPBombingRun","NODVertigo_SPBombingRunTarget",
	"North_Carolina_Barn_01","North_Carolina_Barn_02","North_Carolina_Factory_01","North_Carolina_Grocery_Store_01","North_Carolina_House_01","North_Carolina_House_02","North_Carolina_Outdoor_Mall_01","North_Carolina_Ruin_01","North_Carolina_Ruin_02","North_Carolina_Ruin_03","North_Carolina_Ruin_04","North_Carolina_Warehouse_01","North_Carolina_Warehouse_02","ParkBench","ParkPaths","ParkPicnic","ParkPlant02","ParkPlant03","ParkPlygrnd01","ParkPlygrnd02","ParkPool","ParkStatue","ParkTable","Philadelphia","plane_crash","PM_3Wheel01","PM_3Wheel02",
	"PM_3Wheel03","PM_3Wheel04","PM_Hatchback01","PM_Hatchback02","PM_Hatchback03","PM_Hatchback04","PM_Limo01","PMAuto01","PMAuto02","PMAuto03","PMAuto04","PMBillboard01","PMBillboard02","PMEgyDock01","PMEgyDock01b","PMEgyDock02","PMEgyDock03","PMEgyDock04","PMEgyOilPipe","PMEgyOilPipeB","PMEgyOilPipeC","PMEgyOilWell01","PMEgyOilWell02","PMEgyOilWell03","PMEgyOilWell04","PMEgyPod01","PMEgyPod02","PMEgySupplies09","PMEgySupplies10","PMEgySupplies11","PMiscEgyBarr01","PMiscEgyBarr02","PMiscEgyCrat01","PMiscEgyCrat02","PMiscEgyDebr01",
	"PMiscEgyDebr02","PMiscEgyDebr03","PMiscEgyDebr04","PMiscEgyDebr05","PMiscEgyDump01","PMiscEgyFenc01","PMiscEgyFenc02","PMiscEgyFuel01","PMiscEgyLand01","PMiscEgyPowe01","PMiscEgyPowe02","PMiscEgyStum01","PMiscEgySupp01","PMiscEgySupp02","PMiscEgySupp03","PMiscEgySupp04","PMiscEgySupp05","PMiscEgySupp06","PMiscEgySupp07","PMiscEgySupp08","PMiscEgyWrec01","PMiscEgyWrec02","PMiscEgyWrec03","PMiscEgyWrec04","PMiscEgyWrec05","PMiscEgyWrec06","PMShopCart01","PMShopCart02","PMShopCart03","PMShopSign01","PMWreckedAuto01",
	"PMWreckedAuto02","PMWreckedAuto03","PMWreckedAuto04","PMWreckedAuto05","PMWreckedAuto06","PMWreckedAuto07","PShrubEgy01","PShrubEgy02","PShrubEgy03","PTreeEgy01","RedZoneAmbientFX","RedZoneOverpass","RedZoneRocks01","RedZoneRubble01","RedZoneRubble02","RedZoneRubble03","RedZoneRubble04","RedZoneRubble05","RedZoneRubble06","RedZoneRubble07","RedZoneRubble08","RedZoneRubble09","ReinforcementBay","Ripples_01","Ripples_02","Ripples_03","Rubble_Carryall","Rubble_Devastator","Rubble_Dropship","Rubble_Firehawk","Rubble_Mammoth",
	"Rubble_Mk2_01","Rubble_Orca","Rubble_Pitbull","Rubble_Predator","Rubble_Titan01","Rubble_Titan02","Rubble_Transport","RubbledBuilding01","RubbledBuilding02","RubbledBuilding03","RubbledBuilding04","RubbledBuilding05","RubbledBuilding06","RUProp01","RUProp02","RURock01","RURock02","RUTree01","RUTree02","RUTree03","RUTree04","RUTree05","RUWall01","RUWall02","RUWall03","SalvageCrate","SatelliteLaunchFacility","ShroudCrate","SiegeBarriers","SiegeBarriers10","SiegeBarriers5","SubwayHub","SubwayNode","TacitusBarrier","TallTree","TargetDummy","TemplePrimeRamp01",
	"TestBridge_Center","TestBridge_Center2","TestBridge_End","TestBridge_GateHouse","TestBridge","TibCell01","TiberiumChasmCluster01","TiberiumCollapsableTower","TiberiumFieldFromHarvesterDeath","TiberiumFieldFromTiberiumSilo","TiberiumShaft01","TiberiumShaft02","TiberiumShaft03","TiberiumSilo","TiberiumSmallField01","TiberiumSpike","TiberiumVent01","TiberiumVent02","TibTree01","TibTree02","TrainingStation","TUTORIAL_ADVMOVEMENT","TUTORIAL_ADVSELECTION","TUTORIAL_Attacking","TUTORIAL_BUILDING","TUTORIAL_CAMERA","TUTORIAL_CONTEXT","TUTORIAL_DEFAULT",
	"TUTORIAL_DPAD","TUTORIAL_GROUPS","Tutorial_Interface","TUTORIAL_MOVEMENT","TUTORIAL_POWERS","TUTORIAL_SELECTION","TUTORIAL_SKIRMISH","TUTORIAL_Stances","TUTORIAL_UNITS","TUTORIAL_Upgrades","UnitCrate","VeterancyCrate","Washington_DC_Barracks_01","Washington_DC_Department_of_Labor_01","Washington_DC_Diamond_Shaped_Building_01","Washington_DC_Drydock_01","Washington_DC_Encounters_Building_01","Washington_DC_Hangar_01","Washington_DC_Hangar_02","Washington_DC_Hotel_01","Washington_DC_Hotel_02","Washington_DC_L_Shaped_Building_01",
	"Washington_DC_Lighthouse_Radar_01","Washington_DC_Office_Building_01","Washington_DC_Personnel_Building_01","Washington_DC_Port_Authority_01","Washington_DC_Saucer_Shaped_Building_01","Washington_DC_Ship_01","Washington_DC_Ship_02","Washington_DC_Tower_01","Washington_DC_Warehouse_01","Washington_DC_Warehouse_02","Washington_DC_Warehouse_03","Washington_DC_Warehouse_04","Washington_DC_Warehouse_05","Washington_DC_Warehouse_06","Washington_DC_Warehouse_07","Washington_DC_Wedding_Cake_Building_01",
	"Washington_DC_X_Shaped_Building_01","Washington_Pentagon_Barrier_01","WaterFountain1AmbientLoop","WtrSkyboxEgypt","YellowZoneAmbientFX_A","YellowZoneSkyA","ZoneWall"
}

--map specific--
WorldBuilderUseableObjects={}
PlantObjects={}
----

ObjectHashIndexTypeTable={ --these objects have lua registration and can be found in the globals() table
	["3805790263"]="AlienAnnihilatorTripod",["2861908637"]="AlienAssimilator",["2159057506"]="AlienBlinkMastermind",["68593967"]="AlienBuzzerHive",["2384886255"]="AlienBuzzers",["4005307538"]="AlienControlCenter",["2007034025"]="AlienCorrupter",["221867816"]="AlienCustomizableVehicle",["1122195248"]="AlienDevastatorWarship",["2946044786"]="AlienDevourerTank",["487816325"]="AlienEradicatorHexapod",["1267973868"]="AlienExplorer",["4278029493"]="AlienGateway",["27610139"]="AlienGunWalker",
	["350440930"]="AlienHarvester",["4127320940"]="AlienMastermind",["820198441"]="AlienMCV",["4105382990"]="AlienPhotonCannon",["168221011"]="BlackHandCrane",["744653454"]="BlackHandDropZone",["2102790892"]="BlackHandEmissary",["1881126022"]="BlackHandHandOfNOD",["1290102735"]="BlackHandHangar",["1769423558"]="BlackHandLaserCannonSpawn",["2395565189"]="NODLaserCannonSpawn",["842149963"]="BlackHandLaserCannon",["4072721186"]="BlackHandObelisk",["587542384"]="BlackHandOperationsCenter",
	["700254408"]="BlackHandPowerPlant",["3616161493"]="BlackHandPropagandaTower",["100072016"]="BlackHandRefinery",["2649472654"]="BlackHandRocketBunkerSpawn",["4191971488"]="NODRocketBunkerSpawn",["4122814948"]="BlackHandRocketBunker",["258129317"]="BlackHandSecretShrine",["2945350872"]="BlackHandShredderTurret",["2566151430"]="BlackHandShredderTurretHub",["1872037456"]="BlackHandTechAssemblyPlant",["2373507443"]="BlackHandTempleOfNOD",["3458227666"]="BlackHandTiberiumLiquidationFacility",["3169264583"]="BlackHandTiberiumSilo",["1979182309"]="MarkedOfKaneAirSupport",
	["1733547210"]="MarkedOfKaneCrane",["2091770787"]="MarkedOfKaneDisruptionTower",["3872699996"]="MarkedOfKaneDropZone",["3183713661"]="MarkedOfKaneEmissary",["2226264950"]="MarkedOfKaneHandOfNOD",["2386700586"]="MarkedOfKaneHangar",["3899023480"]="MarkedOfKaneLaserCannonSpawn",["1070053604"]="MarkedOfKaneLaserCannon",["1212067520"]="MarkedOfKaneObelisk",["3331955598"]="MarkedOfKaneOperationsCenter",["3186266847"]="MarkedOfKanePowerPlant",["324108153"]="MarkedOfKanePropagandaTower",["1088200982"]="MarkedOfKaneRefinery",["195632027"]="MarkedOfKaneRocketBunkerSpawn",
	["2639459287"]="MarkedOfKaneRocketBunker",["2329896961"]="MarkedOfKaneSecretShrine",["1221807524"]="MarkedOfKaneShredderTurret",["2170679445"]="MarkedOfKaneShredderTurretHub",["4154127587"]="MarkedOfKaneTechAssemblyPlant",["2703520950"]="MarkedOfKaneTempleOfNOD",["3576851614"]="MarkedOfKaneTiberiumLiquidationFacility",["399887018"]="MarkedOfKaneTiberiumSilo",["599686082"]="MG_Alien_Hive",["350932745"]="AlienPlanetaryAssaultCarrier",["3053741411"]="AlienPlasmaMissileBattery",["2459686593"]="AlienPortal",["731130064"]="AlienRazorDroneSquad",["2501601210"]="AlienReactor",
	["944677863"]="AlienRiftGenerator",["3095406435"]="AlienSeekerTank",["1687549193"]="AlienShockTrooperSquad",["3809858739"]="AlienSignalTransmitter",["854201267"]="AlienStalkerSquad",["3249535276"]="AlienStatisChamber",["1113391268"]="AlienStormColumn",["4142335957"]="AlienStormrider",["1183416773"]="AlienWarpBeacon",["696000818"]="BlackHandAttackBike",["2136759514"]="BlackHandBeamCannon",["1598355759"]="BlackHandBlackHandSquad",["428602625"]="BlackHandBunkerTruck",["1313610083"]="BlackHandCommando",
	["266270183"]="BlackHandConfessorSquad",["1014761723"]="BlackHandCustomWarmech",["148961737"]="BlackHandFanaticSquad",["505081534"]="BlackHandFlameTank",["560340475"]="BlackHandHarvester",["1533894628"]="BlackHandMCV",["3445248864"]="BlackHandMetaUnit",["3271628897"]="BlackHandMilitantRocketSquad",["3281039189"]="BlackHandMilitantSquad",["2053347994"]="BlackHandMobileArtillery",["2738819503"]="BlackHandRaiderTank",["673845731"]="BlackHandSaboteur",["2036371720"]="BlackHandScorpionBuggy",["4085650877"]="BlackHandStealthTank",
	["4036331981"]="BlackHandVenom",["2907988778"]="GDIAABattery",["3040883967"]="GDIAAScout",["2636413453"]="GDIAirSupport",["2199177120"]="GDIAirTower",["3491560840"]="GDIAPC",["867437679"]="GDIArmory",["332753075"]="GDIBarracks",["1911614013"]="MG_BlackHand_WarmechFacility",["3703068792"]="GDICommando",["3781531209"]="GDICommandPost",["1693375322"]="GDIEngineer",["3006676643"]="GDIFireHawk",["894742678"]="GDIGolumCannon",
	["1116299360"]="GDIGrenadeSoldierSquad",["2831194120"]="GDIHammerhead",["220562260"]="GDIHarvester",["4059391770"]="GDIIonCannonControl",["843615794"]="GDIJuggernaught",["3154774089"]="GDIMammoth",["808797208"]="GDIMARV",["1385386646"]="GDIMCV",["291376689"]="GDIMedicalBay",["4010955483"]="GDIMissileSoldierSquad",["3045524383"]="GDIOrca",["1878337544"]="GDIPitbull",["596796102"]="GDIPowerPlant",["3874148396"]="GDIPredator",
	["380136808"]="GDIRefinery",["1363625857"]="MG_GDI_ReclamatorHub",["2425788014"]="GDIRifleSoldierSquad",["3029069266"]="GDIRig",["3165874693"]="GDISniperSquad",["558153060"]="GDISonicTank",["2167863030"]="GDISpaceCommandUplink",["2451310284"]="GDISurveyor",["3439867302"]="GDITerraformingStation",["352599915"]="GDITiberiumSilo",["2596103596"]="GDIWarFactory",["1051033844"]="GDIWatchTower",["1566464305"]="GDIZoneTrooperSquad",["497949767"]="MarkedOfKaneAttackBike",
	["3577580223"]="MarkedOfKaneAvatar",["1024735831"]="MarkedOfKaneBeamCannon",["805339674"]="MarkedOfKaneBunkerTruck",["1080857772"]="MarkedOfKaneCommando",["1620292030"]="MarkedOfKaneFanaticSquad",["3279444990"]="MarkedOfKaneHarvester",["2994593639"]="MarkedOfKaneImprovedCyborgInfantrySquad",["3011801859"]="MarkedOfKaneMCV",["1897535711"]="MarkedOfKaneMetaUnit",["33629942"]="MarkedOfKaneMilitantRocketSquad",["1247370967"]="MarkedOfKaneMilitantSquad",["2589147079"]="MarkedOfKaneMobileArtillery",["457496238"]="MarkedOfKaneRaiderTank",["2795684308"]="MarkedOfKaneSaboteur",
	["3821552048"]="MarkedOfKaneScorpionBuggy",["1793729546"]="MarkedOfKaneShadowSquad",["270907659"]="MarkedOfKaneStealthTank",["3873591031"]="MarkedOfKaneTibTrooperSquad",["602416393"]="MarkedOfKaneVenom",["960382060"]="MarkedOfKaneVertigo",["4071044871"]="MG_MarkedOfKane_WarmechFacility",["2811122369"]="MG_NOD_WarmechFacility",["1486695211"]="MG_Reaper17_Hive",["3938075288"]="MG_SteelTalons_ReclamatorHub",["2794857676"]="MG_Traveler59_Hive",["3957200649"]="MG_ZOCOM_ReclamatorHub",["3586027372"]="MOKCyborgInfantrySquad",["28265361"]="MutantMarauderSquad",
	["239686589"]="NODAirSupport",["3144715221"]="NODAttackBike",["3154900504"]="NODAvatar",["1335753027"]="NODBeamCannon",["19442673"]="NODBlackHandSquad",["1392660339"]="NODBunkerTruck",["3672109216"]="NODCommando",["1719459484"]="NODCrane",["879680627"]="NODCyborgInfantrySquad",["1553745000"]="NODDisruptionTower",["580140829"]="NODDropZone",["315538775"]="NODEmissary",["3195811997"]="NODFanaticSquad",["4253557425"]="NODFlameTank",
	["1916828239"]="NODHandOfNOD",["3586535492"]="NODHangar",["977080474"]="NODHarvester",["3226449953"]="NODLaserCannon",["138622706"]="NODMCV",["3636331817"]="NODMetaUnit",["2311346244"]="NODMilitantRocketSquad",["3157665146"]="NODMilitantSquad",["1293745085"]="NODMobileArtillery",["3868904616"]="NODObelisk",["2758452353"]="NODOperationsCenter",["2738079400"]="NODPowerPlant",["2621843813"]="NODPropagandaTower",["49877789"]="NODRaiderTank",
	["3050468790"]="NODRefinery",["2182292141"]="NODRocketBunker",["2740814684"]="NODSaboteur",["1666470685"]="NODScorpionBuggy",["2560299243"]="NODSecretShrine",["2799763464"]="NODShadowSquad",["4212397519"]="NODShredderTurret",["2511757"]="NODStealthTank",["2334830347"]="NODVenom",["1789238550"]="NODVertigo",["1306091781"]="Reaper17AnnihilatorTripod",["667107644"]="Reaper17BuzzerHive",["4021609152"]="Reaper17ControlCenter",["2978478202"]="Reaper17Corrupter",
	["252740930"]="Reaper17CustomizableVehicle",["1097793023"]="Reaper17DevourerTank",["342632592"]="Reaper17EradicatorHexapod",["4092129615"]="Reaper17Explorer",["2593223505"]="Reaper17Gateway",["3689489833"]="Reaper17GrowthStimulator",["3279909415"]="Reaper17Harvester",["4006428288"]="Reaper17MCV",["3130415049"]="Reaper17PhotonCannon",["265642851"]="Reaper17PlasmaMissileBattery",["950315488"]="Reaper17Portal",["3755810217"]="Reaper17Reactor",["2768470878"]="Reaper17RiftGenerator",["3677060399"]="Reaper17SeekerTank",
	["2144140771"]="Reaper17ShardWalker",["1076107971"]="Reaper17ShockTrooperSquad",["204938282"]="Reaper17SignalTransmitter",["2133659381"]="Reaper17StalkerSquad",["3945608163"]="Reaper17StasisChamber",["1751309187"]="Reaper17StormColumn",["502803990"]="Reaper17Stormrider",["979676758"]="Reaper17WarpBeacon",["1551902107"]="SteelTalonsAABattery",["1257948904"]="SteelTalonsAAScout",["3747068994"]="SteelTalonsAirSupport",["4004273719"]="SteelTalonsAirTower",["882621777"]="SteelTalonsBarracks",["1393982803"]="SteelTalonsBehemoth",
	["2162161113"]="SteelTalonsCombatEngineer",["694935703"]="SteelTalonsCommandPost",["323537418"]="SteelTalonsFireHawk",["898545124"]="SteelTalonsGolumCannon",["264677653"]="SteelTalonsGrenadeSoldierSquad",["3671849580"]="SteelTalonsHammerhead",["4113231583"]="SteelTalonsHeavyHarvester",["3893810081"]="SteelTalonsImprovedSonicTank",["23350187"]="SteelTalonsIonCannonControl",["3249908499"]="SteelTalonsMammoth",["1448863781"]="SteelTalonsMARV",["1048504193"]="SteelTalonsMCV",["3928213359"]="SteelTalonsMissileSoldierSquad",["1809299627"]="SteelTalonsOrca",
	["207849440"]="SteelTalonsPitbull",["3858223515"]="SteelTalonsPowerPlant",["1065345553"]="SteelTalonsPredator",["1278094373"]="SteelTalonsRefinery",["2093312067"]="SteelTalonsRepairAPC",["3476418996"]="SteelTalonsRifleSoldierSquad",["2195121624"]="SteelTalonsRig",["258215728"]="SteelTalonsSpaceCommandUplink",["4092691421"]="SteelTalonsSurveyor",["1815125931"]="SteelTalonsTechCenter",["910172143"]="SteelTalonsTerraformingStation",["745452156"]="SteelTalonsTiberiumSilo",["1013465808"]="SteelTalonsTitan",["1084321921"]="SteelTalonsWarFactory",
	["1866269769"]="SteelTalonsWatchTower",["1547951759"]="SteelTalonsWolverine",["2123151484"]="SteelTalonsZoneTrooperSquad",["1955351586"]="Traveler59AnnihilatorTripod",["3755881343"]="Traveler59Assimilator",["1602225375"]="Traveler59BlinkMastermind",["3580113147"]="Traveler59BuzzerHive",["1961941872"]="Traveler59ControlCenter",["2444605085"]="Traveler59Corrupter",["3295472802"]="Traveler59CultistSquad",["2134698905"]="Traveler59CustomizableVehicle",["2975757644"]="Traveler59DevastatorWarship",["2768054299"]="Traveler59EradicatorHexapod",["2357377132"]="Traveler59Explorer",
	["1464056924"]="Traveler59Gateway",["1363345491"]="Traveler59GunWalker",["2575537599"]="Traveler59Harvester",["690860851"]="Traveler59MCV",["1789432218"]="Traveler59PhotonCannon",["259097660"]="Traveler59PlanetaryAssaultCarrier",["945628840"]="Traveler59PlasmaMissileBattery",["2906365133"]="Traveler59Portal",["2363313"]="Traveler59RazorDroneSquad",["2599918733"]="Traveler59Reactor",["1132033882"]="Traveler59RiftGenerator",["1922468124"]="Traveler59SeekerTank",["1208194430"]="Traveler59ShockTrooperSquad",["1042838317"]="Traveler59SignalTransmitter",
	["1923741141"]="Traveler59StalkerSquad",["1943362252"]="Traveler59StatisChamber",["1651080236"]="Traveler59StormColumn",["3969942881"]="Traveler59Stormrider",["1900739263"]="Traveler59WarpBeacon",["4099523718"]="ZOCOMAABattery",["1516258492"]="ZOCOMAAScout",["4136229536"]="ZOCOMAirSupport",["4072220311"]="ZOCOMAirTower",["1690087686"]="ZOCOMAPC",["3882856207"]="ZOCOMArmory",["1357601015"]="ZOCOMBarracks",["799347858"]="ZOCOMCommando",["3537949332"]="ZOCOMCommandPost",
	["9593062"]="ZOCOMEngineer",["1121278001"]="ZOCOMFireHawk",["1647247595"]="ZOCOMGolumCannon",["3292329887"]="ZOCOMGrenadeSoldierSquad",["4198989482"]="ZOCOMHammerhead",["3258661397"]="ZOCOMHarvester",["2926777231"]="ZOCOMImprovedSonicTank",["1067695218"]="ZOCOMIonCannonControl",["4199424531"]="ZOCOMJuggernaught",["316786888"]="ZOCOMMammoth",["938518005"]="ZOCOMMARV",["856485008"]="ZOCOMMCV",["2100767368"]="ZOCOMMedicalBay",["396448698"]="ZOCOMMissileSoldierSquad",
	["4205217600"]="ZOCOMOrca",["2908684823"]="ZOCOMPitbull",["887561926"]="ZOCOMPowerPlant",["4145331155"]="ZOCOMPredator",["3127011197"]="ZOCOMRefinery",["180766179"]="ZOCOMRifleSoldierSquad",["1875583768"]="ZOCOMRig",["3072647222"]="ZOCOMSniperSquad",["3858948527"]="ZOCOMSonicTank",["525661890"]="ZOCOMSpaceCommandUplink",["4253616897"]="ZOCOMSurveyor",["144548681"]="ZOCOMTerraformingStation",["3536484668"]="ZOCOMTiberiumSilo",["2401382389"]="ZOCOMWarFactory",
	["1345260202"]="ZOCOMWatchTower",["220279058"]="ZOCOMZoneRaiderSquad",["1314385739"]="NODShredderTurretHub",["3861967411"]="NODTechAssemblyPlant",["1670123888"]="NODTempleOfNOD",["2405528079"]="NODTiberiumLiquidationFacility",["1435749330"]="NODTiberiumSilo",["147387363"]="ABAVTower",["457424096"]="AlienBuzzers_Slaved",["4277513717"]="AlienDronePlatform",["1103047970"]="AlienGiantTiberiumRockFiringMechanism",["4103589451"]="AlienInvaderFighter",["1790899068"]="AlienLightningSpike",["4144617018"]="AlienMCVUnpacking",
	["525350344"]="AlienMillipedeBody",["1545730382"]="AlienMillipedeHead",["1158145773"]="AlienMiniTiberiumRockFiringMechanism_01",["2983113707"]="AlienMiniTiberiumRockFiringMechanism_02",["518911667"]="AlienMothership",["4092654169"]="AlienRazorDrones",["2202083894"]="AlienReconstructionBaseSpawned",["228082816"]="AlienRepairAircraftDrone",["3330631982"]="AlienRepairDrone",["4272912590"]="AlienRepairDroneSpawned",["3136386082"]="AlienShockTrooper",["2567800882"]="AlienShockTrooperSquad_Veteran",["3412147229"]="AlienStalker",["1333649509"]="BlackHandBlackDisciple",
	["2801258734"]="BlackHandBlackHand",["1712661271"]="BlackHandBunkerTruck_Veteran",["3583409476"]="BlackHandConfessor",["3489768722"]="BlackHandConstructionYard",["3317358629"]="BlackHandCustomWarmechHusk",["1749583512"]="BlackHandDecoyTempleOfNOD",["3039749024"]="BlackHandFanatic",["2953703615"]="BlackHandLaserCannonSpawnHole",["954847436"]="BlackHandMilitant",["2466678632"]="BlackHandMilitantB",["3965962140"]="BlackHandMilitantRocket",["43605965"]="BlackHandMiniMCVOutpost",["2717322082"]="BlackHandPowerStore",["107936384"]="BlackHandRocketBunkerSpawnHole",
	["4041894512"]="BlackHandVertigo",["1952569808"]="CivilianTransport",["2694626276"]="CorruptedInfantry",["2940611215"]="GDIAPC_Veteran",["2150169165"]="GDIBattleBase",["927512359"]="GDIBattleBaseRepairDrone",["1963689327"]="GDIConstructionYard",["1724663979"]="GDIGrenadeSoldier",["1915104458"]="GDIJuggernaughtHusk",["3492357342"]="GDIMechanic",["1786288652"]="GDIMiniOrca",["2778372489"]="GDIMissileSoldier",["2529302003"]="GDIMissileSoldierSquad_Veteran",["3262879385"]="GDIOrca_Airstrike",
	["1192145737"]="GDIOrca_BombingRun",["105176262"]="GDIOrcaSensorPod",["1533097765"]="GDIOrcaSensorStickyPod",["3655385880"]="GDIPitbull_Veteran",["1481805787"]="GDIRepairAircraftDrone",["35871891"]="GDIRepairDrone",["445200166"]="GDIRifleSoldier",["261140084"]="GDIRifleSoldierSquad_Veteran",["2821102134"]="GDISniper",["3475097429"]="GDISniperSquad_Veteran",["3957436972"]="GDISpotter",["1053590357"]="GDISuperSonicAirAttack",["1340554484"]="GDIV35Ox",["1563734170"]="GDIV35Ox_CallSupportBloodhound",
	["3397347477"]="GDIV35Ox_CallSupportBloodhound_APC",["478348445"]="GDIV35Ox_CallSupportGDIAirborne",["4111908793"]="GDIV35Ox_CallSupportGDIAirborneRockets",["182662835"]="GDIV35Ox_CallSupportHunterKillerTeam",["710240566"]="GDIV35Ox_Summoned",["3886476903"]="GDIV35Ox_SummonedForVehicle",["3089229677"]="GDIZoneTrooper",["3171889638"]="GDIZoneTrooperSquad_Veteran",["886288136"]="GenericRadarSupplier",["3327169145"]="IonStorm",["2693883159"]="IonStormTemporary",["695742628"]="LiquidTiberiumTransport",["3261077596"]="MarkedOfKane_DeployMagneticMines",
	["534748784"]="MarkedOfKaneAvatarHusk",["2240770736"]="MarkedOfKaneConstructionYard",["2946093985"]="MarkedOfKaneFanatic",["3355984486"]="MarkedOfKaneImprovedCyborgInfantry",["3940094921"]="MarkedOfKaneLaserCannonSpawnHole",["3012487848"]="MarkedOfKaneMilitantRocket",["2904344532"]="MarkedOfKaneMiniMCVOutpost",["211372465"]="MarkedOfKanePowerStore",["2587230824"]="MarkedOfKaneRocketBunkerSpawnHole",["1334603167"]="MarkedOfKaneShadow",["3279330900"]="MarkedOfKaneTibTrooper",["2886831532"]="MG_Alien_LifeFormPlant",["1879457338"]="MG_Alien_TerraformingNexus",["2526056535"]="MG_GDI_ASATDefense",
	["1913772981"]="MG_GDI_IntelCenter",["4075690101"]="MG_GDI_TiberiumProcessingPlant",["1025202766"]="MG_NOD_DisruptionGenerator",["3658463865"]="MG_NOD_TemplePrime",["1759251843"]="MG_NOD_TiberiumForge",["1156825506"]="MOKCyborgInfantry",["3225103941"]="MutantMarauder",["2033801987"]="NODArmageddonBomber",["2220833324"]="NODAvatarHusk",["2311464080"]="NODBlackHand",["103017905"]="NODBuildingBoobyTrap",["260553535"]="NODCarryall",["849492629"]="NODCarryallInfantry",["2769620829"]="NODCarryallVehicle",
	["964730941"]="NODConfessor",["3514124163"]="NODConstructionYard",["1309087284"]="NODCyborgInfantry",["818988780"]="NODFanatic",["2676583143"]="NODHuskBoobyTrap",["3253752753"]="NODLaserCannonSpawnHole",["3550367176"]="NODMGAct1PowerStore",["3947935118"]="NODMilitant",["1124649283"]="NODMilitantB",["2163300998"]="NODMilitantRocket",["798795912"]="NODMiniMCVOutpost",["3527542328"]="NODRepairAircraftDrone",["1464608217"]="NODRepairDrone",["3641251901"]="NODRocketBunkerSpawnHole",
	["2355608014"]="NODShadow",["2333378358"]="NODShadowSquad_Veteran",["1178475706"]="NODShadowSquadBeacon",["2046453146"]="NODTechBuildingBoobyTrap",["703660503"]="NODVertigo_AirDispersion",["3138721658"]="NODVertigo_DeployMines",["1268208320"]="NODVertigo_SeedTiberium",["4184869901"]="NODVertigoDisruptionPod",["2654977061"]="NODVertigoDisruptionStickyPod",["3543690052"]="NukeTransport",["2437662598"]="NULTTransport",["4272940039"]="PlanetaryAssaultCarrierIonStorm",["2362841443"]="Reaper17AnnihilatorTripodHusk",
	["3923673017"]="Reaper17DronePlatform",["4130438968"]="Reaper17MCVUnpacking",["3535917473"]="Reaper17Mothership",["1609077176"]="Reaper17ShockTrooper",["2817508979"]="Reaper17Stalker",["1771854186"]="ReinforcementBayDropship",["3581249554"]="ReinforcementBayDropshipNOD",["678291396"]="SteelTalonsAPC",["1181096733"]="SteelTalonsAPC_Veteran",["1165169293"]="SteelTalonsBattleBase",["2454939462"]="SteelTalonsBehemothHusk",["3381940374"]="SteelTalonsConstructionYard",["878702304"]="SteelTalonsGrenadeSoldier",["88883071"]="SteelTalonsMissileSoldier",
	["1300465855"]="SteelTalonsMissileSoldierSquad_Veteran",["2428124493"]="SteelTalonsPitbull_Veteran",["609002091"]="SteelTalonsRepairAPC_Veteran",["261135250"]="SteelTalonsRifleSoldier",["2983689879"]="SteelTalonsRifleSoldierSquad_Veteran",["4113463999"]="SteelTalonsV35Ox_Summoned",["2631873953"]="SteelTalonsV35Ox_SummonedForVehicle",["1639077106"]="SteelTalonsWolverine_Veteran",["3781304154"]="SteelTalonsZoneTrooper",["2168091593"]="SteelTalonsZoneTrooperSquad_Veteran",["2407031896"]="STV35Ox_CallSupportBloodhound",["1098309954"]="STV35Ox_CallSupportBloodhound_WOL",["3090055454"]="Traveler59Cultist",["1045578362"]="Traveler59DronePlatform",
	["3140644763"]="Traveler59MCVUnpacking",["2168632456"]="Traveler59Mothership",["3246327120"]="Traveler59RazorDrone",["1499625309"]="Traveler59ShockTrooper",["1439301044"]="Traveler59Stalker",["653659204"]="Viceroid",["3178693067"]="ZOCOMAPC_Veteran",["3360165586"]="ZOCOMAPCRepairDrone",["2547204785"]="ZOCOMBattleBase",["1801077552"]="ZOCOMConstructionYard",["3861104372"]="ZOCOMGrenadeSoldier",["1101137410"]="ZOCOMJuggernaughtHusk",["157709252"]="ZOCOMMissileSoldier",["2965761608"]="ZOCOMMissileSoldierSquad_Veteran",
	["461788331"]="ZOCOMOrca_BombingRun",["2864520223"]="ZOCOMPitbull_Veteran",["1206875263"]="ZOCOMRepairAPC",["3689007025"]="ZOCOMRifleSoldier",["172325523"]="ZOCOMRifleSoldierSquad_Veteran",["2057176288"]="ZOCOMSniper",["1558461745"]="ZOCOMSniperSquad_Veteran",["3586169545"]="ZOCOMSpotter",["1960956118"]="ZOCOMV35Ox_CallSupportHunterKillerTeam",["208770493"]="ZOCOMV35Ox_CallSupportZOCOMAirborne",["2792513385"]="ZOCOMV35Ox_CallSupportZOCOMAirborneRockets",["1965937438"]="ZOCOMV35Ox_CallSupportZOCOMBloodhound",["1917443685"]="ZOCOMV35Ox_CallSupportZOCOMBloodhound_APC",["3277225197"]="ZOCOMV35Ox_Summoned",
	["2983057145"]="ZOCOMV35Ox_SummonedForVehicle",["2419508393"]="ZOCOMZoneRaider",["2322497922"]="ZOCOMZoneRaiderSquad_Veteran",
	["1847717182"]="GuardShieldEmitter",["3940261646"]="MetaTechMCV",["903497890"]="MetaTechSuperAvatar",["2566837260"]="MetaTechBarracks",["3017582790"]="MetaTechCommandPost",["1719454038"]="MetaTechConstructionYard",["2402772029"]="MetaTechHangar",["3309625077"]="MetaTechMedicalBay",["3629233383"]="MetaTechReclamatorHub",["125384694"]="MetaTechTechCenter",["128886932"]="MetaTechWarFactory",
	["3079895931"]="CaptureFlag",["586385842"]="ControlPoint",["3876015510"]="DefensiveTower",["1087650692"]="ElectroMagneticPulseControlCenter",["1489765503"]="ITBShk01",["4207110565"]="TiberiumSpike"
	--["1627485"]="PlayerSpellBook",["932178903"]="GenericCrateSpawner",
}

NonLuaObjectsTypeTable={     --these objects do not have lua registration and cannot be found in the globals() table
	"AlienEMP","AlienBlueShardProjectile","AlienBlueShardProjectile_Veteran","AlienPlasmaDisk","AlienPlasmaDisk_Veteran","AlienEradicatorPlasmaDiskLrg_VeteranG","AlienEradicatorPlasmaDiskLrgG","AlienTibShardProjectile","AlienTibShardProjectile_Veteran","AlienFoundry","AlienPhotonCannonProjectile","NODHandOfNodBallProjectile","NODRocketBunkerSpawnTibCoreProjectile","NODRocketBunkerSpawnWeaponProjectile",
	"NODShredderTurretShell","NODCloakingFieldInfantryDeathProjectile","AlienPowerProjector","AlienSporePod","AlienTiberiumTower","ArtilleryShroudRevealer","NODAttackBikeRocketProjectile","NODAttackBikeRocketProjectile_Veteran","NODAttackBikeTibCoreProjectile","NODAttackBikeTibCoreProjectile_Veteran","NODBlackHandFlamerProjectile","NODStealthTankRocketProjectile","NODStealthTankRocketProjectile_Veteran","NodMobileArtilleryShell",
	"NodMobileArtilleryShell_Veteran","FXTankShell02_Veteran","NodTankShell","BlackHandTankRocketProjectile","BlackHandTankRocketProjectile_Veteran","BlackHandTankTibCoreProjectile","BlackHandTankTibCoreProjectile_Veteran","FXArtilleryShell","FXArtilleryShell_Veteran","FXTankShell","FXTankShell_Veteran","FXTankShell02","GDICrane","GDIFirehawkBombProjectile",
	"GDIFirehawkBombProjectile_Veteran","GDIFirehawkMissileProjectile","GDIFirehawkMissileProjectile_Veteran","GDIJuggernaughtBombardShell","GDIMammothRocketPodMissileProjectile","GDIMammothRocketPodMissileProjectile_Veteran","MARVGrenadeSoldierWeaponProjectile","MARVSonicShell","MARVSonicShell_Veteran","ZoneRaiderSonicRifleProjectile","ZoneRaiderSonicRifleProjectile_Veteran","GDIMissileSoldierMissileProjectile","GDIMissileSoldierMissileProjectile_Veteran","GDIOrcaMissileProjectile",
	"GDIOrcaMissileProjectile_Veteran","GDIOrcaSensorPodProjectile","GDIOrcaECHOProjectile","GDIOrcaECHOProjectile_Veteran","GDIPitBullArtilleryProjectile","GDIWallHub","NODStealthTankTibCoreProjectile","NODStealthTankTibCoreProjectile_Veteran","NODVertigoBombProjectile","NODVertigoBombProjectile_Veteran","NODVertigoDisruptionPodProjectile","NODWallHub","Reaper17Foundry","Reaper17PowerProjector",
	"Reaper17TiberiumTower","SteelTalonsCrane","SteelTalonsOverloadBeamProjectile","Traveler59Foundry","Traveler59PowerProjector","Traveler59SporePod","Traveler59TiberiumTower","ZOCOMCrane","AlienAnnihilatorTripodHusk","AlienCrystalShield","ALIENDevastatorDebris_01","ALIENDevastatorDebris_02","ALIENDevastatorDebris_03","ALIENDevastatorDebris_04",
	"ALIENDevastatorDebris_05","ALIENDevastatorDebris_06","ALIENDevourerDebris_01","ALIENDevourerDebris_02","ALIENDevourerDebris_03","ALIENDevourerDebris_04","ALIENDroneShipDebris_01","ALIENDroneShipDebris_02","ALIENDroneShipDebris_03","ALIENDroneShipDebris_04","ALIENDroneShipDebris_05","ALIENDroneShipDebris_06","ALIENEradicatorDebris_01","ALIENEradicatorDebris_02",
	"ALIENEradicatorDebris_03","ALIENEradicatorDebris_04","ALIENEradicatorDebris_05","ALIENEradicatorDebris_06","ALIENEradicatorDebris_07","ALIENEradicatorDebris_08","ALIENEradicatorDebris_09","ALIENEradicatorDebris_10","AlienEradicatorPlasmaDiskLrg","AlienEradicatorPlasmaDiskLrg_Veteran","AlienGiantTiberiumRock","AlienGiantTiberiumRockTiberiumField","ALIENHarvesterDebris_01","ALIENHarvesterDebris_02",
	"ALIENHarvesterDebris_03","AlienInnerTiberiumRock","AlienInstantRepairProp","ALIENInvaderFighterDebris_01","ALIENInvaderFighterDebris_02","ALIENInvaderFighterDebris_03","AlienMiniMCVOutpost","AlienMiniTiberiumRock","AlienMiniTiberiumRock2","AlienMotherShipBeamEffect100","AlienMotherShipBeamEffect25","AlienMotherShipBeamEffect50","AlienMotherShipBeamEffect75","ALIENMotherShipDebris_01",
	"ALIENMotherShipDebris_02","ALIENMotherShipDebris_03","ALIENMotherShipDebris_04","ALIENMotherShipDebris_05","ALIENMotherShipDebris_06","ALIENMotherShipDebris_07","ALIENMotherShipDebris_08","ALIENMotherShipDebris_09","ALIENMotherShipDebris_10","ALIENMotherShipDebris_11","ALIENMotherShipDebris_12","ALIENMotherShipDebris_13","ALIENMotherShipDebris_14","ALIENMotherShipDebris_15",
	"ALIENMotherShipDebris_16","ALIENMotherShipDebris_17","ALIENMotherShipDebris_18","ALIENMotherShipDebris_19","ALIENMotherShipDebris_20","ALIENMotherShipDebris_21","ALIENMotherShipDebris_22","ALIENMotherShipDebris_23","ALIENMotherShipDebris_24","ALIENMotherShipDebris_25","ALIENMotherShipDebris_26","ALIENMotherShipDebris_27","ALIENMotherShipDebris_28","ALIENOutSideRock1",
	"ALIENOutSideRock6","ALIENOutSideRock8","ALIENPACDebris_01","ALIENPACDebris_02","ALIENPACDebris_03","ALIENPACDebris_04","ALIENPACDebris_05","ALIENPACDebris_06","ALIENPACDebris_07","AlienPlasmaCannon","AlienRepairDroneTower","AlienSeedTiberiumLaserFX","ALIENSeekerDebris_01","ALIENSeekerDebris_02",
	"ALIENSeekerDebris_03","ALIENSeekerDebris_04","AlienTibAgitationProjectile","ALIENStormRiderDebris_01","ALIENStormRiderDebris_02","ALIENStormRiderDebris_03","ALIENSurveyorDebris_01","ALIENSurveyorDebris_02","ALIENSurveyorDebris_03","AlienTiberiumFieldSeeded","AlienTibHive","ALIENTripodDebris_01","ALIENTripodDebris_02","ALIENTripodDebris_03",
	"ALIENTripodDebris_04","AlienWormHole","AlienWormHoleMarker","AlienZeusPlasmaDisk","NODConfessorGrenadeProjectile","NODMilitantRocketWeaponProjectile","NODMilitantRocketWeaponProjectile_Veteran","BlackHandShredderTurretSpawnHole","ClusterBombSeed","EMPField","FXBattleShipShell","FXMammothRocketPodMissile","FXMammothRocketPodMissile_Veteran","GDIAATankDebris_01",
	"GDIAATankDebris_02","GDIAATankDebris_03","GDIAATankDebris_04","GDIAATankDebris_05","GDIAirstrikeOrcaWeaponProjectile","GDIAirstrikeSPBombingRunTarget","GDIAirstrikeSPBombingRunTrigger","GDIAPCDebris_01","GDIAPCDebris_02","GDIAPCDebris_03","GDIAPCDebris_04","GDIAPCDebris_05","GDIBattleBaseMissileProjectile","GDIBattleshipBombardMissile",
	"GDIBombingRunBeacon","GDIBombingRunOrcaWeaponProjectile","GDICommandPostRadarScanPing","GDICommandPostRadarScanPingEffect","GDIDigInBuilding","GDIDigInBuildingPlaceholder","GDIDropPod","GDIDropPod_DR01","GDIDropPod_DR02","GDIDropPod_DR03","GDIDropPodBeacon","GDIDropShipDebris_01","GDIDropShipDebris_02","GDIDropShipDebris_03",
	"GDIDropShipDebris_04","GDIDropShipDebris_05","GDIFireHawkDebris_01","GDIFireHawkDebris_02","GDIFireHawkDebris_03","GDIFireHawkDebris_04","GDIFirehawkMissileFragmentProjectile","GDIFuelDepot","GDIGrenadeSoldierEMPGrenadeProjectile","GDIGrenadeSoldierGrenadeProjectile","GDIGrenadeSoldierGrenadeProjectile_Veteran","GDIHammerheadDebris_01","GDIHammerheadDebris_02","GDIHammerheadDebris_03",
	"GDIHammerheadDebris_04","GDIHammerheadDebris_05","GDIHarvesterDebris_01","GDIHarvesterDebris_02","GDIHarvesterDebris_03","GDIHarvesterDebris_04","GDIHarvesterDebris_05","GDIHvyHarvesterDebris_01","GDIHvyHarvesterDebris_02","GDIHvyHarvesterDebris_03","GDIHvyHarvesterDebris_04","GDIHvyHarvesterDebris_05","GDIJuggDebris_01","GDIJuggDebris_02",
	"GDIJuggDebris_03","GDIJuggDebris_04","GDIJuggernaughtRocketPodProjectile","GDIMARVDebris_01","GDIMARVDebris_02","GDIMARVDebris_03","GDIMARVDebris_04","GDIMARVDebris_05","GDIMARVDebris06","GDIMARVDebris07","GDIMARVDebris08","GDIMARVDebris09","GDIMARVDebris10","GDIMCVDebris_01",
	"GDIMCVDebris_02","GDIMCVDebris_03","GDIMCVDebris_04","GDIMCVDebris_05","GDIMine","GDIMiniMCVOutpost","GDIMiniOrcaDebris_01","GDIMiniOrcaDebris_02","GDIMiniOrcaDebris_03","GDIMiniOrcaDebris_04","GDIMiniOrcaDebris_05","GDIMissileSoldierMissileFragmentProjectile","GDIMjolnirStrikeBeacon","GDIMjolnirStrikeProjectile",
	"GDIMjolnirStrikeProjectileStrike","GDIMRTDebris_01","GDIMRTDebris_02","GDIMRTDebris_03","GDIMRTDebris_04","GDIMRTDebris_05","GDINukeSeed","GDIOrcaDebris_01","GDIOrcaDebris_02","GDIOrcaDebris_03","GDIOrcaDebris_04","GDIOrcaDebris_05","GDIOrcaDebris_06","GDIOrcaPulseScanPing",
	"GDIPitBullDebris_01","GDIPitBullDebris_02","GDIPitBullDebris_03","GDIPitBullDebris_04","GDIPitBullDebris_05","GDIPitBullDebris_06","GDIPitBullDebris_07","GDIPredatorDebris_01","GDIPredatorDebris_02","GDIPredatorDebris_03","GDIPredatorDebris_04","GDIPredatorDebris_05","GDIRaiderTankDebris_01","GDIRaiderTankDebris_02",
	"GDIRaiderTankDebris_03","GDIRaiderTankDebris_04","GDIRaiderTankDebris_05","GDIRailgunAcceleratorPowerSucker","GDIRigDebris_01","GDIRigDebris_02","GDIRigDebris_03","GDIRigDebris_04","GDIRigDebris_05","GDIShattererDebris_01","GDIShattererDebris_02","GDIShattererDebris_03","GDIShattererDebris_04","GDIShockwaveArtilleryBeacon",
	"GDIShockwaveArtilleryFX","GDIShockwaveArtillerySeed","GDISonicShockWaveCannonProjectile","GDISpaceCommandShockwaveProjectile","GDIStealthTankDebris_01","GDIStealthTankDebris_02","GDIStealthTankDebris_03","GDIStealthTankDebris_04","GDIStealthTankDebris_05","GDISuperSonicAirAttackBeacon","GDISUVDebris_01","GDISUVDebris_02","GDISUVDebris_03","GDISUVDebris_04",
	"GDISUVDebris_05","GDITerraformingStationIonStormKiller","GDIWallSegment","GDIWatchTowerGunProjectile","HealCrateMP","MoneyCrateMP","VeterancyCrateMP","GenericTreeCrusher","IonCannonEffect","MammothDebris_01","MammothDebris_02","MammothDebris_03","MammothDebris_04","MammothDebris_05",
	"NODMineBombProjectile","NODEMPBlastProjectile","MarkedOfKaneMagneticMine","NODShadowSquadBeaconProjectile","MarkedOfKaneShredderTurretSpawnHole","MG_Alien_Tower","Misc_Flare","Misc_Flare02","Misc_Flare03","Misc_Flare04","MultiplayerBeacon","NeutralTransportDebris_01","NeutralTransportDebris_02","NeutralTransportDebris_03",
	"NeutralTransportDebris_04","NeutralTransportDebris_05","NeutralTransportDebris_06","NeutralTransportDebris_07","NeutralViceroidSpittleWeaponProjectile","NODArmageddonBomberDebris_01","NODArmageddonBomberDebris_02","NODArmageddonBomberDebris_03","NODArmageddonBomberDebris_04","NODArmageddonBomberDebris_05","NODAttackBikeDebris_01","NODAttackBikeDebris_02","NODAttackBikeDebris_03","NODAttackBikeDebris_04",
	"NODAttackBikeDebris_05","NODAttackBikeDebris_06","NODAvatarDebris_01","NODAvatarDebris_02","NODAvatarDebris_03","NODBeamDebris_01","NODBeamDebris_02","NODBeamDebris_03","NODBeamDebris_04","NODBeamTarget","NODBlackHandStealthTankDebris_01","NODBlackHandStealthTankDebris_02","NODBlackHandStealthTankDebris_03","NODBlackHandStealthTankDebris_04",
	"NODBlackHandStealthTankDebris_05","NODBlackHandStealthTankDebris_06","NODBlackHandStealthTankDebris_07","NODBridgeBoobyTrap","NODBunkerTruckDebris_01","NODBunkerTruckDebris_02","NODBunkerTruckDebris_03","NODBunkerTruckDebris_04","NODCarryAllDebris_01","NODCarryAllDebris_02","NODCarryAllDebris_03","NODCarryAllDebris_04","NODCarryAllDebris_05","NODCarryAllDebris_06",
	"NODCatalystMissile","NODCatalystMissileBeacon","NODCatalystMissileSeed","NODCatalystSeed","NODExplosiveCharge","NODFlameTankDebris_01","NODFlameTankDebris_02","NODFlameTankDebris_03","NODFlameTankDebris_04","NODFlameTankDebris_05","NODFuelAirDummyProjectile","NODFuelAirProjectile","NODHarbingerDebris_01","NODHarbingerDebris_02",
	"NODHarbingerDebris_03","NODHarvesterDebris_01","NODHarvesterDebris_02","NODHarvesterDebris_03","NODHarvesterDebris_04","NODHarvesterDebris_05","NODMarcionTransportDebris_01","NODMarcionTransportDebris_02","NODMarcionTransportDebris_03","NODMarcionTransportDebris_04","NODMarcionTransportDebris_05","NODMarcionTransportDebris_06","NODMarcionTransportDebris_07","NODMarcionTransportDebris_08",
	"NODMetaUnitDebris_01","NODMetaUnitDebris_02","NODMetaUnitDebris_03","NODMetaUnitDebris_04","NODMetaUnitDebris_05","NODMetaUnitDebris_06","NODMetaUnitDebris_07","NODMetaUnitDebris_08","NODMetaUnitDebris_09","NODMetaUnitDebris_10","NODMine","NODNukeSeed","NODRedemptionAnimator","NODRedemptionMaker",
	"NODScorpionBuggyDebris_01","NODScorpionBuggyDebris_02","NODScorpionBuggyDebris_03","NODScorpionBuggyDebris_04","NODScorpionBuggyDebris_05","NODScorpionBuggyDebris_06","NODSeedTiberiumBeacon","NODSeedTiberiumProjectile","NODShredderTurretSpawnHole","NodStealthArtilleryDebris_01","NodStealthArtilleryDebris_02","NodStealthArtilleryDebris_03","NodStealthArtilleryDebris_04","NodStealthArtilleryDebris_05",
	"NODSurveyorDebris_01","NODSurveyorDebris_02","NODSurveyorDebris_03","NODSurveyorDebris_04","NODSurveyorDebris_05","NODTiberiumVaporBeacon","NODVeinDetonation","NODVenomDebris_01","NODVenomDebris_02","NODVenomDebris_03","NODVenomDebris_04","NODVenomDebris_05","NODVenomDebris_06","NODVertigo_SPBombingRunTarget",
	"NODVertigoBomberDebris_01","NODVertigoBomberDebris_02","NODVertigoBomberDebris_03","NODWallSegment","RallyPointMarker","Reaper17MiniMCVOutpost","RiftGeneratorWeaponObject","SteelTalonsBehemothDebris_01","SteelTalonsBehemothDebris_02","SteelTalonsBehemothDebris_03","SteelTalonsBehemothDebris_04","SteelTalonsMiniMCVOutpost","SteelTalonsSteelShattererDebris_01","SteelTalonsSteelShattererDebris_02",
	"SteelTalonsSteelShattererDebris_03","SteelTalonsSteelShattererDebris_04","SuperweaponDestroyCiviliansHumanelyObject","TiberiumCrystal","TiberiumCrystalBlue","TiberiumField","TiberiumFieldBlue","TiberiumFieldFromHarvesterDeath","TiberiumFieldFromTiberiumSilo","TiberiumFieldRedZone","TiberiumFieldSeeded","Traveler59AnnihilatorTripodHusk","Traveler59MiniMCVOutpost","Traveler59TemporalWormhole",
	"VeinDetonationChunk","ZOCOMDropPod","ZOCOMDropPodBeacon","ZOCOMMiniMCVOutpost","ZoneRaiderMissileProjectile","ZoneRaiderMissileProjectile_Veteran",
	"MetaTechCrane"
}

WorldBuilderNonLuaObjectsTypeTable={
	"ABTower","AF_Build01","AF_Build02","AF_Build03","AF_Build04","AF_Build05","AF_Build06","AF_Prop01","AF_Prop02","AF_Tree01","AF_Tree02","AF_Tree03","AF_Tree04","AF_Tree05","AF_Wall01","AF_Wall02","AGenericSound","AirstrikeRestrictor",
	"AlienPowerStore","Amb_AirportAnnouncement1","Amb_AirportAnnouncement2","Amb_AirportPlanesMS","Amb_AlarmKlaxon","Amb_BellBuoy","Amb_Birds1","Amb_Birds2","Amb_BirdsBuzzard","Amb_BirdsCrowMellow","Amb_BirdsCrowSimple","Amb_BirdsCrowSquak","Amb_BirdsCrowWeird","Amb_BirdsDesert","Amb_BirdsFalcon1","Amb_BirdsFalcon2","Amb_BirdsMountain1","Amb_BirdsMountain2",
	"Amb_BirdsOwl","Amb_BirdsSeagull","Amb_BirdsSeagull2","Amb_BoatDockedAtPier","Amb_CampFoley","Amb_ChimeJapanese","Amb_CitySkyline","Amb_Cornfield","Amb_CreatureBird1","Amb_CreatureHowl1","Amb_CreaturesLow1","Amb_CreaturesWhistle1","Amb_CricketsBed1Loop","Amb_CricketsBed2Loop","Amb_CricketSingleChirps1","Amb_CritterDesert1","Amb_CritterDesert2","Amb_DirtFall",
	"Amb_Dog1Barks","Amb_Dog2Barks","Amb_Dog3Barks","Amb_FieldCalm","Amb_FireRubble","Amb_FliesBuzzing","Amb_FogHornDelayedLoop","Amb_JunkGlass","Amb_JunkMetal","Amb_JunkWood","Amb_MetalCreak","Amb_MetalHit","Amb_OceanWaves1","Amb_SwampRonks","Amb_TentFlap1","Amb_TentFlap2","Amb_TiberiumGlacierLoopMS","Amb_TurbineWind",
	"Amb_WaterCreek1Loop","Amb_WaterCreek2Loop","Amb_WaterDockLoop","Amb_Waterfall1Loop","Amb_Waterfall2Loop","Amb_WaterLakeLight1","Amb_WaterRiver1Loop","Amb_Wind1","Amb_WindCold1","Amb_WindMountain1","Amb_WoodCreak","Amb_WoodCreakTree1","Amb_WoodHit","Amb_WoodShutter","AmbStream_BlueZone02_IndustrialNight_5point1","AmbStream_BlueZone03_Pristine_5point1","AmbStream_BlueZone04_Damaged_5point1","AmbStream_BlueZone06_Destroyed_5point1",
	"AmbStream_BlueZone07_Apocalypse_5point1","AmbStream_BlueZoneA_5point1","AmbStream_BoatDockedAtPier","AmbStream_CitySkyline","AmbStream_FieldCalm","AmbStream_Metamap_CitySkyline","AmbStream_Rain1","AmbStream_RedZone02_Desolate_5point1","AmbStream_RedZone03_Rubble_5point1","AmbStream_RedZoneA_5point1","AmbStream_YellowZone01_Temperate_5point1","AmbStream_YellowZone02_Desolate_5point1","AmbStream_YellowZone03_Rubble_5point1","AmbStream_YellowZone04_Bleach_5point1","AmbStream_YellowZone05_Jungle_5point1","AS_ITPPwr03","ASPcrate01","ASPcrate02",
	"ASPcrate03","ASPcrate04","ASPFence01","ASPFence02","ASPFence03","ASPFence04","ASPFence05","ASPFence06","ASPFence07","ASPmilemark","ASPpwrline01","ASPrail01","ASPrail02","ASPrailcross","ASPruinbuild","ASPsculp01","ASPsculp02","ASPsculp03",
	"ASPtrack01","ASPtrack02","ASPtrack03","ASPwatow","ASPwheel","ASRrocks01","ASRrocks02","ASRrocks03","ASTdead01","ASTdead02","ASTdead02a","ASTdead03","ASTdead04","ASTdead05","ASTdead06","ASTshrub01","ASTshrub02","ASTshrub03",
	"ASTshrub04","ASTtree01","Australian_Apartment_Building_01","Australian_Apartment_Building_02","Australian_Barn_01","Australian_Barn_02","Australian_Factory_01","Australian_Geodesic_Dome_01","Australian_Geodesic_Dome_02","Australian_Geodesic_Dome_03","Australian_Government_Building_01","Australian_Government_Building_02","Australian_Grocery_Store_01","Australian_Hotel_01","Australian_Hotel_02","Australian_House_01","Australian_House_02","Australian_Office_Building_01",
	"Australian_Office_Building_02","Australian_Opera_01","Australian_Outdoor_Mall_01","Australian_Warehouse_01","Australian_Warehouse_02","BlueZoneSkyA","BlueZoneSkyB","BlueZoneStormSkyA","Brazilian_Docks_01","Brazilian_Docks_02","Brazilian_Futuristic_Office_Building_01","Brazilian_Futuristic_Office_Building_02","Brazilian_Futuristic_Office_Building_03","Brazilian_Futuristic_Office_Building_04","Brazilian_Futuristic_Office_Building_05","Brazilian_Futuristic_Office_Building_06","Brazilian_Futuristic_Office_Building_07","Brazilian_Hotel_01",
	"Brazilian_Hotel_02","Brazilian_Mine_Building_01","Brazilian_Mine_Building_02","Brazilian_Oil_Platform_01","Brazilian_Oil_Platform_02","Brazilian_Resort_01","Brazilian_Shack_01","Brazilian_Shack_02","Brazilian_Shack_03","BRBRui01","BRBRui02","BRBRui03","BRBRui04","BRBWat01","Bridge1_Center","Bridge1_Center2","Bridge1_End","Bridge1_End2",
	"Bridge1_GateHouse","Bridge1","Bridge1a","Bridge2_Center","Bridge2_Center2","Bridge2_End","Bridge2_End2","Bridge2_GateHouse","Bridge2","Bridge2a","Bridge3_Center","Bridge3_Center2","Bridge3_End","Bridge3_End2","Bridge3_GateHouse","Bridge3","Bridge3a","BRPAuto01",
	"BRPAuto02","BRPAuto03","BRPAuto04","BRPAuto05","BRPAuto06","BRPAuto07","BRPCrate01","BRPCrate02","BRPDump01","BRPDump02","BRPFence01","BRPFence02","BRPFence03","BRPFuel01","BRPOilWell02","BRPWheel01","BRTBush01","BRTBush02",
	"BRTBush03","BRTBush04","BRTdead01","BRTshrub01","BRTshrub02","BRTshrub03","CBBBuy","CBCHBuild01","CBCHBuild02","CBCHBuild03","CBCHBuild04","CBCHBuild05","CBCHBuild06","CBEgyApt01","CBEgyApt02","CBEgyClov01","CBEgyRuin01","CBEgyRuin02",
	"CBEgyRuin03","CBEgyRuin04","CBEgyRuin05","CBEgyRuin06","CBEgySign01","CBEgyTent01","CBEgyTent02","CBEgyTent03","CBEgyUrba01","CBEgyUrba02","CBGreenhouse01","CBIrrigation01","CBIrrigation02","CBIrrigation03","CBIrrigation04","CBIrrigation05","CBIrrigation06","CBIrrigation07",
	"CBmosque","CBRUBuild01","CBRUBuild02","CBRUBuild03","CBRUBuild04","CBRUBuild05","CBRUBuild06","CBWaterTank01","CDMTower","CHProp01","CHProp02","CHTree01","CHTree02","CHTree03","CHTree04","CHTree05","CHWall01","CHWall02",
	"CHWall03","CIChaingate","CIChainlink","CICone02","CIFreeway","CIFreeway02","CIFreeway03","CIMonorrail","CIMonoTrack","CINE_Bunker","CIPowerTower","CITollbooth","city_buildings2","citybuilding02","CityBuilding04","CityBuilding05","citybuildings2b","CityGarbageBin",
	"CityGarbageCan","CityLight01","CityLight02","CityLight03","CityNewsStand","CitySidewalk","CitySign02","CitySign03","CitySign04","CitySign05","CitySign06","CityTree01","CityTree02","CityTree02b","CityTree02c","CivBunker","CivilianMale1","CivilianWallHub",
	"CivilianWallSegment","Coast_01","Coast_03","Coast02","CUAuto01","CUBird01","CUTrain01","DCBBarri01","DCBBrn01","DCBBuck01","DCBBun01","DCBBun02","DCBBurn01","DCBBurn02","DCBBurn03","DCBCargo01","DCBCargo02","DCBCargo03",
	"DCBCargo04","DCBCargo05","DCBCargo06","DCBCargo07","DCBCargo08","DCBCargo09","DCBCargo10","DCBComme01","DCBCra01","DCBCra02","DCBDarMu01","DCBDoc02","DCBDock01","DCBDock02","DCBDock03","DCBDock04","DCBDock05","DCBDock06",
	"DCBDock07","DCBDock08","DCBExecu01","DCBGate01","DCBGateR01","DCBGre01","DCBMagLv_RZ01","DCBMagLv_RZ02","DCBMagLv_RZ03","DCBMagLv_RZ04","DCBMagLv_RZ05","DCBMagLv_RZ06","DCBMagLv_RZ07","DCBMagLv01","DCBMagLv02","DCBMagLv03","DCBMagLv04","DCBMagLv05",
	"DCBMagLv06","DCBMagLv07","DCBOvP01","DCBOvP02","DCBOvP03","DCBOvP04","DCBOvP05","DCBOvP06","DCBParl","DCBPenta01","DCBPentaEn","DCBRuin01","DCBRuin02","DCBRuin03","DCBRuin04","DCBRuin05","DCBSen01","DCBSil01",
	"DCBSil02","DCBTerr_RZ01","DCBTerr_RZ02","DCBTerr_RZ03","DCBTerr_RZ04","DCBTerr_RZ05","DCBTerr_RZ06","DCBTerr01","DCBTerr01b","DCBTerr02","DCBTerr02b","DCBTerr03","DCBTerr04","DCBTerr05","DCBTerr06","DCBTreas01","DCBUrban01","DCBUrban02",
	"DCBUrban03","DCBUrban04","DCBUrban05","DCBUrban06","DCBWhite01","DCBWhiteBan","DCBWhiteBan2","DCBWin01","DCPAuto01","DCPAuto02","DCPAuto03","DCPAuto04","DCPAuto05","DCPAuto06","DCPAuto07","DCPAuto08","DCPBarriR01","DCPBarriR02",
	"DCPBench01","DCPBus","DCPCrane01","DCPDumpster01","DCPFarm01","DCPFarm02","DCPFence01","DCPFence02","DCPFence03","DCPFence04","DCPFence05","DCPFence06","DCPFence07","DCPFence08","DCPFence09","DCPFence10","DCPFence11","DCPFence12",
	"DCPFence13","DCPFence14","DCPFence15","DCPFence16","DCPFlag01","DCPFlag02","DCPFork01","DCPFount01","DCPGate01","DCPGrave01","DCPHavoc01","DCPHolo01","DCPHolo02","DCPHolo03","DCPHolo04","DCPHolo05","DCPHolo06","DCPHolo07",
	"DCPHolo08","DCPIwoJi01","DCPLand01","DCPLonEye","DCPPark01","DCPPark02","DCPPark03","DCPPark04","DCPPhone","DCPPlanter01","DCPPylon01","DCPPylon02","DCPRef01","DCPRef02","DCPRef03","DCPRef04","DCPRef05","DCPRef06",
	"DCPRivWall","DCPRocSign","DCPSign_RZ01","DCPSign_RZ02","DCPSign01","DCPSign02","DCPSign03","DCPSign04","DCPSign05","DCPSign06","DCPSign07","DCPStatue01","DCPStrLi01","DCPStrLi02","DCPStrLi03","DCPStrLi04","DCPStrLi05","DCPStrLi06",
	"DCPStrLi07","DCPStrSign_RZ01","DCPStrSign_RZ02","DCPStrSign_RZ03","DCPStrSign01","DCPStrSign02","DCPStrSign03","DCPSubway","DCPSupply01","DCPSupply02","DCPSupply03","DCPSupply04","DCPSupply05","DCPSupply06","DCPSupply07","DCPSupply08","DCPSupply09","DCPSupply10",
	"DCPTarmac01","DCPTarmac02","DCPTarmac03","DCPTarmac04","DCPTarmac05","DCPTarmac06","DCPTarmac07","DCPTerra01","DCPTireMarks01","DCPTireMarks02","DCPTireMarks03","DCPTireMarks04","DCPTireMarks05","DCPWall01","DCTBush01","DCTBush02","DCTBush03","DCTBush04",
	"DCTBush05","DCTBush06","DCTBush07","DCTCrop01","DCTree01","DCTree02","DCTree03","DCTree04","DCTree05","DCTree05b","DCTree06","DestLight_01","EarthMetaGame","Eastern_Europe_Apartment_Building_01","Eastern_Europe_Apartment_Building_02","Eastern_Europe_Apartment_Building_03","Eastern_Europe_Church_01","Eastern_Europe_Church_02",
	"Eastern_Europe_Church_03","Eastern_Europe_Church_04","Eastern_Europe_Church_05","Eastern_Europe_Farm_01","Eastern_Europe_Farm_02","Eastern_Europe_Government_Building_01","Eastern_Europe_Government_Building_02","Eastern_Europe_Hotel_01","Eastern_Europe_Hotel_02","Eastern_Europe_House_01","Eastern_Europe_House_02","Eastern_Europe_House_03","Eastern_Europe_House_04","Eastern_Europe_House_05","Eastern_Europe_Office_Building_01","Eastern_Europe_Office_Building_02","Eastern_Europe_Ruin_01","Eastern_Europe_Ruin_02",
	"Eastern_Europe_Ruin_03","Eastern_Europe_Ruin_04","Eastern_Europe_Ruin_05","Eastern_Europe_Ruin_06","Eastern_Europe_Ruin_07","Eastern_Europe_Ruin_08","Eastern_Europe_Ruin_09","EEBHan01","EEBMkt01","EEBMkt02","EEPAuto01","EEPAuto02","EEPAuto03","EEPAuto04","EEPAuto05","EEPAuto06","EEPAuto07","EEPAuto08",
	"EEPAuto09","EEPBnk01","EEPDump01","EEPFence01","EEPFence02","EEPFence03","EEPFence04","EEPFence05","EEPFence06","EEPFence07","EEPFnc01","EEPLit01","EEPLit02","EEPpln01","EEPpln02","EEPpwr01","EEPpwr02","EEPpyl01",
	"EEPSgn01","EEPSgn02","EEPSgn03","EEPSgn04","EEPSupply01","EEPwal01","EEPWal02","EEPWal03","EEPWal04","EEPWal05","EEPwal06","EGBMkt01_a","EGBMkt01_c","EGBMkt01_d","EGPBbd01","EGPLit01","EGPLit02","EGPpwr01",
	"EGPpwr02","EGPwal01","EGRLarge01","EGTbush01","EGTbush02","EGTbush03","EGTbush04","Egyptian_Apartment_Building_01","Egyptian_Apartment_Building_02","Egyptian_Apartment_Building_03","Egyptian_Drydock_01","Egyptian_Factory_01","Egyptian_Factory_02","Egyptian_Farm_01","Egyptian_Farm_02","Egyptian_Hotel_01","Egyptian_Hotel_02","Egyptian_Lighthouse_Radar_01",
	"Egyptian_Market_01","Egyptian_Market_01_b","Egyptian_Market_02","Egyptian_Mosque_01","Egyptian_Mosque_02","Egyptian_Office_Building_01","Egyptian_Office_Building_02","Egyptian_Office_Building_03","Egyptian_Office_Building_04","Egyptian_Port_Authority_01","Egyptian_Ruin_01","Egyptian_Ruin_02","Egyptian_Ruin_03","Egyptian_Ship_01","Egyptian_Warehouse_01","Egyptian_Warehouse_02","Egyptian_Warehouse_03","ExplodingBarrel",
	"FarmBarn","FarmBarnB","FarmCrop_01","FarmFence","FarmSilo","FarmTractor","FarmWindmill","GBTibWallHub","GDI_Bunker","GDI_GovBldg","GDI_ImportantBuilding","GDI_LabRadarBuilding","GDI_RadioTower_CM11","GDI_StDetect","GDI_StealthLab","GDI_TacBldg","GDI_TibLab","GDI_Treasury",
	"GDI_Wing","GDI_Wing2","GDIAirstrikeSPBombingRunTarget","GDIAirstrikeSPBombingRunTrigger","GDIAlarm","GDICarrier","GDIHovercraft","GDIParkedMiniOrca","GDIParkedOx","GDIPhil","GDIPowerStore","GDITibWallSeg","GenericTreeCrusher","Germany_Apartment_01","Germany_Apartment_02","Germany_Apartment_03","Germany_Apartment_04","Germany_Church_01",
	"Germany_Church_02","Germany_Church_03","Germany_Fountain_01","Germany_Futuristic_Building_01","Germany_Futuristic_Building_02","Germany_Futuristic_Building_03","Germany_Futuristic_Building_04","Germany_Futuristic_Building_05","Germany_Hotel_02","Germany_Iconic_Bridge_01_Center","Germany_Iconic_Bridge_01","Germany_Obelisk_01","Germany_Office_Building_01","Germany_Office_Building_02","Germany_Office_Building_03","Germany_Resort_01","Germany_Ruin_01","Germany_Ruin_02",
	"Germany_Ruin_03","Germany_Ruin_04","Germany_Ruin_05","Germany_Sports_Arena_01","Goddard_Space_Center_Building_01","Goddard_Space_Center_Building_02","Goddard_Space_Center_Building_03","Goddard_Space_Center_Futuristic_Building_01","Goddard_Space_Center_Futuristic_Building_02","Goddard_Space_Center_Futuristic_Building_03","Goddard_Space_Center_Radar_01","Goddard_Space_Center_Sign_01","GOTtree01","GRBRuin01","GRBRuin02","GRBRuin03","GRBRuin04","GRBZnE01",
	"GRPAuto01","GRPAuto02","GRPAuto03","GRPAuto04","GRPAuto05","GRPAuto06","GRPAuto07","GRPAuto08","GRPfence01","GRPFence02","GRPfence03","GRPFence04","GRPFence05","GRPFence06","GRPFence07","GRPfire01","GRPlight01","GRPlight02",
	"GRPlight03","GRPlight04","GRPnews01","GRPplanter01","GRPplanter02","GRPpower01","GRPpower02","GRPpylon01","GRPpylon02","GRPruin01","GRPruin02","GRPruin03","GRPruin04","GRPruin05","GRPRuin06","GRPRuin07","GRPsign01","GRPsign02",
	"GRPsign03","GRPsign04","GRPsign05","GRPStump01","GRPtrain01","GRPtrain02","GRPtrain03","GRPtrain04","GRPtrain05","GRPwall01","GRPwall02","GRPwall02b","GRPwall03","GRPwall04","GRPwall05","GRPwall06","GRTree01","hacorn01",
	"HARoad01","HATree01","HealCrate","Italian_Ruin_01","Italian_Ruin_02","Italian_Ruin_03","Italian_Ruin_04","Italian_Ruin_05","Italian_Ruin_06","Italian_Ruin_07","Italian_Ruin_08","Italian_Ruin_09","Italian_Ruin_10","Italian_Ruin_11","Italian_Ruin_12","Italian_Ruin_13","Italian_Ruin_14","Italian_Ruin_15",
	"Italian_Ruin_16","Italian_Ruin_17","Italian_Ruin_18","Italian_Ruin_19","Italian_Ruin_20","Italian_Ruin_21","Italian_Ruin_22","Italian_Ruin_23","Italian_Ruin_24","Italian_Ruin_25","Italian_Ruin_26","Italian_Ruin_27","ITBRui28","ITBRui29","ITBShk02","ITBShk03","ITPAuto01","ITPAuto02",
	"ITPAuto03","ITPAuto04","ITPAuto05","ITPAuto06","ITPAuto07","ITPAuto08","ITPBarr01","ITPBarr02","ITPCrate01","ITPCrate02","ITPDeadP01","ITPDeadP02","ITPDeadP03","ITPDeadP04","ITPDump01","ITPPwr01","ITPPwr02","ITPPwr03",
	"MoneyCrate","MutantHovel","NBTibWallHub","NCPShop01","NCPShop02","NCPShop03","NOD_AirfieldControlTower","NOD_Battleship","Nod_Bunker","NOD_CommandCenter","NOD_CommandCenter2","NOD_CommandCenter3","NOD_CommandCenter4","NOD_DockCargoLoadingCrane","NOD_DockHQ","NOD_DockHQ2","NOD_DockHQ3","NOD_DockHQ4",
	"NOD_IonDisruptionFieldGenerator","NOD_LabRadarBuilding","NOD_LaunchFacility","NOD_ManufacturingFacility1","NOD_ManufacturingFacility2","NOD_ManufacturingFacility3","NOD_NBBHStatue","NOD_NBContNode","NOD_PortAuthority","NOD_Silo","NOD_Silo_LaunchBase","NOD_Silo01","NOD_Silo02","NOD_Silo03","NOD_Silo04","NOD_Silo05","NOD_Silo06","NOD_Silo07",
	"NOD_Silo08","NOD_Silo09","NOD_Silo0CL","NOD_Silo10","NOD_Silo11","NOD_Silo12","NOD_Silo13","NOD_SiloCR","NOD_SiloMis","NOD_StrongholdBuilding1","NOD_StrongholdBuilding2","NOD_StrongholdBuilding2a","NOD_StrongholdBuilding2b","NOD_StrongholdBuilding3","NOD_StrongholdBuilding4","NOD_StrongholdBuilding5","NOD_StrongholdBuilding6","NOD_TemplePrime",
	"NOD_TransportationHubMotorPool","NOD_WeaponsLabFacility","NODCarryall_SP","NODCarryallInfantry_SP_Militants","NODHovercraft","NODMarcionTransport","NODParkedCarryall","NODParkedFlameTank","NODParkedMCV","NODParkedRaiderBuggy","NODParkedRaiderTank","NODParkedStealthTank","NODParkedVenom","NODParkedVertigoBomber","NODPowerStore","NodTibWallSeg","NODVertigo_SPBombingRun","NODVertigo_SPBombingRunTarget",
	"North_Carolina_Barn_01","North_Carolina_Barn_02","North_Carolina_Factory_01","North_Carolina_Grocery_Store_01","North_Carolina_House_01","North_Carolina_House_02","North_Carolina_Outdoor_Mall_01","North_Carolina_Ruin_01","North_Carolina_Ruin_02","North_Carolina_Ruin_03","North_Carolina_Ruin_04","North_Carolina_Warehouse_01","North_Carolina_Warehouse_02","ParkBench","ParkPaths","ParkPicnic","ParkPlant02","ParkPlant03",
	"ParkPlygrnd01","ParkPlygrnd02","ParkPool","ParkStatue","ParkTable","Philadelphia","plane_crash","PM_3Wheel01","PM_3Wheel02","PM_3Wheel03","PM_3Wheel04","PM_Hatchback01","PM_Hatchback02","PM_Hatchback03","PM_Hatchback04","PM_Limo01","PMAuto01","PMAuto02",
	"PMAuto03","PMAuto04","PMBillboard01","PMBillboard02","PMEgyDock01","PMEgyDock01b","PMEgyDock02","PMEgyDock03","PMEgyDock04","PMEgyOilPipe","PMEgyOilPipeB","PMEgyOilPipeC","PMEgyOilWell01","PMEgyOilWell02","PMEgyOilWell03","PMEgyOilWell04","PMEgyPod01","PMEgyPod02",
	"PMEgySupplies09","PMEgySupplies10","PMEgySupplies11","PMiscEgyBarr01","PMiscEgyBarr02","PMiscEgyCrat01","PMiscEgyCrat02","PMiscEgyDebr01","PMiscEgyDebr02","PMiscEgyDebr03","PMiscEgyDebr04","PMiscEgyDebr05","PMiscEgyDump01","PMiscEgyFenc01","PMiscEgyFenc02","PMiscEgyFuel01","PMiscEgyLand01","PMiscEgyPowe01",
	"PMiscEgyPowe02","PMiscEgyStum01","PMiscEgySupp01","PMiscEgySupp02","PMiscEgySupp03","PMiscEgySupp04","PMiscEgySupp05","PMiscEgySupp06","PMiscEgySupp07","PMiscEgySupp08","PMiscEgyWrec01","PMiscEgyWrec02","PMiscEgyWrec03","PMiscEgyWrec04","PMiscEgyWrec05","PMiscEgyWrec06","PMShopCart01","PMShopCart02",
	"PMShopCart03","PMShopSign01","PMWreckedAuto01","PMWreckedAuto02","PMWreckedAuto03","PMWreckedAuto04","PMWreckedAuto05","PMWreckedAuto06","PMWreckedAuto07","PShrubEgy01","PShrubEgy02","PShrubEgy03","PTreeEgy01","RedZoneOverpass","RedZoneRubble01","RedZoneRubble02","RedZoneRubble03","RedZoneRubble04",
	"RedZoneRubble05","RedZoneRubble06","RedZoneRubble07","RedZoneRubble08","RedZoneRubble09","ReinforcementBay","Ripples_01","Ripples_02","Ripples_03","Rubble_Carryall","Rubble_Devastator","Rubble_Dropship","Rubble_Firehawk","Rubble_Mammoth","Rubble_Mk2_01","Rubble_Orca","Rubble_Pitbull","Rubble_Predator",
	"Rubble_Titan01","Rubble_Titan02","Rubble_Transport","RubbledBuilding01","RubbledBuilding02","RubbledBuilding03","RubbledBuilding04","RubbledBuilding05","RubbledBuilding06","RUProp01","RUProp02","RUTree01","RUTree02","RUTree03","RUTree04","RUTree05","RUWall01","RUWall02",
	"RUWall03","SalvageCrate","SatelliteLaunchFacility","ShroudCrate","SiegeBarriers","SiegeBarriers10","SiegeBarriers5","SubwayHub","SubwayNode","TacitusBarrier","TallTree","TargetDummy","TemplePrimeRamp01","TestBridge_Center","TestBridge_Center2","TestBridge_End","TestBridge_GateHouse","TestBridge",
	"TibCell01","TiberiumChasmCluster01","TiberiumCollapsableTower","TiberiumFieldFromHarvesterDeath","TiberiumFieldFromTiberiumSilo","TiberiumShaft01","TiberiumShaft02","TiberiumShaft03","TiberiumSilo","TiberiumSmallField01","TiberiumVent01","TiberiumVent02","TibTree01","TibTree02","TrainingStation","TUTORIAL_ADVMOVEMENT","TUTORIAL_ADVSELECTION","TUTORIAL_Attacking",
	"TUTORIAL_BUILDING","TUTORIAL_CAMERA","TUTORIAL_CONTEXT","TUTORIAL_DEFAULT","TUTORIAL_DPAD","TUTORIAL_GROUPS","Tutorial_Interface","TUTORIAL_MOVEMENT","TUTORIAL_POWERS","TUTORIAL_SELECTION","TUTORIAL_SKIRMISH","TUTORIAL_Stances","TUTORIAL_UNITS","TUTORIAL_Upgrades","UnitCrate","VeterancyCrate","Washington_DC_Barracks_01","Washington_DC_Department_of_Labor_01",
	"Washington_DC_Diamond_Shaped_Building_01","Washington_DC_Drydock_01","Washington_DC_Encounters_Building_01","Washington_DC_Hangar_01","Washington_DC_Hangar_02","Washington_DC_Hotel_01","Washington_DC_Hotel_02","Washington_DC_L_Shaped_Building_01","Washington_DC_Lighthouse_Radar_01","Washington_DC_Office_Building_01","Washington_DC_Personnel_Building_01","Washington_DC_Port_Authority_01","Washington_DC_Saucer_Shaped_Building_01","Washington_DC_Ship_01","Washington_DC_Ship_02","Washington_DC_Tower_01","Washington_DC_Warehouse_01","Washington_DC_Warehouse_02",
	"Washington_DC_Warehouse_03","Washington_DC_Warehouse_04","Washington_DC_Warehouse_05","Washington_DC_Warehouse_06","Washington_DC_Warehouse_07","Washington_DC_Wedding_Cake_Building_01","Washington_DC_X_Shaped_Building_01","Washington_Pentagon_Barrier_01","WaterFountain1AmbientLoop","WtrSkyboxEgypt","YellowZoneSkyA","ZoneWall"
}

RelevantNonLuaObjectsTypeTable={
	"AlienFoundry","AlienPowerProjector","AlienSporePod","AlienTiberiumTower","GDICrane","GDIWallHub","NODWallHub","Reaper17Foundry",
	"Reaper17PowerProjector","Reaper17TiberiumTower","SteelTalonsCrane","Traveler59Foundry","Traveler59PowerProjector","Traveler59SporePod","Traveler59TiberiumTower","ZOCOMCrane","AlienAnnihilatorTripodHusk","AlienCrystalShield","AlienMiniMCVOutpost",
	"AlienPlasmaCannon","AlienRepairDroneTower","AlienTibHive","AlienWormHole","AlienWormHoleMarker","BlackHandShredderTurretSpawnHole","GDIDigInBuilding","GDIDigInBuildingPlaceholder","GDIDropPod",
	"GDIDropPod_DR01","GDIDropPod_DR02","GDIDropPod_DR03","GDIFuelDepot","GDIMine","GDIMiniMCVOutpost","GDIWallSegment",
	"MarkedOfKaneMagneticMine","MarkedOfKaneShredderTurretSpawnHole","MG_Alien_Tower","NODBridgeBoobyTrap","NODExplosiveCharge","NODMine","NODShredderTurretSpawnHole",
	"NODWallSegment","Reaper17MiniMCVOutpost","RiftGeneratorWeaponObject","SteelTalonsMiniMCVOutpost","Traveler59AnnihilatorTripodHusk",
	"Traveler59MiniMCVOutpost","Traveler59TemporalWormhole","ZOCOMDropPod","ZOCOMMiniMCVOutpost","MetaTechCrane",
	"RallyPointMarker"
}

RelevantObjectTypeTable={ 
	"AlienBuzzerHive","AlienControlCenter","AlienDronePlatform","AlienFoundry","AlienGateway","AlienLightningSpike","AlienPhotonCannon","AlienPlasmaMissileBattery","AlienPortal","AlienPowerProjector","AlienReactor","AlienRiftGenerator","AlienSignalTransmitter","AlienSporePod","AlienStatisChamber","AlienStormColumn","AlienTiberiumTower","AlienWarpBeacon","MG_Alien_Hive","AlienMiniMCVOutpost",
	"GDIAABattery","GDIMiniMCVOutpost","GDIDigInBuilding","GDIAirTower","GDIArmory","GDIBarracks","GDIBattleBase","GDICommandPost","GDIConstructionYard","GDICrane","GDIGolumCannon","GDIIonCannonControl","GDIMedicalBay","GDIMiniMCVOutpost","GDIPowerPlant","GDIRefinery","GDISpaceCommandUplink","GDITerraformingStation","GDITiberiumSilo","GDIWarFactory","GDIWatchTower","MG_GDI_ReclamatorHub",
	"NODConstructionYard","NODMiniMCVOutpost","NODCrane","NODDisruptionTower","NODDropZone","NODHandOfNOD","NODHangar","NODLaserCannon","NODLaserCannonSpawn","NODMiniMCVOutpost","NODObelisk","NODOperationsCenter","NODPowerPlant","NODRefinery","NODRocketBunker","NODRocketBunkerSpawn","NODShredderTurret","NODShredderTurretHub","NODTechAssemblyPlant","NODTempleOfNOD","NODTiberiumLiquidationFacility","MG_Nod_WarmechFacility",
	"BlackHandConstructionYard","BlackHandMiniMCVOutpost","BlackHandPowerPlant","BlackHandRefinery","BlackHandHandOfNod","BlackHandDropZone","BlackHandOperationsCenter","BlackHandSecretShrine","BlackHandTechAssemblyPlant","BlackHandShredderTurretHub","BlackHandLaserCannon","BlackHandRocketBunker","BlackHandTiberiumSilo","BlackHandPropagandaTower","BlackHandObelisk","BlackHandTempleOfNOD","BlackHandTiberiumLiquidationFacility","BlackHandCrane","BlackHandEmissary","MG_BlackHand_WarmechFacility",
	"MarkedOfKaneConstructionYard","MarkedOfKaneMiniMCVOutpost","MarkedOfKanePowerPlant","MarkedOfKaneRefinery","MarkedOfKaneHandOfNod","MarkedOfKaneDropZone","MarkedOfKaneOperationsCenter","MarkedOfKaneHangar","MarkedOfKaneSecretShrine","MarkedOfKaneTechAssemblyPlant","MarkedOfKaneTiberiumLiquidationFacility","MarkedOfKaneShredderTurretHub","MarkedOfKaneLaserCannon","MarkedOfKaneRocketBunker","MarkedOfKaneTiberiumSilo","MarkedOfKaneDisruptionTower","MarkedOfKanePropagandaTower","MarkedOfKaneObelisk","MarkedOfKaneTempleOfNOD","MarkedOfKaneAirSupport","MarkedOfKaneCrane","MG_MarkedOfKane_WarmechFacility","MarkedOfKaneEmissary",
	"SteelTalonsConstructionYard","SteelTalonsMiniMCVOutpost","SteelTalonsPowerPlant","SteelTalonsRefinery","SteelTalonsBarracks","SteelTalonsWarfactory","SteelTalonsCommandPost","SteelTalonsAirTower","SteelTalonsTechCenter","SteelTalonsSpaceCommandUplink","MG_SteelTalons_ReclamatorHub","SteelTalonsWatchTower","SteelTalonsGolumCannon","SteelTalonsAABattery","SteelTalonsTiberiumSilo","SteelTalonsIonCannonControl","SteelTalonsCrane","SteelTalonsAirSupport","SteelTalonsSurveyor",
	"ZOCOMConstructionYard","ZOCOMMiniMCVOutpost","ZOCOMPowerPlant","ZOCOMRefinery","ZOCOMBarracks","ZOCOMWarFactory","ZOCOMCommandPost","ZOCOMAirTower","ZOCOMMedicalBay","ZOCOMArmory","ZOCOMSpaceCommandUplink","MG_ZOCOM_ReclamatorHub","ZOCOMWatchTower","ZOCOMGolumCannon","ZOCOMAABattery","ZOCOMTiberiumSilo","ZOCOMTerraformingStation","ZOCOMIonCannonControl","ZOCOMCrane","ZOCOMAirSupport","ZOCOMSurveyor",
	"Reaper17DronePlatform","Reaper17MiniMCVOutpost","Reaper17PowerProjector","Reaper17TiberiumTower","Reaper17Portal","Reaper17Gateway","Reaper17BuzzerHive","Reaper17PhotonCannon","Reaper17PlasmaMissileBattery","Reaper17GrowthStimulator","Reaper17ControlCenter","Reaper17StormColumn","Reaper17WarpBeacon","Reaper17StasisChamber","Reaper17Reactor","Reaper17SignalTransmitter","Reaper17RiftGenerator","Reaper17Explorer","Reaper17Foundry","MG_Reaper17_Hive",
	"Traveler59DronePlatform","Traveler59MiniMCVOutpost","Traveler59PowerProjector","Traveler59TiberiumTower","Traveler59Portal","Traveler59Gateway","Traveler59BuzzerHive","Traveler59PhotonCannon","Traveler59PlasmaMissileBattery","Traveler59SporePod","Traveler59ControlCenter","Traveler59StormColumn","Traveler59WarpBeacon","Traveler59StatisChamber","Traveler59Reactor","Traveler59SignalTransmitter","Traveler59RiftGenerator","Traveler59Explorer","Traveler59Foundry","MG_Traveler59_Hive",
	"AlienAnnihilatorTripod","AlienAssimilator","AlienBuzzers","AlienCorrupter","AlienDevastatorWarship","AlienDevourerTank","AlienExplorer","AlienGunWalker","AlienHarvester","AlienMastermind","AlienMCV","AlienMothership","AlienPlanetaryAssaultCarrier","AlienRazorDroneSquad","AlienSeekerTank","AlienShockTrooperSquad","AlienStormrider","AlienRazorDrones",
	"GDIAPC","GDICommando","GDIEngineer","GDIFireHawk","GDIGrenadeSoldierSquad","GDIHarvester","GDIJuggernaught","GDIMammoth","GDIMCV","GDIMissileSoldierSquad","GDIOrca","GDIPitbull","GDIPredator","GDIRifleSoldierSquad","GDIRig","GDISniperSquad","GDISurveyor","GDIZoneTrooperSquad","GDISniper","GDIRifleSoldier","GDIMissileSoldier","GDIZoneTrooper","GDIZoneTrooperSquad_Veteran","GDIMissileSoldierSquad_Veteran","GDIRifleSoldierSquad_Veteran","GDISniperSquad_Vetereran","GDIAPC_Veteran","GDIPitbull_Veteran",
	"NODAttackBike","NODAvatar","NODBeamCannon","NODBlackHandSquad","NODCommando","NODEmissary","NODFanaticSquad","NODFlameTank","NODHarvester","NODMCV","NODMilitantRocketSquad","NODMilitantSquad","NODRaiderTank","NODSaboteur","NODScorpionBuggy","NODShadowSquad","NODStealthTank","NODVenom","NODVertigo","NodShadow","NodMilitant","NodMilitantB","NodMilitantRocket","NodShadowSquad_Veteran",
	"SteelTalonsAAScout","SteelTalonsAPC","SteelTalonsBehemoth","SteelTalonsBehemothHusk","SteelTalonsCombatEngineer","SteelTalonsFirehawk","SteelTalonsBattleBase","SteelTalonsGrenadeSoldierSquad","SteelTalonsHammerhead","SteelTalonsHeavyHarvester","SteelTalonsMammoth","SteelTalonsMARV","SteelTalonsMCV","SteelTalonsMissileSoldierSquad","SteelTalonsOrca","SteelTalonsPitbull","SteelTalonsPredator","SteelTalonsRepairAPC","SteelTalonsRifleSoldierSquad","SteelTalonsRig","SteelTalonsSurveyor","SteelTalonsTitan","SteelTalonsWolverine","SteelTalonsZoneTrooper","SteelTalonsRifleSoldier","SteelTalonsMissileSoldier","SteelTalonsZoneTrooper","SteelTalonsRifleSoldierSquad_Veteran","SteelTalonsMissileSoldierSquad_Veteran","SteelTalonsZoneTrooperSquad_Veteran","SteelTalonsAPC_Veteran","SteelTalonsWolverine_Veteran","SteelTalonsPitbull_Veteran","SteelTalonsRepairAPC_Veteran",
	"ZOCOMAAScout","ZOCOMAPC","ZOCOMCommando","ZOCOMEngineer","ZOCOMFirehawk","ZOCOMBattleBase","ZOCOMGrenadierSoldierSquad","ZOCOMHammerhead","ZOCOMHarvester","ZOCOMImprovedSonicTank","ZOCOMMammoth","ZOCOMMARV","ZOCOMMCV","ZOCOMMissileSoldierSquad","ZOCOMOrca","ZOCOMPitbull","ZOCOMPredator","ZOCOMRifleSoldierSquad","ZOCOMRig","ZOCOMSniperSquad","ZOCOMSurveyor","ZOCOMRifleSoldier","ZOCOMSniper","ZOCOMMissileSoldier","ZOCOMZoneRaider","ZOCOMRifleSoldierSquad_Veteran","ZOCOMMissileSoldierSquad_Veteran","ZOCOMZoneRaiderSquad_Veteran","ZOCOMSniperSquad_Vetereran","ZOCOMAPC_Veteran","ZOCOMPitbull_Veteran",
	"BlackHandAttackBike","BlackHandBeamCannon","BlackHandBlackHand","BlackHandBunkerTruck","BlackHandCommando","BlackHandConfessor","BlackHandConfessorSquad","BlackHandCustomWarmech","BlackHandFanatic","BlackHandFlameTank","BlackHandHarvester","BlackHandMCV","BlackHandMetaUnit","BlackHandMilitantSquad","BlackHandMilitantRocketSuqad","BlackHandMobileArtillery","BlackHandMobileArtilleryBombard","BlackHandCustomWarmechHusk","BlackHandRaiderBuggy","BlackHandSaboteur","BlackHandRaiderTank","BlackHandStealthTank","BlackHandMilitantRocket","BlackHandMilitant","BlackHandMilitantB",
	"MarkedOfKaneAvatar","MarkedOfKaneAvatarHusk","MarkedOfKaneBeamCannon","MarkedOfKaneBunkerTruck","MarkedOfKaneCommando","MarkedOfKaneFanaticSquad","MarkedOfKaneHarvester","MarkedOfKaneImprovedCyborgInfantrySquad","MarkedOfKaneMCV","MarkedOfKaneMetaUnit","MarkedOfKaneMilitantSquad","MarkedOfKaneMilitantRocketSuqad","MarkedOfKaneMobileArtillery","MarkedOfKaneRaiderScorpionBuggy","MarkedOfKaneSaboteur","MarkedOfKaneRaiderTank","MarkedOfKaneShadow","MarkedOfKaneStealthTank","MarkedOfKaneVenom","MarkedOfKaneVertigo","MarkedOfKaneShadow","MarkedOfKaneMilitantRocket","MarkedOfKaneTibTrooperSquad","MarkedOfKaneImprovedCyborgInfantry","MarkedOfKaneFanatic",
	"Reaper17AnnihilatorTripod","Reaper17AnnihilatorTripodHusk","Reaper17Corrupter","Reaper17DevourerTank","Reaper17EradicatorHexapod","Reaper17Explorer","Reaper17Harvester","Reaper17MCV","Reaper17ShardWalker","Reaper17ShockTrooper","Reaper17Stalker","Reaper17Stormrider",
	"Traveler59AnnihilatorTripod","Traveler59Assimilator","Traveler59BlinkMastermind","Traveler59Corrupter","Traveler59Cultist","Traveler59DevastatorWarship","Traveler59EradicatorHexapod","Traveler59Explorer","Traveler59GunWalker","Traveler59Harvester","Traveler59MCV","Traveler59PlanetaryAssaultCarrier","Traveler59RazorDroneSquad","Traveler59SeekerTank","Traveler59ShockTrooper","Traveler59Stalker","Traveler59Stormrider","Traveler59RazorDrone",
	"GDIDropPod","GDIOrcaSensorPod","BlackHandCommandoBeacon",
	"GuardShieldEmitter","MetaTechMCV","MetaTechSuperAvatar","MetaTechBarracks","MetaTechCommandPost","MetaTechConstructionYard","MetaTechCrane","MetaTechHangar","MetaTechMedicalBay","MetaTechReclamatorHub","MetaTechTechCenter","MetaTechWarFactory"
}

RelevantObjectHashIndexTypeTable={  --these objects have lua registration and can be found in the globals() table --old needs update
	["68593967"]="AlienBuzzerHive",["4005307538"]="AlienControlCenter",["4277513717"]="AlienDronePlatform",["4278029493"]="AlienGateway",["1790899068"]="AlienLightningSpike",["4105382990"]="AlienPhotonCannon",["3053741411"]="AlienPlasmaMissileBattery",["2459686593"]="AlienPortal",["2501601210"]="AlienReactor",["944677863"]="AlienRiftGenerator",["3809858739"]="AlienSignalTransmitter",["3249535276"]="AlienStatisChamber",["1113391268"]="AlienStormColumn",["1183416773"]="AlienWarpBeacon",
	["2907988778"]="GDIAABattery",["2199177120"]="GDIAirTower",["867437679"]="GDIArmory",["332753075"]="GDIBarracks",["2150169165"]="GDIBattleBase",["3781531209"]="GDICommandPost",["1963689327"]="GDIConstructionYard",["894742678"]="GDIGolumCannon",["4059391770"]="GDIIonCannonControl",["291376689"]="GDIMedicalBay",["596796102"]="GDIPowerPlant",["380136808"]="GDIRefinery",["2167863030"]="GDISpaceCommandUplink",["3439867302"]="GDITerraformingStation",["352599915"]="GDITiberiumSilo",["2596103596"]="GDIWarFactory",["1051033844"]="GDIWatchTower",
	["3514124163"]="NODConstructionYard",["1719459484"]="NODCrane",["1553745000"]="NODDisruptionTower",["580140829"]="NODDropZone",["1916828239"]="NODHandOfNOD",["3586535492"]="NODHangar",["3226449953"]="NODLaserCannon",["2395565189"]="NODLaserCannonSpawn",["798795912"]="NODMiniMCVOutpost",["3868904616"]="NODObelisk",["2758452353"]="NODOperationsCenter",["2738079400"]="NODPowerPlant",["3050468790"]="NODRefinery",["2182292141"]="NODRocketBunker",["4191971488"]="NODRocketBunkerSpawn",["4212397519"]="NODShredderTurret",["1314385739"]="NODShredderTurretHub",["3861967411"]="NODTechAssemblyPlant",["1670123888"]="NODTempleOfNOD",["2405528079"]="NODTiberiumLiquidationFacility",
	["3489768722"]="BlackHandConstructionYard",["700254408"]="BlackHandPowerPlant",["100072016"]="BlackHandRefinery",["1881126022"]="BlackHandHandOfNod",["744653454"]="BlackHandDropZone",["587542384"]="BlackHandOperationsCenter",["258129317"]="BlackHandSecretShrine",["1872037456"]="BlackHandTechAssemblyPlant",["2566151430"]="BlackHandShredderTurretHub",["842149963"]="BlackHandLaserCannon",["4122814948"]="BlackHandRocketBunker",["3169264583"]="BlackHandTiberiumSilo",["3616161493"]="BlackHandPropagandaTower",["2373507443"]="BlackHandTempleOfNOD",["3458227666"]="BlackHandTiberiumLiquidationFacility",["168221011"]="BlackHandCrane",["2102790892"]="BlackHandEmissary",
	["2240770736"]="MarkedOfKaneConstructionYard",["3186266847"]="MarkedOfKanePowerPlant",["1088200982"]="MarkedOfKaneRefinery",["3872699996"]="MarkedOfKaneDropZone",["3331955598"]="MarkedOfKaneOperationsCenter",["2386700586"]="MarkedOfKaneHangar",["2329896961"]="MarkedOfKaneSecretShrine",["4154127587"]="MarkedOfKaneTechAssemblyPlant",["3576851614"]="MarkedOfKaneTiberiumLiquidationFacility",["2170679445"]="MarkedOfKaneShredderTurretHub",["1070053604"]="MarkedOfKaneLaserCannon",["2639459287"]="MarkedOfKaneRocketBunker",["399887018"]="MarkedOfKaneTiberiumSilo",["2091770787"]="MarkedOfKaneDisruptionTower",["324108153"]="MarkedOfKanePropagandaTower",["2703520950"]="MarkedOfKaneTempleOfNOD",["1979182309"]="MarkedOfKaneAirSupport",["1733547210"]="MarkedOfKaneCrane",["3183713661"]="MarkedOfKaneEmissary",
	["3381940374"]="SteelTalonsConstructionYard",["3858223515"]="SteelTalonsPowerPlant",["1278094373"]="SteelTalonsRefinery",["882621777"]="SteelTalonsBarracks",["1084321921"]="SteelTalonsWarfactory",["694935703"]="SteelTalonsCommandPost",["4004273719"]="SteelTalonsAirTower",["1815125931"]="SteelTalonsTechCenter",["258215728"]="SteelTalonsSpaceCommandUplink",["1866269769"]="SteelTalonsWatchTower",["898545124"]="SteelTalonsGolumCannon",["1551902107"]="SteelTalonsAABattery",["745452156"]="SteelTalonsTiberiumSilo",["23350187"]="SteelTalonsIonCannonControl",["3747068994"]="SteelTalonsAirSupport",["4092691421"]="SteelTalonsSurveyor",
	["1801077552"]="ZOCOMConstructionYard",["887561926"]="ZOCOMPowerPlant",["3127011197"]="ZOCOMRefinery",["1357601015"]="ZOCOMBarracks",["2401382389"]="ZOCOMWarFactory",["3537949332"]="ZOCOMCommandPost",["4072220311"]="ZOCOMAirTower",["3882856207"]="ZOCOMArmory",["525661890"]="ZOCOMSpaceCommandUplink",["1345260202"]="ZOCOMWatchTower",["1647247595"]="ZOCOMGolumCannon",["4099523718"]="ZOCOMAABattery",["3536484668"]="ZOCOMTiberiumSilo",["144548681"]="ZOCOMTerraformingStation",["1067695218"]="ZOCOMIonCannonControl",["4136229536"]="ZOCOMAirSupport",["4253616897"]="ZOCOMSurveyor",
	["3923673017"]="Reaper17DronePlatform",["950315488"]="Reaper17Portal",["2593223505"]="Reaper17Gateway",["667107644"]="Reaper17BuzzerHive",["3130415049"]="Reaper17PhotonCannon",["265642851"]="Reaper17PlasmaMissileBattery",["3689489833"]="Reaper17GrowthStimulator",["4021609152"]="Reaper17ControlCenter",["1751309187"]="Reaper17StormColumn",["979676758"]="Reaper17WarpBeacon",["3945608163"]="Reaper17StasisChamber",["3755810217"]="Reaper17Reactor",["204938282"]="Reaper17SignalTransmitter",["2768470878"]="Reaper17RiftGenerator",["4092129615"]="Reaper17Explorer",
	["1045578362"]="Traveler59DronePlatform",["2906365133"]="Traveler59Portal",["1464056924"]="Traveler59Gateway",["3580113147"]="Traveler59BuzzerHive",["1789432218"]="Traveler59PhotonCannon",["945628840"]="Traveler59PlasmaMissileBattery",["1961941872"]="Traveler59ControlCenter",["1651080236"]="Traveler59StormColumn",["1900739263"]="Traveler59WarpBeacon",["1943362252"]="Traveler59StatisChamber",["2599918733"]="Traveler59Reactor",["1042838317"]="Traveler59SignalTransmitter",["1132033882"]="Traveler59RiftGenerator",["2357377132"]="Traveler59Explorer",
	["3805790263"]="AlienAnnihilatorTripod",["2861908637"]="AlienAssimilator",["2384886255"]="AlienBuzzers",["2007034025"]="AlienCorrupter",["1122195248"]="AlienDevastatorWarship",["2946044786"]="AlienDevourerTank",["1267973868"]="AlienExplorer",["27610139"]="AlienGunWalker",["350440930"]="AlienHarvester",["4127320940"]="AlienMastermind",["820198441"]="AlienMCV",["518911667"]="AlienMothership",["350932745"]="AlienPlanetaryAssaultCarrier",["731130064"]="AlienRazorDroneSquad",["3095406435"]="AlienSeekerTank",["1687549193"]="AlienShockTrooperSquad",["4142335957"]="AlienStormrider",
	["3491560840"]="GDIAPC",["3703068792"]="GDICommando",["1693375322"]="GDIEngineer",["3006676643"]="GDIFireHawk",["1116299360"]="GDIGrenadeSoldierSquad",["220562260"]="GDIHarvester",["843615794"]="GDIJuggernaught",["3154774089"]="GDIMammoth",["1385386646"]="GDIMCV",["4010955483"]="GDIMissileSoldierSquad",["3045524383"]="GDIOrca",["1878337544"]="GDIPitbull",["3874148396"]="GDIPredator",["2425788014"]="GDIRifleSoldierSquad",["3029069266"]="GDIRig",["3165874693"]="GDISniperSquad",["2451310284"]="GDISurveyor",["1566464305"]="GDIZoneTrooperSquad",
	["3144715221"]="NODAttackBike",["3154900504"]="NODAvatar",["1335753027"]="NODBeamCannon",["19442673"]="NODBlackHandSquad",["3672109216"]="NODCommando",["315538775"]="NODEmissary",["3195811997"]="NODFanaticSquad",["4253557425"]="NODFlameTank",["977080474"]="NODHarvester",["138622706"]="NODMCV",["2311346244"]="NODMilitantRocketSquad",["3157665146"]="NODMilitantSquad",["49877789"]="NODRaiderTank",["2740814684"]="NODSaboteur",["1666470685"]="NODScorpionBuggy",["2799763464"]="NODShadowSquad",["2511757"]="NODStealthTank",["2334830347"]="NODVenom",["1789238550"]="NODVertigo",
	["1257948904"]="SteelTalonsAAScout",["678291396"]="SteelTalonsAPC",["1393982803"]="SteelTalonsBehemoth",["2454939462"]="SteelTalonsBehemothHusk",["2162161113"]="SteelTalonsCombatEngineer",["323537418"]="SteelTalonsFirehawk",["3671849580"]="SteelTalonsHammerhead",["4113231583"]="SteelTalonsHeavyHarvester",["1448863781"]="SteelTalonsMARV",["1048504193"]="SteelTalonsMCV",["1809299627"]="SteelTalonsOrca",["207849440"]="SteelTalonsPitbull",["2093312067"]="SteelTalonsRepairAPC",["2195121624"]="SteelTalonsRig",["4092691421"]="SteelTalonsSurveyor",["1013465808"]="SteelTalonsTitan",["1547951759"]="SteelTalonsWolverine",["3781304154"]="SteelTalonsZoneTrooper",
	["1516258492"]="ZOCOMAAScout",["1690087686"]="ZOCOMAPC",["799347858"]="ZOCOMCommando",["9593062"]="ZOCOMEngineer",["1121278001"]="ZOCOMFirehawk",["4198989482"]="ZOCOMHammerhead",["3258661397"]="ZOCOMHarvester",["2926777231"]="ZOCOMImprovedSonicTank",["938518005"]="ZOCOMMARV",["856485008"]="ZOCOMMCV",["4205217600"]="ZOCOMOrca",["2908684823"]="ZOCOMPitbull",["1875583768"]="ZOCOMRig",["4253616897"]="ZOCOMSurveyor",
	["696000818"]="BlackHandAttackBike",["2136759514"]="BlackHandBeamCannon",["2801258734"]="BlackHandBlackHand",["428602625"]="BlackHandBunkerTruck",["1313610083"]="BlackHandCommando",["3583409476"]="BlackHandConfessor",["266270183"]="BlackHandConfessorSquad",["1014761723"]="BlackHandCustomWarmech",["3039749024"]="BlackHandFanatic",["505081534"]="BlackHandFlameTank",["560340475"]="BlackHandHarvester",["1533894628"]="BlackHandMCV",["3445248864"]="BlackHandMetaUnit",["3965962140"]="BlackHandMilitantRocketSuqad",["2053347994"]="BlackHandMobileArtillery",["673845731"]="BlackHandSaboteur",["4085650877"]="BlackHandStealthTank",["1024735831"]="MarkedOfKaneBeamCannon",
	["805339674"]="MarkedOfKaneBunkerTruck",["1080857772"]="MarkedOfKaneCommando",["2946093985"]="MarkedOfKaneFanaticSquad",["3279444990"]="MarkedOfKaneHarvester",["3355984486"]="MarkedOfKaneImprovedCyborgInfantrySquad",["3011801859"]="MarkedOfKaneMCV",["1897535711"]="MarkedOfKaneMetaUnit",["3012487848"]="MarkedOfKaneMilitantRocketSuqad",["2589147079"]="MarkedOfKaneMobileArtillery",["2795684308"]="MarkedOfKaneSaboteur",["1334603167"]="MarkedOfKaneShadow",["270907659"]="MarkedOfKaneStealthTank",["602416393"]="MarkedOfKaneVenom",["960382060"]="MarkedOfKaneVertigo",
	["1306091781"]="Reaper17AnnihilatorTripod",["2362841443"]="Reaper17AnnihilatorTripodHusk",["2978478202"]="Reaper17Corrupter",["1097793023"]="Reaper17DevourerTank",["342632592"]="Reaper17EradicatorHexapod",["4092129615"]="Reaper17Explorer",["3279909415"]="Reaper17Harvester",["4006428288"]="Reaper17MCV",["2144140771"]="Reaper17ShardWalker",["1609077176"]="Reaper17ShockTrooper",["2817508979"]="Reaper17Stalker",["502803990"]="Reaper17Stormrider",
	["1955351586"]="Traveler59AnnihilatorTripod",["3755881343"]="Traveler59Assimilator",["1602225375"]="Traveler59BlinkMastermind",["2444605085"]="Traveler59Corrupter",["3090055454"]="Traveler59Cultist",["2975757644"]="Traveler59DevastatorWarship",["2768054299"]="Traveler59EradicatorHexapod",["2357377132"]="Traveler59Explorer",["1363345491"]="Traveler59GunWalker",["2575537599"]="Traveler59Harvester",["690860851"]="Traveler59MCV",["259097660"]="Traveler59PlanetaryAssaultCarrier",["1922468124"]="Traveler59SeekerTank",["1499625309"]="Traveler59ShockTrooper",["1439301044"]="Traveler59Stalker",["3969942881"]="Traveler59Stormrider",
	["105176262"]="GDIOrcaSensorPod",["1847717182"]="GuardShieldEmitter",["3940261646"]="MetaTechMCV",["903497890"]="MetaTechSuperAvatar",["2566837260"]="MetaTechBarracks",["3017582790"]="MetaTechCommandPost",["1719454038"]="MetaTechConstructionYard",["2402772029"]="MetaTechHangar",["3309625077"]="MetaTechMedicalBay",["3629233383"]="MetaTechReclamatorHub",["125384694"]="MetaTechTechCenter",["128886932"]="MetaTechWarFactory"
}

TemplateExclusionTable={ --we deal only with squads not these single units for templates
	"AlienRazorDrones","AlienShockTrooper","AlienStalker","BlackHandBlackHand","BlackHandConfessor","BlackHandFanatic","BlackHandMilitantRocket","BlackHandMilitant","GDIGrenadeSoldier",
	"GDIMissileSoldier","GDIRifleSoldier","GDISniper","GDIZoneTrooper","MarkedOfKaneFanatic","MarkedOfKaneImprovedCyborgInfantry","MarkedOfKaneMilitantRocket",
	"MarkedOfKaneShadow","MarkedOfKaneTibTrooper","MOKCyborgInfantry","MutantMarauder","NODBlackHand","NODCyborgInfantry","NODFanatic","NODMilitantRocket","NODMilitant","NODShadow",
	"Reaper17ShockTrooper","Reaper17Stalker","SteelTalonsGrenadeSoldier","SteelTalonsMissileSoldier","SteelTalonsRifleSoldier","SteelTalonsZoneTrooper","Traveler59Cultist",
	"Traveler59RazorDrone","Traveler59ShockTrooper","Traveler59Stalker","ZOCOMGrenadeSoldier","ZOCOMMissileSoldier","ZOCOMRifleSoldier","ZOCOMSniper","ZOCOMZoneRaider"
}

DiplObjectExclusionList = {
	"AlienRazorDrones","AlienShockTrooper","AlienStalker","BlackHandBlackHand","BlackHandConfessor","BlackHandFanatic","BlackHandMilitantRocket","BlackHandMilitant","GDIGrenadeSoldier",
	"GDIMissileSoldier","GDIRifleSoldier","GDISniper","GDIZoneTrooper","MarkedOfKaneFanatic","MarkedOfKaneImprovedCyborgInfantry","MarkedOfKaneMilitantRocket",
	"MarkedOfKaneShadow","MarkedOfKaneTibTrooper","MOKCyborgInfantry","MutantMarauder","NODBlackHand","NODCyborgInfantry","NODFanatic","NODMilitantRocket","NODMilitant","NODShadow",
	"Reaper17ShockTrooper","Reaper17Stalker","SteelTalonsGrenadeSoldier","SteelTalonsMissileSoldier","SteelTalonsRifleSoldier","SteelTalonsZoneTrooper","Traveler59Cultist",
	"Traveler59RazorDrone","Traveler59ShockTrooper","Traveler59Stalker","ZOCOMGrenadeSoldier","ZOCOMMissileSoldier","ZOCOMRifleSoldier","ZOCOMSniper","ZOCOMZoneRaider",
	VictoryConditionHelper,"PlayerSpellBook"
}

TemplateExclusionHashIndexTable={  
	["4092654169"]="AlienRazorDrones",["3136386082"]="AlienShockTrooper",["3412147229"]="AlienStalker",["2801258734"]="BlackHandBlackHand",["3583409476"]="BlackHandConfessor",["3039749024"]="BlackHandFanatic",["3965962140"]="BlackHandMilitantRocket",["954847436"]="BlackHandMilitant",["1724663979"]="GDIGrenadeSoldier",["2778372489"]="GDIMissileSoldier",["445200166"]="GDIRifleSoldier",["2821102134"]="GDISniper",["3089229677"]="GDIZoneTrooper",["2946093985"]="MarkedOfKaneFanatic",["3355984486"]="MarkedOfKaneImprovedCyborgInfantry",
	["3012487848"]="MarkedOfKaneMilitantRocket",["1334603167"]="MarkedOfKaneShadow",["3279330900"]="MarkedOfKaneTibTrooper",["1156825506"]="MOKCyborgInfantry",["3225103941"]="MutantMarauder",["2311464080"]="NODBlackHand",["1309087284"]="NODCyborgInfantry",["818988780"]="NODFanatic",["2163300998"]="NODMilitantRocket",["3947935118"]="NODMilitant",["2355608014"]="NODShadow",["1609077176"]="Reaper17ShockTrooper",["2817508979"]="Reaper17Stalker",["878702304"]="SteelTalonsGrenadeSoldier",
	["88883071"]="SteelTalonsMissileSoldier",["261135250"]="SteelTalonsRifleSoldier",["3781304154"]="SteelTalonsZoneTrooper",["3090055454"]="Traveler59Cultist",["3246327120"]="Traveler59RazorDrone",["1499625309"]="Traveler59ShockTrooper",["1439301044"]="Traveler59Stalker",["3861104372"]="ZOCOMGrenadeSoldier",["157709252"]="ZOCOMMissileSoldier",["3689007025"]="ZOCOMRifleSoldier",["2057176288"]="ZOCOMSniper",["2419508393"]="ZOCOMZoneRaider"
}

AllUnitsTypesTable={
	"AlienAnnihilatorTripod","AlienAssimilator","AlienBuzzers","AlienCorrupter","AlienDevastatorWarship","AlienDevourerTank","AlienExplorer","AlienGunWalker","AlienHarvester","AlienMastermind","AlienMCV","AlienMothership","AlienPlanetaryAssaultCarrier","AlienRazorDroneSquad","AlienSeekerTank","AlienShockTrooperSquad","AlienStormrider",
	"GDIAPC","GDICommando","GDIEngineer","GDIFireHawk","GDIGrenadeSoldierSquad","GDIHarvester","GDIJuggernaught","GDIMammoth","GDIMCV","GDIMissileSoldierSquad","GDIOrca","GDIPitbull","GDIPredator","GDIRifleSoldierSquad","GDIRig","GDISniperSquad","GDISurveyor","GDIZoneTrooperSquad",
	"NODAttackBike","NODAvatar","NODBeamCannon","NODBlackHandSquad","NODCommando","NODEmissary","NODFanaticSquad","NODFlameTank","NODHarvester","NODMCV","NODMilitantRocketSquad","NODMilitantSquad","NODRaiderTank","NODSaboteur","NODScorpionBuggy","NODShadowSquad","NODStealthTank","NODVenom","NODVertigo",
	"SteelTalonsAAScout","SteelTalonsAPC","SteelTalonsBehemoth","SteelTalonsBehemothHusk","SteelTalonsCombatEngineer","SteelTalonsFirehawk","SteelTalonsBattleBase","SteelTalonsGrenadeSoldierSquad","SteelTalonsHammerhead","SteelTalonsHeavyHarvester","SteelTalonsMammoth","SteelTalonsMARV","SteelTalonsMCV","SteelTalonsMissileSoldierSquad","SteelTalonsOrca","SteelTalonsPitbull","SteelTalonsPredator","SteelTalonsRepairAPC","SteelTalonsRifleSoldierSquad","SteelTalonsRig","SteelTalonsSurveyor","SteelTalonsTitan","SteelTalonsWolverine","SteelTalonsZoneTrooper",
	"ZOCOMAAScout","ZOCOMAPC","ZOCOMCommando","ZOCOMEngineer","ZOCOMFirehawk","ZOCOMBattleBase","ZOCOMGrenadierSoldierSquad","ZOCOMHammerhead","ZOCOMHarvester","ZOCOMImprovedSonicTank","ZOCOMMammoth","ZOCOMMARV","ZOCOMMCV","ZOCOMMissileSoldierSquad","ZOCOMOrca","ZOCOMPitbull","ZOCOMPredator","ZOCOMRifleSoldierSquad","ZOCOMRig","ZOCOMSniperSquad","ZOCOMSurveyor",
	"BlackHandAttackBike","BlackHandBeamCannon","BlackHandBlackHand","BlackHandBunkerTruck","BlackHandCommando","BlackHandConfessor","BlackHandConfessorSquad","BlackHandCustomWarmech","BlackHandFanatic","BlackHandFlameTank","BlackHandHarvester","BlackHandMCV","BlackHandMetaUnit","BlackHandMilitantSquad","BlackHandMilitantRocketSuqad","BlackHandMobileArtillery","BlackHandMobileArtilleryBombard","BlackHandCustomWarmechHusk","BlackHandRaiderBuggy","BlackHandSaboteur","BlackHandRaiderTank","BlackHandStealthTank",
	"MarkedOfKaneAvatar","MarkedOfKaneAvatarHusk","MarkedOfKaneBeamCannon","MarkedOfKaneBunkerTruck","MarkedOfKaneCommando","MarkedOfKaneFanaticSquad","MarkedOfKaneHarvester","MarkedOfKaneImprovedCyborgInfantrySquad","MarkedOfKaneMCV","MarkedOfKaneMetaUnit","MarkedOfKaneMilitantSquad","MarkedOfKaneMilitantRocketSuqad","MarkedOfKaneMobileArtillery","MarkedOfKaneRaiderScorpionBuggy","MarkedOfKaneSaboteur","MarkedOfKaneRaiderTank","MarkedOfKaneShadow","MarkedOfKaneStealthTank","MarkedOfKaneVenom","MarkedOfKaneVertigo",
	"Reaper17AnnihilatorTripod","Reaper17AnnihilatorTripodHusk","Reaper17Corrupter","Reaper17DevourerTank","Reaper17EradicatorHexapod","Reaper17Explorer","Reaper17Harvester","Reaper17MCV","Reaper17ShardWalker","Reaper17ShockTrooper","Reaper17Stalker","Reaper17Stormrider",
	"Traveler59AnnihilatorTripod","Traveler59Assimilator","Traveler59BlinkMastermind","Traveler59Corrupter","Traveler59Cultist","Traveler59DevastatorWarship","Traveler59EradicatorHexapod","Traveler59Explorer","Traveler59GunWalker","Traveler59Harvester","Traveler59MCV","Traveler59PlanetaryAssaultCarrier","Traveler59RazorDroneSquad","Traveler59SeekerTank","Traveler59ShockTrooper","Traveler59Stalker","Traveler59Stormrider"
}

AllDefenseStructuresTable={
	"NODObelisk","GDIGolumCannon","AlienStormColumn","GDIWatchTower","AlienPlasmaMissileBattery","GDIAABattery","AlienPhotonCannon","GDITerraformingStation","AlienBuzzerHive", "NODDisruptionTower","NODLaserCannon","NODLaserCannonSpawn","NODRocketBunker","NODRocketBunkerSpawn","NODShredderTurret","NODShredderTurretHub"
}

SomeDefenseStructuresTable={          --"AlienBuzzerHive", --"NODDisruptionTower","NODLaserCannon","NODLaserCannonSpawn","NODRocketBunker","NODRocketBunkerSpawn","NODShredderTurret","NODShredderTurretHub",
	"NODObelisk","GDIGolumCannon","AlienStormColumn","GDIWatchTower","AlienPlasmaMissileBattery","GDIAABattery","AlienPhotonCannon","GDITerraformingStation"
}

HeavyGroundDefenseStructuresTable={ 
	"NODObelisk","GDIGolumCannon","AlienStormColumn","GDITerraformingStation"
}

AirDefenseStructuresTable={
	"GDIAABattery","AlienPhotonCannon"
}

Alien_All_Structures={"AlienBuzzerHive","AlienControlCenter","AlienDronePlatform","AlienFoundry","AlienGateway","AlienLightningSpike","AlienPhotonCannon","AlienPlasmaMissileBattery","AlienPortal","AlienPowerProjector","AlienReactor","AlienRiftGenerator","AlienSignalTransmitter","AlienSporePod","AlienStatisChamber","AlienStormColumn","AlienTiberiumTower","AlienWarpBeacon"}
Alien_Defensive_Structures={"AlienBuzzerHive","AlienLightningSpike","AlienPhotonCannon","AlienPlasmaMissileBattery","AlienStormColumn"}
Alien_All_Units={"AlienAnnihilatorTripod","AlienAssimilator","AlienBuzzers","AlienCorrupter","AlienDevastatorWarship","AlienDevourerTank","AlienExplorer","AlienGunWalker","AlienHarvester","AlienMastermind","AlienMCV","AlienMothership","AlienPlanetaryAssaultCarrier","AlienRazorDroneSquad","AlienSeekerTank","AlienShockTrooperSquad","AlienStormrider"}
Alien_Air={"AlienDevastatorWarship","AlienMothership","AlienPlanetaryAssaultCarrier","AlienStormrider"}
Alien_Vehicles={"AlienAnnihilatorTripod","AlienCorrupter","AlienDevourerTank","AlienExplorer","AlienGunWalker","AlienHarvester","AlienMCV","AlienSeekerTank"}
Alien_Infantry={"AlienAssimilator","AlienBuzzers","AlienMastermind","AlienRazorDroneSquad","AlienShockTrooperSquad"}
GDI_All_Units={"GDIAPC","GDICommando","GDIEngineer","GDIFireHawk","GDIGrenadeSoldierSquad","GDIHarvester","GDIJuggernaught","GDIMammoth","GDIMCV","GDIMissileSoldierSquad","GDIOrca","GDIPitbull","GDIPredator","GDIRifleSoldierSquad","GDIRig","GDISniperSquad","GDISurveyor","GDIZoneTrooperSquad"}
GDI_All_Structures={"GDIAABattery","GDIAirTower","GDIArmory","GDIBarracks","GDIBattleBase","GDICommandPost","GDIConstructionYard","GDICrane","GDIGolumCannon","GDIIonCannonControl","GDIMedicalBay","GDIMiniMCVOutpost","GDIPowerPlant","GDIRefinery","GDISpaceCommandUplink","GDITerraformingStation","GDITiberiumSilo","GDIWarFactory","GDIWatchTower"}
GDI_Defensive_Structures={"GDIAABattery","GDIGolumCannon","GDITerraformingStation","GDIWatchTower"}
GDI_Air={"GDIFireHawk","GDIOrca","GDIV35Ox"}
GDI_Vehicles={"GDIAPC","GDIHarvester","GDIJuggernaught","GDIMammoth","GDIMCV","GDIPitbull","GDIPredator","GDIRig","GDISurveyor"}
GDI_Infantry={"GDICommando","GDIEngineer","GDIGrenadeSoldierSquad","GDIMissileSoldierSquad","GDIRifleSoldierSquad","GDISniperSquad","GDIZoneTrooperSquad"}
NOD_All_Structures={"NODConstructionYard","NODCrane","NODDisruptionTower","NODDropZone","NODHandOfNOD","NODHangar","NODLaserCannon","NODLaserCannonSpawn","NODMiniMCVOutpost","NODObelisk","NODOperationsCenter","NODPowerPlant","NODRefinery","NODRocketBunker","NODRocketBunkerSpawn","NODShredderTurret","NODShredderTurretHub","NODTechAssemblyPlant","NODTempleOfNOD","NODTiberiumLiquidationFacility"}
NOD_All_Defensive_Structures={"NODDisruptionTower","NODLaserCannon","NODLaserCannonSpawn","NODObelisk","NODRocketBunker","NODRocketBunkerSpawn","NODShredderTurret","NODShredderTurretHub"}
NOD_All_Units={"NODAttackBike","NODAvatar","NODBeamCannon","NODBlackHandSquad","NODCommando","NODEmissary","NODFanaticSquad","NODFlameTank","NODHarvester","NODMCV","NODMilitantRocketSquad","NODMilitantSquad","NODRaiderTank","NODSaboteur","NODScorpionBuggy","NODShadowSquad","NODStealthTank","NODVenom","NODVertigo"}
NOD_Air={"NODVenom","NODVertigo"}
NOD_Vehicles={"NODAttackBike","NODAvatar","NODBeamCannon","NODFlameTank","NODHarvester","NODMCV","NODRaiderTank","NODScorpionBuggy","NODStealthTank"}
NOD_Infantry={"NODBlackHandSquad","NODCommando","NODEmissary","NODFanaticSquad","NODMilitantRocketSquad","NODMilitantSquad","NODSaboteur","NODShadowSquad"}

BlackHand_All_Structures={"BlackHandPowerPlant","BlackHandRefinery","BlackHandHandOfNod","BlackHandDropZone","BlackHandOperationsCenter","BlackHandSecretShrine","BlackHandTechAssemblyPlant","BlackHandShredderTurretHub","BlackHandLaserCannon","BlackHandRocketBunker","BlackHandTiberiumSilo","BlackHandPropagandaTower","BlackHandObelisk","BlackHandTempleOfNOD","BlackHandTiberiumLiquidationFacility","BlackHandCrane","GuardShieldEmitter","BlackHandEmissary","MG_BlackHand_WarmechFacility"}
MarkedOfKane_All_Structures={"MarkedOfKanePowerPlant","MarkedOfKaneRefinery","MarkedOfKaneHandOfNod","MarkedOfKaneDropZone","MarkedOfKaneOperationsCenter","MarkedOfKaneHangar","MarkedOfKaneSecretShrine","MarkedOfKaneTechAssemblyPlant","MarkedOfKaneTiberiumLiquidationFacility","MarkedOfKaneShredderTurretHub","MarkedOfKaneLaserCannon","MarkedOfKaneRocketBunker","MarkedOfKaneTiberiumSilo","MarkedOfKaneDisruptionTower","MarkedOfKanePropagandaTower","MarkedOfKaneObelisk","MarkedOfKaneTempleOfNOD","MarkedOfKaneAirSupport","MarkedOfKaneCrane","MG_MarkedOfKane_WarmechFacility","GuardShieldEmitter","MarkedOfKaneEmissary"}
SteelTalons_All_Structures={"SteelTalonsPowerPlant","SteelTalonsRefinery","SteelTalonsBarracks","SteelTalonsWarfactory","SteelTalonsCommandPost","SteelTalonsAirTower","SteelTalonsTechCenter","SteelTalonsSpaceCommandUplink","MG_SteelTalons_ReclamatorHub","SteelTalonsWatchTower","SteelTalonsGolumCannon","SteelTalonsAABattery","SteelTalonsTiberiumSilo","SteelTalonsIonCannonControl","SteelTalonsCrane","SteelTalonsAirSupport","GuardShieldEmitter","SteelTalonsSurveyor"}
ZOCOM_All_Structures={"ZOCOMPowerPlant","ZOCOMRefinery","ZOCOMBarracks","ZOCOMWarFactory","ZOCOMCommandPost","ZOCOMAirTower","ZOCOMMedicalBay","ZOCOMArmory","ZOCOMSpaceCommandUplink","MG_ZOCOM_ReclamatorHub","ZOCOMWatchTower","ZOCOMGolumCannon","ZOCOMAABattery","ZOCOMTiberiumSilo","ZOCOMTerraformingStation","ZOCOMIonCannonControl","ZOCOMCrane","ZOCOMAirSupport","GuardShieldEmitter","ZOCOMSurveyor"}
Reaper17_All_Structures={"Reaper17PowerProjector","Reaper17TiberiumTower","Reaper17Portal","Reaper17Gateway","Reaper17BuzzerHive","Reaper17PhotonCannon","Reaper17PlasmaMissileBattery","Reaper17GrowthStimulator","Reaper17ControlCenter","Reaper17StormColumn","Reaper17WarpBeacon","Reaper17StasisChamber","Reaper17Reactor","Reaper17SignalTransmitter","Reaper17RiftGenerator","GuardShieldEmitter","Reaper17Explorer","Reaper17Foundry","MG_Reaper17_Hive"}	
Traveler59_All_Structures={"Traveler59PowerProjector","Traveler59TiberiumTower","Traveler59Portal","Traveler59Gateway","Traveler59BuzzerHive","Traveler59PhotonCannon","Traveler59PlasmaMissileBattery","Traveler59SporePod","Traveler59ControlCenter","Traveler59StormColumn","Traveler59WarpBeacon","Traveler59StatisChamber","Traveler59Reactor","Traveler59SignalTransmitter","Traveler59RiftGenerator","GuardShieldEmitter","Traveler59Explorer","Traveler59Foundry","MG_Traveler59_Hive"}
Misc_Buildings={"GuardShieldEmitter"}

AllBaseBuildings={"GDIMCV","SteelTalonsMCV","ZOCOMMCV","NodMCV","BlackHandMCV","MarkedOfKaneMCV","AlienMCV","Reaper17MCV","Traveler59MCV","MetaTechMCV"}
AllInfantryUnits={"GDIRifleSoldierSquad", "GDIMissileSoldierSquad", "NODMilitantSquad", "NODMilitantRocketSquad", "BlackHandConfessorSquad", "AlienBuzzers", "AlienRazorDroneSquad", "AlienShockTrooperSquad", "Traveler59Stalker", "BlackHandBlackHandSquad", "NODShadowSquad", "NodFanaticSquad","ZOCOMZoneRaiderSquad", "GDIZoneTrooperSquad","GDIGrenadeSoldierSquad","MarkedOfKaneImprovedCyborgInfantrySquad","GDISniperSquad","Traveler59Cultist","AlienMastermind", "NODCommando", "GDICommando"}
AllVehicleUnits ={ "NODAttackBike", "AlienCustomizableVehicle","NODScorpionBuggy", "SteelTalonsWolverine", "GDIPitbull", "SteelTalonsAPC", "NODRaiderTank", "AlienGunWalker", "Reaper17ShardWalker","AlienSeekerTank","MarkedOfKaneBeamCannon", "BlackHandFlameTank", "NODStealthTank", "BlackHandMobileArtillery","GDIPredator", "SteelTalonsTitan", "AlienDevourerTank", "AlienCorrupter","ZOCOMImprovedSonicTank","NODAvatar", "BlackHandCustomWarmech","Reaper17AnnihilatorTripod","SteelTalonsMammoth","GDIJuggernaught","SteelTalonsBehemoth","NodMetaUnit", "SteelTalonsMARV", "AlienEradicatorHexapod","GDIRig","SteelTalonsRepairAPC" }
AllAirUnits={ "MarkedOfKaneVenom", "ZOCOMHammerhead", "Traveler59Stormrider", "GDIFireHawk","GDIOrca","NODVertigo","Traveler59DevastatorWarship", "Traveler59PlanetaryAssaultCarrier","AlienMothership" }


OCLSpawnExtenderTable={    --we need this because all objects with "kind of" "immobile" (mostly all structures) do not work with "CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION", so we go via ocl first: ObjectName_OCL
	"AlienBuzzerHive","AlienControlCenter","AlienFoundry","AlienGateway","AlienPhotonCannon","BlackHandCrane","BlackHandDropZone","BlackHandHandOfNOD","BlackHandHangar","BlackHandLaserCannonSpawn","NODLaserCannonSpawn","BlackHandLaserCannon","BlackHandObelisk","BlackHandOperationsCenter","BlackHandPowerPlant","BlackHandPropagandaTower","BlackHandRefinery","BlackHandRocketBunkerSpawn",
	"NODRocketBunkerSpawn","BlackHandRocketBunker","BlackHandSecretShrine","BlackHandShredderTurret","BlackHandShredderTurretHub","BlackHandTechAssemblyPlant","BlackHandTempleOfNOD","BlackHandTiberiumLiquidationFacility","BlackHandTiberiumSilo","MarkedOfKaneAirSupport","MarkedOfKaneCrane","MarkedOfKaneDisruptionTower","MarkedOfKaneDropZone","MarkedOfKaneHandOfNOD","MarkedOfKaneHangar","MarkedOfKaneLaserCannonSpawn","MarkedOfKaneLaserCannon","MarkedOfKaneObelisk",
	"MarkedOfKaneOperationsCenter","MarkedOfKanePowerPlant","MarkedOfKanePropagandaTower","MarkedOfKaneRefinery","MarkedOfKaneRocketBunkerSpawn","MarkedOfKaneRocketBunker","MarkedOfKaneSecretShrine","MarkedOfKaneShredderTurret","MarkedOfKaneShredderTurretHub","MarkedOfKaneTechAssemblyPlant","MarkedOfKaneTempleOfNOD","MarkedOfKaneTiberiumLiquidationFacility","MarkedOfKaneTiberiumSilo","MG_Alien_Hive","AlienPlasmaMissileBattery","AlienPortal","AlienPowerProjector","AlienReactor",
	"AlienRiftGenerator","AlienSignalTransmitter","AlienSporePod","AlienStatisChamber","AlienStormColumn","AlienTiberiumTower","AlienWarpBeacon","GDIAABattery","GDIAirSupport","GDIAirTower","GDIArmory","GDIBarracks","MG_BlackHand_WarmechFacility","GDICommandPost","GDICrane","GDIGolumCannon","GDIIonCannonControl","GDIMedicalBay",
	"GDIPowerPlant","GDIRefinery","MG_GDI_ReclamatorHub","GDISpaceCommandUplink","GDITerraformingStation","GDITiberiumSilo","GDIWallHub","GDIWarFactory","GDIWatchTower","MG_MarkedOfKane_WarmechFacility","MG_NOD_WarmechFacility","MG_Reaper17_Hive","MG_SteelTalons_ReclamatorHub","MG_Traveler59_Hive","MG_ZOCOM_ReclamatorHub","NODAirSupport","NODCrane","NODDisruptionTower",
	"NODDropZone","NODHandOfNOD","NODHangar","NODLaserCannon","NODObelisk","NODOperationsCenter","NODPowerPlant","NODPropagandaTower","NODRefinery","NODRocketBunker","NODSecretShrine","NODShredderTurret","NODWallHub","Reaper17BuzzerHive","Reaper17ControlCenter","Reaper17Foundry","Reaper17Gateway","Reaper17GrowthStimulator",
	"Reaper17PhotonCannon","Reaper17PlasmaMissileBattery","Reaper17Portal","Reaper17PowerProjector","Reaper17Reactor","Reaper17RiftGenerator","Reaper17SignalTransmitter","Reaper17StasisChamber","Reaper17StormColumn","Reaper17TiberiumTower","Reaper17WarpBeacon","SteelTalonsAABattery","SteelTalonsAirSupport","SteelTalonsAirTower","SteelTalonsBarracks","SteelTalonsCommandPost","SteelTalonsCrane","SteelTalonsGolumCannon",
	"SteelTalonsIonCannonControl","SteelTalonsPowerPlant","SteelTalonsRefinery","SteelTalonsSpaceCommandUplink","SteelTalonsTechCenter","SteelTalonsTerraformingStation","SteelTalonsTiberiumSilo","SteelTalonsWarFactory","SteelTalonsWatchTower","Traveler59BuzzerHive","Traveler59ControlCenter","Traveler59Foundry","Traveler59Gateway","Traveler59PhotonCannon","Traveler59PlasmaMissileBattery","Traveler59Portal","Traveler59PowerProjector","Traveler59Reactor",
	"Traveler59RiftGenerator","Traveler59SignalTransmitter","Traveler59SporePod","Traveler59StatisChamber","Traveler59StormColumn","Traveler59TiberiumTower","Traveler59WarpBeacon","ZOCOMAABattery","ZOCOMAirSupport","ZOCOMAirTower","ZOCOMArmory","ZOCOMBarracks","ZOCOMCommandPost","ZOCOMCrane","ZOCOMGolumCannon","ZOCOMIonCannonControl","ZOCOMMedicalBay","ZOCOMPowerPlant",
	"ZOCOMRefinery","ZOCOMSpaceCommandUplink","ZOCOMTerraformingStation","ZOCOMTiberiumSilo","ZOCOMWarFactory","ZOCOMWatchTower","NODShredderTurretHub","NODTechAssemblyPlant","NODTempleOfNOD","NODTiberiumLiquidationFacility","NODTiberiumSilo","ABAVTower","AlienAnnihilatorTripodHusk","AlienCrystalShield","AlienDronePlatform","AlienGiantTiberiumRockTiberiumField","AlienLightningSpike","AlienMiniMCVOutpost",
	"AlienReconstructionBaseSpawned","AlienSeedTiberiumLaserFX","AlienTiberiumFieldSeeded","AlienTibHive","AlienWormHole","AlienWormHoleMarker","BlackHandConstructionYard","BlackHandCustomWarmechHusk","BlackHandDecoyTempleOfNOD","BlackHandLaserCannonSpawnHole","BlackHandMiniMCVOutpost","BlackHandPowerStore","BlackHandRocketBunkerSpawnHole","BlackHandShredderTurretSpawnHole","ClusterBombSeed","GDIAirstrikeSPBombingRunTarget","GDIAirstrikeSPBombingRunTrigger","GDIBattleBase",
	"GDIBombingRunBeacon","GDIConstructionYard","GDIDigInBuilding","GDIDigInBuildingPlaceholder","GDIDropPodBeacon","GDIFuelDepot","GDIJuggernaughtHusk","GDIMine","GDIMiniMCVOutpost","GDIMjolnirStrikeBeacon","GDINukeSeed","GDIOrcaSensorPod","GDIRailgunAcceleratorPowerSucker","GDIShockwaveArtilleryBeacon","GDIShockwaveArtilleryFX","GDIShockwaveArtillerySeed","GDISuperSonicAirAttackBeacon","GDITerraformingStationIonStormKiller",
	"GDIWallSegment","HealCrateMP","MoneyCrateMP","VeterancyCrateMP","GenericCrateSpawner","GenericRadarSupplier","IonStorm","IonStormTemporary","MarkedOfKaneAvatarHusk","MarkedOfKaneConstructionYard","MarkedOfKaneLaserCannonSpawnHole","MarkedOfKaneMagneticMine","MarkedOfKaneMiniMCVOutpost","MarkedOfKanePowerStore","MarkedOfKaneRocketBunkerSpawnHole","MarkedOfKaneShredderTurretSpawnHole","MG_Alien_LifeFormPlant","MG_Alien_TerraformingNexus",
	"MG_Alien_Tower","MG_GDI_ASATDefense","MG_GDI_IntelCenter","MG_GDI_TiberiumProcessingPlant","MG_NOD_DisruptionGenerator","MG_NOD_TemplePrime","MG_NOD_TiberiumForge","Misc_Flare","Misc_Flare02","Misc_Flare03","Misc_Flare04","NODAvatarHusk","NODBeamTarget","NODBridgeBoobyTrap","NODBuildingBoobyTrap","NODCatalystMissileBeacon","NODCatalystMissileSeed","NODCatalystSeed",
	"NODConstructionYard","NODExplosiveCharge","NODHuskBoobyTrap","NODLaserCannonSpawnHole","NODMGAct1PowerStore","NODMine","NODMiniMCVOutpost","NODNukeSeed","NODRedemptionAnimator","NODRedemptionMaker","NODRocketBunkerSpawnHole","NODSeedTiberiumBeacon","NODShadowSquadBeacon","NODShredderTurretSpawnHole","NODTechBuildingBoobyTrap","NODTiberiumVaporBeacon","NODVeinDetonation","NODVertigo_SPBombingRunTarget",
	"NODVertigoDisruptionPod","NODVertigoDisruptionStickyPod","NODWallSegment","PlanetaryAssaultCarrierIonStorm","PlayerSpellBook","Reaper17AnnihilatorTripodHusk","Reaper17DronePlatform","Reaper17MiniMCVOutpost","SteelTalonsBattleBase","SteelTalonsBehemothHusk","SteelTalonsConstructionYard","SteelTalonsMiniMCVOutpost","TiberiumCrystal","TiberiumCrystalBlue","TiberiumField","TiberiumFieldBlue","TiberiumFieldFromHarvesterDeath","TiberiumFieldFromTiberiumSilo",
	"TiberiumFieldRedZone","TiberiumFieldSeeded","Traveler59AnnihilatorTripodHusk","Traveler59DronePlatform","Traveler59MiniMCVOutpost","Traveler59TemporalWormhole","VeinDetonationChunk","ZOCOMBattleBase","ZOCOMConstructionYard","ZOCOMDropPodBeacon","ZOCOMJuggernaughtHusk","ZOCOMMiniMCVOutpost","GuardShieldEmitter","MetaTechBarracks","MetaTechCommandPost","MetaTechConstructionYard","MetaTechCrane","MetaTechHangar",
	"MetaTechMedicalBay","MetaTechReclamatorHub","MetaTechTechCenter","MetaTechWarFactory",
	"ABTower","AF_Build01","AF_Build02","AF_Build03","AF_Build04","AF_Build05","AF_Build06","AF_Prop01","AF_Prop02","AF_Rock01","AF_Rock02","AF_Tree01","AF_Tree02","AF_Tree03","AF_Tree04","AF_Tree05","AF_Wall01","AF_Wall02","AGenericSound","AirstrikeRestrictor","AlienPowerStore","ALIENTripodDebris_05","Amb_AirportAnnouncement1","Amb_AirportAnnouncement2","Amb_AirportPlanesMS","Amb_AlarmKlaxon","Amb_BellBuoy","Amb_Birds1","Amb_Birds2","Amb_BirdsBuzzard","Amb_BirdsCrowMellow","Amb_BirdsCrowSimple","Amb_BirdsCrowSquak","Amb_BirdsCrowWeird",
	"Amb_BirdsDesert","Amb_BirdsFalcon1","Amb_BirdsFalcon2","Amb_BirdsMountain1","Amb_BirdsMountain2","Amb_BirdsOwl","Amb_BirdsSeagull","Amb_BirdsSeagull2","Amb_BoatDockedAtPier","Amb_CampFoley","Amb_ChimeJapanese","Amb_CitySkyline","Amb_Cornfield","Amb_CreatureBird1","Amb_CreatureHowl1","Amb_CreaturesLow1","Amb_CreaturesWhistle1","Amb_CricketsBed1Loop","Amb_CricketsBed2Loop","Amb_CricketSingleChirps1","Amb_CritterDesert1","Amb_CritterDesert2","Amb_DirtFall","Amb_Dog1Barks","Amb_Dog2Barks","Amb_Dog3Barks","Amb_FieldCalm","Amb_FireRubble",
	"Amb_FliesBuzzing","Amb_FogHornDelayedLoop","Amb_JunkGlass","Amb_JunkMetal","Amb_JunkWood","Amb_MetalCreak","Amb_MetalHit","Amb_OceanWaves1","Amb_RockTumbleMedium","Amb_SwampRonks","Amb_TentFlap1","Amb_TentFlap2","Amb_TiberiumGlacierLoopMS","Amb_TurbineWind","Amb_WaterCreek1Loop","Amb_WaterCreek2Loop","Amb_WaterDockLoop","Amb_Waterfall1Loop","Amb_Waterfall2Loop","Amb_WaterLakeLight1","Amb_WaterRiver1Loop","Amb_Wind1","Amb_WindCold1","Amb_WindMountain1","Amb_WoodCreak","Amb_WoodCreakTree1","Amb_WoodHit",
	"Amb_WoodShutter","AmbStream_BlueZone02_IndustrialNight_5point1","AmbStream_BlueZone03_Pristine_5point1","AmbStream_BlueZone04_Damaged_5point1","AmbStream_BlueZone06_Destroyed_5point1","AmbStream_BlueZone07_Apocalypse_5point1","AmbStream_BlueZoneA_5point1","AmbStream_BoatDockedAtPier","AmbStream_CitySkyline","AmbStream_FieldCalm","AmbStream_Metamap_CitySkyline","AmbStream_Rain1","AmbStream_RedZone02_Desolate_5point1","AmbStream_RedZone03_Rubble_5point1","AmbStream_RedZoneA_5point1","AmbStream_YellowZone01_Temperate_5point1",
	"AmbStream_YellowZone02_Desolate_5point1","AmbStream_YellowZone03_Rubble_5point1","AmbStream_YellowZone04_Bleach_5point1","AmbStream_YellowZone05_Jungle_5point1","AS_ITPPwr03","ASPcrate01","ASPcrate02","ASPcrate03","ASPcrate04","ASPFence01","ASPFence02","ASPFence03","ASPFence04","ASPFence05","ASPFence06","ASPFence07","ASPmilemark","ASPpwrline01","ASPrail01","ASPrail02","ASPrailcross","ASPruinbuild","ASPsculp01","ASPsculp02","ASPsculp03","ASPtrack01","ASPtrack02","ASPtrack03","ASPwatow","ASPwheel","ASRocks04","ASRocks05","ASRrocks01",
	"ASRrocks02","ASRrocks03","ASTdead01","ASTdead02","ASTdead02a","ASTdead03","ASTdead04","ASTdead05","ASTdead06","ASTshrub01","ASTshrub02","ASTshrub03","ASTshrub04","ASTtree01","Australian_Apartment_Building_01","Australian_Apartment_Building_02","Australian_Barn_01","Australian_Barn_02","Australian_Factory_01","Australian_Geodesic_Dome_01","Australian_Geodesic_Dome_02","Australian_Geodesic_Dome_03","Australian_Government_Building_01","Australian_Government_Building_02","Australian_Grocery_Store_01","Australian_Hotel_01","Australian_Hotel_02",
	"Australian_House_01","Australian_House_02","Australian_Office_Building_01","Australian_Office_Building_02","Australian_Opera_01","Australian_Outdoor_Mall_01","Australian_Warehouse_01","Australian_Warehouse_02","BlueZoneSkyA","BlueZoneSkyB","BlueZoneStormSkyA","Brazilian_Docks_01","Brazilian_Docks_02","Brazilian_Futuristic_Office_Building_01","Brazilian_Futuristic_Office_Building_02","Brazilian_Futuristic_Office_Building_03","Brazilian_Futuristic_Office_Building_04","Brazilian_Futuristic_Office_Building_05","Brazilian_Futuristic_Office_Building_06","Brazilian_Futuristic_Office_Building_07",
	"Brazilian_Hotel_01","Brazilian_Hotel_02","Brazilian_Mine_Building_01","Brazilian_Mine_Building_02","Brazilian_Oil_Platform_01","Brazilian_Oil_Platform_02","Brazilian_Resort_01","Brazilian_Shack_01","Brazilian_Shack_02","Brazilian_Shack_03","BRBRui01","BRBRui02","BRBRui03","BRBRui04","BRBWat01","Bridge1_Center","Bridge1_Center2","Bridge1_End","Bridge1_End2","Bridge1_GateHouse","Bridge1","Bridge1a","Bridge2_Center","Bridge2_Center2","Bridge2_End","Bridge2_End2","Bridge2_GateHouse","Bridge2","Bridge2a","Bridge3_Center","Bridge3_Center2","Bridge3_End","Bridge3_End2",
	"Bridge3_GateHouse","Bridge3","Bridge3a","BRPAuto01","BRPAuto02","BRPAuto03","BRPAuto04","BRPAuto05","BRPAuto06","BRPAuto07","BRPCrate01","BRPCrate02","BRPDebris01","BRPDebris02","BRPDebris03","BRPDebris04","BRPDebris05","BRPDump01","BRPDump02","BRPFence01","BRPFence02","BRPFence03","BRPFuel01","BRPOilWell02","BRPWheel01","BRRRocks01","BRRRocks02","BRRRocks03","BRTBush01","BRTBush02","BRTBush03","BRTBush04","BRTdead01","BRTshrub01","BRTshrub02","BRTshrub03","CaptureFlag","CBBBuy","CBCHBuild01","CBCHBuild02","CBCHBuild03","CBCHBuild04",
	"CBCHBuild05","CBCHBuild06","CBEgyApt01","CBEgyApt02","CBEgyClov01","CBEgyRuin01","CBEgyRuin02","CBEgyRuin03","CBEgyRuin04","CBEgyRuin05","CBEgyRuin06","CBEgySign01","CBEgyTent01","CBEgyTent02","CBEgyTent03","CBEgyUrba01","CBEgyUrba02","CBGreenhouse01","CBIrrigation01","CBIrrigation02","CBIrrigation03","CBIrrigation04","CBIrrigation05","CBIrrigation06","CBIrrigation07","CBmosque","CBRUBuild01","CBRUBuild02","CBRUBuild03","CBRUBuild04","CBRUBuild05","CBRUBuild06","CBWaterTank01","CDMTower","CHProp01","CHProp02","CHRock01","CHRock02","CHTree01",
	"CHTree02","CHTree03","CHTree04","CHTree05","CHWall01","CHWall02","CHWall03","CIChaingate","CIChainlink","CICone02","CIFreeway","CIFreeway02","CIFreeway03","CIMonorrail","CIMonoTrack","CINE_Bunker","CIPowerTower","CITollbooth","city_buildings2","citybuilding02","CityBuilding04","CityBuilding05","citybuildings2b","CityGarbageBin","CityGarbageCan","CityLight01","CityLight02","CityLight03","CityNewsStand","CitySidewalk","CitySign02","CitySign03","CitySign04","CitySign05","CitySign06","CityTree01","CityTree02","CityTree02b","CityTree02c","CivBunker","CivilianMale1","CivilianWallHub",
	"CivilianWallSegment","ClusterBombSeed","Coast_01","Coast_03","Coast02","ControlPoint","CrateDebris_01","CUAuto01","CUBird01","CUTrain01","DCBBarri01","DCBBrn01","DCBBuck01","DCBBun01","DCBBun02","DCBBurn01","DCBBurn02","DCBBurn03","DCBCargo01","DCBCargo02","DCBCargo03","DCBCargo04","DCBCargo05","DCBCargo06","DCBCargo07","DCBCargo08","DCBCargo09","DCBCargo10","DCBComme01","DCBCra01","DCBCra02","DCBDarMu01","DCBDoc02","DCBDock01","DCBDock02","DCBDock03","DCBDock04","DCBDock05","DCBDock06","DCBDock07","DCBDock08","DCBExecu01",
	"DCBGate01","DCBGateR01","DCBGre01","DCBMagLv_RZ01","DCBMagLv_RZ02","DCBMagLv_RZ03","DCBMagLv_RZ04","DCBMagLv_RZ05","DCBMagLv_RZ06","DCBMagLv_RZ07","DCBMagLv01","DCBMagLv02","DCBMagLv03","DCBMagLv04","DCBMagLv05","DCBMagLv06","DCBMagLv07","DCBOvP01","DCBOvP02","DCBOvP03","DCBOvP04","DCBOvP05","DCBOvP06","DCBParl","DCBPenta01","DCBPentaEn","DCBRuin01","DCBRuin02","DCBRuin03","DCBRuin04","DCBRuin05","DCBSen01","DCBSil01","DCBSil02","DCBTerr_RZ01","DCBTerr_RZ02","DCBTerr_RZ03","DCBTerr_RZ04","DCBTerr_RZ05","DCBTerr_RZ06",
	"DCBTerr01","DCBTerr01b","DCBTerr02","DCBTerr02b","DCBTerr03","DCBTerr04","DCBTerr05","DCBTerr06","DCBTreas01","DCBUrban01","DCBUrban02","DCBUrban03","DCBUrban04","DCBUrban05","DCBUrban06","DCBWhite01","DCBWhiteBan","DCBWhiteBan2","DCBWin01","DCPAuto01","DCPAuto02","DCPAuto03","DCPAuto04","DCPAuto05","DCPAuto06","DCPAuto07","DCPAuto08","DCPBarriR01","DCPBarriR02","DCPBench01","DCPBus","DCPCrane01","DCPDebris01","DCPDebris02","DCPDebris03","DCPDumpster01","DCPFarm01","DCPFarm02","DCPFence01","DCPFence02","DCPFence03","DCPFence04",
	"DCPFence05","DCPFence06","DCPFence07","DCPFence08","DCPFence09","DCPFence10","DCPFence11","DCPFence12","DCPFence13","DCPFence14","DCPFence15","DCPFence16","DCPFlag01","DCPFlag02","DCPFork01","DCPFount01","DCPGate01","DCPGrave01","DCPHavoc01","DCPHolo01","DCPHolo02","DCPHolo03","DCPHolo04","DCPHolo05","DCPHolo06","DCPHolo07","DCPHolo08","DCPIwoJi01","DCPLand01","DCPLonEye","DCPPark01","DCPPark02","DCPPark03","DCPPark04","DCPPhone","DCPPlanter01","DCPPylon01","DCPPylon02","DCPRef01","DCPRef02","DCPRef03","DCPRef04","DCPRef05","DCPRef06",
	"DCPRivWall","DCPRocSign","DCPSign_RZ01","DCPSign_RZ02","DCPSign01","DCPSign02","DCPSign03","DCPSign04","DCPSign05","DCPSign06","DCPSign07","DCPStatue01","DCPStrLi01","DCPStrLi02","DCPStrLi03","DCPStrLi04","DCPStrLi05","DCPStrLi06","DCPStrLi07","DCPStrSign_RZ01","DCPStrSign_RZ02","DCPStrSign_RZ03","DCPStrSign01","DCPStrSign02","DCPStrSign03","DCPSubway","DCPSupply01","DCPSupply02","DCPSupply03","DCPSupply04","DCPSupply05","DCPSupply06","DCPSupply07","DCPSupply08","DCPSupply09","DCPSupply10","DCPTarmac01","DCPTarmac02","DCPTarmac03",
	"DCPTarmac04","DCPTarmac05","DCPTarmac06","DCPTarmac07","DCPTerra01","DCPTireMarks01","DCPTireMarks02","DCPTireMarks03","DCPTireMarks04","DCPTireMarks05","DCPWall01","DCTBush01","DCTBush02","DCTBush03","DCTBush04","DCTBush05","DCTBush06","DCTBush07","DCTCrop01","DCTree01","DCTree02","DCTree03","DCTree04","DCTree05","DCTree05b","DCTree06","DefensiveTower","DestLight_01","EarthMetaGame","Eastern_Europe_Apartment_Building_01","Eastern_Europe_Apartment_Building_02","Eastern_Europe_Apartment_Building_03","Eastern_Europe_Church_01",
	"Eastern_Europe_Church_02","Eastern_Europe_Church_03","Eastern_Europe_Church_04","Eastern_Europe_Church_05","Eastern_Europe_Farm_01","Eastern_Europe_Farm_02","Eastern_Europe_Government_Building_01","Eastern_Europe_Government_Building_02","Eastern_Europe_Hotel_01","Eastern_Europe_Hotel_02","Eastern_Europe_House_01","Eastern_Europe_House_02","Eastern_Europe_House_03","Eastern_Europe_House_04","Eastern_Europe_House_05","Eastern_Europe_Office_Building_01","Eastern_Europe_Office_Building_02","Eastern_Europe_Ruin_01","Eastern_Europe_Ruin_02",
	"Eastern_Europe_Ruin_03","Eastern_Europe_Ruin_04","Eastern_Europe_Ruin_05","Eastern_Europe_Ruin_06","Eastern_Europe_Ruin_07","Eastern_Europe_Ruin_08","Eastern_Europe_Ruin_09","EEBHan01","EEBMkt01","EEBMkt02","EEPAuto01","EEPAuto02","EEPAuto03","EEPAuto04","EEPAuto05","EEPAuto06","EEPAuto07","EEPAuto08","EEPAuto09","EEPBnk01","EEPDebris01","EEPDebris02","EEPDebris03","EEPDebris04","EEPDebris05","EEPDump01","EEPFence01","EEPFence02","EEPFence03","EEPFence04","EEPFence05","EEPFence06","EEPFence07","EEPFnc01","EEPLit01","EEPLit02","EEPpln01",
	"EEPpln02","EEPpwr01","EEPpwr02","EEPpyl01","EEPSgn01","EEPSgn02","EEPSgn03","EEPSgn04","EEPSupply01","EEPwal01","EEPWal02","EEPWal03","EEPWal04","EEPWal05","EEPwal06","EERocks01","EERocks02","EERocks03","EERocks04","EGBMkt01_a","EGBMkt01_c","EGBMkt01_d","EGPBbd01","EGPLit01","EGPLit02","EGPpwr01","EGPpwr02","EGPwal01","EGRLarge01","EGTbush01","EGTbush02","EGTbush03","EGTbush04","Egyptian_Apartment_Building_01","Egyptian_Apartment_Building_02","Egyptian_Apartment_Building_03","Egyptian_Drydock_01","Egyptian_Factory_01","Egyptian_Factory_02",
	"Egyptian_Farm_01","Egyptian_Farm_02","Egyptian_Hotel_01","Egyptian_Hotel_02","Egyptian_Lighthouse_Radar_01","Egyptian_Market_01","Egyptian_Market_01_b","Egyptian_Market_02","Egyptian_Mosque_01","Egyptian_Mosque_02","Egyptian_Office_Building_01","Egyptian_Office_Building_02","Egyptian_Office_Building_03","Egyptian_Office_Building_04","Egyptian_Port_Authority_01","Egyptian_Ruin_01","Egyptian_Ruin_02","Egyptian_Ruin_03","Egyptian_Ship_01","Egyptian_Warehouse_01","Egyptian_Warehouse_02","Egyptian_Warehouse_03","ElectroMagneticPulseControlCenter","ExplodingBarrel",
	"FarmBarn","FarmBarnB","FarmCrop_01","FarmFence","FarmSilo","FarmTractor","FarmWindmill","GBTibWallHub","GDI_Bunker","GDI_GovBldg","GDI_ImportantBuilding","GDI_LabRadarBuilding","GDI_RadioTower_CM11","GDI_StDetect","GDI_StealthLab","GDI_TacBldg","GDI_TibLab","GDI_Treasury","GDI_Wing","GDI_Wing2","GDIAirstrikeSPBombingRunTarget","GDIAirstrikeSPBombingRunTrigger","GDIAlarm","GDIBattleshipBombardMissile","GDICarrier","GDIHovercraft","GDIJuggDebris_05","GDIParkedMiniOrca","GDIParkedOx","GDIPhil","GDIPowerStore","GDITibWallSeg","GenericTreeCrusher",
	"Germany_Apartment_01","Germany_Apartment_02","Germany_Apartment_03","Germany_Apartment_04","Germany_Church_01","Germany_Church_02","Germany_Church_03","Germany_Fountain_01","Germany_Futuristic_Building_01","Germany_Futuristic_Building_02","Germany_Futuristic_Building_03","Germany_Futuristic_Building_04","Germany_Futuristic_Building_05","Germany_Hotel_02","Germany_Iconic_Bridge_01_Center","Germany_Iconic_Bridge_01","Germany_Obelisk_01","Germany_Office_Building_01","Germany_Office_Building_02","Germany_Office_Building_03",
	"Germany_Resort_01","Germany_Ruin_01","Germany_Ruin_02","Germany_Ruin_03","Germany_Ruin_04","Germany_Ruin_05","Germany_Sports_Arena_01","Goddard_Space_Center_Building_01","Goddard_Space_Center_Building_02","Goddard_Space_Center_Building_03","Goddard_Space_Center_Futuristic_Building_01","Goddard_Space_Center_Futuristic_Building_02","Goddard_Space_Center_Futuristic_Building_03","Goddard_Space_Center_Radar_01","Goddard_Space_Center_Rocket_Gantry_01","Goddard_Space_Center_Sign_01","GOTtree01","GRBRuin01","GRBRuin02","GRBRuin03",
	"GRBRuin04","GRBZnE01","GRPAuto01","GRPAuto02","GRPAuto03","GRPAuto04","GRPAuto05","GRPAuto06","GRPAuto07","GRPAuto08","GRPDebris01","GRPDebris02","GRPfence01","GRPFence02","GRPfence03","GRPFence04","GRPFence05","GRPFence06","GRPFence07","GRPfire01","GRPlight01","GRPlight02","GRPlight03","GRPlight04","GRPnews01","GRPplanter01","GRPplanter02","GRPpower01","GRPpower02","GRPpylon01","GRPpylon02","GRPruin01","GRPruin02","GRPruin03","GRPruin04","GRPruin05","GRPRuin06","GRPRuin07","GRPsign01","GRPsign02","GRPsign03","GRPsign04","GRPsign05",
	"GRPStump01","GRPtrain01","GRPtrain02","GRPtrain03","GRPtrain04","GRPtrain05","GRPwall01","GRPwall02","GRPwall02b","GRPwall03","GRPwall04","GRPwall05","GRPwall06","GRTree01","hacorn01","HARoad01","HATree01","HealCrate","Italian_Ruin_01","Italian_Ruin_02","Italian_Ruin_03","Italian_Ruin_04","Italian_Ruin_05","Italian_Ruin_06","Italian_Ruin_07","Italian_Ruin_08","Italian_Ruin_09","Italian_Ruin_10","Italian_Ruin_11","Italian_Ruin_12","Italian_Ruin_13","Italian_Ruin_14","Italian_Ruin_15","Italian_Ruin_16","Italian_Ruin_17","Italian_Ruin_18","Italian_Ruin_19","Italian_Ruin_20",
	"Italian_Ruin_21","Italian_Ruin_22","Italian_Ruin_23","Italian_Ruin_24","Italian_Ruin_25","Italian_Ruin_26","Italian_Ruin_27","ITBRui28","ITBRui29","ITBShk01","ITBShk02","ITBShk03","ITPAuto01","ITPAuto02","ITPAuto03","ITPAuto04","ITPAuto05","ITPAuto06","ITPAuto07","ITPAuto08","ITPBarr01","ITPBarr02","ITPCrate01","ITPCrate02","ITPDeadP01","ITPDeadP02","ITPDeadP03","ITPDeadP04","ITPDebris01","ITPDebris02","ITPDebris03","ITPDebris04","ITPDebris05","ITPDump01","ITPPwr01","ITPPwr02","ITPPwr03","ITRocks01","ITRocks02","ITRocks03","ITRocks04","ITRocks05","ITRocks06",
	"ITRocks07","ITRocks08","ITRocks09","ITRocks10","ITRocks11","ITRocks12","ITRocks13","ITRocks14","MoneyCrate","MutantHovel","NBTibWallHub","NCPDebris01","NCPDebris02","NCPDebris03","NCPDebris04","NCPDebris05","NCPShop01","NCPShop02","NCPShop03","NOD_AirfieldControlTower","NOD_Battleship","Nod_Bunker","NOD_CommandCenter","NOD_CommandCenter2","NOD_CommandCenter3","NOD_CommandCenter4","NOD_DockCargoLoadingCrane","NOD_DockHQ","NOD_DockHQ2","NOD_DockHQ3","NOD_DockHQ4","NOD_IonDisruptionFieldGenerator","NOD_LabRadarBuilding",
	"NOD_LaunchFacility","NOD_ManufacturingFacility1","NOD_ManufacturingFacility2","NOD_ManufacturingFacility3","NOD_NBBHStatue","NOD_NBContNode","NOD_PortAuthority","NOD_Silo","NOD_Silo_LaunchBase","NOD_Silo01","NOD_Silo02","NOD_Silo03","NOD_Silo04","NOD_Silo05","NOD_Silo06","NOD_Silo07","NOD_Silo08","NOD_Silo09","NOD_Silo0CL","NOD_Silo10","NOD_Silo11","NOD_Silo12","NOD_Silo13","NOD_SiloCR","NOD_SiloMis","NOD_StrongholdBuilding1","NOD_StrongholdBuilding2","NOD_StrongholdBuilding2a","NOD_StrongholdBuilding2b","NOD_StrongholdBuilding3",
	"NOD_StrongholdBuilding4","NOD_StrongholdBuilding5","NOD_StrongholdBuilding6","NOD_TemplePrime","NOD_TransportationHubMotorPool","NOD_WeaponsLabFacility","NODAvatarDebris_04","NODCarryall_SP","NODCarryallInfantry_SP_Militants","NODHovercraft","NODMarcionTransport","NODParkedCarryall","NODParkedFlameTank","NODParkedMCV","NODParkedRaiderBuggy","NODParkedRaiderTank","NODParkedStealthTank","NODParkedVenom","NODParkedVertigoBomber","NODPowerStore","NodTibWallSeg","NODVertigo_SPBombingRun","NODVertigo_SPBombingRunTarget",
	"North_Carolina_Barn_01","North_Carolina_Barn_02","North_Carolina_Factory_01","North_Carolina_Grocery_Store_01","North_Carolina_House_01","North_Carolina_House_02","North_Carolina_Outdoor_Mall_01","North_Carolina_Ruin_01","North_Carolina_Ruin_02","North_Carolina_Ruin_03","North_Carolina_Ruin_04","North_Carolina_Warehouse_01","North_Carolina_Warehouse_02","ParkBench","ParkPaths","ParkPicnic","ParkPlant02","ParkPlant03","ParkPlygrnd01","ParkPlygrnd02","ParkPool","ParkStatue","ParkTable","Philadelphia","plane_crash","PM_3Wheel01","PM_3Wheel02",
	"PM_3Wheel03","PM_3Wheel04","PM_Hatchback01","PM_Hatchback02","PM_Hatchback03","PM_Hatchback04","PM_Limo01","PMAuto01","PMAuto02","PMAuto03","PMAuto04","PMBillboard01","PMBillboard02","PMEgyDock01","PMEgyDock01b","PMEgyDock02","PMEgyDock03","PMEgyDock04","PMEgyOilPipe","PMEgyOilPipeB","PMEgyOilPipeC","PMEgyOilWell01","PMEgyOilWell02","PMEgyOilWell03","PMEgyOilWell04","PMEgyPod01","PMEgyPod02","PMEgySupplies09","PMEgySupplies10","PMEgySupplies11","PMiscEgyBarr01","PMiscEgyBarr02","PMiscEgyCrat01","PMiscEgyCrat02","PMiscEgyDebr01",
	"PMiscEgyDebr02","PMiscEgyDebr03","PMiscEgyDebr04","PMiscEgyDebr05","PMiscEgyDump01","PMiscEgyFenc01","PMiscEgyFenc02","PMiscEgyFuel01","PMiscEgyLand01","PMiscEgyPowe01","PMiscEgyPowe02","PMiscEgyStum01","PMiscEgySupp01","PMiscEgySupp02","PMiscEgySupp03","PMiscEgySupp04","PMiscEgySupp05","PMiscEgySupp06","PMiscEgySupp07","PMiscEgySupp08","PMiscEgyWrec01","PMiscEgyWrec02","PMiscEgyWrec03","PMiscEgyWrec04","PMiscEgyWrec05","PMiscEgyWrec06","PMShopCart01","PMShopCart02","PMShopCart03","PMShopSign01","PMWreckedAuto01",
	"PMWreckedAuto02","PMWreckedAuto03","PMWreckedAuto04","PMWreckedAuto05","PMWreckedAuto06","PMWreckedAuto07","PShrubEgy01","PShrubEgy02","PShrubEgy03","PTreeEgy01","RedZoneAmbientFX","RedZoneOverpass","RedZoneRocks01","RedZoneRubble01","RedZoneRubble02","RedZoneRubble03","RedZoneRubble04","RedZoneRubble05","RedZoneRubble06","RedZoneRubble07","RedZoneRubble08","RedZoneRubble09","ReinforcementBay","Ripples_01","Ripples_02","Ripples_03","Rubble_Carryall","Rubble_Devastator","Rubble_Dropship","Rubble_Firehawk","Rubble_Mammoth",
	"Rubble_Mk2_01","Rubble_Orca","Rubble_Pitbull","Rubble_Predator","Rubble_Titan01","Rubble_Titan02","Rubble_Transport","RubbledBuilding01","RubbledBuilding02","RubbledBuilding03","RubbledBuilding04","RubbledBuilding05","RubbledBuilding06","RUProp01","RUProp02","RURock01","RURock02","RUTree01","RUTree02","RUTree03","RUTree04","RUTree05","RUWall01","RUWall02","RUWall03","SalvageCrate","SatelliteLaunchFacility","ShroudCrate","SiegeBarriers","SiegeBarriers10","SiegeBarriers5","SubwayHub","SubwayNode","TacitusBarrier","TallTree","TargetDummy","TemplePrimeRamp01",
	"TestBridge_Center","TestBridge_Center2","TestBridge_End","TestBridge_GateHouse","TestBridge","TibCell01","TiberiumChasmCluster01","TiberiumCollapsableTower","TiberiumFieldFromHarvesterDeath","TiberiumFieldFromTiberiumSilo","TiberiumShaft01","TiberiumShaft02","TiberiumShaft03","TiberiumSilo","TiberiumSmallField01","TiberiumSpike","TiberiumVent01","TiberiumVent02","TibTree01","TibTree02","TrainingStation","TUTORIAL_ADVMOVEMENT","TUTORIAL_ADVSELECTION","TUTORIAL_Attacking","TUTORIAL_BUILDING","TUTORIAL_CAMERA","TUTORIAL_CONTEXT","TUTORIAL_DEFAULT",
	"TUTORIAL_DPAD","TUTORIAL_GROUPS","Tutorial_Interface","TUTORIAL_MOVEMENT","TUTORIAL_POWERS","TUTORIAL_SELECTION","TUTORIAL_SKIRMISH","TUTORIAL_Stances","TUTORIAL_UNITS","TUTORIAL_Upgrades","UnitCrate","VeterancyCrate","Washington_DC_Barracks_01","Washington_DC_Department_of_Labor_01","Washington_DC_Diamond_Shaped_Building_01","Washington_DC_Drydock_01","Washington_DC_Encounters_Building_01","Washington_DC_Hangar_01","Washington_DC_Hangar_02","Washington_DC_Hotel_01","Washington_DC_Hotel_02","Washington_DC_L_Shaped_Building_01",
	"Washington_DC_Lighthouse_Radar_01","Washington_DC_Office_Building_01","Washington_DC_Personnel_Building_01","Washington_DC_Port_Authority_01","Washington_DC_Saucer_Shaped_Building_01","Washington_DC_Ship_01","Washington_DC_Ship_02","Washington_DC_Tower_01","Washington_DC_Warehouse_01","Washington_DC_Warehouse_02","Washington_DC_Warehouse_03","Washington_DC_Warehouse_04","Washington_DC_Warehouse_05","Washington_DC_Warehouse_06","Washington_DC_Warehouse_07","Washington_DC_Wedding_Cake_Building_01",
	"Washington_DC_X_Shaped_Building_01","Washington_Pentagon_Barrier_01","WaterFountain1AmbientLoop","WtrSkyboxEgypt","YellowZoneAmbientFX_A","YellowZoneSkyA","ZoneWall"
}

MiscObjectsTable={
	"AlienMetaBase","AlienMetaGamePowerStore","ALIENMetaTower","AlienStrikeForceHeavy","AlienStrikeForceLight","AlienStrikeForceMedium","AlienStrikeForceUltraHeavy","AlienStrikeForceUltraLight","BHStrikeForceHeavy","BHStrikeForceLight","BHStrikeForceMedium","BHStrikeForceUltraHeavy","BHStrikeForceUltraLight","GDIMetaBase","GDIMetaGamePowerStore","GDIMetaSkySentryPing","GDIStrikeForceHeavy","GDIStrikeForceLight","GDIStrikeForceMedium","GDIStrikeForceUltraHeavy","GDIStrikeForceUltraLight","ICMUMO_01","ICMUMO_02","ICMUMO_03","Marker_AlienPlague","Marker_Battle","Marker_BuildBase","Marker_BuildBaseSF","Marker_BuildQueudStratBuilding",
	"Marker_BuildStratBuilding","Marker_BuildStrikeForce","Marker_CommandoStrike","Marker_ConstructScrinTower","Marker_ConstructStrikeForce","Marker_ConstructStrikeForceH","Marker_ConstructStrikeForceL","Marker_ConstructStrikeForceM","Marker_ConstructStrikeForceUH","Marker_EmergencyCleanUp","Marker_Eradicate","Marker_FriendsofNod","Marker_FuryofNod","Marker_IchorInjection","Marker_ICMUMOTier1Move","Marker_ICMUMOTier2Move","Marker_IonCannon","Marker_IonSuperstorm","Marker_Mediablitz","Marker_Move","Marker_MoveTurn","Marker_NukeStrike","Marker_OrcaStrike","Marker_Patrol","Marker_PhaseField","Marker_PlanetaryBombardment","Marker_RaiseInsurection",
	"Marker_RefugeeAid","Marker_Repair","Marker_Rift","Marker_SF_BuildBase","Marker_SF_Guard","Marker_SF_Move","Marker_SF_Repair","Marker_SF_Transport","Marker_SF_UpgradeStrikeForce","Marker_StealthField","Marker_UpgradeBase","Marker_UpgradeDefense","Marker_UpgradePower","Marker_VertigoStrike","Marker_Wormhole","Marker_ZOCOMInfiltration","MetaGameTutorialPowerStore","MetaTiberiumCrystal","MetaTiberiumCrystal01","MetaTiberiumCrystal02","MetaTiberiumCrystal03","MetaTiberiumCrystal04","MGCity_01","MGE_01","MGE_02","MGE_03","MGE_04","MGE_04a","MGE_05","MGE_06","MGE_07","MGE_08","MGE_09","MGE_10","MGE_11","MGE_12","MGE_12a","MGE_13","MGE_14","MGE_14a",
	"MGE_15","MGE_16","MGE_16a","MGE_17","MGE_17a","MGE_18","MGE_19","MGE_19a","MGE_20","MGE_20a","MGE_21","MGE_22","MGE_23","MGE_23a","MGE_24","MGE_25","MGE_26","MGE_27","MGE_28","MGE_29","MGE_29a","MGE_30","MGE_31","MGE_32","MoKStrikeForceHeavy","MoKStrikeForceLight","MoKStrikeForceMedium","MoKStrikeForceUltraHeavy","NODMetaBase","NODMetaCloak","NODMetaGamePowerStore","NODStrikeForceHeavy","NODStrikeForceLight","NODStrikeForceMedium","NODStrikeForceUltraHeavy","NODStrikeForceUltraLight","R17StrikeForceHeavy","R17StrikeForceLight","R17StrikeForceMedium","R17StrikeForceUltraHeavy","SCRINMetaWormhole","STStrikeForceHeavy","STStrikeForceLight",
	"STStrikeForceMedium","STStrikeForceUltraHeavy","T59StrikeForceHeavy","T59StrikeForceLight","T59StrikeForceMedium","T59StrikeForceUltraHeavy","ZCStrikeForceHeavy","ZCStrikeForceLight","ZCStrikeForceMedium","ZCStrikeForceUltraHeavy"
}

CheatAndTestDummys={
	GenericDummy,GenericDummyNull,GenericDummyStay,"GenericDummyEffect",
	"InfiniteEnergyDummy","InfiniteTiberiumRegeneration","BuildAnywhereDummy","InfiniteProductionSpeedDummy","MetaControlDummyFreezeGame",
	"MetaControlDummyEnemyAIOFF","MetaControlDummyEveryAIOFF","MetaControlDummyMoney5k","MetaControlDummyMapRevealer",
	VictoryConditionHelper,"NAODTeamReferenceDummy"
}

MetaModObjects={
	"MetaControlDummyMainTabMenu","MetaCreditShop","MetaControlDummyDiplomacyTabMenu",
	"MetaControlDummyMain","MetaControlDummyGlobalDeactivator","MetaControlDummyMainTabMenuPlayerPower","MetaControlDummyActivator"
}

--WB_Trees = {"CHTree01","CHTree02","CHTree03","CHTree04","CHTree05","RUTree01","RUTree02","RUTree03","RUTree04","RUTree05", "GOTtree01", "AF_Tree02","AF_Tree03","AF_Tree04","AF_Tree05","DCTree01","DCTree02","DCTree04","DCTree05","DCTree05b","DCTree06"}
--WB_Bush = {"EGTbush01","EGTbush02","EGTbush03","EGTbush04","ASTtree01","DCTBush01","DCTBush02","DCTBush03","DCTBush04","DCTBush05","DCTBush06","DCTBush07"}
--WB_Buildings= {"NOD_DockHQ","NOD_DockHQ2","NOD_DockHQ3","NOD_DockHQ4", "NOD_CommandCenter","NOD_CommandCenter2","NOD_CommandCenter3","NOD_CommandCenter4","Nod_Silo_Radar"}

InternalObjectListsTable={"PowerPlantTypeList","TiberiumTypeList","NonLuaObjectsList","AllObjectsList"}
TiberiumTypeTable = {"TiberiumField", "TiberiumFieldBlue", "TiberiumCrystal", "TiberiumCrystalBlue"}
PowerPlantTypeTable={"GDIPowerPlant","BlackHandPowerPlant","MarkedOfKanePowerPlant","NODPowerPlant","SteelTalonsPowerPlant","ZOCOMPowerPlant","AlienPowerProjector","Reaper17PowerProjector","Traveler59PowerProjector"}

CNC3KW_OBJECT_TYPE_ALL_LIST_DESC = {
	"all normal objects","relevant objects","all units","vehicle","air","infantry",
	"defense structure","base","gdi structure","steel talons structure","zocom structure",
	"nod structure","black hand structure","marked of kane structure","alien structure",
	"reaper17 structure","traveler59 structure","misc","plants","world builder objects","weapon"
}
	
CNC3KW_OBJECT_TYPE_ALL_LIST = { 
["all normal objects"]=ObjectTypeTable,
["relevant objects"]=RelevantObjectTypeTable,
["all units"]=AllUnitsTypesTable,
["vehicle"]=AllVehicleUnits,
["air"]=AllAirUnits,
["infantry"]=AllInfantryUnits,
["defense structure"]=AllDefenseStructuresTable,
["base"]=AllBaseBuildings,
["gdi structure"]=GDI_All_Structures,
["steel talons structure"]=SteelTalons_All_Structures,
["zocom structure"]=ZOCOM_All_Structures,
["nod structure"]=NOD_All_Structures,
["black hand structure"]=BlackHand_All_Structures,
["marked of kane structure"]=MarkedOfKane_All_Structures,
["alien structure"]=Alien_All_Structures,
["reaper17 structure"]=Reaper17_All_Structures,
["traveler59 structure"]=Traveler59_All_Structures,
["misc"]=CheatAndTestDummys,
["plants"]=PlantObjects,
["world builder objects"]=WorldBuilderUseableObjects,
["weapon"]=WeaponNameTable
}

-----------------------------------------------------------------------------
------------------------TEAM AND PLAYER NAMES--------------------------------
-----------------------------------------------------------------------------
-- documentational purpose only, use GetTeamName function

TeamNames={
	--common
	"/team",
	"PlyrCivilian/teamPlyrCivilian",
	"PlyrCreeps/teamPlyrCreeps",
	"ReplayObserver/teamReplayObserver",
	"Player_1/teamPlayer_1",
	"Player_2/teamPlayer_2",
	"Player_3/teamPlayer_3",
	"Player_4/teamPlayer_4",
	"Player_5/teamPlayer_5",
	"Player_6/teamPlayer_6",
	"Player_7/teamPlayer_7",
	"Player_8/teamPlayer_8",
	"Player_1/defaultSkirmishTeamPlayer_1",
	"Player_2/defaultSkirmishTeamPlayer_2",
	"Player_3/defaultSkirmishTeamPlayer_3",
	"Player_4/defaultSkirmishTeamPlayer_4",
	"Player_5/defaultSkirmishTeamPlayer_5",
	"Player_6/defaultSkirmishTeamPlayer_6",
	"Player_7/defaultSkirmishTeamPlayer_7",
	"Player_8/defaultSkirmishTeamPlayer_8",
	--from campaign
	"PlyrNOD/teamPlyrNOD",
	"Nod_Enemy_Main/defaultSkirmishTeamNod_Enemy_Main"
}

MoreTeamNames={
	--more teams from wb, not working
	"Skirmish/teamSkirmish",
	"SkirmishAlien/teamSkirmishAlien",
	"SkirmishBlackHand/teamSkirmishBlackHand",
	"SkirmishCivilian/teamSkirmishCivilian",
	"SkirmishCommentator/teamSkirmishCommentator",
	"SkirmishGDI/teamSkirmishGDI",
	"SkirmishMarkedOfKane/teamSkirmishMarkedOfKane",
	"SkirmishNeutral/teamSkirmishNeutral",
	"SkirmishNod/teamSkirmishNod",
	"SkirmishNull/teamSkirmishNull",
	"SkirmishObserver/teamSkirmishObserver",
	"SkirmishReaper17/teamSkirmishReaper17",
	"SkirmishSteelTalons/teamSkirmishSteelTalons",
	"SkirmishTraveler59/teamSkirmishTraveler59",
	"SkirmishZOCOM/teamSkirmishZOCOM",
	"PlyrNeutral/teamPlyrNeutral"
}


PlayerNames={  --these worldbuilder names do NOT work unfortunately, go with team names or in rare cases use the ScriptHost communication bridge function
	"<All Players>","<Local Player>","<Local Player's Allies incl Self>","<Local Player's Allies>","<Local Player's Enemies>","<Local Player's Enemy>",
	"<This Player>","<This Player's Allies incl Self>","<This Player's Allies>","<This Player's Enemies>","<This Player's Enemy>",
	"Player_1","Player_2","Player_3","Player_4","Player_5","Player_6","Player_7","Player_8",
	"SkirmishGDI","SkirmishAlien","SkirmishBlackHand","SkirmishMarkedOfKane","SkirmishNod","SkirmishObserver","SkirmishReaper17","SkirmishSteelTalons","SkirmishTraveler59","SkirmishZOCOM",
	"PlyrCivilian","PlyrCreeps","SkirmishNeutral","SkirmishNull","PlyrNeutral","Skirmish","SkirmishCivilian","SkirmishCommentator"
} -- "ScriptFolder/Playername"

--note: the actual player name consist of the script folder reference and the player string name: "PlyrCivilian/Player_1" but it doesn't look like we can reference the folder (here PlyrCivilian) by a string, cause it's a struct internally

-----------------------------------------------------------------------------
------------VOICE & SOUND TABLES---------------------------------------------
-----------------------------------------------------------------------------
VoiceTimerCount      = { [1]="Aeva_Countdown01", [2]="Aeva_Countdown02", [3]="Aeva_Countdown03", [4]="Aeva_Countdown04", [5]="Aeva_Countdown05", [6]="Aeva_Countdown06", [7]="Aeva_Countdown07", [8]="Aeva_Countdown08", [9]="Aeva_Countdown09", [10]="Aeva_Countdown10"  }
VoiceTimerMin        = { [1]="Aeva_RemainMin01", [3]="Aeva_RemainMin03", [5]="Aeva_RemainMin05", [10]="Aeva_RemainMin10", [15]="Aeva_RemainMin15", [20]="Aeva_RemainMin20"}
VoiceTimerSec        = { [10]="Aeva_RemainSec10", [30]="Aeva_RemainSec30"}
VoiceTimerMin2       = { [1]="Aeva_InGameMin01", [3]="Aeva_InGameMin03", [5]="Aeva_InGameMin05", [10]="Aeva_InGameMin10", [15]="Aeva_InGameMin15", [20]="Aeva_InGameMin20"}
VoiceTimerSec2       = { [10]="Aeva_InGameSec10", [30]="Aeva_InGameSec30"}
VoiceTimerBarrierMin = { [1]="Aeva_OnBarrierMin01", [3]="Aeva_OnBarrierMin03", [5]="Aeva_OnBarrierMin05", [10]="Aeva_OnBarrierMin10", [15]="Aeva_OnBarrierMin15", [20]="Aeva_OnBarrierMin20"}
VoiceTimerBarrierSec = { [10]="Aeva_OnBarrierSec10", [30]="Aeva_OnBarrierSec10"}	
VoiceMissionAccomp   = { [0]="Aeva_MissionAccomp", [1]="Aeva_TertObjAchiev",[2]="Aeva_SecoObjAchiev",[3]="Aeva_PrimObjAchiev"}
VoiceWinLost         = { [0]="Aeva_YouHaveLost", [1]="Aeva_YouAreVictori"}	  

-----------------------------------------------------------------------------
---------------------------LUA IO MOD----------------------------------------
-----------------------------------------------------------------------------

function PathExists(PathToTest)
    local tmppath="" .. PathToTest .. "\\" .. tmpname() .. ""
	local filehandle = writeto(tmppath)
	if filehandle ~= nil then closefile(filehandle) end
	local IsPathExistent = rename(tmppath, tmppath)
	remove(tmppath)
	if IsPathExistent then return true	
	else return false end
end

function PathExistsOLD(PathToTest)
    tmppath="" .. PathToTest .. "\\" .. tmpname() .. ""
	writeto(tmppath)
	writeto()
	IsPathExistent = tostring(rename(tmppath, tmppath))
	remove(tmppath)
	if IsPathExistent ~= "nil" then
		return true	
		else 
		return false
	end
end

function FileExists(FilePathToTest)
	local IsFileExistent = rename(FilePathToTest, FilePathToTest)
	if IsFileExistent then return 1	
	else return 0 end
end

function CreateFolder(filepath,foldername)
	if strfind(GetOS(),"Windows") then
		if filepath == nil and foldername ~= nil then execute("START /B /MIN cmd /c mkdir " .. strchar(34) .. GetFilePath() .. "\\" .. foldername ..  strchar(34)  .. " & " .. "START /MAX" .. ProcessName)
		elseif filepath ~= nil and foldername == nil then execute("START /B /MIN cmd /c mkdir " .. strchar(34) .. filepath ..  strchar(34) .. " & " .. "START /MAX" .. ProcessName)
		elseif filepath ~= nil and foldername ~= nil then execute("START /B /MIN cmd /c mkdir " .. strchar(34) .. filepath .. "\\" .. foldername .. "\\" .. strchar(34)  .. " & " .. "START /MAX" .. ProcessName)
		elseif filepath == nil and foldername == nil then execute("START /B /MIN cmd /c mkdir " .. strchar(34) .. GetFilePath() .. "\\" .. RandomString(5) ..  strchar(34)  .. " & " .. "START /MAX" .. ProcessName) 
		end
	else error("OS not compatible, only windows") return "" end
end

function GetOS()
	return getenv("OS")
end

function GetComputerName()
	return getenv("ComputerName")
end

function GetTempFolder()
	return getenv("Tmp")
end

function OpenFolder(filepath)
	if strfind(GetOS(),"Windows") then
		if filepath == nil then execute("explorer " .. strchar(34) .. "" .. GetFilePath() .. "" .. strchar(34) .. "")
		else execute("explorer " .. strchar(34) .. "" .. filepath .. "" .. strchar(34) .. "") end
	else error_("Error in OpenFolder function: OS not compatible, only windows") end
end

function ExtractRegistryValue(REGKEY,REGVAL)
	local REGISTRY_VALUE	
	local TransferFile = "USERDATAPATH.TXT"
	if not rename(TransferFile, TransferFile) then
		local REG_QUERY_CMD = [[CHCP 1252 & REG QUERY "]] .. REGKEY .. [[" /v "]] .. REGVAL .. [[" > ]] .. TransferFile
		execute(REG_QUERY_CMD)
		if ProcessName ~= nil then
			--execute("START /MAX" .. ProcessName)
		end
		local i=clock()+0.1
		while(clock()<i) do end
	end
	local filehandle = openfile(TransferFile, 'r')
	local filesize = seek(filehandle, "end")
	seek(filehandle, "set")
	if filesize ~= nil and filesize ~= 0 then	
		local line = read(filehandle, '*l')
		while line ~= nil do
			if strfind(line, "REG_SZ") then 
				REGISTRY_VALUE = strsub(line, 19+strlen(REGVAL))
			end
			line = read(filehandle, '*l')
		end
	end
	closefile(filehandle)
	--remove("REGVAL.txt")
	--print(REGISTRY_VALUE)
	return REGISTRY_VALUE
end	

function ExtractRegistryValueAndDeleteTransferFile(REGKEY,REGVAL)
	local REGISTRY_VALUE
	local REG_QUERY_CMD = [[CHCP 1252 & REG QUERY "]] .. REGKEY .. [[" /v "]] .. REGVAL .. [[" > REGVAL.txt]]
	print(REG_QUERY_CMD)
	execute(REG_QUERY_CMD)
	sleep(0.1)
	local filehandle = openfile("REGVAL.txt", 'r')
	local filesize = seek(filehandle, "end")
	seek(filehandle, "set")
	if filesize ~= nil and filesize ~= 0 then	
		local line = read(filehandle, '*l')
		while line ~= nil do
			if strfind(line, "REG_SZ") then 
				REGISTRY_VALUE = strsub(line, 19+strlen(REGVAL))
			end
			line = read(filehandle, '*l')
		end
	end
	closefile(filehandle)
	remove("REGVAL.txt")
	return REGISTRY_VALUE
end	

function GetFilePath(Game)
	if FilePathInitialized == 1 then return FilePath
	else
		local UserDataFolder
		if Game == nil or Game == "BFME2ROTWK" then 
			UserDataFolder = ExtractRegistryValue([[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\electronic arts\electronic arts\The Lord of the Rings, The Rise of the Witch-king]], [[UserDataLeafName]])
		elseif Game == "BFME2" then 
			UserDataFolder = ExtractRegistryValue([[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\electronic arts\electronic arts\The Battle for Middle-earth II]], [[UserDataLeafName]])
		elseif Game == "C&C3EP1" then 
			UserDataFolder = ExtractRegistryValue([[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\electronic arts\electronic arts\command and conquer 3 kanes wrath]], [[UserDataLeafName]])
		elseif Game == "C&C3" then 
			UserDataFolder = ExtractRegistryValue([[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\electronic arts\electronic arts\command and conquer 3]], [[UserDataLeafName]])
		end
		local UserDataPath = [[C:\Users\]] .. getenv("USERNAME") .. [[\Documents\]] .. UserDataFolder .. [[\]]
		if not PathExists(UserDataPath  .. MainFolder .. [[\]]) then  
			CreateFolder(UserDataPath, MainFolder)
			sleep(0.1)
			if not PathExists(UserDataPath  .. MainFolder .. [[\]]) then
				UserDataPath = [[C:\Users\]] .. getenv("USERNAME") .. [[\Documents\]] 
				CreateFolder(UserDataPath, MainFolder)
				sleep(0.1)
			end
		end
		FilePath = UserDataPath .. MainFolder .. [[\]]
		FilePathInitialized = 1
		return UserDataPath
	end
end

function GetFilePathOld()   
	if FilePathInitialized == 1 then return FilePath
		else
		for i=1,getn(CNC3EP1FOLDER)-1,1 do 
			for j=1,getn(CNC3EP1FOLDERPATH),1 do 
				if PathExists(CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i]) then
					local FinalPath="" .. CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i] .. "\\" .. MainFolder .. "\\"
					if PathExists(FinalPath) then 
						FilePathInitialized = 1 
						FilePath=FinalPath
						return FinalPath
						else 
						return "" .. CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i] .. "\\"
						--CreateFolder(CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i],MainFolder)
						--if PathExists(FinalPath) then return FinalPath
						--else return "" .. CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i] .. "\\" end
					end
				end
			end   
		end
		local BackupPath = [[C:\Users\]] .. getenv("USERNAME") .. [[\Documents\]]
		if not PathExists(BackupPath  .. MainFolder .. [[\]]) then  
			CreateFolder(BackupPath, MainFolder)
			sleep(0.1)
		end
		FilePath = BackupPath .. MainFolder .. [[\]]
		folderpath = BackupPath .. MainFolder .. [[\]]
		FilePathInitialized = 1
		return folderpath
		--return CNC3EP1FOLDER[getn(CNC3EP1FOLDER)]
	end
end

function GetFilePathPrimary()
	if FilePathInitialized == 1 then return FilePath 
		else
		for i=1,getn(CNC3EP1FOLDER)-1,1 do 
			for j=1,getn(CNC3EP1FOLDERPATH),1 do 
				if PathExists(CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i]) then
					local FinalPath="" .. CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i] .. "\\" .. MainFolder .. "\\"
					if not PathExists(FinalPath) then	
						CreateFolder(CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i],MainFolder) 
						FilePath = FinalPath
						FilePathInitialized = 1
						return FilePath
					end
				end
			end  
		end
		FilePath = CNC3EP1FOLDER[getn(CNC3EP1FOLDER)]
		FilePathInitialized = 1  
		return FilePath	
	end
end

function FolderCreationPossible()
	if FilePathInitialized == 1 then return false
		else
		for i=1,getn(CNC3EP1FOLDER)-1,1 do 
			for j=1,getn(CNC3EP1FOLDERPATH),1 do 
				if PathExists(CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i]) and not PathExists("" .. CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i] .. "\\" .. MainFolder .. "\\") then return true
				else return false end
			end
		end
	end
end

function GetFileListOld(folderpath,dtype)
	if folderpath == nil then folderpath= GetFilePath() end
	local filename = "filenames"
	if dtype == nil then dtype="*.lua" end
	local MakeFileTable = function()
		local filelist = {}
		local line = ""
		local filehandle = openfile(%folderpath .. %filename, 'r')
		--local linenumbers = gsub(read(filehandle, '*a'),"%\n","")
		for i=1,300,1 do
			line=read(filehandle, '*l')
			if line ~= nil then 
				tinsert(filelist,line)
				else
				closefile(filehandle)
				remove(%folderpath .. %filename)
				ExternalFileList=filelist
				return filelist
			end 
		end
	end
	SetScriptTimer(1,MakeFileTable)
	execute("START /B /MIN cmd /c dir " .. strchar(34) .. GetFilePath() .. strchar(34) .. dtype .. "/b/a-d/o-n > " .. strchar(34) .. GetFilePath() .. filename  .. strchar(34) .. " & " .. "START /MAX" .. ProcessName) 
end

function GetFilePath()   
	if FilePathInitialized == 1 then return FilePath
		else
		for i=1,getn(CNC3EP1FOLDER)-1,1 do 
			for j=1,getn(CNC3EP1FOLDERPATH),1 do 
				if PathExists(CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i]) then
					local FinalPath="" .. CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i] .. "\\" .. MainFolder .. "\\"
					if PathExists(FinalPath) then 
						FilePathInitialized = 1 
						FilePath=FinalPath
						return FinalPath
						else 
						return "" .. CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i] .. "\\"
						--CreateFolder(CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i],MainFolder)
						--if PathExists(FinalPath) then return FinalPath
						--else return "" .. CNC3EP1FOLDERPATH[j] .. CNC3EP1FOLDER[i] .. "\\" end
					end
				end
			end   
		end
		local BackupPath = [[C:\Users\]] .. getenv("USERNAME") .. [[\Documents\]]
		if not PathExists(BackupPath  .. MainFolder .. [[\]]) then  
			CreateFolder(BackupPath, MainFolder)
			sleep(0.1)
		end
		folderpath = BackupPath .. MainFolder .. [[\]]
		return folderpath
		--return CNC3EP1FOLDER[getn(CNC3EP1FOLDER)]
	end
end

function GetFileList2()  --this non delayed approach is not working right now
    local filepath= GetFilePath()
	--local f = openfile(file,'rb')
	local dircom = "dir '..filepath..' /b /ad"
	local res = readfrom("|" .. dircom)
	return read(res,'*a')
end

function DISABLED_print(output, display_time)
	if display_time == nil then display_time = 3 end
	output = tostring(output)
	ExecuteAction("SHOW_MILITARY_CAPTION", "\n\n\n\n" .. output .. "\n", display_time)
end

function WriteToFile(output,file,mode,hide)
	if mode == nil then mode = 'a' end
	if file == nil then file= "" .. GetFilePath() .. LiveOutputFile end
	output = tostring(output)
	local filehandle = openfile(file, mode)
	if filehandle ~= nil then
		write(filehandle,"\n" .. output)
		else
		local filehandle = writeto(file)
		write(filehandle,"\n" .. output)  
		--appendto(filehandle,"\n" .. output)	  
	end
	flush(filehandle)
	closefile(filehandle)
	if hide==nil then
		ExecuteAction("SHOW_MILITARY_CAPTION", "DATA WRITTEN TO: " .. file .. "", 3)
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:FILEWRITECOMPLETE")
	end
end

function out(...) 
	WriteToFile(arg[1],arg[2],arg[3],arg[4]) 
	--call(WriteToFile,arg)
	return arg[1]
end

function WriteBinaryDataToFile(output,file)
	local filedata = output
	filedata = gsub(filedata, "XXX_REPLACE_SUB_XXX", strchar(26))  --\x{1A}
	--filedata = gsub(filedata, "XXX_REPLACE_LF_XXX", strchar(10))  --\x{0A}
	--filedata = gsub(filedata, "XXX_REPLACE_CR_XXX", strchar(13))  --\x{0D}
	local filehandle = openfile(file, 'wb')
	if filehandle ~= nil then
		write(filehandle, filedata)
	end
	flush(filehandle)
	closefile(filehandle)
end

function WriteToFileOLD(output,file)
	if file == nil then 
		file= "" .. GetFilePath() .. "LiveOutputFile"
	end
	if tostring(type(output)) ~= "string" then
		output = tostring(output)
	end
	appendto(file)
	write(output)
	--seek("end")
	write("\n")
	flush()
	writeto()
	ExecuteAction("SHOW_MILITARY_CAPTION", "DATA WRITTEN TO: " .. file .. "", 3)
	ExecuteAction("DISPLAY_TEXT", "MESSAGE:FILEWRITECOMPLETE")
end

function _ALERT_DISABLED(message)  --called from _ERRORMESSAGE(message) function if error(message) is called
	--local errorlevel = 4
	if strfind(message,"ScriptTimer") then ScriptTimerTable = {} ScriptTimerTableFast = {} end
	if reason==nil then reason="unknown" end
	if ErrorLogToFile==1 then WriteToFile("ErrorLogToFile(" .. date() .. "): " .. message,GetFilePath() .. ErrorFileLog,nil,"hide") end   --"function " .. getinfo(errorlevel).name .. ", line " .. getinfo(errorlevel).currentline .. ", LineOfFunctionCall " .. getinfo(errorlevel+1).currentline .. ", reason "
	if ErrorWarnings==1 then 
		--local printinfo="LUA error in function: " .. getinfo(errorlevel).name .. ", line: " .. getinfo(errorlevel).currentline .. ",\nreason: "
		print("LUA error(" .. date() .. "): " .. message) 
		ExecuteAction("DISPLAY_TEXT","MESSAGE:ERROR") 
	end
	if ErrorWarnings==2 then ExecuteAction("DISPLAY_TEXT","MESSAGE:ERROR") end
	if ErrorSound==1 then ExecuteAction("PLAY_SOUND_EFFECT", "Tutorial_TrainingStation_Select1") end
	if ErrorExitType==1 then ExecuteAction("MAP_EXIT")   --for multiplayer
		elseif ErrorExitType == 2 then exit()
	else return nil end
	pop()
end

function error_(message) --mild error for manual use
	--local errorlevel = 4
	if reason==nil then reason="unknown" end
	if ErrorLogToFile==1 then WriteToFile("ErrorLogToFile(" .. date() .. "): " .. message,GetFilePath() .. ErrorFileLog,nil,"hide") end   --"function " .. getinfo(errorlevel).name .. ", line " .. getinfo(errorlevel).currentline .. ", LineOfFunctionCall " .. getinfo(errorlevel+1).currentline .. ", reason "
	if ErrorWarnings==1 then 
		--local printinfo="LUA error in function: " .. getinfo(errorlevel).name .. ", line: " .. getinfo(errorlevel).currentline .. ",\nreason: "
		print("LUA error(" .. date() .. "): " .. message) 
		ExecuteAction("DISPLAY_TEXT","MESSAGE:ERROR") 
	end
	if ErrorWarnings==2 then ExecuteAction("DISPLAY_TEXT","MESSAGE:ERROR") end
	if ErrorSound==1 then ExecuteAction("PLAY_SOUND_EFFECT", "Tutorial_TrainingStation_Select1") end
	if ErrorExitType==1 then ExecuteAction("MAP_EXIT")   --for multiplayer
		elseif ErrorExitType == 2 then exit()
	else return nil end
end

function SeekInFile(SearchString,file)
	if file == nil then
		if FilePathInitialized ~= 1 then FilePath = GetFilePath() end 
		file= "" .. FilePath .. AutostartFile
		if FileExists(file) == 0 then
			error("file does not exist: " .. file)   
			return 0
		end
	end
	if type(SearchString) ~= "string" then
		SearchString = tostring(SearchString)
	end   
    local filehandle = openfile(file, 'r')
    local data_to_exec = read(filehandle, '*a') 
	closefile(filehandle)
	--seek(filehandle, SearchString)
	if strfind(data_to_exec, SearchString) == nil then
	    return 0
		else 
	    return 1
	end
end

function LoadFileData(file)
	if FilePathInitialized ~= 1 then FilePath = GetFilePath() end 
	if file == nil then return "" end
	if FileExists(file) then
		local filehandle = openfile(file, 'r')
		local data = read(filehandle, '*a') 
		closefile(filehandle)
		return data
	end
end

function HandleAutoconfig(dofile_not)
    AutostartFilePath=GetFilePath() .. AutostartFile
	if FileExists(AutostartFilePath) == 1 then
		if dofile_not == nil then
			dofile(AutostartFilePath)
		end
		else
        WriteAutoconfig()
	end
end  

function GetAutoconfigBoolValue(variable)
	file= GetFilePath() .. AutostartFile
	if FileExists(file) == 0 then
		error_("Error in GetAutoconfigBoolValue function: file does not exist: " .. file)
		return 0
	end
    local filehandle = openfile(file, 'r')
    local data_to_exec = read(filehandle, '*a') 
	closefile(filehandle)
	local start_pos = strfind(data_to_exec,variable)
    if start_pos ~= nil then 	
		local end_pos = strfind(data_to_exec,"\n",start_pos)
		local exstring = strsub(data_to_exec,start_pos,end_pos)
		if strfind(exstring,"yes") or strfind(exstring,"1") then return 0
		else return 1 end
	end		
end

function ChangeAutoConfig(variable,replacement)
	if MultiplayerStatus == 1 then return end
	--if LocalClientTeam~=GetTeamName(self) then return end
    local file=FilePath .. AutostartFile
    local filehandle = openfile(file, 'r')
	--seek(filehandle, SearchString)	
    local data_to_exec = read(filehandle, '*a') 
	closefile(filehandle)	
    local start_pos = strfind(data_to_exec,variable)
    if start_pos ~= nil then 
		local end_pos   = strfind(data_to_exec,"\n",start_pos)
		local exstring = strsub(data_to_exec,start_pos,end_pos)
		data_to_exec = gsub(data_to_exec,exstring,replacement .. "\n")
		filehandle = openfile(file, 'w+')
		write(filehandle,data_to_exec)
		else
        filehandle = openfile(file, 'a')
        write(filehandle,"\n" .. replacement)		
	end
	flush(filehandle)
	closefile(filehandle)	
	ExecuteAction("DISPLAY_TEXT", "MESSAGE:FILEWRITECOMPLETE")
end

-- function dofile2(filename, ...)  --also give arguments to loaded script
-- arg = {[0] = filename, ...}
-- return assert(loadfile(filename))(...)
-- return assert(readfrom(filename))(...)  --custom
-- end 

function loadfile(file, self, other)
	if file == nil then file = "" .. GetFilePath() .. LiveInputFile end
	local filehandle = openfile(file, 'r')
	local data_to_exec = read(filehandle, '*a')
	dostring(data_to_exec)
end

function dofile_with_arg(file, self, other)
	if file == nil then
		if FilePathInitialized ~= 1 then FilePath = GetFilePath() end 
		file = "" .. FilePath .. LiveInputFile 
	end
	arg = {[0] = file, [1] = self, [2] = other}
	local filehandle = openfile(file, 'r')
	local data_to_exec = read(filehandle, '*a')
	if self == nil then
	    self = 0
	end
	if other == nil then
	    other = 0
	end
	return assert(dostring(data_to_exec))(self,other)
end

function RunExternalLuaScript(self, other)
	object1 = self --getglobal(GetObj.Index(self))
	if FilePathInitialized ~= 1 then FilePath = GetFilePath() end 
	local External_Script_Path = "" .. FilePath .. LiveInputFile  
	if FileExists(External_Script_Path) == 0 then
		WriteToFile(LIVE_INPUT_DEFAULT,External_Script_Path)
	end
	--if GAME_ACTIVE == "BFME2_ROTWK_2.02" then
		--dostring(GetExternalLuaScriptBFME2(External_Script_Path))
	--else
		dofile(External_Script_Path)
	--end
	--ExecuteAction("DISPLAY_TEXT", "MESSAGE:EXTERNALSCRIPTSUCCESSFUL")
	if ShowExternalScriptPath == 1 then
	    ShowExternalScriptPath = 0
	    ExecuteAction("SHOW_MILITARY_CAPTION", "External Script Location: " .. External_Script_Path .. "", 4)
	end
	--ExecuteAction("PLAY_SOUND_EFFECT", "Gui_SFX_GAMEOVER")
end

function GetExternalLuaScriptBFME2(file)
	local TextFileTable = ParseTextFileIntoTable(file)
	for i=1,getn(TextFileTable),1 do
		if strfind(TextFileTable[i],[[--]]) then TextFileTable[i] = "" end
	end
	return ConvertLineTableToText(TextFileTable)
end

function ConvertLineTableToText(LineTable)
	local Text = ""
	for i=1,getn(LineTable)-1,1 do
		Text = Text .. LineTable[i] .. "\n"
	end
	Text = Text .. LineTable[getn(LineTable)]
	return Text
end

function ParseTextFileIntoTable(file)
	local filehandle = openfile(file, 'r')
	local LineTable = {}
	local LineCount = 0
	local line = read(filehandle, '*l')
	while line ~= nil do 
		LineCount=LineCount+1
		tinsert(LineTable, line) 
		line = read(filehandle, '*l') 
	end
	closefile(filehandle)	
	return LineTable, LineCount
end

function ConvertLineTableToText(LineTable)
	local Text = ""
	for i=1,getn(LineTable)-1,1 do
		Text = Text .. LineTable[i] .. "\n"
	end
	Text = Text .. LineTable[getn(LineTable)]
	return Text
end

function InsertTextIntoTable(table, text, pos)
	local TextFileTableMod = {}
	local TextTableToInsert = ConvertTextIntoTable(text)
	for k=1,pos,1 do
		tinsert(TextFileTableMod, table[k])
	end
	for k=1,getn(TextTableToInsert),1 do
		tinsert(TextFileTableMod, TextTableToInsert[k])
	end
	for k=pos+1,getn(table),1 do
		tinsert(TextFileTableMod, table[k])
	end
	return TextFileTableMod
end	

function ConvertTextIntoTable(text)
	local LineTable = {}
	local CurrentLine = ""
	while strfind(text, "\n") do
		CurrentLine = strsub(text, 1, strfind(text,"\n")+1)
		tinsert(LineTable,CurrentLine)
		text = gsub(text, CurrentLine .. "\n", "")  --error replaces all
	end
	return LineTable
end

------------------------------SAVEGAME CODE---------------------------------

function RefreshSavegameTablePrevious()
	for i=1,getn(HumanPlayerTable),1 do
		SavegameTablePrevious[GetTeamsDescriptiveName(HumanPlayerTable[i])]={}
		for k,v in SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])] do
			SavegameTablePrevious[GetTeamsDescriptiveName(HumanPlayerTable[i])][k]=v
		end
	end
end

function HandleSavegame()
	if Savegame_Initialized == 0 then 
		Savegame_Initialized=1
		LoadSavegame()
		CreateSavegameTable()
		RefreshSavegameTablePrevious()
	end
	for i=1,getn(HumanPlayerTable),1 do
		for k,v in SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])] do
			if v ~= SavegameTablePrevious[GetTeamsDescriptiveName(HumanPlayerTable[i])][k] then
				CreateSavegame()	
				RefreshSavegameTablePrevious()
				return
			end
		end
	end
end

function CreateSavegameTable()
	if StoryModeStatus or MetaGameStatus then  --tempchange
		local TempPlayer=HumanPlayerTable[1] 
		HumanPlayerTable={}
		tinsert(HumanPlayerTable,TempPlayer)	
	end
	for i=1,getn(HumanPlayerTable),1 do
		if SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]==nil then
			SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]={}
			SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["MetaCredits"]=0 
			SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["NAOD_highscore"]=0
			SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["RankLevel"]=0
			SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["XP"]=0
		end
	end
end

function GetSavegame(file,key)
	if key == nil then key=enc_key end
	if FilePathInitialized ~= 1 then FilePath = GetFilePath() end 
	if file == nil then file= "" .. FilePath .. SaveFilename end
	if FileExists(file) == 0 then CreateSavegame() return end --error_("file does not exist: " .. file) end --error("file does not exist: " .. file) end
	local filehandle = openfile(file, 'r')
	local savedata_enc = read(filehandle, '*a') 
	closefile(filehandle)
	return decrypt(savedata_enc,key)
end

function LoadSavegame(file,key)
	if key == nil then key=enc_key end
	local Savegame = GetSavegame(file,key)
	if Savegame ~= nil then dostring(Savegame) end
end

function CreateBackupFile(file)
	if FilePathInitialized ~= 1 then FilePath = GetFilePath() end 
	if file == nil then file= "" .. FilePath .. SaveFilename end
	if FileExists(file) == 0 then return end --error("file does not exist: " .. file) end
	local filehandle = openfile(file, 'r')
	local data= read(filehandle, '*a') 
	closefile(filehandle)
	filehandle = openfile(GetFilePath() .. SaveFilenameBackup, 'w+')
	write(filehandle,data)
	flush(filehandle)
	closefile(filehandle)
	--ExecuteAction("SHOW_MILITARY_CAPTION", "DATA WRITTEN TO: " .. file .. "", 3)
	ExecuteAction("DISPLAY_TEXT", "MESSAGE:FILEWRITECOMPLETE")   
end

function CreateSavegame(file,key)
	if key==nil then key=enc_key end
	if FilePathInitialized ~= 1 then FilePath = GetFilePath() end 
	if file == nil then file= "" .. FilePath .. SaveFilename end
	if FileExists(file) == 0 then CreateSavegameTable() end --error("file does not exist: " .. file) end
	local CreateSavegameDataString = function()
		local resstr = ""
		for i=1,getn(HumanPlayerTable),1 do   --getn(HumanPlayerTable)
			resstr=resstr .. "MetaModVersion=" .. MetaModVersion .. "\n"
			resstr=resstr .. "SavegameTable[" .. mkstr(GetTeamsDescriptiveName(HumanPlayerTable[i])) .. "]={}" .. "\n"
			resstr=resstr .. "SavegameTable[" .. mkstr(GetTeamsDescriptiveName(HumanPlayerTable[i])) .. "][" .. mkstr("MetaCredits") .. "]=" .. SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["MetaCredits"] .. "\n"
			resstr=resstr .. "SavegameTable[" .. mkstr(GetTeamsDescriptiveName(HumanPlayerTable[i])) .. "][" .. mkstr("NAOD_highscore") .. "]=" .. SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["NAOD_highscore"] .. "\n"
			resstr=resstr .. "SavegameTable[" .. mkstr(GetTeamsDescriptiveName(HumanPlayerTable[i])) .. "][" .. mkstr("XP") .. "]=" .. SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["XP"] .. "\n"
			resstr=resstr .. "SavegameTable[" .. mkstr(GetTeamsDescriptiveName(HumanPlayerTable[i])) .. "][" .. mkstr("RankLevel") .. "]=" .. SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["RankLevel"] .. "\n\n"
			return resstr
		end
	end
	if not SavegameBackupCreated then SavegameBackupCreated=true CreateBackupFile(file) end
	local filehandle = openfile(file,'w+')
	write(filehandle,encrypt(CreateSavegameDataString(),key))
	flush(filehandle)
	closefile(filehandle)
	--ExecuteAction("SHOW_MILITARY_CAPTION", "DATA WRITTEN TO: " .. file .. "", 3)
	--ExecuteAction("DISPLAY_TEXT", "MESSAGE:FILEWRITECOMPLETE")
end 
--------------------------------------------------------------------------
----------------------EXTERNAL SCRIPTS LOADER SYSTEM----------------------
--------------------------------------------------------------------------

ModScripts = {}
ModScripts["filelist"] = {}
ModScripts["data"] = {}
ModScripts["status"] = {}
ModScripts["repeat_function"] = {}     --every 10s
ModScripts["fastrepeat_function"] = {} --every 1s (unfinished)
ModScripts.MaxScriptNumber = 300

ModScripts.Prefix = "script."
ModScripts.Suffix = "*.lua"

function HandleModScripts()
	if ModScriptsAutoLoadList == 1 then ModScripts.GetScriptFileList(ModScripts.Prefix,ModScripts.Suffix) end
	if ModScriptsAlwaysOff == 0 then ModScripts.LoadFiles() end
end

function ModScripts.LoadFiles()
	for i=1,getn(ModScripts["filelist"]),1 do
		ModScripts["data"][ModScripts["filelist"][i]] = LoadFileData(GetFilePath() .. ModScripts["filelist"][i])
		ModScripts["status"][ModScripts["filelist"][i]] = ModScripts.GetValue(ModScripts["filelist"][i],'ModScripts["status"]')
		dostring(ModScripts["data"][ModScripts["filelist"][i]])	
	end
end

function ModScripts.GetValue(filename,variable)
	local start_pos = strfind(ModScripts["data"][filename],variable,1,1)
    if start_pos ~= nil then 	
		local end_pos = strfind(ModScripts["data"][filename],"\n",start_pos)
		local exstring = strsub(ModScripts["data"][filename],start_pos,end_pos)
		if strfind(exstring,"yes") or strfind(exstring,"1") or strfind(exstring,"on") or strfind(exstring,"true") then return true
		else return false end
	else return false end
end

function ModScripts.SetValue(filename,variable,replacement,LastToken)
    if LastToken == nil then LastToken="\n" end
    local file=FilePath .. filename
    local filehandle = openfile(file, 'r')	
    local data_to_exec = read(filehandle, '*a') 
	closefile(filehandle)	
    local start_pos = strfind(data_to_exec,variable,1,1)
    if start_pos ~= nil then 
	    local end_pos = 0
	    if LastToken~="\n" then end_pos = strfind(data_to_exec,"\n",strfind(data_to_exec,LastToken,start_pos))
		else end_pos = strfind(data_to_exec,LastToken,start_pos) end
		data_to_exec = strsub(data_to_exec,1,start_pos-1) .. replacement .. "\n" .. strsub(data_to_exec,end_pos+1,strlen(data_to_exec))
		--local exstring = strsub(data_to_exec,start_pos,end_pos)
		--data_to_exec = gsub(data_to_exec,exstring,replacement .. "\n",1)
		filehandle = openfile(file, 'w+')
		write(filehandle,data_to_exec)
		else
        filehandle = openfile(file, 'a')
        write(filehandle,"\n" .. replacement .. "\n")		
	end
	flush(filehandle)
	closefile(filehandle)	
	ExecuteAction("DISPLAY_TEXT", "MESSAGE:FILEWRITECOMPLETE")
end

function ModScripts.CreateExampleScript()
	local ExampleScriptString = 'do' .. '\n\n' .. 'local ModScriptName="script.ExampleScript.lua"' .. '\n' .. 'ModScripts["status"][ModScriptName] = 0' .. '\n' .. 'ModScripts.RegisterRepeatFunction("ExampleScript.HelloWorld()",ModScriptName)' .. '\n\n' .. 'ExampleScript={}' .. '\n\n' .. 'function ExampleScript.HelloWorld()' .. '\n  ' .. 'print("hello world")' .. '\n' .. 'end' .. '\n\nend'
	WriteToFile(ExampleScriptString,GetFilePath() .. "script.ExampleScript.lua",'w+')
end

function ModScripts.RegisterRepeatFunction(func,scriptname)
	if ModScripts["repeat_function"][scriptname]==nil then ModScripts["repeat_function"][scriptname]={} end
	if not IsEntryInTable(ModScripts["repeat_function"][scriptname],func) then 
		tinsert(ModScripts["repeat_function"][scriptname],func) 
	end
end

function ModScripts.UnRegisterRepeatFunction(func,scriptname)
	if ModScripts["repeat_function"][scriptname]==nil then return end
	if not IsEntryInTable(ModScripts["repeat_function"][scriptname],func) then 
		tremove(ModScripts["repeat_function"][scriptname],func) 
	end
end

function ModScripts.GetScriptFileList(prefix,dtype)
	local filename = "filenames"
	if dtype == nil then dtype="*.lua" end
	local CreateScriptFileTable = function()
		--create filename table
		local filelist = {}
		local line = ""
		local filehandle = openfile(GetFilePath() .. %filename, 'r')
		--local linenumbers = gsub(read(filehandle, '*a'),"%\n","")
		for i=1,(ModScripts.MaxScriptNumber),1 do
			line=read(filehandle, '*l')
			if line ~= nil then 
				tinsert(filelist,line)
				else
				break
			end 
		end
		closefile(filehandle)
		remove(GetFilePath() .. %filename)
		ExternalFileList=filelist
		--filter relevant filenames
		local NewFileListEntrys = {}
		local newfilename = true
		for i=1,getn(ExternalFileList),1 do
			newfilename = true
			for j=1,getn(ModScripts["filelist"]),1 do
				if ExternalFileList[i]==ModScripts["filelist"][j] then newfilename=false break end
			end	
			if newfilename == true then tinsert(NewFileListEntrys,ExternalFileList[i]) end	
		end
		for i=1,getn(NewFileListEntrys),1 do
			if %prefix ~= nil then if strfind(NewFileListEntrys[i],%prefix) then tinsert(ModScripts["filelist"],NewFileListEntrys[i]) end
			else ModScripts["filelist"] = NewFileListEntrys return ModScripts["filelist"] end
		end
		for i=1,getn(ModScripts["filelist"]),1 do
			if FileExists(GetFilePath() .. ModScripts["filelist"][i]) == 0 then tremove(ModScripts["filelist"],i) end
		end
		--store script filenames to autostart config
		local ModScriptsAutoStartString = 'ModScripts["filelist"]=\n{'
		for i=1,getn(ModScripts["filelist"]),1 do
			if i==getn(ModScripts["filelist"]) then ModScriptsAutoStartString = ModScriptsAutoStartString .. "\n" .. '"'.. ModScripts["filelist"][i] .. '"'
			else ModScriptsAutoStartString = ModScriptsAutoStartString .. "\n" .. '"' .. ModScripts["filelist"][i] .. '"' .. "," end
		end
		ModScriptsAutoStartString = ModScriptsAutoStartString .. "\n" .. "}"
		ModScripts.SetValue(AutostartFile,'ModScripts["filelist"]',ModScriptsAutoStartString,"}")
		--refresh meta command menu entrys
		if MenuDisplayState == 1 then DisplayMenu() end
		return ModScripts["filelist"]		   
	end
	SetScriptTimer(1,CreateScriptFileTable)
	execute("START /B /MIN cmd /c dir " .. strchar(34) .. GetFilePath() .. strchar(34) .. dtype .. "/b/a-d/o-n > " .. strchar(34) .. GetFilePath() .. filename  .. strchar(34) .. " & " .. "START /MAX" .. ProcessName) 
end

function OpenDiscordServer()
	execute([[START "" "https://discord.gg/TfdcQTn"]])
end

---------------------------------------------------------------------------------
-----------------------HELP FUNCTIONS--------------------------------------------
---------------------------------------------------------------------------------

function RandomString(l)
	if l < 1 then l=5 end --return error("random string length smaller 1") end
	local s = ""
	local ascii_zone = {}
	for i=1,l,1 do
		ascii_zone[1] = random(97, 122)
		ascii_zone[2] = random(65, 90)
		ascii_zone[3] = random(48, 57)
		s = s .. strchar(ascii_zone[random(3)])
	end
	return ("_" .. s)
end

function randstr(l) return RandomString(l) end

function encrypt(string,key)   --currently only placeholder, just to hide plain text
    local enc_string=""
	key=tonumber(key)
	for i=1,strlen(string),1 do
	    if mod(i,2)==0 then enc_string= enc_string .. strchar(strbyte(string,i)+floor(log(key^6*i)+0.5)-15) 
			elseif mod(i,3)==0 then enc_string= enc_string .. strchar(strbyte(string,i)+floor(log(key^6*i)+0.5)-13) 
		else enc_string= enc_string .. strchar(strbyte(string,i)+floor(log(key^6*i)+0.5)-12) end    
	end
	return enc_string
end

function decrypt(string,key)
    local dec_string=""
	for i=1,strlen(string),1 do
	    if mod(i,2)==0 then dec_string= dec_string .. strchar(strbyte(string,i)-floor(log(key^6*i)+0.5)+15) 
			elseif mod(i,3)==0 then dec_string= dec_string .. strchar(strbyte(string,i)-floor(log(key^6*i)+0.5)+13) 
		else dec_string= dec_string .. strchar(strbyte(string,i)-floor(log(key^6*i)+0.5)+12) end              
	end
	return dec_string
end

function togglevar(var)
	if var == true then return false 
		elseif var == false then return true
		elseif var == nil then return 0
		elseif var == 1 then return 0
		elseif var == 0 then return 1 
		elseif var == "1" then return "0"
		elseif var == "0" then return "1"
		elseif var == "true" then return "false"  
		elseif var == "false" then return "true" 
		elseif var == "on" then return "off"  
		elseif var == "off" then return "on" 
		elseif var == "no" then return "yes"  
		elseif var == "yes" then return "no" 
	else return var end
end

function toggleglobal(VariableStringName)
	if getglobal(VariableStringName) == 1 then setglobal(VariableStringName,0) 
	elseif getglobal(VariableStringName) == 0 then setglobal(VariableStringName,1) end
	return getglobal(VariableStringName)
end

function GiveYesNoString(VariableStringName)
	if VariableStringName == 1 or VariableStringName == true  or VariableStringName == "1" then return "yes"
	else return "no" end
end

function sleep(s)
	if s==nil then s=1 end
	local i=clock()+s 
	print("wait for " .. s .. " seconds ...") 
	while(clock()<i) do 
		--print("wait for " .. i-clock() .. " seconds") 
	end
	print("wait for " .. s .. " seconds finished") 
end


function mkstr(string)
	return strchar(34) .. string .. strchar(34)
end

function StrLenF(string,length)
	local cl = strlen(string)
	if cl>length then return strsub(string,1,length)
		elseif cl<length then return string .. strrep(" ",length-cl)
	else return string end
end	

function CountStringOccurences(str)
	local _, count = gsub(str,"%(","")
	return count
end

function ConvertToExecutionString(RawString)
end

function PrintArguments(...)
	local STR=""
	if getn(arg)>0 then
		for i=1,getn(arg),1 do
			STR=STR .. tostring(arg[i]) .. " "
		end
		else
		for i,v in arg do
			STR=STR .. tostring(v) .. " "
		end
	end
	out(STR)
end

function Execute(code,...)
	if type(code=="function") then 
		if getn(arg)==2 then code(arg[2]) 
			elseif getn(arg)==3 then code(arg[2],arg[3]) 
			elseif getn(arg)==4 then code(arg[2],arg[3],arg[4]) 
		end
		elseif type(code=="string") then 
		local argstr
		if getn(arg)>1 then
			for i=2,getn(arg),1 do argstr=argstr .. "," .. arg[i] end
			code=code .. argstr .. ")"
		end
		dostring(code)
	end
end

---------------------------------------------------------------------------------
-----------------------TABLE OPERATIONS------------------------------------------
---------------------------------------------------------------------------------
function locals()
	local variables = {}
	local idx = 1
	while true do
		local ln, lv = getlocal(2, idx)
		if ln ~= nil then
			variables[ln] = lv
			else
			break
		end
		idx = 1 + idx
	end
	return variables
end

function WriteTableContent(table_to_process)
	for k,v in table_to_process do
		--WriteToFile("" .. tostring(table_to_process) .. " # " .. tostring(k) .. " # " .. tostring(v) .. "")
		WriteToFile("" .. tostring(k) .. " # " .. tostring(v) .. "")
	end
end

function tout(t) WriteTableContent(t) end

function CopyTableAbsolute(table_to_clone)
	local TableClone = {}
	local i = 1
	for k,v in table_to_clone do
		TableClone[i]=v
		i=i+1
	end
	return TableClone
end

function CopyTable(table_to_clone)
	local TableClone = {}
	for k,v in table_to_clone do
		tinsert(TableClone,v)
	end
	return TableClone
end

function MergeTables(table1,table2)
	local MergedTable = CopyTable(table1)
	for i=1,getn(table2),1 do
		for j=1,getn(MergedTable),1 do
			if MergedTable[j]==table2[i] then break end
			if j==getn(MergedTable) then tinsert(MergedTable,table2[i]) end
		end	
	end
	return MergedTable
end

function RemoveTableKey(table, key)
    local element = table[key]
    table[key] = nil
    return element
end

function IsTableEmpty(table)
	if next(table) == nil then return true else return false end
end

function tremove_(t,pos) --if size is in t[0]
	local n = t[0]
	if n<=0 then return end
	pos = pos or n
	local value = t[pos]
	for i=pos,n-1 do t[i]=t[i+1] end
	t[n]=nil
	t[0]=n-1
	return value
end

function tinsert_(t,pos)  --if size is in t[0]
	local pos, value
	local n = t[0]
	if arg.n == 1 then pos, value = n+1, arg[1]
	else pos, value = arg[1], arg[2] end
	t.n = n+1
	for i=n,pos,-1 do t[i+1]=t[i] end
	t[pos]=value
end

function IsEntryInTable(table,entry,nocasesensitive)
	--local n = 0
	--if table[0]~=nil then n=getn(table) else n=table[0] end
	if type(entry) == "string" and nocasesensitive==nil then
		for i=1,getn(table),1 do
			--if strfind(table[i],entry) then return true end
			if table[i]==entry then return true end
		end
		elseif type(entry) == "string" and nocasesensitive~=nil then
		for i=1,getn(table),1 do
			--if strfind(strupper(table[i]),strupper(entry)) then return true end
			if strupper(table[i])==strupper(entry) then return true end
		end
		else
		for i=1,getn(table),1 do
			if table[i]==entry then return true end
		end
	end
	return false
end

function GetIndexOfTableElement(table,element,if_last_give_zero)
	for i=1,getn(table),1 do
		if table[i]==element then
			if if_last_give_zero ~= nil and i==getn(table) then return 0
			else return i end
		end
	end
	return error_("Error in GetIndexOfTableElement function: no element in table found")
end

function NextTableElement(table,element)
	local size=getn(table)
	if size==0 then for i,v in table do size=size+1 end end
	if size>0 then
		for i=1,getn(table),1 do
			if table[i]==element and getn(table)>i then return table[i+1] end
		end
		if table[1]~=nil then return table[1] else return next(table) end
	else error_("Error in NextTableElement function: table error") return "" end
end

function PrevTableElement(table,element)
	local size=getn(table)
	if size==0 then for i,v in table do size=size+1 end end
	if size>0 then
		for i=1,getn(table),1 do
			if table[i]==element and 1<i then return table[i-1] end
		end
		if table[size]~=nil then return table[size] else return next(table) end
	else error_("Error in PrevTableElement function:table error") return "" end
end

function NextTableIndex(table,index)
	local nextindex,nextelement
	local size=getn(table)
	if size==0 then for i,v in table do size=size+1 end end
	if size>0 then 
		if index~=nil then
			for i,v in table do 
				if index==i then
					nextindex,nextelement=next(table,i) 
					if nextindex~=nil and nextindex~="n" and nextelement~=nil then return nextindex
					else for a,b in table do if a~="n" and b~=nil then return a end end end
				end
			end
		end
		for i,v in table do if v~=nil then return i end end
	else error_("Error in NextTableIndex function: empty table") return "" end
end

function PrevTableIndex(table,index)
	local size=getn(table)
	local lastindex,lastelement
	local firstindex,firstelement=next(table)
	local previndex,prevelement=firstindex,firstelement
	if size==0 then for i,v in table do size=size+1 lastindex=i lastelement=v end
	else lastindex=size lastelement=table[lastindex] end
	if size>0 and index~=nil then 
		for i,v in table do 
			if index==i then
				if index==firstindex then return lastindex
				else return previndex end
			end
			previndex,prevelement=i,v
		end
		for i,v in table do if v~=nil then return i end end
	else error_("Error in PrevTableIndex function: empty table") return "" end
end

function GetLastTableElement(table)
	return table[getn(table)]
end

function GetForeLastTableElement(table)
	return table[getn(table)-1]
end

function GetMaxValue(table)
	if getn(table)<1 then return 0 end
	local maxvalue=table[1]
	for i=2,getn(table),1 do
		maxvalue=max(maxvalue,table[i])
	end
	return maxvalue
end

function GetMinValue(table)
	if getn(table)<1 then return 0 end
	local minvalue=table[1]
	for i=2,getn(table),1 do
		minvalue=min(minvalue,table[i])
	end
	return minvalue
end

function getn2(table)
	local size = 0
	for k,v in table do size=size+1 end
	return size
end

function GetRandomTableIndex(table)
	local TTable = {}
	for k,v in table do
		tinsert(TTable,k)
	end
	return TTable[random(getn(TTable))]
end

function ReturnRandomArgument(...)
	return arg[random(getn(arg))]
end

---------------------------------------------------------------------------------
-----------------------LUA INTERNAL ---------------------------------------------
---------------------------------------------------------------------------------

function GetParameterNamesOfCallingFunction()
	local t = {}
	local i = 1
	while(getlocal(2, i)~=nil) do
		tinsert(t,getlocal(2, i))
	end
	return t
end

function GetParametersOfFunction()
	function HookInfo()
        local variables = {}
        local idx = 1
        while true do
			local ln, lv = getlocal(2, idx)
			if ln ~= nil then
				variables[ln] = lv
				else
				break
			end
			idx = 1 + idx
		end
		--WriteTableContent(getinfo(2))
		--setlocal
		--WriteTableContent(variables)
		return variables
	end
	--Parameters = setlinehook(HookInfo)   --setcallhook()
	--TestFunction()
	--setlinehook()
	WriteTableContent(Parameters)
end

function VariablesInfo()
	local a = getlocal(3, 1)
	local b = getlocal(3, 2)
	local c = getlocal(3, 3)
	local d = getlocal(1, 1)
	local e = getinfo(1)
	local f = getinfo(2)
	local g = getinfo(3)
	local h = _ENV
	local i = _G
	local j = _OUTPUT
	local k = _INPUT
	local l = _STDIN
	local m = _STDOUT
	local n = locals()
	--LoopThroughTable(locals())
	WriteToFile("" .. date() .. " # " .. a .. " # " .. b .. " # " .. c .. " # " .. d .. " # " .. e .. " # " .. f .. " # " .. g .. " # " .. h .. " # " .. i .. " # " .. j .. " # " .. k .. " # " .. l .. " # " .. m .. " # " .. n .. "")
end

function setLocal(name,val)
    local index = 1
    while true do
        local var_name, var_value = getlocal(2, index)
        if not var_name then break end
        if var_name == name then 
            setlocal(2, index, val)
		end
        index = index + 1
	end
end
-----------------------math-----------------------------------------------------

function roundToNthDecimal(num, n)
	local mult = 10^(n or 0)
	return floor(num * mult + 0.5) / mult
end

function round(number)
	return floor(number+0.5)
end

function GTZero(number)
	if number<1 then return 1
	else return number end
end

function rectSpiral(X,Y,D,N)
	local root=floor(sqrt(N))
	local x=X+((round(root/2)*((-1)^(root+1)))+(((-1)^(root+1))*(((root*(root+1))-N)-abs((root*(root+1))-N))/2))*D
	local y=Y+((round(root/2)*((-1)^root))+(((-1)^(root+1))*(((root*(root+1))-N)+abs((root*(root+1))-N))/2))*D
	return x,y
end

function GetRandomNumberInt(upper_limit,lower_limit)  --or use random(limit)
	if lower_limit==nil then return ceil(upper_limit*GetRandomNumber())
		elseif upper_limit==nil then return ceil(lower_limit*GetRandomNumber())
		else return ceil((abs(upper_limit-lower_limit)*GetRandomNumber())+lower_limit)
	end
end
---------------------------------------------------------------------------------
--------------------INFORMATION GATHERING----------------------------------------
---------------------------------------------------------------------------------

function WriteObjectInfo(x)
	if x ~= nil then
		local a = tostring(x)
		local b = ""--GetTeamName(x)  
		local c = ""--GetFactionName(x)
		local d = tostring(ObjectTeamName(x))
		local e = tostring(ObjectPlayerSide(x))
		local f = tostring(ObjectDescription(x))
		local g = GetObj.Hash(x)
		WriteToFile("" .. a .. " # " .. b .. " # " .. c .. " # " .. d .. " # " .. e .. " # " .. f .. " # " .. g .. " # " .. date() .. "")
	end
end

function WriteObjectInfoOld(x)
	if x ~= nil then
		local a = tostring(x)
		local b = tostring(type(x))
		local c = tostring(getn(x))
		local d = tostring(tag(x))
		local e = tostring(ObjectDescription(x))
		local f = tostring(ObjectPlayerSide(x))
		local g = tostring(ObjectTeamName(x))
		local h = tostring(ObjectTemplateName(x))
		local i = tostring(ObjectCapturingObjectPlayerSide(x))
		WriteToFile("" .. date() .. " # " .. a .. " # " .. b .. " # " .. c .. " # " .. d .. " # " .. e .. " # " .. f .. " # " .. g .. " # " .. h .. " # " .. i .. "")
	end
end

function PrintSelectedUnitInformation(writetofile,ret,objectref)
	local UnitInfoString = ""
	local UnitTableRef = ""
	if objectref ~= nil then UnitTableRef=GetObj.Table(objectref)
	else UnitTableRef=GetSelectedUnitRef("flash") end
	if UnitTableRef==nil then return end
	local UnitStringRef = GetObj.String(UnitTableRef)
	local Position = GetObjectPosition(UnitStringRef) 
	local TeamName = GetTeamName(UnitTableRef)  
	local ObjectType = GetObj.Type(UnitTableRef)   
	UnitInfoString=UnitInfoString .. "Type: " .. ObjectType .. "\n"
	UnitInfoString=UnitInfoString .. "Health: " .. GetHealth(UnitStringRef) .. "\n"
	UnitInfoString=UnitInfoString .. "IsAlive: " .. GetObj.AliveState(UnitStringRef,TeamName) .. "\n"
	UnitInfoString=UnitInfoString .. "Position: " .. "x:" .. Position.x .. " " .. "y:" .. Position.y .. "\n"
	UnitInfoString=UnitInfoString .. "KindOf: " 
	local kindoftable = GetObj.KindOfTable(UnitStringRef,TeamName)
	for i=1,getn(kindoftable),1 do
		UnitInfoString=UnitInfoString .. kindoftable[i] .. " "
	end
	UnitInfoString=UnitInfoString .. "\n"
	UnitInfoString=UnitInfoString .. "ObjectStatus: " 
	local ObjectStatusTable = GetObjectStatusTable(UnitStringRef)
	for i=1,getn(ObjectStatusTable),1 do
		UnitInfoString=UnitInfoString .. ObjectStatusTable[i] .. " "
	end 
	UnitInfoString=UnitInfoString .. "\n"
	UnitInfoString=UnitInfoString .. "ModelConditions: " 
	local ModelConditionsTable = GetModelConditionTable(UnitTableRef)
	for i=1,getn(ModelConditionsTable),1 do
		UnitInfoString=UnitInfoString .. ModelConditionsTable[i] .. " "
	end 
	UnitInfoString=UnitInfoString .. "\n"
	UnitInfoString=UnitInfoString .. "Upgrades: " 
	local UpgradesTable = GetUpgradesTable(UnitStringRef)
	for i=1,getn(UpgradesTable),1 do
		UnitInfoString=UnitInfoString .. UpgradesTable[i] .. " "
	end 
	UnitInfoString=UnitInfoString .. "\n"
	UnitInfoString=UnitInfoString .. "ObjectPanelFlags: " 
	local ObjectPanelFlagsTable = GetObjectPanelFlagsTable(UnitStringRef)
	for i=1,getn(ObjectPanelFlagsTable),1 do
		UnitInfoString=UnitInfoString .. ObjectPanelFlagsTable[i] .. " "
	end 
	UnitInfoString=UnitInfoString .. "\n"
	UnitInfoString=UnitInfoString .. "SpecialPowersReady: " 
	local SPReadyTable = GetSpecialPowerReadyTable(UnitStringRef)
	for i=1,getn(SPReadyTable),1 do
		UnitInfoString=UnitInfoString .. SPReadyTable[i] .. " "
	end 
	UnitInfoString=UnitInfoString .. "\n"
	UnitInfoString=UnitInfoString .. "Rank: " ..  GetRank(UnitStringRef) .. "\n"	
	UnitInfoString=UnitInfoString .. "SkillPoints: " ..  GetSkillPoints(UnitStringRef) .. "\n" 	
	UnitInfoString=UnitInfoString .. "DistanceToBase: " .. tostring(GetObjectDistance(UnitStringRef,GetObj.String(GetBaseRef(TeamName)))) .."\n"  	 
	UnitInfoString=UnitInfoString .. "ThreadLevel: " ..  GetThreadLevelOfUnit(UnitStringRef,13000) .. "\n"
	UnitInfoString=UnitInfoString .. "HasPassengers: " .. UnitHasPassengers(UnitStringRef) .. "\n" 
	UnitInfoString=UnitInfoString .. "OrientationAngle: " .. GetObjectOrientationAngle(UnitStringRef) .. "\n"    
	UnitInfoString=UnitInfoString .. "NearbyEnemys(radius=300): " .. ObjectCountNearbyEnemies(UnitTableRef,300) .. "\n"  
	UnitInfoString=UnitInfoString .. "ObjectCanSufferFear: " .. tostring(ObjectTestCanSufferFear(UnitTableRef)) .."\n"
	UnitInfoString=UnitInfoString .. "ObjectOwner: " .. GPOT[TeamName]["name"] .."\n"             --GetTeamsDescriptiveName(UnitTableRef)
	UnitInfoString=UnitInfoString .. "ObjectOwnerFaction: " .. GPOT[TeamName]["faction"] .."\n"   --GetFactionName(UnitTableRef)
	UnitInfoString=UnitInfoString .. "ObjectOwnerIsAI: " .. GPOT[TeamName]["ai"] .."\n"           --IsPlayerAI(TeamName)   
	UnitInfoString=UnitInfoString .. "ObjectTeamName: " .. ObjectTeamName(UnitTableRef) .."\n"
	UnitInfoString=UnitInfoString .. "ObjectTeamNameInternal: " .. TeamName .."\n"	 	 
	UnitInfoString=UnitInfoString .. "NumberOfSameTypeFromTeam: " .. CountObjectTypeOfTeam(ObjectType,TeamName) .. "\n"     
	UnitInfoString=UnitInfoString .. "NumberOfSameTypeFromAll: " .. CountObjectType(ObjectType) .. "\n"     
	UnitInfoString=UnitInfoString .. "IsSameTypeInsideBase: " .. tostring(IsObjectTypeInsideBaseOfObject(ObjectType,UnitStringRef)) .. "\n"  	 
	UnitInfoString=UnitInfoString .. "ObjectNumber: " .. GetObj.Number(UnitTableRef) .."\n" 	 
	UnitInfoString=UnitInfoString .. "StringReference: " .. UnitStringRef .."\n"
	UnitInfoString=UnitInfoString .. "TableReference: " .. tostring(UnitTableRef) .."\n"
	--UnitInfoString=UnitInfoString .. "TableReferenceIndex: " .. tostring(GetObj.IndexByStringRef(UnitStringRef)) .."\n"
	UnitInfoString=UnitInfoString .. "ObjectPlayerSide: " .. ObjectPlayerSide(UnitTableRef) .."\n"
	UnitInfoString=UnitInfoString .. "ObjectDescription: " .. ObjectDescription(UnitTableRef) .."\n"
	UnitInfoString=UnitInfoString .. "ObjectHash: " .. GetObj.Hash(UnitTableRef) .."\n" 	 
	UnitInfoString=UnitInfoString .. "ObjectTemplateName: " .. ObjectTemplateName(UnitTableRef) .."\n" 	
	UnitInfoString=UnitInfoString .. "ObjectCapturingObjectPlayerSide: " .. tostring(ObjectCapturingObjectPlayerSide(UnitTableRef)) .."\n" 	
	if writetofile ~= nil then out(UnitInfoString)
		elseif ret~=nil then return UnitInfoString
	else ExecuteAction("SHOW_MILITARY_CAPTION", "\n" .. UnitInfoString .. "\n", 20) end
end    --PrintSelectedUnitInformation()

function WriteGlobalObjectList()
	for k,v in globals() do
		if strfind(tostring(k), "ObjID") ~= nil then
			WriteToFile("" .. tostring(globals()) .. " # " .. tostring(k) .. " # " .. tostring(v) .. "")
		end
	end
end

function InfoOnAllObjects()
	for k,v in globals() do
		if strfind(tostring(k), "ObjID") ~= nil then
			self = rawget(globals(), k)
			WriteTableContent(self)
			WriteObjectInfo(self)
		end
	end
end

function InfoTeamRelations() 
	if getn(GlobalTeamTable) ~= nil then
		for i=1,getn(GlobalTeamTable),1 do
			for j=1,getn(GlobalTeamTable),1 do
				local TeamType = TeamRelations[GlobalTeamTable[i]][GlobalTeamTable[j]]
				WriteToFile("" .. i .. " # " ..j .. " # " .. TeamType .. "")
			end
		end
	end
end

function WriteListOfAllLuaCommands()
	local comlist=""
	for i=1,getn(NATIVE_SCRIPT_FUNCTIONS),1 do
		comlist=comlist .. NATIVE_SCRIPT_FUNCTIONS[i] .. "\n"
	end
	comlist=comlist .. "\n"
	for i=1,getn(NATIVE_SCRIPT_FUNCTIONS_DRAWMODULE),1 do
		comlist=comlist .. NATIVE_SCRIPT_FUNCTIONS_DRAWMODULE[i] .. "\n"
	end
	comlist=comlist .. "\n"
	for i=1,getn(EXECUTE_ACTION_TABLE),1 do
		comlist=comlist .. 'ExecuteAction("' .. EXECUTE_ACTION_TABLE[i] .. '",...)' .. "\n"
	end
	comlist=comlist .. "\n"
	for i=1,getn(EVALUATE_CONDITION_TABLE),1 do
		comlist=comlist .. 'EvaluateCondition("' .. EVALUATE_CONDITION_TABLE[i] .. '",...)' .. "\n"
	end
	comlist=comlist .. "\n"   
	for i=1,getn(NATIVE_LUA_FUNCTIONS),1 do
		comlist=comlist .. NATIVE_LUA_FUNCTIONS[i] .. "\n"
	end
	WriteToFile(comlist,GetFilePath() .. "ALL_SAGE_LUA_COMMANDS.txt")
end

function GetStatisticsForTeam(TeamName)
	StatisticsString=""
	local strlength=10
	max=strrep(" ",83)
	StatisticsString=StatisticsString .. "attribute      | "
	StatisticsString=StatisticsString .. "\n_____________| " .. "______________" .. "______________________"
	StatisticsString=StatisticsString .. "\nname               | " .. StrLenF(GPOT[TeamName]["name"],strlength)
	StatisticsString=StatisticsString .. "\n     teamname        | " .. StrLenF(GetPlayerNameByTeam(GPOT[TeamName]["teamname"]),strlength) 
	StatisticsString=StatisticsString .. "\nfaction             | " .. StrLenF(GPOT[TeamName]["faction"],strlength) 
	StatisticsString=StatisticsString .. "\nai                  | " .. StrLenF(GPOT[TeamName]["ai"],strlength)
	StatisticsString=StatisticsString .. "\nalive              | " .. StrLenF(tostring(EvaluateCondition("TEAM_DESTROYED", TeamName)),strlength)
	StatisticsString=StatisticsString .. "\nthreat level     | " .. StrLenF(GetTeamThreadLevel(TeamName),strlength)
	StatisticsString=StatisticsString .. "\nhealth            | " .. StrLenF(GetHealth(TeamName,"teamhealth"),strlength)
	StatisticsString=StatisticsString .. "\ndistance         | " .. StrLenF(GetTeamDistance(TeamName,GlobalTeamTable[2]),strlength)
	StatisticsString=StatisticsString .. "\nunits              | " .. StrLenF(CountAllObjectsOfTeam(TeamName),strlength) --ObjectCountNearbyEnemies(NAOD.EnemyBaseRef, 15000)
	StatisticsString=StatisticsString .. "\nvehicle           | " .. StrLenF(CountTeamsKindOf(TeamName,"VEHICLE"),strlength)
	StatisticsString=StatisticsString .. "\ninfantry          | " .. StrLenF(CountTeamsKindOf(TeamName,"INFANTRY"),strlength)
	StatisticsString=StatisticsString .. "\naircraft           | " .. StrLenF(CountTeamsKindOf(TeamName,"AIRCRAFT"),strlength)
	StatisticsString=StatisticsString .. "\nstructure        | " .. StrLenF(CountTeamsKindOf(TeamName,"STRUCTURE"),strlength)
	StatisticsString=StatisticsString .. "\nbase defense | " .. StrLenF(CountTeamsKindOf(TeamName,"FS_BASE_DEFENSE"),strlength)	
	return StatisticsString
end

function GetStatisticsForAllTeams(self)
	StatisticsString=""
	local strlength=12
	local TeamName = ""
	local gap =  strrep(" ",1) 
	--local max=strrep(" ",83)
	-- function MakeLine(str)
	-- local Line = ""
	-- for i=1,getn(GlobalTeamTable),1 do
	-- Line = Line .. StrLenF(str,%strlength) 
	-- end
	-- Line = Line .. "\n"
	-- return Line
	-- end  
	-- StatisticsString=StatisticsString .. "\n" .. StrLenF(" ",strlength) .. gap
	-- for i=1,getn(GlobalTeamTable),1 do
	-- StatisticsString=StatisticsString .. StrLenF(tostring(i),strlength) 
	-- end
	-- StatisticsString=StatisticsString .. "\n" .. strrep("_",50)
	StatisticsString=StatisticsString .. "\n" .. StrLenF("player:",strlength) .. gap 	
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(GetPlayerNameByTeam(GPOT[GlobalTeamTable[i]]["teamname"]),strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("name:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(GPOT[GlobalTeamTable[i]]["name"],strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("faction:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(GPOT[GlobalTeamTable[i]]["faction"],strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("ai:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(GPOT[GlobalTeamTable[i]]["ai"],strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("alive:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(TeamAlive(GlobalTeamTable[i]),strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("threat lvl:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(GetTeamThreadLevel(GlobalTeamTable[i]),strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("health:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(GetHealth(GlobalTeamTable[i],"teamhealth"),strlength) 
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("distance:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(GetTeamDistance(GlobalTeamTable[i],GlobalTeamTable[2]),strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("units:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(CountAllObjectsOfTeam(GlobalTeamTable[i]),strlength) --ObjectCountNearbyEnemies(NAOD.EnemyBaseRef, 15000)) 
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("vehicle:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(CountTeamsKindOf(GlobalTeamTable[i],"VEHICLE"),strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("infantry:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(CountTeamsKindOf(GlobalTeamTable[i],"INFANTRY"),strlength) 
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("aircraft:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(CountTeamsKindOf(GlobalTeamTable[i],"AIRCRAFT"),strlength)
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("structure:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(CountTeamsKindOf(GlobalTeamTable[i],"STRUCTURE"),strlength) 
	end
	StatisticsString=StatisticsString .. "\n" .. StrLenF("base def.:",strlength) .. gap
	for i=1,getn(GlobalTeamTable),1 do
		StatisticsString=StatisticsString .. StrLenF(CountTeamsKindOf(GlobalTeamTable[i],"FS_BASE_DEFENSE"),strlength)
	end
	StatisticsString=StatisticsString .. "\n\n\n" .. "relations" .. "\n" .. ShowAllRelations(self,"ret") .. "\n\n"
	return StatisticsString
end	

function GetMapInformationString()
	local MapInfoStr = strrep(strchar(45,45), 4) .. "information about current map" .. strrep(strchar(45,45), 4) .. "\n"
	MapInfoStr = MapInfoStr .. "play time: " .. tostring(ceil(GetFrame()/FPS_Limit)) .. " sec" .. "\n"
	MapInfoStr = MapInfoStr .. "map size x: " .. tostring(MapSize.x) .. "\n"
	MapInfoStr = MapInfoStr .. "map size y: " .. tostring(MapSize.y) .. "\n"
	MapInfoStr = MapInfoStr .. "number of players: " .. tostring(getn(GlobalTeamTable)) .. "\n"
	MapInfoStr = MapInfoStr .. "number of human players: " .. tostring(getn(HumanPlayerTable)) .. "\n"
	MapInfoStr = MapInfoStr .. "available waypoints: "
	local waypoints = GetWaypointTable()
	for i=1,getn(waypoints),1 do MapInfoStr = MapInfoStr .. waypoints[i] .. " " end
	MapInfoStr = MapInfoStr .. "\n"
	MapInfoStr = MapInfoStr .. strrep(strchar(45,45), 2) .. "MetaMod map script integration info" .. strrep(strchar(45,45), 2) .. "\n"
	MapInfoStr = MapInfoStr .. "MetaMod map script integration: " .. EvaluateCondition("COUNTER_COUNTER","METAMOD_MAPSCRIPT",CompareTable["EQ"],CounterTable[1]) .. "\n"
	MapInfoStr = MapInfoStr .. "MetaMod extended diplomacy: " .. EvaluateCondition("COUNTER_COUNTER","METAMOD_EXTENDED_DIPLOMACY",CompareTable["EQ"],CounterTable[1]) .. "\n"
	MapInfoStr = MapInfoStr .. "native art of defence map integration: " .. EvaluateCondition("COUNTER_COUNTER","METAMOD_NAOD",CompareTable["EQ"],CounterTable[1]) .. "\n"  
	MapInfoStr = MapInfoStr .. "tower defence map integration: " .. EvaluateCondition("COUNTER_COUNTER","METAMOD_NAOD",CompareTable["EQ"],CounterTable[2]) .. "\n"  
	MapInfoStr = MapInfoStr .. "NAOD/TD waypoint distance: " .. GetCounterValue("METAMOD_NAOD_WAYPOINT_DISTANCE") .. "\n"  
	if EvaluateCondition("COUNTER_COUNTER","RENWARS",CompareTable["EQ"],CounterTable[1]) then MapInfoStr = MapInfoStr .. "renegade wars map: true" end
	return MapInfoStr
end

function WriteWorldBuilderUseableObjectsList()
	local TREF=""
	local List=""
	for i=1,getn(WorldBuilderObjectTypeTable),1 do
	    TREF = spawn(WorldBuilderObjectTypeTable[i])
	    if GetObj.AliveState(TREF) then List=List .. WorldBuilderObjectTypeTable[i] .. "\n" delete(TREF) end
	end
	out(List)
end

-------------------------------------------------------------------------
----------------------OBJECT REFERENCE-----------------------------------
-------------------------------------------------------------------------

function GetObj.String(object)       
	if type(object) == "string" then return object
		else 
		local _, count = gsub(ObjectDescription(object),"%(","")
		if count>1 then
			return strsub(ObjectDescription(object), strfind(ObjectDescription(object),"(",1,true)+1,strfind(ObjectDescription(object),")",1,true)-1)
			else
			local StrRef = "object" .. RandomString(5)
			ExecuteAction("SET_UNIT_REFERENCE", StrRef, object)
			return StrRef
		end
	end
end

function GetObj.S(object)
	return GetObj.String(object) 
end

function GetObj.Table(object)
    if type(object) == "table" then 
		return object
	else  
		for k,v in globals() do
			if strfind(k,"ObjID") and strfind(ObjectDescription(v), object) and not strfind(ObjectDescription(v),"<No Object>") then
				return rawget(globals(),k)
			end
		end
		return object
	end
end

function GetObj.TableOLD(object)     --needed for all lua native object commands  GetObj.TableRef(object)    
    if type(object) == "table" then return object
		else  
		for k,v in globals() do
			if strfind(k,"ObjID") ~= nil and strfind(ObjectDescription(v),object) then
				return rawget(globals(),k)   --v
			end
		end
		--error_("no table found for object: " .. object)
		return object
	end
end

function GetObj.T(object)
	return GetObj.Table(object) 
end

function GetObj.Hash(object)
    return tostring(tonumber(strsub(ObjectTemplateName(GetObj.Table(object)), 6,  13), 16))
end

function GetObj.H(object)
    return GetObj.Hash(object)
end

function GetObj.StringByHash(hash) 
	return GetObj.String(GetObj.TableByHash(hash))
end

function GetObj.TableByHash(ObjectHashValue)   --Example: NODPowerPlant has hash value 2738079400 (see the StringHashTable.xml) --outdated: use GetObjectReference function
	local ObjectHexValue = tostring(format("%X",ObjectHashValue))
	for k,v in globals() do
		if strfind(tostring(k), "ObjID") ~= nil then
			local ObjectReference = rawget(globals(), k)   --= rawgetglobal(k)
			if strfind(tostring(ObjectTemplateName(ObjectReference)), ObjectHexValue) or strfind(tostring(ObjectDescription(ObjectReference)), ObjectHexValue) then
				return ObjectReference
			end
		end
	end
end

function GetObj.TableByHashAndTeam(ObjectHashValue,team)
	local ObjectHexValue = tostring(format("%X",ObjectHashValue))
	for k,v in globals() do
		if strfind(tostring(k), "ObjID") ~= nil and GetTeamName(v)==team then
			if strfind(ObjectTemplateName(v), ObjectHexValue) or strfind(ObjectDescription(v), ObjectHexValue) then
				return v
			end
		end
	end
end

GetObjTable={}

function GetObjTable.TableByHash(ObjectHashValue)
	ObjectHexValue = tostring(format("%X",ObjectHashValue))
	local ObjectReferenceTable = {}
	local i = 1
	for k,v in globals() do
		if strfind(tostring(k), "ObjID") ~= nil then
			ObjectReference = rawget(globals(), k)
			if strfind(tostring(ObjectDescription(ObjectReference)), ObjectHexValue) then
				ObjectReferenceTable[i]=ObjectReference
			end
		end
	end
	return ObjectReferenceTable
end

function GetObj.HashByType(ObjectType)       
	for k,v in ObjectHashIndexTypeTable do
		if v==ObjectType then return k end
	end
end

function GetObj.TypeByHash(HashValue)
	return ObjectHashIndexTypeTable[HashValue]
end

function GetObj.TableByTeam(team) 
	for k,v in globals() do 
		if strfind(tostring(k),"ObjID") ~= nil and team == GetTeamName(v) then 
			return rawget(globals(), k) 
		end 
	end
end

function GetObj.TableByType(ObjectType,team)  
	for k,v in globals() do
		if strfind(k,"ObjID") ~= nil and ObjectHashIndexTypeTable[GetObj.Hash(v)]==ObjectType and GetTeamName(v)==team then    
			return rawget(globals(),k)   --v
		end
	end
end

function GetObj.StringByType(ObjectType,team) 
	local tref=GetObj.String(GetObj.TableByType(ObjectType,team))
	if tref~=nil then return tref 
		else  
		local StrRef = object .. RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",ObjectType,team,StrRef)
		return StrRef	
	end
end

function GetObj.NextObjectTypeRef(ObjectType,team)
    local REF=RandomString(5)
    --ExecuteAction("BUILD_BASE_BUILDING_PER_TACTICAL_MARKER",ObjectType,DistanceTable["near"],NextToObjectType,ObjectForBaseRef,ObjectRefToGive)
    --ExecuteAction("BUILD_BASE_BUILDING_PER_TACTICAL_MARKER",ObjectType,DistanceTable["near"],GetObj.Type(GetBaseRef(team)),GetBaseRef(team),REF)
    --ExecuteAction("UPGRADE_NEAREST_WALL",ObjectForBaseRef,Upgrade,ObjectTypeToReceiveUpgrade,NextToObjectType,ObjectRefToGive)
    ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",ObjectType,team,REF)
	return REF
end

function GetObj.Type(Object)
	local ObjTable = GetObj.Table(Object)
	if type(ObjTable) == "table" then 
		if GAME_ACTIVE == BFME2 or GAME_ACTIVE == BFME2ROTWK then
			return ObjectTemplateName(ObjTable)
		elseif GetObj.TypeByHash(GetObj.Hash(ObjTable))~=nil then 
			return GetObj.TypeByHash(GetObj.Hash(ObjTable)) 
		else 
			return "UnknownObjectType" 
		end
	else  --for the non lua objects
		local ObjectCountTable={}
		for i=1,getn(GlobalTeamTable),1 do
			ObjectCountTable[GlobalTeamTable[i]]={}
			for j=1,getn(RelevantNonLuaObjectsTypeTable),1 do
				ObjectCountTable[GlobalTeamTable[i]][RelevantNonLuaObjectsTypeTable[j]]=CountObjectTypeOfTeam(RelevantNonLuaObjectsTypeTable[j],GlobalTeamTable[i])
			end
		end
		ExecuteAction("UNIT_SET_TEAM",Object,NeutralTeam)
		for i=1,getn(GlobalTeamTable),1 do
			for j=1,getn(RelevantNonLuaObjectsTypeTable),1 do
				if ObjectCountTable[GlobalTeamTable[i]][RelevantNonLuaObjectsTypeTable[j]]~=CountObjectTypeOfTeam(RelevantNonLuaObjectsTypeTable[j],GlobalTeamTable[i]) then
					ExecuteAction("UNIT_SET_TEAM",Object,GlobalTeamTable[i])
					return RelevantNonLuaObjectsTypeTable[j]
				end
			end
		end
		return "UnknownObjectType" --error_("no ObjectType found - nilvalue")
	end
end



function GetObj.KindOfTable(Object,team)
	local TeamSource
	if team == nil then TeamSource=GetTeamName(Object) else TeamSource=team end
	local kindofcounter=0 
	local UnitsKindOfTable={}
	for i=0,getn(KindOfIndexTable)-1,1 do
		kindofcounter=CountTeamsKindOf(TeamSource,i)
		ExecuteAction("UNIT_SET_TEAM",Object,NeutralTeam)
		if kindofcounter~=CountTeamsKindOf(TeamSource,i) then tinsert(UnitsKindOfTable,KindOfIndexTable[i+1]) end
		ExecuteAction("UNIT_SET_TEAM",Object,TeamSource)
	end
	return UnitsKindOfTable
end

function ObjectIsKindOf(Object,KindOf,team)
	local KindOfTable
    if team ~= nil then	KindOfTable = GetObj.KindOfTable(Object,team)
	else KindOfTable = GetObj.KindOfTable(Object) end
	for i=1,getn(KindOfTable),1 do
		if KindOfTable[i]==KindOf then return true end
	end
	return false
end

function GetObjectTypeKindOfList(ObjectTypeTable,kindof)
	--local TempTeamTable={NeutralTeam,CivilianTeam,CreepsTeam} --ObserverTeam
	local TempTeam=CivilianTeam
	local ResultTable={}
	local TREF = ""
	--if IsEntryInTable(TempTeamTable,TeamSource) then TempTeam=NextTableElement(TempTeamTable,TeamSource) end
	local kindofcounter1=0
	local kindofcounter2=0
	for i=1,getn(ObjectTypeTable),1 do
		TREF=spawn(ObjectTypeTable[i],TempTeam)
		kindofcounter1=CountTeamsKindOf(TempTeam,kindof)
		ExecuteAction("UNIT_SET_TEAM",TREF,NeutralTeam)
		kindofcounter2=CountTeamsKindOf(TempTeam,kindof)
		delete(TREF)
		--ExecuteAction("UNIT_SET_TEAM",Object,TeamSource)
		if kindofcounter1~=kindofcounter2 then tinsert(ResultTable,ObjectTypeTable[i]) end
	end
	return ResultTable
end

function GetObjectTypeKindOfList_BFMEIIROWTK(ObjectTypeTable,kindof)
	local TempTeam=CivilianTeam
	local ResultTable={}
	local TREF = ""
	local kindofcounter1=0
	local kindofcounter2=0
	for i=1,getn(ObjectTypeTable),1 do
		if ObjectTypeTable[i]~="DwarvenMagicDoor" and ObjectTypeTable[i]~="WildMineShaft" then
			TREF=spawn(ObjectTypeTable[i],TempTeam)
			kindofcounter1=CountTeamsKindOf(TempTeam,kindof)
			ExecuteAction("UNIT_SET_TEAM",TREF,NeutralTeam)
			kindofcounter2=CountTeamsKindOf(TempTeam,kindof)
			delete(TREF)
			if kindofcounter1~=kindofcounter2 then tinsert(ResultTable,ObjectTypeTable[i]) end
		end
	end
	return ResultTable
end

function GetSelectedUnitRef(flash) --EvaluateCondition not working here
	for k,v in globals() do
	    if strfind(k,"ObjID") and ObjectTestModelCondition(v,"SELECTED") then  --EvaluateCondition("NAMED_SELECTED",v)--EvaluateCondition("TYPE_SELECTED", objectname)	
			if flash then ExecuteAction("NAMED_FLASH_WHITE", v, 2)	end
			return v
		end
	end
	return nil
end

function SetObjectToObjectReference(Object1,Object2)
	ExecuteAction("SET_UNIT_REFERENCE_TO_REFERENCE", Object1, Object2)	
end

function SetTeamReference(team,ref)
    ExecuteAction("SET_TEAM_REFERENCE", team1, ref)	
end

function SetTeamReferenceToReferenceTeam(team1,team2)
    ExecuteAction("SET_TEAM_REFERENCE_TO_REFERNECE", team1,team2)	
end

function RegisterNonLuaObjectRefInLua(Object) --don't even consider use
	globals["ObjID" .. RandomString(5)]=Object
end

function GetObj.Index(Object)
	for k,v in globals() do
		if strfind(k, "ObjID") then
			if strfind(tostring(v),tostring(Object)) then
				return tostring(k)
			end
		end
	end
	return "UnknownIndex"
end

function GetObj.IndexByStringRef(ObjectStringRef)
	for k,v in globals() do
		if strfind(k, "ObjID") then
			if strfind(ObjectDescription(v),ObjectStringRef) then
				return tostring(k)
			end
		end
	end
end


---------------------object type lists-----------------------------------

function EditObjectTypeList(ObjectType, ObjectTypeList, OP)
	if OP == "add" or OP == "a" then ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", ObjectTypeList, ObjectType)
	elseif OP == "remove" or OP == "r" then ExecuteAction("OBJECTLIST_REMOVEOBJECTTYPE", ObjectTypeList, ObjectType) end
end	

function AddToObjectTypeList(ObjectTypeList,...)
	for i=1,getn(arg),1 do
		ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", ObjectTypeList, arg[i])
	end
end

function SetAndAddObjectListToRef(ObjectTypeList, ObjectType, UnitRefString)	
    ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", ObjectTypeList, ObjectType)
    ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE", ObjectTypeList, GetTeamName(object1), UnitRefString)
end	

-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------List Creations (partly one time use)----------------

function CreateHashStringTable(ObjectTypeTable) --used to make the ObjectHashIndexTypeTable
	local ObjectRef=""
	local HashStringTable="ObjectHashIndexTypeTable={"  
	local NonLuaObjects="RelevantNonLuaObjectsTypeTable={"
	local Hash=""
	local ni = 0
	local nn = 0
	local lci = 1
	local lcn = 1
	for i=1,getn(ObjectTypeTable),1 do
		ObjectRef=spawn(ObjectTypeTable[i])
		TRef=GetObj.Table(ObjectRef)
		if type(TRef) == "table" then 
			HashStringTable=HashStringTable .. "[" .. strchar(34) .. GetObj.Hash(TRef) .. strchar(34) .. "]=" .. strchar(34) .. ObjectTypeTable[i] .. strchar(34) .. ","
			ni=ni+1
			if mod(ni,18*lci)==0 then HashStringTable = HashStringTable .. "\n" lci=lci+1 end
			else 
			if not strfind(ObjectTypeTable[i],"Projectile") and not strfind(ObjectTypeTable[i],"Debris") and not strfind(ObjectTypeTable[i],"Seed") and not strfind(ObjectTypeTable[i],"Missile") and not strfind(ObjectTypeTable[i],"Shell") and not strfind(ObjectTypeTable[i],"FX") and not strfind(ObjectTypeTable[i],"Effect") and not strfind(ObjectTypeTable[i],"Animator") and not strfind(ObjectTypeTable[i],"Maker") and not strfind(ObjectTypeTable[i],"Beacon") and not strfind(ObjectTypeTable[i],"Rock") then --or "Tiberium"
				NonLuaObjects=NonLuaObjects .. strchar(34) .. ObjectTypeTable[i] .. strchar(34) .. ","
				nn=nn+1
				if mod(nn,18*lcn)==0 then NonLuaObjects = NonLuaObjects.. "\n" lcn=lcn+1 end  
			end
		end
		ExecuteAction("NAMED_DELETE",ObjectRef)
	end
	WriteToFile(HashStringTable .. "}")
	WriteToFile(NonLuaObjects .. "}")
end --CreateHashStringTable(WorldBuilderObjectTypeTable)

function FilterObjects(ObjectTable)
	local ObjectRef = ""
	for i=1,getn(ObjectTable),1 do
		ObjectRef=spawn(ObjectTable[i])
		if not EvaluateCondition("NAMED_NOT_DESTROYED",ObjectRef) then out(ObjectTable[i]) end
		delete(ObjectRef)
	end
end --FilterObjects(OCLSpawnExtenderTable)

function GetListOfAllKindOfs(team,kindof) --not working
	local ObjectRef=""
	local RefTable = {}
	local y=1
	--local KindOfTable=kindof .. "Table={" 
	for i=1,getn(ObjectTypeTable),1 do
		RefTable[y]={}
		RefTable[y]["ref"]=spawn(ObjectTypeTable[i])
		RefTable[y]["type"]=ObjectTypeTable[i]
		if ObjectIsKindOf(RefTable[y]["ref"],"STRUCTURE",team) then out(ObjectTypeTable[i]) end
		ExecuteAction("NAMED_DELETE",RefTable[y]["ref"])
		y=y+1
	end
	local FilterKindOf = function(KindOf,list)
		for i=1,getn(list),1 do
			if ObjectIsKindOf(list[i]["ref"],KindOf,%team) then out(list[i]["type"]) end
			ExecuteAction("NAMED_DELETE",list[i]["ref"])
		end
	end --SetScriptTimerFast(0.01,FilterKindOf(kindof,RefTable))
end  --GetListOfAllKindOfs(GetTeamName(object1),"STRUCTURE")

function ObjectIsKindOfList(Object,KindOfList,team)
	local KindOfTable
	local KindOfMatchCount = 0
    if team ~= nil then	KindOfTable = GetObj.KindOfTable(Object,team)
	else KindOfTable = GetObj.KindOfTable(Object) end
	for i=1,getn(KindOfTable),1 do
		for j=1,getn(KindOfList),1 do
			if KindOfTable[i]==KindOfList[j] then KindOfMatchCount=KindOfMatchCount+1 end
		end
	end
	if KindOfMatchCount == getn(KindOfList) then return true
	else return false
	end
end

function WriteKindofList(ObjectTable, KindOfList)
	local ObjectRef = ""
	for i=1,getn(ObjectTable),1 do
		ObjectRef=RandomString(5)
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",ObjectRef,ObjectTable[i],GetTeamName(object1),"((0.00,0.00,0.00))", 0)
		if ObjectIsKindOfList(ObjectRef,KindOfList,GetTeamName(object1)) then out(ObjectTable[i]) end
		delete(ObjectRef)
	end
end

function CopyTextFromFileAndReplaceStringsFromTable(replacement,file,table)
    local file=FilePath .. file
    local filehandle = openfile(file, 'r')
    local data_to_exec = read(filehandle, '*a') 
	closefile(filehandle)	
	local result = ""
    for i=1,getn(table),1 do
		result = gsub(data_to_exec,replacement,table[i])
		WriteToFile(result)
	end
	ExecuteAction("DISPLAY_TEXT", "MESSAGE:FILEWRITECOMPLETE")		
end

function CreateWrittenLuaTable(table)
	local TableStr="LuaTable={\n"
	for i=1,getn(table),1 do
		TableStr=TableStr .. '"' .. table[i] .. '"'
		if i~=getn(table) then TableStr=TableStr .. "," end
		if mod(i,18)==0 then TableStr = TableStr .. "\n" end
	end
	TableStr=TableStr .. "\n}"
	out(TableStr)
end

function CreateIndexTable(table)
	local str = ""
	for i=1,getn(table),1 do
		str = str .. "[" .. [["]] .. table[i] .. [["]] .. "]" .. "=" .. i-1 .. ", "
		if mod(i,18)==0 then str = str .. "\n" end
	end	
	out(str)
end

function GetNonLuaObjects(ObjectTypeList)
	local ObjRef
	for i=1,getn(ObjectTypeList),1 do
		ObjRef = spawn(ObjectTypeList[i],NeutralTeam)
		if type(GetObj.Table(ObjRef)) ~= "table" then out(ObjectTypeList[i]) end
	end
end


-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

AI_Ident_TeamName = {"Skirmish"}
AI_Ident_ObjectDescription = {" AI"," KI", "Enemy", "Faux", "GDI_"}

function IsPlayerAI(input) 
	if tostring(type(input)) == "table" or strfind(tostring(input), "objref_") ~= nil then          --input is objectref
		--if MakeAllSkirmishSidesAIControlledStatus == 0 then
		--if strfind(tostring(ObjectTeamName(input)), "Skirmish") == nil then return 0
		--else return 1 end
		--else
		for i=1,getn(AI_Ident_TeamName),1 do
			if strfind(ObjectTeamName(input), AI_Ident_TeamName[i]) then return 1 end
		end
		for i=1,getn(AI_Ident_ObjectDescription),1 do
			if strfind(ObjectDescription(input), AI_Ident_ObjectDescription[i]) then return 1 end
		end
		return 0
		--end
		elseif tostring(type(input)) == "string" then  --input is teamstring
		-- local UnitRefString = RandomString(5)
		-- ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE", "PlayerSpellBook", input, UnitRefString)
		-- if strfind(tostring(ObjectTeamName(UnitRefString)), "Skirmish") ~= nil or strfind(tostring(ObjectDescription(UnitRefString)), " AI") ~= nil or strfind(tostring(ObjectDescription(UnitRefString)), " KI") ~= nil then return 1
		-- else return 0 end
		local RawTeamName = strsub(input, 10, -1)	
		for k,v in globals() do
			if strfind(k, "ObjID") ~= nil then
				if strfind(ObjectTeamName(v), RawTeamName) ~= nil then
					--if MakeAllSkirmishSidesAIControlledStatus == 0 then
					--if strfind(tostring(ObjectTeamName(v)), "Skirmish") == nil then return 0
					--else return 1 end
					--else
					for i=1,getn(AI_Ident_TeamName),1 do
						if strfind(ObjectTeamName(v), AI_Ident_TeamName[i]) then return 1 end
					end
					for i=1,getn(AI_Ident_ObjectDescription),1 do
						if strfind(ObjectDescription(v), AI_Ident_ObjectDescription[i]) then return 1 end
					end
					return 0
					--end
				end
			end
		end 
	end
end

function IsUnitAI(self) 
	local AI_Ident_TeamName = {"Skirmish"}
	local AI_Ident_ObjectDescription = {" AI"," KI", "Enemy", "Faux", "GDI_"}
	for i=1,getn(AI_Ident_TeamName),1 do
		if strfind(ObjectTeamName(self), AI_Ident_TeamName[i]) then return true end
	end
	for i=1,getn(AI_Ident_ObjectDescription),1 do
		if strfind(ObjectDescription(self), AI_Ident_ObjectDescription[i]) then return true end
	end	
	return false
end

function GetTeamName(teamobject) 
	local TeamName = ""
	local TeamDescription=""
	if type(teamobject) == "string" then 
		TeamDescription = ObjectTeamName(GetObj.Table(teamobject))
		if TeamDescription == nil then 
			TeamName = GetTeamNameOfNonLUAObject(teamobject)
			if TeamName == nil then return error("TeamDescription nilvalue")
			else return TeamName end
		end
	else TeamDescription=ObjectTeamName(teamobject) end
	local TeamNumber = gsub(TeamDescription, "%a+%p+", "")
	if TeamNumber == nil then return error("TeamNumber nilvalue") end --"unknownTeam" 	
	--if IsPlayerAI(teamobject) == 1 then
	if strfind(TeamDescription, "SkirmishTeamPlayer") ~= nil then                            	--"Player_2/defaultSkirmishTeamPlayer_2"
		TeamName = "Player_" .. TeamNumber .. "/defaultSkirmishTeamPlayer_" .. TeamNumber .. ""    
		return TeamName	
		--end		
		elseif strfind(TeamDescription, "teamPlayer") ~= nil then                                    	--"Player_1/teamPlayer_1"   
	    TeamName = "Player_" .. TeamNumber .. "/teamPlayer_" .. TeamNumber .. ""  
        return TeamName	
		elseif strfind(TeamDescription, "Civilian") ~= nil then                                    	--"PlyrCivilian/teamPlyrCivilian"
	    TeamName = "PlyrCivilian/teamPlyrCivilian"
        return TeamName	
		elseif strfind(TeamDescription, "Creeps") ~= nil then                                    	    --"PlyrCreeps/teamPlyrCreeps"
	    TeamName = "PlyrCreeps/teamPlyrCreeps"
        return TeamName	
		elseif strfind(TeamDescription, "teamPlyr") ~= nil then                                      	--"PlyrNOD/teamPlyrNOD"
        TeamName = strsub(TeamDescription, 5, -1) .. "/" .. TeamDescription .. ""
        return TeamName	
		elseif strfind(TeamDescription, "SkirmishTeam") ~= nil then                                   --"Nod_Enemy_Main/defaultSkirmishTeamNod_Enemy_Main"
        TeamName = strsub(TeamDescription, 20, -1) .. "/" .. TeamDescription .. ""
        return TeamName			
		elseif strfind(TeamDescription, "team") ~= nil and strlen(TeamDescription) == 4 then          --"team" for neutrals
        TeamName = "team"   
        return TeamName	
		else
	    TeamName = gsub(strsub(ObjectDescription(teamobject),strfind(ObjectDescription(teamobject), "player ")+10),"%p","") .. "/" .. TeamDescription .. ""
        return TeamName	
	end
end

function GetTeamNameOfNonLUAObject(teamobject) 
	local AllObjectsCount = {}
	for i=1,getn(GlobalTeamTable),1 do
		AllObjectsCount[GlobalTeamTable[i]]=CountAllObjectsOfTeam(GlobalTeamTable[i])
	end
	ExecuteAction("UNIT_SET_TEAM",teamobject,NeutralTeam)
	for i=1,getn(GlobalTeamTable),1 do
		if CountAllObjectsOfTeam(GlobalTeamTable[i])~=AllObjectsCount[GlobalTeamTable[i]] then
			ExecuteAction("UNIT_SET_TEAM",teamobject,GlobalTeamTable[i])	  
			return GlobalTeamTable[i]
		end
	end
	return error("no TeamName found - nilvalue")
end

function GetTeamNumber(ObjectOrTeam) 
	if StoryModeStatus or MetaGameStatus then return "X123" end
	if type(ObjectOrTeam) == "table" then return gsub(ObjectTeamName(GetObj.Table(ObjectOrTeam)), "%a+%p+", "")
	elseif type(ObjectOrTeam) == "string" then return strsub(ObjectOrTeam, 8, 8) end
end

function GetTeamTable(extend)
    local TeamTable = {}
	local teambuffer = ""
	local TeamNumber = 0
	local exist_state = 0
	for k,v in globals() do
		exist_state=0
		if strfind(tostring(k), "ObjID") ~= nil then
			if strfind(tostring(ObjectTeamName(v)), PlayerSearchString) ~= nil or (extend~=nil and (StoryModeStatus or MetaGameStatus)) then  --tempchange
				teambuffer = GetTeamName(v)
				--if teambuffer==NeutralTeam then break end
				for i,j in TeamTable do
					if TeamTable[i] == teambuffer then
						exist_state=1
						break
					end
				end
				if exist_state == 0 then
					--TeamNumber = gsub(tostring(ObjectTeamName(v)), "%a+%p+", "")   --3 lines of commented code here create index holes, so better with tinsert
					--TeamNumber = tonumber(TeamNumber)
					if TeamTable[TeamNumber] ~= nil then break end
					--TeamTable[TeamNumber] = teambuffer
					tinsert(TeamTable,teambuffer)
				end
			end
		end
	end
	function TeamSortHelper(element1,element2)
		local TeamNumber1=gsub(element1, "%a+%p+", "")
		local TeamNumber2=gsub(element2, "%a+%p+", "")
		if (TeamNumber1<TeamNumber2) or (element1 ~= nil and element2 == nil) then return 1
		else return 0 end
	end   
	--sort(TeamTable,TeamSortHelper)
	--TeamTable[0]=getn(TeamTable)
	--TeamTable["n"]=nil
	return TeamTable
end

function RefreshTeamTable()
	if StoryModeStatus or MetaGameStatus then GlobalTeamTable = CopyTable(ProperPlayerTeamTable)  --tempchange 
	else GlobalTeamTable = GetTeamTable() end --tempchange 
	AllTeamsTable = CreateAllTeamsTable()
end

function GetValidTeamList() --alternative
	local TeamList={
		"Player_1/teamPlayer_1",
		"Player_2/teamPlayer_2",
		"Player_3/teamPlayer_3",
		"Player_4/teamPlayer_4",
		"Player_5/teamPlayer_5",
		"Player_6/teamPlayer_6",
		"Player_7/teamPlayer_7",
		"Player_8/teamPlayer_8",
		"Player_1/defaultSkirmishTeamPlayer_1",
		"Player_2/defaultSkirmishTeamPlayer_2",
		"Player_3/defaultSkirmishTeamPlayer_3",
		"Player_4/defaultSkirmishTeamPlayer_4",
		"Player_5/defaultSkirmishTeamPlayer_5",
		"Player_6/defaultSkirmishTeamPlayer_6",
		"Player_7/defaultSkirmishTeamPlayer_7",
		"Player_8/defaultSkirmishTeamPlayer_8",
		--"/team", --NeutralTeam
		--"PlyrCivilian/teamPlyrCivilian",
		--"PlyrCreeps/teamPlyrCreeps",
		--"ReplayObserver/teamReplayObserver",
	}	
	local ValidTeamList = {}
	for i=1,getn(TeamList),1 do
		local TempUnitRef = "UNITREF_" .. tostring(GetRandomNumber())
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", TempUnitRef, GENERIC_DUMMY, TeamList[i], "((0.00,0.00,0.00))", 0)
		if EvaluateCondition("NAMED_NOT_DESTROYED", TempUnitRef) then tinsert(ValidTeamList, TeamList[i]) end --EvaluateCondition("TEAM_DESTROYED", TeamList[i])
		ExecuteAction("NAMED_DELETE", TempUnitRef)
	end
	return ValidTeamList
end

function CreateAllTeamsTable()
	local AllTeamsTable=CopyTable(GlobalTeamTable)
	tinsert(AllTeamsTable,CreepsTeam)
	tinsert(AllTeamsTable,CivilianTeam)
	tinsert(AllTeamsTable,ObserverTeam)
	tinsert(AllTeamsTable,NeutralTeam)
	return AllTeamsTable
end

function IsATeamDestroyed()
	for i=1,getn(GlobalTeamTable),1 do 
		if EvaluateCondition("TEAM_DESTROYED", GlobalTeamTable[i]) then return 1 end
	end
	return 0
end

function TeamAlive(team)
	if EvaluateCondition("TEAM_DESTROYED", team) then return 0
	else return 1 end
end

function TestCampaignFlag()
	for i=0,95,1 do
		if EvaluateCondition("TEST_CAMPAIGN_FLAG", i) then return 1 end
	end
	return 0
end

function InfoOnMetaGameFlags()
	for i=96,99,1 do
		WriteToFile(EvaluateCondition("TEST_CAMPAIGN_FLAG", i))
	end
end

function IsGameInStoryMode(thisobject)
	if strfind(tostring(ObjectTeamName(thisobject)), "Plyr") ~= nil then return 1
	else return 0 end
end

function IsMetaGameActive()
    if EvaluateCondition("TEST_CAMPAIGN_FLAG", 99) then return 1
	else return 0 end
	--EvaluateCondition("COUNTER_SECONDS", "SR_TIMER_Map Reveal", CompareTable["GT"], "0")
	--WriteToFile(EvaluateCondition("TIMER_EXPIRED", "SR_TIMER_Map Reveal"))
	--WriteToFile(EvaluateCondition("COUNTER", "SR_TIMER_Map Reveal", CompareTable["GT"], "1"))	 
	--WriteToFile(EvaluateCondition("FLAG", "SR_FLAG_Map Revealed?", 0))
	--WriteToFile(EvaluateCondition("FLAG", "SR_FLAG_Stealth Revealed?", 0))
end

function EditAttackPrioritySet(PrioritySetName, ObjectTypeList)
	ExecuteAction("SET_ATTACK_PRIORITY_THING", PrioritySetName, ObjectTypeList)   --ObjectTypeList or ObjectType
	--ExecuteAction("SET_ATTACK_PRIORITY_KIND_OF", priorityset, KindOfTable["VEHICLE"], int)
	--ExecuteAction("SET_DEFAULT_ATTACK_PRIORITY", priorityset, int)
end	

function SelectObject(ObjectType,team)
    ExecuteAction("OBJECT_FORCE_SELECT", team, ObjectType, "0", "placeholder")   --if "0" changed to "1" camfocus on object
end	

function Deselect()
	ExecuteAction("DESELECT")	
end

function OpenTab(TabName)
	local PRODUCTION_QUEUE_TAB = {["MAIN_STRUCTURE"]=0, ["OTHER_STRUCTURE"]=1, ["INFANTRY"]=2, ["VEHICLE"]=3, ["AIRCRAFT"]=4, ["UPGRADE"]=5}
	ExecuteAction("SWITCH_TO_PRODUCTION_QUEUE_TAB", PRODUCTION_QUEUE_TAB[TabName])
end

function GetTeamsDescriptiveName(input) --input = object or teamname
	if input==nil then return "UnknownPlayer" end
	if StoryModeStatus or MetaGameStatus and input==HumanPlayerTable[1] then return ProfileName end
	local TeamsDescriptiveName = ""
	if type(input) == "table" then
		TeamsDescriptiveName = gsub(gsub(strsub(ObjectDescription(input),strfind(ObjectDescription(input), "player ")+10),"%s",""),"%p","")
		elseif type(input) == "string" then
		if GPOT_Initialized == 1 then return GPOT[input]["name"] end --    if GPOT_Initialized == 1 and GPOT[input]~=nil then return GPOT[input]["name"] end  --tempchange?
		local RawTeamName = strsub(input, 10, -1)	
		for k,v in globals() do
			if strfind(k, "ObjID") ~= nil then
				if strfind(ObjectTeamName(v), RawTeamName) ~= nil then
					TeamsDescriptiveName = gsub(gsub(strsub(ObjectDescription(v),strfind(ObjectDescription(v), "player ")+10),"%s",""),"%p","")
				end
			end
		end
	end
	if TeamsDescriptiveName==nil then return "UnknownPlayer" else return TeamsDescriptiveName end
end

function GetFactionName(input) --input = object or teamname
	if input==nil then return "UnknownFaction" end
	local FactionTable = { ["CCA0AB62"]="GDI", ["38EA5BC0"]="SteelTalons", ["8E3D36F8"]="ZOCOM", ["ED46C05A"]="NOD",  ["5D10A932"]="BlackHand", ["FB53CCFD"]="MarkedOfKane", ["5B7BAA66"]="Scrin", ["30883A9F"]="Reaper-17", ["92CC2C04"]="Traveler-59", ["C884591E"]="MetaTechCorporation" }
	local FactionHex = ""
	if type(input) == "table" then
		FactionHex = strsub(ObjectPlayerSide(input),6,13)
		elseif type(input) == "string" then
		if GPOT_Initialized==1 then return GPOT[input]["faction"]  end
		local RawTeamName = strsub(input, 10, -1)	
		for k,v in globals() do
			if strfind(k, "ObjID") ~= nil then
				if strfind(ObjectTeamName(v), RawTeamName) ~= nil then
					FactionHex = strsub(ObjectPlayerSide(v),6,13)
				end
			end
		end
	end
	if FactionTable[FactionHex]==nil then return "UnknownFaction" else return FactionTable[FactionHex] end
end

function GetStringRefListOfAllObjects(CreepsTeamToo) --lua and even non lua objects
	local RefList = {}    
	local ObjRef = ""
	local ObjHash
	local TempObjectRefTable = {}
	local VictCondHelperRef = ""
	local ObjectType = ""
	local _, count = "",0
	local y = 1
  	for k,v in globals() do   --for all lua registered objects
		if strfind(k,"ObjID")~=nil then    --takes currently also neutral team objects
			--ObjHash=GetObj.Hash(v)
			--ObjectType = ObjectHashIndexTypeTable[ObjHash]
			ObjectType = GetObj.Type(v)
			if ObjectType~=nil then --and TemplateExclusionHashIndexTable[ObjHash]==nil then
				_,count = gsub(ObjectDescription(v),"%(","")
				if count>1 then
					ObjRef = strsub(ObjectDescription(v),strfind(ObjectDescription(v),"(",1,true)+1,strfind(ObjectDescription(v),")",1,true)-1)
				else
					ObjRef = "object" .. RandomString(5)
					ExecuteAction("SET_UNIT_REFERENCE", ObjRef, v)
				end		
				RefList[y]={}			
				RefList[y]["ref"]=ObjRef
				RefList[y]["team"]=GetTeamName(v)
				RefList[y]["type"]=ObjectType
				--RefList[y]["hash"]=ObjHash
				y=y+1
			end
		end
	end
	if CreepsTeamToo then tinsert(GlobalTeamTable,CreepsTeam) end
	for i=1,getn(GlobalTeamTable),1 do --now for all remaining non lua objects
		TempObjectRefTable[GlobalTeamTable[i]]={}
		VictCondHelperRef = RandomString(5)
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", VictCondHelperRef, VictoryConditionHelper, GlobalTeamTable[i], "((0.00,0.00,0.00))", 0)
		for u=1,getn(RelevantNonLuaObjectsTypeTable),1 do
			repeat
				ObjRef=RandomString(5)
				ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",RelevantNonLuaObjectsTypeTable[u],GlobalTeamTable[i],ObjRef)   --"NonLuaObjectsList"
				if EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef) then 
					RefList[y]={}
					RefList[y]["ref"]=ObjRef
					RefList[y]["team"]=GlobalTeamTable[i]
					RefList[y]["type"]=RelevantNonLuaObjectsTypeTable[u]
					--RefList[y]["hash"]="0"
					tinsert(TempObjectRefTable[GlobalTeamTable[i]],ObjRef)
					ExecuteAction("UNIT_SET_TEAM",ObjRef,NeutralTeam)  
					y=y+1	
				else break end
			until(not EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef))
		end
		for j=1,getn(TempObjectRefTable[GlobalTeamTable[i]]),1 do
			ExecuteAction("UNIT_SET_TEAM",TempObjectRefTable[GlobalTeamTable[i]][j],GlobalTeamTable[i])
		end	  
		ExecuteAction("NAMED_DELETE",VictCondHelperRef)
	end
	if CreepsTeamToo and GlobalTeamTable[getn(GlobalTeamTable)]==CreepsTeam then tremove(GlobalTeamTable,getn(GlobalTeamTable)) end
	CurrentObjectRefTable=RefList
	return RefList
end

function GetStringRefListOfAllObjectsForTeam(team) 
	local RefList = {}    
	local ObjRef = ""
	local ObjHash
	local TempObjectRefTable = {}
	local VictCondHelperRef = ""
	local ObjectType = ""
	local _, count = "",0
	local y = 1
  	for k,v in globals() do   --for all lua registered objects
		if strfind(k,"ObjID")~=nil and GetTeamName(v)==team then    --takes currently also neutral team objects
			ObjHash=GetObj.Hash(v)
			ObjectType = ObjectHashIndexTypeTable[ObjHash]
			if ObjectType~=nil then --and TemplateExclusionHashIndexTable[ObjHash]==nil then
				_,count = gsub(ObjectDescription(v),"%(","")
				if count>1 then
					ObjRef = strsub(ObjectDescription(v),strfind(ObjectDescription(v),"(",1,true)+1,strfind(ObjectDescription(v),")",1,true)-1)
					else
					ObjRef = "object" .. RandomString(5)
					ExecuteAction("SET_UNIT_REFERENCE", ObjRef, v)
				end		
				RefList[y]={}			
				RefList[y]["ref"]=ObjRef
				RefList[y]["team"]=team
				RefList[y]["type"]=ObjectType
				--RefList[y]["hash"]=ObjHash
				y=y+1
			end
		end
	end
	TempObjectRefTable[team]={}
	VictCondHelperRef = RandomString(5)
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", VictCondHelperRef, VictoryConditionHelper, team, "((0.00,0.00,0.00))", 0)
	for u=1,getn(RelevantNonLuaObjectsTypeTable),1 do
		repeat
			ObjRef=RandomString(5)
			ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",RelevantNonLuaObjectsTypeTable[u],team,ObjRef)   --"NonLuaObjectsList"
			if EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef) then 
				RefList[y]={}
				RefList[y]["ref"]=ObjRef
				RefList[y]["team"]=team
				RefList[y]["type"]=RelevantNonLuaObjectsTypeTable[u]
				--RefList[y]["hash"]="0"
				tinsert(TempObjectRefTable[team],ObjRef)
				ExecuteAction("UNIT_SET_TEAM",ObjRef,NeutralTeam)  
				y=y+1	
			else break end
		until(not EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef))
	end
	for j=1,getn(TempObjectRefTable[team]),1 do
		ExecuteAction("UNIT_SET_TEAM",TempObjectRefTable[team][j],team)
	end	  
	ExecuteAction("NAMED_DELETE",VictCondHelperRef)
	--CurrentObjectRefTable=RefList
	return RefList
end

function GetObjectTypeListForTeam(team,ObjectType) --ObjectType or ObjectTypeList 
	local RefList = {}
	local ObjRef = ""
	local y = 1
	local TempObjectRefTable={}
	VictCondHelperRef = RandomString(5)
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", VictCondHelperRef, VictoryConditionHelper, team, "((0.00,0.00,0.00))", 0)
	repeat
		ObjRef=RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",ObjectType,team,ObjRef)   --"NonLuaObjectsList"
		if EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef) then 
		  	RefList[y]={}
			RefList[y]["ref"]=ObjRef
			RefList[y]["team"]=team
			RefList[y]["type"]=ObjectType
			tinsert(TempObjectRefTable,ObjRef)
			ExecuteAction("UNIT_SET_TEAM",ObjRef,NeutralTeam)  
			y=y+1	
		else break end
	until(not EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef))
	for j=1,getn(TempObjectRefTable),1 do
		ExecuteAction("UNIT_SET_TEAM",TempObjectRefTable[j],team)
	end	  
	ExecuteAction("NAMED_DELETE",VictCondHelperRef)
	return RefList
end

function WriteCurrentObjectRefTable()
	GetStringRefListOfAllObjects()
	--if CurrentObjectRefTable==nil then GetStringRefListOfAllObjects() end
	local RefString = "total number of refs: " .. getn(CurrentObjectRefTable) .. "\n"
	RefString = RefString .. "total number of allobjcount: " .. CountAllObjects() .. "\n"
	for i=1,getn(CurrentObjectRefTable),1 do
		RefString=RefString .. "ref: " .. CurrentObjectRefTable[i]["ref"] .. " " .. "team: " .. CurrentObjectRefTable[i]["team"].. " " .. "type: " .. CurrentObjectRefTable[i]["type"] .. "\n"
	end
	out(RefString)
end

function GetRefListOfAllNeutralTeamObjects()
	local RefList = {}
	local ObjRef = ""
	local TempObjRefTable = {}
	local y = 1
	repeat
		ObjRef=RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE","AllObjectsList",NeutralTeam,ObjRef)   --"NonLuaObjectsList"
		if EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef) then 
			RefList[y]={}
			RefList[y]["ref"]=ObjRef
			--RefList[y]["type"]=
			tinsert(TempObjRefTable,ObjRef)
			ExecuteAction("UNIT_SET_TEAM",ObjRef,GlobalTeamTable[1])  
			y=y+1	
		else break end
	until(not EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef))
	for i=1,getn(TempObjRefTable),1 do
		ExecuteAction("UNIT_SET_TEAM",TempObjRefTable[i],NeutralTeam)
	end	
	return RefList
	--LOADED_FROM_MAP
end  --tout(GetRefListOfAllNeutralTeamObjects())

function GetPlayerNameByTeam(teamname)
	return tostring(strsub(teamname, 1, 8))  
end

function GiveObjectsTable()   --old use getreflistofallobjects
	local ObjectsTable = {}
	i=1
	for k,v in globals() do
		if strfind(tostring(k), "ObjID") ~= nil then
			if strfind(tostring(ObjectDescription(v)), "3E9DE387") == nil then  --protect script initiator
				ObjectsTable[i]=v
				i=i+1
			end
		end
	end
	return ObjectsTable
end

function RefreshObjectsTable()
	GlobalObjectsTable = GiveObjectsTable()
end

function MessageWithPlayerDescription(message,team1,team2,displaytime)
    local Notification=""
	if team2~=nil and team2~=0 and team2~="0" then Notification = "\n\n\n" .. strsub(team1, 1,  8) .. " / " .. GetFactionName(team1) .. " / " .. GetTeamsDescriptiveName(team1) .. "\n" .. tostring(message) ..  "\n\n" .. strsub(team2, 1,  8) .. " / " .. GetFactionName(team2) .. " / " .. GetTeamsDescriptiveName(team2) .. "\n\n"
	elseif team1~=nil then  Notification = "\n\n\n" .. strsub(team1, 1,  8) .. " / " .. GetFactionName(team1) .. " / " .. GetTeamsDescriptiveName(team1) .. "\n" .. tostring(message) .. "\n\n" end
    if displaytime==nil then displaytime=5 end
	print(Notification,displaytime)
end

function InitializeGPOT()
    if GPOT_Initialized == 1 then return end
    --RefreshTeamTable() --tempchange
	if StoryModeStatus or MetaGameStatus then GlobalTeamTable=MergeTables(ProperPlayerTeamTable,GetTeamTable("all")) else RefreshTeamTable() end --tempchange
    for i=1,getn(GlobalTeamTable),1 do
		local team = GlobalTeamTable[i]
		GPOT[team] = {}  
		GPOT[team]["teamname"] = team
		GPOT[team]["name"] = GetTeamsDescriptiveName(team)
		GPOT[team]["faction"] = GetFactionName(team)
		GPOT[team]["ai"] = IsPlayerAI(team)  
		GPOT[team]["AIControlState"] = 0
		GPOT[team]["Indestructible"] = 0
		if IsEntryInTable(ProperPlayerTeamTable,team) then GPOT[team]["DiplomacyTeamSelection"] = NextTableIndex(ProperPlayerTeamTable,team) end
		GPOT[team]["VictoryConditionHelperRefForMergeTeamOP"] = ""
		for j=1,getn(GlobalTeamTable),1 do
			GPOT[team][GlobalTeamTable[j]]={}
			GPOT[team][GlobalTeamTable[j]]["TemporaryMergedTeamUnitsTable"] = {}
			GPOT[team][GlobalTeamTable[j]]["TemporaryMergedTeam"] = false
		end
		GPOT[team]["AcceptDenyObjRef"] = ""
		GPOT[team]["AcceptAction"] = {}
		GPOT[team]["DenyAction"] = {}
		GPOT[team]["ChoosenPosition"] = {}
		GPOT[team]["ChoosenPositionAction"] = ""
		GPOT[team]["ChoosePositionObjRef"] = ""
		GPOT[team]["ChoosenPositionObjRefDest"] = ""
		GPOT[team]["TeamCommander"] = 0
		GPOT[team]["UnitEvoAI"] = {}	  
		GPOT[team]["aiboost"] = {}	  
		GPOT[team]["AIBoostOffDisplayState"] = 0
		GPOT[team]["AIBoostOnDisplayState"] = 0
		GPOT[team]["MapRevealerONDisplayState"] = 0
		GPOT[team]["MapRevealerOFFDisplayState"] = 0
		GPOT[team]["EnemyAIOFFDisplayState"] = 0
		GPOT[team]["EnemyAIONDisplayState"] = 0
		GPOT[team]["EveryAIOFFDisplayState"] = 0
		GPOT[team]["EveryAIONDisplayState"] = 0	
		GPOT[team]["Menu"]={}
		GPOT[team]["Menu"]["aiactivationstatus"]=1  
		GPOT[team]["Menu"]["buildboost"]=0 
		GPOT[team]["Menu"]["defensebuildboost"]=0 
		--GPOT[team]["Menu"]["productionbuildingbuildboostproductionbuilding"]=0 
		BaseSpawnCount[team]={}
	end
	AIPlayerTable = {}
	--HumanPlayerTable = {}
	for i=1,getn(GlobalTeamTable),1 do
		if GPOT[GlobalTeamTable[i]]["ai"]==1 then tinsert(AIPlayerTable,GlobalTeamTable[i]) 
			--else tinsert(HumanPlayerTable,GlobalTeamTable[i])
		end
	end
	GPOT[NeutralTeam]={}
	GPOT[CreepsTeam]={}	
	GPOT[ObserverTeam]={}	
	GPOT[NeutralTeam]["ai"]=1
	GPOT[CreepsTeam]["ai"]=1
	GPOT[ObserverTeam]["ai"]=0
	GPOT["team"]={} 
	GPOT["team"]["ai"] = 0
	GPOT_Initialized = 1
	if StoryModeStatus or MetaGameStatus then  --tempchange
		local TempPlayer=HumanPlayerTable[1] 
		HumanPlayerTable={}
		tinsert(HumanPlayerTable,TempPlayer)	
		GlobalTeamTable = CopyTable(ProperPlayerTeamTable)
	end
end 

function InitializeObjectTypeLists()
	if ObjectTypeListsInitialized == 0 then
		ObjectTypeListsInitialized = 1
		for i=1,getn(PowerPlantTypeTable),1 do
			ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "PowerPlantTypeList", PowerPlantTypeTable[i])
		end
		---	
		AddToObjectTypeList("DefenseStructureList",
			"NODDisruptionTower","NODLaserCannon","NODLaserCannonSpawn","NODObelisk","NODRocketBunker","NODRocketBunkerSpawn","NODShredderTurret","NODShredderTurretHub",
			"BlackHandDisruptionTower","BlackHandLaserCannon","BlackHandLaserCannonSpawn","BlackHandObelisk","BlackHandRocketBunker","BlackHandRocketBunkerSpawn","BlackHandShredderTurret","BlackHandShredderTurretHub",
			"MarkedOfKaneDisruptionTower","MarkedOfKaneLaserCannon","MarkedOfKaneLaserCannonSpawn","MarkedOfKaneObelisk","MarkedOfKaneRocketBunker","MarkedOfKaneRocketBunkerSpawn","MarkedOfKaneShredderTurret","MarkedOfKaneShredderTurretHub",
			"GDIAABattery","GDIGolumCannon","GDITerraformingStation","GDIWatchTower",
			"ZOCOMAABattery","ZOCOMGolumCannon","ZOCOMTerraformingStation","ZOCOMWatchTower",
			"SteelTalonsWatchTower","SteelTalonsGolumCannon","SteelTalonsAABattery",
			"AlienBuzzerHive","AlienLightningSpike","AlienPhotonCannon","AlienPlasmaMissileBattery","AlienStormColumn",
			"Traveler59BuzzerHive","Traveler59LightningSpike","Traveler59PhotonCannon","Traveler59PlasmaMissileBattery","Traveler59StormColumn",
		"Reaper17BuzzerHive","Reaper17LightningSpike","Reaper17PhotonCannon","Reaper17PlasmaMissileBattery","Reaper17StormColumn")
		---
		AddToObjectTypeList("FarAttackerUnitList","BlackHandMobileArtillery","GDIJuggernaught","SteelTalonsBehemoth", "Traveler59DevastatorWarship")
		---
		AddToObjectTypeList("TiberiumTypeList","TiberiumField","TiberiumFieldBlue","TiberiumCrystal","TiberiumCrystalBlue")
		---
		CreateNonLuaObjectsTypeList()
		CreateAllObjectsTypeList()
	end
end

function CreateNonLuaObjectsTypeList()
	for i=1,getn(RelevantNonLuaObjectsTypeTable),1 do
		ExecuteAction("OBJECTLIST_ADDOBJECTTYPE","NonLuaObjectsList",RelevantNonLuaObjectsTypeTable[i])
	end
end

function CreateAllObjectsTypeList()
	for i=1,getn(ObjectTypeTable),1 do
		ExecuteAction("OBJECTLIST_ADDOBJECTTYPE","AllObjectsList",ObjectTypeTable[i])
	end
end


--------------------------------------------------------------------------
------------------------WAYPOINTS AND AREAS-------------------------------
--------------------------------------------------------------------------

function GetWaypointTable()
	local WaypointTable_ = WaypointTable
	local WaypointTableTemp = {}
	local TRef = ""
	for i=1,getn(WaypointTable_),1 do
		--Waypoint = "Player_" .. tostring(i) .. "_Start"
		TRef = RandomString(5)
		ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT",TRef,GenericDummyNull,NeutralTeam,WaypointTable_[i])
		if type(GetObj.Table(TRef))=="table" then tinsert(WaypointTableTemp,WaypointTable_[i]) end
		--if not EvaluateCondition("NAMED_NOT_DESTROYED",TRef) then tinsert(WaypointTableTemp,WaypointTable_[i]) end
	end
	WaypointTable=WaypointTableTemp
	return WaypointTableTemp
end

function MakeWaypointDistanceTable()
	local CreateDistanceTable = function()
		local distance = 0
		for i=1,getn(WaypointTable),1 do WaypointDistance[WaypointTable[i]]={} end
		for i=1,getn(WaypointTable),1 do
			for j=1,getn(WaypointTable),1 do
				if i == j then 
					WaypointDistance[WaypointTable[i]][WaypointTable[j]]=0 
				else 
					distance = GetObjectDistance(WaypointTable[i] .. "_Object",WaypointTable[j] .. "_Object")  WaypointDistance[WaypointTable[i]][WaypointTable[j]]=distance WaypointDistance[WaypointTable[j]][WaypointTable[i]]=distance
				end      
			end
		end
		for i=1,getn(WaypointTable),1 do delete(WaypointTable[i] .. "_Object") end
	end
	for i=1,getn(WaypointTable),1 do ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT",WaypointTable[i] .. "_Object",GenericDummy,NeutralTeam,WaypointTable[i]) end
	SetScriptTimerFast(0.01,CreateDistanceTable)
end

function GetFarthestWaypoint(team)
	local ReferenceWaypoint = GetPlayerStartWaypointByTeam(team)
	local DistanceTable={}
	for i=1,getn(WaypointTable),1 do tinsert(DistanceTable,WaypointDistance[ReferenceWaypoint][WaypointTable[i]]) end   
	return WaypointTable[GetIndexOfTableElement(DistanceTable,GetMaxValue(DistanceTable))]
end

function GetClosestWaypoint(team)
	local ReferenceWaypoint = GetPlayerStartWaypointByTeam(team)
	local DistanceTable={}
	local distancemin=15000
	local index=1
	for i=1,getn(WaypointTable),1 do 
		if WaypointDistance[ReferenceWaypoint][WaypointTable[i]] ~= 0 then
			if WaypointDistance[ReferenceWaypoint][WaypointTable[i]] < distancemin then 
				distancemin=WaypointDistance[ReferenceWaypoint][WaypointTable[i]]
				index=i
				--distancemin=min(distancemin,WaypointDistance[ReferenceWaypoint][WaypointTable[i]]) 
			end
		end
	end	 
	return WaypointTable[index]
end

function GetPlayerStartWaypoint(thisobject)
	local TeamDescription = ObjectTeamName(GetObj.Table(thisobject))
	local PlayerNumber = gsub(TeamDescription, "%a+%p+", "")
	local PlayerStart = "Player_" .. PlayerNumber .. "_Start"  
	return PlayerStart
end

function GetPlayerStartWaypointByTeam(team)
	return strsub(team, 1, 8) .. "_Start"  
end

function GetPlayerStartWaypointFromTeamNumber(teamnumber)
	return "Player_" .. teamnumber .. "_Start"  
end

function AreaFinder() --get Area --only concept function
	local AreaTable_ = { "SiegeGameplayBarrier", "CombatZone", "InnerPerimeter1", "InnerPerimeter2", "InnerPerimeter3", "InnerPerimeter4", "InnerPerimeter5", "InnerPerimeter6", "InnerPerimeter7", "InnerPerimeter8", "OuterPerimeter1", "OuterPerimeter2", "OuterPerimeter3", "OuterPerimeter4", "OuterPerimeter5", "OuterPerimeter6", "OuterPerimeter7", "OuterPerimeter8", "Water Grid", "[Skirmish]EnemyInnerPerimeter", "[Skirmish]EnemyOuterPerimeter", "[Skirmish]MyInnerPerimeter", "[Skirmish]MyOuterPerimeter"}
	local AreasExistent = {}
	for i=1,getn(AreaTable_),1 do
		if EvaluateCondition("SKIRMISH_NAMED_AREA_EXIST", Player, AreaTable_[i]) then
			tinsert(AreasExistent, AreaTable_[i])
		end
	end
	AreaTable=AreaTable_
	return AreasExistent
end

MapName = {["0"]="UnknownMap",["6290"]="Barstow Badlands",["1133020"]="The Rocktagon",["360231"]="Bordertown Beatdown"} --unfinished

function GetMapIdentNumber()
	local WorldBuilderObjects=CreateListOfAllWorldBuilderObjects()
	local MapIdentNumber = 0
	for i=1,getn(WorldBuilderUseableObjects),1 do
		for j=1,getn(WorldBuilderObjects[WorldBuilderUseableObjects[i]]),1 do
			if getn(WorldBuilderObjects[WorldBuilderUseableObjects[i]]) >= (j+1) then
				MapIdentNumber = MapIdentNumber + GetObjectDistance(WorldBuilderObjects[WorldBuilderUseableObjects[i]][j] ,WorldBuilderObjects[WorldBuilderUseableObjects[i]][j+1])
			end
		end
	end
	return MapIdentNumber
end

function GetMapName()
	return MapName[tostring(GetMapIdentNumber())]
end

--------------------------------------------------------------------------

function CreateWorldBuilderUseableObjectsTable()
	local TREF=""
	for i=1,getn(WorldBuilderObjectTypeTable),1 do
	    TREF = spawn(WorldBuilderObjectTypeTable[i])
		if GetObj.AliveState(TREF) then tinsert(WorldBuilderUseableObjects,WorldBuilderObjectTypeTable[i]) delete(TREF) end
	end
end

function CreatePlantObjectsTable()
	if getn(WorldBuilderUseableObjects)<1 then CreateWorldBuilderUseableObjectsTable() end
	for i=1,getn(WorldBuilderUseableObjects),1 do
	    if strfind(strlower(WorldBuilderUseableObjects[i]),"tree") or strfind(strlower(WorldBuilderUseableObjects[i]),"bush") or strfind(strlower(WorldBuilderUseableObjects[i]),"shrub") then
			tinsert(PlantObjects,WorldBuilderUseableObjects[i])
		end
	end
end

WorldBuilderObjectsList={}
function CreateListOfAllWorldBuilderObjects()
	local ObjRef=""
	local WorldBuilderObjects={}
	local TeamSource=CivilianTeam
	local TeamTemp=NeutralTeam
	if getn(WorldBuilderUseableObjects)<1 then CreateWorldBuilderUseableObjectsTable() end
	for i=1,getn(WorldBuilderUseableObjects),1 do
		WorldBuilderObjects[WorldBuilderUseableObjects[i]]={}
		repeat
			ObjRef=RandomString(5)
			ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",WorldBuilderUseableObjects[i],TeamSource,ObjRef)
			if EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef) then 
				tinsert(WorldBuilderObjects[WorldBuilderUseableObjects[i]],ObjRef)
				ExecuteAction("UNIT_SET_TEAM",ObjRef,TeamTemp)  
			end--else break end
		until(not EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef))	
	end
	for i=1,getn(WorldBuilderUseableObjects),1 do
		for j=1,getn(WorldBuilderObjects[WorldBuilderUseableObjects[i]]),1 do
		    ExecuteAction("UNIT_SET_TEAM",WorldBuilderObjects[WorldBuilderUseableObjects[i]][j],TeamSource)  
		end
	end
	WorldBuilderObjectsList=WorldBuilderObjects
	return WorldBuilderObjects
end

function DeleteAllWorldBuilderObjects()
	WorldBuilderObjects=CreateListOfAllWorldBuilderObjects()
	for i=1,getn(WorldBuilderUseableObjects),1 do
		for j=1,getn(WorldBuilderObjects[WorldBuilderUseableObjects[i]]),1 do
			delete(WorldBuilderObjects[WorldBuilderUseableObjects[i]][j])
		end
	end
end

--------------------------------------------------------------------------
--------------------------------------------------------------------------
--------------------------------------------------------------------------

function GetTeamDistance(team1 ,team2)
	if team1==nil or team2==nil or EvaluateCondition("TEAM_DESTROYED",team1) or EvaluateCondition("TEAM_DESTROYED",team2) then return 0 end
	local v = {}
	v.GetDistance = function(lowerlimit,upperlimit)
		local mid=(upperlimit+lowerlimit)/2
		if upperlimit-lowerlimit<=1 then return lowerlimit
			elseif EvaluateCondition("DISTANCE_BETWEEN_TEAM", %team1, %team2, CompareTable["<"], mid) then return %v.GetDistance(lowerlimit,mid)
		else return round(%v.GetDistance(mid,upperlimit)) end
	end
	return v.GetDistance(0,12870)
end

function GetObjectDistance(object1 ,object2, start_distance)
	if object1==nil or object2==nil or not EvaluateCondition("NAMED_NOT_DESTROYED",object1) or not EvaluateCondition("NAMED_NOT_DESTROYED",object2) then return 0 end
	object1=GetObj.String(object1)
	object2=GetObj.String(object2)
	local v = {}
	v.GetDistance = function(lowerlimit,upperlimit)
		local mid=(upperlimit+lowerlimit)/2
		if upperlimit-lowerlimit<=1 then return lowerlimit
			elseif EvaluateCondition("DISTANCE_BETWEEN_OBJ", %object1, %object2, CompareTable["<"], mid) then return %v.GetDistance(lowerlimit,mid)
		else return round(%v.GetDistance(mid,upperlimit)) end
	end
	if start_distance then return v.GetDistance(0,tonumber(start_distance)) 
	else return v.GetDistance(0,12870) end   --maxdiagsize=ceil(sqrt(2*(7500+2*800)^2)))
end

function GetObjectDistanceOLD(input1 ,input2)
	if input1==nil or input2==nil or not EvaluateCondition("NAMED_NOT_DESTROYED",input1) or not EvaluateCondition("NAMED_NOT_DESTROYED",input2) then return 0 end
	for i=0,12870,1 do --maxdiagsize=ceil(sqrt(2*(7500+2*800)^2)))
		if EvaluateCondition("DISTANCE_BETWEEN_OBJ", input1, input2, CompareTable["<"], i) then 
			return i-1
		end 
	end
	return 0
end

function GetObj.AliveState(Object)
	if Object==nil or not EvaluateCondition("NAMED_NOT_DESTROYED",GetObj.String(Object)) then --or GetObj.Table(Object)==nil or EvaluateCondition("TEAM_DESTROYED", GetTeamName(Object)) then
		return false
	else 
		return true
	end
end

function GetObj.Number(object)
	return tostring(tonumber(strsub(ObjectDescription(GetObj.Table(object)),8,10)))
end

function GetHealth(input,HealthType)     ---GetObj.Health
	local HealthCompareType = ""
	if HealthType == nil or HealthType == "unit" or HealthType == 1 then HealthCompareType = "UNIT_HEALTH"
	else HealthCompareType = "EVAL_TEAM_HEALTH" end
	for i=1,101,1 do	
		if EvaluateCondition(HealthCompareType, input, CompareTable["<"], i) then return i-1 end
	end
	return 0
end

function GetSpecialPowerReadyTable(object)
	local table = {}
	for i=1,getn(SpecialPowerNameTable),1 do
		if EvaluateCondition("UNIT_SPECIAL_POWER_READY",GetObj.String(object),SpecialPowerNameTable[i]) then
			tinsert(table,SpecialPowerNameTable[i])
		end
	end
	return table
end

function GetUpgradesTable(object)
	local table = {}
	for i=1,getn(UpgradeNameTable),1 do
		if EvaluateCondition("UNIT_HAS_UPGRADE",GetObj.String(object),UpgradeNameTable[i]) then
			tinsert(table,UpgradeNameTable[i])
		end
	end
	return table
end

function GetObjectStatusTable(object)
	local table = {}
	for i=0,getn(ObjectStatusIndexTable)-1,1 do
		if EvaluateCondition("UNIT_HAS_OBJECT_STATUS", GetObj.String(object), i) then
			tinsert(table,ObjectStatusIndexTable[i+1])
		end
	end
	return table
end

function GetThreadLevelOfUnit(Object,radius)
    if radius == nil then radius = 13000 end
    for i=1,101,1 do	
		if EvaluateCondition("UNIT_THREAT_LEVEL",Object,CompareTable["<"],i,radius) then return i-1 end
	end
end

function GetRank(Object)   
	for i=1,5,1 do	
		if EvaluateCondition("UNIT_COMPARE_RANK", Object, CompareTable["<"], i) then return i-1 end  --EvaluateCondition("NAMED_RANK_LEVEL",)
	end
	return 0
end

function GetSkillPoints(Object)   
	for i=1,101,1 do	
		if EvaluateCondition("UNIT_HAS_NUM_SKILL_POINTS", Object, CompareTable["<"], i) then return i-1 end
	end
	return 0
end

function GetObjectPanelFlagsTable(Object)
    local table = {}
	for i=1,getn(ObjectPanelFlagsTable),1 do	
		if EvaluateCondition("UNIT_TEST_OBJECT_PANEL_FLAGS", ObjectPanelFlagsTable[i], Object) then 
			tinsert(table,ObjectPanelFlagsTable[i]) 
		end
	end
	return table
end

function GetModelConditionTable(Object)
    local table = {}
	for i=1,getn(ModelConditionTable),1 do	
		if ObjectTestModelCondition(Object,ModelConditionTable[i]) then 
			tinsert(table,ModelConditionTable[i]) 
		end
	end
	return table
end

function UnitHasPassengers(Object)
	if EvaluateCondition("UNIT_HAS_PASSENGER",Object) then return 1 else return 0 end
end

function GetObjectOrientationAngle(Object)
	return 0 --return random(0,360)
	-- if ObjectTestModelCondition(GetObj.Table(Object),"TURRET_ANGLE_0") then return 0
	-- elseif ObjectTestModelCondition(GetObj.Table(Object),"TURRET_ANGLE_90") or ObjectTestModelCondition(GetObj.Table(alpha),"TURN_LEFT") then return 90
	-- elseif ObjectTestModelCondition(GetObj.Table(Object),"TURRET_ANGLE_180") or ObjectTestModelCondition(GetObj.Table(alpha),"TURN_RIGHT") then return 180
	-- elseif ObjectTestModelCondition(GetObj.Table(Object),"TURRET_ANGLE_270") then return 270
	-- else return 0
	-- end
	--ExecuteAction("NAMED_FACE_NAMED",Unit1,Unit2) 
	--mit DamageIncoming (self, other, delay, amount), arc in weapon
	--ExecuteAction("NAMED_ENTER_NAMED",)
end

function GetObjectsKindOf(Object)  --avoid use, rather inefficient i guess
	local TeamSource=GetTeamName(Object)
	local kindofcounter1=0
	local kindofcounter2=0 
	for i=1,getn(KindOfIndexTable),1 do
		kindofcounter1=CountTeamsKindOf(team,KindOfIndexTable[i])
		ExecuteAction("UNIT_SET_TEAM",Object,NeutralTeam)
		kindofcounter2=CountTeamsKindOf(team,KindOfIndexTable[i])
		ExecuteAction("UNIT_SET_TEAM",Object,TeamSource)
		if kindofcounter1~=kindofcounter2 then return KindOfIndexTable[i] end
	end
	return "unknown"
end

function IsObjectTypeInsideBaseOfObject(ObjectType,ObjectRef)
	return EvaluateCondition("OBJECT_OF_TYPE_OR_LIST_INSIDE_REFD_BASE",ObjectType,ObjectRef)
end

function GetTeamThreadLevel(team) --usually between 5 and 21
	for i=1,1000,1 do	
		if EvaluateCondition("TEAM_THREAT_LEVEL", team, CompareTable["LT"], i, 15000) then
			return (i-1)
		end
	end
	return 0
end

-------------------------------------------------------------
------------------COUNT OBJECTS------------------------------
-------------------------------------------------------------

function CountTeamsKindOf(team, kindof)  --by bisection method
	local KindOf_
	if type(kindof) == "number" then KindOf_=kindof --KindOfIndexTable[kindof+1]
		elseif type(kindof) == "string" then KindOf_=KindOfTable[kindof]
		if KindOf_==nil then KindOf_=KindOfIndexTable[GetIndexOfTableElement(KindOfIndexTable,kindof)-1] end
	end
	local sc=0  --security counter to avoid infinite loops
	local lower, upper, middle
	upper=1
	while not EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, upper, KindOf_) do
		upper=upper*10
		sc=sc+1 if sc >=100000 then return 0 end
	end
	while EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, floor(upper/2), KindOf_) do
		upper=floor(upper/2)
		sc=sc+1 if sc >=100000 then return 0 end
	end
    lower=floor(upper/2)
	while (upper-lower)>1 do 
		middle=(upper+lower)/2
		if EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, ceil(middle), KindOf_) then upper=ceil(middle)
		else lower=floor(middle) end
		sc=sc+1 if sc >=100000 then return 0 end
	end   
	middle=ceil((upper+lower)/2)
	if EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, middle, KindOf_) then return lower
	else return upper end
end

function CountAllKindOfsOfTeam(...) --team,kindof1,kinof2,...
	local count = 0
	for i=2,getn(arg),1 do
		count = count + CountTeamsKindOf(arg[1],arg[i])
	end
	return count
end

function CountAllObjectsOfTeam(team)
    local RelevantKindOf = {"STRUCTURE","VEHICLE","AIRCRAFT","INFANTRY"} --"NO_COLLIDE"
	local count = 0
	for i=1,getn(RelevantKindOf),1 do
		count = count + CountTeamsKindOf(team,RelevantKindOf[i])
	end
	return count
end

function CountAllObjects()
	local count = 0
	for i=1,getn(GlobalTeamTable),1 do
		count = count + CountAllObjectsOfTeam(GlobalTeamTable[i])
	end
	return count
end

function CountObjectType(ObjectType) 
	local count=0
	for i=1,getn(GlobalTeamTable),1 do
		count=count+CountObjectTypeOfTeam(ObjectType,GlobalTeamTable[i]) 
	end
	return count
end

function CountObjectTypeOfTeam(ObjectType,team) --todo: first if for global table objects
	local TempObjectRefTable = {}
	local ObjRef = ""
	local ObjectTypeCounter=0 
	local VictCondHelperRef = RandomString(5)
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", VictCondHelperRef, VictoryConditionHelper, team, "((0.00,0.00,0.00))", 0)
	repeat
		ObjRef=RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",ObjectType,team,ObjRef)
		if EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef) then 
			tinsert(TempObjectRefTable,ObjRef)
			ExecuteAction("UNIT_SET_TEAM",ObjRef,NeutralTeam) 
			ObjectTypeCounter=ObjectTypeCounter+1
		else break end
	until(not EvaluateCondition("NAMED_NOT_DESTROYED",ObjRef))
	for i=1,getn(TempObjectRefTable),1 do
		ExecuteAction("UNIT_SET_TEAM",TempObjectRefTable[i],team)
	end
	ExecuteAction("NAMED_DELETE",VictCondHelperRef)
	return ObjectTypeCounter
end

function CountTeamsKindOfSlow(team, kindof)
	for i=1,7777,1 do	
		if EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, i, KindOfTable[kindof]) then
			return (i-1)
		end
	end
	return 0
end

function GetNumberOfAllEnemiesForKindOf(ownteam, KindOf)
	local count=0
	for t=1,getn(GlobalTeamTable),1 do 
		if TeamRelations[ownteam][GlobalTeamTable[t]] == 0 then
			count = count + CountTeamsKindOf(GlobalTeamTable[t], KindOf)
		end
	end
	return count 
end

function GetNumberOfAllEnemyUnits(ownteam)
	local count=0
	for t=1,getn(GlobalTeamTable),1 do 
		if TeamRelations[ownteam][GlobalTeamTable[t]] == 0 then
			count = count + CountTeamsKindOf(GlobalTeamTable[t], "VEHICLE") + CountTeamsKindOf(GlobalTeamTable[t], "INFANTRY") + CountTeamsKindOf(GlobalTeamTable[t], "AIRCRAFT")
		end
	end
	return count 
end

function GetNumberOfAllEnemyUnits2(ownteam)
	local TRef=spawn(GenericDummy,ownteam) 
	local count = ObjectCountNearbyEnemies(GetObj.Table(TRef),13000)
	delete(TRef)
	return count
end

function GetObjectTypeListOfKindOfList(ObjectTypeTable,kindoflist)
	local TempTeam=CivilianTeam
	local ResultTable={}
	local TREF = ""
	local kindofcounter1=0
	local kindofcounter2=0
	local MatchCountTable = {}
	for i=1,getn(ObjectTypeTable),1 do
		MatchCountTable[ObjectTypeTable[i]] = 0
	end
	for j=1,getn(kindoflist),1 do
		for i=1,getn(ObjectTypeTable),1 do
			if MatchCountTable[ObjectTypeTable[i]] == j-1 or j==1 then
				if ObjectTypeTable[i]~="DwarvenMagicDoor" and ObjectTypeTable[i]~="WildMineShaft" then
					TREF=spawn(ObjectTypeTable[i],TempTeam)
					kindofcounter1=CountTeamsKindOf(TempTeam,kindoflist[j])
					ExecuteAction("UNIT_SET_TEAM",TREF,NeutralTeam)
					kindofcounter2=CountTeamsKindOf(TempTeam,kindoflist[j])
					delete(TREF)
					if kindofcounter1~=kindofcounter2 then 
						MatchCountTable[ObjectTypeTable[i]]=MatchCountTable[ObjectTypeTable[i]]+1
						if MatchCountTable[ObjectTypeTable[i]]==getn(kindoflist) then
							tinsert(ResultTable,ObjectTypeTable[i]) 
						end
					end
				end
			end
		end
	end
	return ResultTable
end

function PrintTable(table)
	local str = ""
	for i=1,getn(table),1 do
		str = str .. table[i] .. "\n"
	end
	out(str)
end

---------------------------------------------------------------------------------
--------------------COUNTERS AND TIMERS------------------------------------------
---------------------------------------------------------------------------------
GCounter_init = false
--GENERIC_DUMMY = "GDIHarvester"

function InitializeGCounters()
	if not GCounter_init then
		if not GENERIC_DUMMY then GENERIC_DUMMY = "GDIHarvester" end --"MenPorter"
		local INIT_BASE_COUNTER = "temp_counter_2342"
		CounterTable = { [0]="GCounter0", [1]="GCounter1", [2]="GCounter2", [3]="GCounter3", [4]="GCounter4", [5]="GCounter5", [6]="GCounter6", [7]="GCounter7", [8]="GCounter8", [9]="GCounter9", [10]="GCounter10"  }
		local CounterBaseDummyRef = "object_" .. floor(GetRandomNumber()*99999999)
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", CounterBaseDummyRef, GENERIC_DUMMY, NeutralTeam, 0, 0)
		--ExecuteAction("DISPLAY_COUNTER", INIT_BASE_COUNTER, "INIT")
		ExecuteAction("SET_UNIT_EXPERIENCE_TO_COUNTER", CounterBaseDummyRef, INIT_BASE_COUNTER)
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[1], MathOpTable["Add"], INIT_BASE_COUNTER)
		ExecuteAction("NAMED_DELETE", CounterBaseDummyRef)	
		ExecuteAction("SET_COUNTER", CounterTable[0], 0)	
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[2], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[2], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[3], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[3], MathOpTable["Add"], CounterTable[2])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[4], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[4], MathOpTable["Add"], CounterTable[3])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[5], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[5], MathOpTable["Add"], CounterTable[4])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[6], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[6], MathOpTable["Add"], CounterTable[5])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[7], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[7], MathOpTable["Add"], CounterTable[6])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[8], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[8], MathOpTable["Add"], CounterTable[7])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[9], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[9], MathOpTable["Add"], CounterTable[8])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[10], MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", CounterTable[10], MathOpTable["Add"], CounterTable[9])
		ExecuteAction("COUNTER_MATH_COUNTER", GTempCounter1, MathOpTable["Multiply"], CounterTable[10])
		ExecuteAction("COUNTER_MATH_COUNTER", GTempCounter2, MathOpTable["Add"], CounterTable[1])
		ExecuteAction("COUNTER_MATH_COUNTER", GTempCounter3, MathOpTable["Add"], CounterTable[1])
		--ExecuteAction("HIDE_COUNTER", INIT_BASE_COUNTER)
		GCounter_init = true
	end
end

function IncrementCounter(counter)
	ExecuteAction("COUNTER_MATH_COUNTER", counter, MathOpTable["Add"], CounterTable[1])
end

function DecrementCounter(counter)
	ExecuteAction("COUNTER_MATH_COUNTER", counter, MathOpTable["Subtract"], CounterTable[1])
end

function HideCounter(counter)
	ExecuteAction("HIDE_COUNTER", counter)
end

function GetCounterValueFast(counter)
	local CounterRefLowerLimit = RandomString(3)
	local CounterRefUpperLimit = CounterRefLowerLimit .. "_Upper"
	local CounterRefMiddle = CounterRefLowerLimit .. "_Middle"
	local LowerValue = 0
	local UpperValue = 1
	if EvaluateCondition("COUNTER_COUNTER", counter, CompareTable["EQ"], CounterTable[0]) then return 0 end
	ExecuteAction("COUNTER_MATH_COUNTER", CounterRefUpperLimit, MathOpTable["Add"], CounterTable[1])
	ExecuteAction("SET_COUNTER", CounterRefLowerLimit, 0)	
	while EvaluateCondition("COUNTER_COUNTER", counter, CompareTable["GE"], CounterRefUpperLimit) do 
		ExecuteAction("COUNTER_MATH_COUNTER", CounterRefUpperLimit, MathOpTable["Multiply"], CounterTable[10])	
		UpperValue = UpperValue *10
	end
	local v = {}
	v.GetCounterValue = function(LowerLimitValue, UpperLimitValue, LowerLimitCounter, UpperLimitCounter)
		if (UpperLimitValue - LowerLimitValue) <=1 then 
			--ExecuteAction("COUNTER_MATH_COUNTER", LowerLimitCounter, MathOpTable["Subtract"], CounterTable[1])
			if EvaluateCondition("COUNTER_COUNTER", %counter, CompareTable["EQ"], LowerLimitCounter) then return LowerLimitValue
				else return LowerLimitValue - 1
			end
		end
		local MiddleCounter = RandomString(3)
		ExecuteAction("SET_COUNTER", MiddleCounter, 0)
		ExecuteAction("COUNTER_MATH_COUNTER", MiddleCounter, MathOpTable["Add"], LowerLimitCounter)
		ExecuteAction("COUNTER_MATH_COUNTER", MiddleCounter, MathOpTable["Add"], UpperLimitCounter)
		ExecuteAction("COUNTER_MATH_COUNTER", MiddleCounter, MathOpTable["Divide"], CounterTable[2])
		local MiddleValue = (LowerLimitValue + UpperLimitValue)/2			
		if EvaluateCondition("COUNTER_COUNTER", %counter, CompareTable["<="], MiddleCounter) then return %v.GetCounterValue(LowerLimitValue,MiddleValue,LowerLimitCounter,MiddleCounter)
		else return round(%v.GetCounterValue(MiddleValue,UpperLimitValue,MiddleCounter,UpperLimitCounter)) end
	end
	v.GetExactCounterValue = function(ApproxValue,AppoxCounter)
		ExecuteAction("COUNTER_MATH_COUNTER", AppoxCounter, MathOpTable["Subtract"], CounterTable[10])	
		for i=1,20,1 do
			ExecuteAction("COUNTER_MATH_COUNTER", AppoxCounter, MathOpTable["Add"], CounterTable[1])
			if EvaluateCondition("COUNTER_COUNTER", %counter, CompareTable["EQ"], AppoxCounter) then return (ApproxValue-10+i) end
		end
		return ApproxValue
	end
	return v.GetCounterValue(LowerValue,UpperValue,CounterRefLowerLimit,CounterRefUpperLimit)
end

function GetCounterValueSlow(counter)
	local refCounter = "object_" .. floor(GetRandomNumber()*99999999+0.5)
	ExecuteAction("SET_COUNTER", refCounter, 0)
	local i = 0
	while EvaluateCondition("COUNTER_COUNTER", counter, CompareTable["NE"], refCounter) do	 
		ExecuteAction("COUNTER_MATH_COUNTER", refCounter, MathOpTable["Add"], CounterTable[1])
		i=i+1
	end
	return i
end

function GetCounterValue(counter)
	local refCounter = "counter_" .. floor(GetRandomNumber()*99999999+0.5)
	ExecuteAction("SET_COUNTER", refCounter, 0)
	if EvaluateCondition("COUNTER_COUNTER", counter, CompareTable["EQ"], CounterTable[0]) then 
		return 0 
	end
	local value = 1
	ExecuteAction("COUNTER_MATH_COUNTER", refCounter, MathOpTable["Add"], CounterTable[1])
	ExecuteAction("SET_COUNTER", CounterRefLowerLimit, 0)	
	while EvaluateCondition("COUNTER_COUNTER", counter, CompareTable["GE"], refCounter) do 
		ExecuteAction("COUNTER_MATH_COUNTER", refCounter, MathOpTable["Multiply"], CounterTable[10])	
		value = value * 10
		if value > 100000000 then return "error1" end
	end
	while EvaluateCondition("COUNTER_COUNTER", counter, CompareTable["NE"], refCounter) do	 
		ExecuteAction("COUNTER_MATH_COUNTER", refCounter, MathOpTable["Subtract"], CounterTable[1])
		value = value - 1
		if value < 0 then return "error1" end
	end
	return value
end

function SetCounterToCounter(counter1,counter2)
	ExecuteAction("COUNTER_MATH_COUNTER", counter1, MathOpTable["Add"], CounterTable[1])
    ExecuteAction("COUNTER_MATH_COUNTER", counter1, MathOpTable["Divide"], counter1)
    ExecuteAction("COUNTER_MATH_COUNTER", counter1, MathOpTable["Multiply"], counter2)	
end

function SetCounter(counter, value, text, no_display)
	if type(value) ~= "number" then PrintError("SetCounter - wrong value type") return end
	InitializeGCounters()
	ExecuteAction("COUNTER_MATH_COUNTER", counter, MathOpTable["Add"], CounterTable[1])
	ExecuteAction("COUNTER_MATH_COUNTER", counter, MathOpTable["Divide"], counter)
	ExecuteAction("COUNTER_MATH_COUNTER", counter, MathOpTable["Subtract"], CounterTable[1])
	local Tvalue = value
	if Tvalue == 0 then ExecuteAction("DISPLAY_COUNTER", counter, text) return end
	local length = floor(log10(Tvalue)+1)
	ExecuteAction("COUNTER_MATH_COUNTER", counter, MathOpTable["Add"], CounterTable[mod(Tvalue,10)]) 
	Tvalue = floor(Tvalue/10)
	for i=1,length-1,1 do
		ExecuteAction("COUNTER_MATH_COUNTER", GTempCounter1, MathOpTable["Add"],  CounterTable[1]) 
		ExecuteAction("COUNTER_MATH_COUNTER", GTempCounter1, MathOpTable["Divide"], GTempCounter1)    
		for j=1,i,1 do
			ExecuteAction("COUNTER_MATH_COUNTER", GTempCounter1, MathOpTable["Multiply"], CounterTable[10])
		end
		ExecuteAction("COUNTER_MATH_COUNTER", GTempCounter1, MathOpTable["Multiply"], CounterTable[mod(Tvalue,10)])
		ExecuteAction("COUNTER_MATH_COUNTER", counter, MathOpTable["Add"], GTempCounter1)
		Tvalue = floor(Tvalue/10)
	end
	if not no_display then if not text then text = "APT:Num" end ExecuteAction("DISPLAY_COUNTER", counter, text) end
end

function SetTimerCounter(value, text, counter)
	if counter == nil then counter = RandomString(3) end
	if text == nil then text = "APT:Num" end
	TimerTable[counter] = value
	SetCounter(counter, value, text)
	ExecuteAction("DISPLAY_COUNTER", counter, text)
	--tinsert(TimerRefresherTable, counter .. "TimerRefresher")
	--local CounterBaseDummyRef = RandomString(3) 
	if NumberTimers == 0 then
		SetScriptTimer(1,TimerCounterRefresh,-1)
	end
	NumberTimers = NumberTimers + 1
end

function SetTimerCounterOld(value, text, counter)
	if counter == nil then counter = RandomString(3) end
	if text == nil then text = "APT:Num" end
	TimerTable[counter] = value
	SetCounter(counter, value, text)
	ExecuteAction("DISPLAY_COUNTER", counter, text)
	--tinsert(TimerRefresherTable, counter .. "TimerRefresher")
	--local CounterBaseDummyRef = RandomString(3) 
	if NumberTimers == 0 then
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", TimerCounterCheckerRef, "TimerCounterChecker", NeutralTeam, "((0.00,0.00,0.00))", 0)
	end
	NumberTimers = NumberTimers + 1
end

function TimerCounterRefresh(self)
	for counter,value in TimerTable do
		if counter~="n" then
			if value == 0 then 
				ExecuteAction("HIDE_COUNTER", counter) 
				--tremove(TimerTable, counter)
				TimerTable[counter] = nil
				NumberTimers = NumberTimers - 1
				if NumberTimers <= 0 then 
					DeleteScriptTimerAction(TimerCounterRefresh) 
				end	
				break	
			elseif value == 1201 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[20])
			elseif value == 901 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[15])
			elseif value == 601 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[10])
			elseif value == 301 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[5])
			elseif value == 181 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[3])
			elseif value == 61 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[1])
			elseif value == 31 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerSec[30])
			elseif value == 11 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerSec[10])
			elseif value == 4 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerCount[3])		  
			elseif value == 3 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerCount[2])	
			elseif value == 2 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerCount[1])    
			end
			ExecuteAction("COUNTER_MATH_COUNTER", counter, MathOpTable["Subtract"], CounterTable[1])
			TimerTable[counter] = TimerTable[counter] - 1
		end
	end
end

function CountdownSpeechCheck(countdown)
	if countdown == 1200 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[20])
	elseif countdown == 900 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[15])
	elseif countdown == 600 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[10])
	elseif countdown == 300 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[5])
	elseif countdown == 180 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[3])
	elseif countdown == 60 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerMin[1])
	elseif countdown == 30 then ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerSec[30])	
	elseif countdown <= 10 then
		ExecuteAction("PLAY_SOUND_EFFECT", VoiceTimerCount[countdown])
	end
end

function DeleteTimerCounter(timer)
	TimerTable[counter] = nil
	NumberTimers = NumberTimers - 1
	--tremove(TimerTable,timer)
	ExecuteAction("HIDE_COUNTER",timer)
end

function ResetTimerCounter(timer,value)
	TimerTable[timer] = value
end

function StopTimer(self)  --conceptual
    ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", self, "Enabled", 0) 	
    ExecuteAction("NAMED_SET_HELD", self, 1)
end	

function ToggleScriptTimer(self) --conceptual
    ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", self, "Enabled", 0) 	
    ExecuteAction("NAMED_SET_HELD", self, 1)
end	

ScriptTimerTable = {}
ScriptTimerTableFast = {}
ScriptTimerAlive=false
ScriptTimerFastAlive=false
ScriptTimerRef=nil
ScriptTimerRefFast=nil

function SetScriptTimer(time,action,loops,condition)   --loops = 0 or -1 = infinite loops
	local size = getn(ScriptTimerTable)+1
	if size == 1 then ScriptTimerTable = {}
	else ScriptTimerTable['n']=getn(ScriptTimerTable)+1 end
	ScriptTimerTable[size]={} 
	tinsert(ScriptTimerTable[size],"time")
	ScriptTimerTable[size]["time"]=floor(time)
	ScriptTimerTable[size]["starttime"]=ScriptTimerTable[size]["time"]
	ScriptTimerTable[size]["action"]=action
	--if condition ~= nil then ScriptTimerTable[size]["condition"]=condition end
	if loops ~= nil then ScriptTimerTable[size]["loops"]=loops
	else ScriptTimerTable[size]["loops"]=1 end
	--tinsert(ScriptTimerTable,action)
	if not EvaluateCondition("NAMED_NOT_DESTROYED", "ScriptTimerRef") or not ScriptTimerAlive then
		--ScriptTimerRef=RandomString(4)
		ScriptTimerAlive=true
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "ScriptTimerRef", "ScriptTimer", NeutralTeam, "((0.00,0.00,0.00))", 0)
	end
end

function ScriptTimerTest(self)  
	ScriptTimerRef = self
	if getn(ScriptTimerTable) == 0 then 
		ScriptTimerAlive=false
		ExecuteAction("NAMED_DELETE", self) 
		return 
	end
	local i = 1
	while (i <= getn(ScriptTimerTable)) do
		if ScriptTimerTable[i] ~= nil then
			if ScriptTimerTable[i]["time"] == 0 then 
				if type(ScriptTimerTable[i]["action"])=="string" then dostring(ScriptTimerTable[i]["action"])
				else ScriptTimerTable[i]["action"]() end 
				if ScriptTimerTable[i]["loops"] ~= -1 then ScriptTimerTable[i]["loops"]=ScriptTimerTable[i]["loops"]-1 end
				if ScriptTimerTable[i]["loops"] == 0 then tremove(ScriptTimerTable,i) --or (ScriptTimerTable[i]["condition"]==0 or ScriptTimerTable[i]["condition"]==nil) 
				else 
					ScriptTimerTable[i]["time"]=ScriptTimerTable[i]["starttime"] 
					i=i+1
				end
			else
				ScriptTimerTable[i]["time"]=ScriptTimerTable[i]["time"]-1 
				i=i+1	  
			end   
		else i=i+1 end	
	end
end

function SetDelayed(func)
	SetScriptTimer(0.01,func)
end

function DeleteScriptTimerAction(action)
	local Removeables = {}
	for i=1,getn(ScriptTimerTable),1 do
		if action==ScriptTimerTable[i]["action"] then
			tinsert(Removeables, i)
		end
	end
	for i=1,getn(Removeables),1 do
		tremove(ScriptTimerTable, Removeables[i]) 	
	end
end

function DeleteScriptTimerFastAction(action)
	for i=1,getn(ScriptTimerTableFast),1 do
		if action==ScriptTimerTableFast[i]["action"] then tremove(ScriptTimerTableFast,i) return end
	end
end

function DeleteScriptTimer()
	ExecuteAction("NAMED_DELETE", ScriptTimerRef)
end

function DeleteScriptTimerFast()
	ExecuteAction("NAMED_DELETE", "ScriptTimerFastRef")
end

function DelayedScriptTimerDeletion()
	if getn(ScriptTimerTable) == 0 then 
		ExecuteAction("NAMED_DELETE", "ScriptTimerRef") 
		return 
	end
end

function SetScriptTimerFast(time,action,loops)   --loops = 0 or -1 = infinite loops
	local size = getn(ScriptTimerTableFast)+1
	if size == 1 then ScriptTimerTableFast = {}
	else ScriptTimerTableFast['n']=getn(ScriptTimerTableFast)+1 end
	ScriptTimerTableFast[size]={} 
	tinsert(ScriptTimerTableFast[size],"time")
	ScriptTimerTableFast[size]["time"]=time
	ScriptTimerTableFast[size]["starttime"]=ScriptTimerTableFast[size]["time"]
	ScriptTimerTableFast[size]["action"]=action
	if loops ~= nil then ScriptTimerTableFast[size]["loops"]=loops
	else ScriptTimerTableFast[size]["loops"]=1 end
	--tinsert(ScriptTimerTableFast,action)
	if not EvaluateCondition("NAMED_NOT_DESTROYED", "ScriptTimerFastRef") or not ScriptTimerFastAlive then
		--ScriptTimerRef=RandomString(4)
		ScriptTimerFastAlive=true
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "ScriptTimerFastRef", "ScriptTimerFast", NeutralTeam, "((0.00,0.00,0.00))", 0)
	end
end

function ScriptTimerFastTest(self)  
	ScriptTimerRefFast=self
	if getn(ScriptTimerTableFast) == 0 then 	 
		ScriptTimerFastAlive=false 
		ExecuteAction("NAMED_DELETE", self) 
		return
	end
	local i = 1
	while (i <= getn(ScriptTimerTableFast)) do
		if ScriptTimerTableFast[i] ~= nil then
			if ScriptTimerTableFast[i]["time"] <= 0 then 
				if type(ScriptTimerTableFast[i]["action"])=="string" then dostring(ScriptTimerTableFast[i]["action"])
				else ScriptTimerTableFast[i]["action"]() end 
				if ScriptTimerTableFast[i]["loops"] ~= -1 then ScriptTimerTableFast[i]["loops"]=ScriptTimerTableFast[i]["loops"]-1 end
				if ScriptTimerTableFast[i]["loops"] == 0 then tremove(ScriptTimerTableFast,i)
					else 
					ScriptTimerTableFast[i]["time"]=ScriptTimerTableFast[i]["starttime"] 
					i=i+1
				end 	  
				else 
				ScriptTimerTableFast[i]["time"]=ScriptTimerTableFast[i]["time"]-0.01 
				i=i+1	  
			end   
		else i=i+1 end	
	end
end

---------------------

TaskStack = {}
TaskStackProcessing=0

function push(Task)
	local n = getn(TaskStack)
	TaskStack.n = n+1
	n = getn(TaskStack)
	TaskStack[n]={}
	TaskStack[n]["task"]=Task
	if TaskStackProcessing==0 then
		ProcessTaskStack()
		--SetScriptTimer(1,"ProcessTaskStack()",-1)
	end
end

function pop(Task)
	if getn(TaskStack) == 0 then return
		elseif Task == nil then --remove first element
		tremove(TaskStack,1)
		TaskStackProcessing=0
		ProcessTaskStack()
		else
		for i=1,getn(TaskStack),1 do
			if TaskStack[i]["task"]==Task then 
				tremove(TaskStack,i) 
				return
			end
		end
	end
end

function ProcessTaskStack()
	if getn(TaskStack) == 0 or TaskStackProcessing==1 then return
		else 
		TaskStackProcessing=1
		if type(TaskStack[1]["task"]) == "string" then
			dostring(TaskStack[1]["task"]) 
			elseif type(TaskStack[1]["task"]) == "function" then
			TaskStack[1]["task"]()
		end
	end
end 

---------------------------------------------------------------------------------
--------------------SANDBOX COMMANDS---------------------------------------------
---------------------------------------------------------------------------------

function spawn(ObjectType,team,number,ref,waypoint,ActionOnObject,OnObjectType)
	if number == 0 or ObjectType == nil then return end 
	if number == nil then number = 1 end
	--if ObjectType == nil then ObjectType=ObjectTypeTable[random(getn(ObjectTypeTable))] end
	if team == nil then team = AdminTeamName end
	local waypoint_ = ""
	local ObjectType_ = ""
	if type(ObjectType)=="string" then ObjectType_=ObjectType end
	if waypoint~=nil then waypoint_=waypoint
	else waypoint_=GetPlayerStartWaypointByTeam(team) end
	local OBJECTREF = ""
	if OnObjectType~=nil then
		for j=1,number,1 do
			if type(ObjectType)=="function" then ObjectType_=ObjectType() end
			if ref == nil then OBJECTREF = RandomString(5)
			else OBJECTREF = ref end
			if GAME_ACTIVE == BFME2 or GAME_ACTIVE == BFME2ROTWK then
				ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE",OBJECTREF,ObjectType_,team,OnObjectType,0) 
			else
				ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION",OBJECTREF,ObjectType_,team,OnObjectType,0)	
			end
			if ActionOnObject~=nil then if type(ActionOnObject)=="function" then ActionOnObject(OBJECTREF) elseif type(ActionOnObject)=="table" then for i=1,getn(ActionOnObject),1 do ActionOnObject[i](OBJECTREF) end end end
			if number==1 then return OBJECTREF end
		end
	elseif IsEntryInTable(WaypointTable,waypoint_) then
		for j=1,number,1 do
			if type(ObjectType)=="function" then ObjectType_=ObjectType() end
			if number==1 or ActionOnObject~=nil then
				if ref == nil then OBJECTREF = RandomString(5)
				else OBJECTREF = ref end
				ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT",OBJECTREF,ObjectType_,team,waypoint_)	
				if ActionOnObject~=nil then if type(ActionOnObject)=="function" then ActionOnObject(OBJECTREF) elseif type(ActionOnObject)=="table" then for i=1,getn(ActionOnObject),1 do ActionOnObject[i](OBJECTREF) end end end
				if number==1 then return OBJECTREF end
				else
				ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT",ObjectType_,team,waypoint_)	
			end
		end
	else
		for j=1,number,1 do
			if type(ObjectType)=="function" then ObjectType_=ObjectType() end
			if number==1 or ActionOnObject~=nil then	
				if ref == nil then OBJECTREF = RandomString(5)
				else OBJECTREF = ref end
				ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",OBJECTREF,ObjectType_,team,"((0.00,0.00,0.00))", 0)
				if ActionOnObject~=nil then if type(ActionOnObject)=="function" then ActionOnObject(OBJECTREF) elseif type(ActionOnObject)=="table" then for i=1,getn(ActionOnObject),1 do ActionOnObject[i](OBJECTREF) end end end
				if number==1 then return OBJECTREF end
				else
				ExecuteAction("CREATE_OBJECT",ObjectType,team,"((0.00,0.00,0.00))", 0)
			end
		end
	end
end

function spawnForAllTeams(ObjectType,number)
	for i=1,getn(GlobalTeamTable),1 do 
		spawn(ObjectType,GlobalTeamTable[i],number,nil,nil,nil,nil)
	end
end

function SpawnAtPosition3(ObjectType,team,position)  --not working, use SpawnAtPosition(...  
    position_ = "(" .. position.x .. "," .. position.y .. "," .. position.z .. ")"
    ExecuteAction("CREATE_OBJECT",ObjectType,team,position_,0)
end

function teleport(thisobject)
    ExecuteAction("UNIT_TELEPORT_TO_WAYPOINT", thisobject, GetPlayerStartWaypoint(thisobject))
end

function transfer(self, other)
    ExecuteAction("UNIT_SET_TEAM", self, GetTeamName(other))	
end

function SetObj.Team(object,team)
    ExecuteAction("UNIT_SET_TEAM",object,team)	
end

function delete(thisobject)
   	ExecuteAction("NAMED_DELETE",thisobject)	
end

function UnitAttributeBooster(Object)
	FireWeaponOnObject(Object,"HeroGeneralWeapon")
end

function CreateRadarEvent(x,y,radarevent)
	if radarevent==nil then radarevent="Information" end
	local OBJREF=RandomString(5)
	SpawnAtPosition(GenericDummy,NeutralTeam,x,y,0,OBJREF)
	local action = function() ExecuteAction("OBJECT_CREATE_RADAR_EVENT",%OBJREF, RadarEventTable[%radarevent]) end
	SetScriptTimerFast(0.01,action)
end


---------------------------------------------------------------------
---------------------COORDINATE SPAWN SYSTEM-------------------------
---------------------------------------------------------------------

CoordinateHelperTable = {}
CoordinateHelperTable["Initialized"]=0

--CoordinateHelperObjectTable = { ["2567366605"]="CoordinateAdd1X", ["3726600081"]["name"]=CoordinateAdd10X, ["1413022333"]["name"]=CoordinateAdd100X, ["2778099945"]["name"]=CoordinateAdd1Y, ["3896211920"]["name"]=CoordinateAdd10Y, ["417012272"]["name"]=CoordinateAdd100Y }
CoordinateHelperObjectTable = {}
CoordinateHelperObjectTable["153350580"] = {}
CoordinateHelperObjectTable["2567366605"] = {}
CoordinateHelperObjectTable["3726600081"] = {}
CoordinateHelperObjectTable["1413022333"] = {}
CoordinateHelperObjectTable["2848687952"] = {}
CoordinateHelperObjectTable["2778099945"] = {}
CoordinateHelperObjectTable["3896211920"] = {}
CoordinateHelperObjectTable["417012272"] = {}
CoordinateHelperObjectTable["1676228967"] = {}
-- CoordinateHelperObjectTable["3771334179"] = {}
-- CoordinateHelperObjectTable["3052011978"] = {}
CoordinateHelperObjectTable["153350580"]["name"]="CoordinateAnchor"
CoordinateHelperObjectTable["2567366605"]["name"]="CoordinateAdd1X"
CoordinateHelperObjectTable["3726600081"]["name"]="CoordinateAdd10X"
CoordinateHelperObjectTable["1413022333"]["name"]="CoordinateAdd100X"
CoordinateHelperObjectTable["2848687952"]["name"]="CoordinateAdd1000X"
CoordinateHelperObjectTable["2778099945"]["name"]="CoordinateAdd1Y"
CoordinateHelperObjectTable["3896211920"]["name"]="CoordinateAdd10Y"
CoordinateHelperObjectTable["417012272"]["name"]="CoordinateAdd100Y"
CoordinateHelperObjectTable["1676228967"]["name"]="CoordinateAdd1000Y"
-- CoordinateHelperObjectTable["3771334179"]["name"]="FinalCoordinateAnchorSpawner"
-- CoordinateHelperObjectTable["3052011978"]["name"]="FinalCoordinateAnchor"
CoordinateHelperObjectTable["153350580"]["coord"]="x"
CoordinateHelperObjectTable["2567366605"]["coord"]="x"
CoordinateHelperObjectTable["3726600081"]["coord"]="x"
CoordinateHelperObjectTable["1413022333"]["coord"]="x"
CoordinateHelperObjectTable["2848687952"]["coord"]="x"
CoordinateHelperObjectTable["2778099945"]["coord"]="y"
CoordinateHelperObjectTable["3896211920"]["coord"]="y"
CoordinateHelperObjectTable["417012272"]["coord"]="y"
CoordinateHelperObjectTable["1676228967"]["coord"]="y"
CoordinateHelperObjectTable["153350580"]["add"]=0
CoordinateHelperObjectTable["2567366605"]["add"]=1
CoordinateHelperObjectTable["3726600081"]["add"]=10
CoordinateHelperObjectTable["1413022333"]["add"]=100
CoordinateHelperObjectTable["2848687952"]["add"]=1000
CoordinateHelperObjectTable["2778099945"]["add"]=1
CoordinateHelperObjectTable["3896211920"]["add"]=10
CoordinateHelperObjectTable["417012272"]["add"]=100
CoordinateHelperObjectTable["1676228967"]["add"]=1000


function SpawnAtPosition(ObjectType,team,x,y,z,ObjectRef,orientation,Waypoint,numbercount,fast,ActionOnObject) -- fast: 0=normal,1=fast,2=superfast
	if ObjectRef==nil or ObjectRef=="0" or ObjectRef==0 then ObjectRef=RandomString(5) end
	if z==nil or z=="0" or z==0 then z=0 end
	if x==nil or x=="0" or x==0 then x=0 end
	if y==nil or y=="0" or y==0 then y=0 end
	if x~=0 and fast~=nil and fast~=0 and fast~="0" and fast~="normal" then    --0=normal,1=fast,2=superfast
		if fast == "superfast" or fast == 2 then x=round(x/100)*100
		else x=round(x/10)*10 end
	end
	if y~=0 and fast~=nil and fast~=0 and fast~="0" and fast~="normal" then
		if fast == "superfast" then y=round(y/100)*100
		else y=round(y/10)*10 end  
	end
	if orientation==nil or orientation=="0" or orientation==0 then orientation=0 end
	if Waypoint==nil or Waypoint=="0" or Waypoint==0 then Waypoint="0" end
	if numbercount==nil or numbercount=="0" or numbercount==0 then numbercount=1 end
	local spawnaction = function() SpawnAtPositionProcess(%ObjectType,%team,%x,%y,%z,%ObjectRef,%orientation,%Waypoint,%numbercount,%ActionOnObject) end
	--local spawnaction = "SpawnAtPositionProcess(" .. strchar(34) .. ObjectType .. strchar(34) .. "," .. strchar(34) .. team .. strchar(34) .. "," .. x  .. "," .. y .. "," .. z .. "," .. strchar(34) .. ObjectRef .. strchar(34) .. "," .. orientation .. "," .. strchar(34) .. Waypoint .. strchar(34) .. "," .. numbercount .. ")"
	push(spawnaction)
	return ObjectRef
end

function SpawnAtPositionProcess(Object,team,x,y,z,ObjectRef,orientation,Waypoint,numbercount,ActionOnObject)  --z coordinate currently placeholder
	if type(Object) == "table" then  --assert(x) --getn(arg)
		local ObjectHashValue = ""
			if GAME_ACTIVE == BFME2 or GAME_ACTIVE == BFME2ROTWK then
			local ObjectTypeName = ObjectTemplateName(Object)
			ObjectHashValue = ObjectTypeName
		else
			ObjectHashValue = GetObj.Hash(Object)
		end
		if CoordinateHelperTable["Initialized"] == 0 then 
			ExecuteAction("NAMED_DELETE",Object) 
			return
			elseif CoordinateHelperObjectTable[ObjectHashValue]["name"] ~= CoordinateHelperTable["NextCoordObjType"] then 
			ExecuteAction("NAMED_DELETE",Object) 
			return
		end		
		CoordinateHelperTable[CoordinateHelperObjectTable[ObjectHashValue]["coord"]]=CoordinateHelperTable[CoordinateHelperObjectTable[ObjectHashValue]["coord"]]-CoordinateHelperObjectTable[ObjectHashValue]["add"]	
		ExecuteAction("NAMED_DELETE",CoordinateHelperTable["LastCoordObjRef"]) 
		CoordinateHelperTable["LastCoordObjRef"]=Object
		CoordinateHelperTable["CurrentCoordObjType"]=CoordinateHelperTable["NextCoordObjType"]
	end
	if CoordinateHelperTable["Initialized"] == 0 then
		CoordinateHelperTable = {}
		CoordinateHelperTable["Initialized"]=1
		CoordinateHelperTable["x"]=x
		CoordinateHelperTable["y"]=y
		CoordinateHelperTable["z"]=z
		CoordinateHelperTable["numbercount"]=numbercount
		CoordinateHelperTable["orientation"]=orientation
		CoordinateHelperTable["team"]=team
		if IsEntryInTable(OCLSpawnExtenderTable,Object,"nocasesensitive") then CoordinateHelperTable["object"]=Object .. "_OCL" else CoordinateHelperTable["object"]=Object end
		CoordinateHelperTable["ObjectRef"]=ObjectRef
		CoordinateHelperTable["CurrentCoordObjRef"]=RandomString(3)
		CoordinateHelperTable["LastCoordObjRef"]=CoordinateHelperTable["CurrentCoordObjRef"]
		CoordinateHelperTable["CurrentCoordObjType"]="CoordinateAnchor"
		CoordinateHelperTable["NextCoordObjType"]=CoordinateHelperTable["CurrentCoordObjType"]
		CoordinateHelperTable["ActionOnObject"]=ActionOnObject
		if CoordinateHelperTable["x"] >= 100 and mod(CoordinateHelperTable["x"],100) == 0 and CoordinateHelperTable["y"] ~= 0 then CoordinateHelperTable["x"] = CoordinateHelperTable["x"] + 100  end --fix for strange special case
		if Waypoint == "0" then
			ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", CoordinateHelperTable["CurrentCoordObjRef"], "CoordinateAnchor", NeutralTeam, "((0.00,0.00,0.00))", 0)	
			else
			ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "CoordinateAnchor", NeutralTeam, Waypoint)	   
		end
	end
	if CoordinateHelperTable["x"] > 0 then
		if CoordinateHelperTable["x"] >= 1000 then 
			if CoordinateHelperTable["CurrentCoordObjType"]~="CoordinateAdd1000X" then
				CoordinateHelperTable["NextCoordObjType"]="CoordinateAdd1000X"
				return		 
			end	
			elseif CoordinateHelperTable["x"] >= 100 then 
			if CoordinateHelperTable["CurrentCoordObjType"]~="CoordinateAdd100X" then
				CoordinateHelperTable["NextCoordObjType"]="CoordinateAdd100X"
				return		 
			end	 	    
			elseif CoordinateHelperTable["x"] >= 10 then 
			if CoordinateHelperTable["CurrentCoordObjType"]~="CoordinateAdd10X" then
				CoordinateHelperTable["NextCoordObjType"]="CoordinateAdd10X"		 
				return			 
			end
			else 	
			if CoordinateHelperTable["CurrentCoordObjType"]~="CoordinateAdd1X" then
				CoordinateHelperTable["NextCoordObjType"]="CoordinateAdd1X"		 
				return			 
			end
		end
		elseif CoordinateHelperTable["y"] > 0 then
		if CoordinateHelperTable["y"] >= 1000 then 
			if CoordinateHelperTable["CurrentCoordObjType"]~="CoordinateAdd1000Y" then
				CoordinateHelperTable["NextCoordObjType"]="CoordinateAdd1000Y"		 
				return			 
			end  
			elseif CoordinateHelperTable["y"] >= 100 then 
			if CoordinateHelperTable["CurrentCoordObjType"]~="CoordinateAdd100Y" then
				CoordinateHelperTable["NextCoordObjType"]="CoordinateAdd100Y"		 
				return			 
			end
			elseif CoordinateHelperTable["y"] >= 10 then 		
			if CoordinateHelperTable["CurrentCoordObjType"]~="CoordinateAdd10Y" then
				CoordinateHelperTable["NextCoordObjType"]="CoordinateAdd10Y"		 
				return			 
			end
			else 
			if CoordinateHelperTable["CurrentCoordObjType"]~="CoordinateAdd1Y" then
				CoordinateHelperTable["NextCoordObjType"]="CoordinateAdd1Y"		 
				return			 
			end		
		end
		else 
		CoordinateHelperTable["Initialized"]=0  
		HoldObject(Object)
		SetScriptTimerFast(0.01,'FinalCoordSpawn()') 
	end   
end

function FinalCoordSpawn()
	local ClearSpawnProcess = function()
		ReleaseObject(CoordinateHelperTable["LastCoordObjRef"])
		ExecuteAction("NAMED_DELETE",CoordinateHelperTable["LastCoordObjRef"])
		pop()
	end
	if CoordinateHelperTable["numbercount"]<=1 then
		if type(CoordinateHelperTable["object"])=="string" then
			if GAME_ACTIVE == BFME2 or GAME_ACTIVE == BFME2ROTWK then
				ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE", CoordinateHelperTable["ObjectRef"],CoordinateHelperTable["object"],CoordinateHelperTable["team"],CoordinateHelperTable["CurrentCoordObjType"])
			else
				ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION",CoordinateHelperTable["ObjectRef"],CoordinateHelperTable["object"],CoordinateHelperTable["team"],CoordinateHelperTable["CurrentCoordObjType"],CoordinateHelperTable["orientation"])  
			end
		elseif type(CoordinateHelperTable["object"])=="function" then
			if GAME_ACTIVE == BFME2 or GAME_ACTIVE == BFME2ROTWK then
				ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE", CoordinateHelperTable["ObjectRef"],CoordinateHelperTable["object"](),CoordinateHelperTable["team"],CoordinateHelperTable["CurrentCoordObjType"])
			else	
				ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION",CoordinateHelperTable["ObjectRef"],CoordinateHelperTable["object"](),CoordinateHelperTable["team"],CoordinateHelperTable["CurrentCoordObjType"],CoordinateHelperTable["orientation"])
			end		
		end
		if CoordinateHelperTable["ActionOnObject"]~=nil then 
			if type(CoordinateHelperTable["ActionOnObject"])=="string" then dostring(CoordinateHelperTable["ActionOnObject"])
			elseif type(CoordinateHelperTable["ActionOnObject"])=="function" then CoordinateHelperTable["ActionOnObject"](CoordinateHelperTable["ObjectRef"]) end
		end
	elseif CoordinateHelperTable["numbercount"]>1 then
		for i=1,(CoordinateHelperTable["numbercount"]),1 do
			local RANDREF=RandomString(5)
			if type(CoordinateHelperTable["object"])=="string" then
			if GAME_ACTIVE == BFME2 or GAME_ACTIVE == BFME2ROTWK then
					ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE", RANDREF,CoordinateHelperTable["object"],CoordinateHelperTable["team"],CoordinateHelperTable["CurrentCoordObjType"])
				else
					ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION",RANDREF,CoordinateHelperTable["object"],CoordinateHelperTable["team"],CoordinateHelperTable["CurrentCoordObjType"],CoordinateHelperTable["orientation"])  
				end
			elseif type(CoordinateHelperTable["object"])=="function" then
			if GAME_ACTIVE == BFME2 or GAME_ACTIVE == BFME2ROTWK then
					ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE", RANDREF,CoordinateHelperTable["object"](),CoordinateHelperTable["team"],CoordinateHelperTable["CurrentCoordObjType"])
				else	
					ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION", RANDREF,CoordinateHelperTable["object"](),CoordinateHelperTable["team"],CoordinateHelperTable["CurrentCoordObjType"],CoordinateHelperTable["orientation"])
				end		
			end
			if CoordinateHelperTable["ActionOnObject"]~=nil then 
				if type(CoordinateHelperTable["ActionOnObject"])=="string" then dostring(CoordinateHelperTable["ActionOnObject"])
				elseif type(CoordinateHelperTable["ActionOnObject"])=="function" then CoordinateHelperTable["ActionOnObject"](RANDREF) end
			end
		end
	end
	ClearSpawnProcess()	  
end

------------------------------------------------------------

function HoldObject(object)  --to stop lifetime behaviour
    ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Enabled", 0) 	
    ExecuteAction("NAMED_SET_HELD", object, 1)
end	

function ReleaseObject(object)
    ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Enabled", 1) 	
    ExecuteAction("NAMED_SET_HELD", object, 0)
end	

function RandomSpawnObject(Object)
	SpawnAtPosition(Object,GetTeamName(object1),random(MapSize.x-1),random(MapSize.y-1),0,RandomString(3),0,0,1,1)
end

function RandomSpawnObjectFast(Object)
	local x_limit = floor(random(MapSize.x)/100)*100
	local y_limit = floor(random(MapSize.y)/100)*100
	local random_table_index = random(getn(NAOD.UnitTable))
	SpawnAtPosition(Object,GetTeamName(object1),x_limit,y_limit,0,RandomString(3),0,0,1,1)
end

function RandomSpawn(x,y)
	local random_table_index = random(getn(NAOD.UnitTable))
	SpawnAtPosition(NAOD.UnitTable[random_table_index][random(getn(NAOD.UnitTable[random_table_index]))],GetTeamName(object1),random(MapSize.x-1),random(MapSize.y-1),0,RandomString(3),0,0,1,1)
end

function RandomSpawnFast()
	local x_limit = floor(random(MapSize.x)/100)*100
	local y_limit = floor(random(MapSize.y)/100)*100
	local random_table_index = random(getn(NAOD.UnitTable))
	SpawnAtPosition(NAOD.UnitTable[random_table_index][random(getn(NAOD.UnitTable[random_table_index]))],GetTeamName(object1),x_limit,y_limit,0,RandomString(3),0,0,1,0)
end

OCL_Events_Table = {"NODNukeSeed_OCL","RiftGeneratorWeapon_OCL","AlienSeedTiberiumLaser_OCL","AlienControlCenterLightningSpike_OCL","AlienCrystalShield_OCL","AlienWormHole_OCL","GiantTiberiumRock_OCL","GDISuperSonicAirAttack_OCL"}	

function RandomWorldEvent()
	SpawnAtPosition(OCL_Events_Table[random(getn(OCL_Events_Table))],NeutralTeam,random(MapSize.x-1),random(MapSize.y-1),0,RandomString(3),0,0,1,1)
end

-----------------------------------------------------------------------------------------

function SpawnAtPosition2(Object,team,x,y,z,ObjectRef,orientation,Waypoint,numbercount,fast) --alternative solution, doesn't work currently
	if ObjectRef==nil or ObjectRef=="0" or ObjectRef==0 then ObjectRef=RandomString(5) end
	if z==nil or z=="0" or z==0 then z=0 end
	if x==nil or x=="0" or x==0 then x=0 end
	if y==nil or y=="0" or y==0 then y=0 end
	if x~=0 and fast~=nil and fast~=0 and fast~="0" then    --0=normal,1=fast,2=superfast
		if fast == "superfast" or fast == 2 then x=round(x/100)*100
		else x=round(x/10)*10 end
	end
	if y~=0 and fast~=nil and fast~=0 and fast~="0" then
		if fast == "superfast" then y=round(y/100)*100
		else y=round(y/10)*10 end  
	end
	if orientation==nil or orientation=="0" or orientation==0 then orientation=0 end
	if Waypoint==nil or Waypoint=="0" or Waypoint==0 then Waypoint="0" end
	if numbercount==nil or numbercount=="0" or numbercount==0 then numbercount=1 end
	SpawnAtPositionProcess2(Object,team,x,y,z,ObjectRef,orientation,Waypoint,numbercount)
	return ObjectRef
end

function SpawnAtPositionProcess2(Object,team,x,y,z,ObjectRef,orientation,Waypoint,numbercount)  --z coordinate currently placeholder
	if CoordinateHelperTable["Initialized"] == 0 then
		CoordinateHelperTable = {}
		CoordinateHelperTable["Initialized"]=1
		CoordinateHelperTable["x"]=x
		CoordinateHelperTable["y"]=y
		CoordinateHelperTable["z"]=z
		CoordinateHelperTable["numbercount"]=numbercount
		CoordinateHelperTable["orientation"]=orientation
		CoordinateHelperTable["team"]=team
		if not IsEntryInTable(OCLSpawnExtenderTable,Object) then CoordinateHelperTable["object"]=Object else CoordinateHelperTable["object"]=Object .. "_OCL" end
		CoordinateHelperTable["ObjectRef"]=ObjectRef
		if Waypoint == "0" then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", RandomString(5), "CoordAnchor2", NeutralTeam, "((0.00,0.00,0.00))", 0)	
		else ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "CoordAnchor2", NeutralTeam, Waypoint) end
		return
	end
	if CoordinateHelperTable["x"] > 0 then
		if CoordinateHelperTable["x"] >= 1000 then CoordinateHelperTable["x"]=CoordinateHelperTable["x"]-1000 ObjectCreateAndFireTempWeapon(Object,"OCLWeaponX1000") return		 
			elseif CoordinateHelperTable["x"] >= 100 then CoordinateHelperTable["x"]=CoordinateHelperTable["x"]-100 ObjectCreateAndFireTempWeapon(Object,"OCLWeaponX100") return 	    
			elseif CoordinateHelperTable["x"] >= 10 then CoordinateHelperTable["x"]=CoordinateHelperTable["x"]-10 ObjectCreateAndFireTempWeapon(Object,"OCLWeaponX10") return
			else CoordinateHelperTable["x"]=CoordinateHelperTable["x"]-1 ObjectCreateAndFireTempWeapon(Object,"OCLWeaponX1") return
		end
		elseif CoordinateHelperTable["y"] > 0 then
		if CoordinateHelperTable["y"] >= 1000 then CoordinateHelperTable["y"]=CoordinateHelperTable["y"]-1000 ObjectCreateAndFireTempWeapon(Object,"OCLWeaponY1000") return 
			elseif CoordinateHelperTable["y"] >= 100 then CoordinateHelperTable["y"]=CoordinateHelperTable["y"]-100 ObjectCreateAndFireTempWeapon(Object,"OCLWeaponY100") return
			elseif CoordinateHelperTable["y"] >= 10 then CoordinateHelperTable["y"]=CoordinateHelperTable["y"]-10 ObjectCreateAndFireTempWeapon(Object,"OCLWeaponY10") return
			else CoordinateHelperTable["y"]=CoordinateHelperTable["y"]-1 ObjectCreateAndFireTempWeapon(Object,"OCLWeaponY1") return		
		end
		else 
		ObjectCreateAndFireTempWeapon(Object,"OCLWeaponFinalCoordAnchor")
		--local action = function() ObjectCreateAndFireTempWeapon(%Object,"OCLWeaponFinalCoordAnchor") end SetDelayed(action)
	end   
end

function FinalCoordSpawn2(self)
	CoordinateHelperTable["Initialized"]=0
	for i=1,CoordinateHelperTable["numbercount"],1 do
		ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION",CoordinateHelperTable["ObjectRef"],CoordinateHelperTable["object"],CoordinateHelperTable["team"],"FinalCoordAnchor2",CoordinateHelperTable["orientation"])  
	end
	delete(self)
end



------------------------------------------------------------------------------------------
------------------------------SPAWN FUNCTIONS---------------------------------------------
------------------------------------------------------------------------------------------

function TestMapLimit(x_,y_)
	if not ( (x_>=MapSize.x) or (x_<0) or (y_>=MapSize.y) or (y_<0) ) then return true
	else return false end
end

---------------------GEOMETRIC SHAPE SPAWN FUNCTIONS-----------------------------

function CircleLineSpawn(Object,team,xoffset,yoffset,radius,number,at_base,fast)  --test CircleLineSpawn("GenericDummyEffect",GetTeamName(object1),0,0,100,32,1,0)
	local position={}
	if fast == nil or fast == "0" or fast == 0 then fast = 1 end
	if at_base~=nil and at_base~="0" and at_base~=0 then
		local a = GetPositionOfWaypoint(GetPlayerStartWaypointByTeam(team))
		xoffset=a.x
		yoffset=a.y
	end
	for i=1,number,1 do
		do  --rad(),deg()
			position.x=round(xoffset+radius*cos((360/number)*i))
			position.y=round(yoffset+radius*sin((360/number)*i))
			if not ( (position.x>=MapSize.x) or (position.x<0) or (position.y>=MapSize.y) or (position.y<0) ) then
				if type(Object) == "function" then 
					SpawnAtPosition(Object(),team,position.x,position.y,0,0,0,0,1,fast)
					else 
					SpawnAtPosition(Object,team,position.x,position.y,0,0,0,0,1,fast)
				end
				else
				--out("X: " .. position.x .. " Y: " .. position.y)
			end
		end
	end
end  --CircleLineSpawn("GenericDummyEffect",GetTeamName(object1),0,0,100,16,1,0)

function RandomBaseDefenseCircle(team)   --test RandomBaseDefenseCircle(GetTeamName(object1))
	local RandDef = function()
		return GDI_Defensive_Structures[random(getn(GDI_Defensive_Structures))]
	end
	CircleLineSpawn(RandDef,team,0,0,random(150,200),random(16,32),1,1)	  
end    --RandomBaseDefenseCircle(GetTeamName(object1)) 

function SpawnCircleLineLayers(ObjectOrFunction,team,number,layers)
	for i=1,layers,1 do
		CircleLineSpawn(ObjectOrFunction,team,0,0,50+30*i,number*i/2,1,1)	
	end
end   --SpawnCircleLineLayers(GDI_Defensive_Structures[1],GetTeamName(object1),20,10) 

function SpiralLineSpawn(Object,team,xoffset,yoffset,number,at_base,fast)
	local position={}
	local alpha=1
	local start=65
	local step=5.457
	local t={}
	if fast == nil or fast == "0" then fast = 1 end
	if at_base~=nil and at_base~="0" and at_base~=0 then
		local a = GetPositionOfWaypoint(GetPlayerStartWaypointByTeam(team))
		xoffset=a.x
		yoffset=a.y
	end
	for t=start,start+step*number,step do
		position.x=round(xoffset+alpha*t*cos(deg(t)))
		position.y=round(yoffset+alpha*t*sin(deg(t)))
		if TestMapLimit(position.x,position.y) then
			if type(Object) == "function" then 
				SpawnAtPosition(Object(),team,position.x,position.y,0,0,0,0,1,fast)
			else 
				SpawnAtPosition(Object,team,position.x,position.y,0,0,0,0,1,fast)
			end
		end
	end
end  --SpiralLineSpawn("GenericDummyEffect",GetTeamName(object1),0,0,10,1,1)  

function RandomBaseDefenseSpiral(team,number)   --test RandomBaseDefenseCircle(GetTeamName(object1))
	local RandDef = function()
		return GDI_Defensive_Structures[random(getn(GDI_Defensive_Structures))]
	end
	SpiralLineSpawn(RandDef,team,0,0,number,1,1)	  
end   --RandomBaseDefenseSpiral(GetTeamName(object1),50)

function LineSpawn(Object,team,start_x,start_y,end_x,end_y,number,fast)
	local position={}
	if number == nil or number == 0 or number == "0" then number=ceil(sqrt((end_x-start_x)^2+(end_y-start_y)^2)/50) end
	if fast == nil or fast == "0" then fast = 1 end
	for i=1,number,1 do
	    position.x=start_x+((end_x-start_x)/number)*i
		position.y=start_y+((end_y-start_y)/number)*i
	    if type(Object) == "function" then 
			SpawnAtPosition(Object(),team,position.x,position.y,0,0,0,0,1,fast)
			else 
			SpawnAtPosition(Object,team,position.x,position.y,0,0,0,0,1,fast)
		end
	end
end

function SquareLineSpawn(Object,team,center_x,center_y,sidelength,number,fast)
	LineSpawn(Object,team,center_x-(sidelength/2),center_y-(sidelength/2),center_x+(sidelength/2),center_y-(sidelength/2),number,fast)
	LineSpawn(Object,team,center_x+(sidelength/2),center_y-(sidelength/2),center_x+(sidelength/2),center_y+(sidelength/2),number,fast)
	LineSpawn(Object,team,center_x+(sidelength/2),center_y+(sidelength/2),center_x-(sidelength/2),center_y+(sidelength/2),number,fast)
	LineSpawn(Object,team,center_x-(sidelength/2),center_y+(sidelength/2),center_x-(sidelength/2),center_y-(sidelength/2),number,fast)
end

function RectangularSpiralLineSpawn(ObjectType,team,centerX,centerY,number,fast)
	local mindist = 120
	local x,y
	if fast == nil or fast == "0" then fast = 1 end
	for i=0,number-1,1 do
	    x,y=rectSpiral(centerX,centerY,mindist,i)
		if type(ObjectType) == "function" then 
			SpawnAtPosition(ObjectType(),team,x,y,0,0,0,0,1,fast)
			else 
			SpawnAtPosition(ObjectType,team,x,y,0,0,0,0,1,fast)
			--PrintArguments(ObjectType,team,x,y,0,0,0,0,1,fast)
		end
	end
end

function DefenseBlockSpawn(Object,team,xoffset,yoffset,lines,rows,at_base,fast)    
	local position={}
	local distance=40
	if fast == nil or fast == "0" then fast = 1 end
	if (at_base~=nil and at_base~="0" and at_base~=0) or not (xoffset and yoffset) then
		local a = GetPositionOfWaypoint(GetPlayerStartWaypointByTeam(team))
		xoffset=a.x
		yoffset=a.y
	end
	for i=1,rows,1 do
		if i<=ceil(rows/2) then position.y=yoffset+round(-(ceil(rows/2)-i)*distance)
		else position.y=yoffset+round((i-ceil(rows/2))*distance) end
		for j=1,lines,1 do
			if j<=ceil(lines/2) then position.x=xoffset+round(-(ceil(lines/2)-j)*distance)
			else position.x=xoffset+round((j-ceil(lines/2))*distance) end
			if TestMapLimit(position.x,position.y) then
				if type(Object) == "function" then 
					SpawnAtPosition(Object(),team,position.x,position.y,0,0,0,0,1,fast)
					else 
					SpawnAtPosition(Object,team,position.x,position.y,0,0,0,0,1,fast)
				end
			end
		end
	end
end

----------------------BASE BUILDER SPAWN FUNCTIONS------------------------ (this is a first working prototype, needs completion of BaseBuildingFactionNames and BaseBuildingNorm table)

BaseSpawnCount={}

function SpawnObjectTypeAtBase(team,ObjectType,number)
	local BasePos = GetPositionOfPlayerBase(team)
	BaseSpawnCount[team][ObjectType]=number
	local BSF = {}
	BSF.BaseSpawn = function()
	    if BaseSpawnCount[%team][%ObjectType]<=0 then return
			else
			BaseSpawnCount[%team][%ObjectType]=BaseSpawnCount[%team][%ObjectType]-1
			local X,Y=GetColissionFreeSpawnCoordinates(%BasePos.x,%BasePos.y,500)
			SpawnAtPosition(%ObjectType,%team,X,Y,nil,nil,nil,nil,1,0,%BSF.DelayedBaseSpawn)
		end
	end
	BSF.DelayedBaseSpawn = function() SetScriptTimer(1,%BSF.BaseSpawn) end
	BSF.DelayedBaseSpawn()
end

function SingleObjectTypeBaseBuilder(team)
	--BaseSpawnCount[team]={}
	local ObjectTypeCount=0
	local BaseBuildingType
	for i=1,getn(BaseBuildingTypes),1 do
		BaseBuildingType=BaseBuildingFactionNames[GPOT[team].faction][BaseBuildingTypes[i]]
		ObjectTypeCount=CountObjectTypeOfTeam(BaseBuildingType,team)
		if ObjectTypeCount < BaseBuildingNorm[BaseBuildingTypes[i]]["number"] then 
			local SpawnCommand = function() SpawnObjectTypeAtBase(%team,%BaseBuildingType,BaseBuildingNorm[BaseBuildingTypes[%i]]["number"]-%ObjectTypeCount) pop() end
			push(SpawnCommand)
		end
	end
end

function SpawnObjectTypeListAtBase(team,ObjectTypeList)
	local BasePos = GetPositionOfPlayerBase(team)
	local BSF = {}
	BSF.BaseSpawn = function()
	    if BaseSpawnCount[%team].listcount>=getn(%ObjectTypeList) then BaseSpawnCount[%team].listcount=0 return
			else
			BaseSpawnCount[%team].listcount=BaseSpawnCount[%team].listcount+1
			local X,Y=GetColissionFreeSpawnCoordinates(%BasePos.x,%BasePos.y,500)
			SpawnAtPosition(%ObjectTypeList[BaseSpawnCount[%team].listcount],%team,X,Y,nil,nil,nil,nil,1,0,%BSF.DelayedBaseSpawn)
		end
	end
	BSF.DelayedBaseSpawn = function() SetScriptTimer(1,%BSF.BaseSpawn) end
	BSF.DelayedBaseSpawn()
end

function SpawnObjectTypeListAroundBase(team,ObjectTypeList) --unfinished
	local BasePos = GetPositionOfPlayerBase(team)
	local BSF = {}
	BSF.BaseSpawn = function()
	    if BaseSpawnCount[%team].listcount>=getn(%ObjectTypeList) then BaseSpawnCount[%team].listcount=0 return
			else
			BaseSpawnCount[%team].listcount=BaseSpawnCount[%team].listcount+1
			local X,Y=GetColissionFreeSpawnCoordinates(%BasePos.x+500,%BasePos.y+500,500)
			SpawnAtPosition(%ObjectTypeList[BaseSpawnCount[%team].listcount],%team,X,Y,nil,nil,nil,nil,1,0,%BSF.DelayedBaseSpawn)
		end
	end
	BSF.DelayedBaseSpawn = function() SetScriptTimer(1,%BSF.BaseSpawn) end
	BSF.DelayedBaseSpawn()
end

function MultiObjectTypeBaseBuilder(team)
	BaseSpawnCount[team]={}
	local ObjectTypeCount=0
	local BaseBuildingType
	local ObjectTypeList = {}
	local SpawnNumber = 0
	for i=1,getn(BaseBuildingTypes),1 do
		BaseBuildingType=BaseBuildingFactionNames[GPOT[team].faction][BaseBuildingTypes[i]]
		ObjectTypeCount=CountObjectTypeOfTeam(BaseBuildingType,team)
		if ObjectTypeCount < BaseBuildingNorm[BaseBuildingTypes[i]]["number"] then 
			SpawnNumber=BaseBuildingNorm[BaseBuildingTypes[i]]["number"]-ObjectTypeCount
			for i=1,SpawnNumber,1 do tinsert(ObjectTypeList,BaseBuildingType) end
		end
	end
	if getn(ObjectTypeList)>0 then
		local SpawnCommand = function() SpawnObjectTypeListAtBase(%team,%ObjectTypeList) pop() end
		BaseSpawnCount[team].listcount=0
		push(SpawnCommand)
	end
end

BaseBuildingTypes = {"WarFactory","PowerPlant"}

BaseBuildingFactionNames = 
{ 
	["GDI"]=
	{
		["WarFactory"]="GDIWarFactory",
		["PowerPlant"]="GDIPowerPlant"
	}, 
	["SteelTalons"]=     
	{
		["WarFactory"]="SteelTalonsWarFactory",
		["PowerPlant"]="SteelTalonsPowerPlant"
	},  
	["ZOCOM"]=
	{
		["WarFactory"]="ZOCOMWarFactory",
		["PowerPlant"]="ZOCOMPowerPlant"
	},  
	["NOD"]=
	{
		["WarFactory"]="NODDropZone",
		["PowerPlant"]="NODPowerPlant"
	},  
	["BlackHand"]=
	{
		["WarFactory"]="BlackHandDropZone",
		["PowerPlant"]="BlackHandPowerPlant"
	}, 
	["MarkedOfKane"]=
	{
		["WarFactory"]="MarkedOfKaneDropZone",
		["PowerPlant"]="MarkedOfKanePowerPlant"
	}, 
	["Scrin"]=
	{
		["WarFactory"]="AlienGateway",
		["PowerPlant"]="AlienPowerProjector"
	},  
	["Reaper-17"]=
	{
		["WarFactory"]="Reaper17Gateway",
		["PowerPlant"]="Reaper17PowerProjector"
	}, 
	["Traveler-59"]=
	{
		["WarFactory"]="Traveler59Gateway",
		["PowerPlant"]="Traveler59PowerProjector"
	}, 
	["MetaTechCorporation"]=
	{
		["WarFactory"]="MetaTechWarFactory",
		["PowerPlant"]="MetaTechPowerPlant"
	}
}

BaseBuildingNorm = 
{
	["WarFactory"]=
    {
		["number"]=3
	},
	["PowerPlant"]=
    {
		["number"]=5
	}	
}

function MultiDefenseBaseBuilder(team,norm_number,sidelength)
	if sidelength==nil then sidelength=500 end
	local BasePos = GetPositionOfPlayerBase(team)
	local  DefCount=CountTeamsKindOf(team,"FS_BASE_DEFENSE")
	local RandDef = function() return AllDefenseStructuresTable[random(getn(AllDefenseStructuresTable))] end
	if DefCount < norm_number then SquareLineSpawn(RandDef,team,BasePos.x,BasePos.y,sidelength,floor((norm_number-DefCount)/4),1) end 
end

------------------------------------------------------------------------------------------
-------------------------POSITION TRACKING SYSTEM-----------------------------------------
------------------------------------------------------------------------------------------

CoordinateEdgeAnchors = {}
MapSize={}
MapSize.x = 0
MapSize.y = 0
CurrentEdgeAnchor=""

function InitiateMapExtendEvaluator()
	CoordinateEdgeAnchors["DownLeft"]=RandomString(5)
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", CoordinateEdgeAnchors["DownLeft"], "EdgeCoordinateAnchorDownLeft", NeutralTeam, "((0.00,0.00,0.00))", 0)
end

function EdgeCoordinateAnchorExecutor()
	if CurrentEdgeAnchor == "UpperRight" then ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED", CoordinateEdgeAnchors["UpperRight"], "SpecialPowerEdgeCoordinateAnchorDownRightSpawner",CoordinateEdgeAnchors["UpperRight"]) --TW-PORT CHANGE
		--if CurrentEdgeAnchor == "UpperRight" then ExecuteAction("NAMED_FIRE_SPECIAL_POWER", CoordinateEdgeAnchors["UpperRight"], "SpecialPowerEdgeCoordinateAnchorDownRightSpawner")
		--if CurrentEdgeAnchor == "UpperRight" then ExecuteAction("NAMED_USE_COMMANDBUTTON_ABILITY",CoordinateEdgeAnchors["UpperRight"],"Command_SpecialPowerEdgeCoordinateAnchorDownRightSpawner") 
		elseif CurrentEdgeAnchor == "DownRightSpawner" then ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED", CoordinateEdgeAnchors["DownRightSpawner"], "SpecialPowerEdgeCoordinateAnchorDownRight", CoordinateEdgeAnchors["DownRightSpawner"])	   
		elseif CurrentEdgeAnchor == "DownRight" then ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED", CoordinateEdgeAnchors["DownRight"], "SpecialPowerEdgeCoordinateAnchorUpperLeft", CoordinateEdgeAnchors["DownRight"])        
		elseif CurrentEdgeAnchor == "UpperLeft" then MapSizeCalculation()
		else CurrentEdgeAnchor=""
	end
end

function EdgeCoordinateAnchorDownLeft(self)
	CurrentEdgeAnchor="DownLeft"
	CoordinateEdgeAnchors["DownLeft"] = GetObj.String(self)
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED", CoordinateEdgeAnchors["DownLeft"], "SpecialPowerEdgeCoordinateAnchorUpperRight", CoordinateEdgeAnchors["DownLeft"])	
end

function EdgeCoordinateAnchorUpperRight(self)
	CurrentEdgeAnchor="UpperRight"
	CoordinateEdgeAnchors["UpperRight"] = GetObj.String(self)
	ExecuteAction("CREATE_OBJECT","EdgeCoordinateAnchorDelayer", NeutralTeam, "((0.00,0.00,0.00))", 0)
end

function EdgeCoordinateAnchorDownRightSpawner(self)
	CurrentEdgeAnchor="DownRightSpawner"
	CoordinateEdgeAnchors["DownRightSpawner"] = GetObj.String(self)
	ExecuteAction("CREATE_OBJECT","EdgeCoordinateAnchorDelayer", NeutralTeam, "((0.00,0.00,0.00))", 0)
end

function EdgeCoordinateAnchorDownRight(self)
	CurrentEdgeAnchor="DownRight"
	CoordinateEdgeAnchors["DownRight"] = GetObj.String(self)
	ExecuteAction("CREATE_OBJECT","EdgeCoordinateAnchorDelayer", NeutralTeam, "((0.00,0.00,0.00))", 0)
end

function EdgeCoordinateAnchorDownRightInAir(self)
	CoordinateEdgeAnchors["DownRightInAir"] = GetObj.String(self)  --300 above ground
end

function EdgeCoordinateAnchorUpperLeft(self)
	CurrentEdgeAnchor="UpperLeft"
	CoordinateEdgeAnchors["UpperLeft"] = GetObj.String(self)
	ExecuteAction("CREATE_OBJECT","EdgeCoordinateAnchorDelayer", NeutralTeam, "((0.00,0.00,0.00))", 0)
end

function MapSizeCalculation()
	MapSize.x = GetObjectDistance(CoordinateEdgeAnchors["UpperLeft"],CoordinateEdgeAnchors["UpperRight"])
	MapSize.y = GetObjectDistance(CoordinateEdgeAnchors["UpperRight"],CoordinateEdgeAnchors["DownRight"]) --sqrt(GetObjectDistance(CoordinateEdgeAnchors["DownLeft"],CoordinateEdgeAnchors["UpperRight"])^2 - (MapSize.x)^2)
	--print("MapSizeX: " .. tostring(MapSize.x) .. "  " .. "MapSizeY: " .. tostring(MapSize.y))
end

function GetObjectPosition(Object)
	if tostring(type(Object))=="table" then Object=GetObj.String(Object) end
	if MapSize.x == 0 or MapSize.y == 0 then error("map size and coordinate anchors not yet initialized") InitiateMapExtendEvaluator() return MapSize end
	local z = GetObjectDistance(CoordinateEdgeAnchors["DownRightInAir"],CoordinateEdgeAnchors["DownRight"])
	local k = GetObjectDistance(Object,CoordinateEdgeAnchors["DownRightInAir"])
	local bz = GetObjectDistance(Object,CoordinateEdgeAnchors["DownRight"])
	local cz = GetObjectDistance(Object,CoordinateEdgeAnchors["UpperRight"])
	local a = MapSize.y 
	local b = bz
	local c = cz
	if floor(sqrt(z^2+bz^2))>k then   --we have to take out the z height
		b = sqrt(2*(z^2*bz^2+bz^2*k^2+k^2*z^2)-(z^4+bz^4+k^4))/(2*z) 
		c = sqrt(cz^2-(sqrt(bz^2-b^2))^2)
	end
	local ha = sqrt(2*(a^2*b^2+b^2*c^2+c^2*a^2)-(a^4+b^4+c^4))/(2*a)
	local Coordinates = {}
	Coordinates.x = round(MapSize.x-ha)
	Coordinates.y = round(sqrt(b^2-ha^2))
	--print("X: " .. tostring(Coordinates.x) .. "  " .. "Y: " .. tostring(Coordinates.y)) 
	return Coordinates
end

function GetCoordinateCenterOfObjectTypeGroup(team,ObjectType)
	local REFLIST = GetObjectTypeListForTeam(team,ObjectType)
	local Hotspot = {}
	Hotspot.x=0
	Hotspot.y=0
	local TPos = {}
	for i=1,getn(REFLIST),1 do
		TPos = GetObjectPosition(REFLIST[i].ref)
		Hotspot.x = Hotspot.x + TPos.x
		Hotspot.y = Hotspot.y + TPos.y
	end
	return round(Hotspot.x/getn(REFLIST)),round(Hotspot.y/getn(REFLIST))
end

function GetColissionFreeSpawnCoordinates(xcoord,ycoord,radius)
	local minDist = 110
	local TPos = {}
	local TestCoordX = 0
	local TestCoordY = 0
	local minDistRect = 120
	local PosValid = false
	local RelevantObjects = {}
	local REFLIST=GetStringRefListOfAllObjects()
	for i=1,getn(REFLIST),1 do
		TPos=GetObjectPosition(REFLIST[i]["ref"])
		if ( (TPos.x <= (xcoord+radius)) and (TPos.x >= (xcoord-radius)) ) or ( (TPos.y <= (ycoord+radius)) and (TPos.y >= (ycoord-radius)) ) then tinsert(RelevantObjects,TPos) end
	end
	for j=1,floor((radius/minDist)*8),1 do
		PosValid = true
		TestCoordX,TestCoordY=rectSpiral(xcoord,ycoord,minDistRect,j)
		if not TestMapLimit(TestCoordX,TestCoordY) then break end
		for i=1,getn(RelevantObjects),1 do
			--PrintArguments(RelevantObjects[i].x,TestCoordX+minDist,RelevantObjects[i].x,TestCoordX-minDist,RelevantObjects[i].y,TestCoordY+minDist,RelevantObjects[i].y,TestCoordY-minDist)
			if ( (RelevantObjects[i].x < (TestCoordX+minDist)) and (RelevantObjects[i].x > (TestCoordX-minDist)) ) and ( (RelevantObjects[i].y < (TestCoordY+minDist)) and (RelevantObjects[i].y > (TestCoordY-minDist)) ) then PosValid = false break end
		end
		--SpawnAtPosition(GenericDummy,NeutralTeam,TestCoordX,TestCoordY,0,"TestObject2")
		--spawn(GenericDummy,NeutralTeam,1,"TestObject1","Player_1_Start")
		--if not EvaluateCondition("UNIT_CAN_PATH_TO_OBJECT","TestObject1","TestObject2") then PosValid=false end
		if PosValid then return TestCoordX,TestCoordY end
	end
	return 0,0
end

function GetPositionOfWaypoint(Waypoint)
    local ref = GenericDummy .. RandomString(5)
    ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT", ref, GenericDummy, NeutralTeam, Waypoint)	
	return GetObjectPosition(ref)
end

function GetPositionOfPlayerBase(team)
	local postable = {}
	for k,v in globals() do
		if strfind(tostring(k),"ObjID") and strfind(ObjectDescription(v), "BASE_FLAG") and GetTeamName(v)==team then 
			return GetObjectPosition(v)  
		end
	end
end

function GetPositionOfNextObjectType(team,ObjectType)
    local ref = GenericDummy .. RandomString(5)
  	ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",ObjectType,team,ref)
	return GetObjectPosition(ref)	
end

function GetBaseRef(team)
	for k,v in globals() do
		if strfind(tostring(k),"ObjID") and strfind(ObjectDescription(v), "BASE_FLAG") and GetTeamName(v)==team then 
			return v
		end
	end
end

function GetObj.DistanceToBase(object)
	return GetObjectDistance(GetObj.String(object),GetObj.String(GetBaseRef(object)))
end

-----------------------------------------------------------



-----------------------------------------------------------

TemplateContainer={}
TemplateTable={}

function InsertToSpawnTemplate(table,ObjectString,x_,y_,z_,ref_,orientation_,team_,health_,specialpowersreadytable_,statustable_,upgradestable_,rank_,skillpoints_,objectpanelflagstable_,ai_,passengersbool_,passengerstable_)
	local size=0
	if table~=nil then size=getn(table)+1 else error("no " .. getlocal(1,1) .. " argument") end
	if ObjectString~=nil then table[size]={} table[size].type=ObjectString else return error("no " .. getlocal(1,2) .. " argument") end
	if team_~=nil and team_~=0 and team_~="0" then table[size].team=team_  end --else error("no " .. getlocal(1,8) .. " argument, neutral team taken") table[size].team="team" end
	if ref_==nil or ref_==0 or ref_=="0" then table[size].ref=RandomString(5) else table[size].ref=ref_ end
	if x_==nil or x_==0 or x_=="0" then table[size].x=0 else table[size].x=x_ end
	if y_==nil or y_==0 or y_=="0" then table[size].y=0 else table[size].y=y_ end
	if z_==nil or z_==0 or z_=="0" then table[size].z=0 else table[size].z=z_ end
	if orientation_==nil or orientation_==0 or orientation_=="0" then table[size].orientation=0 else table[size].orientation=orientation_ end
	if health_==nil or health_==0 or health_=="0" then table[size].health=100 else table[size].health=health_ end 
	if statustable_==nil or statustable_==0 or statustable_=="0" then table[size].statustable={} else table[size].statustable=statustable_ end 
	if upgradestable_==nil or upgradestable_==0 or upgradestable_=="0" then table[size].upgradestable={} else table[size].upgradestable=upgradestable_ end 
	if specialpowersreadytable_==nil or specialpowersreadytable_==0 or specialpowersreadytable_=="0" then table[size].specialpowersreadytable={} else table[size].specialpowersreadytable=specialpowersreadytable_ end 
	if objectpanelflagstable_==nil or objectpanelflagstable_==0 or objectpanelflagstable_=="0" then table[size].objectpanelflagstable={} else table[size].objectpanelflagstable=objectpanelflagstable_ end   
	if rank_==nil or rank_==0 or rank_=="0" then table[size].rank=0 else table[size].rank=rank_ end  
	if skillpoints_==nil or skillpoints_==0 or skillpoints_=="0" then table[size].skillpoints=0 else table[size].skillpoints=skillpoints_ end   
	if ai_==nil or ai_==0 or ai_=="0" then table[size].ai=0 else table[size].ai=ai_ end   
	if passengersbool_==nil or passengersbool_==0 or passengersbool_=="0" then table[size].passengersbool=0 else table[size].passengersbool=passengersbool_ end 
	if passengerstable_==nil or passengerstable_==0 or passengerstable_=="0" then table[size].passengerstable={} else table[size].passengerstable=passengerstable_ end  
	--if modelconditiontable_==nil or modelconditiontable_==0 or modelconditiontable_=="0" then table[size].modelconditiontable={} else table[size].modelconditiontable=modelconditiontable_ end    --GetModelConditionTable(Object)
	--if threadlevel_==nil or threadlevel_==0 or threadlevel_=="0" then table[size].threadlevel=0 else table[size].threadlevel=threadlevel_ end   
end

function SpawnTemplate(template,team,x_offset,y_offset,attrib,offset_coord_overwrite,team_overwrite,fast,keepref)
	if x_offset == nil or x_offset == "0" then x_offset = 0 end
	if y_offset == nil or y_offset == "0" then y_offset = 0 end
	local TeamName
	--if team == nil then team = GetTeamName(object1) end
	tinsert(TemplateContainer,template)
	--if getn(TemplateContainer) > 10 then tremove(TemplateContainer,1) end
	local n=getn(TemplateContainer)
	for i=1,getn(template),1 do
		if (team==nil or team==0 or team=="0") and template[i].team~=nil then TeamName=template[i].team 
			else 
			if team_overwrite~=nil then TeamName=team_overwrite 
				elseif template[i].team~=nil then TeamName=template[i].team 
				else TeamName=NeutralTeam
			end 
		end
		if keepref==nil then template[i].ref=RandomString(5) end
		if offset_coord_overwrite == nil then
			SpawnAtPosition(template[i].type,TeamName,template[i].x + x_offset,template[i].y + y_offset,template[i].z,template[i].ref,template[i].orientation,0,1,fast)
			else
			SpawnAtPosition(template[i].type,TeamName,x_offset,y_offset,template[i].z,template[i].ref,template[i].orientation,0,1,fast)
		end
		if attrib~=nil and attrib~=0 and attrib~="0" then push("ApplyObjectAttributes(" .. n .. "," .. i .. ")") end
	end
end

function SpawnTemplateRelativePosition(template,team,center_x,center_y,attrib,team_overwrite,fast,keepref)
	local TeamName
	local center = GetCenterCoordinatesOfTemplate(template)
	local finalposition={}
	tinsert(TemplateContainer,template)
	--if getn(TemplateContainer) > 10 then tremove(TemplateContainer,1) end
	local n=getn(TemplateContainer)
	for i=1,getn(template),1 do
		if (team==nil or team==0 or team=="0") and template[i].team~=nil then TeamName=template[i].team 
			else 
			if team_overwrite~=nil then TeamName=team_overwrite 
				else TeamName=NeutralTeam
			end 
		end
		finalposition.x=round(center_x+template[i].x-center.x)
		finalposition.y=round(center_y+template[i].y-center.y)
		if keepref==nil then template[i].ref=RandomString(5) end
		SpawnAtPosition(template[i].type,TeamName,finalposition.x,finalposition.y,0,template[i].ref,template[i].orientation,0,1,fast)
		if attrib~=nil and attrib~=0 and attrib~="0" then push("ApplyObjectAttributes(" .. n .. "," .. i .. ")") end
	end
end

function GetCenterCoordinatesOfTemplate(template)
	local position={}
	position.x=0
	position.y=0
	for i=1,getn(template),1 do
		position.x=position.x+template[i].x
		position.y=position.y+template[i].y
	end
	position.x=position.x/getn(template)
	position.y=position.y/getn(template)
	return position
end

function ApplyObjectAttributes(n,i,NOPOP,differential)
	if strfind(TemplateContainer[n][i].type,"Squad") then SetHealthForSquad(TemplateContainer[n][i].ref,TemplateContainer[n][i].health)
	else ExecuteAction("UNIT_SET_HEALTH",TemplateContainer[n][i].ref,TemplateContainer[n][i].health) end
	--ExecuteAction("UNIT_AI_TRANSFER",TemplateContainer[n][i].ref,TemplateContainer[n][i].ai)
	--ExecuteAction("UNIT_SET_EXPERIENCE_POINTS",TemplateContainer[n][i].ref,TemplateContainer[n][i].rank*10000) --TemplateContainer[n][i].skillpoints
	ExecuteAction("UNIT_GIVE_EXPERIENCE_LEVEL",TemplateContainer[n][i].ref,TemplateContainer[n][i].type .. "ExperienceLevel_" .. TemplateContainer[n][i].rank)
	for j=1,getn(TemplateContainer[n][i].statustable),1 do
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",TemplateContainer[n][i].ref,ObjectStatusTable[TemplateContainer[n][i].statustable[j]],1)
	end
	for j=1,getn(TemplateContainer[n][i].upgradestable),1 do
		ExecuteAction("NAMED_RECEIVE_UPGRADE",TemplateContainer[n][i].ref,TemplateContainer[n][i].upgradestable[j])
	end
	for j=1,getn(TemplateContainer[n][i].specialpowersreadytable),1 do
		ExecuteAction("NAMED_SET_SPECIAL_POWER_COUNTDOWN",TemplateContainer[n][i].ref,TemplateContainer[n][i].specialpowersreadytable[j],0)	 
	end	 
	for j=1,getn(TemplateContainer[n][i].objectpanelflagstable),1 do
		ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",TemplateContainer[n][i].ref,TemplateContainer[n][i].objectpanelflagstable[j],1) 
	end
	--for j=1,getn(TemplateContainer[n][i].modelconditiontable),1 do ExecuteAction("UNIT_SET_MODELCONDITION",TemplateContainer[n][i].ref,(1-4),1) end --TemplateContainer[n][i].modelconditiontable[j]	 
	if differential ~= nil then 
		if TemplateContainer[n][i].passengers == 0 then ExecuteAction("UNIT_DESTROY_ALL_CONTAINED",TemplateContainer[n][i].ref) end	
		--ExecuteAction("UNIT_CLEAR_MODELCONDITION",unit,modelcondition)
		ExecuteAction("NAMED_REMOVE_UPGRADE", self, upgrade)
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",TemplateContainer[n][i].ref,ObjectStatusTable[TemplateContainer[n][i].statustable[j]],0)
		ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",TemplateContainer[n][i].ref,TemplateContainer[n][i].objectpanelflagstable[j],0) 
	end
    if NOPOP == nil then pop() end
end

function GetTemplate(team)
	local TeamName = ""
	local TemplateTable_={}
	local ObjectRefList=GetStringRefListOfAllObjects()
	local ObjPos = {}
	for i=1,getn(ObjectRefList),1 do
		if team == nil then TeamName=ObjectRefList[i]["team"] else TeamName=team end
		ObjPos=GetObjectPosition(ObjectRefList[i]["ref"])
		InsertToSpawnTemplate(TemplateTable_,ObjectRefList[i]["type"],ObjPos.x,ObjPos.y,0,ObjectRefList[i]["ref"],GetObjectOrientationAngle(ObjectRefList[i]["ref"]),TeamName,GetHealth(ObjectRefList[i]["ref"]),GetSpecialPowerReadyTable(ObjectRefList[i]["ref"]),GetObjectStatusTable(ObjectRefList[i]["ref"]),GetUpgradesTable(ObjectRefList[i]["ref"]),GetRank(ObjectRefList[i]["ref"]),GetSkillPoints(ObjectRefList[i]["ref"]),GetObjectPanelFlagsTable(ObjectRefList[i]["ref"]),GPOT[ObjectRefList[i]["team"]]["ai"],UnitHasPassengers(ObjectRefList[i]["ref"]),0)
	end
	return TemplateTable_
end

function GetTemplateInArea(team,cornerdownleft_x,cornerdownleft_y,cornerupright_x,cornerupright_y)
	local TeamName = ""
	local TemplateTable_={}
	local ObjectRefList=GetStringRefListOfAllObjects()
	local ObjPos = {}
	for i=1,getn(ObjectRefList),1 do
		if team == nil then TeamName=ObjectRefList[i]["team"] else TeamName=team end
		ObjPos=GetObjectPosition(ObjectRefList[i]["ref"])
		if ObjPos.x>=cornerdownleft_x and ObjPos.y>=cornerdownleft_y and ObjPos.x<=cornerupright_x and ObjPos.y<=cornerupright_y then
			InsertToSpawnTemplate(TemplateTable_,ObjectRefList[i]["type"],ObjPos.x,ObjPos.y,0,ObjectRefList[i]["ref"],GetObjectOrientationAngle(ObjectRefList[i]["ref"]),TeamName,GetHealth(ObjectRefList[i]["ref"]),GetSpecialPowerReadyTable(ObjectRefList[i]["ref"]),GetObjectStatusTable(ObjectRefList[i]["ref"]),GetUpgradesTable(ObjectRefList[i]["ref"]),GetRank(ObjectRefList[i]["ref"]),GetSkillPoints(ObjectRefList[i]["ref"]),GetObjectPanelFlagsTable(ObjectRefList[i]["ref"]),GPOT[ObjectRefList[i]["team"]]["ai"],UnitHasPassengers(ObjectRefList[i]["ref"]),0)
		end
	end
	return TemplateTable_
end

function GetTemplateForTeam(team)
	local TeamName = ""
	local TemplateTable_={}
	local ObjectRefList=GetStringRefListOfAllObjectsForTeam(team) 
	local ObjPos = {}
	for i=1,getn(ObjectRefList),1 do
		if team == nil then TeamName=ObjectRefList[i]["team"] else TeamName=team end
		ObjPos=GetObjectPosition(ObjectRefList[i]["ref"])
		InsertToSpawnTemplate(TemplateTable_,ObjectRefList[i]["type"],ObjPos.x,ObjPos.y,0,ObjectRefList[i]["ref"],GetObjectOrientationAngle(ObjectRefList[i]["ref"]),TeamName,GetHealth(ObjectRefList[i]["ref"]),GetSpecialPowerReadyTable(ObjectRefList[i]["ref"]),GetObjectStatusTable(ObjectRefList[i]["ref"]),GetUpgradesTable(ObjectRefList[i]["ref"]),GetRank(ObjectRefList[i]["ref"]),GetSkillPoints(ObjectRefList[i]["ref"]),GetObjectPanelFlagsTable(ObjectRefList[i]["ref"]),GPOT[ObjectRefList[i]["team"]]["ai"],UnitHasPassengers(ObjectRefList[i]["ref"]),0)
	end
	return TemplateTable_
end

function GetSingleObjectTemplate(object)
	local TemplateTable_={}
	local ObjStrRef = GetObj.String(object)
	local ObjPos = GetObjectPosition(ObjStrRef)
	InsertToSpawnTemplate(TemplateTable_,GetObj.Type(object),ObjPos.x,ObjPos.y,0,RandomString(5),GetObjectOrientationAngle(ObjStrRef),GetTeamName(object),GetHealth(ObjStrRef),GetSpecialPowerReadyTable(ObjStrRef),GetObjectStatusTable(ObjStrRef),GetUpgradesTable(ObjStrRef),GetRank(ObjStrRef),GetSkillPoints(ObjStrRef),GetObjectPanelFlagsTable(ObjStrRef),GPOT[GetTeamName(object)]["ai"],UnitHasPassengers(ObjStrRef),0)
	return TemplateTable_
end

function GetTemplateOfKindOfs(team,...) 
end

function DifferentialTemplateProcessing(template1,template2,attributes) --template1=past,template2=present
	local unchanged=false
	local newobj = false
	local DeleteObjectsTable = {}
	local d = 1
	local UnChangedObjectsTable = {}
	local u = 1
	local ChangedObjectsTable = {}
	local c = 1
	for i=1,getn(template1),1 do
		unchanged=false
		for j=1,getn(template2),1 do  
			if template1[i].type == template2[j].type and template1[i].x == template2[j].x and template1[i].y == template2[j].y and template1[i].team == template2[j].team then unchanged=true UnChangedObjectsTable[u]=template1[i] u=u+1 break end
		end
		if not unchanged and not IsEntryInTable(TemplateExclusionTable,template1[i].type) then ChangedObjectsTable[c]=template1[i] ChangedObjectsTable[c].ref=RandomString(5) c=c+1 end  --TemplateExclusionHashIndexTable[template1[i].hash]==nil 
	end
	for i=1,getn(template2),1 do
		unchanged=false
		for j=1,getn(UnChangedObjectsTable),1 do
			if template2[i].type == UnChangedObjectsTable[j].type and template2[i].x == UnChangedObjectsTable[j].x and template2[i].y == UnChangedObjectsTable[j].y and template2[i].team == UnChangedObjectsTable[j].team then unchanged=true break end
		end	
		if not unchanged then DeleteObjectsTable[d]=template2[i] d=d+1 end
	end	
	for i=1,getn(DeleteObjectsTable),1 do delete(DeleteObjectsTable[i].ref) end
	SpawnTemplate(ChangedObjectsTable,nil,0,0,attributes)
	--for i=1,getn(ChangedObjectsTable),1 do ChangedObjectsTable[i].ref=RandomString(5) SpawnAtPosition(ChangedObjectsTable[i].type,ChangedObjectsTable[i].team,ChangedObjectsTable[i].x,ChangedObjectsTable[i].y,ChangedObjectsTable[i].z,ChangedObjectsTable[i].ref,ChangedObjectsTable[i].orientation,0,1,0) end
    --attribute post processing--
	tinsert(TemplateContainer,UnChangedObjectsTable)
	local NTC = getn(TemplateContainer)
	for i=1,getn(UnChangedObjectsTable),1 do
		ApplyObjectAttributes(NTC,i,"NOPOP")
	end
	-- tinsert(TemplateContainer,ChangedObjectsTable)
	-- NTC = getn(TemplateContainer)
	-- for i=1,getn(ChangedObjectsTable),1 do
	-- push("ApplyObjectAttributes(TemplateContainer," .. NTC .. "," .. i .. ")")
	-- end
end

function AdditiveDifferentialTemplateProcessing(template1,template2,attributes)
	local unchanged=false
	local newobj = false
	local DeleteObjectsTable = {}
	local d = 1
	local UnChangedObjectsTable = {}
	local u = 1
	local ChangedObjectsTable = {}
	local c = 1
	for i=1,getn(template1),1 do
		unchanged=false
		for j=1,getn(template2),1 do  
			if template1[i].type == template2[j].type and template1[i].x == template2[j].x and template1[i].y == template2[j].y and template1[i].team == template2[j].team then unchanged=true UnChangedObjectsTable[u]=template1[i] u=u+1 break end
		end
		if not unchanged and not IsEntryInTable(TemplateExclusionTable,template1[i].type) then ChangedObjectsTable[c]=template1[i] ChangedObjectsTable[c].ref=RandomString(5) c=c+1 end  --TemplateExclusionHashIndexTable[template1[i].hash]==nil 
	end
	for i=1,getn(template2),1 do
		unchanged=false
		for j=1,getn(UnChangedObjectsTable),1 do
			if template2[i].type == UnChangedObjectsTable[j].type and template2[i].x == UnChangedObjectsTable[j].x and template2[i].y == UnChangedObjectsTable[j].y and template2[i].team == UnChangedObjectsTable[j].team then unchanged=true break end
		end	
		if not unchanged then DeleteObjectsTable[d]=template2[i] d=d+1 end
	end	
	SpawnTemplate(ChangedObjectsTable,nil,0,0,attributes)
end

function SubtractiveDifferentialTemplateProcessing(template1,template2,attributes)
	local unchanged=false
	local newobj = false
	local DeleteObjectsTable = {}
	local d = 1
	local UnChangedObjectsTable = {}
	local u = 1
	local ChangedObjectsTable = {}
	local c = 1
	for i=1,getn(template1),1 do
		unchanged=false
		for j=1,getn(template2),1 do  
			if template1[i].type == template2[j].type and template1[i].x == template2[j].x and template1[i].y == template2[j].y and template1[i].team == template2[j].team then unchanged=true UnChangedObjectsTable[u]=template1[i] u=u+1 break end
		end
		if not unchanged and not IsEntryInTable(TemplateExclusionTable,template1[i].type) then ChangedObjectsTable[c]=template1[i] ChangedObjectsTable[c].ref=RandomString(5) c=c+1 end  --TemplateExclusionHashIndexTable[template1[i].hash]==nil 
	end
	for i=1,getn(template2),1 do
		unchanged=false
		for j=1,getn(UnChangedObjectsTable),1 do
			if template2[i].type == UnChangedObjectsTable[j].type and template2[i].x == UnChangedObjectsTable[j].x and template2[i].y == UnChangedObjectsTable[j].y and template2[i].team == UnChangedObjectsTable[j].team then unchanged=true break end
		end	
		if not unchanged then DeleteObjectsTable[d]=template2[i] d=d+1 end
	end	
	for i=1,getn(DeleteObjectsTable),1 do delete(DeleteObjectsTable[i].ref) end
end

function SaveTemplateFunction(TemplateFunctionName,Template,File)
	if Template == nil then Template=GetStringRefListOfAllObjects() end
	if TemplateFunctionName == nil then TemplateFunctionName=RandomString(5) end
	local TemplateFunctionString="function " .. "CreateTemplate_" .. TemplateFunctionName .. "()\n\t" .. TemplateFunctionName .. "={}\n"
	local ObjPos = {}
	local ObjectRefList = Template
	local SPReadyTable = {}
	local UpgReadyTable = {}
	local ObjStatusTable = {}
	local ObjPanelFlagsTable = {}
	for i=1,getn(ObjectRefList),1 do
		ObjPos.x=ObjectRefList[i].x
		ObjPos.y=ObjectRefList[i].y
		SPReadyTable = ObjectRefList[i].specialpowersreadytable
		if getn(SPReadyTable) > 0 then 
			TemplateFunctionString=TemplateFunctionString .. "\t" .. "local " .. "SpecialPowerReadyTable_" .. ObjectRefList[i]["ref"] .. "={"
			for i=1,getn(SPReadyTable),1 do
				TemplateFunctionString=TemplateFunctionString .. '"' .. SPReadyTable[i] .. '"'
				if i~=getn(SPReadyTable) then TemplateFunctionString=TemplateFunctionString .. "," end
			end
			TemplateFunctionString=TemplateFunctionString .. "}\n"
			else TemplateFunctionString=TemplateFunctionString .. "\t" .. "local " .. "SpecialPowerReadyTable_" .. ObjectRefList[i]["ref"] .. "={}\n"
		end
		UpgReadyTable = ObjectRefList[i].upgradestable
		if getn(UpgReadyTable) > 0 then 
			TemplateFunctionString=TemplateFunctionString .. "\t" .. "local " .. "ObjectStatusTable_" .. ObjectRefList[i]["ref"] .. "={"
			for i=1,getn(UpgReadyTable),1 do
				TemplateFunctionString=TemplateFunctionString .. '"' .. UpgReadyTable[i] .. '"'
				if i~=getn(UpgReadyTable) then TemplateFunctionString=TemplateFunctionString .. "," end
			end
			TemplateFunctionString=TemplateFunctionString .. "}\n"
			else TemplateFunctionString=TemplateFunctionString .. "\t" .. "local " .. "ObjectStatusTable_" .. ObjectRefList[i]["ref"] .. "={}\n"
		end
		ObjStatusTable = ObjectRefList[i].statustable
		if getn(ObjStatusTable) > 0 then 
			TemplateFunctionString=TemplateFunctionString .. "\t" .. "local " .. "ObjectUpgradesTable_" .. ObjectRefList[i]["ref"] .. "={"
			for i=1,getn(ObjStatusTable),1 do
				TemplateFunctionString=TemplateFunctionString .. '"' .. ObjStatusTable[i] .. '"'
				if i~=getn(ObjStatusTable) then TemplateFunctionString=TemplateFunctionString .. "," end
			end
			TemplateFunctionString=TemplateFunctionString .. "}\n"
			else TemplateFunctionString=TemplateFunctionString .. "\t" .. "local " .. "ObjectUpgradesTable_" .. ObjectRefList[i]["ref"] .. "={}\n"
		end
		ObjPanelFlagsTable = ObjectRefList[i].objectpanelflagstable
		if getn(ObjPanelFlagsTable) > 0 then 
			TemplateFunctionString=TemplateFunctionString .. "\t" .. "local " .. "ObjectPanelFlagsTable_" .. ObjectRefList[i]["ref"] .. "={"
			for i=1,getn(ObjPanelFlagsTable),1 do
				TemplateFunctionString=TemplateFunctionString .. '"' .. ObjPanelFlagsTable[i] .. '"'
				if i~=getn(ObjPanelFlagsTable) then TemplateFunctionString=TemplateFunctionString .. "," end
			end
			TemplateFunctionString=TemplateFunctionString .. "}\n"
			else TemplateFunctionString=TemplateFunctionString .. "\t" .. "local " .. "ObjectPanelFlags_" .. ObjectRefList[i]["ref"] .. "={}\n"
		end
		TemplateFunctionString=TemplateFunctionString .. "\tInsertToSpawnTemplate(" .. TemplateFunctionName .. "," .. '"' .. ObjectRefList[i]["type"] .. '"' .. "," .. ObjPos.x .. "," .. ObjPos.y .. "," .. 0 .. "," .. "RandomString(5)" .. "," .. ObjectRefList[i].orientation .. "," .. '"' .. ObjectRefList[i]["team"] .. '"' .. "," .. ObjectRefList[i].health .. "," .. "SpecialPowerReadyTable_" .. ObjectRefList[i]["ref"] .. "," .. "ObjectStatusTable_" .. ObjectRefList[i]["ref"] .. "," .. "ObjectUpgradesTable_" .. ObjectRefList[i]["ref"] .. "," .. ObjectRefList[i].rank .. "," .. ObjectRefList[i].skillpoints .. "," .. "ObjectPanelFlagsTable_" .. ObjectRefList[i]["ref"] .. "," .. GPOT[ObjectRefList[i]["team"]]["ai"] .. "," .. ObjectRefList[i].passengersbool .. "," .. "0" .. ")\n"
	end
	TemplateFunctionString=TemplateFunctionString .. "\tTemplateTable[" .. '"' .. TemplateFunctionName .. '"' .. "]=" .. TemplateFunctionName .. "\n"
	TemplateFunctionString=TemplateFunctionString .. "end" .. "   " .. "CreateTemplate_" .. TemplateFunctionName .. "()\n"
	if File==nil then out(TemplateFunctionString,GetFilePath() .. TemplatesFile) else out(TemplateFunctionString,File) end
end   --SaveTemplateFunction("Template1")

function SaveEssentialTemplateFunction(TemplateFunctionName,Template,File)
	if Template == nil then Template=GetStringRefListOfAllObjects() end
	if TemplateFunctionName == nil then TemplateFunctionName="Template" .. RandomString(5) end
	local TemplateFunctionString="function " .. "CreateTemplate_" .. TemplateFunctionName .. "()\n\t" .. TemplateFunctionName .. "={}\n"
	local ObjPos = {}
	local ObjectRefList = Template
	for i=1,getn(ObjectRefList),1 do
		ObjPos.x=ObjectRefList[i].x
		ObjPos.y=ObjectRefList[i].y
		TemplateFunctionString=TemplateFunctionString .. "\tInsertToSpawnTemplate(" .. TemplateFunctionName .. "," .. '"' .. ObjectRefList[i]["type"] .. '"' .. "," .. ObjPos.x .. "," .. ObjPos.y .. ")\n"
	end
	TemplateFunctionString=TemplateFunctionString .. "\tTemplateTable[" .. '"' .. TemplateFunctionName .. '"' .. "]=" .. TemplateFunctionName .. "\n"
	TemplateFunctionString=TemplateFunctionString .. "end" .. "   " .. "CreateTemplate_" .. TemplateFunctionName .. "()\n"
	if File==nil then out(TemplateFunctionString,GetFilePath() .. TemplatesFile) else out(TemplateFunctionString,File) end
end   --SaveEssentialTemplateFunction("Template1")

function SaveEssentialTemplateFunctionOfKindOf(TemplateFunctionName,Template,File,KindOf)
	if Template == nil then Template=GetStringRefListOfAllObjects() end
	if TemplateFunctionName == nil then TemplateFunctionName="Template" .. RandomString(5) end
	local TemplateFunctionString="function " .. "CreateTemplate_" .. TemplateFunctionName .. "()\n\t" .. TemplateFunctionName .. "={}\n"
	local ObjPos = {}
	local ObjectRefList = Template
	for i=1,getn(ObjectRefList),1 do
		if ObjectIsKindOf(ObjectRefList[i]["ref"],KindOf,ObjectRefList[i]["team"]) then
			ObjPos.x=ObjectRefList[i].x
			ObjPos.y=ObjectRefList[i].y
			TemplateFunctionString=TemplateFunctionString .. "\tInsertToSpawnTemplate(" .. TemplateFunctionName .. "," .. ObjectRefList[i]["type"] .. "," .. ObjPos.x .. "," .. ObjPos.y .. ")\n"
		end
	end
	TemplateFunctionString=TemplateFunctionString .. "end" .. "   " .. "CreateTemplate_" .. TemplateFunctionName .. "()\n"
	if File==nil then out(TemplateFunctionString) else out(TemplateFunctionString,File) end
end   --SaveEssentialTemplateFunctionOfKindOf(nil,nil,nil,"STRUCTURE")

function HandleTemplates()
	if FileExists(GetFilePath() .. TemplatesFile)==1 then
		dostring(LoadFileData(GetFilePath() .. TemplatesFile))
	end
end

function CreateNodBaseTemplate_1()
	NodBaseTemplate_1 = {}
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODConstructionYard",0,0) --center
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODCrane",10,-120)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODHandOfNOD",150,-20)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODDropZone",130,100)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODOperationsCenter",-100,-100)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODPowerPlant",-200,200)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODPowerPlant",-80,80)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODPowerPlant",-80,180)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODPowerPlant",-200,110)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODPowerPlant",0,80)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODPowerPlant",0,160)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODRefinery",150,-170)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODTechAssemblyPlant",-180,0)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODObelisk",-200,-200)
	InsertToSpawnTemplate(NodBaseTemplate_1,"NODObelisk",200,200)
	--WriteToFile(getn(NodBaseTemplate_1))
	TemplateTable["NodBaseTemplate_1"] = NodBaseTemplate_1
end --test: CreateNodBaseTemplate_1() SpawnTemplate(NodBaseTemplate_1,GetTeamName(object1),250,250)

function CreateCustomTemplates()
	CreateNodBaseTemplate_1()
end

------------------------------------------------------------

TimetravelFixpointTemplates= {}
TimetravelFixpointTemplates["past"]={}
TimetravelFixpointTemplates["future"]={}

function TimetravelCreatePastFixpoint(team)
	if team ~= nil then tinsert(TimetravelFixpointTemplates["past"],GetTemplate(team))
		else tinsert(TimetravelFixpointTemplates["past"],GetTemplate())
	end
end

function TimetravelCreateFutureFixpoint()  
end

function TimetravelToFixpoint(template)
	local TimetravelPreProcessing = function()
		ExecuteAction("SCREEN_SHAKE", SHAKE_INTENSITY["CINE_INSANE"])
		ExecuteAction("TERRAIN_RENDER_DISABLE",1)
		ExecuteAction("AUDIO_SET_REVERB_ROOM_TYPE","Psychotic")
		ExecuteAction("SUSPEND_BACKGROUND_SOUNDS")
		ExecuteAction("PLAY_SOUND_AS_IF_IT_WAS_AN_EVA_EVENT","TIMETRAVEL") --"GDI_Battleship_Alarm"
		--ExecuteAction("PLAY_SOUND_EFFECT","GDI_Battleship_Alarm")
		--ExecuteAction("MUSIC_PLAY_TRACK_FINITE_TIMES","GDI_Battleship_Alarm",2,1,1)
		ExecuteAction("DIM_WORLD_LIGHTS",255,255,255,1)
		ExecuteAction("DIM_WORLD_LIGHTS",random(255),random(255),random(255),1)
		--ExecuteAction("MOVIE_PLAY_FULLSCREEN", "TIMETRAVEL", 1)  
		ExecuteAction("SET_VISUAL_SPEED_MULTIPLIER", 10.0) 
		MuteAudio()
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "CamLockDummy", GenericDummyStay, NeutralTeam, "((0.00,0.00,0.00))", 0)
		ExecuteAction("CAMERA_FOLLOW_NAMED", "CamLockDummy", 1, 0.01)
		--ExecuteAction("DISABLE_INPUT")
		ExecuteAction("HIDE_UI")
		ExecuteAction("FREEZE_TIME")
	end  
	local TimetravelProcessing = function()
		local PastTemplate = {}
		if %template == nil then 
			if TimetravelFixpointTemplates["past"][getn(TimetravelFixpointTemplates["past"])] ~= nil then
				PastTemplate = TimetravelFixpointTemplates["past"][getn(TimetravelFixpointTemplates["past"])] 
			else print("no timetravel fixpoint set") pop() return end
		else PastTemplate=%template end
		DifferentialTemplateProcessing(PastTemplate,GetTemplate(),"AttributesYes")  --this is the actual core for timetravel, everything else is just for visual effects
		ToggleObjectTypeExistence("MetaControlDummyFreezeGame",HumanPlayerTable[1])
	end 
	local TimetravelPastProcessing = function()
		--if EvaluateCondition("HAS_FINISHED_VIDEO","TIMETRAVEL") then
		ExecuteAction("UNFREEZE_TIME")
		ToggleObjectTypeExistence("MetaControlDummyFreezeGame",HumanPlayerTable[1])
		ExecuteAction("TERRAIN_RENDER_DISABLE",0)
		ExecuteAction("AUDIO_REMOVE_REVERB")
		SetScriptTimer(5,'ExecuteAction("RESTORE_WORLD_LIGHTS",1)')
		SetScriptTimer(1,'ExecuteAction("TERRAIN_RENDER_DISABLE",1)')
		SetScriptTimer(2,'ExecuteAction("TERRAIN_RENDER_DISABLE",0)')
		SetScriptTimer(3,'ExecuteAction("TERRAIN_RENDER_DISABLE",1)')
		SetScriptTimer(4,'ExecuteAction("TERRAIN_RENDER_DISABLE",0)')
		ExecuteAction("SET_VISUAL_SPEED_MULTIPLIER",0.1)
		UnMuteAudio()
		ExecuteAction("CAMERA_STOP_TETHER_NAMED")
		ExecuteAction("CAMERA_ADD_SHAKER_AT","Player_1_Start",30.00,6.00,13000.00)
		SetScriptTimer(1,'ExecuteAction("MOVE_CAMERA_TO_NAMED",GetObj.String(GetBaseRef(LocalClientTeam)),0.00,0,0.00,0.00)')
		delete("CamLockDummy")
		--ExecuteAction("ENABLE_INPUT")	
		ExecuteAction("SHOW_UI")
		pop()	
	end
	TimetravelPreProcessing()
	TimetravelProcessing()
	push(TimetravelPastProcessing)
	--SetScriptTimer(2,TimetravelProcessing)
	--SetScriptTimer(2,push(TimetravelPastProcessing))
end

function TimetravelToFixpointLight(template)
	if template == nil then template = TimetravelFixpointTemplates["past"][getn(TimetravelFixpointTemplates["past"])] end
	DifferentialTemplateProcessing(template,GetTemplate(),"AttributesYes")
end


------------------------------------------------------------
------------------------------------------------------------

function ToggleTeamStatus(team,StringStatus)
    if not EvaluateCondition("TEAM_SOME_HAVE_OBJECT_STATUS", GetTeamName(object1), StringStatus) then  --"TEAM_ALL_HAS_OBJECT_STATUS"
		ExecuteAction("TEAM_CHANGE_OBJECT_STATUS", GetTeamName(object), StringStatus, 1)
		else
		ExecuteAction("TEAM_CHANGE_OBJECT_STATUS", GetTeamName(object), StringStatus, 0)	
	end
end

function ToggleModelCondition(object,modelcondition)
	if not ObjectTestModelCondition(object,modelcondition) then
		if duration == nil then duration = 10 end
		ExecuteAction("UNIT_SET_MODELCONDITION_FOR_DURATION",object,modelcondition,duration,100)
		--ExecuteAction("UNIT_SET_MODELCONDITION",object,(1-4)=(USER_1-USER_4),1) 
		else
		ExecuteAction("UNIT_CLEAR_MODELCONDITION",object,modelcondition)
	end
	--ExecuteAction("TEAM_SET_MODELCONDITION",object,1-4)=(USER_1-USER_4),1)
	--ExecuteAction("TEAM_CLEAR_MODELCONDITION", object,modelcondition, 1)
	--ExecuteAction("TEAM_SET_MODELCONDITION_FOR_DURATION",object,modelcondition,duration,perecentofhorde)
end

function ToggleObjectStatus(object,status,t) 
	local ObjRef=GetObj.String(object)
	if EvaluateCondition("UNIT_HAS_OBJECT_STATUS",ObjRef,ObjectStatusTable[status]) then
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",ObjRef,ObjectStatusTable[status],0)
		--ObjectSetObjectStatus(object,status)
		else
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",ObjRef,ObjectStatusTable[status],1)
	end
	--EvaluateCondition("TEAM_ALL_HAS_OBJECT_STATUS",team,ObjectStatusTable[status])
	--EvaluateCondition("TEAM_SOME_HAVE_OBJECT_STATUS",team,ObjectStatusTable[status])
end

function ToggleUpgrade(object,upgrade)
	if type(object)=="string" then
		if EvaluateCondition("UNIT_HAS_UPGRADE",object,upgrade) then ExecuteAction("NAMED_REMOVE_UPGRADE",object,upgrade)
		else ExecuteAction("NAMED_RECEIVE_UPGRADE",object,upgrade) end
		elseif type(objecct)=="table" then
		if ObjectHasUpgrade(object,upgrade) then ObjectRemoveUpgrade(object,upgrade)
		else ObjectGrantUpgrade(object,upgrade) end  
	end
end

function ToggleObjectPanelFlag(object,objectpanelflag)
	local ObjRef=GetObj.String(object)
	if EvaluateCondition("UNIT_TEST_OBJECT_PANEL_FLAGS", objectpanelflag, ObjRef) then 
        ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",ObjRef,objectpanelflag,0) 
	else ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",ObjRef,objectpanelflag,1) end
end

function DisableObject(object)
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Enabled", 0) 		  
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Indestructible", 1)	 
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Selectable", 0)	
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Player Targetable", 0)	
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Unsellable", 1)	 
	ObjectSetObjectStatus(GetObj.Table(object),"UNATTACKABLE")
end

function GiveObjectDummyAttributes(object)  
    local Status = {"NO_ATTACK","UNSELECTABLE","NO_COLLISIONS","UNATTACKABLE","CANNOT_BE_SOLD","IN_STASIS","IGNORE_AI_COMMAND","USER_PARALYZED","POWERED_DOWN_EMP","TEMPORARILY_DEFECTED"}
    for i=1,getn(),1 do
		ObjectSetObjectStatus(GetObj.Table(object),Status[i])
	end
	ExecuteAction("NAMED_SET_HELD", object, 1)
	ExecuteAction("NAMED_SET_STRICT_CONTROL_ENABLED", object, 1)
	ExecuteAction("NAMED_SET_SLEEP_STATUS", object, 1)
	ExecuteAction("UNIT_SET_STANCE", object, "HOLD_POSITION") 
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Enabled", 0) 		  
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Indestructible", 1)	 
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Selectable", 0)	
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Player Targetable", 0)	
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Unsellable", 1)
	ObjectForbidPlayerCommands(GetObj.Table(object),true)
end

function condition(conditionname)
    local result = EvaluateCondition(conditionname)
	if result == "false" then return false
	else return true end
end

function SetHealthForSquad(object,health)
	ExecuteAction("KILL_HORDE_MEMBERS",object,GetHealth(object)-health+1)
end

function SetObjectsRank(object,rank,objecttype)
    if objecttype == nil then objecttype=GetObj.Type(object) end
    ExecuteAction("UNIT_GIVE_EXPERIENCE_LEVEL",GetObj.String(object),objecttype .. ExperienceLevel_ .. rank)
end

function GiveMoney(team,ammount)
    local CounterBaseDummyRef = RandomString(3)
	local Tvalue = ammount
	local Cvalue = 0
	local MoneyCrateIndex = 1
	local length = floor(log10(Tvalue)+1)
	for i=1,length,1 do
		if i<4 then 
			Cvalue = mod(Tvalue,10)
			MoneyCrateIndex = 10^(i-1) 
			else
			Cvalue = Tvalue 	 
			MoneyCrateIndex = 1000 
		end		 
		local MoneyCrateIndex = tostring(MoneyCrateIndex)
		for j=1,Cvalue,1 do
			ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", RandomString(3), "MetaControlDummyMoney" .. MoneyCrateIndex, team, "((0.00,0.00,0.00))", 0)	  
		end 
	    if i==4 then return end
	    Tvalue = floor(Tvalue/10)
	end
end

function ToggleTeamIndestructible(team)
	if GPOT_Initialized == 1 then
		if GPOT[team]["Indestructible"] == 0 then 
			GPOT[team]["Indestructible"] = 1
			ExecuteAction("TEAM_AFFECT_OBJECT_PANEL_FLAGS", team, "Indestructible", 1)
			else 
			GPOT[team]["Indestructible"] = 0	
			ExecuteAction("TEAM_AFFECT_OBJECT_PANEL_FLAGS", team, "Indestructible", 0) 
		end
	end
end

function ToggleObjectIndestructible(self)
    if not EvaluateCondition("UNIT_TEST_OBJECT_PANEL_FLAGS", self, "Indestructible") then
		ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", self, "Indestructible", 1)	 
		else
		ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", self, "Indestructible", 0)	 
	end	 	   
end

function GetSuperAvatar()
    local ref = spawn("NodAvatar")
    local self=GetObj.Table(ref)
	ObjectHideSubObjectPermanently( self, "NUBEAM", false )
	ObjectHideSubObjectPermanently( self, "FLAMETANK", false )
	ObjectHideSubObjectPermanently( self, "S_DETECTOR", false )
	ObjectHideSubObjectPermanently( self, "S_GENERATOR", false )
    ObjectGrantUpgrade(self, "Upgrade_AvatarBeamCannon")
    ObjectGrantUpgrade(self, "Upgrade_AvatarStealthDetect")
    ObjectGrantUpgrade(self, "Upgrade_AvatarFlamer")
    ObjectGrantUpgrade(self, "Upgrade_AvatarStealthDetect")
    ObjectGrantUpgrade(self, "Upgrade_AvatarInvisibility")
    ObjectGrantUpgrade(self, "Upgrade_Veterancy_VETERAN")
    ObjectGrantUpgrade(self, "Upgrade_Veterancy_ELITE")
    ObjectGrantUpgrade(self, "Upgrade_Veterancy_HEROIC")
	ExecuteAction("UNIT_SET_EXPERIENCE_POINTS",ref,50000) 
    --ExecuteAction("UNIT_GIVE_EXPERIENCE_LEVEL",Asset)
	return ref
end

function NukeObject(Object)
    ObjectCreateAndFireTempWeapon(GetObj.Table(Object),"NuclearMissile")
end

function FireWeaponOnObject(Object, Weapon)
    ObjectCreateAndFireTempWeapon(GetObj.Table(Object),Weapon)
end

function FireWeaponPosition(Weapon,x,y,waypoint,OnObjectType)
	local alpha = ""
	if waypoint==nil and OnObjectType==nil then alpha= SpawnAtPosition(GenericDummy,NeutralTeam,x,y,0,0,0,0,1,0)
	else alpha=spawn(GenericDummy,NeutralTeam,1,nil,waypoint,nil,OnObjectType) end
	local WeaponFire = function() ObjectCreateAndFireTempWeapon(GetObj.Table(%alpha),%Weapon) pop() end
	push(WeaponFire)   
end

function CommandButtonAbilityAtPosition(CommandButtonAbility,x,y) --unfinished concept
	SpawnAtPosition("HugeValueObject",x,y,NeutralTeam)
	ExecuteAction("SKIRMISH_PERFORM_COMMANDBUTTON_ON_MOST_VALUABLE_OBJECT",NeutralTeam,CommandButtonAbility,13000,1)
end

function OCLWeaponScriptExtender(self)
end

function ToggleObjectExistence(object)
	if not EvaluateCondition("NAMED_NOT_DESTROYED",GetObj.String(object)) then 
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",RandomString(5),GetObj.Type(object),GetTeamName(object),"((0.00,0.00,0.00))", 0)
	else delete(object) end
end

function ToggleObjectTypeExistence(ObjectType,team)
	local TRef=RandomString(5)
	ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",ObjectType,team,TRef)
	if not EvaluateCondition("NAMED_NOT_DESTROYED",TRef) then 
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",RandomString(5),ObjectType,team,"((0.00,0.00,0.00))", 0)
	else delete(TRef) end
end

function DeleteAllObjectsFromOtherTeams(team)
	local REFLIST = {}
	for i=1,getn(GlobalTeamTable),1 do
		if GlobalTeamTable[i] == team then break
			else
			REFLIST=GetStringRefListOfAllObjectsForTeam(GlobalTeamTable[i])
			for j=1,getn(REFLIST),1 do delete(REFLIST[j].ref) end
		end
	end
	REFLIST=GetStringRefListOfAllObjectsForTeam(CreepsTeam)
	for j=1,getn(REFLIST),1 do delete(REFLIST[j].ref) end
	REFLIST=GetStringRefListOfAllObjectsForTeam(CivilianTeam)
	for j=1,getn(REFLIST),1 do delete(REFLIST[j].ref) end 
	REFLIST=GetStringRefListOfAllObjectsForTeam(NeutralTeam)
	for j=1,getn(REFLIST),1 do delete(REFLIST[j].ref) end 
end 

function DeleteAllObjectsWithRef(ObjectRef)
	while GetObj.AliveState(ObjectRef) do out("jo")  delete(ObjectRef) end
end

function MetaControlDummyFreezeGame(self)
end

function flash(input)
	if type(input) == "table" or strfind(tostring(input), "objref_") ~= nil or (strfind(tostring(input), "_") and not strfind(input,"Team")) then
		ExecuteAction("NAMED_FLASH_WHITE", input, 3)	  
		elseif type(input) == "string" then  
		ExecuteAction("TEAM_FLASH_WHITE", input, 3)
	end
end

function FreezeMovie(radarmovie) --bug exploit
	ExecuteAction("MOVIE_PLAY_RADAR", radarmovie)
	SetScriptTimer(2,'ExecuteAction("HIDE_UI")')
	SetScriptTimer(2,'ExecuteAction("SHOW_UI")')
end

function CinemaMode(time)
	ExecuteAction("HIDE_UI")
	SetScriptTimer(time,'ExecuteAction("SHOW_UI")')
end

function AmbientLighstNightMode()
	ExecuteAction("DIM_WORLD_LIGHTS",0,0,0,1)
end

function RandomRGBWorldLights()
	local GetRGBMix = function() RGBMix={[1]={1,0,0},[2]={1,1,0},[3]={1,0,1},[4]={0,1,0},[5]={0,1,1},[6]={0,0,1},[7]={3,3,3}} return RGBMix[random(1,7)] end
	local RGBMix = GetRGBMix()
	ExecuteAction("DIM_WORLD_LIGHTS",RGBMix[1],RGBMix[2],RGBMix[3],1)
end

function FirstPersonMode(team,object,duration,observermode,hideui,psychedelic)
    if team == nil then team=LocalClientTeam end --adjust
    if duration==nil then duration=60 end
	if object==nil then object=GetSelectedUnitRef() end
	if object==nil then 
		object=spawn("NodCommando",team)
		SelectObject("NodCommando",team)
	end
	ExecuteAction("PITCH_CAMERA",0.01, 1, 1, 1)	
    ExecuteAction("CAMERA_FOLLOW_NAMED",object, 1, 3.01)
    --ExecuteAction("CAMERA_TETHER_NAMED",object, 0, 1.00) 	
	if hideui~=nil then ExecuteAction("HIDE_UI") end
    if observermode~=nil then 
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",object,ObjectStatusTable["UNATTACKABLE"],1)
		--ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",object,ObjectStatusTable["UNSELECTABLE"],1)
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",object,ObjectStatusTable["NO_COLLISIONS"],1)
		--STEALTHED HIDDEN
		ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",object,"Indestructible",1) 
		--ObjectSetObjectStatus(GetObj.Table(object),"UNATTACKABLE") 	  
		--ToggleObjectPanelFlag(object,"Selectable")
		--ToggleObjectPanelFlag(object,"Indestructible")
		--ToggleObjectStatus(object,"UNATTACKABLE") 
	end
	local PsychoLights = function() ExecuteAction("DIM_WORLD_LIGHTS", random(256) , random(256) , random(256), 1) end
	if psychedelic ~= nil then SetScriptTimer(1,RandomRGBWorldLights,duration/2) end
    StartDynamicCameraAngleAdjustment(object,duration)
end

function ThirdPersonMode(team,object,duration,observermode,hideui,narrow)
    if team == nil then team=LocalClientTeam end --adjust
    if duration==nil then duration=60 end
	if object==nil then object=GetSelectedUnitRef() end
	if object==nil then 
		object=spawn("SteelTalonsBehemoth",team)
		SelectObject("SteelTalonsBehemoth",team)
	end	
	local dist = 70.00
	local pitch = 0.5
	if narrow then dist=20 pitch=0.1 end
	ExecuteAction("PITCH_CAMERA", pitch, 1, 1, 1)
    ExecuteAction("CAMERA_FOLLOW_NAMED",object, 1, dist)
	if hideui~=nil then ExecuteAction("HIDE_UI") end
    if observermode~=nil then 
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",object,ObjectStatusTable["UNATTACKABLE"],1)
		--ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",object,ObjectStatusTable["UNSELECTABLE"],1)
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",object,ObjectStatusTable["NO_COLLISIONS"],1)
		ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",object,"Indestructible",1) 
		--ObjectSetObjectStatus(GetObj.Table(object),"UNATTACKABLE") 	  
		--ToggleObjectPanelFlag(object,"Selectable")
		--ToggleObjectPanelFlag(object,"Indestructible")
		--ToggleObjectStatus(object,"UNATTACKABLE") 
	end
	--SetScriptTimerFast(0.1,DynamicCameraAngleAdjustment,10*duration/2)
    StartDynamicCameraAngleAdjustment(object,duration)
end

DynamicCameraAngleAdjustmentInit=0

function StartDynamicCameraAngleAdjustment(object,duration)
	if DynamicCameraAngleAdjustmentInit==0 then 
		DynamicCameraAngleAdjustmentInit=1
		local reset = function() 
			DynamicCameraAngleAdjustmentInit=0 
			ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",%object,"Indestructible",0) 
			ResetCamera() 
		end
		if duration == -1 then 
			SetScriptTimerFast(0.1,DynamicCameraAngleAdjustment,-1)
		else
			SetScriptTimerFast(0.1,DynamicCameraAngleAdjustment,10*duration)	 --FPS_Limit  0.033
			SetScriptTimerFast(duration+1,reset,1)
		end
	end
end

function DynamicCameraAngleAdjustment(object)
	if object==nil and StorageTable["angle_adjust"]==nil then object=GetSelectedUnitRef()
	else object=StorageTable["angle_adjust"]["ref"] if object==nil then return end end
	if StorageTable["angle_adjust"]==nil or (StorageTable["angle_adjust"]~=nil and StorageTable["angle_adjust"]["ref"]~=object) then
		StorageTable["angle_adjust"]={}
		StorageTable["angle_adjust"]["ref"]=object
		local ObjectPosition = GetObjectPosition(StorageTable["angle_adjust"]["ref"])
		StorageTable["angle_adjust"]["last_x"]=ObjectPosition.x
		StorageTable["angle_adjust"]["last_y"]=ObjectPosition.y
		else
		--if GetObj.AliveState(StorageTable["CurrentUnitInViewMode"]) then MetaControlFirstAndThirdPersonMode(nil,nil,"reset") return end
		local position = GetObjectPosition(StorageTable["angle_adjust"]["ref"])
		StorageTable["angle_adjust"]["current_x"]=position.x
		StorageTable["angle_adjust"]["current_y"]=position.y
		if StorageTable["angle_adjust"]["current_x"]~=StorageTable["angle_adjust"]["last_x"] or StorageTable["angle_adjust"]["current_y"]~=StorageTable["angle_adjust"]["last_y"] then
			local dif_y=StorageTable["angle_adjust"]["current_y"]-StorageTable["angle_adjust"]["last_y"]
			local dif_x=StorageTable["angle_adjust"]["current_x"]-StorageTable["angle_adjust"]["last_x"]
			local angle = 0
			if dif_y>=0 and dif_x<=0 then angle=round(atan(abs((dif_x)/(dif_y))))
			elseif dif_y<=0 and dif_x<=0 then angle=90+round(atan(abs((dif_y)/(dif_x)))) 
			elseif dif_y<=0 and dif_x>=0 then angle=180+round(atan(abs((dif_x)/(dif_y))))
			elseif dif_y>=0 and dif_x>=0 then angle=270+round(atan(abs((dif_y)/(dif_x))))	 
			end
			ExecuteAction("ROTATE_CAMERA_TO_ANGLE",angle,0.5,0.1,0.1)
			StorageTable["angle_adjust"]["last_x"]=StorageTable["angle_adjust"]["current_x"]
			StorageTable["angle_adjust"]["last_y"]=StorageTable["angle_adjust"]["current_y"]
		end
	end
	--SetScriptTimer(1,AdjustCameraAngle,-1)
	--ExecuteAction("CAMERA_LOOK_TOWARD_OBJECT",taking,holding,easein,easeout,zoffset)	
	--ExecuteAction("NAMED_FACE_NAMED",Unit1,Unit2)
end

function ResetCamera()
	ExecuteAction("CAMERA_SET_DEFAULT",0.00,0.00,1)
	ExecuteAction("CAMERA_STOP_TETHER_NAMED")
	ExecuteAction("CAMERA_STOP_FOLLOW")
	ExecuteAction("ROTATE_CAMERA_TO_ANGLE",0,0,0,0)
	ExecuteAction("PITCH_CAMERA",1,1,1,1)
    ExecuteAction("ZOOM_CAMERA",1, 1, 1, 1)	
	ExecuteAction("LOCK_CAMERA",0)
	ExecuteAction("LOCK_CAMERA_ZOOM",0)
	ExecuteAction("LOCK_CAMERA_ROTATION",0)
	ExecuteAction("LOCK_CAMERA_SCROLL",0)
	ExecuteAction("LOCK_CAMERA_RESET",0)
	ExecuteAction("LOCK_CAMERA_ANGLE_AND_HEIGHT",0)	
	ExecuteAction("RESET_CAMERA_TUTORIAL_STATE")
	ExecuteAction("DIM_WORLD_LIGHTS",1,1,1,0)
	ExecuteAction("RESTORE_WORLD_LIGHTS",1)
    ExecuteAction("SHOW_UI")	
end 

FirstAndThirdPersonState=0
FirstAndThirdPersonPsychedelicState=0
StorageTable["CurrentUnitInViewMode"]=nil

function MetaControlFirstAndThirdPersonMode(self,psychedelic,doreset)  --use this instead of the old view change functions above
    local unitref = GetSelectedUnitRef()
	local observermode = function(state)
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",StorageTable["CurrentUnitInViewMode"],ObjectStatusTable["UNATTACKABLE"],state)
		ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",StorageTable["CurrentUnitInViewMode"],ObjectStatusTable["NO_COLLISIONS"],state)
		ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",StorageTable["CurrentUnitInViewMode"],"Indestructible",state) 
		--ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",object,ObjectStatusTable["UNSELECTABLE"],1)		  
		--ObjectSetObjectStatus(GetObj.Table(object),"UNATTACKABLE") 	  
		--ToggleObjectPanelFlag(object,"Selectable")
		--ToggleObjectPanelFlag(object,"Indestructible")
		--ToggleObjectStatus(object,"UNATTACKABLE") 
	end	
	local reset = function()
		FirstAndThirdPersonState=0
		DeleteScriptTimerFastAction(DynamicCameraAngleAdjustment)
		FirstAndThirdPersonPsychedelicState=0
		DeleteScriptTimerAction(RandomRGBWorldLights)
		StorageTable["angle_adjust"]={}
		StorageTable["angle_adjust"]["ref"]=%unitref
		local position = GetObjectPosition(%unitref)
		StorageTable["angle_adjust"]["last_x"]=position.x
		StorageTable["angle_adjust"]["last_y"]=position.y
		DynamicCameraAngleAdjustmentInit=0
		ResetCamera()	
		StorageTable["CurrentUnitInViewMode"]=%unitref
		if FirstAndThirdPersonObserver==1 then %observermode(0) end
	end
	if doreset~=nil then reset() return end
	if psychedelic ~= nil and FirstAndThirdPersonPsychedelicState==0 then FirstAndThirdPersonPsychedelicState=1 SetScriptTimer(1,RandomRGBWorldLights,-1) end	
	if unitref ~= StorageTable["CurrentUnitInViewMode"] then reset() end
	if unitref ~= nil then
		if FirstAndThirdPersonState==0 then
	   	    FirstAndThirdPersonState=1
			ExecuteAction("PITCH_CAMERA", 0.5, 1, 1, 1)
			ExecuteAction("CAMERA_FOLLOW_NAMED", unitref, 1, 70.00)
            if DynamicCameraAngleAdjustmentInit==0 then StartDynamicCameraAngleAdjustment(unitref,-1) end
			if FirstAndThirdPersonObserver==1 then observermode(1) end
			elseif FirstAndThirdPersonState==1 then
	   	    FirstAndThirdPersonState=2
			ExecuteAction("PITCH_CAMERA", 0.3, 1, 1, 1)
			ExecuteAction("CAMERA_FOLLOW_NAMED", unitref, 1, 15.00)
            if DynamicCameraAngleAdjustmentInit==0 then StartDynamicCameraAngleAdjustment(unitref,-1) end
			if FirstAndThirdPersonObserver==1 then observermode(1) end
			elseif FirstAndThirdPersonState==2 then
			FirstAndThirdPersonState=3
			ExecuteAction("PITCH_CAMERA",-0.1, 1, 1, 1)	
			ExecuteAction("CAMERA_FOLLOW_NAMED",unitref, 1, 3.01)
            if DynamicCameraAngleAdjustmentInit==0 then StartDynamicCameraAngleAdjustment(unitref,-1) end
			if FirstAndThirdPersonObserver==1 then observermode(1) end
			elseif FirstAndThirdPersonState==3 then
            reset()
		end
		else reset()
	end
end

function MuteAudio()
	ExecuteAction("AUDIO_FADE_VOLUME",0.00,0.00,0.00,0.00,0.00)
end

function UnMuteAudio()
	ExecuteAction("AUDIO_FADE_VOLUME",1.00,0.00,0.00,0.00,0.00)
end

function GetFPS()
	if FPS == nil then 
		SetScriptTimer(1,"GetFPS()") 
		FPS=GetFrame()
		else 
		local FPS_temp = FPS
		FPS = nil
		print("FPS: " .. tostring(4*(GetFrame()-FPS_temp)))
		--return GetFrame()-FPS_temp 
	end
end

function GetPlayTime()
	return floor(GetFrame()/(FPS_Limit*60))
end

----------------------------------------------------------
-------------GAME PRE-SETUP-------------------------------
----------------------------------------------------------

function ToggleInfiniteTiberium()
	if InfiniteTiberium_Status==0 then EnableInfiniteTiberium()
	else DisableInfiniteTiberium() end
end

function EnableInfiniteTiberium()
	local TibCount = CountTeamsKindOf(NeutralTeam,"TIBERIUM")
	local TibFieldCount = CountTeamsKindOf(NeutralTeam,"TIBERIUM_FIELD") 
	local TRef=""
	local TRefTable={}
	ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumFieldList", "TiberiumField")
    ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumFieldList", "TiberiumFieldBlue")
	ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumCrystalTypeList", "TiberiumCrystal")
    ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumCrystalTypeList", "TiberiumCrystalBlue")
	for i=1,TibFieldCount,1 do
		TRef=RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE","TiberiumFieldList",NeutralTeam,TRef)
		if EvaluateCondition("NAMED_NOT_DESTROYED",TRef) then 
			tinsert(TRefTable,TRef)
			ExecuteAction("UNIT_SET_TEAM",TRef,CivilianTeam)
			ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", TRef, "Enabled", 0) 
		end
	end
	for i=1,TibFieldCount,1 do ExecuteAction("UNIT_SET_TEAM",TRefTable[i],NeutralTeam) end	
	for i=1,TibCount,1 do 
		TRef=RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE","TiberiumCrystalTypeList",NeutralTeam,TRef)
		if EvaluateCondition("NAMED_NOT_DESTROYED",TRef) then 
			--tinsert(TRefTable,TRef)
			ExecuteAction("UNIT_SET_TEAM",TRef,CivilianTeam)
			ExecuteAction("NAMED_RECEIVE_UPGRADE",TRef,"Upgrade_TiberiumCrystalInfinite")
		end
	end
end   --EnableInfiniteTiberium()

function DisableInfiniteTiberium()
    RemoveAllTiberium()
	local TibFieldCount = CountTeamsKindOf(NeutralTeam,"TIBERIUM_FIELD") 
	local TRef=""
	local TRefTable={}
	ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumFieldList", "TiberiumField")
    ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumFieldList", "TiberiumFieldBlue")
	for i=1,TibFieldCount,1 do
		TRef=RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE","TiberiumFieldList",NeutralTeam,TRef)
		if EvaluateCondition("NAMED_NOT_DESTROYED",TRef) then 
			tinsert(TRefTable,TRef)
			ExecuteAction("UNIT_SET_TEAM",TRef,CivilianTeam)
			ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", TRef, "Enabled", 1) 
		end
	end
	for i=1,TibFieldCount,1 do ExecuteAction("UNIT_SET_TEAM",TRefTable[i],NeutralTeam) end	
end

function RemoveAllTiberium()
	local TibCount = CountTeamsKindOf(NeutralTeam,"TIBERIUM")
	local TibFieldCount = CountTeamsKindOf(NeutralTeam,"TIBERIUM_FIELD") 
	local TRef=""
	local TRefTable={}
	ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumFieldList", "TiberiumField")
    ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumFieldList", "TiberiumFieldBlue")
	ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumCrystalTypeList", "TiberiumCrystal")
    ExecuteAction("OBJECTLIST_ADDOBJECTTYPE", "TiberiumCrystalTypeList", "TiberiumCrystalBlue")
	for i=1,TibFieldCount,1 do
		TRef=RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE","TiberiumFieldList",NeutralTeam,TRef)
		if EvaluateCondition("NAMED_NOT_DESTROYED",TRef) then 
			tinsert(TRefTable,TRef)
			ExecuteAction("UNIT_SET_TEAM",TRef,CivilianTeam)
			ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", TRef, "Enabled", 0) 
		end
	end
	for i=1,TibFieldCount,1 do ExecuteAction("UNIT_SET_TEAM",TRefTable[i],NeutralTeam) end	
	for i=1,TibCount,1 do 
		TRef=RandomString(5)
		ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE","TiberiumCrystalTypeList",NeutralTeam,TRef)
		if EvaluateCondition("NAMED_NOT_DESTROYED",TRef) then 
			--tinsert(TRefTable,TRef)
			ExecuteAction("UNIT_SET_TEAM",TRef,CivilianTeam)
			ExecuteAction("NAMED_DELETE",TRef)
		end
	end
end   --RemoveAllTiberium()


function SpawnInfiniteTiberiumCrytalNextToBase(team)
	local position=GetObjectPosition(GetBaseRef(team))
	local REF = RandomString(5)
	SpawnAtPosition("TiberiumCrystal",team,position.x+50,position.y,0,REF,0,0,1,1)
	local GiveUpgrade = function() ExecuteAction("NAMED_RECEIVE_UPGRADE",%REF,"Upgrade_TiberiumCrystalInfinite") pop() end
	push(GiveUpgrade)
end

function SpawnTiberiumFieldNextToBase(team)
	local position=GetObjectPosition(GetBaseRef(team))
	local REF = RandomString(5)
	SpawnAtPosition("TiberiumField",NeutralTeam,position.x+200,position.y,0,REF,0,0,1,1)
end

function SpawnObjectTypeNextToBase(ObjectType,team,offsetx,offsety,postaction)
	if offsetx==nil or offsetx==0 then offsetx=25 end
	if offsety==nil or offsety==0 then offsety=25 end
	local position=GetObjectPosition(GetBaseRef(team))
	local REF = RandomString(5)
	SpawnAtPosition(ObjectType,team,position.x+offsetx,position.y+offsety,0,REF,0,0,1,0)
	if postaction~=nil then 
		local action = function() if type(%postaction)=="function" then %postaction() else dostring(%postaction) end pop() end
		push(action)
	end
end

function MainTabMenuSpawnerKill(self)
	if Meta_Control_Options_Tab_Menu == 0 then
		ExecuteAction("NAMED_DELETE", self)
		else
		GPUT[GetTeamName(self)] = {} 
		GPUT[GetTeamName(self)]["MainTabMenu"] = GetObj.String(self) 
	end
end

function MoneyTransmitterSpawnerKill(self)
    if Send_Money_Option == 0 then
		ExecuteAction("NAMED_DELETE", self)
	end 
end

function DisableMetaModMenus(self,all)
	--local team = GetTeamName(self)
	local ObjectsToDelete={
		"MetaControlDummyMainTabMenu","MetaControlDummyMain","MetaControlDummyGlobalDeactivator","MetaControlDummyMainTabMenuPlayerPower","MetaControlDummyActivator",
		"InfiniteEnergyDummy","BuildAnywhereDummy","InfiniteProductionSpeedDummy","MetaControlDummyFreezeGame",
		"MetaControlDummyEnemyAIOFF","MetaControlDummyEveryAIOFF","MetaControlDummyMoney5k","MetaControlDummyMapRevealer"
		--"MetaCreditShop","MetaControlDummyDiplomacyTabMenu"
	}
	if all~=nil then tinsert(ObjectsToDelete,"MetaCreditShop") tinsert(ObjectsToDelete,"MetaControlDummyDiplomacyTabMenu") end
	local TREF = ""
	for j=1,getn(HumanPlayerTable),1 do
		for i=1,getn(ObjectsToDelete),1 do
			TREF = RandomString(5)
			ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE",ObjectsToDelete[i],HumanPlayerTable[j],TREF)
			delete(TREF)
		end
	end
	if BFMEIIROTWK_ACTIVE == 1 then ExecuteAction("DISPLAY_NOTIFICATION_BOX", "Generic", "\n\nCLOSING MENU\n\n", 1)
	else ExecuteAction("HIDE_TUTORIAL_TEXT") end
end

function MakePlayerIndestructible(self)
    ToggleTeamIndestructible(GetTeamName(self))   
end

function SuperweaponsBuildability(what)
	local BUILDABILITY_TYPE = {["YES"]=0, ["IGNORE_PREREQUISITES"]=1, ["NO"]=2, ["ONLY_BY_AI"]=3}	
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "GDIIonCannonControl", BUILDABILITY_TYPE[what])
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "SteelTalonsIonCannonControl", BUILDABILITY_TYPE[what])	
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "ZOCOMIonCannonControl", BUILDABILITY_TYPE[what])
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "NODTempleOfNOD", BUILDABILITY_TYPE[what])
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "BlackHandTempleOfNOD", BUILDABILITY_TYPE[what])
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "MarkedOfKaneTempleOfNOD", BUILDABILITY_TYPE[what])
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "AlienRiftGenerator", BUILDABILITY_TYPE[what])
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "Reaper17RiftGenerator", BUILDABILITY_TYPE[what])
	ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "Traveler59RiftGenerator", BUILDABILITY_TYPE[what])
end

function SuperweaponsBuildability(what)
	local BUILDABILITY_TYPE = {["YES"]=0, ["IGNORE_PREREQUISITES"]=1, ["NO"]=2, ["ONLY_BY_AI"]=3}	
	local Superweapon_Buildings = 
	{ 
		"GDIIonCannonControl", "SteelTalonsIonCannonControl", "ZOCOMIonCannonControl", 
		"NODTempleOfNOD", "BlackHandTempleOfNOD", "MarkedOfKaneTempleOfNOD",
		"AlienRiftGenerator", "Reaper17RiftGenerator","Traveler59RiftGenerator" 
	}
	for n=1,getn(Superweapon_Buildings),1 do
		ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", Superweapon_Buildings[n], BUILDABILITY_TYPE[what])
	end
end

function GenericCrateSpawnerFunction(self)
end

function NoSuperweaponsOptionFunction(self)
	SuperweaponsBuildability("NO")
	ExecuteAction("NAMED_DELETE",GetObj.NextObjectTypeRef("GenericCrateSpawner",NeutralTeam))
	if getn(GlobalTeamTable)>0 then 
		for i=1,getn(GlobalTeamTable),1 do
			ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", RandomString(5), "MetaControlDummySuperweaponOFF", GlobalTeamTable[i], "((0.00,0.00,0.00))", 0) 
		end  
	end
end 

function SpawnVictoryConditionHelperForTeam(team)
	--GetWaypointTable()  
	local TeamIndex=GetIndexOfTableElement(GlobalTeamTable,team)  --GetTeamNumber(team)
	if IsEntryInTable(WaypointTable,GetPlayerStartWaypointByTeam(team)) then
		ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT","VictoryConditionHelper_" .. TeamIndex,VictoryConditionHelper,team,GetPlayerStartWaypointByTeam(team))	
		else
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION","VictoryConditionHelper_" .. TeamIndex,VictoryConditionHelper,team, "((0.00,0.00,0.00))", 0)
	end
end

function DelayedGameSetupFunction()
	LocalClientNameInit=true --now all clients should have their names
	--if EvaluateCondition("HAS_FINISHED_VIDEO","METAMODINTRO") then
	if GetObj.AliveState("MetaModScriptComObjectServerRef") then
		SetCounter("METAMOD_MAPSCRIPT", 1, nil, "no_display")
		SetCounter("METAMOD_EXTENDED_DIPLOMACY", 1, nil, "no_display")
	end 
	HandleSavegame()
	--GetFileLists()
	CreateCustomTemplates()
	if MetaCreditShop_SandboxMode == 1 then MetaCreditShopSandboxMode() end
	if MetaCreditShop_AlwaysOff~=1 and MetaCreditShop_AlwaysOn==1 then EnableMetaCreditShop() end
	if Diplomacy_System == 1 then DiplomacyGamemodeSetup() end
	for i=1,getn(HumanPlayerTable),1 do
		if CameraSetupButton==1 then spawn("MetaControlDummyCameraSetupButtonProvider",HumanPlayerTable[i],1,"CameraSetupProvider" .. RandomString(3)) end
		if InfiniteEnergy==1 then spawn("InfiniteEnergyDummy",HumanPlayerTable[i]) end	
		if InfiniteProductionSpeed==1 then spawn("InfiniteProductionSpeedDummy",HumanPlayerTable[i]) end
		if BuildAnywhere==1 then spawn("BuildAnywhereDummy",HumanPlayerTable[i]) end	
		if AI_CoControls_Human_Player==1 then ExecuteAction("TEAM_AI_TRANSFER", HumanPlayerTable[i], AI_CoControls_Human_Player) end
		--if Diplomacy_System == 1 then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "DiplomacyTabMenu" .. tostring(i), "MetaControlDummyDiplomacyTabMenu", HumanPlayerTable[i], "((0.00,0.00,0.00))", 0) end        
		--if Map_Revealed == 1 then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "MapRevealer" .. tostring(i), "MetaControlDummyPermanentMapRevealer", HumanPlayerTable[i], "((0.00,0.00,0.00))", 0) end
		if Human_Player_Indestructible == 1 then ToggleTeamIndestructible(HumanPlayerTable[i]) end
		if Enemy_KindOf_Counter_every3s == 1 then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "PerHumanPlayerPeriodicChecker" .. HumanPlayerTable[i], "PerHumanPlayerPeriodicChecker", HumanPlayerTable[k], "((0.00,0.00,0.00))", 0) end       
		if FirstAndThirdPersonModeButton==1 then spawn("MetaControlDummyViewChangerButtonProvider",HumanPlayerTable[i]) end
	end
	if NativeArtOfDefense == 1 or NAOD.MapIntegration==1 or NAOD.MapIntegration==2 then NAOD.InitializeNativeArtOfDefense() end
	for u=1,getn(GlobalTeamTable),1 do
		if GPOT[GlobalTeamTable[u]]["ai"]==1 then
			if AI_Begin_Build_Delay > 0 then 
				--SetScriptTimer(AI_Begin_Build_Delay,"")
			end
		end	 
	end
	if (Control_AlliedAI_After_Defeat==1 or Control_EnemyAI_After_Defeat==1) and CustomGameFinishConditionCheck~=1 then
		CustomGameFinishConditionCheck = 1
		for i=1,getn(HumanPlayerTable),1 do SpawnVictoryConditionHelperForTeam(HumanPlayerTable[i]) end
		ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 0)	
	else ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", Game_Continue_After_End) end
	-- if No_Damage_Start_Time > 0 then 
	-- for i=1,getn(GlobalTeamTable),1 do 
	-- local Task = function() ToggleTeamIndestructible(%GlobalTeamTable[%i]) end
	-- SetScriptTimer(No_Damage_Start_Time,Task)
	-- end		
	-- end
	HandleModScripts()  
	HandleTemplates()
end

function VanillaSettings()
	AutoConfig_General						= 0
	AutoConfig_Skirmish						= 0
	AutoConfig_Multiplayer					= 0
	AutoConfig_StoryMode					= 0
	AutoConfig_GlobalConquestMode	= 0
	ModScriptsAutoLoadList					= no
	ModScriptsAlwaysOff						= no
	LiveInputFile									= "LIVE_INPUT.lua"
	LiveOutputFile								= "LIVE_OUTPUT.txt"
	TemplatesFile								= "templates.txt"
	ErrorFileLog                  = "ErrorLog.txt"
	ErrorLogToFile                = 0
	ErrorWarnings                 = 0
	ErrorExitType                 = 0
	ErrorSound                    = 0
	Force_Lua_Script_Button       = 0
	ExternaLuaCodeCoroutine = 0
	Dev_Mode                      = 0
	Meta_Control_Options_Tab_Menu = 0
	Old_Meta_Control_Option_Bar   = 0
	Send_Money_Option             = 0
	No_Superweapons               = 0
	No_Superweapons_AI            = 0
	Adaptive_Auto_AI_Boost        = 0
	AI_Boost_Cash_Ammount_PerSec  = 0
	AI_Boost_Unit_Spawner         = 0
	AI_Boost_Include_Human_Player = 0
	Enable_GuardShieldEmitter     = 0
	MetaTabMenuUnitSpawnSelection = "NodCommando"
	Human_Player_Indestructible   = 0
	No_Damage_Start_Time          = 0
	AI_Begin_Build_Delay          = 0
	InfiniteEnergy                = 0
	InfiniteProductionSpeed       = 0
	BuildAnywhere                 = 0
	No_Tiberium                   = 0
	Infinite_Tiberium             = 0
	Disable_Fog_Of_War            = 0
	Map_Reshroud_Time             = 5
	Disable_Map_Borders           = 0
	Random_Meteorites             = 0
	Stealth_For_Units_Enabled     = 1
	Hulk_Lifetime_Override        = 0
	Hulk_Lifetime                 = 5.0 
	Disable_Scoring               = 0
	Freeze_Time                   = 0
	EVA_Disabled                  = 0
	AI_CoControls_Human_Player    = 0
	EvolutionaryUnitAI_Available  = 0
	Enemy_KindOf_Counter_every10s = 0
	Enemy_KindOf_Counter_every3s  = 0
	Enemy_KindOf_Counter_Type     = "VEHICLE"
	Allow_MetaMods_Own_Scripts    = 0
	Force_AI_Boost_ToggleButton   = 0
	MetaStatsSystemEnabled        = 0
	MetaCreditShop_AlwaysOn       = 0
	MetaCreditShop_AlwaysOff      = 1
	MetaCreditShopSpawnTemplate   = "NodBaseTemplate_1"
	MetaCreditShop_SandboxMode = 0 --TW-PORT TEMP --reverted
	MetaCreditShop_RankDependency = 0
	MetaCreditShop_CreditDependency = 0
	Diplomacy_System              = 0
	Diplomacy_Auto_AllianceChange = no
	NativeArtOfDefense            = 0
	NativeArtOfDefense_RoundBased = 0
	Max_Waves                     = 7
	No_Wave_Limit                 = no
	First_Wave_Delay              = 120
	Wave_Delay                    = 120
	AlliedPlayersNextToEachOther=no
	Hero_General_Gamemode         = 0
	Hero_General_Selection        = "NodAvatar"
	Hero_General_Overpowered      = 0
	Hero_General_DieLoseCondition = 0
	Random_Army_Gamemode          = 0
	Random_Army_Gamemode_Rounds   = 3
	Unit_vs_Unit_Gamemode         = 0
	Unit_vs_Unit_Selection        = "NodMetaUnit"
	Unit_vs_Unit_Random_Unit      = 0
	Unit_vs_Unit_RoundsToWin      = 3
	Unit_vs_Unit_Camera_Follow    = 0
	Game_Continue_After_End       = 0
	Control_AlliedAI_After_Defeat = 0
	Control_EnemyAI_After_Defeat  = 0
	Last_Man_Standing             = 0
	CameraSetupButton             = 0
	FirstAndThirdPersonModeButton = 0
	FirstAndThirdPersonObserver   = 0
	Camera_Hack_1_Enable          = 0
	Camera_Hack_1_Lock_Zoom       = 0
	Camera_Hack_2_Enable          = 0
	Camera_Hack_2_Cam_Height      = 2.0
	Camera_Hack_2_Lock_Zoom       = 0
	Camera_Max_Zoomable_Height    = 1.0
	Camera_Tilt_Angle             = 1.0
	Camera_Clip_Depth             = 3.0
	FPS_Limit					  = 30
	Game_Simulation_Speed         = 1.0
	Particle_Cap_Mode             = 0
	Bloom_Effect                  = 0
	Show_HealthBars               = 1
	Draw_Behind_Buildings         = 0
	Terrain_Render_Disabled       = 0
	Map_Cloud_Speed               = 100
	RGB_Override                  = 0
	RGB_Override_Red              = 0
	RGB_Override_Green            = 0
	RGB_Override_Blue             = 0
	TiberiumCrystals_Counter      = 0
end

----------------------------------------------------------
-------------GAME SETUP-----------------------------------
----------------------------------------------------------

AutoconfigTable={}
AutoconfigTable["general"]={
	"AutoConfig_General","AutoConfig_Skirmish","AutoConfig_Multiplayer","AutoConfig_StoryMode","AutoConfig_GlobalConquestMode"
}
AutoconfigTable["meta mod io"]={
	"ModScriptsAutoLoadList","ModScriptsAlwaysOff","LiveInputFile","LiveOutputFile","TemplatesFile","ErrorFileLog","ErrorWarnings","ErrorLogToFile","ErrorExitType","ErrorSound","Force_Lua_Script_Button","ExternaLuaCodeCoroutine","Dev_Mode"
}
AutoconfigTable["metamod & other"]={
	"Meta_Control_Options_Tab_Menu","Old_Meta_Control_Option_Bar","FirstAndThirdPersonModeButton","FirstAndThirdPersonObserver","Send_Money_Option","No_Superweapons","No_Superweapons_AI","Adaptive_Auto_AI_Boost","AI_Boost_Cash_Ammount_PerSec","AI_Boost_Unit_Spawner","AI_Boost_Include_Human_Player","Force_AI_Boost_ToggleButton",
	"Enable_GuardShieldEmitter","MetaTabMenuUnitSpawnSelection","Human_Player_Indestructible","No_Damage_Start_Time","AI_Begin_Build_Delay","InfiniteEnergy","InfiniteProductionSpeed","BuildAnywhere","No_Tiberium","Infinite_Tiberium","Disable_Fog_Of_War","Map_Reshroud_Time","Disable_Map_Borders",
	"Random_Meteorites","Stealth_For_Units_Enabled","AI_CoControls_Human_Player","Enemy_KindOf_Counter_every10s","Enemy_KindOf_Counter_every3s", --"EvolutionaryUnitAI_Available"
	"Enemy_KindOf_Counter_Type","EVA_Disabled","Hulk_Lifetime_Override","Hulk_Lifetime","Disable_Scoring"
}  --"Allow_MetaMods_Own_Scripts","Freeze_Time",
AutoconfigTable["gamemodes"]={
	"MetaStatsSystemEnabled","MetaCreditShop_AlwaysOn","MetaCreditShop_AlwaysOff","MetaCreditShopSpawnTemplate","MetaCreditShop_SandboxMode", --"MetaCreditShop_CreditDependency"
	"Diplomacy_System","Diplomacy_Auto_AllianceChange",
	"NativeArtOfDefense","NativeArtOfDefense_RoundBased","Max_Waves","No_Wave_Limit","First_Wave_Delay","Wave_Delay","AlliedPlayersNextToEachOther","NAOD.DifficultyFactor",
	"Hero_General_Gamemode","Hero_General_Selection","Hero_General_Overpowered","Hero_General_DieLoseCondition",
	"Random_Army_Gamemode",--"Random_Army_Gamemode_Rounds",
	"Unit_vs_Unit_Gamemode","Unit_vs_Unit_Selection","Unit_vs_Unit_Random_Unit","Unit_vs_Unit_Camera_Follow",--"Unit_vs_Unit_RoundsToWin"
	"Game_Continue_After_End","Control_AlliedAI_After_Defeat","Control_EnemyAI_After_Defeat","Last_Man_Standing"
}
AutoconfigTable["camera & performance"]={
	"CameraSetupButton","Camera_Hack_1_Enable","Camera_Hack_1_Lock_Zoom","Camera_Hack_2_Enable","Camera_Hack_2_Cam_Height","Camera_Hack_2_Lock_Zoom","Camera_Max_Zoomable_Height","Camera_Tilt_Angle","Camera_Clip_Depth",
	"FPS_Limit","Game_Simulation_Speed","Particle_Cap_Mode","Bloom_Effect","Show_HealthBars","Draw_Behind_Buildings","Terrain_Render_Disabled","Map_Cloud_Speed","RGB_Override","RGB_Override_Red","RGB_Override_Green","RGB_Override_Blue"
}

LUAAutostartDefault2 = [[
LUAAutostartDefault 		  = yes
AutoConfig_General            = yes
AutoConfig_Skirmish           = yes
AutoConfig_Multiplayer        = no
AutoConfig_StoryMode          = no
AutoConfig_GlobalConquestMode = no
Camera_Hack_1_Enable          = yes
Camera_Hack_1_Lock_Zoom       = yes
Camera_Hack_2_Enable          = yes
Camera_Hack_2_Cam_Height      = 2.0
Camera_Hack_2_Lock_Zoom       = yes
Camera_Max_Zoomable_Height    = 1.0
Camera_Tilt_Angle             = 1.0
Camera_Clip_Depth             = 3.0
FPS_Limit                     = 60
Game_Simulation_Speed         = 1
Terrain_Render_Disabled       = no
Show_HealthBars               = yes
Draw_Behind_Buildings   	  = no
Disable_Map_Borders           = no
Map_Reshroud_Time             = 5
Game_Continue_After_End       = no
Hulk_Lifetime_Override        = no
Hulk_Lifetime                 = 5.0
Particle_Cap_Mode             = no
RGB_Override                  = no
RGB_Override_Red              = 0
RGB_Override_Green            = 0
RGB_Override_Blue             = 0
Old_Meta_Control_Option_Bar   = no
Meta_Control_Options_Tab_Menu = yes
Send_Money_Option             = yes
Enable_GuardShieldEmitter     = yes
Allow_MetaMods_Own_Scripts    = yes
Disable_Fog_Of_War            = no
Stealth_For_Units_Enabled     = yes
No_Tiberium                   = no
No_Superweapons               = yes
No_Superweapons_AI            = yes
Diplomacy_System              = no
NativeArtOfDefense            = no
Max_Waves                     = 14
First_Wave_Delay              = 60
Wave_Delay                    = 60
Enemy_KindOf_Counter_every10s = yes
Enemy_KindOf_Counter_every3s  = no
Enemy_KindOf_Counter_Type     = "CAN_ATTACK"
AI_CoControls_Human_Player    = no
AI_Boost_Include_Human_Player = no
Force_AI_Boost_ToggleButton   = yes
Force_Lua_Script_Button       = no
ExternaLuaCodeCoroutine = no
Dev_Mode                      = no		
]]

function WriteAutoconfig()
	LUAAutostartDefault=""
	LUAAutostartDefault = LUAAutostartDefault .. strrep(strchar(45,45),5) .. " META MOD " .. MetaModVersion .. " AUTOSTARTCONFIG " .. strrep(strchar(45,45),5) .. "\n"
	LUAAutostartDefault = LUAAutostartDefault .. strrep(strchar(45,45),5) .. " external script filenames " .. strrep(strchar(45,45),5) .. "\n"
	LUAAutostartDefault = LUAAutostartDefault .. 'ModScripts["filelist"]=' .. "\n" .. "{" .. "  " .. strchar(45,45) .. "note: each filename entry with quotes and seperated with comma except for the last one" .. "\n\n" .. "}" .. "\n" --.. "\n" .. '"' .. "script.ExampleScript1.lua" .. '",' .. "\n" .. '"' .. "script.ExampleScript2.lua" .. '"' .. "\n" .. "}" .. "\n"
	LUAAutostartDefault = LUAAutostartDefault .. strrep(strchar(45,45),7) .. " general " .. strrep(strchar(45,45),7) .. "\n"
	for i=1,getn(AutoconfigTable["general"]),1 do
		LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["general"][i],30) .. "= " .. GiveYesNoString(getglobal(AutoconfigTable["general"][i])) .. "\n"
	end 
	LUAAutostartDefault = LUAAutostartDefault .. strrep(strchar(45,45),5) .. " meta mod io " .. strrep(strchar(45,45),5) .. "\n"
	for i=1,getn(AutoconfigTable["meta mod io"]),1 do
		if AutoconfigTable["meta mod io"][i] == "LiveInputFile" or AutoconfigTable["meta mod io"][i] == "LiveOutputFile" or AutoconfigTable["meta mod io"][i] == "TemplatesFile" or AutoconfigTable["meta mod io"][i] == "ErrorFileLog" then
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["meta mod io"][i],30) .. "= " .. '"' .. getglobal(AutoconfigTable["meta mod io"][i]) .. '"' .. "\n"
			elseif AutoconfigTable["meta mod io"][i] == "ErrorWarnings" or AutoconfigTable["meta mod io"][i] == "ErrorLogToFile" or AutoconfigTable["meta mod io"][i] == "ErrorExitType" or AutoconfigTable["meta mod io"][i] == "ErrorSound" then
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["meta mod io"][i],30) .. "= " .. getglobal(AutoconfigTable["meta mod io"][i]) .. "\n"
			else
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["meta mod io"][i],30) .. "= " .. GiveYesNoString(getglobal(AutoconfigTable["meta mod io"][i])) .. "\n"	
		end
	end
	LUAAutostartDefault = LUAAutostartDefault .. strrep(strchar(45,45),5) .. " metamod & other " .. strrep(strchar(45,45),5) .. "\n"
	for i=1,getn(AutoconfigTable["metamod & other"]),1 do
		if AutoconfigTable["metamod & other"][i] == "MetaTabMenuUnitSpawnSelection" or AutoconfigTable["metamod & other"][i] == "Enemy_KindOf_Counter_Type" then
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["metamod & other"][i],30) .. "= " .. strchar(34) .. getglobal(AutoconfigTable["metamod & other"][i]) .. strchar(34) .. "\n"
			elseif AutoconfigTable["metamod & other"][i] == "AI_Boost_Cash_Ammount_PerSec" or AutoconfigTable["metamod & other"][i] == "No_Damage_Start_Time" or AutoconfigTable["metamod & other"][i] == "AI_Begin_Build_Delay" or AutoconfigTable["metamod & other"][i] == "Map_Reshroud_Time" or AutoconfigTable["metamod & other"][i] == "Hulk_Lifetime" then
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["metamod & other"][i],30) .. "= " .. getglobal(AutoconfigTable["metamod & other"][i]) .. "\n"
			else
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["metamod & other"][i],30) .. "= " .. GiveYesNoString(getglobal(AutoconfigTable["metamod & other"][i])) .. "\n"	
		end
	end
	LUAAutostartDefault = LUAAutostartDefault .. strrep(strchar(45,45),7) .. " meta credit shop & gamemodes " .. strrep(strchar(45,45),7) .. "\n"
	for i=1,getn(AutoconfigTable["gamemodes"]),1 do
		if AutoconfigTable["gamemodes"][i] == "Hero_General_Selection" or AutoconfigTable["gamemodes"][i] == "Unit_vs_Unit_Selection" or AutoconfigTable["gamemodes"][i] == "MetaCreditShopSpawnTemplate" then
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["gamemodes"][i],30) .. "= " .. strchar(34) .. getglobal(AutoconfigTable["gamemodes"][i]) .. strchar(34) .. "\n"
			elseif AutoconfigTable["gamemodes"][i] == "Max_Waves" or AutoconfigTable["gamemodes"][i] == "First_Wave_Delay" or AutoconfigTable["gamemodes"][i] == "Wave_Delay" or AutoconfigTable["gamemodes"][i] == "MetaCreditShopSpawnTemplate" or AutoconfigTable["gamemodes"][i] == "Random_Army_Gamemode_Rounds" or AutoconfigTable["gamemodes"][i] == "Unit_vs_Unit_RoundsToWin" then
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["gamemodes"][i],30) .. "= " .. getglobal(AutoconfigTable["gamemodes"][i]) .. "\n"
			else
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["gamemodes"][i],30) .. "= " .. GiveYesNoString(getglobal(AutoconfigTable["gamemodes"][i])) .. "\n"	
		end
	end
	LUAAutostartDefault = LUAAutostartDefault .. strrep(strchar(45,45),5) .. " camera & performance " .. strrep(strchar(45,45),5) .. "\n"
	for i=1,getn(AutoconfigTable["camera & performance"]),1 do
		if AutoconfigTable["camera & performance"][i] == "Camera_Hack_2_Cam_Height" or AutoconfigTable["camera & performance"][i] == "Camera_Max_Zoomable_Height" or AutoconfigTable["camera & performance"][i] == "Camera_Tilt_Angle" or AutoconfigTable["camera & performance"][i] == "Camera_Clip_Depth" or AutoconfigTable["camera & performance"][i] == "FPS_Limit" or AutoconfigTable["camera & performance"][i] == "Game_Simulation_Speed" or AutoconfigTable["camera & performance"][i] == "Map_Cloud_Speed" or AutoconfigTable["camera & performance"][i] == "RGB_Override_Red" or AutoconfigTable["camera & performance"][i] == "RGB_Override_Green" or AutoconfigTable["camera & performance"][i] == "RGB_Override_Blue" then
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["camera & performance"][i],30) .. "= " .. getglobal(AutoconfigTable["camera & performance"][i]) .. "\n"
			else
			LUAAutostartDefault = LUAAutostartDefault .. StrLenF(AutoconfigTable["camera & performance"][i],30) .. "= " .. GiveYesNoString(getglobal(AutoconfigTable["camera & performance"][i])) .. "\n"	
		end
	end
	WriteToFile(LUAAutostartDefault,AutostartFilePath,'w+') 
	ExecuteAction("DISPLAY_TEXT", "AUTOSTART CONFIG WRITTEN TO: " .. AutostartFilePath .. "")
	--dofile(AutostartFilePath) 
end

function StandardGameSetup(self)	
	if MakeAllSkirmishSidesAIControlledStatus == 1 and EvaluateCondition("COMPARE_NUM_PLAYERS_IN_GAME", CompareTable["GT"], 1) then PlayerSearchString = "Skirmish" end
    --ExecuteAction("MOVIE_PLAY_RADAR", "3_0")
    if IsPlayerAI(self) == 1 then AI_Players_Count=AI_Players_Count+1 return
		else 
	    Human_Players_Count=Human_Players_Count+1 
	    tinsert(HumanPlayerTable, GetTeamName(self))
	    if ClientMainPlayer_Initialized == 0 then
			ClientMainPlayer_Initialized = 1
			--AdminTeamName = HumanPlayerTable[1]
			MainPlayerName = GetTeamsDescriptiveName(AdminTeamName)
		end
	end
	if GetAutoconfigBoolValue("AutoConfig_General") == 1 then VanillaSettings() DisableMetaModMenus(self,"all") return end
	ExecuteAction("SHOW_MILITARY_CAPTION", "MESSAGE:WELCOME_MESSAGE", 8)
	if LuaAutostartState == 0 then
		LuaAutostartState = 1
		--AdminTeamName=GetTeamName(self)
		HandleAutoconfig()
		if Hero_General_Gamemode ~= 1 then ExecuteAction("MOVIE_PLAY_RADAR", "METAMODINTRO") end
		if ( (AutoConfig_General == 0) or (AutoConfig_Skirmish == 0 and Human_Players_Count == 1) or (AutoConfig_Multiplayer == 0 and Human_Players_Count > 1) or (AutoConfig_StoryMode == 0 and (IsGameInStoryMode(self)==1 or TestCampaignFlag()==1)) or (AutoConfig_GlobalConquestMode == 0 and IsMetaGameActive() == 1) ) then VanillaSettings() return end    --tostring(EvaluateCondition("IS_GAME_IN_SKIRMISH_OR_MULTIPLAYER", 1))
		--object1 = getglobal(GetObj.Index(self))
		--PeriodicMasterCheck()	
		--spawn("MetaControlDummyPeriodicMasterChecker")	
		--ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "MetaControlDummyPeriodicMasterChecker", NeutralTeam, "Player_1_Start")	
		if Dev_Mode == 1 then
			ErrorWarnings=1
			ErrorLogToFile=1
			ErrorExitType=0
			ErrorSound=1
			Camera_Clip_Depth            = 3.0
			FPS_Limit                    = 30
			Game_Continue_After_End      = yes
			Disable_Fog_Of_War           = yes
			Force_Lua_Script_Button      = yes
			AutoConfig_Multiplayer       = yes
			ExecuteAction("DISPLAY_TUTORIAL_TEXT", "\nDEVMODE\n")
			--ExecuteAction("HIDE_TUTORIAL_TEXT") 
			ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", RandomString(5), "InfiniteEnergyDummy", AdminTeamName, "((0.00,0.00,0.00))", 0)
			ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", RandomString(5), "InfiniteProductionSpeedDummy", AdminTeamName, "((0.00,0.00,0.00))", 0)
			MetaCreditShopSandboxMode()
		end		
		ExecuteAction("SET_CAMERA_CLIP_DEPTH_MULTIPLIER", Camera_Clip_Depth) --remove viewlimit (black borders when zooming out)  
		ExecuteAction("RESTORE_WORLD_LIGHTS", 1)
		if Random_Meteorites == 1 then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "MeteorSpawnerRef", "MeteorSpawner", NeutralTeam, "((0.00,0.00,0.00))", 0) end
		if Bloom_Effect == 1 then ExecuteAction("CAMERA_BLOOM_EFFECT_BEGIN") end  --ExecuteAction("CAMERA_BLOOM_EFFECT_END")
		if Disable_Scoring == 1 then ExecuteAction("DISABLE_SCORING") end  --ExecuteAction("ENABLE_SCORING")
		if Freeze_Time == 1 then ExecuteAction("FREEZE_TIME") end  --ExecuteAction("UNFREEZE_TIME")
		if Map_Cloud_Speed ~= 100 then ExecuteAction("MAP_CHANGE_CLOUD_SPEED",Map_Cloud_Speed) end
		if EVA_Disabled == 1 then ExecuteAction("EVA_SET_ENABLED_DISABLED", 1) end  
		if RGB_Override == 1 then ExecuteAction("DIM_WORLD_LIGHTS", RGB_Override_Red  , RGB_Override_Green , RGB_Override_Blue, 1) end
		InitializeObjectTypeLists()	
		if No_Tiberium == 1 then RemoveAllTiberium() end
		if Enable_GuardShieldEmitter == 0 then ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "GuardShieldEmitter", BUILDABILITY_TYPE["NO"]) end
		if MakeAllSkirmishSidesAIControlledStatus == 0 then ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT", "MetaControlDummyAICoControlToggler", BUILDABILITY_TYPE["NO"]) end
		if Infinite_Tiberium == 1 then ToggleInfiniteTiberium() end
		if Hulk_Lifetime_Override == 1 then ExecuteAction("SCRIPTING_OVERRIDE_HULK_LIFETIME", Hulk_Lifetime) end
		ExecuteAction("OPTIONS_SET_PARTICLE_CAP_MODE", Particle_Cap_Mode)
		if CameraMaxZoomableHeightSetupState == 0 then
			CameraMaxZoomableHeightSetupState = 1 
			ExecuteAction("CAMERA_SET_DEFAULT", 0.00, 0.00 , Camera_Max_Zoomable_Height)
		end
		if No_Superweapons == 1 then 
			SuperweaponsBuildability("NO") 
		end
		ExecuteAction("SET_FPS_LIMIT", FPS_Limit)
		--ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", Game_Continue_After_End)
		ExecuteAction("TERRAIN_RENDER_DISABLE", Terrain_Render_Disabled)
		ExecuteAction("SET_VISUAL_SPEED_MULTIPLIER", Game_Simulation_Speed)  
		ExecuteAction("OPTIONS_SET_DRAWICON_UI_MODE", Show_HealthBars)
		ExecuteAction("MAP_SHROUD_SET_RESHROUD_TIME", Map_Reshroud_Time)
		ExecuteAction("OPTIONS_SET_OCCLUSION_MODE", Draw_Behind_Buildings)
		if Stealth_For_Units_Enabled ~= 1 then ExecuteAction("GLOBAL_SET_STEALTH_ENABLED", Stealth_For_Units_Enabled) end
		Camera_Hack_2()
		Camera_Hack_2_Cam_Height=1.0
		if Camera_Tilt_Angle_SetupState == 0 then
			Camera_Tilt_Angle_SetupState = 1
			ExecuteAction("PITCH_CAMERA", Camera_Tilt_Angle, 1, 1, 1); 
		end
		if Disable_Map_Borders == 1 then
			ExecuteAction("DISABLE_BORDER_SHROUD")
			else
			ExecuteAction("ENABLE_BORDER_SHROUD")
		end
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:LUAAUTOSTART")
		if Allow_MetaMods_Own_Scripts == 1 then	
			if CameraSetupStateMetaModsOwnScripts == 0 then
				CameraSetupStateMetaModsOwnScripts = 1
				SetCameraHeightStandard()  
			end 	
			--GamePerformance_Function()
			--GameSpeedMofify_Function()
		end
		if TeamRelationsInitialized ~= 1 then
			TeamRelationsInitialized = 1
			RefreshTeamTable()
			InitializeTeamRelations()
		end
		InitializeGPOT()
		--RefreshObjectsTable()
		GetWaypointTable()
		MakeWaypointDistanceTable()
		if IsEntryInTable(WaypointTable,"METAMOD_NAOD_SPAWN_WAYPOINT") or EvaluateCondition("COUNTER_COUNTER","METAMOD_NAOD",CompareTable["EQ"],CounterTable[1]) then NAOD.MapIntegration=1 NativeArtOfDefense=1 end
		if IsEntryInTable(WaypointTable,"METAMOD_NAOD_SPAWN_WAYPOINT_OPTIONAL") then NAOD.MapIntegration=3 end 
		if IsEntryInTable(WaypointTable,"METAMOD_NAOD_WAYPOINT_PATH_START") and not (NAOD.MapIntegration==1 and NAOD.MapIntegration==3) then NAOD.MapIntegration=1 end
		if GetObj.AliveState("METAMOD_TOWERDEFENSE_OBJECT") or EvaluateCondition("COUNTER_COUNTER","METAMOD_NAOD",CompareTable["EQ"],CounterTable[2]) then NAOD.MapIntegration=2 NativeArtOfDefense=1 end
		if GetObj.AliveState("METAMOD_TOWERDEFENSE_OBJECT_OPTIONAL") or EvaluateCondition("COUNTER_COUNTER","METAMOD_NAOD",CompareTable["EQ"],CounterTable[4]) then NAOD.MapIntegration=4 end
		if Diplomacy_System==1 or Last_Man_Standing==1 or Unit_vs_Unit_Gamemode==1 or Random_Army_Gamemode==1 then 
			CustomGameFinishConditionCheck = 1
			for i=1,getn(GlobalTeamTable),1 do SpawnVictoryConditionHelperForTeam(GlobalTeamTable[i]) end
		end
		if Game_Continue_After_End==1 then ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 1) end
		--ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "TestDummyA_", "TestDummyA", NeutralTeam, "((0.00,0.00,0.00))", 0)
		if Hero_General_Gamemode == 1 then HeroGeneralGamemode() end	
		if Unit_vs_Unit_Gamemode == 1 then UnitVSUnitGamemode() end
		if Random_Army_Gamemode == 1 then RandomArmyGamemode() end	
		--if NativeArtOfDefense_RoundBased then NAOD.InitializeNativeArtOfDefense() end
	end
	--GameFinishState = 0	
	InitiateMapExtendEvaluator()
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", CoroutineMaster, "MetaControlDummyPeriodicMasterChecker", NeutralTeam, "((0.00,0.00,0.00))", 0)
	SetScriptTimer(2,"DelayedGameSetupFunction()")
	GameSetupFunctionReady = 1  
	ExecuteAction("PLAY_SOUND_EFFECT", "Gui_SFX_GAMEOVER")
end

function ReloadAutostartConfig(self)
	LuaAutostartState = 0
	GameSetupFunctionReady = 0
	StandardGameSetup(self)
end 
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------

function OnMetaTechSuperAvatarCreated(self)
	ObjectHideSubObjectPermanently( self, "NUBEAM", false )
	ObjectHideSubObjectPermanently( self, "FLAMETANK", false )
	ObjectHideSubObjectPermanently( self, "S_DETECTOR", false )
	ObjectHideSubObjectPermanently( self, "S_GENERATOR", false )
    ObjectGrantUpgrade(self, "Upgrade_AvatarBeamCannon")
    ObjectGrantUpgrade(self, "Upgrade_AvatarStealthDetect")
    ObjectGrantUpgrade(self, "Upgrade_AvatarFlamer")
    ObjectGrantUpgrade(self, "Upgrade_AvatarStealthDetect")
    ObjectGrantUpgrade(self, "Upgrade_AvatarInvisibility")
    ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", self, "Enabled", 0) 	
    ExecuteAction("NAMED_SET_HELD", self, 1)
    --ObjectGrantUpgrade(self, "Upgrade_Veterancy_HEROIC")
end

function SpecialPowerTakeMoney(self)
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney50000")
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney45000") 
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney40000")
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney35000")
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney30000")
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney25000")
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney20000")
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney15000")
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney10000")
	ObjectDoSpecialPower(self, "SpecialPowerTakeMoney5000")
end

----------------------------------------------------------------------------
------------------------META COMMAND MENU-----------------------------------
----------------------------------------------------------------------------

MenuTable = {}
MenuCategory = "main" 
MenuSelection = 1
MenuTable["main"] = {"BFMEII-ROTWK", "spawn", "mixed commands","external scripts","gamemodes","edit autoconfig","templates","ai control & builder","unit actions","team actions","camera setup","statistics","selected unit info","map information & manipulation","meta shop actions","diplomacy & more","counter","performance","music, sound, movies","other","write lua command","mod info"}
MenuTable["spawn"]={"spawn", "spawn list", "game", "spawn for team","destination type","speed/precision","waypoint","set X,Y coordiantes","CoordinateX","CoordinateY", "number of spawns", "spawn with max level", "spawn with max level + invincible", "color", "add kind of to spawn list"}
MenuTable.DestinationType ={"choose position","waypoint","coordinate","next to base","on next object type same to selected object","random position"}
MenuTable.DestinationTypeSelection="waypoint" --MenuTable.DestinationType[1]
MenuTable.SpawnSpeed="normal"
MenuTable.SpawnSpeedType={"normal","fast","superfast"}
MenuTable.CoordinateX=0
MenuTable.CoordinateY=0
MenuTable.SpawnNumber = 1
MenuTable.SpawnWithMaxLevel = false
MenuTable.SpawnWithMaxLevelInvincible = false
MenuTable.SpawnColor = "normal"

MenuTable.GameList = {"BFMEII-ROWTK", "CNC3-KW" } --, "C&C3-TW", "BFMEII" }
MenuTable.GameSpawnList = {
["BFMEII-ROWTK"]={BFMEIIROTWK_OBJECT_TYPE_ALL_LIST_DESC, BFMEIIROTWK_OBJECT_TYPE_ALL_LIST}, 
["CNC3-KW"]={CNC3KW_OBJECT_TYPE_ALL_LIST_DESC, CNC3KW_OBJECT_TYPE_ALL_LIST}
}
MenuTable.SpawnMenuGameSelection = MenuTable.GameList[1]
MenuTable.SpawnListSelectionDesc = MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][1][1]
MenuTable.SpawnListSelection = MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][2][MenuTable.SpawnListSelectionDesc]
MenuTable.SpawnSelection = MenuTable.SpawnListSelection[1]

MenuTable["spawnshortlist"] = { "NODAvatar", "AlienAnnihilatorTripod", "SteelTalonsMammoth", "SteelTalonsBehemoth","NodMetaUnit", "SteelTalonsMARV", "AlienEradicatorHexapod", "AlienMastermind", "NODCommando", "GDICommando", "NODAttackBike", "NODScorpionBuggy", "AlienCustomizableVehicle","SteelTalonsWolverine", "GDIPitbull","NODVenom", "ZOCOMHammerhead","AlienDevastatorWarship", "AlienPlanetaryAssaultCarrier","NODShadowSquad","ZOCOMZoneRaiderSquad","GDIMCV","SteelTalonsMCV","ZOCOMMCV","NodMCV","BlackHandMCV","MarkedOfKaneMCV","AlienMCV","Reaper17MCV","Traveler59MCV","MetaTechMCV"} --"NODTempleOfNOD","GDIIonCannonControl","AlienRiftGenerator",}
MenuTable["counter"] = { "kind of (short list): ","kind of (all): " }
MenuTable["gamemodes"] = {"NativeArtOfDefense","HeroGeneralGamemode","RandomArmyGamemode","UnitVSUnitGamemode"}
MenuTable["write lua command"] = { "execute","new","delete","upper/lower case", "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","[","]","" .. strchar(32) .. "","" .. strchar(44) .. "",".","" .. strchar(34) .. "","+","-","*","/","(",")"}
MenuTable["mod info"] = {"open lua input/output folder"}
MenuTable["mixed commands"] = {"disable meta tab and meta command menu","freeze game","enable some player powers","MetaCreditShop toggle","DiplomacyMenu toggle","instant money","every ai off toggle","enemy ai off toggle","reveal map toggle","ai boost toggle","allied ai boost toggle","ai co control toggle","spawn unit (autostart.lua selection)","indestructible toggle","infinite energy toggle","build anywhere toggle","infinite production speed toggle","merge team with next ally","remove all tiberium","toggle infinite tiberium","spawn infinite tiberium crytal next to base","spawn tiberium field next to base","slow down enemy toggle","disable superweapons","enable superweapons","collector fix","delete all units from other teams","cinema mode","cinema mode eternal"}
MenuTable["edit autoconfig"] = {"general","meta mod io","metamod & other","gamemodes setup","camera & performance"}
MenuTable["edit autoconfig"]["general"] = AutoconfigTable["general"]
MenuTable["BFMEII-ROTWK"] = { "spawn", "spawn list", "add kind of to spawn list", "write kind of list to file", "spawn custom hero", "CreatAHero customize", "save hero customization", "load hero customization", "no cp limit", "reveal map permanently for all"}
MenuTable.CreatAHeroPartSelection = CreateAHeroParts[1]
MenuTable.CreatAHeroPartSelectionState = false
MenuTable.BFMEIIROTWkSpawnListSelectionDesc = BFMEIIROTWK_OBJECT_TYPE_ALL_LIST_DESC[1]
MenuTable.BFMEIIROTWkSpawnListSelection = BFMEIIROTWK_OBJECT_TYPE_ALL_LIST[MenuTable.BFMEIIROTWkSpawnListSelectionDesc]
MenuTable.BFMEIIROTWkSpawnSelection = MenuTable.BFMEIIROTWkSpawnListSelection[1]
MenuTable.BFMEIIROTWkKindOfSelection = KindOfTable_BFMEIIROTWK_[1]
MenuTable["edit autoconfig"]["meta mod io"] = AutoconfigTable["meta mod io"] 
MenuTable["edit autoconfig"]["metamod & other"] = AutoconfigTable["metamod & other"]
MenuTable["edit autoconfig"]["gamemodes setup"] = AutoconfigTable["gamemodes"]
MenuTable["edit autoconfig"]["camera & performance"] = AutoconfigTable["camera & performance"]
MenuTable["performance"]={"fps limit","show fps","simulation speed -/+","TERRAIN_RENDER_DISABLE","OPTIONS_SET_DRAWICON_UI_MODE","OPTIONS_SET_OCCLUSION_MODE","OPTIONS_SET_PARTICLE_CAP_MODE","RESTORE_WORLD_LIGHTS","CAMERA_BLOOM_EFFECT_BEGIN","CAMERA_BLOOM_EFFECT_END"}
MenuTable["unit actions"] = {}  
MenuTable["unit actions"][1]={"unit information","unit control & camera","copy","cut","delete","CopyToWaypoint","TeleportToWaypoint","waypoint: ","EvolutionaryUnitAIOptions (placeholder)","DoSpecialpower: ","FireWeaponOnUnit: ","SetAttitude: ","ToggleObjectFlag: ","ToggleUpgrade: ","ToggleStatus: ","ToggleModelcondition(10s): ","SetStance: ","UseCommandButton: ","ToggleStealth","ToggleSleepStatus","ToggleHeldStatus","ToggleStandGroundStatus","ToggleAIStatus","ToggleForbidPlayerCommands","ToggleStrictControl","flash","BoostAttributes","heal","LevelUp","unit action","unit waypoint action"}
MenuTable["unit actions"]["unit action"]={"NAMED_KILL","NAMED_STOP","NAMED_GUARD","NAMED_HUNT","NAMED_EXIT_ALL","NAMED_GARRISON_NEAREST_BUILDING","UNIT_DESTROY_ALL_CONTAINED","GATE_OPEN","GATE_CLOSE"}
MenuTable["unit actions"]["unit waypoint action"]={"MOVE_NAMED_UNIT_TO","ATTACK_MOVE_NAMED_UNIT_TO","UNIT_GUARD_POSITION","UNIT_TELEPORT_TO_WAYPOINT"}
MenuTable["unit actions"]["unit control & camera"]={"first/third person mode","first/third person mode (psychedelic)","navigation mode","reset camera","CAMERA_FOLLOW_NAMED","CAMERA_STOP_FOLLOW","CAMERA_TETHER_NAMED","CAMERA_STOP_TETHER_NAMED","up","down","left","right","north","south","east","west"}
MenuTable["unit actions"]["unit_unit_actions"]={"NAMED_ATTACK_NAMED","UNIT_GUARD_OBJECT"}
MenuTable["unit actions"].singleaction=MenuTable["unit actions"]["unit action"][2]
MenuTable["unit actions"].posaction=MenuTable["unit actions"]["unit waypoint action"][1]
MenuTable["unit actions"].weapon=WeaponNameTable[GetIndexOfTableElement(WeaponNameTable,"NuclearMissile")]
MenuTable["unit actions"].attitude=Behaviour_[1]
MenuTable["unit actions"].objectflag=ObjectPanelFlagsTable[1]
MenuTable["unit actions"].status=ObjectStatusIndexTable[1]
MenuTable["unit actions"].modelcondition=ModelConditionTable[1]
MenuTable["unit actions"].specialpower=SpecialPowerNameTable[1]
MenuTable["unit actions"].upgrades=UpgradeNameTable[1] 
MenuTable["unit actions"].stance=STANCE_TYPE_[1]
MenuTable["unit actions"].commandbutton=CommandButtonTable[1]
MenuTable["navigation mode"]={}
MenuTable["Obj"]={}
function MenuTable.StoreAndGetObjectAttribute(object,attribute)	
	if MenuTable["Obj"][tostring(object)]==nil then 
		MenuTable["Obj"][tostring(object)] = {} 
		MenuTable["Obj"][tostring(object)]["heldstatus"]=0
		MenuTable["Obj"][tostring(object)]["sleepstatus"]=0
		MenuTable["Obj"][tostring(object)]["stealth"]=0
		MenuTable["Obj"][tostring(object)]["ai"]=0
		MenuTable["Obj"][tostring(object)]["forbidplayercommands"]=false
		MenuTable["Obj"][tostring(object)]["strictcontrol"]=0
		MenuTable["Obj"][tostring(object)]["standgroundstatus"]=0
	end
	if attribute~=nil then 
		MenuTable["Obj"][tostring(object)][attribute]=togglevar(MenuTable["Obj"][tostring(object)][attribute]) return MenuTable["Obj"][tostring(object)][attribute]  --out(attribute .. " " .. MenuTable["Obj"][tostring(object)][attribute])
	end
end	
MenuTable["unit information"]={"refresh","WriteToFile"}
MenuTable["other"] = {"run external lua script (" .. LiveInputFile .. ")","lua event trigger","write list of all native lua functions & commands","write info about all objects (LiveOutputFile)","write info about all objects more (LiveOutputFile)","write list of map specific world builder objects (LiveOutputFile)","write info about team relations (LiveOutputFile)","write globals table (LiveOutputFile)","write info about team relations (LiveOutputFile)","write new standard autoconfig.lua","write autoconfig.lua with all disabled","instant vanilla settings", "write statistics abot all teams (LiveOutputFile)","write info about selected unit (LiveOutputFile)","write info about map (LiveOutputFile)","vanilla settings","reload autoconfig.lua","FREEZE_TIME","UNFREEZE_TIME","IDLE_ALL_UNITS","TOGGLE_AVI_CAPTURE","DISABLE_SCORING","EVA_SET_ENABLED_DISABLED","GLOBAL_SET_STEALTH_ENABLED","SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS","QUICKVICTORY","exit map","exit game"}
MenuTable["camera setup"] = {"adjust zoom manually","lock/unlock zoom","zoom -/+","zoom2 -/+","pitch -/+","first/third person mode","first/third person mode (psychedelic)","reset camera","CAMERA_MOD_FREEZE_ANGLE","LOCK_CAMERA_ANGLE_AND_HEIGHT","LOCK_CAMERA_SCROLL","CAMERA_STOP_TETHER_NAMED","MOVE_CAMERA_TO_SELECTION","CAMERA_MOVE_HOME","RESET_CAMERA_TUTORIAL_STATE"}
MenuTable["statistics"] = {}
MenuTable["diplomacy & more"] = {"previous player","next player","show all relations","request alliance","break alliance","request allied help","team commander application","issue attack-move command to position","give money to team","take control of allied","merge with allied team toggle","merge own team with allied toggle","switch teams toggle","merge team with next ally","merge team with next enemy"}
MenuTable["music, sound, movies"] = {"play music track: ","play sound: ","play mission dialogue: ","play movie: ","play radar movie: ","mute all sounds","unmute all sounds","SUSPEND_BACKGROUND_SOUNDS","RESUME_BACKGROUND_SOUNDS","SOUND_AMBIENT_PAUSE","SOUND_AMBIENT_RESUME"}
MenuTable.musictrack=MusicTracksTable[1]
MenuTable.movie=Movies[1]
MenuTable.radarmovie=Movies[1]
MenuTable.sound=Sounds[1]
MenuTable.missiondialogue=MissionDialogue[1]
MenuTable["templates"]={
	"reload saved templates","template selection: ","save template","save raw template","delete template","set meta shop template to selected template","get template for all players","player: ","get template for player","get template, choose down-left corner",
	"get template, choose upper-right corner","template kindof filter: ","template kindof: ","spawn raw template (without object attributes): ","spawn template team owner override: ","spawn speed (position accuracy): ",
	"spawn template selection","spawn template selection at custom point","spawn template selection at waypoint","waypoint: ",
	"spawn subtractive differential template","spawn additive differential template","spawn differential template",
	"set timetravel fixpoint","timetravel to fixpoint: "
}
MenuTable["map information & manipulation"]={"activate map boundary: ","water height: ","earthquake","map cloud speed: ","save map info to file","SET_LOGIC_FOG_STATE","ENABLE_BORDER_SHROUD","DISABLE_BORDER_SHROUD","DELETE_ALL_UNMANNED"}
MenuTable.MapBoundary=MapBorderTable[1]
MenuTable.WaterHeight=10
MenuTable.WaterHeightTable={10,20,30,40,50,100,200,300,400}
MenuTable.CloudSpeedTable={10,20,30,40,50,60,70,80,90,100}
MenuTable.MapCloudSpeed=10
MenuTable.MapFogState=0
MenuTable["ai control & builder"]={"ai team selection: ","ai activation status: ","ai co control: ","enemy ai boost toggle: ","allied ai boost toggle: ","adaptive ai boost: ","ultra ai boost toggle","every ai off toggle","enemy ai off toggle","build/fill base","build defense","auto base builder: ","auto defense builder: "}
MenuTable["meta shop actions"]={"reveal map","ion cannon","nuke","rift generator","emp","indestructible","infinite energy","fast production speed","build anywhere","slow down enemy","boost selected unit","anti ground defense block","anti air defense block","anti vehicle defense start point", "anti vehicle defense end point", "random square defense", "random circle defense", "random spiral defense", "spawn random unit force","super avatar","GuardShieldEmitter","convert MC to $","convert $ to MC","bet","get statistics","spawn base template","set timetravel fixpoint","timetravel"}	
MenuTable["team1counter"] = 1
MenuTable["team2counter"] = 1
MenuTable.teamselection="no team -> choose" --GlobalTeamTable[1]
MenuTable.templateselection="no template -> choose"  --NextTableIndex(TemplateTable)
MenuTable.templateowner=0
MenuTable.rawtemplates=0
MenuTable.timetravelfixpoint=0
MenuTable.waypointselection="Player_1_Start" --WaypointTable[1]
MenuTable.templateteamoverride=0
MenuTable.templatekindoffilter=0
MenuTable.templatekindoff="STRUCTURE"
MenuTable.templatecoordcornerdownleft={}
MenuTable.templatecoordcornerupperright={}
MenuTable.templatespawnspeedtypes = {0,1,2}
MenuTable.templatespawnspeed=0
MetaMenuLuaCommand = ""
MetaMenuLuaCommandCase = "lower"
MenuDisplayString = ""
MenuDisplayState = 0
TeamActions={}
TeamActions[1]={"TEAM_GUARD","MOVE_TEAM_HOME","TEAM_WANDER_IN_PLACE","TEAM_HUNT","TEAM_STOP","TEAM_KILL","TEAM_DELETE","TEAM_CAPTURE_NEAREST_UNOWNED_FACTION_UNIT","TEAM_EXIT_ALL","TEAM_EXIT_ALL_BUILDINGS","TEAM_GARRISON_NEAREST_BUILDING"}--"TEAM_LOAD_TRANSPORTS","TEAM_GIVE_NEAREST_TEAM_UPGRADE","TEAM_DELETE_LIVING","TEAM_COLLECT_NEARBY_FOR_TEAM",
TeamActions[2]={"MOVE_TEAM_TO","ATTACK_MOVE_TEAM_TO","TEAM_GUARD_POSITION","TEAM_HARVEST","TEAM_TELEPORT_TO_WAYPOINT"} --"TEAM_FACE_WAYPOINT",
TeamActions[3]={"TEAM_ATTACK_TEAM","ATTACK_MOVE_TEAM_TO","TEAM_GUARD_TEAM","TEAM_MERGE_INTO_TEAM"} --"TEAM_GIVE_TEAM_UPGRADE",
TeamActions[4]={"TEAM_AI_TRANSFER","TEAM_SET_SLEEP_STATUS","TEAM_ENABLE_HOUSE_COLOR","TEAM_STAND_GROUND","TEAM_SET_AI_RECRUITABLE_FLAG","TEAM_SET_STEALTH_ENABLED"}
MenuTable["team1counter"] = 1
MenuTable["team2counter"] = 1
MenuTable["waypointcounter"] = 1
MenuTable["bool"] = 1
MenuTable["MusicSelection"]=1
MenuTable["edit value"] = {"apply","new","delete",".","0","1","2","3","4","5","6","7","8","9"}
MenuTable["choose unit"] = MenuTable["spawnshortlist"] 
MenuTable["choose kind of"] = MenuTable["counter"]
MenuTable.kindofselection = KindOfIndexTable[1]
MenuTable.kindofselectionshortlist = KindOfIndexTableShort[1]
MenuTable.CinemaModeTime=30
AutoconfigValueEdit=""
LastMenuSelection=""
LastMenuCategory=""
MenuTable["external scripts"] = {"reload scripts","run enabled scripts now","register all 'script.***' files automatically","create example script","ModScriptsAutoLoadList","ModScriptsAlwaysOff"}
MenuTable.ValuesInitialized=0
function InitializeMenuCommandMenuValues(self)
	if not self then self = GetPlayerSpellBook() end
	if MenuTable.ValuesInitialized==0 then 
		MenuTable.ValuesInitialized=1
		MenuTable.waypointselection=GetPlayerStartWaypointByTeam(GetTeamName(self))
		MenuTable.teamselection=GetTeamName(self)
		--MenuTable.templateselection=NextTableIndex(TemplateTable) --BFMEII ROTWK TEMPCHANGE
		MenuTable.templatespawnspeed=MenuTable.templatespawnspeedtypes[1]
	end
end

function DisplayMenu(self)
	if not self then self = GetPlayerSpellBook() end
	MetaCommandDisplayState=1
	MenuDisplayState = 1   
	InitializeMenuCommandMenuValues(self)
	local MenuDisplayString=""
	local pointer=">>> "
	if MenuCategory == "main" then MenuDisplayString = "\n\n" .. strrep(strchar(45), 60) .. "\n" .. "Meta Command Menu" .. "\n" .. date() .. "" .. "\n" .. strrep(strchar(45), 60) .. "\n"
		else MenuDisplayString = "\n\n" .. strrep(strchar(45,45), 15) .. "\n" .. MenuCategory .. "\n" .. strrep(strchar(45,45), 15) .. "\n"
	end
	if MenuCategory == "write lua command" then MenuDisplayString = MenuDisplayString .. "COMMAND: " .. MetaMenuLuaCommand .. "\n" end
	if MenuCategory == "edit value" then MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"][LastMenuCategory][LastMenuSelection] .. " VALUE: " .. AutoconfigValueEdit .. "\n" end  --AutoconfigValueEdit=getglobal(MenuTable["edit autoconfig"][LastMenuCategory][LastMenuSelection])  
	if MenuSelection == 0 then MenuDisplayString = MenuDisplayString .. pointer .. "  ### BACK ###\n"
	else MenuDisplayString = MenuDisplayString .. "### BACK ###\n" end
	if MenuCategory == "mod info" then 
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		if MenuSelection == 1 then MenuDisplayString = MenuDisplayString .. pointer end
		MenuDisplayString = MenuDisplayString .. MenuTable["mod info"][1] .. "\n"
		local filebasepath=GetFilePath() MenuDisplayString = MenuDisplayString .. "\nMeta Mod 2.0 by Mjjstral\nhttp://www.moddb.com/mods/mjjstral" .. "\n\n" .. AutostartFile .. " path:\n" .. filebasepath .. AutostartFile .. "\n\n" .. LiveInputFile .. " path:\n" .. filebasepath .. LiveInputFile .. "\n\n" .. LiveOutputFile .. " path:\n" .. filebasepath .. LiveOutputFile
		elseif MenuCategory == "edit value" then 
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["edit value"]),1 do
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end
			if i>3 then MenuDisplayString = MenuDisplayString .. MenuTable["edit value"][i] .. " "
				else MenuDisplayString = MenuDisplayString .. MenuTable["edit value"][i] .. "\n"
			end
		end	 
	elseif MenuCategory == "BFMEII-ROTWK" then
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["BFMEII-ROTWK"]),1 do
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end	
			if MenuTable["BFMEII-ROTWK"][i] == "CreatAHero customize" then MenuDisplayString = MenuDisplayString .. MenuTable["BFMEII-ROTWK"][i] .. ": < " .. MenuTable.CreatAHeroPartSelection .. " >" .. "\n" 
			elseif MenuTable["BFMEII-ROTWK"][i] == "spawn custom hero" then MenuDisplayString = MenuDisplayString .. MenuTable["BFMEII-ROTWK"][i] .. "\n"
			elseif MenuTable["BFMEII-ROTWK"][i] == "spawn list" then MenuDisplayString = MenuDisplayString .. MenuTable["BFMEII-ROTWK"][i] .. ": < " .. MenuTable.BFMEIIROTWkSpawnListSelectionDesc .. " >" .. "\n"				
			elseif MenuTable["BFMEII-ROTWK"][i] == "spawn" then MenuDisplayString = MenuDisplayString .. MenuTable["BFMEII-ROTWK"][i] .. ": < " .. MenuTable.BFMEIIROTWkSpawnSelection .. " >" .. "\n" 			
			elseif MenuTable["BFMEII-ROTWK"][i] == "add kind of to spawn list" then MenuDisplayString = MenuDisplayString .. MenuTable["BFMEII-ROTWK"][i] .. ": < " .. MenuTable.BFMEIIROTWkKindOfSelection .. " >" .. "\n"
			else MenuDisplayString = MenuDisplayString .. MenuTable["BFMEII-ROTWK"][i] .. "\n"
			end
		end	
	elseif MenuCategory == "spawn" then 
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["spawn"]),1 do
			if MenuTable["spawn"][i] == "CoordinateX" then MenuDisplayString = MenuDisplayString .. "Coordinate:  " end
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end	
			if MenuTable["spawn"][i] == "spawn" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.SpawnSelection .. " >" .. "\n"
			elseif MenuTable["spawn"][i] == "spawn list" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.SpawnListSelectionDesc .. " >" .. "\n"
			elseif MenuTable["spawn"][i] == "game" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.SpawnMenuGameSelection .. " >" .. "\n".. strrep(strchar(45,45), 15) .. "\n" 		
			elseif MenuTable["spawn"][i] == "spawn for team" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": " .. MenuTable.teamselection .. "\n" 
			elseif MenuTable["spawn"][i] == "destination type" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": " .. MenuTable.DestinationTypeSelection .. "\n"
			elseif MenuTable["spawn"][i] == "speed/precision" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": " .. MenuTable.SpawnSpeed .. "\n"			
			elseif MenuTable["spawn"][i] == "CoordinateX" then MenuDisplayString = MenuDisplayString .. "X:" .. MenuTable.CoordinateX .. "   "
			elseif MenuTable["spawn"][i] == "CoordinateY" then MenuDisplayString = MenuDisplayString .. "Y:" .. MenuTable.CoordinateY .. "\n"
			elseif MenuTable["spawn"][i] == "waypoint" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": " .. MenuTable.waypointselection .. "\n"
			elseif MenuTable["spawn"][i] == "set X,Y coordiantes" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. "\n"		
			elseif MenuTable["spawn"][i] == "spawn with max level" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.SpawnWithMaxLevel .. " >" .. "\n"
			elseif MenuTable["spawn"][i] == "spawn with max level + invincible" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.SpawnWithMaxLevelInvincible .. " >" .. "\n"
			elseif MenuTable["spawn"][i] == "number of spawns" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.SpawnNumber .. " >" .. "\n"		
			elseif MenuTable["spawn"][i] == "color" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.SpawnColor .. " >" .. "\n"			
			elseif MenuTable["spawn"][i] == "add kind of to spawn list" then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.kindofselection .. " >" .. "\n" .. strrep(strchar(45,45), 15) .. "\n"
			--else if MenuTable.SpawnSelection[MenuTable["spawn"][i]]~=nil then MenuDisplayString = MenuDisplayString .. MenuTable["spawn"][i] .. ": < " .. MenuTable.SpawnSelection[MenuTable["spawn"][i]] .. " >" .. "\n" end
			end	
		end
	elseif MenuCategory == "map information & manipulation" then
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["map information & manipulation"]),1 do
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuTable["map information & manipulation"][i] == "activate map boundary: " then MenuDisplayString = MenuDisplayString .. MenuTable["map information & manipulation"][i] .. " " .. MenuTable.MapBoundary .. "\n"
			elseif MenuTable["map information & manipulation"][i] == "water height: " then MenuDisplayString = MenuDisplayString .. MenuTable["map information & manipulation"][i] .. " " .. MenuTable.WaterHeight .. "\n"
			elseif MenuTable["map information & manipulation"][i] == "map cloud speed: " then MenuDisplayString = MenuDisplayString .. MenuTable["map information & manipulation"][i] .. " " .. MenuTable.MapCloudSpeed .. "\n"
			else MenuDisplayString = MenuDisplayString .. MenuTable["map information & manipulation"][i] .. "\n"
			end
		end
		MenuDisplayString = MenuDisplayString .. GetMapInformationString()
	elseif MenuCategory == "counter" then
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["counter"]),1 do
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuTable["counter"][i] == "kind of (short list): " then MenuDisplayString = MenuDisplayString .. MenuTable["counter"][i] .. " < " .. MenuTable.kindofselectionshortlist .. " > \n"
			elseif MenuTable["counter"][i] == "kind of (all): " then MenuDisplayString = MenuDisplayString .. MenuTable["counter"][i] .. " < " .. MenuTable.kindofselection .. " > \n"
			else MenuDisplayString = MenuDisplayString .. MenuTable["counter"][i] .. "\n"
			end
		end
	elseif MenuCategory == "templates" then
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["templates"]),1 do
		if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end	
		if MenuTable["templates"][i] == "template selection: " then MenuDisplayString = MenuDisplayString .. MenuTable["templates"][i] .. MenuTable.templateselection .. "\n" 
		elseif MenuTable["templates"][i] == "player: " then MenuDisplayString = MenuDisplayString .. MenuTable["templates"][i] .. MenuTable.teamselection .. "\n"
		elseif MenuTable["templates"][i] == "template kindof filter: " then MenuDisplayString = MenuDisplayString .. "(placeholder) " .. MenuTable["templates"][i] .. GiveYesNoString(MenuTable.templatekindoffilter) .. "\n"
		elseif MenuTable["templates"][i] == "template kindof: " then MenuDisplayString = MenuDisplayString .. "(placeholder) " .. MenuTable["templates"][i] .. MenuTable.templatekindoff .. "\n"
		elseif MenuTable["templates"][i] == "spawn raw template (without object attributes): " then MenuDisplayString = MenuDisplayString .. MenuTable["templates"][i] .. GiveYesNoString(MenuTable.rawtemplates) .. "\n"
		elseif MenuTable["templates"][i] == "spawn template team owner override: " then MenuDisplayString = MenuDisplayString .. MenuTable["templates"][i] .. GiveYesNoString(MenuTable.templateteamoverride) .. "\n"	
		elseif MenuTable["templates"][i] == "waypoint: " then MenuDisplayString = MenuDisplayString .. MenuTable["templates"][i] .. MenuTable.waypointselection .. "\n"	
		elseif MenuTable["templates"][i] == "spawn speed (position accuracy): " then  MenuDisplayString = MenuDisplayString .. MenuTable["templates"][i] .. MenuTable.templatespawnspeed .. "\n"
		elseif MenuTable["templates"][i] == "timetravel to fixpoint: " then  MenuDisplayString = MenuDisplayString .. MenuTable["templates"][i] .. MenuTable.timetravelfixpoint .. "\n"
		else MenuDisplayString = MenuDisplayString .. MenuTable["templates"][i] .. "\n"
		end	
		end
	elseif MenuCategory == "ai control & builder" then
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["ai control & builder"]),1 do
			if MenuTable["ai control & builder"][i] == "build/fill base" then MenuDisplayString = MenuDisplayString .. strchar(45,45) .. "auto builder options" .. strchar(45,45) .. "\n" end
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuTable["ai control & builder"][i] == "ai team selection: " then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. MenuTable.teamselection .. "\n"
			elseif MenuTable["ai control & builder"][i] == "ai activation status: " then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. GPOT[MenuTable.teamselection]["Menu"]["aiactivationstatus"] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "ai co control: " then MenuDisplayString = MenuDisplayString .. "(placeholder) " .. MenuTable["ai control & builder"][i] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "enemy ai boost toggle: " then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "allied ai boost toggle: " then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "adaptive ai boost: " then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. GiveYesNoString(Adaptive_Auto_AI_Boost) .. "\n" 
			elseif MenuTable["ai control & builder"][i] == "ultra ai boost toggle" then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "every ai off toggle" then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "enemy ai off toggle" then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "build defense" then MenuDisplayString = MenuDisplayString ..  MenuTable["ai control & builder"][i] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "build/fill base" then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. "\n"
			elseif MenuTable["ai control & builder"][i] == "auto base builder: " then MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. GiveYesNoString(GPOT[MenuTable.teamselection]["Menu"]["buildboost"]) .. "\n"
			elseif MenuTable["ai control & builder"][i] == "auto defense builder: " then MenuDisplayString =  MenuDisplayString.. MenuTable["ai control & builder"][i] .. GiveYesNoString(GPOT[MenuTable.teamselection]["Menu"]["defensebuildboost"]) .. "\n"
			--elseif MenuTable["ai control & builder"][i] == "ai build boost - production building builder: " then MenuDisplayString =  MenuDisplayString .. MenuTable["ai control & builder"][i] .. GiveYesNoString(GPOT[MenuTable.teamselection]["Menu"]["aibuildboostproductionbuilding"]) .. "\n"
			else MenuDisplayString = MenuDisplayString .. MenuTable["ai control & builder"][i] .. "\n"
			end	 
		end    
	elseif MenuCategory == "unit actions" then
		local MenuSize = getn(MenuTable["unit actions"][1])
		if MenuSelection<0 then MenuSelection = MenuSize elseif MenuSelection>MenuSize then MenuSelection = 0 DisplayMenu(self) return end 
		for i=1,getn(MenuTable["unit actions"][1]),1 do
			local sel = MenuTable["unit actions"][1][i]
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end
			if sel=="copy" or sel=="cut" then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i] .. " "
			--elseif sel=="SetAttitude" or sel=="ToggleObjectFlag" or sel=="ToggleUpgrade" or sel=="ToggleStatus" or sel=="ToggleModelcondition(10s)" or sel=="DoSpecialpower" or sel=="FireWeaponOnUnit" then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i] .. ": "  
			elseif sel=="up" or sel=="down" or sel=="left" or sel=="north" or sel=="south" or sel=="east" then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i] .. " "
			elseif sel=="CopyToWaypoint" or sel=="BoostAttributes" or sel=="heal" or sel=="flash" then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i] .. " "     		
			elseif MenuTable["unit actions"][1][i] == "ToggleUpgrade: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i]  .. MenuTable["unit actions"].upgrades .. "\n"
			elseif MenuTable["unit actions"][1][i] == "DoSpecialpower: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i]  .. MenuTable["unit actions"].specialpower .. "\n" 
			elseif MenuTable["unit actions"][1][i] == "FireWeaponOnUnit: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i]  .. MenuTable["unit actions"].weapon .. "\n"
			elseif MenuTable["unit actions"][1][i] == "waypoint: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i]  .. MenuTable.waypointselection .. "\n"
			elseif MenuTable["unit actions"][1][i] == "SetAttitude: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i]  .. MenuTable["unit actions"].attitude .. "\n"
			elseif MenuTable["unit actions"][1][i] == "ToggleObjectFlag: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i]  .. MenuTable["unit actions"].objectflag .. "\n"
			elseif MenuTable["unit actions"][1][i] == "ToggleStatus: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i]  .. MenuTable["unit actions"].status .. "\n"
			elseif MenuTable["unit actions"][1][i] == "ToggleModelcondition(10s): " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i]  .. MenuTable["unit actions"].modelcondition .. "\n"
			elseif MenuTable["unit actions"][1][i] == "SetStance: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i] .. MenuTable["unit actions"].stance .. "\n"
			elseif MenuTable["unit actions"][1][i] == "UseCommandButton: " then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i] .. MenuTable["unit actions"].commandbutton .. "\n"
			elseif MenuTable["unit actions"][1][i] == "unit action" then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i] .. ": " .. MenuTable["unit actions"].singleaction .. "\n"
			elseif MenuTable["unit actions"][1][i] == "unit waypoint action" then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"][1][i] .. ": " .. MenuTable["unit actions"].posaction .. "\n"
			else MenuDisplayString = MenuDisplayString .. "" .. MenuTable["unit actions"][1][i] .. "\n"
			end
		end	
	elseif MenuCategory == "unit control & camera" then
		local MenuSize = getn(MenuTable["unit actions"]["unit control & camera"])
		if MenuSelection<0 then MenuSelection = MenuSize elseif MenuSelection>MenuSize then MenuSelection = 0 DisplayMenu(self) return end 
		for i=1,MenuSize,1 do
			local sel = MenuTable["unit actions"]["unit control & camera"][i]
			if MenuTable["unit actions"]["unit control & camera"][i] == "up" then MenuDisplayString = MenuDisplayString .. "move: "
			elseif MenuTable["unit actions"]["unit control & camera"][i] == "north" then MenuDisplayString = MenuDisplayString .. "face direction: "
			end
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end
			if sel=="up" or sel=="down" or sel=="left" or sel=="north" or sel=="south" or sel=="east" then MenuDisplayString = MenuDisplayString .. MenuTable["unit actions"]["unit control & camera"][i] .. " "
			else MenuDisplayString = MenuDisplayString .. "" .. MenuTable["unit actions"]["unit control & camera"][i] .. "\n"
			end
		end
	elseif MenuCategory == "team actions" then
		if MenuSelection<0 then MenuSelection = 4+getn(TeamActions[1])+getn(TeamActions[2])+getn(TeamActions[3])+getn(TeamActions[4]) elseif MenuSelection > 4+getn(TeamActions[1])+getn(TeamActions[2])+getn(TeamActions[3])+getn(TeamActions[4]) then MenuSelection=0 DisplayMenu(self) return end
		if MenuSelection == 1 then MenuDisplayString = MenuDisplayString .. pointer end
		MenuDisplayString = MenuDisplayString .. "team1: " .. GlobalTeamTable[MenuTable["team1counter"]] .. "\n"
		if MenuSelection == 2 then MenuDisplayString = MenuDisplayString .. pointer end
		MenuDisplayString = MenuDisplayString .. "team2: " .. GlobalTeamTable[MenuTable["team2counter"]] .. "\n"
		if MenuSelection == 3 then MenuDisplayString = MenuDisplayString .. pointer end
		MenuDisplayString = MenuDisplayString .. "waypoint (team1): " .. GetPlayerStartWaypointByTeam(GlobalTeamTable[MenuTable["waypointcounter"]]) .. "\n"
		if MenuSelection == 4 then MenuDisplayString = MenuDisplayString .. pointer end
		MenuDisplayString = MenuDisplayString .. "bool: " .. tostring(MenuTable["bool"]) .. "\n"
		local MenuIndex=0
		for z=1,getn(TeamActions),1 do
			if z==1 then MenuIndex=4 MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " team1 teamaction " .. strrep(strchar(45), 15) .. "\n"
				elseif z==2 then MenuIndex=MenuIndex+getn(TeamActions[1]) MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " team1 teamaction waypoint " .. strrep(strchar(45), 15) .. "\n"
				elseif z==3 then MenuIndex=MenuIndex+getn(TeamActions[2]) MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " team1 teamaction team2 " .. strrep(strchar(45), 15) .. "\n"
				elseif z==4 then MenuIndex=MenuIndex+getn(TeamActions[3]) MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " team1 teamaction bool " .. strrep(strchar(45), 15) .. "\n"
			end
			for u=1,getn(TeamActions[z]),1 do
				if MenuSelection == MenuIndex+u then MenuDisplayString = MenuDisplayString .. pointer end
				MenuDisplayString = MenuDisplayString .. "" .. TeamActions[z][u] .. "\n"		
			end	  
		end 
	elseif MenuCategory == "statistics" then
		if MenuSelection~=0 then MenuSelection=0 DisplayMenu(self) return end
		MenuDisplayString = MenuDisplayString .. "\n" .. GetStatisticsForAllTeams() .. "\n"
		--SetScriptTimer(3,"DisplayMenu(self)",0)
		elseif MenuCategory == "music, sound, movies"	then
		for i=1,getn(MenuTable[MenuCategory]),1 do
			if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
			if i == 6 then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " more " .. strrep(strchar(45), 15) .. "\n" end
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end	
			if MenuTable["music, sound, movies"][i] == "play music track: " then MenuDisplayString = MenuDisplayString .. MenuTable[MenuCategory][i] .. MenuTable.musictrack .. "\n"  
				elseif MenuTable["music, sound, movies"][i] == "play sound: " then MenuDisplayString = MenuDisplayString .. MenuTable[MenuCategory][i] .. MenuTable.sound .. "\n"  	
				elseif MenuTable["music, sound, movies"][i] == "play mission dialogue: " then MenuDisplayString = MenuDisplayString .. MenuTable[MenuCategory][i] .. MenuTable.missiondialogue .. "\n"  	
				elseif MenuTable["music, sound, movies"][i] == "play movie: " then MenuDisplayString = MenuDisplayString .. MenuTable[MenuCategory][i] .. MenuTable.movie .. "\n"  	
				elseif MenuTable["music, sound, movies"][i] == "play radar movie: " then MenuDisplayString = MenuDisplayString .. MenuTable[MenuCategory][i] .. MenuTable.radarmovie .. "\n"  	
				else MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. "\n"
			end
		end
	elseif MenuCategory == "external scripts" then 
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory])+getn(ModScripts["filelist"]) elseif MenuSelection>(getn(MenuTable[MenuCategory])+getn(ModScripts["filelist"])) then MenuSelection = 0 DisplayMenu(self) return end 
		for i=1,getn(MenuTable[MenuCategory]),1 do
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end		
			if i <= 4 then MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. "\n" end
			if i == 5 then MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. " = " .. GiveYesNoString(ModScriptsAutoLoadList) .. "\n" end	
			if i == 6 then MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. " = " .. GiveYesNoString(ModScriptsAlwaysOff) .. "\n" end	
			--MenuTable["external scripts"]
		end
		for i=1,getn(ModScripts["filelist"]),1 do 
			if i == 1 then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " script status " .. strrep(strchar(45), 15) .. "\n" end
			--if i == ? then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " script submenus " .. strrep(strchar(45), 15) .. "\n" end		  
			if i+getn(MenuTable[MenuCategory]) == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end		
			MenuDisplayString = MenuDisplayString .. " " .. gsub(gsub(ModScripts["filelist"][i],"script.","",1),".lua","",1) .. " = " .. GiveYesNoString(ModScripts["status"][ModScripts["filelist"][i]]) .. "\n"		
		end
		--for autoconfig:
	elseif MenuCategory == "selected unit info" then MenuCategory = "unit information" DisplayMenu(self) return
	elseif MenuCategory == "unit information" then
		if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable[MenuCategory]),1 do 
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end		
			MenuDisplayString = MenuDisplayString .. MenuTable[MenuCategory][i] .. " " 
		end
		MenuDisplayString = MenuDisplayString .. "\n"
		if GetSelectedUnitRef() ~= nil then MenuDisplayString = MenuDisplayString .. PrintSelectedUnitInformation(nil,"return") end
	elseif MenuCategory == "general" then 
		if MenuSelection<0 then MenuSelection = getn(MenuTable["edit autoconfig"]["general"]) elseif MenuSelection>getn(MenuTable["edit autoconfig"]["general"]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["edit autoconfig"]["general"]),1 do
			if MenuSelection == i then MenuDisplayString = MenuDisplayString .. pointer end
			MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["general"][i] .. " = " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["general"][i])) .. "\n"
		end
	elseif MenuCategory == "meta mod io" then
		if MenuSelection<0 then MenuSelection = getn(MenuTable["edit autoconfig"]["meta mod io"]) elseif MenuSelection>getn(MenuTable["edit autoconfig"]["meta mod io"]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["edit autoconfig"]["meta mod io"]),1 do
			if MenuSelection == i then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuTable["edit autoconfig"]["meta mod io"][i] == "LiveInputFile" or MenuTable["edit autoconfig"]["meta mod io"][i] == "LiveOutputFile" or MenuTable["edit autoconfig"]["meta mod io"][i] == "TemplatesFile" or MenuTable["edit autoconfig"]["meta mod io"][i] == "ErrorFileLog" or MenuTable["edit autoconfig"]["meta mod io"][i] == "ErrorWarnings" or MenuTable["edit autoconfig"]["meta mod io"][i] == "ErrorExitType" then
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["meta mod io"][i] .. " = " .. getglobal(MenuTable["edit autoconfig"]["meta mod io"][i]) .. "\n"
				else 
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["meta mod io"][i] .. " = " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["meta mod io"][i])) .. "\n"
			end
		end
	elseif MenuCategory == "metamod & other" then 
		if MenuSelection<0 then MenuSelection = getn(MenuTable["edit autoconfig"]["metamod & other"]) elseif MenuSelection>getn(MenuTable["edit autoconfig"]["metamod & other"]) then MenuSelection = 0 DisplayMenu(self) return end
		for i=1,getn(MenuTable["edit autoconfig"]["metamod & other"]),1 do
			if MenuSelection == i then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuTable["edit autoconfig"]["metamod & other"][i] == "MetaTabMenuUnitSpawnSelection" or MenuTable["edit autoconfig"]["metamod & other"][i] == "Enemy_KindOf_Counter_Type" then
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["metamod & other"][i] .. " = " .. strchar(34) .. getglobal(MenuTable["edit autoconfig"]["metamod & other"][i]) .. strchar(34) .. "\n"
				elseif MenuTable["edit autoconfig"]["metamod & other"][i] == "AI_Boost_Cash_Ammount_PerSec" or MenuTable["edit autoconfig"]["metamod & other"][i] == "No_Damage_Start_Time" or MenuTable["edit autoconfig"]["metamod & other"][i] == "AI_Begin_Build_Delay" or MenuTable["edit autoconfig"]["metamod & other"][i] == "Map_Reshroud_Time" or MenuTable["edit autoconfig"]["metamod & other"][i] == "Hulk_Lifetime" then
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["metamod & other"][i] .. " = " .. getglobal(MenuTable["edit autoconfig"]["metamod & other"][i]) .. "\n"
				else
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["metamod & other"][i] .. " = " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["metamod & other"][i])) .. "\n"	
			end
		end
	elseif MenuCategory == "gamemodes setup" then 
		if MenuSelection<0 then MenuSelection = getn(MenuTable["edit autoconfig"]["gamemodes setup"]) elseif MenuSelection>getn(MenuTable["edit autoconfig"]["gamemodes setup"]) then MenuSelection = 0 DisplayMenu(self) return end 
		for i=1,getn(MenuTable["edit autoconfig"]["gamemodes setup"]),1 do
			if MenuTable["edit autoconfig"]["gamemodes setup"][i]=="Diplomacy_System" then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " diplomacy system " .. strrep(strchar(45), 15) .. "\n"
				elseif MenuTable["edit autoconfig"]["gamemodes setup"][i]=="NativeArtOfDefense" then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " native art of defense gamemode " .. strrep(strchar(45), 15) .. "\n"
				elseif MenuTable["edit autoconfig"]["gamemodes setup"][i]=="Hero_General_Gamemode" then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " hero general gamemode " .. strrep(strchar(45), 15) .. "\n"
				elseif MenuTable["edit autoconfig"]["gamemodes setup"][i]=="Random_Army_Gamemode" then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " random army gamemode " .. strrep(strchar(45), 15) .. "\n"
				elseif MenuTable["edit autoconfig"]["gamemodes setup"][i]=="Unit_vs_Unit_Gamemode" then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " unit vs unit gamemode " .. strrep(strchar(45), 15) .. "\n"
				elseif MenuTable["edit autoconfig"]["gamemodes setup"][i]=="Game_Continue_After_End" then MenuDisplayString = MenuDisplayString .. "" .. strrep(strchar(45), 15) .. " other " .. strrep(strchar(45), 15) .. "\n"
			end		
			if MenuSelection == i then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuTable["edit autoconfig"]["gamemodes setup"][i] == "Hero_General_Selection" or MenuTable["edit autoconfig"]["gamemodes setup"][i] == "Unit_vs_Unit_Selection" then
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["gamemodes setup"][i] .. " = " .. strchar(34) .. getglobal(MenuTable["edit autoconfig"]["gamemodes setup"][i]) .. strchar(34) .. "\n"
				elseif MenuTable["edit autoconfig"]["gamemodes setup"][i] == "Max_Waves" or MenuTable["edit autoconfig"]["gamemodes setup"][i] == "First_Wave_Delay" or MenuTable["edit autoconfig"]["gamemodes setup"][i] == "Wave_Delay" or MenuTable["edit autoconfig"]["gamemodes setup"][i] == "Random_Army_Gamemode_Rounds" or MenuTable["edit autoconfig"]["gamemodes setup"][i] == "Unit_vs_Unit_RoundsToWin" then
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["gamemodes setup"][i] .. " = " .. getglobal(MenuTable["edit autoconfig"]["gamemodes setup"][i]) .. "\n"
				else
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["gamemodes setup"][i] .. " = " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["gamemodes setup"][i])) .. "\n"	
			end
		end
	elseif MenuCategory == "mixed commands" then
		for i=1,getn(MenuTable[MenuCategory]),1 do
			if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuTable["mixed commands"][i] == "cinema mode" then MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. " for < " .. MenuTable.CinemaModeTime .. "s > " .. "\n"
			else MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. "\n" end
		end
	elseif MenuCategory == "camera & performance" then
		if MenuSelection<0 then MenuSelection = getn(MenuTable["edit autoconfig"]["camera & performance"]) elseif MenuSelection>getn(MenuTable["edit autoconfig"]["camera & performance"]) then MenuSelection = 0 DisplayMenu(self) return end 
		for i=1,getn(MenuTable["edit autoconfig"]["camera & performance"]),1 do
			if MenuSelection == i then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuTable["edit autoconfig"]["camera & performance"][i] == "Camera_Hack_2_Cam_Height" or MenuTable["edit autoconfig"]["camera & performance"][i] == "Camera_Max_Zoomable_Height" or MenuTable["edit autoconfig"]["camera & performance"][i] == "Camera_Tilt_Angle" or MenuTable["edit autoconfig"]["camera & performance"][i] == "Camera_Clip_Depth" or MenuTable["edit autoconfig"]["camera & performance"][i] == "FPS_Limit" or MenuTable["edit autoconfig"]["camera & performance"][i] == "Game_Simulation_Speed" or MenuTable["edit autoconfig"]["camera & performance"][i] == "Map_Cloud_Speed" or MenuTable["edit autoconfig"]["camera & performance"][i] == "RGB_Override_Red" or MenuTable["edit autoconfig"]["camera & performance"][i] == "RGB_Override_Green" or MenuTable["edit autoconfig"]["camera & performance"][i] == "RGB_Override_Blue" then
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["camera & performance"][i] .. " = " .. getglobal(MenuTable["edit autoconfig"]["camera & performance"][i]) .. "\n"
				else
				MenuDisplayString = MenuDisplayString .. MenuTable["edit autoconfig"]["camera & performance"][i] .. " = " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["camera & performance"][i])) .. "\n"	
			end
		end
		--everything else:
	else
		for i=1,getn(MenuTable[MenuCategory]),1 do
			if MenuSelection<0 then MenuSelection = getn(MenuTable[MenuCategory]) elseif MenuSelection>getn(MenuTable[MenuCategory]) then MenuSelection = 0 DisplayMenu(self) return end
			if MenuCategory == "gamemodes" and i == 1 then  MenuDisplayString = MenuDisplayString .. "(notice: better enable gamemodes in autoconfig and restart map)\n" end	
			if i == MenuSelection then MenuDisplayString = MenuDisplayString .. pointer end
			if MenuCategory == "write lua command" and i>4 then
				if mod(i-4,15)~=0 then MenuDisplayString = MenuDisplayString .. " " .. "" .. MenuTable[MenuCategory][i] .. "" .. " "
				else MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. "\n" end
				elseif MenuCategory == "performance" and i == 1 then	 
				MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. " " .. tostring(FPS_Limit) .. "\n"	
				else
				MenuDisplayString = MenuDisplayString .. " " .. MenuTable[MenuCategory][i] .. "\n"
			end
		end
	end
	MenuDisplayString = MenuDisplayString .. "\n"
	if MultiplayerStatus == 1 and self~=nil and LocalClientTeam~=GetTeamName(self) then return
		elseif BFMEIIROTWK_ACTIVE == 1 then ExecuteAction("DISPLAY_NOTIFICATION_BOX", "Generic", MenuDisplayString, 1000)
	else ExecuteAction("DISPLAY_TUTORIAL_TEXT", MenuDisplayString) end
end

function ExecuteMenuSelection(self,MenuArrow)
	if not self then self = GetPlayerSpellBook() end
	if MenuDisplayState == 0 then MenuCategory = "main" DisplayMenu(self) ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionUp",0) ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionDown",0) ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionLeft",0) ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionRight",0) return
		elseif MenuSelection == 0 then 
		if MenuCategory == "main" then 
			ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionUp",1) ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionDown",1) ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionLeft",1) ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionRight",1) 
			if BFMEIIROTWK_ACTIVE == 1 then ExecuteAction("DISPLAY_NOTIFICATION_BOX", "Generic", "\n\nCLOSING MENU\n\n", 1)
			else ExecuteAction("HIDE_TUTORIAL_TEXT") end
			MenuDisplayState = 0 
			return
		elseif MenuCategory=="edit value" or MenuCategory=="choose unit" or MenuCategory=="choose kind of" then
		MenuCategory=LastMenuCategory MenuSelection=LastMenuSelection DisplayMenu(self) return 
		elseif MenuCategory == "general" or MenuCategory == "metamod & other" or MenuCategory == "gamemodes setup" or MenuCategory == "camera & performance" or MenuCategory == "meta mod io" then MenuCategory = "edit autoconfig" DisplayMenu(self) return	
		elseif MenuCategory == "unit control & camera" then MenuCategory = "unit actions" DisplayMenu(self) return	
		elseif MenuCategory ~= "main" then
		if MenuCategory == "statistics" then DeleteScriptTimer("DisplayMenu(self)") end
		MenuCategory = "main" DisplayMenu(self) return
		end
	end
	if MenuCategory == "main" then MenuCategory=MenuTable["main"][MenuSelection] MenuSelection=0 DisplayMenu(self) return
	elseif MenuCategory == "mod info" then if MenuSelection == 1 then execute("explorer " .. strchar(34) .. "" .. GetFilePath() .. "" .. strchar(34) .. "") end
	elseif MenuCategory == "spawn" then 
		if MenuTable["spawn"][MenuSelection] == "spawn list" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "game" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "spawn for team" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "destination type" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "CoordinateX" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "CoordinateY" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "set X,Y coordiantes" then   local action = function() MenuTable.CoordinateX=GPOT[MenuTable.teamselection]["ChoosenPosition"]["x"] MenuTable.CoordinateY=GPOT[MenuTable.teamselection]["ChoosenPosition"]["y"] DisplayMenu(%self) end GiveChoosePositionOption(GetTeamName(self),action,"action_with_position")
		elseif MenuTable["spawn"][MenuSelection] == "waypoint" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "spawn with max level" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "spawn with max level + invincible" then MenuSideNavigation(self,"right")
		elseif MenuTable["spawn"][MenuSelection] == "number of spawns" then MenuSideNavigation(self,"right")	
		elseif MenuTable["spawn"][MenuSelection] == "add kind of to spawn list" then 
			ExecuteAction("TERRAIN_RENDER_DISABLE", 1)					
			ExecuteAction("SET_FPS_LIMIT", 1)
			tinsert(MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][2], GetObjectTypeListOfKindOfList(BFMEII_ROTWK_OBJECT_LIST_ALL,{MenuTable.kindofselection}))
			tinsert(MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][1], MenuTable.kindofselection)
			ExecuteAction("SET_FPS_LIMIT", 60)					
			ExecuteAction("TERRAIN_RENDER_DISABLE", 0)
		elseif MenuTable["spawn"][MenuSelection] == "spawn" then
			local DoActionOnSpawnedUnit = function(OBJREF)
				if MenuTable.SpawnWithMaxLevel or MenuTable.SpawnWithMaxLevelInvincible then
					ExecuteAction("UNIT_SET_EXPERIENCE_POINTS", OBJREF, 50000)
				end
				if MenuTable.SpawnWithMaxLevelInvincible then
					ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", OBJREF, "Indestructible", 1) 
				end
				if MenuTable.SpawnColor ~= "normal" then
					ExecuteAction("NAMED_CUSTOM_COLOR", OBJREF, UnitColorTable[MenuTable.SpawnColor])
				end
			end
			if MenuTable.SpawnListSelectionDesc=="weapon" then 
				if MenuTable.DestinationTypeSelection=="waypoint" then FireWeaponPosition(Weapon,0,0,MenuTable.waypointselection) 
				elseif MenuTable.DestinationTypeSelection=="choose position" then  local action = function() FireWeaponPosition(MenuTable.SpawnSelection,GPOT[MenuTable.teamselection]["ChoosenPosition"]["x"],GPOT[MenuTable.teamselection]["ChoosenPosition"]["y"]) end GiveChoosePositionOption(GetTeamName(self),action,"action_with_position")
				elseif MenuTable.DestinationTypeSelection=="coordinate" then FireWeaponPosition(MenuTable.SpawnSelection,MenuTable.CoordinateX,MenuTable.CoordinateY)
				elseif MenuTable.DestinationTypeSelection=="next to base" then local DelayedWeapon = function() FireWeaponPosition(MenuTable.SpawnSelection,0,0,nil,GenericDummy) end SpawnObjectTypeAtBase(NeutralTeam,GenericDummy,1) SetDelayed(DelayedWeapon)
				elseif MenuTable.DestinationTypeSelection=="on next object type same to selected object" then FireWeaponPosition(MenuTable.SpawnSelection,0,0,nil,GetObj.Type(GetSelectedUnitRef()))  
				elseif MenuTable.DestinationTypeSelection=="random position" then FireWeaponPosition(MenuTable.SpawnSelection,random(MapSize.x),random(MapSize.y))
				end
			else
				if MenuTable.DestinationTypeSelection=="waypoint" then spawn(MenuTable.SpawnSelection,MenuTable.teamselection,MenuTable.SpawnNumber,nil,MenuTable.waypointselection,DoActionOnSpawnedUnit)
				elseif MenuTable.DestinationTypeSelection=="choose position" then  local action = function() SpawnAtPosition(MenuTable.SpawnSelection,MenuTable.teamselection,GPOT[MenuTable.teamselection]["ChoosenPosition"]["x"],GPOT[MenuTable.teamselection]["ChoosenPosition"]["y"],0,0,0,0,MenuTable.SpawnNumber,MenuTable.SpawnSpeed,%DoActionOnSpawnedUnit) end GiveChoosePositionOption(GetTeamName(self),action,"action_with_position")
				elseif MenuTable.DestinationTypeSelection=="coordinate" then SpawnAtPosition(MenuTable.SpawnSelection,MenuTable.teamselection,MenuTable.CoordinateX,MenuTable.CoordinateY,0,0,0,0,MenuTable.SpawnNumber,MenuTable.SpawnSpeed,DoActionOnSpawnedUnit)
				elseif MenuTable.DestinationTypeSelection=="next to base" then SpawnObjectTypeAtBase(MenuTable.teamselection,MenuTable.SpawnSelection,MenuTable.SpawnNumber)
				elseif MenuTable.DestinationTypeSelection=="on next object type same to selected object" then spawn(MenuTable.SpawnSelection,MenuTable.teamselection,MenuTable.SpawnNumber,nil,nil,DoActionOnSpawnedUnit,GetObj.Type(GetSelectedUnitRef()))  
				elseif MenuTable.DestinationTypeSelection=="random position" then SpawnAtPosition(MenuTable.SpawnSelection,MenuTable.teamselection,random(MapSize.x),random(MapSize.y),0,0,0,0,MenuTable.SpawnNumber,MenuTable.SpawnSpeed,DoActionOnSpawnedUnit)
			end
		end
	end
	return	
		elseif MenuCategory == "BFMEII-ROTWK" then
				if MenuTable["BFMEII-ROTWK"][MenuSelection] == "CreatAHero customize" then 
					RefreshHeroCustomizationSave(MenuTable.CreatAHeroPartSelection, MenuTable.CreatAHeroPartSelectionState)	
					ObjectHideSubObjectPermanently(GetCustomHeroRef(self), MenuTable.CreatAHeroPartSelection, MenuTable.CreatAHeroPartSelectionState)
					MenuTable.CreatAHeroPartSelectionState=togglevar(MenuTable.CreatAHeroPartSelectionState)
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "spawn custom hero" then ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "CreateAHero", GetTeamName(self), GetPlayerStartWaypointByTeam(GetTeamName(self)))
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "save hero customization" then SaveHeroCustomizationSave()
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "load hero customization" then dofile(GetFilePath() .. "HeroCustomizationSave.lua") ApplyHeroCustomizationSave()
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "spawn" then ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", MenuTable.BFMEIIROTWkSpawnSelection, GetTeamName(self), GetPlayerStartWaypointByTeam(GetTeamName(self)))
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "no cp limit" then ExecuteAction("TEAM_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING",NeutralTeam,"NO_CP_LIMIT",1)
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "reveal map permanently for all" then spawn("MapRevealer",GetTeamName(self)) ExecuteAction("TEAM_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING",NeutralTeam,"REVEAL_MAP_FOR_ALL",1)
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "add kind of to spawn list" then 
					ExecuteAction("TERRAIN_RENDER_DISABLE", 1)					
					ExecuteAction("SET_FPS_LIMIT", 1)
					tinsert(BFMEIIROTWK_OBJECT_TYPE_ALL_LIST, GetObjectTypeListOfKindOfList(BFMEII_ROTWK_OBJECT_LIST_ALL,{MenuTable.BFMEIIROTWkKindOfSelection}))
					tinsert(BFMEIIROTWK_OBJECT_TYPE_ALL_LIST_DESC, MenuTable.BFMEIIROTWkKindOfSelection)
					ExecuteAction("SET_FPS_LIMIT", 60)					
					ExecuteAction("TERRAIN_RENDER_DISABLE", 0)					
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "write kind of list to file" then 				
					PrintTable(GetObjectTypeListOfKindOfList(BFMEII_ROTWK_OBJECT_LIST_ALL,{MenuTable.BFMEIIROTWkKindOfSelection}))
				end
		elseif MenuCategory == "counter" then
		for i=1,getn(MenuTable["counter"]),1 do
			if MenuTable["counter"][MenuSelection] == "kind of (short list): " then  Enemy_KindOf_Counter_Type=KindOfTableShort[MenuTable.kindofselectionshortlist] SetCounter("KindOfCounter" .. "_1", GetNumberOfAllEnemiesForKindOf(GetTeamName(self), KindOfTable[MenuTable.kindofselectionshortlist]), "Counter:CUSTOMENEMYCOUNT")
				elseif MenuTable["counter"][MenuSelection] == "kind of (all): " then  Enemy_KindOf_Counter_Type=KindOfTable[MenuTable.kindofselection] SetCounter("KindOfCounter" .. "_1", GetNumberOfAllEnemiesForKindOf(GetTeamName(self), KindOfTable[MenuTable.kindofselection]), "Counter:CUSTOMENEMYCOUNT")
			end
		end
		elseif MenuCategory == "write lua command" then
		if MenuSelection == 1 then dostring(MetaMenuLuaCommand) ExecuteAction("PLAY_SOUND_EFFECT", "Gui_SFX_GAMEOVER")
			elseif MenuSelection == 2 then MetaMenuLuaCommand = "" DisplayMenu(self)
			elseif MenuSelection == 3 then MetaMenuLuaCommand = strsub(MetaMenuLuaCommand,1,strlen(MetaMenuLuaCommand)-1) DisplayMenu(self)
			elseif MenuSelection == 4 then if MetaMenuLuaCommandCase == "lower" then MetaMenuLuaCommandCase = "upper" else MetaMenuLuaCommandCase = "lower" end
			else 
			if MetaMenuLuaCommandCase == "lower" then MetaMenuLuaCommand = MetaMenuLuaCommand .. MenuTable["write lua command"][MenuSelection] DisplayMenu(self) return
			else MetaMenuLuaCommand = MetaMenuLuaCommand .. strupper(MenuTable["write lua command"][MenuSelection]) DisplayMenu(self) return end
		end
		return
		elseif MenuCategory == "edit value" then
		if MenuSelection == 1 then 
			setglobal(MenuTable["edit autoconfig"][LastMenuCategory][LastMenuSelection],tonumber(AutoconfigValueEdit))
			ChangeAutoConfig(MenuTable["edit autoconfig"][LastMenuCategory][LastMenuSelection],StrLenF(MenuTable["edit autoconfig"][LastMenuCategory][LastMenuSelection],30) .. "= " .. AutoconfigValueEdit)
			AutoconfigValueEdit="" MenuCategory=LastMenuCategory MenuSelection=LastMenuSelection DisplayMenu(self) return --LastMenuCategory="" LastMenuSelection=""
			elseif MenuSelection == 2 then AutoconfigValueEdit = ""
			elseif MenuSelection == 3 then AutoconfigValueEdit = strsub(AutoconfigValueEdit,1,strlen(AutoconfigValueEdit)-1)
			else AutoconfigValueEdit = AutoconfigValueEdit .. MenuTable["edit value"][MenuSelection]
		end
		DisplayMenu(self) return
		elseif MenuCategory == "choose unit" or MenuCategory == "choose kind of" then
		setglobal(MenuTable["edit autoconfig"][LastMenuCategory][LastMenuSelection],MenuTable[MenuCategory][MenuSelection])
		ChangeAutoConfig(MenuTable["edit autoconfig"][LastMenuCategory][LastMenuSelection],StrLenF(MenuTable["edit autoconfig"][LastMenuCategory][LastMenuSelection],30) .. "= " .. strchar(34) .. MenuTable[MenuCategory][MenuSelection] .. strchar(34))
		MenuCategory=LastMenuCategory MenuSelection=LastMenuSelection DisplayMenu(self) return
		elseif MenuCategory == "edit autoconfig" then MenuCategory = MenuTable["edit autoconfig"][MenuSelection] MenuSelection=0
		elseif MenuCategory == "metamod & other" then
		if MenuTable["edit autoconfig"]["metamod & other"][MenuSelection] == "MetaTabMenuUnitSpawnSelection" then
			LastMenuSelection=MenuSelection LastMenuCategory=MenuCategory MenuCategory="choose unit" MenuSelection=0 DisplayMenu(self) return 
			elseif MenuTable["edit autoconfig"]["metamod & other"][MenuSelection] == "Enemy_KindOf_Counter_Type" then
			LastMenuSelection=MenuSelection LastMenuCategory=MenuCategory MenuCategory="choose kind of" MenuSelection=0 DisplayMenu(self) return 
			elseif MenuTable["edit autoconfig"]["metamod & other"][MenuSelection] == "AI_Boost_Cash_Ammount_PerSec" or MenuTable["edit autoconfig"]["metamod & other"][MenuSelection] == "No_Damage_Start_Time" or MenuTable["edit autoconfig"]["metamod & other"][MenuSelection] == "AI_Begin_Build_Delay" or MenuTable["edit autoconfig"]["metamod & other"][MenuSelection] == "Map_Reshroud_Time" or MenuTable["edit autoconfig"]["metamod & other"][MenuSelection] == "Hulk_Lifetime" then
			LastMenuSelection=MenuSelection LastMenuCategory=MenuCategory MenuCategory="edit value" MenuSelection=0 DisplayMenu(self) return
			else
			toggleglobal(MenuTable["edit autoconfig"]["metamod & other"][MenuSelection]) ChangeAutoConfig(MenuTable["edit autoconfig"]["metamod & other"][MenuSelection],StrLenF(MenuTable["edit autoconfig"]["metamod & other"][MenuSelection],30) .. "= " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["metamod & other"][MenuSelection])))
		end
		elseif MenuCategory == "gamemodes setup" then
		if MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "Hero_General_Selection" or MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "Unit_vs_Unit_Selection" then
			LastMenuSelection=MenuSelection LastMenuCategory=MenuCategory MenuCategory="choose unit" MenuSelection=0 DisplayMenu(self) return   
			elseif MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "Max_Waves" or MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "NAOD.DifficultyFactor"  or MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "First_Wave_Delay" or MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "Wave_Delay" or MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "Random_Army_Gamemode_Rounds" or MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "Unit_vs_Unit_RoundsToWin" then
			LastMenuSelection=MenuSelection LastMenuCategory=MenuCategory MenuCategory="edit value" MenuSelection=0 DisplayMenu(self) return
			elseif MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection] == "MetaCreditShopSpawnTemplate" then 
			MetaCreditShopSpawnTemplate=NextTableElement(TemplatesTable,MetaCreditShopSpawnTemplate) 
			ChangeAutoConfig("MetaCreditShopSpawnTemplate",StrLenF("MetaCreditShopSpawnTemplate",30) .. "= " .. '"' .. MetaCreditShopSpawnTemplate .. '"')
			DisplayMenu(self) return
			else
			toggleglobal(MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection]) ChangeAutoConfig(MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection],StrLenF(MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection],30) .. "= " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["gamemodes setup"][MenuSelection])))
		end
		elseif MenuCategory == "meta mod io" then
		if MenuTable["edit autoconfig"]["meta mod io"][MenuSelection] == "LiveInputFile" or MenuTable["edit autoconfig"]["meta mod io"][MenuSelection] == "LiveOutputFile" or MenuTable["edit autoconfig"]["meta mod io"][MenuSelection] == "TemplatesFile" or MenuTable["edit autoconfig"]["meta mod io"][MenuSelection] == "ErrorFileLog" or MenuTable["edit autoconfig"]["meta mod io"][MenuSelection] == "ErrorWarnings" or MenuTable["edit autoconfig"]["meta mod io"][MenuSelection] == "ErrorExitType" then  
			else 
			toggleglobal(MenuTable["edit autoconfig"]["meta mod io"][MenuSelection]) ChangeAutoConfig(MenuTable["edit autoconfig"]["meta mod io"][MenuSelection],StrLenF(MenuTable["edit autoconfig"]["meta mod io"][MenuSelection],30) .. "= " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["meta mod io"][MenuSelection])))
		end
		DisplayMenu(self) return
		elseif MenuCategory == "camera & performance" then
		if MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "Camera_Hack_2_Cam_Height" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "Camera_Max_Zoomable_Height" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "Camera_Tilt_Angle" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "Camera_Clip_Depth" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "FPS_Limit" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "Game_Simulation_Speed" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "Map_Cloud_Speed" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "RGB_Override_Red" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "RGB_Override_Green" or MenuTable["edit autoconfig"]["camera & performance"][MenuSelection] == "RGB_Override_Blue" then
			LastMenuSelection=MenuSelection LastMenuCategory=MenuCategory MenuCategory="edit value" MenuSelection=0 DisplayMenu(self) return   
			else
			toggleglobal(MenuTable["edit autoconfig"]["camera & performance"][MenuSelection]) ChangeAutoConfig(MenuTable["edit autoconfig"]["camera & performance"][MenuSelection],StrLenF(MenuTable["edit autoconfig"]["camera & performance"][MenuSelection],30) .. "= " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["camera & performance"][MenuSelection])))
		end
		elseif MenuCategory == "general" then 
		toggleglobal(MenuTable["edit autoconfig"]["general"][MenuSelection]) ChangeAutoConfig(MenuTable["edit autoconfig"]["general"][MenuSelection],StrLenF(MenuTable["edit autoconfig"]["general"][MenuSelection],30) .. "= " .. GiveYesNoString(getglobal(MenuTable["edit autoconfig"]["general"][MenuSelection])))
		elseif MenuCategory == "camera setup" then
		if MenuTable["camera setup"][MenuSelection] == "adjust zoom manually" then spawn("MetaControlDummyUnlimitedCameraHackDelayer2",GetTeamName(self),1,1)  
			elseif MenuTable["camera setup"][MenuSelection] == "lock/unlock zoom" then CamZoomLocktoggleglobal()
			elseif MenuTable["camera setup"][MenuSelection] == "zoom -/+" then Camera_Hack_2_Cam_Height=Camera_Hack_2_Cam_Height+0.05 ExecuteAction("ZOOM_CAMERA", Camera_Hack_2_Cam_Height , 1, 1, 1)
			elseif MenuTable["camera setup"][MenuSelection] == "zoom2 -/+" then Camera_Max_Zoomable_Height=Camera_Max_Zoomable_Height+0.05 ExecuteAction("CAMERA_SET_DEFAULT", 0.00, 0.00 , Camera_Max_Zoomable_Height)
			elseif MenuTable["camera setup"][MenuSelection] == "pitch -/+" then Camera_Tilt_Angle=Camera_Tilt_Angle+0.05 ExecuteAction("PITCH_CAMERA", Camera_Tilt_Angle, 1, 1, 1)
			elseif MenuTable["camera setup"][MenuSelection] == "first/third person mode" then MetaControlFirstAndThirdPersonMode(GetSelectedUnitRef())  
			elseif MenuTable["camera setup"][MenuSelection] == "first/third person mode (psychedelic)" then MetaControlFirstAndThirdPersonMode(GetSelectedUnitRef(),"psychedelic")
			-- elseif MenuTable["camera setup"][MenuSelection] == "first person mode" then FirstPersonMode(GetTeamName(self),GetSelectedUnitRef(),60,"observermode",hideui,psychedelic)
			-- elseif MenuTable["camera setup"][MenuSelection] == "first person mode (psychedelic)" then FirstPersonMode(GetTeamName(self),GetSelectedUnitRef(),60,"observermode",nil,"psychedelic")
			-- elseif MenuTable["camera setup"][MenuSelection] == "third person mode" then ThirdPersonMode(GetTeamName(self),GetSelectedUnitRef(),60,"observermode",nil)
			-- elseif MenuTable["camera setup"][MenuSelection] == "third person mode narrow" then ThirdPersonMode(GetTeamName(self),GetSelectedUnitRef(),60,"observermode",nil,"narrow")
			elseif MenuTable["camera setup"][MenuSelection] == "reset camera" then ResetCamera()	
			elseif MenuTable["camera setup"][MenuSelection] == "CAMERA_MOD_FREEZE_ANGLE" then ExecuteAction("CAMERA_MOD_FREEZE_ANGLE")
			elseif MenuTable["camera setup"][MenuSelection] == "LOCK_CAMERA_ANGLE_AND_HEIGHT" then ExecuteAction("LOCK_CAMERA_ANGLE_AND_HEIGHT", toggleglobal("CAMERA_ANGLE_AND_HEIGHT_LOCK"))
			elseif MenuTable["camera setup"][MenuSelection] == "LOCK_CAMERA_SCROLL" then ExecuteAction("LOCK_CAMERA_SCROLL", toggleglobal("CAMERA_SCROLL_LOCK")) 
			elseif MenuTable["camera setup"][MenuSelection] == "CAMERA_STOP_TETHER_NAMED" then ExecuteAction("CAMERA_STOP_TETHER_NAMED")
			elseif MenuTable["camera setup"][MenuSelection] == "MOVE_CAMERA_TO_SELECTION" then ExecuteAction("MOVE_CAMERA_TO_SELECTION")
			elseif MenuTable["camera setup"][MenuSelection] == "CAMERA_MOVE_HOME" then ExecuteAction("CAMERA_MOVE_HOME")
			elseif MenuTable["camera setup"][MenuSelection] == "RESET_CAMERA_TUTORIAL_STATE" then ExecuteAction("RESET_CAMERA_TUTORIAL_STATE")
		end
		return 
		elseif MenuCategory == "unit information" then	
		if GetObj.Type(GetSelectedUnitRef())==nil then return end
		if MenuTable["unit information"][MenuSelection] == "refresh" then DisplayMenu(self) return
			elseif MenuTable["unit information"][MenuSelection] == "WriteToFile" then PrintSelectedUnitInformation("writetofile")
		end
		elseif MenuCategory == "unit actions"	then
		if MenuTable["unit actions"][1][MenuSelection] == "unit control & camera" then MenuCategory = "unit control & camera" DisplayMenu(self) return end
		local TeamName=GetTeamName(self)
		local SelectedUnit = GetSelectedUnitRef()
		if SelectedUnit == nil then return end
		MenuTable.StoreAndGetObjectAttribute(SelectedUnit)	
		if MenuSelection<=getn(MenuTable["unit actions"][1]) then
			if MenuTable["unit actions"][1][MenuSelection] == "unit information" then MenuCategory = "unit information" DisplayMenu(self) return
				elseif MenuTable["unit actions"][1][MenuSelection] == "copy" then 
				local UnitTemplate=GetSingleObjectTemplate(SelectedUnit) 
				local ObjectTemplate=GetSingleObjectTemplate(SelectedUnit) 
				local pastecommand = function()	SpawnTemplate(%ObjectTemplate,%TeamName,GPOT[%TeamName]["ChoosenPosition"]["x"],GPOT[%TeamName]["ChoosenPosition"]["y"],"attrib","offset_coord_overwrite") end 
				GiveChoosePositionOption(TeamName,pastecommand,"action_with_position")
				return
				elseif MenuTable["unit actions"][1][MenuSelection] == "cut" then 
				local UnitTemplate=GetSingleObjectTemplate(SelectedUnit) 
				local ObjectTemplate=GetSingleObjectTemplate(SelectedUnit)
				local pastecommand = function()	SpawnTemplate(%ObjectTemplate,%TeamName,GPOT[%TeamName]["ChoosenPosition"]["x"],GPOT[%TeamName]["ChoosenPosition"]["y"],"attrib","offset_coord_overwrite") end 
				GiveChoosePositionOption(TeamName,pastecommand,"action_with_position")
				delete(SelectedUnit)
				return
				elseif MenuTable["unit actions"][1][MenuSelection] == "delete" then delete(SelectedUnit) return
				elseif MenuTable["unit actions"][1][MenuSelection] == "CopyToWaypoint" then ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT",GetObj.Type(SelectedUnit),TeamName,MenuTable.waypointselection)	
				elseif MenuTable["unit actions"][1][MenuSelection] == "TeleportToWaypoint" then ExecuteAction("UNIT_TELEPORT_TO_WAYPOINT",SelectedUnit,MenuTable.waypointselection)
				elseif MenuTable["unit actions"][1][MenuSelection] == "waypoint: " then MenuTable.waypointselection=WaypointTable[GetIndexOfTableElement(WaypointTable,MenuTable.waypointselection,"if_last_give_zero")+1]		
				elseif MenuTable["unit actions"][1][MenuSelection] == "DoSpecialpower: " then ObjectDoSpecialPower(SelectedUnit,MenuTable["unit actions"].specialpower)
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleUpgrade: " then ToggleUpgrade(SelectedUnit,MenuTable["unit actions"].upgrades)
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleObjectFlag: " then ToggleObjectPanelFlag(SelectedUnit,MenuTable["unit actions"].objectflag)
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleStatus: " then ToggleObjectStatus(SelectedUnit,ObjectStatusTable[MenuTable["unit actions"].status]) 
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleModelcondition(10s): " then ToggleModelCondition(SelectedUnit,MenuTable["unit actions"].modelcondition)
				elseif MenuTable["unit actions"][1][MenuSelection] == "BoostAttributes" then ObjectCreateAndFireTempWeapon(SelectedUnit,"HeroGeneralWeapon")
				elseif MenuTable["unit actions"][1][MenuSelection] == "LevelUp" then ExecuteAction("UNIT_SET_EXPERIENCE_POINTS",SelectedUnit,50000)
				elseif MenuTable["unit actions"][1][MenuSelection] == "heal" then ExecuteAction("UNIT_SET_HEALTH",GetObj.String(SelectedUnit),100)
				elseif MenuTable["unit actions"][1][MenuSelection] == "flash" then flash(SelectedUnit)
				elseif MenuTable["unit actions"][1][MenuSelection] == "FireWeaponOnUnit: " then ObjectCreateAndFireTempWeapon(SelectedUnit,MenuTable["unit actions"].weapon)
				elseif MenuTable["unit actions"][1][MenuSelection] == "SetAttitude: " then ExecuteAction("NAMED_SET_ATTITUDE",SelectedUnit,Behaviour[MenuTable["unit actions"].attitude])
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleStealth" then ExecuteAction("NAMED_SET_STEALTH_ENABLED",SelectedUnit,MenuTable.StoreAndGetObjectAttribute(SelectedUnit,"stealth"))
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleSleepStatus" then ExecuteAction("NAMED_SET_SLEEP_STATUS",SelectedUnit,MenuTable.StoreAndGetObjectAttribute(SelectedUnit,"sleepstatus"))
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleHeldStatus" then ExecuteAction("NAMED_SET_HELD",SelectedUnit,MenuTable.StoreAndGetObjectAttribute(SelectedUnit,"heldstatus"))
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleStandGroundStatus" then ExecuteAction("UNIT_STAND_GROUND",SelectedUnit,MenuTable.StoreAndGetObjectAttribute(SelectedUnit,"standgroundstatus"))
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleAIStatus" then ExecuteAction("UNIT_AI_TRANSFER",SelectedUnit,MenuTable.StoreAndGetObjectAttribute(SelectedUnit,"ai"))
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleForbidPlayerCommands" then ObjectForbidPlayerCommands(SelectedUnit,MenuTable.StoreAndGetObjectAttribute(SelectedUnit,"forbidplayercommands"))
				elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleStrictControl" then ExecuteAction("NAMED_SET_STRICT_CONTROL_ENABLED",SelectedUnit,MenuTable.StoreAndGetObjectAttribute(SelectedUnit,"strictcontrol"))
				elseif MenuTable["unit actions"][1][MenuSelection] == "SetStance: " then ExecuteAction("UNIT_SET_STANCE",SelectedUnit,STANCE_TYPE[MenuTable["unit actions"].stance])
				elseif MenuTable["unit actions"][1][MenuSelection] == "UseCommandButton: " then ExecuteAction("NAMED_USE_COMMANDBUTTON_ABILITY",SelectedUnit,MenuTable["unit actions"].commandbutton)
				elseif MenuTable["unit actions"][1][MenuSelection] == "unit action" then ExecuteAction(MenuTable["unit actions"].singleaction,SelectedUnit)
				elseif MenuTable["unit actions"][1][MenuSelection] == "unit waypoint action" then ExecuteAction(MenuTable["unit actions"].posaction,SelectedUnit,MenuTable.waypointselection)	
			end
			elseif MenuSelection>getn(MenuTable["unit actions"][1]) then
			ExecuteAction(MenuTable["unit actions"][2][MenuSelection-getn(MenuTable["unit actions"][1])],SelectedUnit)	
			elseif MenuSelection>getn(MenuTable["unit actions"][1])+getn(MenuTable["unit actions"][2]) then
			ExecuteAction(MenuTable["unit actions"][3][MenuSelection-getn(MenuTable["unit actions"][1])-getn(MenuTable["unit actions"][2])],SelectedUnit,MenuTable.waypointselection)	    
		end	
		elseif MenuCategory == "unit control & camera" then
        local offset=20
		local TeamName=GetTeamName(self) 
		local SelectedUnit = GetSelectedUnitRef()
		if SelectedUnit~=nil then if GetObj.Type(SelectedUnit)==nil then return end end
		if MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "reset camera" then ResetCamera()
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "navigation mode" then LastMenuCategory=MenuCategory GSelectedUnitRef=GetSelectedUnitRef() MenuCategory = "navigation mode" DisplayMenu(self) MetaMenuHideMetaControlMenu(self) return	
			elseif SelectedUnit == nil then return
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "first/third person mode" then MetaControlFirstAndThirdPersonMode(SelectedUnit)
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "first/third person mode (psychedelic)" then MetaControlFirstAndThirdPersonMode(SelectedUnit,"psychedelic")		
			-- if MenuTable["gamemodes"][MenuSelection] == "first person mode" then FirstPersonMode(GetTeamName(self),GetSelectedUnitRef(),60,"observermode",hideui,psychedelic)
			-- elseif MenuTable["gamemodes"][MenuSelection] == "first person mode (psychedelic)" then FirstPersonMode(GetTeamName(self),GetSelectedUnitRef(),60,"observermode",nil,"psychedelic")
			-- elseif MenuTable["gamemodes"][MenuSelection] == "third person mode" then ThirdPersonMode(GetTeamName(self),GetSelectedUnitRef(),60,"observermode",nil)
			-- elseif MenuTable["gamemodes"][MenuSelection] == "third person mode narrow" then ThirdPersonMode(GetTeamName(self),GetSelectedUnitRef(),60,"observermode",nil,"narrow")
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "up" then UnitMoveToPosition(SelectedUnit,GetObjectPosition(SelectedUnit).x,GetObjectPosition(SelectedUnit).y+offset)  
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "down" then UnitMoveToPosition(SelectedUnit,GetObjectPosition(SelectedUnit).x,GetObjectPosition(SelectedUnit).y-offset) 
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "left" then UnitMoveToPosition(SelectedUnit,GetObjectPosition(SelectedUnit).x-offset,GetObjectPosition(SelectedUnit).y) 
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "right" then UnitMoveToPosition(SelectedUnit,GetObjectPosition(SelectedUnit).x+offset,GetObjectPosition(SelectedUnit).y) 
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "north" then local TREF=RandomString(5) SpawnAtPosition(GenericDummy,NeutralTeam,GetObjectPosition(SelectedUnit).x+offset,GetObjectPosition(SelectedUnit).y+offset,0,TREF) local action = function() ExecuteAction("NAMED_FACE_NAMED",%SelectedUnit,%TREF) pop() end push(action)
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "south" then local TREF=RandomString(5) SpawnAtPosition(GenericDummy,NeutralTeam,GetObjectPosition(SelectedUnit).x-offset,GetObjectPosition(SelectedUnit).y-offset,0,TREF) local action = function() ExecuteAction("NAMED_FACE_NAMED",%SelectedUnit,%TREF) pop() end push(action)
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "east" then local TREF=RandomString(5) SpawnAtPosition(GenericDummy,NeutralTeam,GetObjectPosition(SelectedUnit).x+offset,GetObjectPosition(SelectedUnit).y,0,TREF) local action = function() ExecuteAction("NAMED_FACE_NAMED",%SelectedUnit,%TREF) pop() end push(action)
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "west" then local TREF=RandomString(5) SpawnAtPosition(GenericDummy,NeutralTeam,GetObjectPosition(SelectedUnit).x-offset,GetObjectPosition(SelectedUnit).y,0,TREF) local action = function() ExecuteAction("NAMED_FACE_NAMED",%SelectedUnit,%TREF) pop() end push(action) 
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "CAMERA_FOLLOW_NAMED" then ExecuteAction("CAMERA_FOLLOW_NAMED", SelectedUnit, 1, 0.01)
			elseif MenuTable["unit actions"]["unit control & camera"][MenuSelection] == "CAMERA_TETHER_NAMED" then ExecuteAction("CAMERA_TETHER_NAMED", SelectedUnit, 0, 1.00)		
			else ExecuteAction(MenuTable["unit actions"]["unit control & camera"][MenuSelection])
		end		
		elseif MenuCategory == "external scripts" then
		if MenuTable["external scripts"][MenuSelection] == "reload scripts" then ModScripts.LoadFiles()
			elseif MenuTable["external scripts"][MenuSelection] == "run enabled scripts now" then for k,v in ModScripts["data"] do dostring(v) end
			elseif MenuTable["external scripts"][MenuSelection] == "register all 'script.***' files automatically" then ModScripts.GetScriptFileList(ModScripts.Prefix,ModScripts.Suffix) 
			elseif MenuTable["external scripts"][MenuSelection] == "create example script" then ModScripts.CreateExampleScript()
			elseif MenuTable["external scripts"][MenuSelection] == "ModScriptsAutoLoadList" then ModScriptsAutoLoadList=togglevar(ModScriptsAutoLoadList) ChangeAutoConfig("ModScriptsAutoLoadList",StrLenF("ModScriptsAutoLoadList",30) .. "= " .. GiveYesNoString(ModScriptsAutoLoadList))
			elseif MenuTable["external scripts"][MenuSelection] == "ModScriptsAlwaysOff" then ModScriptsAlwaysOff=togglevar(ModScriptsAlwaysOff) ChangeAutoConfig("ModScriptsAlwaysOff",StrLenF("ModScriptsAlwaysOff",30) .. "= " .. GiveYesNoString(ModScriptsAlwaysOff))
		end
		local tsize=getn(MenuTable["external scripts"])
		if MenuSelection>tsize then 
			local tstr="ModScripts[" .. '"status"' .. "][" .. '"' .. ModScripts["filelist"][MenuSelection-tsize] .. '"' .. "]"
			ModScripts["status"][ModScripts["filelist"][MenuSelection-tsize]]=togglevar(ModScripts["status"][ModScripts["filelist"][MenuSelection-tsize]])
			ModScripts.SetValue(ModScripts["filelist"][MenuSelection-tsize],'ModScripts["status"]',tstr .. " = " .. ModScripts["status"][ModScripts["filelist"][MenuSelection-tsize]]) 
		end
		elseif MenuCategory == "other" then
		if MenuTable["other"][MenuSelection] == "run external lua script " .. LiveInputFile then RunExternalLuaScript(self)
			elseif MenuTable["other"][MenuSelection] == "lua event trigger" then spawn("MetaControlDummyLuaEventTrigger",GetTeamName(self),1,1)  
			elseif MenuTable["other"][MenuSelection] == "write list of all native lua functions & commands" then WriteListOfAllLuaCommands()
			elseif MenuTable["other"][MenuSelection] == "write info about all objects (LiveOutputFile)" then InfoOnAllObjects()
			elseif MenuTable["other"][MenuSelection] == "write info about all objects more (LiveOutputFile)" then WriteCurrentObjectRefTable()
			elseif MenuTable["other"][MenuSelection] == "write list of map specific world builder objects (LiveOutputFile)" then WriteWorldBuilderUseableObjectsList()
			elseif MenuTable["other"][MenuSelection] == "write info about team relations (LiveOutputFile)" then InfoTeamRelations()
			elseif MenuTable["other"][MenuSelection] == "write statistics abot all teams (LiveOutputFile)" then out(GetStatisticsForAllTeams())
			elseif MenuTable["other"][MenuSelection] == "write info about selected unit (LiveOutputFile)" then PrintSelectedUnitInformation("writetofile")
			elseif MenuTable["other"][MenuSelection] == "write info about map (LiveOutputFile)" then out(GetMapInformationString())
			elseif MenuTable["other"][MenuSelection] == "write globals table (LiveOutputFile)" then WriteTableContent(globals())
			elseif MenuTable["other"][MenuSelection] == "write new standard autoconfig.lua" then WriteAutoconfig() --WriteToFile(LUAAutostartDefault,"" .. GetFilePath() .. AutostartFile)
			elseif MenuTable["other"][MenuSelection] == "write autoconfig.lua with all disabled" then VanillaSettings() WriteAutoconfig() --WriteToFile(LUAAutostartDefault,"" .. GetFilePath() .. AutostartFile)
			elseif MenuTable["other"][MenuSelection] == "instant vanilla settings" then VanillaSettings() DisableMetaModMenus(self,"all")
			elseif MenuTable["other"][MenuSelection] == "reload autoconfig.lua" then ReloadAutostartConfig(self)
			elseif MenuTable["other"][MenuSelection] == "FREEZE_TIME" then ExecuteAction("FREEZE_TIME")
			elseif MenuTable["other"][MenuSelection] == "UNFREEZE_TIME" then ExecuteAction("UNFREEZE_TIME")
			elseif MenuTable["other"][MenuSelection] == "IDLE_ALL_UNITS" then ExecuteAction("IDLE_ALL_UNITS")
			elseif MenuTable["other"][MenuSelection] == "TOGGLE_AVI_CAPTURE" then ExecuteAction("TOGGLE_AVI_CAPTURE")
			elseif MenuTable["other"][MenuSelection] == "QUICKVICTORY" then ExecuteAction("QUICKVICTORY")
			elseif MenuTable["other"][MenuSelection] == "DISABLE_SCORING" then ExecuteAction("DISABLE_SCORING")
			elseif MenuTable["other"][MenuSelection] == "EVA_SET_ENABLED_DISABLED" then ExecuteAction("EVA_SET_ENABLED_DISABLED", 1)
			elseif MenuTable["other"][MenuSelection] == "GLOBAL_SET_STEALTH_ENABLED" then ExecuteAction("GLOBAL_SET_STEALTH_ENABLED", toggleglobal("Stealth_For_Units_Enabled"))
			elseif MenuTable["other"][MenuSelection] == "SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS" then ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", toggleglobal("Game_Continue_After_End"))
			elseif MenuTable["other"][MenuSelection] == "exit map" then ExecuteAction("MAP_EXIT")
			elseif MenuTable["other"][MenuSelection] == "exit game" then exit()
		end 
		return 
		elseif MenuCategory == "gamemodes" then
		if MenuTable["gamemodes"][MenuSelection] == "NativeArtOfDefense" then NativeArtOfDefense=1 NAOD.InitializeNativeArtOfDefense()
			elseif MenuTable["gamemodes"][MenuSelection] == "HeroGeneralGamemode" then Hero_General_Gamemode=1 HeroGeneralGamemode()
			elseif MenuTable["gamemodes"][MenuSelection] == "RandomArmyGamemode" then Random_Army_Gamemode=1 RandomArmyGamemode()
			elseif MenuTable["gamemodes"][MenuSelection] == "UnitVSUnitGamemode" then Unit_vs_Unit_Gamemode=1 UnitVSUnitGamemode()	
		end	
		return 
		elseif MenuCategory == "diplomacy & more" then
		if MenuTable["diplomacy & more"][MenuSelection] == "previous player" then PrevPlayer(self)
			elseif MenuTable["diplomacy & more"][MenuSelection] == "next player" then NextPlayer(self)
			elseif MenuTable["diplomacy & more"][MenuSelection] == "show all relations" then ShowAllRelations()
			elseif MenuTable["diplomacy & more"][MenuSelection] == "request alliance" then RequestAlliance(self)
			elseif MenuTable["diplomacy & more"][MenuSelection] == "break alliance" then BreakAlliance(self)
			elseif MenuTable["diplomacy & more"][MenuSelection] == "request allied help" then RequestAlliedHelp(self,"forcecommand") 
			elseif MenuTable["diplomacy & more"][MenuSelection] == "take control of allied" then TakeControlOfAllied(self)
			elseif MenuTable["diplomacy & more"][MenuSelection] == "team commander application" then Diplomacy_ApplyForTeamCommander(self)
			elseif MenuTable["diplomacy & more"][MenuSelection] == "issue attack-move command to position" then Diplomacy_MoveAttackCommand(self,"forcecommand")
			elseif MenuTable["diplomacy & more"][MenuSelection] == "merge with allied team toggle" then TemporaryMergeAlliedTeam(self,"forcemerge")
			elseif MenuTable["diplomacy & more"][MenuSelection] == "merge own team with allied toggle" then TemporaryMergeOwnTeam(self,"forcemerge")
			elseif MenuTable["diplomacy & more"][MenuSelection] == "switch teams toggle" then SwitchTeamsAllUnits(TeamName,GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) --SwitchTeams(self,"forceswitch")
			elseif MenuTable["diplomacy & more"][MenuSelection] == "merge team with next ally" then MergeTeamWithNextAllied(self,"forcemerge")
			elseif MenuTable["diplomacy & more"][MenuSelection] == "merge team with next enemy" then MergeTeamWithNextEnemy(self,"forcemerge")
			elseif MenuTable["diplomacy & more"][MenuSelection] == "give money to team" then GiveMoney(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]],500)
		end
		return 
		elseif MenuCategory == "mixed commands" then
		if MenuTable["mixed commands"][MenuSelection] == "enable some player powers" then spawn("MetaControlDummyMainTabMenuPlayerPowerToggler",GetTeamName(self),1,1) 
			elseif MenuTable["mixed commands"][MenuSelection] == "MetaCreditShop toggle" then ToggleObjectTypeExistence("MetaCreditShop",GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "DiplomacyMenu toggle" then ToggleObjectTypeExistence("MetaControlDummyDiplomacyTabMenu",GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "freeze game" then ToggleObjectTypeExistence("MetaControlDummyFreezeGame",HumanPlayerTable[1])
			elseif MenuTable["mixed commands"][MenuSelection] == "disable meta tab and meta command menu" then spawn("MetaControlDummyGlobalDeactivator",GetTeamName(self),1,1)  
			elseif MenuTable["mixed commands"][MenuSelection] == "instant money" then spawn("MetaControlDummyMoneyImmediate",GetTeamName(self),1,1)  
			elseif MenuTable["mixed commands"][MenuSelection] == "every ai off toggle" then spawn("MetaControlDummyEveryAIOFFToggler",GetTeamName(self),1,1)  
			elseif MenuTable["mixed commands"][MenuSelection] == "enemy ai off toggle" then spawn("MetaControlDummyEnemyAIOFFToggler",GetTeamName(self),1,1)  
			elseif MenuTable["mixed commands"][MenuSelection] == "reveal map toggle" then spawn("MetaControlDummyMapRevealerToggler",GetTeamName(self),1,1)  
			elseif MenuTable["mixed commands"][MenuSelection] == "ai boost toggle" then spawn("MetaControlDummyAIBoostActivator",GetTeamName(self),1,1)  
			elseif MenuTable["mixed commands"][MenuSelection] == "allied ai boost toggle" then spawn("MetaControlDummyAIBoostAlliesActivator",GetTeamName(self),1,1)  
			elseif MenuTable["mixed commands"][MenuSelection] == "ai co control toggle" then spawn("MetaControlDummyAICoControlToggler",GetTeamName(self),1,1)  
			elseif MenuTable["mixed commands"][MenuSelection] == "spawn unit (autostart.lua selection)" then UnitSpawnerSpawn(self)  
			elseif MenuTable["mixed commands"][MenuSelection] == "indestructible toggle" then MakePlayerIndestructible(self)
			elseif MenuTable["mixed commands"][MenuSelection] == "infinite energy toggle" then ToggleObjectTypeExistence("InfiniteEnergyDummy",GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "build anywhere toggle" then ToggleObjectTypeExistence("BuildAnywhereDummy",GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "infinite production speed toggle" then ToggleObjectTypeExistence("InfiniteProductionSpeedDummy",GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "merge team with next ally" then MergeTeamWithNextAllied(self)
			elseif MenuTable["mixed commands"][MenuSelection] == "disable superweapons" then SuperweaponsBuildability("NO")
			elseif MenuTable["mixed commands"][MenuSelection] == "enable superweapons" then SuperweaponsBuildability("YES")
			elseif MenuTable["mixed commands"][MenuSelection] == "remove all tiberium" then RemoveAllTiberium()
			elseif MenuTable["mixed commands"][MenuSelection] == "toggle infinite tiberium" then ToggleInfiniteTiberium()
			elseif MenuTable["mixed commands"][MenuSelection] == "spawn infinite tiberium crytal next to base" then SpawnInfiniteTiberiumCrytalNextToBase(GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "spawn tiberium field next to base" then SpawnTiberiumFieldNextToBase(GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "fear radiator toggle" then ToggleObjectTypeExistence("FearRadiatorDummy",GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "slow down enemy toggle" then ToggleObjectTypeExistence("SlowDownEnemyDummy",GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "collector fix" then ExecuteAction("RESUME_SUPPLY_TRUCKING")
			elseif MenuTable["mixed commands"][MenuSelection] == "delete all units from other teams" then DeleteAllObjectsFromOtherTeams(GetTeamName(self))
			elseif MenuTable["mixed commands"][MenuSelection] == "cinema mode" then CinemaMode(MenuTable.CinemaModeTime)
			elseif MenuTable["mixed commands"][MenuSelection] == "cinema mode eternal" then ExecuteAction("HIDE_UI")
		end
		return
		elseif MenuCategory == "ai control & builder" then 
		if MenuTable["ai control & builder"][MenuSelection] == "ai team selection: " then MenuTable.teamselection=NextTableElement(GlobalTeamTable,MenuTable.teamselection) DisplayMenu(self) return
			elseif MenuTable["ai control & builder"][MenuSelection] == "ai activation status: " then GPOT[MenuTable.teamselection]["Menu"]["aiactivationstatus"]=togglevar(GPOT[MenuTable.teamselection]["Menu"]["aiactivationstatus"]) ExecuteAction("TEAM_AI_TRANSFER",MenuTable.teamselection,GPOT[MenuTable.teamselection]["Menu"]["aiactivationstatus"]) DisplayMenu(self) return
			elseif MenuTable["ai control & builder"][MenuSelection] == "ai co control: " then spawn("MetaControlDummyAICoControlToggler",GetTeamName(self)) DisplayMenu(self) return
			elseif MenuTable["ai control & builder"][MenuSelection] == "enemy ai boost toggle: " then EnemyAIBoostActivation(self) DisplayMenu(self) return
			elseif MenuTable["ai control & builder"][MenuSelection] == "allied ai boost toggle: " then AlliedAIBoostActivation(self) DisplayMenu(self) return
			elseif MenuTable["ai control & builder"][MenuSelection] == "adaptive ai boost: " then Adaptive_Auto_AI_Boost=togglevar(Adaptive_Auto_AI_Boost) DisplayMenu(self) return
			elseif MenuTable["ai control & builder"][MenuSelection] == "ultra ai boost toggle" then AIUltraBoostToggle(MenuTable.teamselection) --toggleglobal(MenuTable.teamselection)
			elseif MenuTable["ai control & builder"][MenuSelection] == "every ai off toggle" then spawn("MetaControlDummyEveryAIOFFToggler",GetTeamName(self))
			elseif MenuTable["ai control & builder"][MenuSelection] == "enemy ai off toggle" then spawn("MetaControlDummyEnemyAIOFFToggler",GetTeamName(self))
			elseif MenuTable["ai control & builder"][MenuSelection] == "build/fill base" then MultiObjectTypeBaseBuilder(MenuTable.teamselection)
			elseif MenuTable["ai control & builder"][MenuSelection] == "build defense" then MultiDefenseBaseBuilder(MenuTable.teamselection,12,500)
			elseif MenuTable["ai control & builder"][MenuSelection] == "auto base builder: " then GPOT[MenuTable.teamselection]["Menu"]["buildboost"]=togglevar(GPOT[MenuTable.teamselection]["Menu"]["buildboost"])
			elseif MenuTable["ai control & builder"][MenuSelection] == "auto defense builder: " then GPOT[MenuTable.teamselection]["Menu"]["defensebuildboost"]=togglevar( GPOT[MenuTable.teamselection]["Menu"]["defensebuildboost"])
			--elseif MenuTable["ai control & builder"][MenuSelection] == "ai build boost - production building builder: " then
		end	
		elseif MenuCategory == "selected unit info" then 
		MenuCategory = "unit information" DisplayMenu(self) return
		elseif MenuCategory == "templates" then	
		if MenuTable["templates"][MenuSelection] == "reload saved templates" then dostring(LoadFileData(GetFilePath() .. TemplatesFile))
			elseif MenuTable["templates"][MenuSelection] == "template selection: " then MenuTable.templateselection=NextTableIndex(TemplateTable,MenuTable.templateselection) DisplayMenu(self) return
			elseif MenuTable["templates"][MenuSelection] == "save template" then SaveTemplateFunction(tostring(MenuTable.templateselection),TemplateTable[tostring(MenuTable.templateselection)],GetFilePath() .. TemplatesFile)
			elseif MenuTable["templates"][MenuSelection] == "save raw template" then SaveEssentialTemplateFunction(tostring(MenuTable.templateselection),TemplateTable[MenuTable.templateselection],GetFilePath() .. TemplatesFile)
			elseif MenuTable["templates"][MenuSelection] == "delete template" then local del=function() rawset(TemplateTable,MenuTable.templateselection,nil) MenuTable.templateselection=NextTableIndex(TemplateTable,MenuTable.templateselection) DisplayMenu(%self) end GiveAcceptDenyOptions(GetTeamName(self),del)	
			elseif MenuTable["templates"][MenuSelection] == "set meta shop template to selected template" then MetaCreditShopSpawnTemplate=tostring(MenuTable.templateselection) ChangeAutoConfig("MetaCreditShopSpawnTemplate",StrLenF("MetaCreditShopSpawnTemplate",30) .. "= " .. '"' .. MenuTable.templateselection .. '"') local savetofile = function() SaveEssentialTemplateFunction(tostring(MenuTable.templateselection),TemplateTable[MenuTable.templateselection],GetFilePath() .. TemplatesFile) end GiveAcceptDenyOptions(GetTeamName(self),savetofile) MessageWithPlayerDescription("is template already saved in templates.txt ?",GetTeamName(self))	 
			elseif MenuTable["templates"][MenuSelection] == "get template for all players" then local TemplateName="TemplateAllPlayers" .. RandomString(3) TemplateTable[TemplateName]=GetTemplate() MenuTable.templateselection=TemplateName DisplayMenu(self) return
			elseif MenuTable["templates"][MenuSelection] == "player: " then MenuTable.teamselection=NextTableElement(GlobalTeamTable,MenuTable.teamselection) DisplayMenu(self) return
			elseif MenuTable["templates"][MenuSelection] == "get template for player" then TemplateName="TemplatePlayer" .. RandomString(3) TemplateTable[TemplateName]=GetTemplateForTeam(MenuTable.teamselection) MenuTable.templateselection=TemplateName DisplayMenu(self) return
			elseif MenuTable["templates"][MenuSelection] == "get template, choose down-left corner" then local TeamName=GetTeamName(self) local action = function() MenuTable.templatecoordcornerdownleft.x=GPOT[%TeamName]["ChoosenPosition"]["x"] MenuTable.templatecoordcornerdownleft.y=GPOT[%TeamName]["ChoosenPosition"]["y"] end GiveChoosePositionOption(TeamName,action,"action_with_position")
			elseif MenuTable["templates"][MenuSelection] == "get template, choose upper-right corner" then local TeamName=GetTeamName(self) local action = function() local TemplateName="TemplateFromArea" .. RandomString(3) TemplateTable[TemplateName]=GetTemplateInArea(team,MenuTable.templatecoordcornerdownleft.x,MenuTable.templatecoordcornerdownleft.y,GPOT[%TeamName]["ChoosenPosition"]["x"],GPOT[%TeamName]["ChoosenPosition"]["y"]) MenuTable.templateselection=TemplateName DisplayMenu(%self) end GiveChoosePositionOption(TeamName,action,"action_with_position")
			elseif MenuTable["templates"][MenuSelection] == "template kindof filter: " then MenuTable.templatekindoffilter=togglevar(MenuTable.templatekindoffilter) DisplayMenu(self) return
			elseif MenuTable["templates"][MenuSelection] == "template kindof: " then MenuTable.templatekindoff=NextTableIndex(KindOfTableShort,MenuTable.templatekindoff) DisplayMenu(self) return
			elseif MenuTable["templates"][MenuSelection] == "spawn speed (position accuracy): " then MenuTable.templatespawnspeed=NextTableElement(MenuTable.templatespawnspeedtypes,MenuTable.templatespawnspeed)
			elseif MenuTable["templates"][MenuSelection] == "spawn raw template (without object attributes): " then MenuTable.rawtemplates=togglevar(MenuTable.rawtemplates) DisplayMenu(self) return
			elseif MenuTable["templates"][MenuSelection] == "spawn template team owner override: " then MenuTable.templateteamoverride=togglevar(MenuTable.templateteamoverride) if MenuTable.templateteamoverride==1 then MenuTable.templateowner=GetTeamName(self) else MenuTable.templateowner=nil end
			elseif MenuTable["templates"][MenuSelection] == "spawn template selection" then if MenuTable.templateteamoverride==0 then SpawnTemplate(TemplateTable[MenuTable.templateselection],0,0,0,0,nil,GetTeamName(self)) else SpawnTemplate(TemplateTable[MenuTable.templateselection],MenuTable.templateowner,0,0,togglevar(MenuTable.rawtemplates),nil,GetTeamName(self),MenuTable.templatespawnspeed) end
			elseif MenuTable["templates"][MenuSelection] == "spawn template selection at custom point" then local TeamName=GetTeamName(self) local action = function() SpawnTemplateRelativePosition(TemplateTable[MenuTable.templateselection],MenuTable.templateowner,GPOT[%TeamName]["ChoosenPosition"]["x"],GPOT[%TeamName]["ChoosenPosition"]["y"],togglevar(MenuTable.rawtemplates),%TeamName,MenuTable.templatespawnspeed) end GiveChoosePositionOption(TeamName,action,"action_with_position")
			elseif MenuTable["templates"][MenuSelection] == "spawn template selection at waypoint" then  local TeamName=GetTeamName(self) local action = function() SpawnTemplateRelativePosition(TemplateTable[MenuTable.templateselection],MenuTable.templateowner,GPOT[%TeamName]["ChoosenPosition"]["x"],GPOT[%TeamName]["ChoosenPosition"]["y"],togglevar(MenuTable.rawtemplates),%TeamName,MenuTable.templatespawnspeed) end GiveChoosePositionOption(TeamName,action,"action_with_position",MenuTable.waypointselection)
			elseif MenuTable["templates"][MenuSelection] == "waypoint: " then MenuTable.waypointselection=NextTableElement(WaypointTable,MenuTable.waypointselection) DisplayMenu(self) return		
			elseif MenuTable["templates"][MenuSelection] == "spawn subtractive differential template" then if MenuTable.templateteamoverride==0 then SubtractiveDifferentialTemplateProcessing(TemplateTable[MenuTable.templateselection],GetTemplate(),togglevar(MenuTable.rawtemplates)) else SubtractiveDifferentialTemplateProcessing(TemplateTable[MenuTable.templateselection],GetTemplateForTeam(MenuTable.teamselection),togglevar(MenuTable.rawtemplates)) end
			elseif MenuTable["templates"][MenuSelection] == "spawn additive differential template" then if MenuTable.templateteamoverride==0 then AdditiveDifferentialTemplateProcessing(TemplateTable[MenuTable.templateselection],GetTemplate(),togglevar(MenuTable.rawtemplates)) else AdditiveDifferentialTemplateProcessing(TemplateTable[MenuTable.templateselection],GetTemplateForTeam(MenuTable.teamselection),togglevar(MenuTable.rawtemplates)) end
			elseif MenuTable["templates"][MenuSelection] == "spawn differential template" then if MenuTable.templateteamoverride==0 then DifferentialTemplateProcessing(TemplateTable[MenuTable.templateselection],GetTemplate(),togglevar(MenuTable.rawtemplates)) else DifferentialTemplateProcessing(TemplateTable[MenuTable.templateselection],GetTemplate(),togglevar(MenuTable.rawtemplates)) end	
			elseif MenuTable["templates"][MenuSelection] == "set timetravel fixpoint" then TimetravelCreatePastFixpoint() MenuTable.timetravelfixpoint=getn(TimetravelFixpointTemplates["past"]) DisplayMenu(self) return
			elseif MenuTable["templates"][MenuSelection] == "timetravel to fixpoint: " then if MenuTable.timetravelfixpoint==0 then return else TimetravelToFixpoint(TimetravelFixpointTemplates["past"][MenuTable.timetravelfixpoint]) end
		end
		elseif MenuCategory == "map information & manipulation" then
		if MenuTable["map information & manipulation"][MenuSelection] == "activate map boundary: " then ExecuteAction("MAP_SWITCH_BORDER",MenuTable.MapBoundary)
			elseif MenuTable["map information & manipulation"][MenuSelection] == "water height: " then ExecuteAction("WATER_CHANGE_HEIGHT",AreaTable[1],MenuTable.WaterHeight)  --ExecuteAction("WATER_CHANGE_HEIGHT_OVER_TIME",Area,Height,Time,DamagePerSec)
			elseif MenuTable["map information & manipulation"][MenuSelection] == "earthquake" then ExecuteAction("CAMERA_ADD_SHAKER_AT","Player_1_Start",10.00,5.00,13000.00)
			elseif MenuTable["map information & manipulation"][MenuSelection] == "map cloud speed: " then ExecuteAction("MAP_CHANGE_CLOUD_SPEED",MenuTable.MapCloudSpeed)
			elseif MenuTable["map information & manipulation"][MenuSelection] == "save map info to file" then out(GetMapInformationString())
			elseif MenuTable["map information & manipulation"][MenuSelection] == "SET_LOGIC_FOG_STATE" then MenuTable.MapFogState=togglevar(MenuTable.MapFogState) ExecuteAction("SET_LOGIC_FOG_STATE",MenuTable.MapFogState)
			elseif MenuTable["map information & manipulation"][MenuSelection] == "ENABLE_BORDER_SHROUD" then ExecuteAction("ENABLE_BORDER_SHROUD")
			elseif MenuTable["map information & manipulation"][MenuSelection] == "DISABLE_BORDER_SHROUD" then ExecuteAction("DISABLE_BORDER_SHROUD")
			elseif MenuTable["map information & manipulation"][MenuSelection] == "DELETE_ALL_UNMANNED" then ExecuteAction("DELETE_ALL_UNMANNED")
			--elseif MenuTable["map information & manipulation"][MenuSelection] == "RESIZE_VIEW_GUARDBAND" then ExecuteAction("RESIZE_VIEW_GUARDBAND")
			--elseif MenuTable["map information & manipulation"][MenuSelection] == "OVERSIZE_TERRAIN" then ExecuteAction("OVERSIZE_TERRAIN",NumberOfTilesOnEachSide)
			--elseif MenuTable["map information & manipulation"][MenuSelection] == "SET_TREE_SWAY" then ExecuteAction("SET_TREE_SWAY",WindDirectionDegree,SwayAmmountDegree,LeanWithWindDegree,FramesToSwayOnce,RandomnessNullToOne)
		end
		elseif MenuCategory == "performance"	then
		if MenuTable["performance"][MenuSelection] == "fps limit" then ExecuteAction("SET_FPS_LIMIT", FPS_Limit)
			elseif MenuTable["performance"][MenuSelection] == "show fps" then GetFPS()
			elseif MenuTable["performance"][MenuSelection] == "simulation speed -/+" then ExecuteAction("SET_VISUAL_SPEED_MULTIPLIER", Game_Simulation_Speed)
			elseif MenuTable["performance"][MenuSelection] == "TERRAIN_RENDER_DISABLE" then ExecuteAction("TERRAIN_RENDER_DISABLE", toggleglobal("Terrain_Render_Disabled"))
			elseif MenuTable["performance"][MenuSelection] == "OPTIONS_SET_DRAWICON_UI_MODE" then ExecuteAction("OPTIONS_SET_DRAWICON_UI_MODE", toggleglobal("Show_HealthBars"))
			elseif MenuTable["performance"][MenuSelection] == "OPTIONS_SET_OCCLUSION_MODE" then ExecuteAction("OPTIONS_SET_OCCLUSION_MODE", toggleglobal("Draw_Behind_Buildings"))
			elseif MenuTable["performance"][MenuSelection] == "OPTIONS_SET_PARTICLE_CAP_MODE" then ExecuteAction("OPTIONS_SET_PARTICLE_CAP_MODE", toggleglobal("Particle_Cap_Mode"))
			elseif MenuTable["performance"][MenuSelection] == "RESTORE_WORLD_LIGHTS" then ExecuteAction("RESTORE_WORLD_LIGHTS", 1)
			elseif MenuTable["performance"][MenuSelection] == "CAMERA_BLOOM_EFFECT_BEGIN" then ExecuteAction("CAMERA_BLOOM_EFFECT_BEGIN")
			elseif MenuTable["performance"][MenuSelection] == "CAMERA_BLOOM_EFFECT_END" then ExecuteAction("CAMERA_BLOOM_EFFECT_END")
		end
		return 
		elseif MenuCategory == "meta shop actions"	then	
		local TeamName=GetTeamName(self) 
		if MenuTable["meta shop actions"][MenuSelection] == "reveal map" then 
			elseif MenuTable["meta shop actions"][MenuSelection] == "ion cannon" then local action = function() MetaCreditShopIonCannon(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)
			elseif MenuTable["meta shop actions"][MenuSelection] == "nuke" then local action = function() MetaCreditShopNuke(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)
			elseif MenuTable["meta shop actions"][MenuSelection] == "rift generator" then local action = function() MetaCreditShopRiftGenerator(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action) 
			elseif MenuTable["meta shop actions"][MenuSelection] == "emp" then local action = function() MetaCreditShopEMP(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action) 
			elseif MenuTable["meta shop actions"][MenuSelection] == "indestructible" then MetaCreditShopIndestructible(self,"MetaControlCall")
			elseif MenuTable["meta shop actions"][MenuSelection] == "infinite energy" then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",RandomString(5),"InfiniteEnergyDummy",GetTeamName(self),"((0.00,0.00,0.00))", 0)
			elseif MenuTable["meta shop actions"][MenuSelection] == "fast production speed" then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",RandomString(5),"BuildAnywhereDummy",GetTeamName(self),"((0.00,0.00,0.00))", 0)
			elseif MenuTable["meta shop actions"][MenuSelection] == "build anywhere" then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",RandomString(5),"InfiniteProductionSpeedDummy",GetTeamName(self),"((0.00,0.00,0.00))", 0)
			elseif MenuTable["meta shop actions"][MenuSelection] == "slow down enemy" then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",RandomString(5),"MetaCreditShopSlowDownEnemy",GetTeamName(self),"((0.00,0.00,0.00))", 0)
			elseif MenuTable["meta shop actions"][MenuSelection] == "boost selected unit" then MetaCreditShopBoostSelectedUnit(self,"MetaControlCall")
			elseif MenuTable["meta shop actions"][MenuSelection] == "anti ground defense block" then local action = function() MetaCreditShopRandomAntiGroundDefenseBlock(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)
			elseif MenuTable["meta shop actions"][MenuSelection] == "anti air defense block" then local action = function() MetaCreditShopRandomAntiAirDefenseBlock(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)  
			elseif MenuTable["meta shop actions"][MenuSelection] == "anti vehicle defense start point" then local action = function() MetaCreditShopAntiVehicleDefStartPoint(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"])) end GiveChoosePositionOption(TeamName,action)  
			elseif MenuTable["meta shop actions"][MenuSelection] == "anti vehicle defense end point" then local action = function() MetaCreditShopAntiVehicleDefEndPoint(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action) 
			elseif MenuTable["meta shop actions"][MenuSelection] == "random square defense" then local action = function() MetaCreditShopRandomSquareDefense(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)  
			elseif MenuTable["meta shop actions"][MenuSelection] == "random circle defense" then local action = function() MetaCreditShopRandomCircleDefense(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)  
			elseif MenuTable["meta shop actions"][MenuSelection] == "random spiral defense" then local action = function() MetaCreditShopRandomSpiralDefense(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)  
			elseif MenuTable["meta shop actions"][MenuSelection] == "spawn random unit force" then local action = function() MetaCreditShopSpawnRandomUnitForce7(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)  
			elseif MenuTable["meta shop actions"][MenuSelection] == "super avatar" then local action = function() MetaCreditShopSuperAvatar(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)  
			elseif MenuTable["meta shop actions"][MenuSelection] == "GuardShieldEmitter" then local action = function() MetaCreditShopGuardShieldEmitter(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)  
			elseif MenuTable["meta shop actions"][MenuSelection] == "convert MC to $" then MetaCreditShopConvertMCtoDollar(self,"MetaControlCall")
			elseif MenuTable["meta shop actions"][MenuSelection] == "convert $ to MC" then MetaCreditShopConvertMoney(self,"MetaControlCall")
			elseif MenuTable["meta shop actions"][MenuSelection] == "bet" then MetaCreditShopBet(self,"MetaControlCall")
			elseif MenuTable["meta shop actions"][MenuSelection] == "get statistics" then MetaCreditShopGetStatistics(self)
			elseif MenuTable["meta shop actions"][MenuSelection] == "spawn base template" then  local action = function() MetaCreditShopBaseTemplate(GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"]),"MetaControlCall") end GiveChoosePositionOption(TeamName,action)
			elseif MenuTable["meta shop actions"][MenuSelection] == "set timetravel fixpoint" then MetaCreditShopTimetravelFixpoint(self,"MetaControlCall")
			elseif MenuTable["meta shop actions"][MenuSelection] == "timetravel" then MetaCreditShopTimetravel(self,"MetaControlCall")
		end
		elseif MenuCategory == "music, sound, movies"	then
		if MenuTable[MenuCategory][MenuSelection]  == "play music track: " then ExecuteAction("MUSIC_SET_TRACK",MenuTable.musictrack,0,0)    
			elseif MenuTable[MenuCategory][MenuSelection]  == "play sound: " then ExecuteAction("PLAY_SOUND_EFFECT",MenuTable.sound) 	
			elseif MenuTable[MenuCategory][MenuSelection]  == "play mission dialogue: " then ExecuteAction("PLAY_SOUND_EFFECT",MenuTable.missiondialogue)	
			elseif MenuTable[MenuCategory][MenuSelection]  == "play movie: " then ExecuteAction("MOVIE_PLAY_FULLSCREEN",MenuTable.movie,1)
			elseif MenuTable[MenuCategory][MenuSelection]  == "play radar movie: " then ExecuteAction("MOVIE_PLAY_RADAR",MenuTable.radarmovie)
			elseif MenuTable[MenuCategory][MenuSelection] == "mute all sounds" then MuteAudio() 
			elseif MenuTable[MenuCategory][MenuSelection] == "unmute all sounds" then UnMuteAudio()
			elseif MenuSelection > 6 then ExecuteAction(MenuTable[MenuCategory][MenuSelection])
		end
		return
		elseif MenuCategory == "team actions" then 
		if MenuSelection == 1 then if MenuTable["team1counter"]+1 > getn(GlobalTeamTable) then MenuTable["team1counter"]=1 else MenuTable["team1counter"]=MenuTable["team1counter"]+1 end --mod(MenuTable["team1counter"]+1,getn(GlobalTeamTable))          
			elseif MenuSelection == 2 then if MenuTable["team2counter"]+1 > getn(GlobalTeamTable) then MenuTable["team2counter"]=1 else MenuTable["team2counter"]=MenuTable["team2counter"]+1 end            
			elseif MenuSelection == 3 then if MenuTable["waypointcounter"]+1 > getn(GlobalTeamTable) then MenuTable["waypointcounter"]=1 else MenuTable["waypointcounter"]=MenuTable["waypointcounter"]+1 end     
			elseif MenuSelection == 4 then if MenuTable["bool"]==1 then MenuTable["bool"]=0 else MenuTable["bool"]=1 end      
			elseif MenuSelection < getn(TeamActions[1])+4 then ExecuteAction(TeamActions[1][MenuSelection-4], GlobalTeamTable[MenuTable["team1counter"]])
			elseif MenuSelection < getn(TeamActions[2])+getn(TeamActions[1])+4 then ExecuteAction(TeamActions[2][MenuSelection-getn(TeamActions[1])-4], GlobalTeamTable[MenuTable["team1counter"]], GetPlayerStartWaypointByTeam(GlobalTeamTable[MenuTable["waypointcounter"]]))
			elseif MenuSelection < getn(TeamActions[3])+getn(TeamActions[1])+getn(TeamActions[2])+4 then ExecuteAction(TeamActions[3][MenuSelection-getn(TeamActions[1])-getn(TeamActions[2])-4], GlobalTeamTable[MenuTable["team1counter"]], GlobalTeamTable[MenuTable["team2counter"]])
			elseif MenuSelection < getn(TeamActions[4])+getn(TeamActions[3])+getn(TeamActions[2])+getn(TeamActions[1])+4 then ExecuteAction(TeamActions[4][MenuSelection-getn(TeamActions[1])-getn(TeamActions[2])-getn(TeamActions[3])-4], GlobalTeamTable[MenuTable["team1counter"]], MenuTable["bool"])
		end
		elseif MenuCategory == "navigation mode" then
		MenuCategory = LastMenuCategory
	end
	if MetaCommandDisplayState~=0 then DisplayMenu(self) end
end

function MenuSideNavigation(self,MenuArrow)
	if not self then self = GetPlayerSpellBook() end
	MetaCommandDisplayState=1
	if MenuCategory == "camera setup" then
		if MenuTable["camera setup"][MenuSelection] == "zoom -/+" then if MenuArrow=="left" then  Camera_Hack_2_Cam_Height=Camera_Hack_2_Cam_Height-0.05 ExecuteAction("ZOOM_CAMERA", Camera_Hack_2_Cam_Height , 1, 1, 1) elseif MenuArrow=="right" then Camera_Hack_2_Cam_Height=Camera_Hack_2_Cam_Height+0.05 ExecuteAction("ZOOM_CAMERA", Camera_Hack_2_Cam_Height , 1, 1, 1) end 
			elseif MenuTable["camera setup"][MenuSelection] == "zoom2 -/+" then if MenuArrow=="left" then Camera_Max_Zoomable_Height=Camera_Max_Zoomable_Height-0.05 ExecuteAction("CAMERA_SET_DEFAULT", 0.00, 0.00 , Camera_Max_Zoomable_Height) elseif MenuArrow=="right" then Camera_Max_Zoomable_Height=Camera_Max_Zoomable_Height+0.05 ExecuteAction("CAMERA_SET_DEFAULT", 0.00, 0.00 , Camera_Max_Zoomable_Height) end 
			elseif MenuTable["camera setup"][MenuSelection] == "pitch -/+" then if MenuArrow=="left" then Camera_Tilt_Angle=Camera_Tilt_Angle-0.05 ExecuteAction("PITCH_CAMERA", Camera_Tilt_Angle, 1, 1, 1) elseif MenuArrow=="right" then Camera_Tilt_Angle=Camera_Tilt_Angle+0.05 ExecuteAction("PITCH_CAMERA", Camera_Tilt_Angle, 1, 1, 1) end 
		end
		elseif MenuCategory == "spawn" then
			if MenuTable["spawn"][MenuSelection] == "spawn" then 
				if MenuArrow=="left" then 
					MenuTable.SpawnSelection=PrevTableElement(MenuTable.SpawnListSelection, MenuTable.SpawnSelection) 
				elseif MenuArrow=="right" then 
					MenuTable.SpawnSelection=NextTableElement(MenuTable.SpawnListSelection, MenuTable.SpawnSelection) 	
				end 
			elseif MenuTable["spawn"][MenuSelection] == "spawn list" then 
				if MenuArrow=="left" then 
					MenuTable.SpawnListSelectionDesc=PrevTableElement(MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][1], MenuTable.SpawnListSelectionDesc) 		
					MenuTable.SpawnListSelection=MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][2][MenuTable.SpawnListSelectionDesc]
				elseif MenuArrow=="right" then 
					MenuTable.SpawnListSelectionDesc=NextTableElement(MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][1], MenuTable.SpawnListSelectionDesc) 		
					MenuTable.SpawnListSelection=MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][2][MenuTable.SpawnListSelectionDesc]
				end 
				MenuTable.SpawnSelection = MenuTable.SpawnListSelection[1]
			elseif MenuTable["spawn"][MenuSelection] == "game" then 
				if MenuArrow=="left" then 
					MenuTable.SpawnMenuGameSelection=PrevTableElement(MenuTable.GameList, MenuTable.SpawnMenuGameSelection) 
				elseif MenuArrow=="right" then 
					MenuTable.SpawnMenuGameSelection=NextTableElement(MenuTable.GameList, MenuTable.SpawnMenuGameSelection) 	
				end 
				MenuTable.SpawnListSelectionDesc = MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][1][1]
				MenuTable.SpawnListSelection = MenuTable.GameSpawnList[MenuTable.SpawnMenuGameSelection][2][MenuTable.SpawnListSelectionDesc]
				MenuTable.SpawnSelection = MenuTable.SpawnListSelection[1]				
			elseif MenuTable["spawn"][MenuSelection] == "spawn for team" then if MenuArrow=="left" then AdvTeamTable = CopyTable(GlobalTeamTable) tinsert(AdvTeamTable,CreepsTeam) MenuTable.teamselection=PrevTableElement(AdvTeamTable,MenuTable.teamselection) elseif MenuArrow=="right" then MenuTable.teamselection=NextTableElement(GlobalTeamTable,MenuTable.teamselection) end --if MenuArrow=="left" then MenuTable.teamselection=PrevTableElement(AllTeamsTable,MenuTable.teamselection) elseif MenuArrow=="right" then MenuTable.teamselection=NextTableElement(AllTeamsTable,MenuTable.teamselection) end
			elseif MenuTable["spawn"][MenuSelection] == "destination type" then if MenuArrow=="left" then MenuTable.DestinationTypeSelection=PrevTableElement(MenuTable.DestinationType,MenuTable.DestinationTypeSelection) elseif MenuArrow=="right" then MenuTable.DestinationTypeSelection=NextTableElement(MenuTable.DestinationType,MenuTable.DestinationTypeSelection) end
			elseif MenuTable["spawn"][MenuSelection] == "speed/precision" then  if MenuArrow=="left" then MenuTable.SpawnSpeed=PrevTableElement(MenuTable.SpawnSpeedType,MenuTable.SpawnSpeed) elseif MenuArrow=="right" then MenuTable.SpawnSpeed=NextTableElement(MenuTable.SpawnSpeedType,MenuTable.SpawnSpeed) end
			elseif MenuTable["spawn"][MenuSelection] == "waypoint" then if MenuArrow=="left" then MenuTable.waypointselection=PrevTableElement(WaypointTable,MenuTable.waypointselection) elseif MenuArrow=="right" then MenuTable.waypointselection=NextTableElement(WaypointTable,MenuTable.waypointselection) end
			elseif MenuTable["spawn"][MenuSelection] == "CoordinateX" then if MenuArrow=="left" then MenuTable.CoordinateX=MenuTable.CoordinateX-100 elseif MenuArrow=="right" then MenuTable.CoordinateX=MenuTable.CoordinateX+100 end
			elseif MenuTable["spawn"][MenuSelection] == "CoordinateY" then if MenuArrow=="left" then MenuTable.CoordinateY=MenuTable.CoordinateY-100 elseif MenuArrow=="right" then MenuTable.CoordinateY=MenuTable.CoordinateY+100 end
			elseif MenuTable["spawn"][MenuSelection] == "spawn with max level" then MenuTable.SpawnWithMaxLevel=togglevar(MenuTable.SpawnWithMaxLevel)
			elseif MenuTable["spawn"][MenuSelection] == "spawn with max level + invincible" then MenuTable.SpawnWithMaxLevelInvincible=togglevar(MenuTable.SpawnWithMaxLevelInvincible)
			elseif MenuTable["spawn"][MenuSelection] == "number of spawns" then if MenuArrow=="left" then MenuTable.SpawnNumber=MenuTable.SpawnNumber-1 elseif MenuArrow=="right" then MenuTable.SpawnNumber=MenuTable.SpawnNumber+1 end
			elseif MenuTable["spawn"][MenuSelection] == "color" then 
				if MenuArrow=="left" then 
					MenuTable.SpawnColor=PrevTableElement(UnitColors, MenuTable.SpawnColor)
				elseif MenuArrow=="right" then 
					MenuTable.SpawnColor=NextTableElement(UnitColors, MenuTable.SpawnColor)			
				end		
			elseif MenuTable["spawn"][MenuSelection] == "add kind of to spawn list" then
				if MenuArrow=="left" then
					MenuTable.kindofselection=PrevTableElement(KindOfIndexTable, MenuTable.kindofselection)
				elseif MenuArrow=="right" then 
					MenuTable.kindofselection=NextTableElement(KindOfIndexTable, MenuTable.kindofselection)
				end
			else 
				if getn(WorldBuilderUseableObjects)<1 then 
					--CreateWorldBuilderUseableObjectsTable() MenuTable.SpawnSelection["world builder objects"]=WorldBuilderUseableObjects[1] CreatePlantObjectsTable() 
					--MenuTable.SpawnSelection["plants"]=PlantObjects[1]
				end
			end   
		elseif MenuCategory == "BFMEII-ROTWK" then
				if MenuTable["BFMEII-ROTWK"][MenuSelection] == "CreatAHero customize" then MenuTable.CreatAHeroPartSelectionState=false if MenuArrow=="left" then MenuTable.CreatAHeroPartSelection = PrevTableElement(CreateAHeroParts, MenuTable.CreatAHeroPartSelection) elseif MenuArrow=="right" then MenuTable.CreatAHeroPartSelection = NextTableElement(CreateAHeroParts, MenuTable.CreatAHeroPartSelection) end
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "spawn list" then 
					if MenuArrow=="left" then 
						MenuTable.BFMEIIROTWkSpawnListSelectionDesc=PrevTableElement(BFMEIIROTWK_OBJECT_TYPE_ALL_LIST_DESC, MenuTable.BFMEIIROTWkSpawnListSelectionDesc) 		
						MenuTable.BFMEIIROTWkSpawnListSelection=BFMEIIROTWK_OBJECT_TYPE_ALL_LIST[MenuTable.BFMEIIROTWkSpawnListSelectionDesc]
					elseif MenuArrow=="right" then 
						MenuTable.BFMEIIROTWkSpawnListSelectionDesc=NextTableElement(BFMEIIROTWK_OBJECT_TYPE_ALL_LIST_DESC, MenuTable.BFMEIIROTWkSpawnListSelectionDesc) 		
						MenuTable.BFMEIIROTWkSpawnListSelection=BFMEIIROTWK_OBJECT_TYPE_ALL_LIST[MenuTable.BFMEIIROTWkSpawnListSelectionDesc]
					end 
					MenuTable.BFMEIIROTWkSpawnSelection = MenuTable.BFMEIIROTWkSpawnListSelection[1]
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "spawn" then 
					if MenuArrow=="left" then 
						MenuTable.BFMEIIROTWkSpawnSelection=PrevTableElement(MenuTable.BFMEIIROTWkSpawnListSelection, MenuTable.BFMEIIROTWkSpawnSelection)
					elseif MenuArrow=="right" then 
						MenuTable.BFMEIIROTWkSpawnSelection=NextTableElement(MenuTable.BFMEIIROTWkSpawnListSelection, MenuTable.BFMEIIROTWkSpawnSelection)
					end
				elseif MenuTable["BFMEII-ROTWK"][MenuSelection] == "add kind of to spawn list" then 
					if MenuArrow=="left" then
						MenuTable.BFMEIIROTWkKindOfSelection=PrevTableElement(KindOfTable_BFMEIIROTWK_, MenuTable.BFMEIIROTWkKindOfSelection)
					elseif MenuArrow=="right" then 
						MenuTable.BFMEIIROTWkKindOfSelection=NextTableElement(KindOfTable_BFMEIIROTWK_, MenuTable.BFMEIIROTWkKindOfSelection)
					end
				end
		elseif MenuCategory == "unit actions"	then
		if MenuTable["unit actions"][1][MenuSelection] == "waypoint: " then if MenuArrow=="left" then MenuTable.waypointselection=PrevTableElement(WaypointTable,MenuTable.waypointselection) elseif MenuArrow=="right" then MenuTable.waypointselection=NextTableElement(WaypointTable,MenuTable.waypointselection) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "DoSpecialpower: " then if MenuArrow=="left" then MenuTable["unit actions"].specialpower=PrevTableElement(SpecialPowerNameTable,MenuTable["unit actions"].specialpower) elseif MenuArrow=="right" then MenuTable["unit actions"].specialpower=NextTableElement(SpecialPowerNameTable,MenuTable["unit actions"].specialpower) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleUpgrade: " then if MenuArrow=="left" then MenuTable["unit actions"].upgrades=PrevTableElement(UpgradeNameTable,MenuTable["unit actions"].upgrades) elseif MenuArrow=="right" then MenuTable["unit actions"].upgrades=NextTableElement(UpgradeNameTable,MenuTable["unit actions"].upgrades) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleObjectFlag: " then if MenuArrow=="left" then MenuTable["unit actions"].objectflag=PrevTableElement(ObjectPanelFlagsTable,MenuTable["unit actions"].objectflag) elseif MenuArrow=="right" then MenuTable["unit actions"].objectflag=NextTableElement(ObjectPanelFlagsTable,MenuTable["unit actions"].objectflag) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleStatus: " then if MenuArrow=="left" then MenuTable["unit actions"].status=PrevTableElement(ObjectStatusIndexTable,MenuTable["unit actions"].status) elseif MenuArrow=="right" then MenuTable["unit actions"].status=NextTableElement(ObjectStatusIndexTable,MenuTable["unit actions"].status) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "ToggleModelcondition(10s): " then if MenuArrow=="left" then MenuTable["unit actions"].modelcondition=PrevTableElement(ModelConditionTable,MenuTable["unit actions"].modelcondition) elseif MenuArrow=="right" then MenuTable["unit actions"].modelcondition=NextTableElement(ModelConditionTable,MenuTable["unit actions"].modelcondition) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "FireWeaponOnUnit: " then if MenuArrow=="left" then MenuTable["unit actions"].weapon=PrevTableElement(WeaponNameTable,MenuTable["unit actions"].weapon) elseif MenuArrow=="right" then MenuTable["unit actions"].weapon=NextTableElement(WeaponNameTable,MenuTable["unit actions"].weapon) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "SetAttitude: " then if MenuArrow=="left" then MenuTable["unit actions"].attitude=PrevTableElement(Behaviour_,MenuTable["unit actions"].attitude) elseif MenuArrow=="right" then MenuTable["unit actions"].attitude=NextTableElement(Behaviour_,MenuTable["unit actions"].attitude) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "SetStance: " then if MenuArrow=="left" then MenuTable["unit actions"].stance=PrevTableElement(STANCE_TYPE_,MenuTable["unit actions"].stance) elseif MenuArrow=="right" then MenuTable["unit actions"].stance=NextTableElement(STANCE_TYPE_,MenuTable["unit actions"].stance) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "UseCommandButton: " then if MenuArrow=="left" then MenuTable["unit actions"].commandbutton=PrevTableElement(CommandButtonTable,MenuTable["unit actions"].commandbutton) elseif MenuArrow=="right" then MenuTable["unit actions"].commandbutton=NextTableElement(CommandButtonTable,MenuTable["unit actions"].commandbutton) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "unit action" then if MenuArrow=="left" then MenuTable["unit actions"].singleaction=PrevTableElement(MenuTable["unit actions"]["unit action"],MenuTable["unit actions"].singleaction) elseif MenuArrow=="right" then MenuTable["unit actions"].singleaction=NextTableElement(MenuTable["unit actions"]["unit action"],MenuTable["unit actions"].singleaction) end
			elseif MenuTable["unit actions"][1][MenuSelection] == "unit waypoint action" then if MenuArrow=="left" then MenuTable["unit actions"].posaction=PrevTableElement(MenuTable["unit actions"]["unit waypoint action"],MenuTable["unit actions"].posaction) elseif MenuArrow=="right" then MenuTable["unit actions"].posaction=NextTableElement(MenuTable["unit actions"]["unit waypoint action"],MenuTable["unit actions"].posaction) end
		end 
		elseif MenuCategory == "ai control & builder" then 
		if MenuTable["ai control & builder"][MenuSelection] == "ai team selection: " then if MenuArrow=="left" then MenuTable.teamselection=PrevTableElement(GlobalTeamTable,MenuTable.teamselection) elseif MenuArrow=="right" then MenuTable.teamselection=NextTableElement(GlobalTeamTable,MenuTable.teamselection) end
		end
		elseif MenuCategory == "templates" then	
		if MenuTable["templates"][MenuSelection] == "template selection: " then if MenuArrow=="left" then MenuTable.templateselection=PrevTableElement(TemplateTable,MenuTable.templateselection) elseif MenuArrow=="right" then MenuTable.templateselection=NextTableElement(TemplateTable,MenuTable.templateselection) end
			elseif MenuTable["templates"][MenuSelection] == "player: " then if MenuArrow=="left" then MenuTable.teamselection=PrevTableElement(GlobalTeamTable,MenuTable.teamselection) elseif MenuArrow=="right" then MenuTable.teamselection=NextTableElement(GlobalTeamTable,MenuTable.teamselection) end
			elseif MenuTable["templates"][MenuSelection] == "template kindof: " then if MenuArrow=="left" then MenuTable.templatekindoff=PrevTableElement(KindOfIndexTable,MenuTable.templatekindoff) elseif MenuArrow=="right" then MenuTable.templatekindoff=NextTableElement(KindOfIndexTable,MenuTable.templatekindoff) end
			elseif MenuTable["templates"][MenuSelection] == "waypoint: " then if MenuArrow=="left" then MenuTable.waypointselection=PrevTableElement(WaypointTable,MenuTable.waypointselection) elseif MenuArrow=="right" then MenuTable.waypointselection=NextTableElement(WaypointTable,MenuTable.waypointselection) end
			elseif MenuTable["templates"][MenuSelection] == "timetravel to fixpoint: " then if getn(TimetravelFixpointTemplates["past"])>0 then if MenuArrow=="left" then MenuTable.timetravelfixpoint=PrevTableIndex(TimetravelFixpointTemplates["past"],MenuTable.timetravelfixpoint) elseif MenuArrow=="right" then MenuTable.timetravelfixpoint=NextTableIndex(TimetravelFixpointTemplates["past"],MenuTable.timetravelfixpoint) end end
		end
		elseif MenuCategory == "map information & manipulation" then
		if MenuTable["map information & manipulation"][MenuSelection] == "activate map boundary: " then if MenuArrow=="left" then MenuTable.MapBoundary=PrevTableElement(MapBorderTable,MenuTable.MapBoundary) elseif MenuArrow=="right" then MenuTable.MapBoundary=NextTableElement(MapBorderTable,MenuTable.MapBoundary) end
			elseif MenuTable["map information & manipulation"][MenuSelection] == "water height: " then if MenuArrow=="left" then MenuTable.WaterHeight=PrevTableElement(MenuTable.WaterHeightTable,MenuTable.WaterHeight) elseif MenuArrow=="right" then MenuTable.WaterHeight=NextTableElement(MenuTable.WaterHeightTable,MenuTable.WaterHeight) end
			elseif MenuTable["map information & manipulation"][MenuSelection] == "map cloud speed: " then if MenuArrow=="left" then MenuTable.MapCloudSpeed=PrevTableElement(MenuTable.CloudSpeedTable,MenuTable.MapCloudSpeed) elseif MenuArrow=="right" then MenuTable.MapCloudSpeed=NextTableElement(MenuTable.CloudSpeedTable,MenuTable.MapCloudSpeed) end
		end
		elseif MenuCategory == "counter" then
		if MenuTable["counter"][MenuSelection] == "kind of (short list): " then if MenuArrow=="left" then MenuTable.kindofselectionshortlist=PrevTableElement(KindOfIndexTableShort,MenuTable.kindofselectionshortlist) elseif MenuArrow=="right" then MenuTable.kindofselectionshortlist=NextTableElement(KindOfIndexTableShort,MenuTable.kindofselectionshortlist) end
			elseif MenuTable["counter"][MenuSelection] == "kind of (all): " then if MenuArrow=="left" then MenuTable.kindofselection=PrevTableElement(KindOfIndexTable,MenuTable.kindofselection) elseif MenuArrow=="right" then MenuTable.kindofselection=NextTableElement(KindOfIndexTable,MenuTable.kindofselection) end
		end
		elseif MenuCategory == "performance"	then
		if MenuTable["performance"][MenuSelection] == "fps limit" then if MenuArrow=="left" then if FPS_Limit-5<=0 then FPS_Limit=120 else FPS_Limit=FPS_Limit-5 end elseif MenuArrow=="right" then if FPS_Limit+5>120 then FPS_Limit=5 else FPS_Limit=FPS_Limit+5 end end
			elseif MenuTable["performance"][MenuSelection] == "simulation speed -/+" then if MenuArrow=="left" then Game_Simulation_Speed=Game_Simulation_Speed-0.1 ExecuteAction("SET_VISUAL_SPEED_MULTIPLIER", Game_Simulation_Speed) elseif MenuArrow=="right" then Game_Simulation_Speed=Game_Simulation_Speed+0.1 ExecuteAction("SET_VISUAL_SPEED_MULTIPLIER", Game_Simulation_Speed) end
		end
		elseif MenuCategory == "music, sound, movies" then
		if MenuTable[MenuCategory][MenuSelection]  == "play music track: " then if MenuArrow=="left" then MenuTable.musictrack=PrevTableElement(MusicTracksTable,MenuTable.musictrack) elseif MenuArrow=="right" then MenuTable.musictrack=NextTableElement(MusicTracksTable,MenuTable.musictrack) end
			elseif MenuTable[MenuCategory][MenuSelection]  == "play sound: " then if MenuArrow=="left" then MenuTable.sound=PrevTableElement(Sounds,MenuTable.sound) elseif MenuArrow=="right" then MenuTable.sound=NextTableElement(Sounds,MenuTable.sound) end
			elseif MenuTable[MenuCategory][MenuSelection]  == "play mission dialogue: " then if MenuArrow=="left" then MenuTable.missiondialogue=PrevTableElement(MissionDialogue,MenuTable.missiondialogue) elseif MenuArrow=="right" then MenuTable.missiondialogue=NextTableElement(MissionDialogue,MenuTable.missiondialogue) end
			elseif MenuTable[MenuCategory][MenuSelection]  == "play movie: " then if MenuArrow=="left" then MenuTable.movie=PrevTableElement(Movies,MenuTable.movie) elseif MenuArrow=="right" then MenuTable.movie=NextTableElement(Movies,MenuTable.movie) end
			elseif MenuTable[MenuCategory][MenuSelection]  == "play radar movie: " then if MenuArrow=="left" then MenuTable.radarmovie=PrevTableElement(Movies,MenuTable.radarmovie) elseif MenuArrow=="right" then MenuTable.radarmovie=NextTableElement(Movies,MenuTable.radarmovie) end
		end
		elseif MenuCategory == "mixed commands" then
		if MenuTable["mixed commands"][MenuSelection] == "cinema mode" then if MenuArrow=="left" then MenuTable.CinemaModeTime=MenuTable.CinemaModeTime-5 elseif MenuArrow=="right" then MenuTable.CinemaModeTime=MenuTable.CinemaModeTime+5 end end
		elseif MenuCategory == "write lua command" then
		if MenuArrow=="up" then MenuSelection=MenuSelection-15
			elseif MenuArrow=="down" then MenuSelection=MenuSelection+15
			elseif MenuArrow=="left" then MenuSelection=MenuSelection-1
			elseif MenuArrow=="right" then MenuSelection=MenuSelection+1
		end
		elseif MenuCategory == "navigation mode" then
		local SelectedUnit = GSelectedUnitRef --GetSelectedUnitRef()
		if SelectedUnit == nil then return end
		local distance = 50
		if MenuArrow=="up" then UnitMove.Up(SelectedUnit,distance)
			elseif MenuArrow=="down" then UnitMove.Down(SelectedUnit,distance)
			elseif MenuArrow=="left" then UnitMove.Left(SelectedUnit,distance)
			elseif MenuArrow=="right" then UnitMove.Right(SelectedUnit,distance)
			else MenuCategory = LastMenuCategory --MetaMenuHideMetaControlMenu(self)
		end
		return
	end
	DisplayMenu(self)
end

function MenuSelectionUp(self)
	if MenuCategory=="navigation mode" or (MenuCategory=="write lua command" and MenuSelection>4) then 
		MenuSideNavigation(self,"up")
		else
		MenuSelection = MenuSelection-1
		DisplayMenu(self)
	end
end

function MenuSelectionDown(self)
	if MenuCategory=="navigation mode" or (MenuCategory=="write lua command" and MenuSelection>4) then 
		MenuSideNavigation(self,"down")
		else
		MenuSelection = MenuSelection+1
		DisplayMenu(self)
	end
end

function MetaMenuSelectionLeft(self)
	MenuSideNavigation(self,"left")
end

function MenuSelectionRight(self)
	MenuSideNavigation(self,"right")
end

MetaCommandDisplayState=1

function MetaMenuHideMetaControlMenu(self)
	if not self then self = GetPlayerSpellBook() end
	if not IsObjectFromLocalClient(self) then return end	
	if MetaCommandDisplayState==1 then 	
		if BFMEIIROTWK_ACTIVE == 1 then ExecuteAction("DISPLAY_NOTIFICATION_BOX", "Generic", "\n\nCLOSING MENU\n\n", 1)
		else ExecuteAction("HIDE_TUTORIAL_TEXT") end
		MetaCommandDisplayState=0
		else 
		MetaCommandDisplayState=1  
		DisplayMenu(self) 	 
	end
end

----------------------------------------------------------------------------
------------------------META CONTROL DISPLAY--------------------------------
----------------------------------------------------------------------------

function AIBoostOffDisplay(self)
    if IsPlayerAI(self) == 0 then
		return
	end	
	if GPOT[GetTeamName(self)]["AIBoostOffDisplayState"] == 0 then
		GPOT[GetTeamName(self)]["AIBoostOffDisplayState"] = 1
		GPOT[GetTeamName(self)]["AIBoostOnDisplayState"] = 0
		ExecuteAction("PLAY_SOUND_EFFECT", "Gui_GlobalShell_PressStart")	
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:AIBoostOffDisplay")
	end
	end
	
	function AIBoostOnDisplay(self)
		if IsPlayerAI(self) == 0 then
			return
		end	
		if GPOT[GetTeamName(self)]["AIBoostOnDisplayState"] == 0 then
			GPOT[GetTeamName(self)]["AIBoostOnDisplayState"] = 1
			GPOT[GetTeamName(self)]["AIBoostOffDisplayState"] = 0
			ExecuteAction("PLAY_SOUND_EFFECT", "GUI_GollumHappy")	
			ExecuteAction("DISPLAY_TEXT", "MESSAGE:AIBoostOnDisplay")
		end
	end

function MapRevealerONDisplay(self)
    if GPOT[GetTeamName(self)]["MapRevealerONDisplayState"] == 0 then
		GPOT[GetTeamName(self)]["MapRevealerONDisplayState"] = 1
		GPOT[GetTeamName(self)]["MapRevealerOFFDisplayState"] = 0
		ExecuteAction("PLAY_SOUND_EFFECT", "TEMP_SatelliteViewBegin")	
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:MapRevealerONDisplay")
	end
end

function MapRevealerOFFDisplay(self)
    if GPOT[GetTeamName(self)]["MapRevealerOFFDisplayState"] == 0 then
		GPOT[GetTeamName(self)]["MapRevealerONDisplayState"] = 0
		GPOT[GetTeamName(self)]["MapRevealerOFFDisplayState"] = 1
		ExecuteAction("MAP_SHROUD_SET_RESHROUD_TIME", 0)
		ExecuteAction("MAP_SHROUD_SET_RESHROUD_TIME", Map_Reshroud_Time)
		ExecuteAction("PLAY_SOUND_EFFECT", "Gui_GlobalShell_PressStart")
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:MapRevealerOFFDisplay")
	end
end

function EnemyAIOFFDisplay(self)
    if GPOT[GetTeamName(self)]["EnemyAIOFFDisplayState"] == 0 then
		GPOT[GetTeamName(self)]["EnemyAIONDisplayState"] = 0
		GPOT[GetTeamName(self)]["EnemyAIOFFDisplayState"] = 1
		ExecuteAction("PLAY_SOUND_EFFECT", "GUI_GollumHappy")	
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:EnemyAIOFFDisplay")
	end
end

function EnemyAIONDisplay(self)
    if GPOT[GetTeamName(self)]["EnemyAIONDisplayState"] == 0 then
		GPOT[GetTeamName(self)]["EnemyAIONDisplayState"] = 1
		GPOT[GetTeamName(self)]["EnemyAIOFFDisplayState"] = 0
		ExecuteAction("PLAY_SOUND_EFFECT", "Gui_GlobalShell_PressStart")
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:EnemyAIONDisplay")
	end
end

function EveryAIOFFDisplay(self)
    if GPOT[GetTeamName(self)]["EveryAIOFFDisplayState"] == 0 then
		GPOT[GetTeamName(self)]["EveryAIONDisplayState"] = 0
		GPOT[GetTeamName(self)]["EveryAIOFFDisplayState"] = 1
		ExecuteAction("PLAY_SOUND_EFFECT", "GUI_GollumHappy")	
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:EveryAIOFFDisplay")
	end
end

function EveryAIONDisplay(self)
    if GPOT[GetTeamName(self)]["EveryAIONDisplayState"] == 0 then
		GPOT[GetTeamName(self)]["EveryAIONDisplayState"] = 1
		GPOT[GetTeamName(self)]["EveryAIOFFDisplayState"] = 0
		ExecuteAction("PLAY_SOUND_EFFECT", "Gui_GlobalShell_PressStart")
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:EveryAIONDisplay")
	end
end

-----------------------------------------------------------------------
-----------------multiplayer compatibility----------------------------
-----------------------------------------------------------------------

function HandleMultiplayerCompatibility()
	if EvaluateCondition("COMPARE_NUM_PLAYERS_IN_GAME", CompareTable["GT"], 1) and IsMultiplayerActive() then
		MultiplayerStatus = 1
	    --random2=random
		random=randomX
		HandleAutoconfig=HandleAutoconfigMultiplayer
		HandleSavegame=HandleSavegameMultiplayer
		MetaCreditShopEnableCreditSystem=MetaCreditShopEnableCreditSystemMultiplayer
		EnableOrDisableMetaShopButtons=EnableOrDisableMetaShopButtonsMultiplayer
	end
end

function randomX(...) --overwritting lua native function for multiplayer compatibility 
	local RandomNumber = function(a,b) return floor(a+((b-a)*GetRandomNumber())+0.5) end
	if getn(arg) == 0 then return floor(GetRandomNumber()+0.5)
		elseif getn(arg) == 1 then return RandomNumber(1,arg[1])
		elseif getn(arg) == 2 then return RandomNumber(arg[1],arg[2])
	else return arg[RandomNumber(1,getn(arg))] end
end  

function IsMultiplayerActive()
	if getn(GlobalTeamTable)==0 then RefreshTeamTable() end
	local HumanPlayers=0
	for i=1,getn(GlobalTeamTable),1 do
		if IsPlayerAI(GlobalTeamTable[i])==0 then HumanPlayers=HumanPlayers+1 end
	end
	if HumanPlayers>1 then return true else return false end
	--if EvaluateCondition("IS_GAME_IN_SKIRMISH_OR_MULTIPLAYER", 1) then return true end
end

function HandleAutoconfigMultiplayer(dofile_not)
    AutostartFilePath=GetFilePath() .. AutostartFile
	if FileExists(AutostartFilePath) == 1 then
		if dofile_not == nil and MultiplayerStatus == 0 then --and AutoConfig_Multiplayer == 0) then
			dofile(AutostartFilePath)
		end
		else
        WriteAutoconfig()
	end
end  

function HandleSavegameMultiplayer()
end

function MetaCreditShopEnableCreditSystemMultiplayer(self)
end

function EnableOrDisableMetaShopButtonsMultiplayer()
end

function GetFirstHumanPlayerTeam()
	for k,v in globals() do
		if strfind(k,"ObjID") then
			if IsPlayerAI(GetTeamName(v))==0 then LocalClientName=GetTeamName(v) LocalClientNameInit=true return LocalClientName end
		end
	end
	return NeutralTeam --"Player_1/teamPlayer_1"
end

function GetFirstHumanPlayerName()
	for k,v in globals() do
		if strfind(k,"ObjID") then
			if IsPlayerAI(GetTeamName(v))==0 then 
				LocalClientName=strupper(gsub(gsub(strsub(ObjectDescription(v),strfind(ObjectDescription(v), "player ")+10),"%s",""),"%p",""))
				LocalClientTeam=GetTeamName(v) 
				LocalClientNameInit=true 
				return LocalClientName 
			end
		end
	end
	return NeutralTeam --"Player_1/teamPlayer_1"
end

function GetLocalClientName()
	if LocalClientNameInit then return LocalClientName end
	local ProfileFolderPath
	local LocalClientNetworkName
	local LocalClientOnlineName
	local failsafe = function()
		LocalClientNameInit=true 
		LocalClientName=GetFirstHumanPlayerName() --failsafe semi optimal solution
		return LocalClientName 
	end
	local FolderPath = "C:\\Users\\" .. getenv("USERNAME") .. "\\AppData\\Roaming\\"
	for i=1,getn(CNC3EP1FOLDER),1 do 
		if PathExists(FolderPath .. CNC3EP1FOLDER[i]) then
			FolderPath = FolderPath .. CNC3EP1FOLDER[i] .. "\\Profiles"
			break
		end
	end
	if PathExists(FolderPath) and FileExists(FolderPath .. "\\directory.ini")==1 then
		local data1 = LoadFileData(FolderPath .. "\\directory.ini")
		local start_pos = strfind(data1,"e_00_3D_00")
		local end_pos   = strfind(data1,"\n",start_pos)
		ProfileName=gsub(gsub(gsub(strsub(data1,start_pos,end_pos),"_00","") ,"e_3D",""),"\n","")
		ProfileFolderPath = FolderPath .. "\\" .. ProfileName
	else return failsafe() end
	--network name
	if ProfileFolderPath~=nil and PathExists(ProfileFolderPath) then
		if FileExists(ProfileFolderPath .. "\\NetworkPref.ini") then
			local data2 = LoadFileData(ProfileFolderPath .. "\\NetworkPref.ini")
			local start_pos = strfind(data2,"UserName = ")
			local end_pos   = strfind(data2,"\n",start_pos)
			LocalClientNetworkName = gsub(gsub(gsub(strsub(data2,start_pos,end_pos),"_00",""),"UserName = ",""),"\n","")
		else return failsafe() end
		--online name
		if FileExists(ProfileFolderPath .. "\\GameSpyLogin.ini") then
			local data3 = LoadFileData(ProfileFolderPath .. "\\GameSpyLogin.ini")
			local start_pos = strfind(data3,"lastName = ") 
			local end_pos   = strfind(data3,"\n",start_pos)
			LocalClientOnlineName = gsub(gsub(strsub(data3,start_pos,end_pos),"lastName = ",""),"\n","")  
		else failsafe() end
	else return failsafe() end
	--
	-- local data3 = LoadFileData(ProfileFolderPath .. "\\GameSpyLogin.ini")
	-- local start_pos = strfind(data3,"nick_") 
	-- local end_pos   = strfind(data3, ",\n",start_pos)
	-- local LocalClientOnlineName = gsub(gsub(strsub(data3,start_pos,end_pos),"lastName = ",""),"\n","")  "nick" ",\n"
	--
	for k,v in globals() do
		if strfind(k,"ObjID") then
			if strfind(strupper(LocalClientNetworkName),strupper(gsub(gsub(strsub(ObjectDescription(v),strfind(ObjectDescription(v), "player ")+10),"%s",""),"%p",""))) then LocalClientName=LocalClientNetworkName LocalClientNameInit=true return LocalClientName
				elseif strfind(strupper(LocalClientOnlineName),strupper(gsub(gsub(strsub(ObjectDescription(v),strfind(ObjectDescription(v), "player ")+10),"%s",""),"%p",""))) then LocalClientName=LocalClientOnlineName LocalClientNameInit=true return LocalClientName
			end
		end
	end
	for k,v in globals() do
		if strfind(k,"ObjID") then
			if IsPlayerAI(v)~=1 then LocalClientName=gsub(gsub(strsub(ObjectDescription(v),strfind(ObjectDescription(v), "player ")+10),"%s",""),"%p","") LocalClientNameInit=true return LocalClientName end
		end
	end
	error_("no client name found")
	return failsafe()
end

function IsObjectFromLocalClient(object)
	if MultiplayerStatus==0 or StoryModeStatus or MetaGameStatus then return true end
	if object==nil then return true end
	if strfind(strupper(LocalClientName),strupper(gsub(gsub(strsub(ObjectDescription(object),strfind(ObjectDescription(object), "player ")+10),"%s",""),"%p",""))) then return true else return false end
	--if strfind(strupper(getenv("ComputerName")),strupper(gsub(gsub(strsub(ObjectDescription(object),strfind(ObjectDescription(object), "player ")+10),"%s",""),"%p",""))) then return true end	--unreliable
	--if strfind(strupper(getenv("USERNAME")),strupper(gsub(gsub(strsub(ObjectDescription(object),strfind(ObjectDescription(object), "player ")+10),"%s",""),"%p",""))) then return true end	
end

function IsObjectFromLocalClientReal(object)
	if strfind(strupper(LocalClientName),strupper(gsub(gsub(strsub(ObjectDescription(object),strfind(ObjectDescription(object), "player ")+10),"%s",""),"%p",""))) then return true else return false end
end


function GetNumberOfPlayers()
	for i=0,16,1 do
		if EvaluateCondition("COMPARE_NUM_PLAYERS_IN_GAME", CompareTable["EQ"], i) then return i end
	end
end

function ParseAdminNameCodes(self)
	local AdminName = GetTeamsDescriptiveName(AdminTeamName)
	--MetaTabMenu  _A0
	--Gamemode _G0
	--AdminGameSetupMode _AG0
	--diplomacy _D0
	--meta credit shop _S
	--superweapons _SW
	--AOD
end

function TransferAdminConfigOptions(self)  --concept --flash number pad buttons in order
	if LocalClientTeam==AdminTeamName then
		print("Please enter the following code on the right side: ")
	end
end

function DeleteAllObjectsFromOtherTeamsdsadsfsdfdsfddsffsdfsssssss(team)
	local REFLIST = {}
	for i=1,getn(GlobalTeamTable),1 do
		if GlobalTeamTable[i] == team then break
			else
			REFLIST=GetStringRefListOfAllObjectsForTeam(GlobalTeamTable[i])
			for j=1,getn(REFLIST),1 do delete(REFLIST[j].ref) end
		end
	end
	REFLIST=GetStringRefListOfAllObjectsForTeam(CreepsTeam)
	for j=1,getn(REFLIST),1 do delete(REFLIST[j].ref) end
	REFLIST=GetStringRefListOfAllObjectsForTeam(CivilianTeam)
	for j=1,getn(REFLIST),1 do delete(REFLIST[j].ref) end 
	REFLIST=GetStringRefListOfAllObjectsForTeam(NeutralTeam)
	for j=1,getn(REFLIST),1 do delete(REFLIST[j].ref) end 
end 

function ResetGame(self)
	--optional victory or accept deny for game continue
	--reset player objects
	--reset map objects
	--reset money --start money autoconfig
	--reset team relations
	--reset start building
	--reset camera position
	--reset tiberium (replace existing fields?)
	--reset map building ownerships
	--admin mode button (reset map button, return to admingamesetupmode) admin mode tab menu? kick player menu (exit map befehl ausführen für spieler)
	ExecuteAction("OPTIONAL_VICTORY")
	StartAdminGameSetupMode(self)
end

function StartAdminGameSetupMode(self)
	AdminSetupMode = "setup"
	if LocalClientTeam~=AdminTeamName then
		ExecuteAction("DISABLE_INPUT")
		--ExecuteAction("HIDE_UI")
		ExecuteAction("DISPLAY_TUTORIAL_TEXT","GameSetupModeTextNonAdmin")    
		else
		MenuCategory = "edit autoconfig"
		DisplayMenu(self)
		ExecuteAction("DISPLAY_TUTORIAL_TEXT","GameSetupModeTextAdmin")    	
	end
	ExecuteAction("TERRAIN_RENDER_DISABLE",1)
	MuteAudio()	
	--ExecuteAction("MUSIC_PLAY_TRACK_FINITE_TIMES","GDI_Battleship_Alarm",2,1,1)
    ExecuteAction("DIM_WORLD_LIGHTS",255,255,255,1)
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "CamLockDummy", GenericDummyStay, NeutralTeam, "((0.00,0.00,0.00))", 0)
	ExecuteAction("CAMERA_FOLLOW_NAMED", "CamLockDummy", 1, 0.01)
	ExecuteAction("FREEZE_TIME")
	ToggleObjectTypeExistence("MetaControlDummyFreezeGame",AdminTeamName)	
end

function EndAdminGameSetupMode(self)
	AdminSetupMode = "ready"
	if LocalClientTeam~=AdminTeamName then
		ExecuteAction("ENABLE_INPUT")	
		ExecuteAction("SHOW_UI")	
		ExecuteAction("HIDE_TUTORIAL_TEXT")
		else
		ExecuteAction("HIDE_TUTORIAL_TEXT")
	end
	ExecuteAction("TERRAIN_RENDER_DISABLE",0)
	UnMuteAudio()
	ExecuteAction("RESTORE_WORLD_LIGHTS", 1)
	ExecuteAction("UNFREEZE_TIME")
	ToggleObjectTypeExistence("MetaControlDummyFreezeGame",AdminTeamName)
	ExecuteAction("CAMERA_STOP_TETHER_NAMED")
	delete("CamLockDummy")
	ExecuteAction("MOVE_CAMERA_TO_NAMED",GetObj.String(GetBaseRef(LocalClientTeam)),0.00,0,0.00,0.00)
end

----------------------------------------------------------------------------
------------------------OTHER---------------------------------------------
---------------------------------------------------------------------------- 
PreLoadScript=false
PreloadInit = false
StoryModeStatus = false
MetaGameStatus = false

PrimaryModInjection=false
SecondaryModInjection=false

ModInjectionCounter=0

function PlayerSpellBookMetaModInjection(self)	
	if PreLoadScript and not PreloadInit then PreloadInit=true dofile("C:\\Users\\" .. getenv("USERNAME") .. "\\Documents\\Command & Conquer 3 Kanes Rache\\" .. MainFolder .. "\\" .. PreLoadScriptFilename) end
	PlayerSpellBookMetaModInjection1(self)
end

ProperPlayerTeamTable = {}

function PlayerSpellBookMetaModInjection1(self)	
	tinsert(ProperPlayerTeamTable,GetTeamName(self))
	ModInjectionCounter=ModInjectionCounter+1
	if PrimaryModInjection==false then
		PrimaryModInjection=true	
		--GAME_DIFFERENTIATOR() --TW or KW
		spawn("MetaModScriptComObject",NeutralTeam,1,"MetaModScriptComObjectRef")  
		ExecuteAction("UNIT_SET_EXPERIENCE_POINTS","MetaModScriptComObjectRef",0)  
		if GCounters_Initialized == 0 then 
			GCounters_Initialized = 1 
			InitializeGCounters()
			SetCounter("METAMOD_MODSTATUS_COUNTER",1,nil,"no_display")	   
		end	   	
		if not strfind(GetOS(),"Windows") then print("OS not 100% compatible with this mod\nONLY WINDOWS OS",8) end 
		if IsGameInStoryMode(self)==1 or TestCampaignFlag()==1 then StoryModeStatus = true end
		if IsMetaGameActive() == 1 then MetaGameStatus = true end
	end
	RefreshTeamTable()
	if IsPlayerAI(self)==0 then
		if not LocalClientNameInit then LocalClientName=GetLocalClientName() end
		if IsObjectFromLocalClientReal(self) then LocalClientTeam=GetTeamName(self) end
		if getn(GlobalTeamTable)==1 then AdminTeamName=GetTeamName(self) end
		object1 = getglobal(GetObj.Index(self))
		--if StoryModeStatus or MetaGameStatus then tinsert(HumanPlayerTable,LocalClientTeam) end
	end
	if not ( ModInjectionCounter~=GetNumberOfPlayers() ) then --getn(GlobalTeamTable)~=GetNumberOfPlayers()
		if SecondaryModInjection==false then	 
			SecondaryModInjection=true
			HandleMultiplayerCompatibility()
			if FilePathInitialized ~= 1 and FolderCreationPossible() then 
				SetScriptTimer(2,DelayedModInjection) 
				GetFilePathPrimary()
				else 
				DelayedModInjection()
			end
		end
	end
end

function PlayerSpellBookMetaModInjectionOld(self)
	--GAME_DIFFERENTIATOR() --TW or KW
	RefreshTeamTable()
	if IsPlayerAI(self)==0 then
		if not LocalClientNameInit then LocalClientName=GetLocalClientName() end
		if IsObjectFromLocalClient(self) then LocalClientTeam=GetTeamName(self) end
		if getn(GlobalTeamTable)==1 then AdminTeamName=GetTeamName(self) end
	end
	if getn(GlobalTeamTable)~=GetNumberOfPlayers() then return end
	if PrimaryModInjection==false then
		PrimaryModInjection=true	
		spawn("MetaModScriptComObject",NeutralTeam,1,"MetaModScriptComObjectRef")  
		if PreLoadScript then dofile("C:\\Users\\" .. getenv("USERNAME") .. "\\Documents\\Command & Conquer 3 Kanes Rache\\" .. MainFolder .. "\\" .. PreLoadScriptFilename) end  --tempchange			   
		ExecuteAction("UNIT_SET_EXPERIENCE_POINTS","MetaModScriptComObjectRef",0)  
		if GCounters_Initialized == 0 then 
			GCounters_Initialized = 1 
			InitializeGCounters()
			SetCounter("METAMOD_MODSTATUS_COUNTER",1,nil,"no_display")	   
		end	   
		if not strfind(GetOS(),"Windows") then print("OS not 100% compatible with this mod\nONLY WINDOWS OS",8) end 
		HandleMultiplayerCompatibility()
		if FilePathInitialized ~= 1 and FolderCreationPossible() then 
			SetScriptTimer(2,DelayedModInjection) 
			GetFilePathPrimary()
			else 
			DelayedModInjection()
		end
	end
end

function DelayedModInjection()
    HandleAutoconfig("dofile_not")
	if GetAutoconfigBoolValue("AutoConfig_General") == 1 then 
		VanillaSettings() return
		else
        for i=1,getn(GlobalTeamTable),1 do
			spawn("MetaControlDummyPREActivator",GlobalTeamTable[i],1)
			--ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", RandomString(3), "MetaControlDummyPREActivator", GlobalTeamTable[i], "((0.00,0.00,0.00))", 0) 
			--ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", RandomString(3), "MetaControlDummyMainTabMenu", GlobalTeamTable[i], "((0.00,0.00,0.00))", 0)
		end
	end
end

function SelectMetaControlTabMenu(self)
    local TeamName=GetTeamName(self)
    --EvaluateCondition("NAMED_SELECTED",self)
    --EvaluateCondition("TYPE_SELECTED","MetaControlDummyMainTabMenu")
	--ObjectTestModelCondition(self,"SELECTED")
	--local PRODUCTION_QUEUE_TAB = {["MAIN_STRUCTURE"]=0, ["OTHER_STRUCTURE"]=1, ["INFANTRY"]=2, ["VEHICLE"]=3, ["AIRCRAFT"]=4, ["UPGRADE"]=5}
	--ExecuteAction("SWITCH_TO_PRODUCTION_QUEUE_TAB", PRODUCTION_QUEUE_TAB["AIRCRAFT"])
	ExecuteAction("OBJECT_FORCE_SELECT", GetTeamName(self), "MetaControlDummyMainTabMenu", "0", "placeholder")   --if "0" changed to "1" centerview
	local deselect1 = function() ExecuteAction("DESELECT") end
	local deselect2 = function() ExecuteAction("UNIT_CLEAR_MODELCONDITION",GetObj.TableByHashAndTeam("1050534791",%TeamName),"SELECTED") end
	SetScriptTimerFast(0.01,deselect1)
	SetScriptTimer(1,deselect2)
end

function SelectDiplomacyTabMenu(self)
    local TeamName=GetTeamName(self)
	ExecuteAction("OBJECT_FORCE_SELECT", GetTeamName(self), "MetaControlDummyDiplomacyTabMenu", "0", "placeholder")
	local deselect1 = function() ExecuteAction("DESELECT") end
	local deselect2 = function() ExecuteAction("UNIT_CLEAR_MODELCONDITION",GetObj.TableByHashAndTeam("2862218675",%TeamName),"SELECTED") end
	SetScriptTimerFast(0.01,deselect1)
	SetScriptTimer(1,deselect2)
end

function MetaCreditShopSelectTabMenu(self)
    local TeamName=GetTeamName(self)
	ExecuteAction("OBJECT_FORCE_SELECT", GetTeamName(self), "MetaCreditShop", "0", "placeholder")
	local deselect1 = function() ExecuteAction("DESELECT") end
	local deselect2 = function() ExecuteAction("UNIT_CLEAR_MODELCONDITION",GetObj.TableByHashAndTeam("1896553599",%TeamName),"SELECTED") end
	SetScriptTimerFast(0.01,deselect1)
	SetScriptTimer(1,deselect2)
end

function MetaCreditShopMenuToggle(self)
	ToggleObjectTypeExistence("MetaCreditShop",GetTeamName(self))
end

function DiplomacyMenuToggle(self)
	ToggleObjectTypeExistence("MetaControlDummyDiplomacyTabMenu",GetTeamName(self))
end

function GiveChoosePositionOption(team,action,action_with_position,waypoint)
	GPOT[team]["action_with_position"]=action_with_position
	GPOT[team]["ChoosenPositionAction"]=action
	GPOT[team]["ChoosePositionObjRef"] = RandomString(5)
	if waypoint==nil then ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", GPOT[team]["ChoosePositionObjRef"], "MetaMenuChoosePosition", team, "((0.00,0.00,0.00))", 0)
	else ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT_WITH_ORIENTATION", GPOT[team]["ChoosePositionObjRef"], "MetaMenuPositionObject", team, waypoint, 0) end
end 

function MetaMenuPositionObject(self)
	local TeamName = GetTeamName(self)
	GPOT[TeamName]["ChoosenPositionObjRefDest"]=self
	local del = function() delete(GPOT[%TeamName]["ChoosePositionObjRef"]) GPOT[%TeamName]["ChoosePositionObjRef"]=nil end
	local PositionAction = function()
		if type(GPOT[%TeamName]["ChoosenPositionAction"]) == "string" then dostring(GPOT[%TeamName]["ChoosenPositionAction"])
			elseif type(GPOT[%TeamName]["ChoosenPositionAction"]) == "function" then GPOT[%TeamName]["ChoosenPositionAction"]()
		else %del() return end
		GPOT[%TeamName]["action_with_position"]=nil
		GPOT[%TeamName]["ChoosenPositionAction"]=nil
	end
	if GPOT[TeamName]["action_with_position"] ~= nil then
		local GetPositionAndDoAction = function()
			local pos = GetObjectPosition(GPOT[%TeamName]["ChoosenPositionObjRefDest"])
			GPOT[%TeamName]["ChoosenPosition"]["x"] = pos.x
			GPOT[%TeamName]["ChoosenPosition"]["y"] = pos.y 
			%PositionAction()
		end
		SetScriptTimerFast(0.01,GetPositionAndDoAction)
		SetScriptTimerFast(0.02,del)
		else
		PositionAction()
		SetScriptTimerFast(0.01,del)
	end
end

function MainTabMenuCommandSetSwitch(self)
	local TeamName = GetTeamName(self)
	local oldref="Object_" .. RandomString(5)  
	ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE", "MetaControlDummyMainTabMenu", TeamName, oldref)	  
	if not ObjectHasUpgrade(oldref,"Upgrade_MetaControlTabNextCS") then
		ObjectGrantUpgrade(oldref, "Upgrade_MetaControlTabNextCS") 
		else  
		ObjectGrantUpgrade(oldref, "Upgrade_MetaControlTabPrevCS") 
	end	  
	local newref="Object_" .. RandomString(5)  
	ExecuteAction("NAMED_DELETE", oldref) 
	spawn("MetaControlDummyMainTabMenu",TeamName,1,newref)
	--ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", newref, "MetaControlDummyMainTabMenu", TeamName, "((0.00,0.00,0.00))", 0)
	ExecuteAction("OBJECT_FORCE_SELECT", TeamName, "MetaControlDummyMainTabMenu", "0", "placeholder")
end

function MainTabMenuPlayerPower(self)
	ExecuteAction("PLAY_SOUND_EFFECT", "Aeva_NewPowersAv")
	ExecuteAction("FLASH_UI_PLAYER_POWER_BUTTON", "SpecialPower_SendMoney", 1)
	ExecuteAction("FLASH_UI_PLAYER_POWER_BUTTON", "SpecialPower_Money5k", 1)
	ExecuteAction("FLASH_UI_PLAYER_POWER_BUTTON", "SpecialPower_RiftGen", 1)
	ExecuteAction("FLASH_UI_PLAYER_POWER_BUTTON", "SpecialPower_SendMoney", 0)
	ExecuteAction("FLASH_UI_PLAYER_POWER_BUTTON", "SpecialPower_Money5k", 0)
	ExecuteAction("FLASH_UI_PLAYER_POWER_BUTTON", "SpecialPower_RiftGen", 0) 
end

function RegisterTestDummyRef(self)
	for k,v in globals() do
		if type(v) == "number" then if mod(v,613)==0 then rawset(globals(),k,floor(GetObj.Hash(self)/10)) end end
	end
end

function MainTabMenuFlash(self)
	if IsMetaGameActive() == 1 then 
		ExecuteAction("DISABLE_UI_PLAYER_POWER_BUTTON", "SpecialPower_MetaControlDummyMainTabMenuSelector", 1)
		ExecuteAction("DISABLE_UI_PLAYER_POWER_BUTTON", "SpecialPower_DiplomacyMenuSelect", 1)
		ExecuteAction("DISABLE_UI_PLAYER_POWER_BUTTON", "SpecialPowerCameraSetup", 1)
		ExecuteAction("DISABLE_UI_PLAYER_POWER_BUTTON", "SpecialPowerFirstAndThirdPersonMode", 1)
		ExecuteAction("DISABLE_UI_PLAYER_POWER_BUTTON", "SpecialPowerMetaCreditShopMenu", 1)
		--delete(self) 
		--return 
	end
	ExecuteAction("FLASH_UI_PLAYER_POWER_BUTTON", "SpecialPower_MetaControlDummyMainTabMenuSelector", 1)
	ExecuteAction("FLASH_UI_PLAYER_POWER_BUTTON", "SpecialPower_MetaControlDummyMainTabMenuSelector", 0)
	ExecuteAction("FLASH_UI_FIXED_ELEMENT", "AIRCRAFT_TAB", 1)
	ExecuteAction("FLASH_UI_FIXED_ELEMENT", "AIRCRAFT_TAB", 0) 
	ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionUp",1) 
	ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionDown",1)
	ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionLeft",1) 
	ExecuteAction("DISABLE_UI_BUILD_BUTTON","MetaMenuSelectionRight",1)	 
	--SelectMetaControlTabMenu(self)
end

function LuaEventNugget_Function(self, other) --self is the victim
	object1 = self  --getglobal(GetObj.Index(self))
	object2 = other --getglobal(GetObj.Index(other))
	RunExternalLuaScript()	 
	--ExecuteAction("SHOW_MILITARY_CAPTION", "TO END", 3)	 
end

function SetGlobalTiberiumAmmount(ammount) --concept
	local ref="Object_" .. RandomString(5)  
	ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE", "TiberiumSpike", NeutralTeam, ref)	
	ExecuteAction("WAREHOUSE_SET_VALUE", ref, ammount) 
end

function SupplyTruckIdleFix_Function()  --concept
	ExecuteAction("RESUME_SUPPLY_TRUCKING")
end

function InfoAboutUnit(self)
	--GetSelectedUnitRef("flash")
    PrintSelectedUnitInformation()
end

function ToggleAICoControl(thisobject)
    if GPOT[GetTeamName(thisobject)]["AIControlState"] == 0 then 
		GPOT[GetTeamName(thisobject)]["AIControlState"] = 1
		ExecuteAction("PLAY_SOUND_EFFECT", "GUI_GollumHappy")	
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:AICoControlON")
		ExecuteAction("TEAM_AI_TRANSFER", GetTeamName(thisobject), 0) 
		ExecuteAction("TEAM_AI_TRANSFER", GetTeamName(thisobject), 1) 
		else
		GPOT[GetTeamName(thisobject)]["AIControlState"] = 0
		ExecuteAction("PLAY_SOUND_EFFECT", "Gui_GlobalShell_PressStart")
		ExecuteAction("DISPLAY_TEXT", "MESSAGE:AICoControlOFF")
		ExecuteAction("TEAM_AI_TRANSFER", GetTeamName(thisobject), 1) 
		ExecuteAction("TEAM_AI_TRANSFER", GetTeamName(thisobject), 0) 
	end
end

function AIBoostMoneySpawnerKill(self)
	if AI_Boost_Include_Human_Player == 0 then
		if IsPlayerAI(self) == 0 then
			ExecuteAction("NAMED_DELETE", self)
		end	
	end
end

function SuperweaponOFFSpawnerKill(self)
    if No_Superweapons == 0 or (IsPlayerAI(self) == 1 and No_Superweapons_AI == 1) then
		ExecuteAction("NAMED_DELETE", self);
	end	
end

function AIBoostTogglerByForceSpawnerKill(self)
    if Force_AI_Boost_ToggleButton == 0 then
		ExecuteAction("NAMED_DELETE", self)
	end 
end	

function TiberiumKillerSpawnerKill(self)
    if No_Tiberium == 0 then
		ExecuteAction("NAMED_DELETE", self)
	end 
end	

function DevourerTiberiumConversionWeapon(self,other)
end

function MapRevealerSpawnerKill(self)
    if Disable_Fog_Of_War == 0 then
		ExecuteAction("NAMED_DELETE", self)
	end 
end

function ActivatorSpawnerKill(self)
    if Old_Meta_Control_Option_Bar == 0 then
		ExecuteAction("NAMED_DELETE", self)
	end 
end

function LuaScriptActivatorSpawnerKill(self)
    if Force_Lua_Script_Button == 0 then
		ExecuteAction("NAMED_DELETE", self)
	end 
end

function UnitSpawnerSpawn(self)
	spawn(MetaTabMenuUnitSpawnSelection,GetTeamName(self))
end

function VictoryConditionHelperCreated(self)
	ObjectSetObjectStatus(self,"UNATTACKABLE")
	--ExecuteAction("NAMED_SET_HELD",self,1)
	--ExecuteAction("NAMED_SET_SLEEP_STATUS",self,1)
	--ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",self,"Player Targetable",0)	
	--ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",self,"Selectable",0)
	--ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS",self,"Enabled",0) 	
end

function SetCameraHeightStandard()
	ExecuteAction("CAMERA_SET_DEFAULT", 0.00, 0.00 , 1.6)
end

function Camera_Hack_1_Initiate()
	ExecuteAction("PLAY_SOUND_EFFECT", "GUI_GollumHappy")	
	if Camera_Hack_1_Enable == 1 and CameraHack1SetupState == 0 then
		CameraHack1SetupState = 1
		ExecuteAction("LOCK_CAMERA_ZOOM", 0)
		ExecuteAction("CAMERA_LETTERBOX_BEGIN")
		ExecuteAction("SHOW_UI")
		--ExecuteAction("SHOW_MILITARY_CAPTION", "MESSAGE:CAMHEIGHTHACK", 5)
	end
end

function Camera_Hack_1_End()
	ExecuteAction("PLAY_SOUND_EFFECT", "Gui_GlobalShell_PressStart")	
	if Camera_Hack_1_Enable == 1 then
		ExecuteAction("LOCK_CAMERA_ZOOM", Camera_Hack_1_Lock_Zoom)
		CamZoomLock_State = Camera_Hack_1_Lock_Zoom
		ExecuteAction("CAMERA_LETTERBOX_END")
	end
end

function Camera_Hack_1_ReInitiate()
	if CamZoomLock_State==1 then ExecuteAction("LOCK_CAMERA_ZOOM", 0) CamZoomLock_State=0
		else 
		ExecuteAction("PLAY_SOUND_EFFECT", "GUI_GollumHappy")	
		ExecuteAction("LOCK_CAMERA_ZOOM", 0)
		ExecuteAction("CAMERA_LETTERBOX_BEGIN")
		ExecuteAction("SHOW_UI")
		CamZoomLock_State=1
	end
end

function Camera_Hack_1_ReFinish()
	if CamZoomLock_State==1 then 
		ExecuteAction("PLAY_SOUND_EFFECT", "Gui_GlobalShell_PressStart")
		ExecuteAction("LOCK_CAMERA_ZOOM", 1)
		ExecuteAction("CAMERA_LETTERBOX_END")
	end
end

function ToggleCameraZoomSetupMode()
	local StartZoomAdjustMode = function() 
		ExecuteAction("PLAY_SOUND_EFFECT", "GUI_GollumHappy")	
		ExecuteAction("LOCK_CAMERA_ZOOM", 0)
		ExecuteAction("CAMERA_LETTERBOX_BEGIN")
		ExecuteAction("SHOW_UI")
		CamZoomLock_State=1
	end
	local FinishZoomAdjustMode = function() 
		ExecuteAction("PLAY_SOUND_EFFECT", "Gui_GlobalShell_PressStart")
		ExecuteAction("LOCK_CAMERA_ZOOM", 1)
		ExecuteAction("CAMERA_LETTERBOX_END")
		CamZoomLock_State=1
	end
	if CamZoomLock_State==1 then CamZoomLock_State=0 ExecuteAction("LOCK_CAMERA_ZOOM", 0)
	else StartZoomAdjustMode() SetScriptTimer(3,FinishZoomAdjustMode) end
end

function Camera_Hack_2()
	if Camera_Hack_2_Enable == 1 and CameraHack2SetupState == 0 then
		CameraHack2SetupState = 1
		ExecuteAction("ZOOM_CAMERA", Camera_Hack_2_Cam_Height , 1, 1, 1); 
		if Camera_Hack_1_Enable ~= 1 then
			ExecuteAction("LOCK_CAMERA_ZOOM", Camera_Hack_2_Lock_Zoom)
			CamZoomLock_State = Camera_Hack_2_Lock_Zoom
		end
	end
end

function CamZoomLockToggle()
	if CamZoomLock_State == 0 then
		CamZoomLock_State = 1 
		ExecuteAction("LOCK_CAMERA_ZOOM", 1)
		else 
		CamZoomLock_State = 0
		ExecuteAction("LOCK_CAMERA_ZOOM", 0) 
	end
end

----------------------------------------------------------------------------
-------------Client-ScriptHost and Client-Client communication--------
----------------------------------------------------------------------------

function SendScriptHostCodeMessage(code,counter)   --Client-ScriptHost-CommunicationBridge
	ExecuteAction("UNIT_SET_EXPERIENCE_POINTS","MetaModScriptComObjectRef",tonumber(code))
	--ExecuteAction("SET_UNIT_EXPERIENCE_TO_COUNTER","MetaModScriptComObjectRef",counter)
	SetCounter(counter,tonumber(code),nil,"nodisplay")  --for direct "non-scripthost" scripts
end

---- Client-Client communication code (untested proof of concept prototype)

ClientCodeIN = ""
ClientCodeOUT = ""
ClientTeamSender = ""
ClientTeamReceiver = ""
ClientCodePos = 1

function SetupClientClientCommunicationBridge()
	SetCounter("ClientClientCommunicationBridgeCounter",0,nil,"nodisplay")
end

function ReceiveClientMessage()   --ClientClientCommunicationBridge
	ExecuteAction("SET_UNIT_EXPERIENCE_TO_COUNTER","MetaModScriptComObjectRef","ClientClientCommunicationBridgeCounter")
	local value = GetCounterValue("ClientClientCommunicationBridgeCounter")
	ClientCodeIN=ClientCodeIN .. strchar(strsub(tostring(value),2,4)) ..  strchar(strsub(tostring(value),5,7)) 
	--SetCounter("ClientClientCommunicationBridgeCounter",0,nil,"nodisplay") --reset
	if tonumber(strsub(tostring(value),1,1))==1 then spawn("ClientMessageSender",ClientTeamSender)
		else 
		dostring(ClientCodeIN)  
		ClientCodeIN=""
		ClientCodePos=1	 
		ClientTeamSender=""
	end
end

function SendClientMessage(CodeMesssage,team)  -- we send our code with an 8 bit decimal number (max)
	if ClientTeamReceiver=="" then ClientTeamReceiver=team end
	if ClientCodeOUT == "" then ClientCodeOUT=CodeMesssage end
	local value,Tvalue="",""
	if ClientCodePos+2>=strlen(ClientCodeOUT) then value=1
	else value = 2 end
	for i=ClientCodePos,ClientCodePos+2,1 do
		Tvalue=strbyte(strsub(ClientCodeOUT,i,i))
		if strlen(Tvalue) == 2 then value=value .. "0" .. Tvalue
		else value=value .. Tvalue end
	end
	ExecuteAction("UNIT_SET_EXPERIENCE_POINTS","MetaModScriptComObjectRef",tonumber(value))
	spawn("ClientMessageReceiver",ClientTeamReceiver)
end

----------------------------------------------------------------------------
------------------------GUARDSHIELD AI MODUS--------------------------------
----------------------------------------------------------------------------
function GuardShieldAIActive_Function(self, source)  
	if (ObjectHasUpgrade(self, "Upgrade_GuardShieldAIModusON") == 1) then
		if ( (ObjectCountNearbyEnemies(self, 420) > 0) and (ObjectHasUpgrade(self, "Upgrade_GuardShieldON") == 0) )  then    
			ObjectDoSpecialPower(self, "SpecialPower_GuardShield")
			elseif ( (ObjectCountNearbyEnemies(self, 420) == 0) and (ObjectHasUpgrade(self, "Upgrade_GuardShieldON") == 1) ) then
			ObjectDoSpecialPower(self, "SpecialPower_GuardShield")
			--ExecuteAction("NAMED_USE_COMMANDBUTTON_ABILITY", self, "Command_SpecialPowerGuardShield")   --alternative
		end 
	end
end

function GuardShieldAIModusTrigger_Function(self, source) 
	if (ObjectHasUpgrade(self, "Upgrade_GuardShieldAIModusON") == 1) then 
		ObjectDoSpecialPower(self, "SpecialPower_GuardShieldAIModusActivator")
	end
    ObjectGrantUpgrade(self, "Upgrade_GuardShieldControllbarRefreshDummy")    --refresh upgrade stack
    ObjectRemoveUpgrade(self, "Upgrade_GuardShieldControllbarRefreshDummy") 
end	

function GuardShieldAIModusTriggerDelete_Function(self, source) 
	if ( (ObjectHasUpgrade(self, "Upgrade_GuardShieldAIModusON") == 0) and (ObjectHasUpgrade(self, "Upgrade_GuardShieldAIModusOFF") == 1) ) then 
		ObjectDoSpecialPower(self, "SpecialPower_GuardShieldAIModusDeactivator")
	    if (ObjectHasUpgrade(self, "Upgrade_GuardShieldON") == 1) then
			ObjectDoSpecialPower(self, "SpecialPower_GuardShield")
		end
	end
end 

function GuardShieldOnUpgrade_Function(self, source)
	--if strfind(tostring(ObjectTeamName(self)), tostring(ObjectTeamName(source))) then
    ObjectGrantUpgrade(self, "Upgrade_GuardShieldON", source) 
	--end
end

function GuardShieldOnUpgradeRemove_Function(self)
	--if strfind(tostring(ObjectTeamName(self)), tostring(ObjectTeamName(source))) then
	ObjectRemoveUpgrade(self, "Upgrade_GuardShieldON") 
	--end
end

function GuardShieldONBroadcast_Function(self)
    ObjectBroadcastEventToAllies(self, "BeginChanting", 9999)
    ObjectSetChanting(self, true)	
    --ObjectBroadcastEventToUnits(self, "BeginChanting", 9999)  
end

function GuardShieldOFFBroadcast_Function(self)
    ObjectBroadcastEventToAllies(self, "StopChanting", 9999)   
    ObjectSetChanting(self, false)	
    --ObjectBroadcastEventToUnits(self, "StopChanting", 9999) 
end

function ForceFieldDistractionWeapon(self)
	ObjectCreateAndFireTempWeapon(self,"ForceFieldDistractionWeapon")
end

function ForceFieldAttractionWeapon(self)
	ObjectCreateAndFireTempWeapon(self,"ForceFieldAttractionWeapon")
end

function OnGateCheck(self)
	if ObjectTestModelCondition(self, "USER_4") then
		if ObjectTestModelCondition(self, "USER_3") then
			ObjectGrantUpgrade(self, "Upgrade_NAutoWG1")
			else
			ObjectGrantUpgrade(self, "Upgrade_NAutoWG2")
		end
		elseif not ( ObjectTestModelCondition(self, "USER_1") or ObjectTestModelCondition(self, "USER_2") or ObjectTestModelCondition(self, "USER_3") or ObjectTestModelCondition(self, "STRUCTURE_UNPACKING") ) then
		if (ObjectCountNearbyEnemies(self, 500) == 0) then
			ObjectGrantUpgrade(self, "Upgrade_LowerWG")
			else
			ObjectGrantUpgrade(self, "Upgrade_RaiseWG")
		end
		elseif (ObjectCountNearbyEnemies(self, 200) ~= 0) then
		ObjectGrantUpgrade(self, "Upgrade_PrepareRaiseWG")
	end
end

SpecialEnemyNearTask = {}
SpecialEnemyAwayTask = {}

function OnSpecialEnemyNear(self)
	if SpecialEnemyNearTask[tostring(self)]==nil then return
	else SpecialEnemyNearTask[tostring(self)](self) end
end

function OnSpecialEnemyAway(self)
	if SpecialEnemyAwayTask[tostring(self)]==nil then return
	else SpecialEnemyAwayTask[tostring(self)](self) end
end

---------------------------------------------------------------------------
-------------------DIPLOMACY SYSTEM----------------------------------------
---------------------------------------------------------------------------

function NextPlayer(self)
	local TeamName = GetTeamName(self)
	if GPOT[TeamName]["DiplomacyTeamSelection"] == getn(GlobalTeamTable) then GPOT[TeamName]["DiplomacyTeamSelection"] = 1
	else GPOT[TeamName]["DiplomacyTeamSelection"] = GPOT[TeamName]["DiplomacyTeamSelection"] + 1 end
	if TeamName == GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]] then GPOT[TeamName]["DiplomacyTeamSelection"] = GPOT[TeamName]["DiplomacyTeamSelection"] + 1 end
	if GPOT[TeamName]["DiplomacyTeamSelection"] > getn(GlobalTeamTable) then GPOT[TeamName]["DiplomacyTeamSelection"] = 1 end
	if IsObjectFromLocalClient(self) then 
		print("" .. strsub(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 1,  8) .. " / " .. GetFactionName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. " / " .. GetTeamsDescriptiveName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. "\n\nselected") 
		--flash(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]])
		ExecuteAction("TEAM_FLASH_WHITE",GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 3)  
	end
end

function PrevPlayer(self)
	local TeamName = GetTeamName(self)
	if GPOT[TeamName]["DiplomacyTeamSelection"] == 1 then GPOT[TeamName]["DiplomacyTeamSelection"] = getn(GlobalTeamTable)
	else GPOT[TeamName]["DiplomacyTeamSelection"] = GPOT[TeamName]["DiplomacyTeamSelection"] - 1 end
	if TeamName == GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]] then GPOT[TeamName]["DiplomacyTeamSelection"] = GPOT[TeamName]["DiplomacyTeamSelection"] - 1 end
	if GPOT[TeamName]["DiplomacyTeamSelection"] < 1 then GPOT[TeamName]["DiplomacyTeamSelection"] = getn(GlobalTeamTable) end
	if IsObjectFromLocalClient(self) then 
		print("" .. strsub(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 1,  8) .. " / " .. GetFactionName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. " / " .. GetTeamsDescriptiveName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. "\n\nselected") 
		--flash(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]])
		ExecuteAction("TEAM_FLASH_WHITE",GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 3)  
	end
end

function GiveAcceptDenyOptions(team,acceptaction,denyaction,preaction)
	if acceptaction==nil then local NOOP = function() end denyaction=NOOP end
	tinsert(GPOT[team]["AcceptAction"],acceptaction)
	if denyaction==nil then local NOOP = function() end denyaction=NOOP end
	tinsert(GPOT[team]["DenyAction"],denyaction)
	if not EvaluateCondition("NAMED_NOT_DESTROYED", GPOT[team]["AcceptDenyObjRef"]) then 
		GPOT[team]["AcceptDenyObjRef"]=RandomString(5)
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", GPOT[team]["AcceptDenyObjRef"], "Diplomacy_Choose_AcceptDeny", team, "((0.00,0.00,0.00))", 0)
	end
	if preaction~=nil then
		if type(preaction) == "string" then dostring(preaction)
		else preaction() end
	end
end

function Diplomacy_Choose_Accept(self)
	local TeamName=GetTeamName(self)
	if type(GPOT[TeamName]["AcceptAction"][1]) == "string" then dostring(GPOT[TeamName]["AcceptAction"][1])
	elseif type(GPOT[TeamName]["AcceptAction"][1]) == "function" then GPOT[TeamName]["AcceptAction"][1]() end
	tremove(GPOT[TeamName]["AcceptAction"],1)
	tremove(GPOT[TeamName]["DenyAction"],1)
	if getn(GPOT[TeamName]["AcceptAction"])==0 then
		local del = function() delete(GPOT[%TeamName]["AcceptDenyObjRef"]) end
		SetScriptTimer(1,del)
	end
end

function Diplomacy_Choose_Deny(self)
	local TeamName=GetTeamName(self)
	if type(GPOT[TeamName]["DenyAction"][1]) == "string" then dostring(GPOT[TeamName]["DenyAction"][1])
	elseif type(GPOT[TeamName]["DenyAction"][1]) == "function" then GPOT[TeamName]["DenyAction"][1]() end
	tremove(GPOT[TeamName]["AcceptAction"],1)
	tremove(GPOT[TeamName]["DenyAction"],1)
	if getn(GPOT[TeamName]["DenyAction"])==0 then
		local del = function() delete(GPOT[%TeamName]["AcceptDenyObjRef"]) end
		SetScriptTimer(1,del)
	end
end

function BreakAlliance(self)
	local TeamName = GetTeamName(self)
	SetRelation(TeamName, GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 0)
end

function RequestAlliance(self)
	local TeamName=GetTeamName(self)
	local OtherTeam=GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]
	local SetRelationAction = function() SetRelation(%TeamName,%OtherTeam,2) end
	local AllianceDeniedAction = function() print("alliance request denied") GiveMoney(%TeamName,3000) end
	if TeamRelations[TeamName][OtherTeam] == 0 then
		ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_RequestAllian", TeamName)      
		if GPOT[OtherTeam]["ai"]==0 then
			if not TeamName==TeamCommander then
				GiveAcceptDenyOptions(OtherTeam,SetRelationAction)   
				local RelationChangeNotification = "\n\n\n" .. strsub(OtherTeam, 1,  8) .. " / " .. GetFactionName(OtherTeam) .. " / " .. GetTeamsDescriptiveName(OtherTeam) .. "\ndo you want to create an alliance with\n\n" .. strsub(TeamName, 1,  8) .. " / " .. GetFactionName(TeamName) .. " / " .. GetTeamsDescriptiveName(TeamName) .. "\n?\n"
				print(RelationChangeNotification,5)
			else SetRelationAction() end
			else
			if random(100) < 34 then SetScriptTimer(random(4,8),SetRelationAction)
			else SetScriptTimer(random(4,8),AllianceDeniedAction) end
		end
	end
end  

function RequestAllianceAI(self) --case ai to ai (not case human to ai)
end

function RequestAlliedHelp(self,forcecommand)
	local TeamName = GetTeamName(self)
	local HelpAction = function()
		ExecuteAction("TEAM_GUARD_POSITION", GlobalTeamTable[GPOT[%TeamName]["DiplomacyTeamSelection"]], GetPlayerStartWaypointByTeam(%TeamName))
		ExecuteAction("ATTACK_MOVE_TEAM_TO", GlobalTeamTable[GPOT[%TeamName]["DiplomacyTeamSelection"]], GetPlayerStartWaypointByTeam(%TeamName))
		ExecuteAction("TEAM_GUARD_TEAM",GlobalTeamTable[GPOT[%TeamName]["DiplomacyTeamSelection"]],%TeamName)	
	end
	if TeamRelations[TeamName][GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]] == 2 then
		if GPOT[GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]]["ai"] == 1 then 
			if random(100) < 80 and forcecommand==nil then
				--SetScriptTimer(random(4,8),'ExecuteAction(" .. strchar(34) .. "TEAM_GUARD_TEAM" .. strchar(34) .. ", GlobalTeamTable[GPOT[" .. TeamName .. "]["DiplomacyTeamSelection"]], " .. TeamName .. ")')
				HelpAction()
				print("support is on it's way!")
				elseif forcecommand~=nil then HelpAction()
				else print("support currently not possible!") 
			end
			else
			if not TeamName==TeamCommander and forcecommand==nil then 
				local HelpRequestNotification = "\n\n\n" .. strsub(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 1,  8) .. " / " .. GetFactionName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. " / " .. GetTeamsDescriptiveName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. "\n\ndo you accept the help request from\n\n" .. strsub(TeamName, 1,  8) .. " / " .. GetFactionName(TeamName) .. " / " .. GetTeamsDescriptiveName(TeamName) .. "\n?\n"
				local HelpRequestDenied = "\n\n\n" .. strsub(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 1,  8) .. " / " .. GetFactionName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. " / " .. GetTeamsDescriptiveName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. "\n\nyour help request has been denied by\n\n" .. strsub(TeamName, 1,  8) .. " / " .. GetFactionName(TeamName) .. " / " .. GetTeamsDescriptiveName(TeamName) .. "\n\n"
				print(HelpRequestNotification,5)
				GiveAcceptDenyOptions(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]],HelpAction,HelpRequestDenied)
				else 
				local HelpRequestCommandIssued = "\n\n\n" .. strsub(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 1,  8) .. " / " .. GetFactionName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. " / " .. GetTeamsDescriptiveName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. "\n\nhas issued a unit help command to\n\n" .. strsub(TeamName, 1,  8) .. " / " .. GetFactionName(TeamName) .. " / " .. GetTeamsDescriptiveName(TeamName) .. "\n\n"
				print(HelpRequestCommandIssued,5)
				HelpAction() 
			end	 
		end
	end
end

function ShowAllRelations(self,ret)
	if not IsObjectFromLocalClient(self) then return end
	local t1 = strrep("\t ", 7)
	local AllRelationsString = ""
	AllRelationsString = "\nPlayer\t \t |"
	for i=1,getn(GlobalTeamTable),1 do AllRelationsString = AllRelationsString .. "\t \t \t " .. i .. "\t \t \t |" end
	AllRelationsString = AllRelationsString .. "\n_______|" .. strrep("_____|", getn(GlobalTeamTable))
	for k=1,getn(GlobalTeamTable),1 do
		AllRelationsString = AllRelationsString .. "\n" .. t1 .. "" .. k .. "\t \t \t |"
		for w=1,getn(GlobalTeamTable),1 do
			AllRelationsString = AllRelationsString .. "\t \t \t " .. TeamRelations[GlobalTeamTable[k]][GlobalTeamTable[w]] .. "\t \t \t |"
		end
		--AllRelationsString = AllRelationsString .. "\n_______|" .. strrep("_____|", getn(GlobalTeamTable))
	end
	AllRelationsString = AllRelationsString .. "\n0=enemy,  1=neutral,  2=friend"
	if ret ~= nil then return AllRelationsString
	else ExecuteAction("SHOW_MILITARY_CAPTION", "\n\n" .. AllRelationsString .. "\n", 15) end
end

function TemporaryMergeTeam(team1,team2,forcemerge)    --team_receiver=team1,team_to_transmit=team2
	if TeamRelations[team1][team2]==2 or forcemerge~=nil or GPOT[team2]["ai"]==0 then
		local MergeTeamProcess = function(team1,team2)
			if not GPOT[team1][team2]["TemporaryMergedTeam"] then 
				GPOT[team2]["VictoryConditionHelperRefForMergeTeamOP"] = RandomString(5)
				ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",GPOT[team2]["VictoryConditionHelperRefForMergeTeamOP"],VictoryConditionHelper,team2,"((0.00,0.00,0.00))", 0)
				GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"]=GetStringRefListOfAllObjectsForTeam(team2)
				GPOT[team1][team2]["TemporaryMergedTeam"]=true
				for i=1,getn(GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"]),1 do
					ExecuteAction("UNIT_SET_TEAM",GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"][i].ref,team1)	
					ExecuteAction("NAMED_FLASH_WHITE",GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"][i].ref,3)
				end
				else
				for i=1,getn(GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"]),1 do
					ExecuteAction("UNIT_SET_TEAM", GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"][i].ref,team2)	
					ExecuteAction("NAMED_FLASH_WHITE", GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"][i].ref,3)		
				end
				GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"] = {} 
				GPOT[team1][team2]["TemporaryMergedTeam"]=false
				ExecuteAction("NAMED_DELETE",GPOT[team2]["VictoryConditionHelperRefForMergeTeamOP"])
			end
		end	
		local MergeTeamProcess_ = function() %MergeTeamProcess(%team1,%team2) end
		if GPOT[team2]["ai"]==0 and forcemerge==nil and not GPOT[team1][team2]["TemporaryMergedTeam"] and not team1==TeamCommander then 
			GiveAcceptDenyOptions(team2,MergeTeamProcess_)
			local RelationChangeNotification = "\n\n\n" .. strsub(team2, 1,  8) .. " / " .. GetFactionName(team2) .. " / " .. GetTeamsDescriptiveName(team2) .. "\n\ndo you want to temporarily give control of your team to\n\n" .. strsub(team1, 1,  8) .. " / " .. GetFactionName(team1) .. " / " .. GetTeamsDescriptiveName(team1) .. "\n?\n"
			print(RelationChangeNotification,5)
		else MergeTeamProcess(team1,team2) end
	end    
end   --TemporaryMergeTeam(AIPlayerTable[1],HumanPlayerTable[1],nil)

function TemporaryMergeAlliedTeam(self,forcemerge)
	TemporaryMergeTeam(GetTeamName(self),GlobalTeamTable[GPOT[GetTeamName(self)]["DiplomacyTeamSelection"]],forcemerge)
end

function TemporaryMergeOwnTeam(self,forcemerge)
	TemporaryMergeTeam(GlobalTeamTable[GPOT[GetTeamName(self)]["DiplomacyTeamSelection"]],GetTeamName(self),forcemerge)
end

function ToggleSwitchTeams(team1,team2,forceswitch)
	if TeamRelations[team1][team2] == 2 or forceswitch ~= nil or GPOT[team2]["ai"]==0 then
		local SwitchTeamProcess = function(team1,team2)
			VictCondHelperRef_team1 = RandomString(5)
			VictCondHelperRef_team2 = RandomString(5)
			ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", VictCondHelperRef_team1, VictoryConditionHelper, team1, "((0.00,0.00,0.00))", 0)
			ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", VictCondHelperRef_team2, VictoryConditionHelper, team2, "((0.00,0.00,0.00))", 0)	
			if not GPOT[team1][team2]["TemporaryMergedTeam"] then 
				GPOT[team1][team2]["TemporaryMergedTeam"]=true
				GPOT[team2][team1]["TemporaryMergedTeam"]=true
				GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"]=GetStringRefListOfAllObjectsForTeam(team1)
				GPOT[team2][team1]["TemporaryMergedTeamUnitsTable"]=GetStringRefListOfAllObjectsForTeam(team2)
				for i=1,getn(GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"]),1 do
					ExecuteAction("UNIT_SET_TEAM",GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"][i].ref,team2)	
					ExecuteAction("NAMED_FLASH_WHITE",GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"][i].ref,3)
				end
				for i=1,getn(GPOT[team2][team1]["TemporaryMergedTeamUnitsTable"]),1 do
					ExecuteAction("UNIT_SET_TEAM",GPOT[team2][team1]["TemporaryMergedTeamUnitsTable"][i].ref,team1)	
					ExecuteAction("NAMED_FLASH_WHITE",GPOT[team2][team1]["TemporaryMergedTeamUnitsTable"][i].ref,3)
				end
				else
				for i=1,getn(GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"]),1 do
					ExecuteAction("UNIT_SET_TEAM", GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"][i].ref,team1)	
					ExecuteAction("NAMED_FLASH_WHITE", GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"][i].ref,3)		
				end
				for i=1,getn(GPOT[team2][team1]["TemporaryMergedTeamUnitsTable"]),1 do
					ExecuteAction("UNIT_SET_TEAM", GPOT[team2][team1]["TemporaryMergedTeamUnitsTable"][i].ref,team2)	
					ExecuteAction("NAMED_FLASH_WHITE", GPOT[team2][team1]["TemporaryMergedTeamUnitsTable"][i].ref,3)		
				end
				GPOT[team1][team2]["TemporaryMergedTeam"]=false
				GPOT[team1][team2]["TemporaryMergedTeamUnitsTable"] = {} 
				GPOT[team2][team1]["TemporaryMergedTeam"]=false
				GPOT[team2][team1]["TemporaryMergedTeamUnitsTable"] = {} 
				ExecuteAction("NAMED_DELETE",VictCondHelperRef_team1)
				ExecuteAction("NAMED_DELETE",VictCondHelperRef_team2)
			end
		end	
		local SwitchTeamProcess_ = function() %SwitchTeamProcess(%team1,%team2) end
		if GPOT[team2]["ai"]==0 and forceswitch==nil and not GPOT[team1][team2]["TemporaryMergedTeam"] and not team1==TeamCommander then 
			GiveAcceptDenyOptions(team2,SwitchTeamProcess_)
			local RelationChangeNotification = "\n\n\n" .. strsub(team2, 1,  8) .. " / " .. GetFactionName(team2) .. " / " .. GetTeamsDescriptiveName(team2) .. "\n\ndo you want to temporarily switch teams with with\n\n" .. strsub(team1, 1,  8) .. " / " .. GetFactionName(team1) .. " / " .. GetTeamsDescriptiveName(team1) .. "\n?\n"
			print(RelationChangeNotification,5)
		else SwitchTeamProcess(team1,team2) end --we need to do it twice to work
	end
end   --ToggleSwitchTeams(AIPlayerTable[1],HumanPlayerTable[1],nil)

function SwitchTeams(self,forceswitch)
	local team1 = GetTeamName(self)
	local team2 = GlobalTeamTable[GPOT[team1]["DiplomacyTeamSelection"]]
	ToggleSwitchTeams(team1,team2,forceswitch)
end

function GenericEventOutput(self, data)
	out(tostring(data))
end

function SwitchTeamsAllUnits(team1,team2)
	local VictCondHelperRef_team1 = RandomString(5)
	local VictCondHelperRef_team2 = RandomString(5)
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", VictCondHelperRef_team1, VictoryConditionHelper, team1, "((0.00,0.00,0.00))", 0)
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", VictCondHelperRef_team2, VictoryConditionHelper, team2, "((0.00,0.00,0.00))", 0)	
	local UnitListTeam1 = GetStringRefListOfAllObjectsForTeam(team1)
	local UnitListTeam2 = GetStringRefListOfAllObjectsForTeam(team2)
	for i=1,getn(UnitListTeam1),1 do
		ExecuteAction("UNIT_SET_TEAM", UnitListTeam1[i].ref,team2)	
		ExecuteAction("NAMED_FLASH_WHITE", UnitListTeam1[i].ref,3)		
	end
	for i=1,getn(UnitListTeam2),1 do
		ExecuteAction("UNIT_SET_TEAM", UnitListTeam2[i].ref,team1)	
		ExecuteAction("NAMED_FLASH_WHITE", UnitListTeam2[i].ref,3)		
	end
	ExecuteAction("NAMED_DELETE",VictCondHelperRef_team1)
	ExecuteAction("NAMED_DELETE",VictCondHelperRef_team2)
end 

function MergeTeams(team_receiver,team_victim,forcemerge)
	local MergeTeamProcess_ = function() ExecuteAction("TEAM_MERGE_INTO_TEAM",%team_victim,%team_receiver) end
	if (TeamRelations[team_receiver][team_victim]==2) or forcemerge~=nil then
		if GPOT[team_victim]["ai"]==0 and forcemerge==nil and not TeamCommander==team_receiver then 
			GiveAcceptDenyOptions(team_victim,MergeTeamProcess_)
			local RelationChangeNotification = "\n\n\n" .. strsub(team2, 1,  8) .. " / " .. GetFactionName(team2) .. " / " .. GetTeamsDescriptiveName(team2) .. "\n\ndo you want to give your entire team to (irreversible)\n\n" .. strsub(team1, 1,  8) .. " / " .. GetFactionName(team1) .. " / " .. GetTeamsDescriptiveName(team1) .. "\n?\n"
			print(RelationChangeNotification,5)
		else MergeTeamProcess_() end
	end
end  --MergeTeams(AIPlayerTable[1],HumanPlayerTable[1],nil)

function MergeTeamWithNextAllied(team,forcemerge)
	local ownTeam = ""
	if type(team)=="table" then ownTeam = GetTeamName(team)
	else ownTeam = team end
	for i=1,getn(GlobalTeamTable),1 do
		if (TeamRelations[ownTeam][GlobalTeamTable[i]] == 2) and (( (ownTeam ~= GlobalTeamTable[i]) and EvaluateCondition("TEAM_HAS_UNITS", GlobalTeamTable[i]) ) or forcemerge~=nil) then
			MergeTeams(ownTeam,GlobalTeamTable[i])
			TeamRelations[ownTeam][GlobalTeamTable[i]] = 1  --hacky
			return
		end	
	end
end

function MergeTeamWithNextEnemy(team,forcemerge)
	local ownTeam = ""
	if type(team)=="table" then ownTeam = GetTeamName(team)
	else ownTeam = team end
	for i=1,getn(GlobalTeamTable),1 do
		if (TeamRelations[ownTeam][GlobalTeamTable[i]] == 0) and (( (ownTeam ~= GlobalTeamTable[i]) and EvaluateCondition("TEAM_HAS_UNITS", GlobalTeamTable[i]) ) or forcemerge~=nil) then
			MergeTeams(ownTeam,GlobalTeamTable[i])
			TeamRelations[ownTeam][GlobalTeamTable[i]] = 1  --hacky
			return
		end	
	end
end

function TakeControlOfAllied(self)
	local TeamName = GetTeamName(self)
	local action = function() 
		ExecuteAction("TEAM_MERGE_INTO_TEAM", GlobalTeamTable[GPOT[%TeamName]["DiplomacyTeamSelection"]],%TeamName)
		print(GetTeamsDescriptiveName(%TeamName) .. " you now have control!")
	end
	if TeamRelations[TeamName][GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]] == 2 then
		if GPOT[GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]]["ai"] == 1 then
			action()
			else
			GiveAcceptDenyOptions(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]],action)
			local MergeRequestNotification = "\n\n\n" .. strsub(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 1,  8) .. " / " .. GetFactionName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. " / " .. GetTeamsDescriptiveName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. "\n\ndo you want to give irreversible control of all your units and buildings to \n\n" .. strsub(TeamName, 1,  8) .. " / " .. GetFactionName(TeamName) .. " / " .. GetTeamsDescriptiveName(TeamName) .. "\n?\n"
			print(MergeRequestNotification,5)	 
		end
	end	
end

function Diplomacy_MoveAttackCommand(self,forcecommand)
	local TRef = RandomString(5)
	local TeamName = GetTeamName(self)
	local actionfinal = function() ExecuteAction("ATTACK_MOVE_TEAM_TO_NAMED_OBJECT",GlobalTeamTable[GPOT[%TeamName]["DiplomacyTeamSelection"]],GetObj.Table(GPOT[%TeamName]["ChoosenPositionObjRefDest"])) end 
	local actionfirst = function() GiveChoosePositionOption(%TeamName,%actionfinal)   end
	--ExecuteAction("TEAM_GUARD_OBJECT",...)
	if GPOT[GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]]["ai"]==0 and forcecommand==nil and not TeamName==TeamCommander then 
		if (TeamRelations[TeamName][GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]]==2) then
			GiveAcceptDenyOptions(GPOT[TeamName]["DiplomacyTeamSelection"],actionfirst)
			local MoveAttackOrderNotification = "\n\n\n" .. strsub(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]], 1,  8) .. " / " .. GetFactionName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. " / " .. GetTeamsDescriptiveName(GlobalTeamTable[GPOT[TeamName]["DiplomacyTeamSelection"]]) .. "\n\ndo you want your units to receive a move-attack order from\n\n" .. strsub(TeamName, 1,  8) .. " / " .. GetFactionName(TeamName) .. " / " .. GetTeamsDescriptiveName(TeamName) .. "\n?\n"
			print(MoveAttackOrderNotification,5)   
		end
	else actionfirst() end
end

function InitializeTeamCommanderTable()
	TeamCommander=""
	TeamCommanderTable={}
	for i=1,getn(GlobalTeamTable),1 do
		TeamCommanderTable[GlobalTeamTable[i]]={}
		for j=1,getn(GlobalTeamTable),1 do
			if GlobalTeamTable[i]==GlobalTeamTable[j] then TeamCommanderTable[GlobalTeamTable[i]][GlobalTeamTable[j]]=1
			else TeamCommanderTable[GlobalTeamTable[i]][GlobalTeamTable[j]]=0 end 	  
		end
	end
end

function Diplomacy_ApplyForTeamCommander(self)
	local TeamName=GetTeamName(self)
	for i=1,getn(HumanPlayerTable),1 do
		if TeamName ~= HumanPlayerTable[i] and (TeamRelations[TeamName][HumanPlayerTable[i]]==2) then
			local accept = function() AcceptDenyTeamCommander(%HumanPlayerTable[%i],%TeamName,1) end
			local deny = function() AcceptDenyTeamCommander(%HumanPlayerTable[%i],%TeamName,0) end
			GiveAcceptDenyOptions(HumanPlayerTable[i],accept,deny) 
		end
	end
end

function AcceptDenyTeamCommander(ownteam,requestor,AcceptOrDeny)
	if AcceptOrDeny==1 then
		TeamCommanderTable[ownteam][requestor]=1 
		for i=1,getn(HumanPlayerTable),1 do if (TeamCommanderTable[HumanPlayerTable[i]][requestor]~=1) and (TeamRelations[ownteam][requestor]==2) then return end end
		local TeamCommanderChangeNotification = "\n\n\n" .. strsub(requestor, 1,  8) .. " / " .. GetFactionName(requestor) .. " / " .. GetTeamsDescriptiveName(requestor) .. "\n\has been accepted as team commander!"
		print(TeamCommanderChangeNotification,5) 
		TeamCommander=requestor
		else 
		TeamCommanderTable[ownteam][requestor]=0
		if TeamCommander==requestor then 
			TeamCommander="" 
			local TeamCommanderChangeNotification = "\n\n\n" .. strsub(requestor, 1,  8) .. " / " .. GetFactionName(requestor) .. " / " .. GetTeamsDescriptiveName(requestor) .. "\n\nis no longer team commander"
			print(TeamCommanderChangeNotification,5) 
			else
			local TeamCommanderChangeNotification = "\n\n\n" .. strsub(requestor, 1,  8) .. " / " .. GetFactionName(requestor) .. " / " .. GetTeamsDescriptiveName(requestor) .. "\n\your team commander application has been denied"
			print(TeamCommanderChangeNotification,5) 
		end
	end
end

function Diplomacy_SendMoney(self)
	GiveMoney(GlobalTeamTable[GPOT[GetTeamName(self)]["DiplomacyTeamSelection"]],500)  
end

function InitializeTeamRelations()  
	if StoryModeStatus or MetaGameStatus then GlobalTeamTable=MergeTables(ProperPlayerTeamTable,GetTeamTable("all"))  end --tempchange
    for i=1,getn(GlobalTeamTable),1 do
		TeamRelations[GlobalTeamTable[i]] = {}
		for j=1,getn(GlobalTeamTable),1 do
			--if i ~= j then TeamRelations[GlobalTeamTable[j]] = {} 
			TeamRelations[GlobalTeamTable[i]][GlobalTeamTable[j]] = 2
			--TeamRelations[GlobalTeamTable[j]][GlobalTeamTable[i]] = 2
		end
	end
	for h=1,getn(GlobalTeamTable),1 do      
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "TeamRelationsInitializator_" .. h .. "", "MetaControlTeamRelationsInitializator", GlobalTeamTable[h], "((0.00,0.00,0.00))", 0) 
	end
	if StoryModeStatus or MetaGameStatus then GlobalTeamTable = CopyTable(ProperPlayerTeamTable) end--tempchange 
end

function PrimaryTeamRelationsInitialization(self, other)
	--if Diplomacy_System == 1 or NativeArtOfDefense == 1 then
    if TeamRelationsInitialized ~= 1 then
		TeamRelationsInitialized = 1
		RefreshTeamTable()
		InitializeTeamRelations()
		InitializeTeamCommanderTable()
	end	
	local teamname1 = GetTeamName(self)
	local teamname2 = GetTeamName(other)
	TeamRelations[teamname1][teamname2] = 0
	TeamRelations[teamname2][teamname1] = 0
	--end	
end

function SetTeamRelationsTable(team1, team2, RelationType)
    if type(RelationType) == "string" then 
		if RelationType == "Enemy" then RelationType=0
			elseif RelationType == "Friend" then RelationType=2
		elseif RelationType == "Neutral" then RelationType=1 end
	end
	if TeamRelations[team1][team2] ~= RelationType or TeamRelations[team2][team1] ~= RelationType then
		TeamRelations[team1][team2] = RelationType
		TeamRelations[team2][team1] = RelationType
		return 0
		else return 1
	end
end

function RemoveRelation(team1, team2)
	ExecuteAction("TEAM_REMOVE_OVERRIDE_RELATION_TO_TEAM", team1, team2)
	ExecuteAction("TEAM_REMOVE_OVERRIDE_RELATION_TO_TEAM", team2, team1)
end

function RemoveAllRelations(team)
	ExecuteAction("TEAM_REMOVE_ALL_OVERRIDE_RELATIONS", team)	
end

function SetRelation_(team1, team2, RelationType)
	ExecuteAction("TEAM_SET_OVERRIDE_RELATION_TO_TEAM", team1, team2, RelationType)
	ExecuteAction("TEAM_SET_OVERRIDE_RELATION_TO_TEAM", team2, team1, RelationType)
end

RelationTypeString = { "Enemy", "Friend", "Neutral"}

function SetRelation(team1, team2, RelationType)
	if SetTeamRelationsTable(team1, team2, RelationType) == 0 then	 
		ExecuteAction("TEAM_AVAILABLE_FOR_RECRUITMENT", team1, 1)
		ExecuteAction("TEAM_AVAILABLE_FOR_RECRUITMENT", team2, 1) 
		if EvaluateCondition("COUNTER_COUNTER","METAMOD_EXTENDED_DIPLOMACY",CompareTable["EQ"],CounterTable[1]) then
			if EvaluateCondition("METAMOD_MAPSCRIPT_VERSION_2",CompareTable["EQ"],CounterTable[1]) then 
				RunMapScript("METAMOD_DIPLOMACY_PLAYER_" .. GetTeamNumber(team1) .. "_" ..  strupper(RelationTypeString[RelationType]), team2) 	  
				RunMapScript("METAMOD_DIPLOMACY_PLAYER_" .. GetTeamNumber(team2) .. "_" ..  strupper(RelationTypeString[RelationType]), team1) 	
				else
				SendScriptHostCodeMessage(tonumber(tostring(GetTeamNumber(team1)) .. tostring(GetTeamNumber(team2)) .. tostring(RelationType)),"DIPLOMACY_COMMAND_COUNTER")
				--SetCounter("DIPLOMACY_COMMAND_COUNTER",tonumber(tostring(GetTeamNumber(team1)) .. tostring(GetTeamNumber(team2)) .. tostring(RelationType)),nil,1)	
			end
			else
			ExecuteAction("TEAM_SET_OVERRIDE_RELATION_TO_TEAM", team1, team2, RelationType)
			ExecuteAction("TEAM_SET_OVERRIDE_RELATION_TO_TEAM", team2, team1, RelationType)
		end
		ExecuteAction("TEAM_FLASH_WHITE", team1, 3)
		ExecuteAction("TEAM_FLASH_WHITE", team2, 3)	
		local RelationTypeString = { [0]="breaks", [2]="creates"}
		local RelationChangeNotification = "\n\n\n" .. strsub(team1, 1,  8) .. " / " .. GetFactionName(team1) .. " / " .. GetTeamsDescriptiveName(team1) .. "\n\n" .. RelationTypeString[RelationType] .. " alliance with\n\n" .. strsub(team2, 1,  8) .. " / " .. GetFactionName(team2) .. " / " .. GetTeamsDescriptiveName(team2) .. "\n\n"
		if RelationType == "Friend" or RelationType == 2 then
			ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_AllianceForme", team1)
			ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_AllianceForme", team2)
			ExecuteAction("TEAM_CREATE_RADAR_EVENT", team1, RadarEventTable["Information"])
			ExecuteAction("TEAM_CREATE_RADAR_EVENT", team2, RadarEventTable["Information"])	  
			ExecuteAction("SHOW_MILITARY_CAPTION", RelationChangeNotification, 10)
			for i=1,getn(HumanPlayerTable),1 do
				if HumanPlayerTable[i] ~= team1 and HumanPlayerTable[i] ~= team2 then
					if (TeamRelations[HumanPlayerTable[i]][team1] == 0) and (TeamRelations[HumanPlayerTable[i]][team2] == 0) then ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_EnemyAlliaFor", HumanPlayerTable[i]) end
				end
			end	  
			elseif RelationType == "Enemy" or RelationType == 0 then
			ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_AllianceBroke", team1)
			ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_AllianceBroke", team2)
			ExecuteAction("TEAM_CREATE_RADAR_EVENT", team1, RadarEventTable["Banner"])
			ExecuteAction("TEAM_CREATE_RADAR_EVENT", team2, RadarEventTable["Banner"])	
			ExecuteAction("SHOW_MILITARY_CAPTION", RelationChangeNotification, 10)
		end
	end  
end

function TeamRelationRefresher()
end

function TeamValueRefresher() ----unfinished, conecpt, idea collection
	--EvaluateCondition("TEAM_THREAT_LEVEL", GlobalTeamTable[i], CompareTable["LT"], 5, 15000)
    --EvaluateCondition("EVAL_TEAM_HEALTH", team, CompareTable["LT"], percent)
    --EvaluateCondition("TEAM_HAS_UNITS", team1)
    --EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", team, int, "SELECTABLE")
    --EvaluateCondition("DISTANCE_BETWEEN_TEAM", team1, team2, CompareTable["LT"], distance)
	--ObjectCountNearbyEnemies(self, 420)	
	--local Behaviour = { ["Peaceful"]=0, ["Sleep"]=1, ["Passive"]=2, ["Normal"]=3, ["Alert"]=4, ["Agressive"]=5}
    --ExecuteAction("TEAM_SET_ATTITUDE", GlobalTeamTable[i], Behaviour[random(6)])
	--ExecuteAction("TEAM_INCREASE_PRIORITY", GlobalTeamTable[i])
	--ExecuteAction("TEAM_DECREASE_PRIORITY", GlobalTeamTable[i])
	--ExecuteAction("TEAM_INCREASE_PRIORITY_BY_VALUE", GlobalTeamTable[i], amount)
	--ExecuteAction("TEAM_DECREASE_PRIORITY_BY_VALUE", GlobalTeamTable[i], amount)	
	--ExecuteAction("TEAM_APPLY_ATTACK_PRIORITY_SET", team, attackpriorityset)
end

function TeamActionChooser() --unfinished,conecpt
	local ApproachPath_ = { "Center", "Backdoor", "Flank", "Special"}
    local ActionTable = {}
	local i = random(getn(GlobalTeamTable))
	local j = random(getn(GlobalTeamTable))
    ActionTable[1] = ExecuteAction("TEAM_ATTACK_TEAM", GlobalTeamTable[i], GlobalTeamTable[j])
	ActionTable[2] = ExecuteAction("ATTACK_MOVE_TEAM_TO", GlobalTeamTable[i], GetPlayerStartWaypointFromTeamNumber(j))	
	ActionTable[3] = ExecuteAction("TEAM_GUARD_TEAM", GlobalTeamTable[i], GlobalTeamTable[j])
	ActionTable[4] = ExecuteAction("TEAM_GUARD_POSITION", GlobalTeamTable[i], GetPlayerStartWaypointFromTeamNumber(j))
	ActionTable[5] = ExecuteAction("MOVE_TEAM_TO", GlobalTeamTable[i], GetPlayerStartWaypointFromTeamNumber(j))
	ActionTable[6] = ExecuteAction("MOVE_TEAM_HOME", GlobalTeamTable[i])
	ActionTable[7] = ExecuteAction("TEAM_WANDER_IN_PLACE", GlobalTeamTable[i])
	ActionTable[8] = ExecuteAction("TEAM_HUNT", GlobalTeamTable[i])
	ActionTable[9] = ExecuteAction("SKIRMISH_MOVE_TO_APPROACH_PATH", GlobalTeamTable[i], ApproachPath_[random(4)])	
	ActionTable[10] = ExecuteAction("SKIRMISH_FOLLOW_APPROACH_PATH", GlobalTeamTable[i], ApproachPath_[random(4)], 1)
	ActionTable[11] = ExecuteAction("TEAM_SET_SLEEP_STATUS", GlobalTeamTable[i], 1)	
	--ValidSourceType{ first_valid_source = 0, all_valid_source = 1}
	--ActionTable[12] = ExecuteAction("SKIRMISH_ATTACK_NEAREST_GROUP_WITH_VALUE", GlobalTeamTable[i], CompareTable["LT"], value)		
	--ActionTable[13] = ExecuteAction("SKIRMISH_PERFORM_COMMANDBUTTON_ON_MOST_VALUABLE_OBJECT", GlobalTeamTable[i], "command_...", radius, ValidSourceType["all_valid_source"])	
	ActionTable.random(10)
end

function DiplomacyGamemodeSetup()
	if Diplomacy_Initial_Setup_State == 0 then
		Diplomacy_Initial_Setup_State = 1
		CustomGameFinishConditionCheck = 1
		--ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 1)
		if TeamRelationsInitialized ~= 1 then
			TeamRelationsInitialized = 1
			RefreshTeamTable()
			InitializeTeamRelations()
		end
		Disable_Fog_Of_War = 1
		--spawn("MetaControlDummyPermanentMapRevealerDelayer")
		for i=1,getn(HumanPlayerTable),1 do
			spawn("MetaControlDummyDiplomacyTabMenu",HumanPlayerTable[i],1,"DiplomacyTabMenu_" .. i .. "")
			--ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "DiplomacyTabMenu_" .. i .. "", "MetaControlDummyDiplomacyTabMenu", HumanPlayerTable[i], "((0.00,0.00,0.00))", 0)        
		end
	end
end

function PeriodicTeamDiplomacyAdministration()
	if Diplomacy_Initial_Setup_State == 0 then DiplomacyGamemodeSetup() return end
	if not (random(100) < 10) or Diplomacy_Auto_AllianceChange == 0 then return end
	if EvaluateCondition("COMPARE_NUM_PLAYERS_IN_GAME", CompareTable["LT"], 2) then return end
    RefreshTeamTable()
	--TeamValueRefresher()		
	local randn1 = random(getn(GlobalTeamTable))
	local randn2 = random(getn(GlobalTeamTable))
	while (randn1 == randn2) do
		randn2 = random(getn(GlobalTeamTable))
	end
	local RandomTeam1 = GlobalTeamTable[randn1]
	local RandomTeam2 = GlobalTeamTable[randn2]	
    --local RelationType = { "Enemy", "Friend", "Neutral"}	
    local RelationType = { 0, 2, 1}	
	local RandomRelationType = RelationType[random(2)]	
	if RandomRelationType == TeamRelations[RandomTeam1][RandomTeam2] then
	    if RandomRelationType == 2 then RandomRelationType = 0
		else RandomRelationType = 2 end	
	end
	SetRelation(RandomTeam1,RandomTeam2, RandomRelationType)
	--TeamActionChooser()
end

---------------------------------------------------------------------------
-------------------EVOLUTIONARY AI SYSTEM----------------------------------  
---------------------------------------------------------------------------
--coming in future updates maybe

function EnemyAIBoostActivation(self)
	spawn("MetaControlDummyAIBoostActivator",GetTeamName(self))
end

function AlliedAIBoostActivation(self)
	spawn("MetaControlDummyAIBoostAlliesActivator",GetTeamName(self))
end

function AdaptiveAIBoost()
	for i=1,getn(GlobalTeamTable),1 do
		if TeamRelations[HumanPlayerTable[1]][GlobalTeamTable[i]] == 0 then
			if (CountTeamsKindOf(GlobalTeamTable[i],"VEHICLE") + CountTeamsKindOf(GlobalTeamTable[i],"AIRCRAFT"))/(CountTeamsKindOf(HumanPlayerTable[1],"VEHICLE") + CountTeamsKindOf(HumanPlayerTable[1],"AIRCRAFT"))<0.5 then
				GiveMoney(GlobalTeamTable[i],AI_Boost_Cash_Ammount_PerSec*NAOD.PeriodTime)  
				if AI_Boost_Unit_Spawner == 1 then spawn(MenuTable["spawn"][random(17)],GlobalTeamTable[i],random(3,5)) end
				--elseif CountTeamsKindOf(GlobalTeamTable[i],"STRUCTURE")
			end		 
		end
	end
end

function AIUltraBoostToggle(team)
	ToggleObjectTypeExistence("InfiniteProductionSpeedDummy",team)
	ToggleObjectTypeExistence("BuildAnywhereDummy",team)
	ToggleObjectTypeExistence("InfiniteEnergyDummy",team)
	--GiveMoney(team,1000000)
	--ToggleAIBuilder(team)
end


---------------------------------------------------------------------------
-------------------EVOLUTIONARY UNIT AI SYSTEM-----------------------------
---------------------------------------------------------------------------
--coming in future updates maybe

--ExecuteAction("NAMED_APPLY_ATTACK_PRIORITY_SET", thisobject, priorityset)

function UnitSelectionForAIMode(self)
	tinsert(GPOT[GetTeamName(self)]["UnitEvoAI"],GetSelectedUnitRef())
end

function EvoUnitAIProcess()
	for k=1,getn(HumanPlayerTable),1 do
		for i=1,getn(GPOT[HumanPlayerTable[k]]["UnitEvoAI"]),1 do
			--GPOT[HumanPlayerTable[k]]["UnitEvoAI"][i]
		end
	end
end  

function UnitMoveToPosition(Object,x,y)  
	local alpha = SpawnAtPosition(GenericDummy,NeutralTeam,x,y,0,0,0,0,1,1)
	--local MoveMode1 = function() ExecuteAction("UNIT_ATTACK_MOVE_TOWARDS_NEAREST_OBJECT_TYPE",%Object,GenericDummy) pop() end
	--push(MoveMode1)   
	local MoveMode2 = function() ExecuteAction("UNIT_GUARD_OBJECT",%Object,%alpha) pop() end
	push(MoveMode2)
	--local DeleteDummy = function() ExecuteAction("NAMED_DELETE",%alpha) pop() end
	--push(DeleteDummy)
end


UnitMove={}

function UnitMove.Up(unit,dist)
	UnitMoveToPosition(unit,GetObjectPosition(unit).x,GetObjectPosition(unit).y+dist) 
end

function UnitMove.Down(unit,dist)
	UnitMoveToPosition(unit,GetObjectPosition(unit).x,GetObjectPosition(unit).y-dist) 
end

function UnitMove.Left(unit,dist)
	UnitMoveToPosition(unit,GetObjectPosition(unit).x-dist,GetObjectPosition(unit).y) 
end

function UnitMove.Right(unit,dist)
	UnitMoveToPosition(unit,GetObjectPosition(unit).x+dist,GetObjectPosition(unit).y) 
end

---------------------------------------------------------------------------
-------------------HERO GAMEMMODE------------------------------------------
---------------------------------------------------------------------------

function HeroGeneralGamemode()
	if HeroGeneralGamemode_Initialized == 0 then
		HeroGeneralGamemode_Initialized = 1
		--CustomGameFinishConditionCheck = 1
		--ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 1)
		for i=1,getn(GlobalTeamTable),1 do  
			local HeroGeneralRef = "HeroGeneral_" .. GetPlayerNameByTeam(GlobalTeamTable[i]) .. ""   
			ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT", HeroGeneralRef, Hero_General_Selection, GlobalTeamTable[i], GetPlayerStartWaypointByTeam(GlobalTeamTable[i]))
			--TempGlobal=i
			--SetScriptTimer(1,'ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "EMPField", NeutralTeam, GetPlayerStartWaypointByTeam(GlobalTeamTable[i]))')	
			ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "EMPField", NeutralTeam, GetPlayerStartWaypointByTeam(GlobalTeamTable[i]))
			--ExecuteAction("CREATE_NAMED_ON_TEAM_AT_OBJECTTYPE_WITH_ORIENTATION",RandomString(2),"EMPField",NeutralTeam,HeroGeneralRef,0)	  
			--ExecuteAction("UNIT_SET_MAX_LEVEL", HeroGeneralRef, 7)
			ExecuteAction("UNIT_SET_EXPERIENCE_POINTS", HeroGeneralRef, 100000)
			ExecuteAction("NAMED_CUSTOM_COLOR", HeroGeneralRef, UnitColorTable.white)
			ExecuteAction("UNIT_SET_HEALTH", HeroGeneralRef, 1000)
			ExecuteAction("NAMED_FLASH_WHITE", HeroGeneralRef, 5)
			ExecuteAction("NAMED_SET_STEALTH_ENABLED",HeroGeneralRef,1)
			if Hero_General_Overpowered == 1 then 
				ExecuteAction("CREATE_UNNAMED_ON_TEAM_AT_WAYPOINT", "HeroGeneralBooster", GlobalTeamTable[i], GetPlayerStartWaypointByTeam(GlobalTeamTable[i]))	  
			end
			if GPOT[GlobalTeamTable[i]]["ai"] == 1 then
				ExecuteAction("UNIT_SET_STANCE", HeroGeneralRef, "HOLD_FIRE")
				ExecuteAction("NAMED_GUARD", HeroGeneralRef)		
				--ExecuteAction("UNIT_IDLE_FOR_SECONDS", HeroGeneralRef, 120)
				--ExecuteAction("UNIT_GUARD_FOR_SECONDS",HeroGeneralRef,120)		
				ExecuteAction("NAMED_SET_ATTITUDE",HeroGeneralRef,Behaviour["Normal"])
				ExecuteAction("UNIT_GUARD_POSITION",HeroGeneralRef,GetPlayerStartWaypointByTeam(GlobalTeamTable[i]))
			end	  
		end	
		ExecuteAction("SHOW_MILITARY_CAPTION", "HERO_GENERAL_GAMEMODE_ACTIVE", 5)
		if Human_Players_Count<2 then
			--ExecuteAction("OBJECT_FORCE_SELECT", HumanPlayerTable[1], "HeroGeneral_" .. GetPlayerNameByTeam(HumanPlayerTable[1]) .. "", "1", "placeholder")   
			ExecuteAction("MOVE_CAMERA_TO_NAMED","HeroGeneral_" .. GetPlayerNameByTeam(HumanPlayerTable[1]) .. "",0.2,0,0.3,0.3)  
			SetScriptTimer(1,'ExecuteAction("CAMERA_TETHER_NAMED", "HeroGeneral_" .. GetPlayerNameByTeam(HumanPlayerTable[1]) .. "", 1, "20.00")')
			SetScriptTimer(1,'ExecuteAction("HIDE_UI")')  
			SetScriptTimer(1,'ExecuteAction("DISABLE_INPUT")')
			SetScriptTimer(1,'ExecuteAction("ROTATE_CAMERA",1,3,0.5,0.1)')  
			SetScriptTimer(2,'ExecuteAction("PLAY_SOUND_EFFECT", "Aeva_UnitReady")')    
			SetScriptTimer(4,'ExecuteAction("CAMERA_STOP_TETHER_NAMED")')     
			SetScriptTimer(4,'ExecuteAction("SHOW_UI")')
			SetScriptTimer(4,'ExecuteAction("MOVIE_PLAY_RADAR","HEROGENERALGAMEMODE")')
			SetScriptTimer(4,'ExecuteAction("ENABLE_INPUT")')
			--ExecuteAction("CAMERA_LOOK_TOWARD_OBJECT","HeroGeneral_" .. GetPlayerNameByTeam(HumanPlayerTable[1]) .. "",5,2,2,2,50)
		end
	end
	for i=1,getn(GlobalTeamTable),1 do      
		if not EvaluateCondition("NAMED_NOT_DESTROYED", "HeroGeneral_" .. GetPlayerNameByTeam(GlobalTeamTable[i]) .. "") then ExecuteAction("TEAM_KILL", GlobalTeamTable[i]) end   
	end
    SetCounter("HEALTHCOUNTER", GetHealth("HeroGeneral_" .. GetPlayerNameByTeam(HumanPlayerTable[1]) .. ""), "Counter:HEALTH")
end

---------------------------------------------------------------------------
-------------------UNIT VS UNIT GAMEMMODE----------------------------------
---------------------------------------------------------------------------

function UnitVSUnitGamemode()
	if UnitVSUnitGamemode_Initialized == 0 then
		UnitVSUnitGamemode_Initialized = 1
		--CustomGameFinishConditionCheck = 1
		--ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 1)
		for k,v in globals() do
			if strfind(tostring(k), "ObjID") and strfind(tostring(ObjectDescription(v)), "BASE_FLAG") then
				ExecuteAction("NAMED_DELETE", v) 		  
			end
		end
		for i=1,getn(GlobalTeamTable),1 do  
			ExecuteAction("CREATE_NAMED_ON_TEAM_AT_WAYPOINT", "MainUnit_" .. GetPlayerNameByTeam(GlobalTeamTable[i]) .. "", Unit_vs_Unit_Selection, GlobalTeamTable[i], GetPlayerStartWaypointByTeam(GlobalTeamTable[i]))   
		end
		ExecuteAction("SHOW_MILITARY_CAPTION", "UNIT_VS_UNIT_GAMEMODE_ACTIVE", 5)
		if Human_Players_Count<2 and Unit_vs_Unit_Camera_Follow == 1 then 
			ExecuteAction("CAMERA_FOLLOW_NAMED", "MainUnit_" .. GetPlayerNameByTeam(HumanPlayerTable[1]) .. "", 0, "340")
			--ExecuteAction("CAMERA_STOP_FOLLOW")
			--ExecuteAction("LOCK_CAMERA_ZOOM",0)
			--ExecuteAction("LOCK_CAMERA_SCROLL",0)
			ExecuteAction("LOCK_CAMERA_ANGLE_AND_HEIGHT",0)	 
		end
		SetScriptTimer(5,'ExecuteAction("PLAY_SOUND_EFFECT", "Aeva_UnitReady")')
		--ExecuteAction("RADAR_FORCE_ENABLE")
		--ExecuteAction("HIDE_UI")   --freeze radar video bug exploit
		--ExecuteAction("SHOW_UI")
		ExecuteAction("MOVIE_PLAY_RADAR", "UNITVSUNITGAMEMODE")	 
		for i=1,getn(GlobalTeamTable),1 do
			if GPOT[GlobalTeamTable[i]]["ai"] == 1 then 
				--ExecuteAction("ATTACK_MOVE_TEAM_TO", GlobalTeamTable[i], GetPlayerStartWaypointByTeam(GlobalTeamTable[random(getn(GlobalTeamTable))]))
				--ExecuteAction("TEAM_ATTACK_TEAM", GlobalTeamTable[i], GlobalTeamTable[random(getn(GlobalTeamTable))])
				ExecuteAction("TEAM_ATTACK_MOVE_TOWARDS_NEAREST_OBJECT_TYPE", GlobalTeamTable[i], Unit_vs_Unit_Selection)		  
				ExecuteAction("TEAM_HUNT", GlobalTeamTable[i]) 
			end
		end
	end
	for i=1,getn(GlobalTeamTable),1 do     
		if not EvaluateCondition("NAMED_NOT_DESTROYED", "MainUnit_" .. GetPlayerNameByTeam(GlobalTeamTable[i]) .. "") then 
			--ExecuteAction("TEAM_KILL", GlobalTeamTable[i]) 
			ExecuteAction("NAMED_DELETE", GetObj.TableByType(VictoryConditionHelper,GlobalTeamTable[i]))		  
		end   
	end
	SetCounter("HEALTHCOUNTER", GetHealth("MainUnit_" .. GetPlayerNameByTeam(HumanPlayerTable[1]) .. ""), "Counter:HEALTH")
end

-- Unit_vs_Unit_Random_Unit      = no
-- Unit_vs_Unit_RoundsToWin  = 3

---------------------------------------------------------------------------
-------------------RANDOM ARMY GAMEMMODE-----------------------------------
---------------------------------------------------------------------------
InitialUnitsCount = {}

function RandomArmyGamemode()
	if RandomArmy_Initialized == 0 then
		RandomArmy_Initialized = 1
		--CustomGameFinishConditionCheck = 1
		--ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 1)
		for k,v in globals() do
			if strfind(tostring(k), "ObjID") and strfind(tostring(ObjectDescription(v)), "BASE_FLAG") then
				ExecuteAction("NAMED_DELETE", v) 		  
			end
		end
		for i=1,random(1,2),1 do  
			spawnForAllTeams(NAOD.UnitTable.Infantry1[random(getn(NAOD.UnitTable.Infantry1))], min(random(3,7),random(0,7))) 
			spawnForAllTeams(NAOD.UnitTable.Infantry2[random(getn(NAOD.UnitTable.Infantry2))], max(random(0,4),random(0,3))) 
			spawnForAllTeams(NAOD.UnitTable.Infantry3[random(getn(NAOD.UnitTable.Infantry3))], min(random(0,1),random(0,1))) 
			spawnForAllTeams(NAOD.UnitTable.Vehicle1[random(getn(NAOD.UnitTable.Vehicle1))], max(random(0,7),random(0,7))) 
			spawnForAllTeams(NAOD.UnitTable.Vehicle2[random(getn(NAOD.UnitTable.Vehicle2))], max(random(0,3),random(0,7))) 
			spawnForAllTeams(NAOD.UnitTable.Air1[random(getn(NAOD.UnitTable.Air1))], min(random(0,7),random(0,7))) 
			spawnForAllTeams(NAOD.UnitTable.Air2[random(getn(NAOD.UnitTable.Air2))], min(random(0,4),random(0,4))) 
			spawnForAllTeams(NAOD.UnitTable.Vehicle3[random(getn(NAOD.UnitTable.Vehicle3))], max(random(0,4),random(0,4)))
			spawnForAllTeams(NAOD.UnitTable.Vehicle3[random(getn(NAOD.UnitTable.Vehicle3))], max(random(0,3),random(0,3)))		
			spawnForAllTeams(NAOD.UnitTable.Vehicle4[random(getn(NAOD.UnitTable.Vehicle4))], random(0,1)) 		
		end
		InitialUnitsCount[GlobalTeamTable[1]]=CountAllObjectsOfTeam(GlobalTeamTable[1])
		ExecuteAction("SHOW_MILITARY_CAPTION", "RANDOM_ARMY_GAMEMODE_ACTIVE", 5)
		SetScriptTimer(5,'ExecuteAction("PLAY_SOUND_EFFECT", "Aeva_ReinforcReady")')
		ExecuteAction("MOVIE_PLAY_RADAR", "RANDOMARMYGAMEMODE")
	end
	for i=1,getn(GlobalTeamTable),1 do     
		if not EvaluateCondition("TEAM_HAS_UNITS", GlobalTeamTable[i]) then 
			--ExecuteAction("TEAM_KILL", GlobalTeamTable[i]) 
			ExecuteAction("NAMED_DELETE", GetObj.TableByType(VictoryConditionHelper,GlobalTeamTable[i]))
		end   
	end
    SetCounter("HEALTHCOUNTER", floor(100*CountAllObjectsOfTeam(GlobalTeamTable[1])/InitialUnitsCount[GlobalTeamTable[1]]), "Counter:HEALTH")
end


-- Random_Army_Gamemode          = no
-- Random_Army_Gamemode_Rounds   = 3	


---------------------------------------------------------------------------
-------------------CONTROL POINT GAMEMODE----------------------------------
---------------------------------------------------------------------------
--work in progress

function CaptureControlPointGamemode()
end

function ControlPointGamemodeSetup()
	if CCP_Initialized==0 then 
		CCP_Initialized=1
		ControlPointStringRef=RandomString(3)
		SpawnAtPosition("ControlPointX_OCL",NeutralTeam,MapSize.x/2,MapSize.y/2,0,ControlPointRef)
	end
end

function ControlPointXCreated(self)
    ControlPointTableRef=self
	ObjectHideSubObjectPermanently( self, "TB_CP_ALN", true )
	ObjectHideSubObjectPermanently( self, "TB_CP_GDI", true )
	ObjectHideSubObjectPermanently( self, "TB_CP_NOD", true )
	ObjectHideSubObjectPermanently( self, "LIGHTSF01", true )
	ObjectHideSubObjectPermanently( self, "100", false)
	ObjectHideSubObjectPermanently( self, "75", false)
	ObjectHideSubObjectPermanently( self, "50", false)
	ObjectHideSubObjectPermanently( self, "25", false )
end

function ControlPointEnemyNear(self)
	print("ControlPoint near")
end

function ControlPointEnemyAway(self)
	print("ControlPoint far")
end

function ControlPointCAPTURED()
	print("captured")
end

function ControlPointCAPTURE_100()
	print("captured 100")
end

function ControlPointCAPTURE_75()
	print("captured 75")
end

function ControlPointCAPTURE_50()
	print("captured 50")
end

function ControlPointCAPTURE_25()
	print("captured 25")
end

function ControlPointCAPTURE_0()
	print("captured 0")
end

function ControlPointTest()
	ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Neva_YouHaveFlag", team)	
	ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_FlagCaptured", team)	
	ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Neva_FlagHasBeenTak", team)	
end

---------------------------------------------------------------------------
-------------------METACREDIT SHOP-----------------------------------------
---------------------------------------------------------------------------
MetaStatsTimeCounter=1
MetaStatsLastRank={}
MetaShopMiscTable={}

function EnableMetaCreditShop()
	if MetaCreditShop_Initialized == 0 then
		MetaCreditShop_Initialized=1
		for i=1,getn(HumanPlayerTable),1 do
			spawn("MetaCreditShop",HumanPlayerTable[i],1,"MetaCreditShop_" .. i)
			--ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION", "MetaCreditShop_" .. i, "MetaCreditShop", HumanPlayerTable[i], "((0.00,0.00,0.00))", 0)  
			BuildAnywhereGetMapView(HumanPlayerTable[i])
		end
	end
end

function DisableMetaCreditShop()
	MetaCreditShop_Initialized=0
	for i=1,getn(HumanPlayerTable),1 do
		ExecuteAction("NAMED_KILL","MetaCreditShop_" .. i)
	end
end   

function MetaCreditShopEnableCreditSystem(self)
    --ObjectSetObjectStatus(self)
    HandleSavegame()
	for i=1,getn(HumanPlayerTable),1 do
		MetaStatsLastRank[GetTeamsDescriptiveName(HumanPlayerTable[i])]=SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["RankLevel"]
	end
    EnableOrDisableMetaShopButtons()
    --SetCounter("MetaStatsHighscore" .. GetTeamNumber(self), SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["NAOD_highscore"], "Counter:HIGHSCORE" )  
	SetCounter("MetaStatsXP" .. GetTeamNumber(self), GetMissingXP(GetTeamName(self)),"Counter:XPNEEDED")
    --SetCounter("MetaStatsXP" .. GetTeamNumber(self), SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["XP"], "Counter:XP")
    SetCounter("MetaStatsRankLevel" .. GetTeamNumber(self), SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"], "Counter:RANKLEVEL")  
    SetCounter("MetaCreditCounter" .. GetTeamNumber(self), SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"], "Counter:METACREDITS") 
end

function MetaCreditShopDisableCreditSystem(self)
    HideCounter("MetaStatsHighscore" .. GetTeamNumber(self))
    HideCounter("MetaStatsRankLevel" .. GetTeamNumber(self))
    HideCounter("MetaCreditCounter" .. GetTeamNumber(self))
end

function MetaCreditShopBuildabilityRadiusOn(self,data)
    out("BuildabilityRadiusOn")
	out(data)
    --ExecuteAction("PLAY_SOUND_EFFECT", "Aeva_InsuffCommand")
	--ExecuteAction("MAP_EXIT")
end

function MetaCreditShopBuildabilityRadiusOff(self)
    -- ExecuteAction("PLAY_SOUND_EFFECT", "Aeva_InsufficFunds")
	-- ExecuteAction("MAP_EXIT")
	--ObjectSetObjectStatus(#)
end

function SetObjectTypeButtonState(ObjectType,State)
	if State==1 then 
		ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT",ObjectType,0)
		--ExecuteAction("DISABLE_UI_BUILD_BUTTON",MetaShopButtonTable[entry],0)
		else
		ExecuteAction("TECHTREE_MODIFY_BUILDABILITY_OBJECT",ObjectType,2)
		--ExecuteAction("DISABLE_UI_BUILD_BUTTON",MetaShopButtonTable[entry],1)	
	end
end

function EnableOrDisableMetaShopButtons()  
	if Human_Players_Count<=1 then 
		for i=1,getn(HumanPlayerTable),1 do	
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then
				for entry,price in MetaShopPriceTable do
					if SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["MetaCredits"]<price then SetObjectTypeButtonState(MetaShopButtonTable[entry],0)
					else SetObjectTypeButtonState(MetaShopButtonTable[entry],1) end
				end
			end
			if MetaCreditShop_RankDependency == 1 then 
				for entry,rank in MetaShopRankTable do
					if SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["RankLevel"]<rank then SetObjectTypeButtonState(MetaShopButtonTable[entry],0)
						else 
						SetObjectTypeButtonState(MetaShopButtonTable[entry],1)
						if MetaStatsLastRank[GetTeamsDescriptiveName(HumanPlayerTable[i])]~=SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["RankLevel"] then
							ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM","Aeva_NewTechnoAcqu",HumanPlayerTable[i])		
							MessageWithPlayerDescription("-> new rank gained\n-> new technologies unlocked in MetaCreditShop !",HumanPlayerTable[i])
						end	
						MetaStatsLastRank[GetTeamsDescriptiveName(HumanPlayerTable[i])]=SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["RankLevel"]			  
					end		   
				end
			end
		end
	end
end

function EnableOrDisableMetaShopButtonsSandboxMode()  
	if Human_Players_Count<=1 then 
		for i=1,getn(HumanPlayerTable),1 do	
			for entry,price in MetaShopPriceTable do
				SetObjectTypeButtonState(MetaShopButtonTable[entry],1)
			end
		end
	end
end

function MetaCreditShopSandboxMode()
	MetaCreditShop_CreditDependency = 0 
	MetaCreditShop_RankDependency = 0
	EnableOrDisableMetaShopButtonsSandboxMode()  
	--EnableOrDisableMetaShopButtons()
end

function RefreshMetaStats()
	for i=1,getn(HumanPlayerTable),1 do
		--SetCounter("MetaStatsHighscore".. GetTeamNumber(HumanPlayerTable[i]), SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["NAOD_highscore"], "Counter:HIGHSCORE" )
		--SetCounter("MetaStatsXP" .. GetTeamNumber(HumanPlayerTable[i]), SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["XP"], "Counter:XP")
		SetCounter("MetaStatsXP" .. GetTeamNumber(HumanPlayerTable[i]), GetMissingXP(HumanPlayerTable[i]), "Counter:XPNEEDED")
		SetCounter("MetaStatsRankLevel" .. GetTeamNumber(HumanPlayerTable[i]), SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["RankLevel"], "Counter:RANKLEVEL")  	 
		--SetCounter("MetaStatsNEXTRANKXP" .. GetTeamNumber(HumanPlayerTable[i]), SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["XP"], "Counter:NEXTRANKXP") 	 
		SetCounter("MetaCreditCounter" .. GetTeamNumber(HumanPlayerTable[i]), SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["MetaCredits"], "Counter:METACREDITS") 
	end
end

function SetMetaCredits(credits,team)
	if team==nil then team=AdminTeamName end
	SavegameTable[GetTeamsDescriptiveName(team)]["MetaCredits"]=tonumber(credits)
	ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_FundsTransfer", team)
	MetaShopAdministration()
end

function GiveMetaCredits(team,credits,silent)
	SavegameTable[GetTeamsDescriptiveName(team)]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(team)]["MetaCredits"] + tonumber(credits)
	if silent==nil then ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM","Aeva_FundsTransfer",team) end
	--MetaShopAdministration()
end

function GetNeededXP(rank)
	return ((1+(rank/100))^5)*MetaStatsXPBaseScalar
end

function GetMissingXP(team)
    local teamname = GetTeamsDescriptiveName(team)
	return ceil(GetNeededXP(SavegameTable[teamname]["RankLevel"])-SavegameTable[teamname]["XP"])
end

function MetaStatsHandleRank()
	local rank = 0
	local xp = 0
	local teamname = ""
	for i=1,getn(HumanPlayerTable),1 do	
		teamname = GetTeamsDescriptiveName(HumanPlayerTable[i])
		while(SavegameTable[teamname]["XP"]>=GetNeededXP(SavegameTable[teamname]["RankLevel"])) do 
			rank = SavegameTable[teamname]["RankLevel"]
			xp   = SavegameTable[teamname]["XP"]
			SavegameTable[teamname]["RankLevel"]=rank+1
			SavegameTable[teamname]["XP"]=xp-GetNeededXP(rank)
			GiveMetaCredits(HumanPlayerTable[i],Reward.MC.NewRank(rank))			 
		end
	end
end

function MetaStatsAddXP(team,xp,silent)
	local teamname = GetTeamsDescriptiveName(team)
	--local xptocredits = function(xp_) return floor((xp_*SavegameTable[%teamname]["RankLevel"]*5)/1000) end
	SavegameTable[teamname]["XP"]=SavegameTable[teamname]["XP"]+xp 
	GiveMetaCredits(team,Reward.MC.XPtoMC(xp,SavegameTable[teamname]["RankLevel"]),silent)
	MetaStatsHandleRank()
	MetaShopAdministration()
end

function MetaShopAdministration()
	HandleSavegame()
	RefreshMetaStats()
	EnableOrDisableMetaShopButtons()
end

MetaStatsXPBaseScalar=5000

Reward = {
	Money = {
		NAOD = {
			EachRound = { 
				Base = function() return min(3000,500*NAOD.BaseFormula()) end,
				RoundBased = function() return min(2000*NAOD.BaseFormula()^(0.9),NAOD.MoneyReceiveLimit) end
			}
		}
	},	
	MC = {
		CommonVictory = 14,
		EachXMinutes = 1,
		NewRank = function(rank) return 5*rank end,
		NAOD = {
			EachNewHighscoreRound = 1,
			GameOver = 14,
			EachRound = 1 	
		},
		XPtoMC = function(xp,rank) return floor(xp*1.75/1000) end
	},
	XP = {
		CommonVictory = 10000,
		EachXMinutes = 1000,
		MetaShopItemUse = 1200,
		NAOD = {
			NewHighscoreRounds = 2000,
			GameOver = 5000,
			EachRound = function() return ((1+(NAOD.Wave/100))^5)* 1000 + ((NAOD.TeamObjectCountInitial*5)/getn(NAOD.EnemyTeamTable)) end  --5 xp per killed unit
		},
		UnitVsUnit = { --unused
			Victory = 10000
		},
		RandomArmy = { --unused
			Victory = 10000
		},
		HeroGeneral = { --unused
			Victory = 10000	
		}
	}
}

-----------------MetaShop Items-------------
MetaShopPriceTable={
	["Nuke"]                               =15,
	["RiftGenerator"]                  =15,
	["IonCannon"]                      =15,
	["EMP"]								=4,
	["SuperAvatar"]						=10,
	["ConvertMoney"]					=-5,
	["BaseTemplate"]					=10, 
	["CircleDefense"]                	=12,
	["SpiralDefense"]                	=12,
	["RandomSquareDefense"]          	=12,
	["RandomAntiGroundDefenseBlock"] 	=7,
	["RandomAntiAirDefenseBlock"]	 	=7,
	["AntiVehicleDefStartPoint"]		=0,
	["AntiVehicleDefEndPoint"]			=5,
	["Indestructible"]					=9,
	["InfiniteEnergy"]					=5,
	["SlowDownEnemy"]                   =5,
	["InfiniteProductionSpeed"]	        =5,
	["BuildAnywhere"]					=7,
	["ConvertMCtoDollar"]				=10,
	["RevealMap"]						=3,
	["GetStatistics"]					=4,
	["GuardShieldEmitter"]				=35,
	["BoostSelectedUnit"]				=3,
	["TimetravelFixpoint"]				=1,
	["Timetravel"]						=44,
	["RandomUnitForce7"]			    =5,
	["Bet"]			                    =10
}

MetaShopRankTable={
	["Nuke"]							=10,
	["RiftGenerator"]					=10,
	["IonCannon"]						=10,
	["EMP"]								=5,
	["SuperAvatar"]						=13,
	["ConvertMoney"]					=21,
	["BaseTemplate"]					=14,
	["CircleDefense"]                	=9,
	["SpiralDefense"]                	=9,
	["RandomSquareDefense"]          	=8,
	["RandomAntiGroundDefenseBlock"] 	=7,
	["RandomAntiAirDefenseBlock"]	 	=7,
	["AntiVehicleDefStartPoint"]		=7,
	["AntiVehicleDefEndPoint"]			=7,
	["Indestructible"]					=12,
	["InfiniteEnergy"]					=6,
	["SlowDownEnemy"]                   =2,
	["InfiniteProductionSpeed"]	        =11,
	["BuildAnywhere"]					=8,
	["ConvertMCtoDollar"]				=15,
	["RevealMap"]						=4,
	["GetStatistics"]					=3,
	["GuardShieldEmitter"]				=15,
	["BoostSelectedUnit"]				=1,
	["TimetravelFixpoint"]				=16,
	["Timetravel"]						=16,
	["RandomUnitForce7"]			    =4,
	["Bet"]			                    =0
}

MetaShopButtonTable={
	["Nuke"]="MetaCreditShopNuke",
	["RiftGenerator"]="MetaCreditShopRiftGenerator",
	["IonCannon"]="MetaCreditShopIonCannon",
	["EMP"]="MetaCreditShopEMP",
	["SuperAvatar"]="MetaCreditShopSuperAvatar",
	["ConvertMoney"]="MetaCreditShopConvertMoney",
	["BaseTemplate"]="MetaCreditShopBaseTemplate",
	["CircleDefense"]="MetaCreditShopRandomCircleDefense",
	["SpiralDefense"]="MetaCreditShopRandomSpiralDefense",
	["AntiVehicleDefStartPoint"]="MetaCreditShopAntiVehicleDefStartPoint",
	["AntiVehicleDefEndPoint"]="MetaCreditShopAntiVehicleDefEndPoint",
	["Indestructible"]="MetaCreditShopIndestructible",
	["InfiniteEnergy"]="MetaCreditInfiniteEnergy",
	["InfiniteProductionSpeed"]="MetaCreditShopInfiniteProductionSpeed",
	["SlowDownEnemy"]="MetaCreditShopSlowDownEnemy",
	["BuildAnywhere"]="MetaCreditShopBuildAnywhere",
	["ConvertMCtoDollar"]="MetaCreditShopConvertMCtoDollar",
	["RevealMap"]="MetaCreditShopRevealMap",
	["GetStatistics"]="MetaCreditShopGetStatistics",
	["GuardShieldEmitter"]="MetaCreditShopGuardShieldEmitter",
	["BoostSelectedUnit"]="MetaCreditShopBoostSelectedUnit",
	["TimetravelFixpoint"]="MetaCreditShopTimetravelFixpoint",
	["Timetravel"]="MetaCreditShopTimetravel",
	["RandomUnitForce7"]="MetaCreditShopSpawnRandomUnitForce7",
	["RandomSquareDefense"]="MetaCreditShopRandomSquareDefense",
	["RandomAntiGroundDefenseBlock"]="MetaCreditShopRandomAntiGroundDefenseBlock",
	["RandomAntiAirDefenseBlock"]="MetaCreditShopRandomAntiAirDefenseBlock",
	["Bet"]="MetaCreditShopBet"
}

function MetaCreditShopNuke(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["Nuke"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["Nuke"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["Nuke"]
				MetaShopAdministration()		
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end   
		local FireWeapon = function() FireWeaponOnObject(%self,"NuclearMissile") delete(%self) end
		SetScriptTimerFast(0.01,FireWeapon)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopRiftGenerator(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["RiftGenerator"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["RiftGenerator"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["RiftGenerator"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end   
		local FireWeapon = function() FireWeaponOnObject(%self,"RiftGeneratorWeaponTrigger") delete(%self) end
		SetScriptTimerFast(0.01,FireWeapon)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopIonCannon(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["IonCannon"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["IonCannon"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["IonCannon"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end      
		local FireWeapon = function() FireWeaponOnObject(%self,"IonCannonWeapon") delete(%self) end
		SetScriptTimerFast(0.01,FireWeapon)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopEMP(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["EMP"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["EMP"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["EMP"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end
		local FireWeapon = function() FireWeaponOnObject(%self,"EMPControlCenterWeapon") delete(%self) end
		SetScriptTimerFast(0.01,FireWeapon)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopSlowDownEnemy(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["SlowDownEnemy"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["SlowDownEnemy"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["SlowDownEnemy"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end      	
		local OBJREF = RandomString(5)
		spawn("SlowDownEnemyDummy",GetTeamName(self),1,OBJREF)
		local deletebj = function() delete(%OBJREF) end
		SetScriptTimer(28,deletebj)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopSuperAvatar(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["SuperAvatar"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["SuperAvatar"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["SuperAvatar"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end         
		local Task = function()
			local self = %self
			local position = GetObjectPosition(self)
			local alpha = SpawnAtPosition("NodAvatar",GetTeamName(self),position.x,position.y,0,0,0,0,1,0)
			local BoostAvatar = function()
				local Ref = GetObj.Table(%alpha)
				ObjectHideSubObjectPermanently(Ref,"NUBEAM", false )
				ObjectHideSubObjectPermanently(Ref,"FLAMETANK", false )
				ObjectHideSubObjectPermanently(Ref,"S_DETECTOR", false )
				ObjectHideSubObjectPermanently(Ref,"S_GENERATOR", false )
				ObjectGrantUpgrade(Ref,"Upgrade_AvatarBeamCannon")
				ObjectGrantUpgrade(Ref,"Upgrade_AvatarStealthDetect")
				ObjectGrantUpgrade(Ref,"Upgrade_AvatarFlamer")
				ObjectGrantUpgrade(Ref,"Upgrade_AvatarStealthDetect")
				ObjectGrantUpgrade(Ref,"Upgrade_AvatarInvisibility")
				ObjectGrantUpgrade(Ref,"Upgrade_Veterancy_VETERAN")
				ObjectGrantUpgrade(Ref,"Upgrade_Veterancy_ELITE")
				ObjectGrantUpgrade(Ref,"Upgrade_Veterancy_HEROIC")
				ExecuteAction("UNIT_SET_EXPERIENCE_POINTS",%alpha,50000) 
				delete(%self)
				pop()
			end   
			push(BoostAvatar)   
		end
		SetScriptTimerFast(0.01,Task)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopConvertMoney(self)
	SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["ConvertMoney"]
	delete(self)
	MetaShopAdministration()
end

function MetaCreditShopBaseTemplate(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["BaseTemplate"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if TemplateTable[MetaCreditShopSpawnTemplate] ~= nil then
			local price = MetaShopPriceTable["BaseTemplate"] + getn(TemplateTable[MetaCreditShopSpawnTemplate])  --1 mc per building + (10) mc
			if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=price or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
				local TeamName = GetTeamName(self)
				local Task = function()
					local spawnspeed=0
					if MetaCreditShop_CreditDependency == 1 and %MetaControlCall==nil then 
						MetaStatsAddXP(%TeamName,Reward.XP.MetaShopItemUse)
						SavegameTable[GetTeamsDescriptiveName(%TeamName)]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(%TeamName)]["MetaCredits"] - %price
						MetaShopAdministration() 
					end		 
					SpawnTemplateRelativePosition(TemplateTable[MetaCreditShopSpawnTemplate],%TeamName,MetaShopMiscTable[%TeamName]["x"],MetaShopMiscTable[%TeamName]["y"],1,%TeamName,spawnspeed)
					MetaShopMiscTable[%TeamName] = nil
				end   
				local TaskDenied = function () MetaShopMiscTable[%TeamName] = nil end
				local PrimaryTask = function()
					local position = GetObjectPosition(%self)
					MetaShopMiscTable[%TeamName]={}
					MetaShopMiscTable[%TeamName]["x"]=position.x
					MetaShopMiscTable[%TeamName]["y"]=position.y
					GiveAcceptDenyOptions(%TeamName,%Task,%TaskDenied)
					MessageWithPlayerDescription("template spawn costs you " .. %price .. " MC\naccept?",%TeamName)
					delete(%self)
					--if GetObj.AliveState(%self) then delete(%self) end
				end
				SetScriptTimerFast(0.01,PrimaryTask)
			else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end      
		else delete(self) end
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopRandomCircleDefense(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["CircleDefense"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["CircleDefense"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent") 
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["CircleDefense"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end         
		local Task = function()
			local self = %self
			local position = GetObjectPosition(self)
			local RandDef = function()
				return GDI_Defensive_Structures[random(getn(GDI_Defensive_Structures))]
			end
			CircleLineSpawn(RandDef,GetTeamName(self),position.x,position.y,150,16,0,1)	
			delete(self)
		end
		SetScriptTimerFast(0.01,Task)
		--RandomBaseDefenseCircle(GetTeamName(self))
		--SpawnCircleLineLayers(GDI_Defensive_Structures[1],GetTeamName(self),20,10)
		--CircleLineSpawn("GenericDummyEffect",GetTeamName(self),0,0,100,16,1,0)  
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopRandomSpiralDefense(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["SpiralDefense"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["SpiralDefense"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent") 
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["SpiralDefense"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end         
		local Task = function()
			local self = %self
			local position = GetObjectPosition(self)
			local RandDef = function()
				return GDI_Defensive_Structures[random(getn(GDI_Defensive_Structures))]
			end
			SpiralLineSpawn(RandDef,GetTeamName(self),position.x,position.y,16,0,1)
			delete(self)  
		end   
		SetScriptTimerFast(0.01,Task)
		--RandomBaseDefenseSpiral(GetTeamName(self),50)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopAntiVehicleDefStartPoint(self,MetaControlCall)
	local Task = function()
		MetaShopMiscTable[GetTeamName(%self)]={}
		MetaShopMiscTable[GetTeamName(%self)]["xstart"]=GetObjectPosition(%self).x
		MetaShopMiscTable[GetTeamName(%self)]["ystart"]=GetObjectPosition(%self).y
		delete(%self)   
	end
	SetScriptTimerFast(0.01,Task)	
end

function MetaCreditShopAntiVehicleDefEndPoint(self,MetaControlCall)
	local TeamName = GetTeamName(self)
	if SavegameTable[GetTeamsDescriptiveName(TeamName)]["RankLevel"]>=MetaShopRankTable["AntiVehicleDefEndPoint"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if MetaShopMiscTable[TeamName] == nil then delete(self) return end
		if MetaShopMiscTable[TeamName]["xstart"] == nil then delete(self) return end
		local Task = function()
			if MetaCreditShop_CreditDependency == 1 and %MetaControlCall==nil then 
				MetaStatsAddXP(%TeamName,Reward.XP.MetaShopItemUse)    
				SavegameTable[GetTeamsDescriptiveName(%TeamName)]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(%TeamName)]["MetaCredits"] - MetaShopMiscTable[%TeamName]["deflineprice"]
				MetaShopAdministration()
			end
			MetaShopMiscTable[%TeamName]["deflineprice"]=nil
			local RandGDef = function() return HeavyGroundDefenseStructuresTable[random(getn(HeavyGroundDefenseStructuresTable))] end
			LineSpawn(RandGDef,%TeamName,MetaShopMiscTable[%TeamName]["xstart"],MetaShopMiscTable[%TeamName]["ystart"],MetaShopMiscTable[%TeamName]["xend"],MetaShopMiscTable[%TeamName]["yend"],nil,1)
			MetaShopMiscTable[%TeamName] = nil
		end
		local PrimaryTask = function()
			local xstart=MetaShopMiscTable[GetTeamName(%self)]["xstart"]
			local ystart=MetaShopMiscTable[GetTeamName(%self)]["ystart"]
			local xend=GetObjectPosition(%self).x
			local yend=GetObjectPosition(%self).y
			MetaShopMiscTable[%TeamName]["xend"]=xend
			MetaShopMiscTable[%TeamName]["yend"]=yend
			MetaShopMiscTable[%TeamName]["deflineprice"] = ceil((sqrt((xend-xstart)^2+(yend-ystart)^2)/50)/3.7)  --4 structures ~ 1MC 
			if SavegameTable[GetTeamsDescriptiveName(%TeamName)]["MetaCredits"]>=MetaShopMiscTable[%TeamName]["deflineprice"] or MetaCreditShop_CreditDependency == 0 or %MetaControlCall~=nil then 
				GiveAcceptDenyOptions(%TeamName,%Task)
				MessageWithPlayerDescription("defense line spawn costs you " .. tostring(MetaShopMiscTable[%TeamName]["deflineprice"]) .. " MC\naccept?",%TeamName)
				delete(%self)
			else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(%self)) delete(%self) return end          
		end 
		SetScriptTimerFast(0.01,PrimaryTask)	
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) end
end

function MetaCreditShopIndestructible(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["Indestructible"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["Indestructible"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["Indestructible"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end         
		local TeamName=GetTeamName(self)
		local IndestructibleActivate = function() ToggleTeamIndestructible(%TeamName) end
		IndestructibleActivate()
		SetScriptTimer(30,IndestructibleActivate)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditInfiniteEnergy(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["InfiniteEnergy"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["InfiniteEnergy"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["InfiniteEnergy"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end      
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopInfiniteProductionSpeed(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["InfiniteProductionSpeed"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["InfiniteProductionSpeed"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["InfiniteProductionSpeed"]
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end      
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopBuildAnywhere(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["BuildAnywhere"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["BuildAnywhere"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["BuildAnywhere"]
				MetaShopAdministration()
			end
			BuildAnywhereGetMapView(GetTeamName(self))
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end      
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function BuildAnywhereGetMapView(team)
	ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION",RandomString(5),"GetMapViewDummy",team,"((0.00,0.00,0.00))", 0)
    ExecuteAction("MAP_SHROUD_SET_RESHROUD_TIME", 0) 
	ExecuteAction("MAP_SHROUD_SET_RESHROUD_TIME", Map_Reshroud_Time)
end

function MetaCreditShopConvertMCtoDollar(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["ConvertMCtoDollar"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["ConvertMCtoDollar"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["ConvertMCtoDollar"] 
				MetaShopAdministration()
			end
			GiveMoney(GetTeamName(self),5000)	
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopRevealMap(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["RevealMap"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["RevealMap"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["RevealMap"] 
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end      	
		local ResetMapShroud = function() ExecuteAction("MAP_SHROUD_SET_RESHROUD_TIME", 0) ExecuteAction("MAP_SHROUD_SET_RESHROUD_TIME", Map_Reshroud_Time) end
		SetScriptTimer(10,ResetMapShroud)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopGetStatistics(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["GetStatistics"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["GetStatistics"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["GetStatistics"] 
				MetaShopAdministration() 
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		print(GetStatisticsForAllTeams(self),20) 
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopGuardShieldEmitter(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["GuardShieldEmitter"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["GuardShieldEmitter"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["GuardShieldEmitter"] 
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		local SpawnTask = function() 
			local position = GetObjectPosition(%self)
			SpawnAtPosition("GuardShieldEmitter",GetTeamName(%self),position.x,position.y,0,0,0,0,1,0)
			delete(%self)
		end
		SetScriptTimerFast(0.01,SpawnTask)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopBoostSelectedUnit(self,MetaControlCall)
	local alpha = GetSelectedUnitRef()
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["BoostSelectedUnit"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["BoostSelectedUnit"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if alpha == nil then return end
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["BoostSelectedUnit"] 
				MetaShopAdministration() 
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		ObjectGrantUpgrade(GetObj.Table(alpha),"Upgrade_Veterancy_VETERAN")
		ObjectGrantUpgrade(GetObj.Table(alpha),"Upgrade_Veterancy_ELITE")
		ObjectGrantUpgrade(GetObj.Table(alpha),"Upgrade_Veterancy_HEROIC")
		ExecuteAction("UNIT_SET_EXPERIENCE_POINTS",alpha,50000) 
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopTimetravelFixpoint(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["TimetravelFixpoint"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["TimetravelFixpoint"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["TimetravelFixpoint"] 
				MetaShopAdministration() 
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		TimetravelCreatePastFixpoint()
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopTimetravel(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["Timetravel"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["Timetravel"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["Timetravel"] 
				MetaShopAdministration() 
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		TimetravelToFixpoint()
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopSpawnRandomUnitForce7(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["RandomUnitForce7"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["RandomUnitForce7"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["RandomUnitForce7"] 
				MetaShopAdministration() 
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		local Task = function()
			local position = GetObjectPosition(%self)
			for i=1,7,1 do
				SpawnAtPosition(AllUnitsTypesTable[random(getn(AllUnitsTypesTable))],GetTeamName(%self),position.x+i*3,position.y,0,0,0,0,1,0)
			end
			delete(%self)
		end
		SetScriptTimerFast(0.01,Task)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopRandomSquareDefense(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["RandomSquareDefense"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["RandomSquareDefense"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["RandomSquareDefense"] 
				MetaShopAdministration() 
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		local Task = function()
			local self = %self
			local position = GetObjectPosition(self)
			local RandDef = function()
				return GDI_Defensive_Structures[random(getn(GDI_Defensive_Structures))]
			end
			SquareLineSpawn(RandDef,GetTeamName(self),position.x,position.y,200,nil,1)
			delete(self)  
		end   
		SetScriptTimerFast(0.01,Task)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopRandomAntiGroundDefenseBlock(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["RandomAntiGroundDefenseBlock"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["RandomAntiGroundDefenseBlock"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["RandomAntiGroundDefenseBlock"] 
				MetaShopAdministration() 
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		local Task = function()
			local position = GetObjectPosition(%self)
			local RandGDef = function() return HeavyGroundDefenseStructuresTable[random(getn(HeavyGroundDefenseStructuresTable))] end --SomeDefenseStructuresTable
			DefenseBlockSpawn(RandGDef,GetTeamName(%self),position.x,position.y,3,3,0,1)  
			delete(%self)
		end	
		SetScriptTimerFast(0.01,Task)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopRandomAntiAirDefenseBlock(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["RandomAntiAirDefenseBlock"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["RandomAntiAirDefenseBlock"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["RandomAntiAirDefenseBlock"] 
				MetaShopAdministration()
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		local Task = function()
			local position = GetObjectPosition(%self)
			local RandADef = function() return AirDefenseStructuresTable[random(getn(AirDefenseStructuresTable))] end
			DefenseBlockSpawn(RandADef,GetTeamName(%self),position.x,position.y,3,3,0,1)  
			delete(%self)
		end
		SetScriptTimerFast(0.01,Task)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end

function MetaCreditShopBet(self,MetaControlCall)
	if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["RankLevel"]>=MetaShopRankTable["Bet"] or MetaCreditShop_RankDependency == 0 or MetaControlCall~=nil then
		if SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]>=MetaShopPriceTable["Bet"] or MetaCreditShop_CreditDependency == 0 or MetaControlCall~=nil then
			if MetaCreditShop_CreditDependency == 1 and MetaControlCall==nil then 
				MetaStatsAddXP(GetTeamName(self),Reward.XP.MetaShopItemUse,"silent")  
				SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] - MetaShopPriceTable["Bet"] 
			end
		else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsufficFunds", GetTeamName(self)) delete(self) return end     	
		local MetaCreditRandTable = {}
		local WinArea = random(1,1000)
		local win = 0
		if WinArea <= 600 then      win = random(1,3)
			elseif WinArea <= 800 then  win = random(4,15)
			elseif WinArea <= 970 then win = random(16,30)
			elseif WinArea <= 999 then win = random(31,149) 
			elseif WinArea <= 1000 then win = random(150,300) 
		end
		if win <=149 then print("Player " .. GetTeamsDescriptiveName(GetTeamName(self)) .. " gets " .. win .. " for his bet.")
			else print("Player " .. GetTeamsDescriptiveName(GetTeamName(self)) .. " hit the jackpot and won " .. win .. " , congratulations.")
		end
		SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"]=SavegameTable[GetTeamsDescriptiveName(GetTeamName(self))]["MetaCredits"] + win
		MetaShopAdministration() 
		delete(self)
	else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", "Aeva_InsuffCommand",GetTeamName(self)) delete(self) end
end



---------------------------------------------------------------------------
-------------------NATIVE ART OF DEFENSE SYSTEM----------------------------
---------------------------------------------------------------------------
--victory condition all humanplayer team enemy to naodenemy team need to survive
NAOD={}
NAOD.SpawnFactor = 1
NAOD.AdaptFactor = 1	
NAOD.MemoryTable = {}
NAOD.DifficultyFactor = 1.0

NAOD.Team=CreepsTeam
NAOD.TeamObjectRef = nil
-- NAOD.EnemyTeamOjectRef=nil
NAOD.EnemyTeamTable={}
NAOD.CurrentTeamToAttack=""
NAOD.NextRoundIndicator = 0
NAOD.TeamObjectCount=0
NAOD.RemainingUnitsLimit = 0
NAOD.AttackActionLock=false
NAOD.PeriodTime = 10
NAOD.SpawnWaypoint=""
NAOD.TimerTime = 60
NAOD.Time = 0   
NAOD.Wave = 0
NAOD.TimerStatus=0
NAOD.Distance = 1
NAOD.TempValue=0
NAOD.MapIntegration=0
NAOD.TempTable = {}
NAOD.XpAndMoneyReceived=1
NAOD.TeamObjectCountInitial=0
NAOD.StaticSpawnFactorRounds=0
NAOD.FollowWaypointCommandIssued = false
NAOD.PreAttackActionsIssued = false
NAOD.TeamObjectList={}
NAOD.TeamObjectListRefreshed=false
NAOD.Tower = "METAMOD_TOWERDEFENSE_OBJECT"
NAOD.TowerDistanceForAttackCommand = 650
NAOD.GameOverState = false
NAOD.MoneyReceiveLimit=30000
NAOD.TowerDefenseEnemyStance = "HOLD_POSITION" --"HOLD_FIRE" 
NAOD.AreaRestriction = true
NAOD.AIAlliedTeamTable={}

function NAOD.InitializeNativeArtOfDefense()
	if NativeArtOfDefense_Initialized ~= 1 then
		NativeArtOfDefense_Initialized = 1
		if MetaCreditShop_AlwaysOff~=1 then EnableMetaCreditShop() end
		if NativeArtOfDefense_RoundBased == 0 then 
			SetTimerCounter(max(First_Wave_Delay,Wave_Delay), "Timer:NEXTWAVE", "WaveTimer")  
			else 
			RemoveAllTiberium()
			for z=1,getn(HumanPlayerTable),1 do
				spawn("MetaControlDummyTakeMoney",HumanPlayerTable[z],5)
				spawn("MetaControlDummyNAODRoundBasedHelper",HumanPlayerTable[z],1,"NAODRoundBasedHelper" .. tostring(z))
				GiveMoney(HumanPlayerTable[z],10000)
			end
		end
		SetCounter("CurrentWaveCounter", 0, "Counter:CurrentWave")
		--Diplomacy_System = 0
		if No_Wave_Limit==1 then if SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[1])]["NAOD_highscore"]>3 then Max_Waves=tonumber(SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[1])]["NAOD_highscore"]) else Max_Waves=30 end end
		ExecuteAction("TEAM_AI_TRANSFER",NAOD.Team,1)
		ExecuteAction("TEAM_SET_AI_RECRUITABLE_FLAG",NAOD.Team,1)
		ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 0)
		--ExecuteAction("DISABLE_SCORING")
		if (NAOD.MapIntegration==1 or NAOD.MapIntegration==3) and NAOD.AreaRestriction then  ExecuteAction("HUMAN_IMPASSABLE_AREA", "SiegeGameplayBarrier", 1) end   --"CombatZone"
		for i=1,getn(HumanPlayerTable),1 do
			tinsert(NAOD.EnemyTeamTable,HumanPlayerTable[i])
			for j=1,getn(AIPlayerTable),1 do
				if TeamRelations[HumanPlayerTable[i]][AIPlayerTable[j]]==2 then --GPOT[GlobalTeamTable[i]]["ai"] == 1
					tinsert(NAOD.EnemyTeamTable,AIPlayerTable[j])
					tinsert(NAOD.AIAlliedTeamTable,AIPlayerTable[j])			
					ExecuteAction("TEAM_SET_ATTITUDE",AIPlayerTable[j],Behaviour["Agressive"])		  
					ExecuteAction("TEAM_GUARD_TEAM",AIPlayerTable[j],NAOD.CurrentTeamToAttack)
					else
					ExecuteAction("TEAM_SET_ATTITUDE", GlobalTeamTable[i], Behaviour["Passive"])
					DisableObject(GetBaseRef(AIPlayerTable[j]))
				end
			end
		end
		NAOD.CurrentTeamToAttack=HumanPlayerTable[1]
		if AlliedPlayersNextToEachOther==1 then
			local MainPosition = GetObjectPosition(GetBaseRef(NAOD.EnemyTeamTable[1]))
			local mindist = 70
			local count=1
			for i=1,getn(GlobalTeamTable),1 do
				if TeamRelations[NAOD.EnemyTeamTable[1]][GlobalTeamTable[i]]==2 and GlobalTeamTable[i]~=NAOD.EnemyTeamTable[1] then
					SpawnAtPosition(GetObj.Type(GetBaseRef(GlobalTeamTable[i])),GlobalTeamTable[i],MainPosition.x+(mindist*count),MainPosition.y+(mindist*count),0,"BASE_FLAG" .. "_" .. GlobalTeamTable[i],0,0,1,1)	    
					local DeleteOldBase = function() delete(GetBaseRef(GlobalTeamTable[%i])) pop() end
					push(DeleteOldBase)
					count=count+1
				end
			end
		end
		NAOD.MemoryTable.RoundType={}
		NAOD.MemoryTable.EventType={}
		NAOD.MemoryTable.SpawnFactor={}
		NAOD.MemoryTable.AllTeams={}
		NAOD.MemoryTable.AllTeams.EnemyTeamUnitCount={}
		NAOD.MemoryTable.AllTeams.DefenseStructureCount={}
		NAOD.MemoryTable.AllTeams.StructureCount={}
		NAOD.MemoryTable.AllTeams.VehicleCount={}
		NAOD.MemoryTable.AllTeams.AircraftCount={}
		NAOD.MemoryTable.AllTeams.InfantryCount={}
		NAOD.MemoryTable.AllTeams.VehicleAircraftCount={}
		NAOD.MemoryTable.AllTeams.AllUnitsCount={}
		NAOD.MemoryTable.AllTeams.ThreadLevel={}
		for i=1,getn(NAOD.EnemyTeamTable),1 do
			if GPOT[NAOD.EnemyTeamTable[i]]["ai"] == 0 then
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]]={}
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].DefenseStructureCount={}
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].StructureCount={}
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleCount={}
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AircraftCount={}
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleAircraftCount={}
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].InfantryCount={}
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AllUnitsCount={}
				NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].ThreadLevel={}
			end
		end
		if IsEntryInTable(WaypointTable,"METAMOD_NAOD_SPAWN_WAYPOINT") or EvaluateCondition("COUNTER_COUNTER","METAMOD_NAOD",CompareTable["EQ"],CounterTable[1]) then NAOD.MapIntegration=1
		elseif IsEntryInTable(WaypointTable,"METAMOD_NAOD_SPAWN_WAYPOINT_OPTIONAL") then NAOD.MapIntegration=3 end 
		if GetObj.AliveState("METAMOD_TOWERDEFENSE_OBJECT") or EvaluateCondition("COUNTER_COUNTER","METAMOD_NAOD",CompareTable["EQ"],CounterTable[2]) then NAOD.MapIntegration=2 end
		if IsEntryInTable(WaypointTable,"METAMOD_NAOD_SPAWN_WAYPOINT_OPTIONAL") then
			NAOD.SpawnWaypoint="METAMOD_NAOD_SPAWN_WAYPOINT_OPTIONAL"
			elseif IsEntryInTable(WaypointTable,"METAMOD_NAOD_SPAWN_WAYPOINT") then 
			NAOD.SpawnWaypoint="METAMOD_NAOD_SPAWN_WAYPOINT"
			elseif IsEntryInTable(WaypointTable,"METAMOD_NAOD_WAYPOINT_PATH_START") then
			NAOD.SpawnWaypoint="METAMOD_NAOD_WAYPOINT_PATH_START"
			elseif IsEntryInTable(WaypointTable,"METAMOD_NAOD_WAYPOINT_PATH") then  --backup
			NAOD.SpawnWaypoint="METAMOD_NAOD_WAYPOINT_PATH"
			else 
			NAOD.SpawnWaypoint=GetFarthestWaypoint(NAOD.EnemyTeamTable[1])   --GetFarthestWaypointNotFromAllied GetClosestWaypointNotFromAllied 	    
		end
		if EvaluateCondition("COUNTER_COUNTER","METAMOD_NAOD_WAYPOINT_DISTANCE",CompareTable["GT"],CounterTable[0]) then
			NAOD.Distance=GetCounterValue("METAMOD_NAOD_WAYPOINT_DISTANCE")
			else
			--NAOD.Distance=WaypointDistance[NAOD.SpawnWaypoint][NAOD.EnemyTeamTable[1]]  
		end	  
		if NAOD.MapIntegration==2 then NAOD.Tower = "METAMOD_TOWERDEFENSE_OBJECT"
			elseif NAOD.MapIntegration==4 then NAOD.Tower = "METAMOD_TOWERDEFENSE_OBJECT_OPTIONAL"
		end
		spawn("NAODTeamReferenceDummy",NAOD.Team,1,"CreepsTeamReferenceDummy",NAOD.SpawnWaypoint)
		NAOD.TeamObjectRef=GetObj.Table("CreepsTeamReferenceDummy")
		-- spawn("NAODTeamReferenceDummy",NAOD.EnemyTeamTable[1],1,"NAODEnemyTeamReferenceDummy",NAOD.SpawnWaypoint)
		-- NAOD.EnemyTeamOjectRef=GetObj.Table("NAODEnemyTeamReferenceDummy")
		NAOD.CreatePersonality()
		if NAOD.MapIntegration==2 or NAOD.MapIntegration==4 then ExecuteAction("SHOW_MILITARY_CAPTION", "NATIVE_TOWER_DEFENSE_GAMEMODE_ACTIVE", 5) 
		else ExecuteAction("SHOW_MILITARY_CAPTION", "NATIVE_ART_OF_DEFENSE_GAMEMODE_ACTIVE", 5) end
		ExecuteAction("MOVIE_PLAY_RADAR", "NAODGAMEMODE")
	end	
end

function NAOD.RemoveTeamFromTablesIfDead()
	--tremove(
end

function NAOD.CreatePersonality()
	NAOD.Personality={}
	local CountTypes = { "DefenseStructureCount","StructureCount","VehicleCount","AircraftCount","InfantryCount","VehicleAircraftCount","AllUnitsCount","ThreadLevel" }
	if random(100)>10 then NAOD.Personality.AdaptFocus = "DefenseStructureCount" 
	else NAOD.Personality.AdaptFocus = CountTypes[random(getn(CountTypes))] end
	NAOD.ApplyAttackPrioritySetHandling()
end

function NAOD.EvolvePersonality()
	NAOD.Personality={}
	local CountTypes = { "DefenseStructureCount","VehicleCount","AircraftCount","StructureCount","InfantryCount","VehicleAircraftCount","AllUnitsCount","ThreadLevel" }
	NAOD.Personality.AdaptFocus = NextTableElement(CountTypes,NAOD.Personality.AdaptFocus)
	--NAOD.DynamicAttackPrioritySetHandling()
end

function NAOD.GetNegativeCountChangeMaximumWave(CountTable)
	if getn(CountTable)>1 then 
		local CountChangeTable={}
		CountChangeTable[1]=1
		for i=2,getn(CountTable),1 do
			CountChangeTable[i]=GTZero(CountTable[i])/GTZero(CountTable[i-1])
		end
		return GetIndexOfTableElement(CountChangeTable,GetMinValue(CountChangeTable))
	else return 1 end
end

function NAOD.GetNegativeCountChangeMaximum(CountTable)
	if getn(CountTable)>1 then 
		local CountChangeTable={}
		CountChangeTable[1]=1
		for i=2,getn(CountTable),1 do
			CountChangeTable[i]=GTZero(CountTable[i])/GTZero(CountTable[i-1])
		end
		return GetMinValue(CountChangeTable)
	else return 1 end
end

function NAOD.GetPositiveCountChangeMaximumWave(CountTable)
	if getn(CountTable)>1 then 
		local CountChangeTable={}
		CountChangeTable[1]=1
		for i=2,getn(CountTable),1 do
			CountChangeTable[i]=GTZero(CountTable[i])/GTZero(CountTable[i-1])
		end
		return GetIndexOfTableElement(CountChangeTable,GetMaxValue(CountChangeTable))
	else return 1 end
end

function NAOD.GetLastRoundCountChange(CountTable)
	if getn(CountTable)>1 then return GTZero(CountTable[getn(CountTable)])/GTZero(CountTable[getn(CountTable)-1])
	else return 1 end
end

function NAOD.ApplyAttackPrioritySetHandling()
	local AttackPrioritySet1="AttackPrioritySet1"
	local Priority=10
	ExecuteAction("SET_ATTACK_PRIORITY_THING",AttackPrioritySet1,"FarAttackerUnitList",10)
	ExecuteAction("SET_ATTACK_PRIORITY_KIND_OF",AttackPrioritySet1,"FS_BASE_DEFENSE",8)
	ExecuteAction("SET_DEFAULT_ATTACK_PRIORITY",AttackPrioritySet1,Priority)
	ExecuteAction("TEAM_APPLY_ATTACK_PRIORITY_SET",NAOD.TEAM,AttackPrioritySet1)
end   

function NAOD.DynamicAttackPrioritySetHandling()
end 

function NAOD.AdaptiveIntelligenceCore()
	--NAOD.MemoryTable.RoundType[NAOD.Wave]=NAOD.CurrentRoundType
    tinsert(NAOD.MemoryTable.RoundType,NAOD.CurrentRoundType)
	tinsert(NAOD.MemoryTable.SpawnFactor,NAOD.SpawnFactor)
	tinsert(NAOD.MemoryTable.AllTeams.EnemyTeamUnitCount,ObjectCountNearbyEnemies(NAOD.TeamObjectRef,13000)) 
	tinsert(NAOD.MemoryTable.AllTeams.DefenseStructureCount,0)
	tinsert(NAOD.MemoryTable.AllTeams.StructureCount,0)
	tinsert(NAOD.MemoryTable.AllTeams.VehicleCount,0)
	tinsert(NAOD.MemoryTable.AllTeams.AircraftCount,0)
	tinsert(NAOD.MemoryTable.AllTeams.InfantryCount,0)
	tinsert(NAOD.MemoryTable.AllTeams.VehicleAircraftCount,0)
	tinsert(NAOD.MemoryTable.AllTeams.AllUnitsCount,0)  
	tinsert(NAOD.MemoryTable.AllTeams.ThreadLevel,0)	
    for i=1,getn(NAOD.EnemyTeamTable),1 do
		if GPOT[NAOD.EnemyTeamTable[i]]["ai"]==0 then
			tinsert(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].DefenseStructureCount,CountTeamsKindOf((NAOD.EnemyTeamTable[i]),"FS_BASE_DEFENSE"))
			tinsert(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].StructureCount,CountTeamsKindOf((NAOD.EnemyTeamTable[i]),"STRUCTURE") - NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].DefenseStructureCount[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].DefenseStructureCount)])
			tinsert(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleCount,CountTeamsKindOf((NAOD.EnemyTeamTable[i]),"VEHICLE"))
			tinsert(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AircraftCount,CountTeamsKindOf((NAOD.EnemyTeamTable[i]),"AIRCRAFT"))
			tinsert(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].InfantryCount,CountTeamsKindOf((NAOD.EnemyTeamTable[i]),"INFANTRY"))
			tinsert(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleAircraftCount, GetLastTableElement(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleCount) + GetLastTableElement(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AircraftCount))
			tinsert(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AllUnitsCount,( GetLastTableElement(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleCount) + GetLastTableElement(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AircraftCount) + GetLastTableElement(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].InfantryCount) ) )
			tinsert(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].ThreadLevel,GetTeamThreadLevel((NAOD.EnemyTeamTable[i])))
			NAOD.MemoryTable.AllTeams.DefenseStructureCount[getn(NAOD.MemoryTable.AllTeams.DefenseStructureCount)]=NAOD.MemoryTable.AllTeams.DefenseStructureCount[getn(NAOD.MemoryTable.AllTeams.DefenseStructureCount)]+NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].DefenseStructureCount[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].DefenseStructureCount)]
			NAOD.MemoryTable.AllTeams.StructureCount[getn(NAOD.MemoryTable.AllTeams.StructureCount)]=NAOD.MemoryTable.AllTeams.StructureCount[getn(NAOD.MemoryTable.AllTeams.StructureCount)]+NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].StructureCount[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].StructureCount)]
			NAOD.MemoryTable.AllTeams.VehicleCount[getn(NAOD.MemoryTable.AllTeams.VehicleCount)]=NAOD.MemoryTable.AllTeams.VehicleCount[getn(NAOD.MemoryTable.AllTeams.VehicleCount)]+NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleCount[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleCount)]
			NAOD.MemoryTable.AllTeams.AircraftCount[getn(NAOD.MemoryTable.AllTeams.AircraftCount)]=NAOD.MemoryTable.AllTeams.AircraftCount[getn(NAOD.MemoryTable.AllTeams.AircraftCount)]+NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AircraftCount[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AircraftCount)]
			NAOD.MemoryTable.AllTeams.InfantryCount[getn(NAOD.MemoryTable.AllTeams.InfantryCount)]=NAOD.MemoryTable.AllTeams.InfantryCount[getn(NAOD.MemoryTable.AllTeams.InfantryCount)]+NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].InfantryCount[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].InfantryCount)]
			NAOD.MemoryTable.AllTeams.VehicleAircraftCount[getn(NAOD.MemoryTable.AllTeams.VehicleAircraftCount)]=NAOD.MemoryTable.AllTeams.VehicleAircraftCount[getn(NAOD.MemoryTable.AllTeams.VehicleAircraftCount)]+NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleAircraftCount[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].VehicleAircraftCount)]
			NAOD.MemoryTable.AllTeams.AllUnitsCount[getn(NAOD.MemoryTable.AllTeams.AllUnitsCount)]=NAOD.MemoryTable.AllTeams.AllUnitsCount[getn(NAOD.MemoryTable.AllTeams.AllUnitsCount)]+NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AllUnitsCount[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].AllUnitsCount)]
			NAOD.MemoryTable.AllTeams.ThreadLevel[getn(NAOD.MemoryTable.AllTeams.ThreadLevel)]=NAOD.MemoryTable.AllTeams.ThreadLevel[getn(NAOD.MemoryTable.AllTeams.ThreadLevel)]+NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].ThreadLevel[getn(NAOD.MemoryTable[NAOD.EnemyTeamTable[i]].ThreadLevel)]
		end
	end  
	if NAOD.Wave > 7 then if NAOD.GetNegativeCountChangeMaximum(NAOD.MemoryTable.AllTeams[NAOD.Personality.AdaptFocus]) > 0.9 then NAOD.EvolvePersonality() end end
	if mod(NAOD.Wave,14)==0 and NAOD.GetNegativeCountChangeMaximum(NAOD.MemoryTable.AllTeams[NAOD.Personality.AdaptFocus]) > 0.97 then NAOD.SpawnFormula=NAOD.SpawnFormulaBrutal end
	if NAOD.Wave>Max_Waves and NAOD.GetNegativeCountChangeMaximum(NAOD.MemoryTable.AllTeams[NAOD.Personality.AdaptFocus]) > 0.80 then NAOD.SpawnFormula=NAOD.SpawnFormulaMain2 end
	if NAOD.Wave > 2 then NAOD.AdaptFactor = NAOD.GetLastRoundCountChange(NAOD.MemoryTable.AllTeams.DefenseStructureCount)*(0.5) + NAOD.GetLastRoundCountChange(NAOD.MemoryTable.AllTeams.VehicleAircraftCount)*(0.4) + NAOD.GetLastRoundCountChange(NAOD.MemoryTable.AllTeams.InfantryCount)*(0.1) end
    if NAOD.Wave > 1 and NAOD.StaticSpawnFactorRounds<=0 then 
		if NAOD.AdaptFactor>0.75 and NAOD.AdaptFactor<0.85 then NAOD.StaticSpawnFactorRounds=random(2,3) NAOD.SpawnFactor=NAOD.MemoryTable.SpawnFactor[getn(NAOD.MemoryTable.SpawnFactor)] --NAOD.SpawnFormula=NAOD.SpawnFormula2
			else if NAOD.AdaptFactor>0 then NAOD.SpawnFactor = round(NAOD.SpawnFormula(NAOD.AdaptFactor)) else NAOD.SpawnFactor = round(NAOD.SpawnFormula(1)) end 
		end	  
		else NAOD.StaticSpawnFactorRounds=NAOD.StaticSpawnFactorRounds-1
	end
	--out("WAVE:" .. NAOD.Wave .. " AdaptFactor:" .. NAOD.AdaptFactor .. " SpawnFactor:" .. NAOD.SpawnFactor .. " LastRoundType:" .. NAOD.CurrentRoundType .. " PersonalityFocus:" .. NAOD.Personality.AdaptFocus)
end

function NAOD.WaveTimeDifficultyFactor() if NativeArtOfDefense_RoundBased==1 then return NAOD.Wave*NAOD.DifficultyFactor else return (NAOD.Time/180)*NAOD.DifficultyFactor end end
function NAOD.BaseFormula() return (Max_Waves/(1+1*exp(-((1/(Max_Waves/7))*(NAOD.WaveTimeDifficultyFactor()-(Max_Waves/2)))))) end	 --logistic growth
function NAOD.BaseFormula2() return 1+(16*log(NAOD.WaveTimeDifficultyFactor()/2)) end	 --logarithmic growth
function NAOD.SpawnFormulaMain(AdaptFactor) if NAOD.Wave<8 then if AdaptFactor<1 then return NAOD.BaseFormula()*AdaptFactor*(random(98,102)/100) else return NAOD.BaseFormula()*(random(98,102)/100) end else return NAOD.BaseFormula()*AdaptFactor*(random(98,102)/100) end end
function NAOD.SpawnFormulaMain2(AdaptFactor) if NAOD.Wave<8 then if AdaptFactor<1 then return NAOD.BaseFormula2()*AdaptFactor*(random(98,102)/100) else return NAOD.BaseFormula2()*(random(98,102)/100) end else return NAOD.BaseFormula2()*AdaptFactor*(random(98,102)/100) end end
function NAOD.SpawnFormulaBrutal(AdaptFactor) return NAOD.BaseFormula()*ceil(AdaptFactor )*1.2 end

function NAOD.SpawnFormulaLin1(AdaptFactor) return (NAOD.SpawnFactor+1) * AdaptFactor * (random(85,115)/100) end 
function NAOD.SpawnFormulaLin2(AdaptFactor) return (NAOD.SpawnFactor+1) * AdaptFactor * (random(98,102)/100) end   
function NAOD.SpawnFormulaLin3(AdaptFactor) return (1 + (NAOD.Wave/3) + (NAOD.Time/210) + (NAOD.Wave/Max_Waves)*0.8) * AdaptFactor * (random(98,102)/100) end 
function NAOD.SpawnFormulaExtra1(AdaptFactor) return (1 + NAOD.Wave + NAOD.Time/210 + (NAOD.Wave/Max_Waves)*1.5^(round(NAOD.Wave/14))) * AdaptFactor * (random(98,102)/100) end
function NAOD.SpawnFormulaDynamic(AdaptFactor) return (NAOD.SpawnFactor+random(2,3)) * AdaptFactor * (random(85,115)/100) end  
function NAOD.SpawnFormulaLGG(AdaptFactor) return (50/(1+1*e^(-0.05*(NAOD.Wave-40))))*AdaptFactor end  

NAOD.SpawnFormulaTable = { NAOD.SpawnFormulaMain,NAOD.SpawnFormulaMain2,NAOD.SpawnFormulaLin1,NAOD.SpawnFormulaLin2,NAOD.SpawnFormulaLin3,NAOD.SpawnFormulaExtra1,NAOD.SpawnFormulaDynamic,NAOD.SpawnFormulaLGG }

NAOD.SpawnFormula = NAOD.SpawnFormulaMain

NAOD.Scalar={}
NAOD.Scalar.Infantry1										= 3.0
NAOD.Scalar.Vehicle1										= 2.15
NAOD.Scalar.Infantry2										= 2.0
NAOD.Scalar.Vehicle2										= 2.0
NAOD.Scalar.Air1												= 2.0
NAOD.Scalar.Infantry3										= 0.2 
NAOD.Scalar.Vehicle3										= 2.0
NAOD.Scalar.Air2												= 2.0
NAOD.Scalar.Vehicle4										= 0.2
NAOD.Scalar.StormriderSwarm							= 5.5
NAOD.Scalar.FanaticSquadSwarm						= 7.0
NAOD.Scalar.LowHealthAvatarSwarm					= 8.0
NAOD.Scalar.BoostedAvatarsSwarm					= 0.35
NAOD.Scalar.AlienCustomizableVehicleSwarm		= 5.0
NAOD.Scalar.RandomUnitCategorySwarm			= 2.0
NAOD.Scalar.HammerheadZoneRaiderSwarm		= 5.0
--NAOD.Scalar.Endboss                     = 0.1
NAOD.Scalar.Tier1				= 3.0
NAOD.Scalar.Tier2				= 2.1
NAOD.Scalar.Tier3				= 2.0
NAOD.Scalar.Tier4				= 0.2
NAOD.Scalar.AntiAir				= 3.0
NAOD.Scalar.AntiInfantry		= 3.0
NAOD.Scalar.Distance			= 3.0

--unused MoneyDistribution (now in reward table)
function NAOD.MonetaryDistribution() return min(3000,500*NAOD.BaseFormula()) end   --for round based mode
function NAOD.MonetaryDistributionBase() return min(2000*NAOD.BaseFormula()^(0.9),NAOD.MoneyReceiveLimit) end        --for both, timed and round based modes

NAOD.UnitTableCategories = {"Infantry1","Infantry2","Infantry3","Vehicle1","Vehicle2","Vehicle3","Vehicle4","Air1","Air2","AntiAir","AntiInfantry","Distance"}
NAOD.UnitTable = {}
NAOD.UnitTable.Infantry1 = { "GDIRifleSoldierSquad", "GDIMissileSoldierSquad", "NODMilitantSquad", "NODMilitantRocketSquad", "BlackHandConfessorSquad", "AlienBuzzers", "AlienRazorDroneSquad" } 
NAOD.UnitTable.Infantry2 = { "AlienShockTrooperSquad", "Traveler59Stalker", "BlackHandBlackHandSquad", "NODShadowSquad", "NodFanaticSquad","ZOCOMZoneRaiderSquad", "GDIZoneTrooperSquad","GDIGrenadeSoldierSquad","MarkedOfKaneImprovedCyborgInfantrySquad" }  --"GDISniperSquad","Traveler59Cultist"
NAOD.UnitTable.Infantry3 = { "AlienMastermind", "NODCommando", "GDICommando" }
NAOD.UnitTable.Vehicle1  = { "NODAttackBike", "AlienCustomizableVehicle","NODScorpionBuggy", "SteelTalonsWolverine", "GDIPitbull", "SteelTalonsAPC", "NODRaiderTank", "AlienGunWalker", "Reaper17ShardWalker","AlienSeekerTank" }
NAOD.UnitTable.Vehicle2  = { "MarkedOfKaneBeamCannon", "BlackHandFlameTank", "NODStealthTank", "BlackHandMobileArtillery","GDIPredator", "SteelTalonsTitan", "AlienDevourerTank", "AlienCorrupter","ZOCOMImprovedSonicTank" } 
NAOD.UnitTable.Vehicle3  = { "NODAvatar", "BlackHandCustomWarmech","Reaper17AnnihilatorTripod","SteelTalonsMammoth","GDIJuggernaught","SteelTalonsBehemoth" }
NAOD.UnitTable.Vehicle4  = { "NodMetaUnit", "SteelTalonsMARV", "AlienEradicatorHexapod","AlienMothership" }
NAOD.UnitTable.Air1      = { "MarkedOfKaneVenom", "ZOCOMHammerhead", "Traveler59Stormrider", "GDIFireHawk","GDIOrca","NODVertigo" }
NAOD.UnitTable.Air2      = { "Traveler59DevastatorWarship", "Traveler59PlanetaryAssaultCarrier" }
NAOD.UnitTable.AntiAir   = { "SteelTalonsAAScout","NODStealthTank","AlienSeekerTank" }
NAOD.UnitTable.AntiInfantry = { "SteelTalonsWolverine", "NODScorpionBuggy" }
NAOD.UnitTable.Distance  = { "BlackHandMobileArtillery","GDIJuggernaught","SteelTalonsBehemoth", "Traveler59DevastatorWarship"}
NAOD.UnitTable.Engineers = { "AlienAssimilator","GDIEngineer","NODSaboteur" } 
NAOD.UnitTable.Misc      = { "GDIRig","SteelTalonsRepairAPC" } 

--TW-PORT overwritings
function TWPort_NAODUnits()
	NAOD.UnitTableCategories = {"Infantry1","Infantry2","Infantry3","Vehicle1","Vehicle2","Vehicle3","Vehicle4","Air1","Air2","AntiAir","AntiInfantry","Distance"}
	NAOD.UnitTable = {}
	NAOD.UnitTable.Infantry1 = { "GDIRifleSoldierSquad", "GDIMissileSoldierSquad", "NODMilitantSquad", "NODMilitantRocketSquad", "AlienBuzzers", "AlienRazorDroneSquad" } 
	NAOD.UnitTable.Infantry2 = { "AlienAssimilator","AlienShockTrooperSquad", "NODBlackHandSquad", "NODShadowSquad", "NodFanaticSquad", "GDIZoneTrooperSquad","GDIGrenadeSoldierSquad" }  --"GDISniperSquad","Traveler59Cultist"
	NAOD.UnitTable.Infantry3 = { "AlienMastermind", "NODCommando", "GDICommando" }
	NAOD.UnitTable.Vehicle1  = { "NODAttackBike", "NODScorpionBuggy", "GDIPitbull", "NODRaiderTank", "AlienGunWalker", "AlienSeekerTank", "GDIAPC" }
	NAOD.UnitTable.Vehicle2  = { "NODStealthTank", "GDIPredator", "AlienDevourerTank", "AlienCorrupter" } 
	NAOD.UnitTable.Vehicle3  = { "NODAvatar","AlienAnnihilatorTripod","GDIMammoth","GDIJuggernaught" }
	NAOD.UnitTable.Vehicle4  = { "AlienMothership" } 
	NAOD.UnitTable.Air1      = { "NODVenom", "GDIV35Ox", "Traveler59Stormrider","GDIOrca", "AlienStormrider" }
	NAOD.UnitTable.Air2      = { "AlienDevastatorWarship","AlienPlanetaryAssaultCarrier", "GDIFireHawk", "NODVertigo"}
	NAOD.UnitTable.AntiAir   = { "GDIPitbull","NODStealthTank","AlienSeekerTank" }
	NAOD.UnitTable.AntiInfantry = { "GDIAPC", "NODScorpionBuggy" }
	NAOD.UnitTable.Distance  = { "NODBeamCannon","GDIJuggernaught","AlienDevastatorWarship"}
	NAOD.UnitTable.Engineers = { "AlienAssimilator","GDIEngineer","NODSaboteur" } 
	NAOD.UnitTable.Misc      = { "GDIRig" } 
end

function NAOD.GetActionOnObjectTable(...)
	local ActionsOnObject={}
	local ind = 1
	if type(arg[1])=="table" then ActionsOnObject=arg[1] ind=2
	elseif arg[1]==nil then ind=2 end
	for i=ind,getn(arg),1 do if arg[i]~=nil then tinsert(ActionsOnObject,arg[i]) end end
	return ActionsOnObject
end

function NAOD.StandardUnitAttributes(object)
	ExecuteAction("UNIT_ENABLE_HOUSE_COLOR",object,0)
	ExecuteAction("NAMED_CUSTOM_COLOR",object,UnitColorTable.white)
	if not NAOD.MapIntegration==2 and not NAOD.MapIntegration==4 then ExecuteAction("UNIT_SET_STANCE", object, STANCE_TYPE["AGGRESSIVE"]) 
	else ExecuteAction("UNIT_SET_STANCE", object, STANCE_TYPE[NAOD.TowerDefenseEnemyStance]) end
	--ExecuteAction("NAMED_SET_STEALTH_ENABLED",object,0)
	--ExecuteAction("NAMED_SET_SPECIAL_WEAPONSET",object,1)  
	--ExecuteAction("UNIT_SET_FLAME_STATUS",object,1)
end

function NAOD.VariabelAttributesBoost(object,boostlevel) --unused
	NAOD.StandardUnitAttributes(object)
 	ExecuteAction("UNIT_SET_EXPERIENCE_POINTS", object,boostlevel*1000)
	ExecuteAction("UNIT_SET_HEALTH", object,100)
	ExecuteAction("NAMED_FLASH_WHITE", object, 5)
	ExecuteAction("UNIT_CHANGE_OBJECT_STATUS",GetObj.Table(object),"UNATTACKABLE",1)
	ExecuteAction("UNIT_GIVE_EXPERIENCE_LEVEL",object,GetObj.Type(object) .. "ExperienceLevel_" .. 4)
	ObjectSetObjectStatus(GetObj.Table(object),"UNATTACKABLE")
	ExecuteAction("UNIT_AFFECT_OBJECT_PANEL_FLAGS", object, "Indestructible", 1)
end

function NAOD.BoostAvatar(object)
    object=GetObj.Table(object)
	ObjectHideSubObjectPermanently(object,"NUBEAM", false )
	ObjectHideSubObjectPermanently(object,"FLAMETANK", false )
	ObjectHideSubObjectPermanently(object,"S_DETECTOR", false )
	ObjectHideSubObjectPermanently(object,"S_GENERATOR", false )
	ObjectGrantUpgrade(object,"Upgrade_AvatarBeamCannon")
	ObjectGrantUpgrade(object,"Upgrade_AvatarStealthDetect")
	ObjectGrantUpgrade(object,"Upgrade_AvatarFlamer")
	ObjectGrantUpgrade(object,"Upgrade_AvatarStealthDetect")
	ObjectGrantUpgrade(object,"Upgrade_AvatarInvisibility")
	ObjectGrantUpgrade(object,"Upgrade_Veterancy_VETERAN")
	ObjectGrantUpgrade(object,"Upgrade_Veterancy_ELITE")
	ObjectGrantUpgrade(object,"Upgrade_Veterancy_HEROIC")
	ExecuteAction("UNIT_SET_EXPERIENCE_POINTS",object,50000)  
	ExecuteAction("UNIT_SET_HEALTH",object,100)
end

function NAOD.AlienCustomizableVehicleSetModules(object)
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER",object,"SpecialPower_MechapedeAddShardModule")
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER",object,"SpecialPower_MechapedeAddShardModule")
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER",object,"SpecialPower_MechapedeAddDiskModule")
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER",object,"SpecialPower_MechapedeAddDiskModule")
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER",object,"SpecialPower_MechapedeAddRazorModule")
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER",object,"SpecialPower_MechapedeAddRazorModule")
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER",object,"SpecialPower_MechapedeAddTioxinModule")
	ExecuteAction("NAMED_FIRE_SPECIAL_POWER",object,"SpecialPower_MechapedeAddTioxinModule")
end

function NAOD.Veterancy0(object) ExecuteAction("UNIT_GIVE_EXPERIENCE_LEVEL",object,GetObj.Type(object) .. "ExperienceLevel_" .. 1) end
function NAOD.Veterancy1(object) ExecuteAction("UNIT_GIVE_EXPERIENCE_LEVEL",object,GetObj.Type(object) .. "ExperienceLevel_" .. 2) end
function NAOD.Veterancy2(object) ExecuteAction("UNIT_GIVE_EXPERIENCE_LEVEL",object,GetObj.Type(object) .. "ExperienceLevel_" .. 3) end
function NAOD.Veterancy3(object) ExecuteAction("UNIT_GIVE_EXPERIENCE_LEVEL",object,GetObj.Type(object) .. "ExperienceLevel_" .. 4) ExecuteAction("UNIT_SET_EXPERIENCE_POINTS",object,50000)  end
function NAOD.AttributesBoosted1(object) ObjectCreateAndFireTempWeapon(GetObj.Table(object),"AttributeBoost1Weapon") end --spawn("AttributeBooster1Dummy",NAOD.Team)
function NAOD.AttributesBoosted2(object) ObjectCreateAndFireTempWeapon(GetObj.Table(object),"AttributeBoost2Weapon") end
function NAOD.AttributesBoosted3(object) ObjectCreateAndFireTempWeapon(GetObj.Table(object),"AttributeBoost3Weapon") end
function NAOD.AttributesBoosted4(object) ObjectCreateAndFireTempWeapon(GetObj.Table(object),"AttributeBoost4Weapon") end
function NAOD.SetRandomObjectColor(object) ExecuteAction("NAMED_CUSTOM_COLOR",object,UnitColorTable[UnitColors[random(getn(UnitColors))]]) end
function NAOD.LowHealth(object) ExecuteAction("UNIT_SET_HEALTH",object,10) end
function NAOD.EndbossBoost1(object) ObjectCreateAndFireTempWeapon(GetObj.Table(object),"EndbossBoostWeapon1") end
function NAOD.SpeedBoost1(object) ObjectCreateAndFireTempWeapon(GetObj.Table(object),"SpeedBoostWeapon1") end

function NAOD.StormriderSwarm(number,ActionsOnObject) spawn("Traveler59Stormrider", NAOD.Team, ceil(number*NAOD.Scalar.StormriderSwarm), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes), nil) end 
function NAOD.FanaticSquadSwarm(number,ActionsOnObject) spawn("NodFanaticSquad", NAOD.Team, ceil(number*NAOD.Scalar.FanaticSquadSwarm), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes), nil) end
function NAOD.LowHealthAvatarSwarm(number,ActionsOnObject) spawn("BlackHandCustomWarmech", NAOD.Team, ceil(number*NAOD.Scalar.LowHealthAvatarSwarm), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes,NAOD.LowHealth), nil) end
function NAOD.BoostedAvatarsSwarm(number,ActionsOnObject) spawn("NODAvatar", NAOD.Team, ceil(number*NAOD.Scalar.BoostedAvatarsSwarm), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes,NAOD.BoostAvatar), nil) end
function NAOD.AlienCustomizableVehicleSwarm(number,ActionsOnObject) spawn("AlienCustomizableVehicle", NAOD.Team, ceil(number*NAOD.Scalar.AlienCustomizableVehicleSwarm), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes,NAOD.AlienCustomizableVehicleSetModules), nil) end
function NAOD.RandomUnitTypeSwarm(number,ActionsOnObject) 
	local TierType = random(1,4)
	local UnitTableTier1 = { "Infantry1","Vehicle1" }
	local UnitTableTier2 = { "Infantry2","Vehicle2","Air1" }
	local UnitTableTier3 = { "Infantry3","Vehicle3","Air2" }
	local UnitTableTier4 = { "Vehicle4" }
	if TierType==1 then spawn(NAOD.UnitTable[UnitTableTier1[random(getn(UnitTableTier1))]][random(getn(NAOD.UnitTable[UnitTableTier1[random(getn(UnitTableTier1))]]))], NAOD.Team, ceil(number*NAOD.Scalar.Tier1), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes), nil)
		elseif TierType==2 then spawn(NAOD.UnitTable[UnitTableTier2[random(getn(UnitTableTier2))]][random(getn(NAOD.UnitTable[UnitTableTier2[random(getn(UnitTableTier2))]]))], NAOD.Team, ceil(number*NAOD.Scalar.Tier2), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes), nil)
		elseif TierType==3 then spawn(NAOD.UnitTable[UnitTableTier3[random(getn(UnitTableTier3))]][random(getn(NAOD.UnitTable[UnitTableTier3[random(getn(UnitTableTier3))]]))], NAOD.Team, ceil(number*NAOD.Scalar.Tier3), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes), nil)
		elseif TierType==4 then spawn(NAOD.UnitTable[UnitTableTier4[random(getn(UnitTableTier4))]][random(getn(NAOD.UnitTable[UnitTableTier4[random(getn(UnitTableTier4))]]))], NAOD.Team, ceil(number*NAOD.Scalar.Tier4), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes), nil)   
	end
end
function NAOD.RandomUnitCategorySwarm(number,ActionsOnObject) 
	local Category = NAOD.UnitTableCategories[random(getn(NAOD.UnitTableCategories))]
	for i=1,ceil(number*NAOD.Scalar[Category]),1 do
		spawn(NAOD.UnitTable[Category][random(getn(NAOD.UnitTable[Category]))], NAOD.Team, 1, nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes), nil)
	end 
end
function NAOD.HammerheadZoneRaiderSwarm(number,ActionsOnObject)  --placeholder cause of stack overflow error
	NAOD.AttackActionLock=true
	local UnlockAttackActions = function() NAOD.AttackActionLock=false end
	local ZoneRaiderSpawnAndEnterVehicle = function(object) 
		local EnterVehicle = function(passenger) SetScriptTimer(2,'ExecuteAction("NAMED_ENTER_NAMED","' .. passenger .. '","' .. %object .. '")') end
		--local ActionsOnZoneRaiderSquad = function(passenger)  if type(ActionOnObject)=="function" then ActionOnObject(passenger) elseif type(ActionOnObject)=="table" then for i=1,getn(ActionOnObject),1 do ActionOnObject[i](passenger) end end end
		spawn("ZOCOMZoneRaiderSquad", NAOD.Team, 1, nil, NAOD.SpawnWaypoint, EnterVehicle, nil) 
		--spawn("ZOCOMZoneRaiderSquad", NAOD.Team, 1, nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(%ActionsOnObject,NAOD.StandardUnitAttributes,EnterVehicle), nil) 
	end
	spawn("ZOCOMHammerhead", NAOD.Team, ceil(number*NAOD.Scalar.HammerheadZoneRaiderSwarm), nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes,ZoneRaiderSpawnAndEnterVehicle), nil)
    SetScriptTimer(15,UnlockAttackActions)
	SetScriptTimer(16,NAOD.AttackActions)
end
function NAOD.Endboss(number,ActionsOnObject)
	if random(100)>18 then spawn(NAOD.UnitTable.Vehicle4[random(getn(NAOD.UnitTable.Vehicle4))], NAOD.Team, number, nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes,NAOD.EndbossBoost1,NAOD.Veterancy3), nil)
	else spawn(NAOD.UnitTable.Vehicle4[random(getn(NAOD.UnitTable.Vehicle4))], NAOD.Team, number, nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes,NAOD.EndbossBoost1,NAOD.Veterancy3), nil) end
end
function NAOD.DefenseStructureAmbush()
	local RandomFocus = {"DefenseStructureList","FarAttackerUnitList"}
	local x,y = GetCoordinateCenterOfObjectTypeGroup(AdminTeamName,RandomFocus[random(getn(RandomFocus))])
	if x==0 or y==0 then NAOD.StandardSpawner() return
		else
		local RandGDef = function() return HeavyGroundDefenseStructuresTable[random(getn(HeavyGroundDefenseStructuresTable))] end
		LineSpawn(RandGDef,NAOD.Team,x-50,y-50,x+50,y+50,nil,1)
	end
end
function NAOD.UnitAmbush() 
	NAOD.AmbushDestObjRef="NAOD_Ambush_DestRef"
	local RandomFocus = {"DefenseStructureList","FarAttackerUnitList"}
	local ObjectTypeToSpawnOn = GenericDummyStay
	local x,y = GetCoordinateCenterOfObjectTypeGroup(AdminTeamName,RandomFocus[random(getn(RandomFocus))])
	local DeleteDestObjRef = function() delete(NAOD.AmbushDestObjRef) pop() end
	--print("coord" .. x .. " " .. y)
	if x==0 or y==0 then NAOD.StandardSpawner() return
		else
		DeleteAllObjectsWithRef("NAOD_Ambush_DestRef")
		SpawnAtPosition(ObjectTypeToSpawnOn,AdminTeamName,x,y,nil,NAOD.AmbushDestObjRef)
		local SpawnAmbush = function() 
			local RandUnit = function() local UnitCategory=ReturnRandomArgument("Vehicle1","Infantry1") return NAOD.UnitTable[UnitCategory][random(getn(NAOD.UnitTable[UnitCategory]))] end
			spawn(RandUnit, NAOD.Team, random(4,8), nil, nil, NAOD.GetActionOnObjectTable(NAOD.StandardUnitAttributes),%ObjectTypeToSpawnOn) 
			--SetScriptTimer(1,%DeleteDestRef)
			pop()
		end
		push(SpawnAmbush)
		push(DeleteDestObjRef)
	end
end
function NAOD.RandomSuperweapon()
	local RandomFocus = {"DefenseStructureList","FarAttackerUnitList"}
	local x,y = GetCoordinateCenterOfObjectTypeGroup(AdminTeamName,RandomFocus[random(getn(RandomFocus))])
	if x==0 or y==0 then return
		else
		local WeaponList = {"NuclearMissile","RiftGeneratorWeaponTrigger","IonCannonWeapon"}
		FireWeaponPosition(WeaponList[random(getn(WeaponList))],x,y) 
	end	
end
function NAOD.TeamHealthOverride()
	ExecuteAction("TEAM_SET_HEALTH",NAOD.Team,random(100,150))
end
function NAOD.TeamHealthOverrideExtreme()
	ExecuteAction("TEAM_SET_HEALTH",NAOD.Team,random(200,500))
end

function NAOD.CategorySpawner(category,ActionsOnObject)
	for j=1,( ceil(NAOD.Scalar[category]*NAOD.SpawnFactor*(random(90,110)/100)) ),1 do
		spawn(NAOD.UnitTable[category][random(getn(NAOD.UnitTable[category]))], NAOD.Team, 1, nil, NAOD.SpawnWaypoint, NAOD.GetActionOnObjectTable(ActionsOnObject,NAOD.StandardUnitAttributes))
	end
end

function NAOD.StandardSpawner(number,ActionsOnObject)
    local UnitCategoryTable = { [1]="Infantry1",[2]="Vehicle1",[3]="Infantry2",[4]="Vehicle2",[5]="Air1",[6]="Infantry3",[7]="Vehicle3",[8]="Air2",[9]="Vehicle4" }
	if NAOD.Wave >= 1 then NAOD.CategorySpawner("Infantry1",ActionsOnObject) end
	if NAOD.Wave >= floor(Max_Waves*0.2) and NAOD.Time >= 120 then NAOD.CategorySpawner("Infantry2",ActionsOnObject) end
	if NAOD.Wave >= floor(Max_Waves*0.25) and NAOD.Time >= 180 then NAOD.CategorySpawner("Vehicle1",ActionsOnObject) end	
	if NAOD.Wave >= floor(Max_Waves*0.35) and NAOD.Time >= 240 then NAOD.CategorySpawner(UnitCategoryTable[random(4,5)],ActionsOnObject) end	
	if NAOD.Wave >= floor(Max_Waves*0.35) and NAOD.Time >= 240 then NAOD.CategorySpawner(UnitCategoryTable[getn(UnitCategoryTable)],ActionsOnObject) end	
	if NAOD.Wave >= floor(Max_Waves*0.45) and NAOD.Time >= 300 then NAOD.CategorySpawner("Vehicle3",ActionsOnObject) end
	if NAOD.Wave >= floor(Max_Waves*0.7) and NAOD.Time >= 360 then NAOD.CategorySpawner("Infantry3",ActionsOnObject) end		
	if NAOD.Wave >= floor(Max_Waves*0.7) and NAOD.Time >= 360 then NAOD.CategorySpawner("Vehicle4",ActionsOnObject) end	
end

function NAOD.Spawner()
	local ActionsOnObject = {}
	if NAOD.Wave >= round(Max_Waves*0.80) and NAOD.Time >= 360 then tinsert(ActionsOnObject,NAOD.Veterancy3)
		elseif NAOD.Wave >= round(Max_Waves*0.55) and NAOD.Time >= 240 then tinsert(ActionsOnObject,NAOD.Veterancy2)
		elseif NAOD.Wave >= round(Max_Waves*0.25) and NAOD.Time >= 180 then tinsert(ActionsOnObject,NAOD.Veterancy1) 
	end
	if random(100)<25 then tinsert(ActionsOnObject,NAOD.RandomAttributesBoostTable[random(getn(NAOD.RandomAttributesBoostTable))]) end
	if NAOD.Wave<=3 then 
		NAOD.CurrentRoundType="StandardSpawner"
		NAOD.StandardSpawner(number,ActionsOnObject)
		elseif mod(NAOD.Wave,8)==0 then --endboss round
		NAOD.CurrentRoundType="Endboss"
		NAOD.Endboss(ceil(NAOD.Wave/8),ActionsOnObject)  
		elseif mod(NAOD.Wave,7)==0 then   --repeat the most successfull round type
		NAOD.CurrentRoundType=NAOD.MemoryTable.RoundType[NAOD.GetNegativeCountChangeMaximumWave(NAOD.MemoryTable.AllTeams[NAOD.Personality.AdaptFocus])]
		NAOD.RoundType[NAOD.CurrentRoundType](ceil(NAOD.Wave/7),ActionsOnObject)
		elseif mod(NAOD.Wave,5)==0 or random(100)<16 then --special round type                                
		NAOD.CurrentRoundType = GetRandomTableIndex(NAOD.RandomRoundType)
		RoundTypeFunction = NAOD.RandomRoundType[NAOD.CurrentRoundType]
		RoundTypeFunction(NAOD.SpawnFactor,ActionsOnObject)
		elseif mod(NAOD.Wave,6)==0 or random(100)<16 then
		if random(100)<50 then NAOD.RandomUnitCategorySwarm(NAOD.SpawnFactor,ActionsOnObject)
		else NAOD.RandomUnitTypeSwarm(NAOD.SpawnFactor,ActionsOnObject) end
		else	--normal round type
		NAOD.CurrentRoundType="StandardSpawner"
		NAOD.StandardSpawner(number,ActionsOnObject)
	end
	if random(20)<=1 and NAOD.Wave>3 then NAOD.EventTypeFunctions[NAOD.EventType[random(getn(NAOD.EventType))]]() end
	if random(100)<=1 and NAOD.Wave>3 then NAOD.RareEventTypeFunctions[NAOD.RareEventType[random(getn(NAOD.RareEventType))]]() end
end

NAOD.CurrentRoundType="StandardSpawner"
NAOD.RoundType={["StandardSpawner"]=NAOD.StandardSpawner,["RandomUnitTypeSwarm"]=NAOD.RandomUnitTypeSwarm,["RandomUnitCategorySwarm"]=NAOD.RandomUnitCategorySwarm,["StormriderSwarm"]=NAOD.StormriderSwarm,["FanaticSquadSwarm"]=NAOD.FanaticSquadSwarm,["LowHealthAvatarSwarm"]=NAOD.LowHealthAvatarSwarm,["BoostedAvatarsSwarm"]=NAOD.BoostedAvatarsSwarm,["AlienCustomizableVehicleSwarm"]=NAOD.AlienCustomizableVehicleSwarm,["HammerheadZoneRaiderSwarm"]=NAOD.HammerheadZoneRaiderSwarm,["Endboss"]=NAOD.Endboss1}  --"AmbushUnits","AmbushDefenseStructures"
NAOD.RandomRoundType={["RandomUnitTypeSwarm"]=NAOD.RandomUnitTypeSwarm,["RandomUnitCategorySwarm"]=NAOD.RandomUnitCategorySwarm,["StormriderSwarm"]=NAOD.StormriderSwarm,["FanaticSquadSwarm"]=NAOD.FanaticSquadSwarm,["LowHealthAvatarSwarm"]=NAOD.LowHealthAvatarSwarm,["BoostedAvatarsSwarm"]=NAOD.BoostedAvatarsSwarm,["AlienCustomizableVehicleSwarm"]=NAOD.AlienCustomizableVehicleSwarm,["HammerheadZoneRaiderSwarm"]=NAOD.HammerheadZoneRaiderSwarm} 
--TWPORT overwrittings
function TWPort_NAODFunctions()
	NAOD.RoundType={["StandardSpawner"]=NAOD.StandardSpawner,["RandomUnitTypeSwarm"]=NAOD.RandomUnitTypeSwarm,["RandomUnitCategorySwarm"]=NAOD.RandomUnitCategorySwarm,["FanaticSquadSwarm"]=NAOD.FanaticSquadSwarm,["BoostedAvatarsSwarm"]=NAOD.BoostedAvatarsSwarm,["Endboss"]=NAOD.Endboss1}  --"AmbushUnits","AmbushDefenseStructures"
	NAOD.RandomRoundType={["RandomUnitTypeSwarm"]=NAOD.RandomUnitTypeSwarm,["RandomUnitCategorySwarm"]=NAOD.RandomUnitCategorySwarm,["StormriderSwarm"]=NAOD.StormriderSwarm,["FanaticSquadSwarm"]=NAOD.FanaticSquadSwarm,["LowHealthAvatarSwarm"]=NAOD.LowHealthAvatarSwarm,["BoostedAvatarsSwarm"]=NAOD.BoostedAvatarsSwarm,["AlienCustomizableVehicleSwarm"]=NAOD.AlienCustomizableVehicleSwarm,["HammerheadZoneRaiderSwarm"]=NAOD.HammerheadZoneRaiderSwarm} 
end

--NAOD.EventType={"Superweapon","Meteorites","ForcePowerShutdown","Psychedelic+ConstantEarthquake","AllUnitsVet1","AllUnitsVet2","AllUnitsVet3","AllUnitsVet4"}
NAOD.EventType = { "UnitAmbush", "DefenseStructureAmbush", "TeamHealthOverride"}
NAOD.EventTypeFunctions={ ["UnitAmbush"]=NAOD.UnitAmbush, ["DefenseStructureAmbush"]=NAOD.DefenseStructureAmbush, ["TeamHealthOverride"]=NAOD.TeamHealthOverride }
NAOD.RareEventType = { "RandomSuperweapon","TeamHealthOverrideExtreme" }
NAOD.RareEventTypeFunctions = { ["RandomSuperweapon"]=NAOD.RandomSuperweapon, ["TeamHealthOverrideExtreme"]=NAOD.TeamHealthOverrideExtreme }
NAOD.RandomAttributesBoostTable={NAOD.AttributesBoosted1,NAOD.AttributesBoosted2,NAOD.AttributesBoosted3,NAOD.AttributesBoosted4,NAOD.SpeedBoost1,NAOD.SetRandomObjectColor}

function NAOD.AttackActions()  
	if NAOD.AttackActionLock then return end
	local IssueAttackActionTask = function()
		if IsEntryInTable(WaypointTable,"METAMOD_NAOD_WAYPOINT_PATH_START") then
			if not NAOD.FollowWaypointCommandIssued then
				--ExecuteAction("TEAM_ATTACK_MOVE_FOLLOW_WAYPOINTS",NAOD.Team,"METAMOD_NAOD_WAYPOINT_PATH",0,0) --as a team,in formation 	 
				ExecuteAction("TEAM_FOLLOW_WAYPOINTS",NAOD.Team,"METAMOD_NAOD_WAYPOINT_PATH",0,0)               --as a team,in formation 	
				NAOD.FollowWaypointCommandIssued=true
				--ExecuteAction("TEAM_FOLLOW_WAYPOINTS_EXACT",NAOD.Team,"METAMOD_NAOD_WAYPOINT_PATH",0)         --as a team
				--ExecuteAction("TEAM_WANDER",NAOD.Team,"METAMOD_NAOD_WAYPOINT_PATH")
				--ExecuteAction("TEAM_PANIC",NAOD.Team,"METAMOD_NAOD_WAYPOINT_PATH")
				--ExecuteAction("SKIRMISH_FOLLOW_APPROACH_PATH", NAOD.Team, ApproachPath["Center"], 1)
				--ExecuteAction("SKIRMISH_MOVE_TO_APPROACH_PATH", NAOD.Team, ApproachPath_[random(4)])  
				--if NAOD.MapIntegration==2 and EvaluateCondition("TEAM_REACHED_WAYPOINTS_END",NAOD.Team,"METAMOD_NAOD_WAYPOINT_PATH") then ExecuteAction("TEAM_ATTACK_NAMED",NAOD.Team,"METAMOD_TOWERDEFENSE_OBJECT") end
				--EvaluateCondition("NAMED_REACHED_WAYPOINTS_END",ref,"METAMOD_NAOD_WAYPOINT_PATH")	
				else if NAOD.MapIntegration==2 or NAOD.MapIntegration==4 then NAOD.UnitsAttackTower() end 
			end
			else
			ExecuteAction("TEAM_EXIT_ALL_BUILDINGS",NAOD.Team)  
			ExecuteAction("TEAM_WANDER_IN_PLACE",NAOD.Team)
			if NAOD.MapIntegration==2 or NAOD.MapIntegration==4 then
				ExecuteAction("TEAM_ATTACK_NAMED",NAOD.Team,NAOD.Tower)
				--ExecuteAction("ATTACK_MOVE_TEAM_TO_NAMED_OBJECT",NAOD.Team,"METAMOD_TOWERDEFENSE_OBJECT")	
				else
				ExecuteAction("TEAM_HUNT", NAOD.Team)	 
				if AlliedPlayersNextToEachOther==1 then 
					ExecuteAction("MOVE_TEAM_TO",NAOD.Team,GetPlayerStartWaypointByTeam(NAOD.EnemyTeamTable[1])) 
					ExecuteAction("ATTACK_MOVE_TEAM_TO",GetPlayerStartWaypointByTeam(NAOD.EnemyTeamTable[1])) 
					else 
					ExecuteAction("MOVE_TEAM_TO",NAOD.Team,GetPlayerStartWaypointByTeam(NAOD.CurrentTeamToAttack)) 
					ExecuteAction("ATTACK_MOVE_TEAM_TO",GetPlayerStartWaypointByTeam(NAOD.CurrentTeamToAttack)) 
				end
				ExecuteAction("TEAM_ATTACK_TEAM", NAOD.Team, NAOD.CurrentTeamToAttack)
			end
		end
		NAOD.AlliedAIHandle()
		NAOD.CurrentTeamToAttack=NextTableElement(HumanPlayerTable,NAOD.CurrentTeamToAttack)
	end
	if not NAOD.PreAttackActionsIssued then
		NAOD.PreAttackActionsIssued = true
		ExecuteAction("TEAM_EXIT_ALL_BUILDINGS",NAOD.Team)  
		ExecuteAction("TEAM_WANDER_IN_PLACE",NAOD.Team)
		SetScriptTimer(3,IssueAttackActionTask)
	else IssueAttackActionTask() end
end

function NAOD.AlliedAIHandle()
	-- if NAOD.MapIntegration==2 or NAOD.MapIntegration==4 then
	-- for i=1,getn(NAOD.EnemyTeamTable),1 do if GPOT[NAOD.EnemyTeamTable[i]]["ai"]==1 then ExecuteAction("TEAM_GUARD_OBJECT",NAOD.EnemyTeamTable[i],NAOD.Tower) end end
	-- else
	-- for i=1,getn(NAOD.EnemyTeamTable),1 do if GPOT[NAOD.EnemyTeamTable[i]]["ai"]==1 and TeamRelations[NAOD.EnemyTeamTable[1]][NAOD.CurrentTeamToAttack]==2 then ExecuteAction("TEAM_GUARD_TEAM",NAOD.EnemyTeamTable[i],NAOD.CurrentTeamToAttack) end end
	-- end
	for i=1,getn(NAOD.EnemyTeamTable),1 do if GPOT[NAOD.EnemyTeamTable[i]]["ai"]==1 then ExecuteAction("TEAM_ATTACK_TEAM",NAOD.EnemyTeamTable[i],NAOD.Team) end end
end

NAOD.LastReferenceDistance = 0
function NAOD.UnitsAttackTower()
	local ReferenceDistance = GetTeamDistance(NAOD.Team,NeutralTeam) --CivilianTeam
	local UnitNearTower = false
	if not NAOD.TeamObjectListRefreshed then NAOD.TeamObjectList = GetStringRefListOfAllObjectsForTeam(NAOD.Team) end
	for i=1,getn(NAOD.TeamObjectList),1 do
		if EvaluateCondition("DISTANCE_BETWEEN_OBJ",NAOD.TeamObjectList[i]["ref"],NAOD.Tower, CompareTable["<"], NAOD.TowerDistanceForAttackCommand) then ExecuteAction("NAMED_ATTACK_NAMED",NAOD.TeamObjectList[i]["ref"],NAOD.Tower) UnitNearTower = true end
	end
	if not UnitNearTower and ReferenceDistance==NAOD.LastReferenceDistance then ExecuteAction("TEAM_ATTACK_NAMED",NAOD.Team,NAOD.Tower) end
	NAOD.LastReferenceDistance=ReferenceDistance
end

function NAOD.NativeArtOfDefenseMain()
	NAOD.InitializeNativeArtOfDefense()
    local StartNextWave = function()
		ExecuteAction("SHOW_MILITARY_CAPTION", "\n\n\nattack wave " .. NAOD.Wave .. " starts!!!", 5)
		NAOD.AdaptiveIntelligenceCore()
		NAOD.Spawner()
		NAOD.AttackActions()
		NAOD.TeamObjectCountInitial = CountAllObjectsOfTeam(NAOD.Team)
		ExecuteAction("SCREEN_SHAKE", SHAKE_INTENSITY["CINE_INSANE"]) 
		ExecuteAction("PLAY_SOUND_EFFECT", "GDI_Battleship_Alarm")
		local MissionObj = { "Aeva_NewObjectReci","Aeva_NewMissObjRec"}
		ExecuteAction("PLAY_SOUND_EFFECT", MissionObj[random(1,2)])
		SetCounter("CurrentWaveCounter", NAOD.Wave, "Counter:CurrentWave")
		NAOD.TeamObjectCount = CountAllObjectsOfTeam(NAOD.Team)
		SetCounter("EnemyCounter", NAOD.TeamObjectCount, "Counter:ENEMYCOUNT")		
	end	
    local GiveXpAndMoney = function()
		for i=1,getn(NAOD.EnemyTeamTable),1 do
			GiveMoney(NAOD.EnemyTeamTable[i],Reward.Money.NAOD.EachRound.Base())
			if GPOT[NAOD.EnemyTeamTable[i]]["ai"]==0 then
				MetaStatsAddXP(NAOD.EnemyTeamTable[i],Reward.XP.NAOD.EachRound())
				GiveMetaCredits(NAOD.EnemyTeamTable[i],Reward.MC.NAOD.EachRound)
			end
		end		
	end
    NAOD.TeamObjectCount = CountAllObjectsOfTeam(NAOD.Team)
	SetCounter("EnemyCounter", NAOD.TeamObjectCount, "Counter:ENEMYCOUNT")	
	NAOD.Time = NAOD.Time + NAOD.PeriodTime 
    --SetCounter("DistanceCounter", GetTeamDistance(GetTeamName(object1),NAOD.Team), "Counter:Distance")
    if NativeArtOfDefense_RoundBased==0 then
        if NAOD.TeamObjectCount<=NAOD.RemainingUnitsLimit and NAOD.TimerStatus==0 and (NAOD.Wave<Max_Waves or No_Wave_Limit==1) then 
			if NAOD.Wave == 0 then 
				NAOD.TimerTime = max(First_Wave_Delay,Wave_Delay)
				SetTimerCounter(Wave_Delay, "Timer:NEXTWAVE", "WaveTimer") 			  
				else 
				NAOD.TimerTime = Wave_Delay 
				SetTimerCounter(Wave_Delay, "Timer:NEXTWAVE", "WaveTimer") 	
				GiveXpAndMoney()			  
			end
			NAOD.TimerStatus=1
			elseif NAOD.TimerStatus==1 then 
			NAOD.TimerTime = NAOD.TimerTime - NAOD.PeriodTime    
            if NAOD.TimerTime <= 0 and (NAOD.Wave<Max_Waves or No_Wave_Limit==1) then 
				NAOD.TimerStatus=0
				NAOD.Wave = NAOD.Wave + 1			   
				NAOD.FollowWaypointCommandIssued = false
				NAOD.PreAttackActionsIssued = false
				NAOD.TeamObjectListRefreshed=false
				StartNextWave()
			end
		end		
		else
		if NAOD.NextRoundIndicator==1 then
			ExecuteAction("DISABLE_UI_PLAYER_POWER_BUTTON", "SpecialPower_NAOD_NextWave", 1)
			NAOD.NextRoundIndicator=0
			NAOD.Wave = NAOD.Wave + 1
			StartNextWave()
			NAOD.XpAndMoneyReceived=0
			elseif NAOD.TeamObjectCount<=NAOD.RemainingUnitsLimit then 	
			ExecuteAction("DISABLE_UI_PLAYER_POWER_BUTTON", "SpecialPower_NAOD_NextWave",0)
			if NAOD.XpAndMoneyReceived==0 then
				NAOD.XpAndMoneyReceived=1
				for i=1,getn(NAOD.EnemyTeamTable),1 do GiveMoney(NAOD.EnemyTeamTable[i],Reward.Money.NAOD.EachRound.RoundBased()) end	
				GiveXpAndMoney()
			end			 
		end
	end 
    NAOD.AttackActions() --if mod(NAOD.Time,30)==0 then NAOD.AttackActions() end
	if (No_Wave_Limit == 0) and ((not EvaluateCondition("TEAM_HAS_UNITS", NAOD.Team)) or NAOD.TeamObjectCount<=NAOD.RemainingUnitsLimit) and NAOD.Wave>=Max_Waves then NAOD.GameOverState = true ExecuteAction("VICTORY") end 
    for i=1,getn(NAOD.EnemyTeamTable),1 do if CountTeamsKindOf(NAOD.EnemyTeamTable[i],"STRUCTURE")==0 and CountTeamsKindOf(NAOD.EnemyTeamTable[i],"VEHICLE")==0 then NAOD.GameOverState = true ExecuteAction("TEAM_KILL",NAOD.EnemyTeamTable[i]) end end
    if (NAOD.MapIntegration==2 or NAOD.MapIntegration==4) and not GetObj.AliveState(NAOD.Tower) then NAOD.GameOverState = true ExecuteAction("DEFEAT") end
	if NAOD.GameOverState then for i=1,getn(HumanPlayerTable),1 do if NAOD.Wave>3 then GiveMetaCredits(HumanPlayerTable[i],Reward.MC.NAOD.GameOver) end if Max_Waves>SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["NAOD_highscore"] and NAOD.Wave>3 then GiveMetaCredits(HumanPlayerTable[i],(Max_Waves-SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["NAOD_highscore"])*Reward.MC.NAOD.EachNewHighscoreRound) SavegameTable[GetTeamsDescriptiveName(HumanPlayerTable[i])]["NAOD_highscore"]=Max_Waves end end end
end  

function NativeArtOfDefenseRoundBased()
	NAOD.NextRoundIndicator = 1
	NAOD.FollowWaypointCommandIssued = false
	NAOD.PreAttackActionsIssued = false
	NAOD.TeamObjectListRefreshed=false
	NAOD.NativeArtOfDefenseMain()   
end                                                          
---------------------------------------------------------------------------
-------------------VICTORY AND DEFEAT--------------------------------------
---------------------------------------------------------------------------

function VictoryAndContinue(team)
	if Game_Continue_After_End and not Optional_Victory_Offered then --and GameFinishState 
		Optional_Victory_Offered = 1
		ExecuteAction("VICTORY_SCREEN")
		ExecuteAction("PLAY_SOUND_EFFECT", "Aeva_YouAreVictori") 
		ExecuteAction("ENABLE_INPUT")
		--ExecuteAction("QUICKVICTORY")
		ExecuteAction("OPTIONAL_VICTORY")
	end
end

function Defeat(team)
	ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 0)
	ExecuteAction("TEAM_KILL", team)
	local alpha=GetObj.TableByType(VictoryConditionHelper,team)
	ExecuteAction("NAMED_DELETE", alpha)
	PlayVictoryOrDefeatSound(team,0)
end

function DiplomacyGameStateCheck()
	local TeamsAliveTable = {}
	for i=1,getn(GlobalTeamTable),1 do
		if not EvaluateCondition("TEAM_DESTROYED", GlobalTeamTable[i]) then 
			tinsert(TeamsAliveTable,GlobalTeamTable[i])
		end
	end
	for i=1,getn(TeamsAliveTable),1 do
		for j=1,getn(TeamsAliveTable),1 do
			if (i~=j) and (TeamRelations[TeamsAliveTable[i]][TeamsAliveTable[j]] == 0) then return end
		end		
	end
	ExecuteAction("OPTIONAL_VICTORY")
end

function LastManStanding()
	local TeamsAliveTable = {}
	for i=1,getn(GlobalTeamTable),1 do
		if not EvaluateCondition("TEAM_DESTROYED", GlobalTeamTable[i]) then 
			tinsert(TeamsAliveTable,GlobalTeamTable[i])
		end
	end
	for i=1,getn(TeamsAliveTable),1 do
		for j=1,getn(TeamsAliveTable),1 do
			if (i~=j) and (TeamRelations[TeamsAliveTable[i]][TeamsAliveTable[j]] == 0) then return end
		end		
	end
end
if Last_Man_Standing == 1 then
	for i=1,getn(TeamsAliveTable),1 do
		for j=1,getn(TeamsAliveTable),1 do
			if (i~=j) then SetRelation(TeamsAliveTable[i], TeamsAliveTable[j], 0) end
		end		
	end
end

function PlayVictoryOrDefeatSound(team,DefOrVic)  --0=defeat,1=victory
	local GameFinishVoice = { [1]="Aeva_YouHaveLost", [2]="Aeva_YouAreVictori", [3]="Aeva_YouHaveResign", [4]="Aeva_EnemyDefeated", [5]="Aeva_AllyDefeated", [6]="Aeva_PlayerDefeate" }
	for i=1,getn(HumanPlayerTable),1 do
		if HumanPlayerTable[i] == team then ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", GameFinishVoice[DefOrVic+1], HumanPlayerTable[i])	
			elseif TeamRelations[HumanPlayerTable[i]][team] == 2 then
			if DefOrVic == 1 then ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", GameFinishVoice[2], HumanPlayerTable[i])
			else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", GameFinishVoice[5], HumanPlayerTable[i]) end
			else 
			if GPOT[team]["ai"] then 
				if DefOrVic == 1 then ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", GameFinishVoice[1], HumanPlayerTable[i])
				else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", GameFinishVoice[4], HumanPlayerTable[i]) end		  
				else 
				if DefOrVic == 1 then ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", GameFinishVoice[1], HumanPlayerTable[i]) 
				else ExecuteAction("PLAY_SOUND_EFFECT_AT_TEAM", GameFinishVoice[6], HumanPlayerTable[i]) end		  
			end
		end
	end
end

---------------------------------------------------------------------------
-------------------PERIODIC CHECK SYSTEMS----------------------------------
---------------------------------------------------------------------------

function PeriodicGameStateCheckOLD(self) --better with objecttable check
	if Game_Continue_After_End == 1 then  end	
	if Optional_Victory_Offered ~= 1 then
		if not EvaluateCondition("IS_GAME_IN_SKIRMISH_OR_MULTIPLAYER", 1) then
			if EvaluateCondition("MULTIPLAYER_ALLIED_VICTORY") or EvaluateCondition("MULTIPLAYER_ALLIED_DEFEAT") or EvaluateCondition("MULTIPLAYER_PLAYER_DEFEAT") then
				ExecuteAction("OPTIONAL_VICTORY")
				--ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 0)
				Optional_Victory_Offered = 1
			end
			elseif IsATeamDestroyed() == 1 then
			ExecuteAction("OPTIONAL_VICTORY")
			--ExecuteAction("SET_IGNORE_SKIRMISH_VICTORY_CONDITIONS", 0)
			Optional_Victory_Offered = 1  
		end
	end
end

function PeriodicGameStateCheck(self)
	local GameFinishType = { "VICTORY", "QUICKVICTORY", "VICTORY_SCREEN", "OPTIONAL_VICTORY", "DEFEAT", "LOCALDEFEAT" }	
	local MultiplayerConditions = {"IS_GAME_IN_SKIRMISH_OR_MULTIPLAYER","MULTIPLAYER_ALLIED_DEFEAT","MULTIPLAYER_ALLIED_DEFEAT","MULTIPLAYER_PLAYER_DEFEAT"}
	for i=1,getn(GlobalTeamTable),1 do
		if EvaluateCondition("TEAM_HAS_FEWER_THAN_X_UNITS_WITH_KINDOF", GlobalTeamTable[i], 1, KindOfTable["STRUCTURE"]) then 
			local alpha=GetObj.TableByType(VictoryConditionHelper,GlobalTeamTable[i])
			if GPOT[GlobalTeamTable[i]]["ai"] == 0 and (Control_AlliedAI_After_Defeat==1 or Control_EnemyAI_After_Defeat==1) then
				if Control_AlliedAI_After_Defeat then
					MergeTeamWithNextAllied(GlobalTeamTable[i]) 
					elseif Control_EnemyAI_After_Defeat then
					MergeTeamWithNextEnemy(GlobalTeamTable[i])
				end		
				else ExecuteAction("NAMED_DELETE", alpha)
			end
		end
	end   
	if Optional_Victory_Offered ~= 1 then
		if Game_Continue_After_End == 1 then
			if not EvaluateCondition("IS_GAME_IN_SKIRMISH_OR_MULTIPLAYER", 1) then
				if EvaluateCondition("MULTIPLAYER_ALLIED_VICTORY") or EvaluateCondition("MULTIPLAYER_ALLIED_DEFEAT") or EvaluateCondition("MULTIPLAYER_PLAYER_DEFEAT") then
					ExecuteAction("OPTIONAL_VICTORY")
					Optional_Victory_Offered = 1 
				end
				elseif IsATeamDestroyed() == 1 then
				ExecuteAction("OPTIONAL_VICTORY")
				Optional_Victory_Offered = 1  
			end
		end
	end
	if Last_Man_Standing == 1 then
	end
	if Diplomacy_System == 1 then
	end  
end  

function PerHumanPlayerPeriodicCheck(self)
	local TeamName=GetTeamName(self)
	SetCounter("KindOfCounter" .. TeamName, GetNumberOfAllEnemiesForKindOf(TeamName, Enemy_KindOf_Counter_Type), "Counter:CUSTOMENEMYCOUNT")
end

ScriptedEventAdditionsDispatchEnabled = false
function ScriptedEventAdditionsDispatch()  --only for local player, not for multiplayer
	local TimeIntervall = 10.0
	for i=1,getn(EvaEventTable),1 do
		if EvaluateCondition("HAS_EVA_EVENT_PLAYED_IN_LAST_N_SECONDS",EvaEventTable[i],TimeIntervall) then 
			ObjectDispatchEvent(EvaEventTable[i])  --parameters correct? -> needs testing (send team too if possible)
			-- ObjectSpy(object, parameters...)   --calls with parameters (self, spySelf, parameters...)
			-- ObjectBroadcastEventToEnemies(object,eventname,radius)   --calls with parameters (self, dispatchingObject, arbitraryString)
			-- ObjectBroadcastEventToAllies(object,eventname,radius)
			-- ObjectBroadcastEventToUnits(object,eventname,radius)
			-- ObjectBroadcastEventToCivilians(object,eventname,radius)
		end
	end
end

function MainCoroutine(self)
	if ScriptedEventAdditionsDispatchEnabled then ScriptedEventAdditionsDispatch() end
	if GameSetupFunctionReady == 1 then  --if (AI_Players_Count+Human_Players_Count) == getn(GlobalTeamTable) then
		if NativeArtOfDefense == 1 then NAOD.NativeArtOfDefenseMain() end
		--if NativeArtOfDefense_Initialized == 0 and NativeArtOfDefense_RoundBased == 1 then NAOD.InitializeNativeArtOfDefense() end
		if ExternaLuaCodeCoroutine == 1 then RunExternalLuaScript(object1) end
		if Enemy_KindOf_Counter_every10s == 1 then SetCounter("KindOfCounter" .. "_1", GetNumberOfAllEnemiesForKindOf(GlobalTeamTable[1], Enemy_KindOf_Counter_Type), "Counter:CUSTOMENEMYCOUNT") end
		if Diplomacy_System == 1 then PeriodicTeamDiplomacyAdministration() end
		if Hero_General_Gamemode == 1 then HeroGeneralGamemode() end	
		if Unit_vs_Unit_Gamemode == 1 then UnitVSUnitGamemode() end	
		if Random_Army_Gamemode == 1 then RandomArmyGamemode() end	
		if Adaptive_Auto_AI_Boost == 1 then AdaptiveAIBoost() end
		if CaptureControlPoint_Gamemode == 1 and CCP_Initialized == 0 then CaptureControlPointGamemode() end
		if ShowPlayTime == 1 then SetCounter("PLAYTIMECOUNTER", GetPlayTime(), "Counter:PLAYTIME") end
		--if TiberiumCrystals_Counter == 1 then SetCounter("TiberiumCounter", CountTeamsKindOf(NeutralTeam,"TIBERIUM"), "Counter:Tiberium") end
		if CustomGameFinishConditionCheck == 1 then PeriodicGameStateCheck() end
		for i=1,getn(GlobalTeamTable),1 do if GPOT[GlobalTeamTable[i]]["Menu"]["buildboost"]==1 then MultiObjectTypeBaseBuilder(GlobalTeamTable[i]) end if  GPOT[GlobalTeamTable[i]]["Menu"]["defensebuildboost"]==1 then MultiDefenseBaseBuilder(GlobalTeamTable[i],12,500) end end
		--if MetaCreditShop_Initialized==1 then PeriodicMetaShopAdministration() end
		if MetaStatsSystemEnabled==1 then 
			if not MetaCreditShop_AlwaysOff==1 and MetaStatsTimeCounter*GetPlayTime()>=MetaStatsTimeCounter*18 then MetaStatsTimeCounter=MetaStatsTimeCounter+1 for i=1,getn(HumanPlayerTable),1 do MetaStatsAddXP(HumanPlayerTable[i],Reward.XP.EachXMinutes) GiveMetaCredits(HumanPlayerTable[i],Reward.MC.EachXMinutes) end end
			if EvaluateCondition("MULTIPLAYER_ALLIED_VICTORY") then
				for i=1,getn(HumanPlayerTable),1 do
					MetaStatsAddXP(HumanPlayerTable[i],Reward.XP.CommonVictory)
					GiveMetaCredits(HumanPlayerTable[i],Reward.MC.CommonVictory)
				end
				-- if Hero_General_Gamemode == 1 then HeroGeneralGamemode()
				-- elseif Unit_vs_Unit_Gamemode == 1 then UnitVSUnitGamemode()
				-- elseif Random_Army_Gamemode == 1 then RandomArmyGamemode()
				-- else
				-- end
			end
		end
		if ModScriptsAlwaysOff == 0 then 
			for k,v in ModScripts["repeat_function"] do 
				if ModScripts["status"][k] == 1 then 
					for i=1,getn(v),1 do
						if type(v[i])=="string" then dostring(v[i]) elseif type(v[i])=="function" then call(v[i]) end 
					end
				end 
			end 
		end
	end
end

---------------------------------------------------------------------
------------------TESTAREA-------------------------------------------
---------------------------------------------------------------------

MainTowerSupporterList= {}
MainTowerSupportConnectionList= {}

function CascadeForwarding(self) --made for "Madin" (cncnz forums)
	self=GetObj.Table(self)
	local IsObjectInSupporterList = function(object)
		for q,p in MainTowerSupporterList do  --to test if a tower already supports another tower
			if q~=tostring(%self) then
				for i=1,getn(p),1 do if p[i]==object then return true end end
			end
		end
		return false
	end	
	local MaximumSupportDistance = 13000
	local TowerAttackRange = 375 --here attack range of nod obelisk
	if ObjectCountNearbyEnemies(self,TowerAttackRange)==0 and IsObjectInSupporterList(self) then return end
	local ObjectList = {}
	local DistanceTable = {}
	local SupportConnection={}
	--create object list of all support towers
	for k,v in globals() do
		if strfind(k,"ObjID") and GetObj.Hash(self)==GetObj.Hash(v) and self~=v and ObjectTeamName(self)==ObjectTeamName(v) then
			if ObjectCountNearbyEnemies(v,TowerAttackRange)==0 and EvaluateCondition("DISTANCE_BETWEEN_OBJ", GetObj.String(self),GetObj.String(v), CompareTable["<="], MaximumSupportDistance) then
				if not IsObjectInSupporterList(v) then tinsert(ObjectList,v) end
			end
		end
	end
	tinsert(ObjectList,self)
	if getn(ObjectList)<2 then return end
	--create 2d matrix with distances
	for i=1,getn(ObjectList),1 do
		DistanceTable[tostring(ObjectList[i])]={}
	end
	for i=1,getn(ObjectList),1 do
		for j=i,getn(ObjectList),1 do
			if i==j then 
				DistanceTable[tostring(ObjectList[i])][tostring(ObjectList[j])]=0
			else 
				if DistanceTable[tostring(ObjectList[i])][tostring(ObjectList[j])] == nil then
					DistanceTable[tostring(ObjectList[i])][tostring(ObjectList[j])]=GetObjectDistance(GetObj.String(ObjectList[i]),GetObj.String(ObjectList[j]))
					DistanceTable[tostring(ObjectList[j])][tostring(ObjectList[i])]=DistanceTable[tostring(ObjectList[i])][tostring(ObjectList[j])]	
				end
			end
		end	
	end
	--sort object list by distance to main tower
	local SortHelper=function(Object1,Object2)
		if %DistanceTable[tostring(%self)][tostring(Object1)] < %DistanceTable[tostring(%self)][tostring(Object2)] then return true end
	end
	sort(ObjectList,SortHelper)
	--main part: distribute one tower for each tower to support
	local MainNodeTable = {}
	tinsert(MainNodeTable,self)
	local i = 2
	local ObjectListSize
	for i=2,getn(ObjectList),1 do
		local MainNodeCriteria = true
		local NextMainNode, NextMainNodeAlternative  --closest main node
		local NextMainNodeDistance = 13000
		for k=1,getn(MainNodeTable),1 do
			if NextMainNodeDistance > DistanceTable[tostring(MainNodeTable[k])][tostring(ObjectList[i])] then
				NextMainNodeDistance = DistanceTable[tostring(MainNodeTable[k])][tostring(ObjectList[i])]
				NextMainNode = MainNodeTable[k]
			end
		end		
		local ShortestLinkToNextMainNodeDistance = 13000
		for j=3,getn(ObjectList),1 do	
			if not i==j and ObjectList[j]~=nil then
				local iNodeTojNodeDistance = DistanceTable[tostring(ObjectList[i])][tostring(ObjectList[j])]
				local iNodeToNextMainNodeDistance = DistanceTable[tostring(NextMainNode)][tostring(ObjectList[i])]
				local jNodeToNextMainNodeDistance = DistanceTable[tostring(NextMainNode)][tostring(ObjectList[j])]
				if jNodeToNextMainNodeDistance < iNodeToNextMainNodeDistance then 
					if iNodeTojNodeDistance < iNodeToNextMainNodeDistance then
						MainNodeCriteria = false
						local LinkToNextMainNodeDistance = iNodeTojNodeDistance + jNodeToNextMainNodeDistance
						if ShortestLinkToNextMainNodeDistance > LinkToNextMainNodeDistance then
							NextMainNodeAlternative=ObjectList[j]
							ShortestLinkToNextMainNodeDistance = LinkToNextMainNodeDistance
						end
					end
				end
			end
		end
		if MainNodeCriteria == true then 
			if TowerAttackRange > DistanceTable[tostring(NextMainNode)][tostring(ObjectList[i])] then
				tinsert(MainNodeTable,ObjectList[i])
				SupportConnection[tostring(ObjectList[i])]=NextMainNode
				else
				ObjectList[i]=nil
			end
			else 
			if TowerAttackRange > ShortestLinkToNextMainNodeDistance then 
				SupportConnection[tostring(ObjectList[i])]=NextMainNodeAlternative
				else 
				ObjectList[i]=nil
			end
		end
	end	
	--remove all unneccasary towers
	local CleanedObjectList = {}
	for i=1,getn(ObjectList),1 do
		if not ObjectList[i]==nil then tinsert(CleanedObjectList,ObjectList[i]) end
	end
	ObjectList=CleanedObjectList
	MainTowerSupporterList[tostring(self)] = CleanedObjectList
	MainTowerSupportConnectionList[tostring(self)]=SupportConnection
	--fire cumulative attribute modifier weapon on main tower (self)
	for i=2,getn(ObjectList),1 do
		ObjectCreateAndFireTempWeapon(self,"PrismTowerSupportWeapon")
	end		
	--fire special power to display visual support beams
	for i=2,getn(ObjectList),1 do
		--ExecuteAction("NAMED_FIRE_SPECIAL_POWER_AT_NAMED",ObjectList[i],"SpecialPower_PrismForwarding",SupportConnection[tostring(ObjectList[i])])	
		ExecuteAction("NAMED_STOP",ObjectList[i])
		ExecuteAction("NAMED_ATTACK_NAMED",ObjectList[i],SupportConnection[tostring(ObjectList[i])])		
	end
end

function GetMyMainTower(object)
	for q,p in MainTowerSupporterList do 
		if q~=tostring(object) then
			for i=1,getn(p),1 do 
				if p[i]==object then 
					return p[1]
				end
			end
		end
	end
end

function IsTowerStillAttacking(MainTower)
	if ObjectTestModelCondition(MainTower,"ATTACKING") or ObjectTestModelCondition(MainTower,"PREATTACK_A") or ObjectTestModelCondition(MainTower,"RELOADING_A") or ObjectTestModelCondition(MainTower,"FIRING_A") then return true else return false end
end

function NodObelisk_RELOADING(self)
	local TowerAttackRange = 375
	if MainTowerSupporterList[tostring(self)]~=nil then --and ObjectCountNearbyEnemies(self,TowerAttackRange)==0 then
		for i=2,getn(MainTowerSupporterList[tostring(self)]),1 do
			ExecuteAction("NAMED_STOP",MainTowerSupporterList[tostring(self)][i])
		end
		--MainTowerSupporterList[tostring(self)]=nil
		else
		if ObjectCountNearbyEnemies(self,TowerAttackRange)==0 then ExecuteAction("NAMED_STOP",self) end
		local MainTower = GetMyMainTower(self)
		if not IsTowerStillAttacking(MainTower) then 
			MainTowerSupporterList[tostring(MainTower)]=nil
			else 
			ExecuteAction("NAMED_STOP",self)
			ExecuteAction("NAMED_ATTACK_NAMED",self,MainTowerSupportConnectionList[tostring(MainTower)][tostring(self)]) 
		end	
	end
end

------------


function StopAllUnitsOfSameType(self)
	self=GetObj.Table(self)
	for k,v in globals() do
		if strfind(k,"ObjID") and GetObj.Hash(self)==GetObj.Hash(v) and ObjectTeamName(self)==ObjectTeamName(v) then
			ExecuteAction("NAMED_STOP",v)
		end
	end
end

function RunMapScript(MapScriptName,team,times)
	local MetaGameScriptTable = {"SR - Activate","SR - Map Reveal - Timer Expired","SR - Setup - Radar - Activate","SR - Stealth Reveal - Timer Expired"}
	if times == nil then times = 1 end
	if team == nil then team = NeutralTeam end
	ExecuteAction("TEAM_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING",team,MapScriptName,times)
	--ExecuteAction("TEAM_STOP_SEQUENTIAL_SCRIPT",team)
	--ExecuteAction("TEAM_EXECUTE_SEQUENTIAL_SCRIPT",team,MapScriptName)
	--ExecuteAction("UNIT_EXECUTE_SEQUENTIAL_SCRIPT",object,MapScriptName)
	--ExecuteAction("UNIT_EXECUTE_SEQUENTIAL_SCRIPT_LOOPING",object,MapScriptName,times)
	--ExecuteAction("UNIT_STOP_SEQUENTIAL_SCRIPT",object)
	--ExecuteAction("ENABLE_SCRIPT",MapScriptName)
	--ExecuteAction("CALL_SUBROUTINE",MapScriptName)
end	

MapScriptBridge = {}

function MapScriptBridge.GetMoneyValue(team)
	RunMapScript("METAMOD_REFRESH_PLAYER_MONEY_COUNTERS")
	return GetCounterValueFast("METAMOD_" .. strupper(GetPlayerNameByTeam(team)) .. "_MONEY_COUNTER")
end 

function MapScriptBridge.GetNumberOfKills(team)
	RunMapScript("METAMOD_REFRESH_PLAYER_KILL_COUNTERS")
	return GetCounterValueFast("METAMOD_" .. strupper(GetPlayerNameByTeam(team)) .. "_KILLCOUNTER")
end 


function MapScriptBridge.SetMoney(team,ammount)
	RunMapScript("SET_MONEY_0",team) 
	local CounterBaseDummyRef = RandomString(3)
	local Tvalue = ammount
	local Cvalue = 0
	local MoneyCrateIndex = 1
	local length = floor(log10(Tvalue)+1)
	for i=1,length,1 do
		if i<4 then 
			Cvalue = mod(Tvalue,10)
			MoneyCrateIndex = 10^(i-1) 
			else
			Cvalue = Tvalue 	 
			MoneyCrateIndex = 1000 
		end		 
		local MoneyCrateIndex = tostring(MoneyCrateIndex)
		for j=1,Cvalue,1 do
			RunMapScript("ADD_MONEY_" .. MoneyCrateIndex, team)
		end 
		if i==4 then return end
		Tvalue = floor(Tvalue/10)
	end
end

function TestEVAEvent(EventName,TimePassed)   --use EvaEventTable
	if TimePassed == nil then TimePassed = 10 end
	return EvaluateCondition("HAS_EVA_EVENT_PLAYED_IN_LAST_N_SECONDS",EventName,TimePassed)
end

GameDetected = false

function DetectGame()
	if not GameDetected then
		ExecuteAction("UNIT_SPAWN_NAMED_LOCATION_ORIENTATION","GameTestObject","BlackHandCommando",NeutralTeam,"((0.00,0.00,0.00))", 0)
		if EvaluateCondition("NAMED_NOT_DESTROYED","GameTestObject") then Game="KanesWrath" else Game="TiberiumWars" end
		ExecuteAction("NAMED_DELETE","GameTestObject")
		GameDetected = true
	end
	return Game
end

function GAME_DIFFERENTIATOR()
	if DetectGame()=="TiberiumWars" then
		TWPort_CNC3FOLDER()	
		TWPort_NAODUnits()
		TWPort_NAODFunctions()
		---------REMOVED----------------
	end
end



-- dostring(BFMEII_ROTWK_STANDARD_FUNCTIONS)
-- dostring(BFMEII_METAMOD)