It looks like you're new here. If you want to get involved, click one of these buttons!
#plugin Export 2D maps #author NBOS #desc Exports a 2d map for specified systems 'exports a 2D map for each populated system greater than PopLimit, 'displaying all systems within a selected distance of the populated system. sector = GetCurrentSector() 'Settings 'be careful with this number on large sectors - it may 'result in thousands of images getting generated! PopLimit = 10000000 'population cutoff for generating images ExpLimit = 20 'maximum number of images to output, so it doesnt run all night MapDistance = 10 'distance, in light years, from center body that the map shows MapShape = 1 'cube or sphere selection. The shape to use when selecting bodies around 'the center system. Only affects body selection, *not* image shape. '1 = sphere, 0 = cube 'image options SavePath = "c:\temp\amsg\" 'where to save files to, make sure has ending \ ColorMode = 2 '0 = black & white, 1 = color on white, 2 = full color ShowRoutes = true 'whether to show routes or not ScaleZ = true 'whether to scale system indicators based on their +/- Z coordinate ShowGrids = true 'whether to show grids or not FontScale = 1 'font scale factor. amount to multiply the font size by, can be decimal like 1.5 SystemScale = 1 'system scale factor. amount to multiple circle for system marker, can be decimal ImageSize = 4000 'width & height, in pixels, of generated image Orientation = 0 'axis orientation, 0 = x/y, 1 = x/z, 2 = y/z 'Do the image generation ExpCount = 0 n = sector.SystemCount For i = 1 to n sector.selectall false b = sector.GetSystem( i-1) If (b.Visible) and (b.ChildPopulation > PopLimit) Then 'info display sector.RenderMessageBig = "Exporting 2D Maps" sector.RenderMessageSmall = CStr(i) & " / " & CStr(n) RefreshScene 'create a new sector object, export to it a 10ly submap of main sector, export the new sector, 'and then free it sector.selectbody b expsector = CreateSector() sector.CreateSubmapFromSelected expsector, MapDistance, MapShape expsector.Export2D SavePath & b.Name & ".png", ColorMode, ShowRoutes, ScaleZ, ShowGrids, FontScale, SystemScale, ImageSize, Orientation FreeObject expsector ExpCount = ExpCount + 1 End If If ExpCount > ExpLimit Then Exit For Next RefreshScene