-- Map for SP Mission Template

maxPlayers = 3
player = {}
player[0] = 
{ 
    id = 0, 
    name = "Hiigaran Navy", 
    resources = 0, 
    raceID = 1, 
    startPos = 0, }
player[1] = 
{ 
    id = 1, 
    name = "Vaygr Armada", 
    resources = 0, 
    raceID = 2, 
    startPos = 0, }
player[2] = 
{ 
    id = 2, 
    name = "Vaygr Raiders", 
    resources = 0, 
    raceID = 2, 
    startPos = 0, }

function DetermChunk()
-- the order of the objects added should stay as is (there are one or two bugs with other orders) 
--  squadrons
    addSquadron("hgn_carrier", "hgn_carrier", { 5900, 1000, 0, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_bomber1", "hgn_attackbomber", { 6200, 1100, 0, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_bomber2", "hgn_attackbomber", { 6200, 1000, 0, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_bomber3", "hgn_attackbomber", { 6200, 900, 0, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_interceptor1", "hgn_interceptor", { 5550, 1100, 0, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_interceptor2", "hgn_interceptor", { 5550, 1000, 0, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_interceptor3", "hgn_interceptor", { 5550, 900, 0, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_marinefrigate1", "hgn_marinefrigate", { 5900, 1150, -100, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_marinefrigate2", "hgn_marinefrigate", { 5900, 1150, 100, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_defensefieldfrigate1", "hgn_defensefieldfrigate", { 500, 1500, -6000, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_probe1", "hgn_probe", { -5900, 8000, 0, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("hgn_probe2", "hgn_probe", { 500, 6500, 6000, }, 0, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_carrier", "vgr_carrier", { -5900, 0, 0, }, 1, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_interceptor1", "vgr_interceptor", { -6000, 1300, 0, }, 1, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_interceptor2", "vgr_interceptor", { -6000, 1100, 0, }, 1, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_bomber1", "vgr_bomber", { -6100, 1000, 0, }, 1, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_portal1", "vgr_hyperspace_platform", { -6200, 0, 0, }, 1, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_portal2", "vgr_hyperspace_platform", { 500, 1500, 6000, }, 1, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_interceptor3", "vgr_interceptor", { 600, 1300, 6000, }, 2, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_interceptor4", "vgr_interceptor", { 500, 1400, 6000, }, 2, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_bomber2", "vgr_bomber", { 400, 1400, 6000, }, 2, { 0, 0, 0, }, 0, 0)
    addSquadron("vgr_bomber3", "vgr_bomber", { 400, 1300, 6000, }, 2, { 0, 0, 0, }, 0, 0)
--  volumes
--  addPoint("PlayerStartPoint", { -17756, 0, -148, }, { 0, 90, 0, })
    addSphere("vol_FleeSphere", { 500, 1600, 6000, }, 225)
-- cameras
    addCamera("cam_Start", { 6227, 1120, 270, }, { 6636, 1264, 479, })
-- asteroids
--  addAsteroid("Asteroid_4", { -7141, 4423, 18569, }, 5, -68.929, 6.123, 22.327, 0)
-- clouds, dustclouds and nebulas
--  addDustCloud("polySurface4", "DustCloud_teal", { 9132, -4434, 19363, } , { 0.5, 0.5, 0.5, 0.6, }, 231.961, 4002.345)
-- world boundaries
    setWorldBoundsInner( { 154.24, 0, -154.77,} , { 48730.69, 7772.77, 48730.69, })
-- groups
    createSOBGroup("sg_Portal1")
    addToSOBGroup("vgr_portal1", "sg_Portal1")
    createSOBGroup("sg_Portal2")
    addToSOBGroup("vgr_portal2", "sg_Portal2")
    createSOBGroup("sg_Interceptors")
    addToSOBGroup("vgr_interceptor1", "sg_Interceptors")
    createSOBGroup("sg_VaygrGroup1")
    addToSOBGroup("vgr_interceptor1", "sg_VaygrGroup1")
    addToSOBGroup("vgr_interceptor2", "sg_VaygrGroup1")
    addToSOBGroup("vgr_bomber1", "sg_VaygrGroup1")
    createSOBGroup("sg_VaygrGroup2")
    addToSOBGroup("vgr_interceptor3", "sg_VaygrGroup2")
    addToSOBGroup("vgr_interceptor4", "sg_VaygrGroup2")
    addToSOBGroup("vgr_bomber2", "sg_VaygrGroup2")
    addToSOBGroup("vgr_bomber3", "sg_VaygrGroup2")
    createSOBGroup("sg_HiigaranMarines")
    addToSOBGroup("hgn_marinefrigate1", "sg_HiigaranMarines")
    addToSOBGroup("hgn_marinefrigate2", "sg_HiigaranMarines")
    addToSOBGroup("vgr_bomber1", "sg_VaygrGroup1")
    createSOBGroup("sg_ReconFrigate")
    addToSOBGroup("hgn_defensefieldfrigate1", "sg_ReconFrigate")
end

function NonDetermChunk()
-- pebbles
--  addPebble("Pebble_0", { 19552, 5622, -15357, }, 0, 0, 0)
-- visual stuff (fog, glare, shadows)
    fogSetActive(1)
    fogSetStart(10)
    fogSetEnd(20000)
    fogSetColour(0.427734, 0.228516, 0.078125, 1)
    fogSetType("linear")
    fogSetDensity(0.075)
    setGlareIntensity(0)
    setLevelShadowColour(0, 0, 0, 1)
-- background
    loadBackground("m03")
    setSensorsManagerCameraDistances(10000, 45000)
    setDustCloudAmbient({ 0.5, 0.5, 0.5, 1, })
end
