-- Standard GCO v2.2 Map File -- Using programmatic placement of battle forces levelDesc = "GCO C4 T104B1 TCW vs. NI" maxPlayers = 5 player = {} player[0] = { id = 0, name = "TCW", resources = 0, raceID = 1, startPos = 1, startPoint = {0, 0, 50000}, startAngle = {0, 180, 0}, stackSep = {500, 0, 0}, forces = {}, } player[1] = { id = 1, name = "NI", resources = 0, raceID = 1, startPos = 1, startPoint = {0, 0, -50000}, startAngle = {0, 0, 0}, stackSep = {-500, 0, 0}, forces = {}, } player[2] = { id = 2, name = "NI Schmuck", resources = 0, raceID = 1, startPos = 1, startPoint = {0, 0, -50000}, startAngle = {0, 0, 0}, stackSep = {-500, 0, 0}, forces = {}, } player[3] = { id = 3, name = "Empty", resources = 0, raceID = 1, startPos = 1, startPoint = {50000, 0, 0}, startAngle = {0, -90, 0}, stackSep = {0, 0, 500}, forces = {}, } player[4] = { id = 4, name = "Observer", resources = 0, raceID = 1, startPos = 1, startPoint = {0, 50000, 0}, startAngle = {-90, 0, 0}, stackSep = {0, 0, 500}, forces = {}, } -- ******************************* -- START COMMONLY-MODIFIED SECTION -- Define battle forces for each player player[0]["forces"] = { {"gco_rctd",1}, {"gco_esc",4}, {"gco_hajen",1}, {"gco_ta",10}, } player[1]["forces"] = { {"gco_hsd",3}, {"gco_int",1}, {"gco_esc",2}, {"gco_lfrg",9}, {"gco_misl",6}, {"gco_tr",23}, } player[2]["forces"] = { {"gco_dx9",9}, {"gco_tv",1}, } player[3]["forces"] = { } -- END COMMONLY-MODIFIED SECTION -- ***************************** --Utility function function tableSumMult(t1, t2, t2mult) tt = {} for i,k in t1 do tt[i] = t2[i]*t2mult + k end return tt end function DetermChunk() setWorldBoundsInner({0, 0, 0}, {500000, 500000, 500000}) --Set data values by player for pnum,pdata in player do --Starting point for the buoy addPoint("StartPos" .. pnum, tableSumMult(pdata["startPoint"], {0, 10000, 0}, 1), pdata["startAngle"]) --Starting forces curoff = 0 print("** player" .. pnum .. " forces:") for fnum,fdat in pdata["forces"] do for i=1,fdat[2] do addSquadron(fdat[1], fdat[1], tableSumMult(pdata["startPoint"], pdata["stackSep"], curoff), pnum, pdata["startAngle"], 0, 0) curoff = curoff + 1 end print("** " .. fdat[1] .. ": " .. fdat[2]) end end end function NonDetermChunk() fogSetActive(0) setGlareIntensity(0) setLevelShadowColour(0,0,0,1) loadBackground("m15") setSensorsManagerCameraDistances(1000, 300000) setDefaultMusic("Data:sound/music/battle/battle_keeper") end