runcode import com.fs.starfarer.api.util.Misc; String planetName = "Invictus"; String moonName = "Vitae"; String moon2Name = "Neptunia"; String moon3Name = "Nidvallir"; float planetOrbitDays = 180; float planetSize = 200; float moonOrbitRadius = planetSize * 4; float moonRadius = planetSize / 4; float moonOrbitDays = 40; float moon2OrbitRadius = planetSize * 6; float moon2Radius = planetSize / 6; float moon2OrbitDays = 60; float moon3OrbitRadius = planetSize * 8; float moon3Radius = planetSize / 6; float moon3OrbitDays = 40; Vector2f playerCoords = $playerFleet.getLocation(); float angleCCW = Misc.getAngleInDegreesStrict(playerCoords); StarSystemAPI sys = (StarSystemAPI)$playerFleet.getContainingLocation(); PlanetAPI star = sys.getStar(); float orbitRadius = Misc.getDistance(star.getLocation(), playerCoords); PlanetAPI planet = sys.addPlanet(planetName, star, planetName, "terran", angleCCW, planetSize, orbitRadius, planetOrbitDays ); MarketAPI market = sys.getEntityById(planetName).getMarket(); market.addCondition("organics_plentiful"); market.addCondition("farmland_bountiful"); market.addCondition("ore_ultrarich"); market.addCondition("rare_ore_ultrarich"); market.addCondition("volatiles_plentiful"); market.addCondition("habitable"); market.addCondition("mild_climate"); market.addCondition("solar_array"); PlanetAPI moon = sys.addPlanet(moonName, planet, moonName, "terran", 0, moonRadius, moonOrbitRadius, moonOrbitDays); market = sys.getEntityById(moonName).getMarket(); market.addCondition("organics_plentiful"); market.addCondition("farmland_bountiful"); market.addCondition("ore_ultrarich"); market.addCondition("rare_ore_ultrarich"); market.addCondition("volatiles_plentiful"); market.addCondition("habitable"); market.addCondition("mild_climate"); market.addCondition("solar_array"); sys.addCustomEntity(null, null, "comm_relay", "player").setCircularOrbitPointingDown(planet, 90, moonOrbitRadius, moonOrbitDays); sys.addCustomEntity(null, null, "nav_buoy", "player").setCircularOrbitPointingDown(planet, 180, moonOrbitRadius, moonOrbitDays); sys.addCustomEntity(null, null, "sensor_array", "player").setCircularOrbitPointingDown(planet, 270, moonOrbitRadius, moonOrbitDays); PlanetAPI moon2 = sys.addPlanet(moon2Name, planet, moon2Name, "ocean", 0, moon2Radius, moon2OrbitRadius, moon2OrbitDays); market = sys.getEntityById(moon2Name).getMarket(); market.addCondition("organics_plentiful"); market.addCondition("farmland_bountiful"); market.addCondition("ore_ultrarich"); market.addCondition("rare_ore_ultrarich"); market.addCondition("volatiles_plentiful"); market.addCondition("habitable"); market.addCondition("mild_climate"); market.addCondition("solar_array"); sys.addCustomEntity(null, null, "comm_relay", "player").setCircularOrbitPointingDown(planet, 90, moon2OrbitRadius, moon2OrbitDays); sys.addCustomEntity(null, null, "nav_buoy", "player").setCircularOrbitPointingDown(planet, 180, moon2OrbitRadius, moon2OrbitDays); sys.addCustomEntity(null, null, "sensor_array", "player").setCircularOrbitPointingDown(planet, 270, moon2OrbitRadius, moon2OrbitDays); PlanetAPI moon3 = sys.addPlanet(moonName, planet, moonName, "barren", 0, moon3Radius, moon3OrbitRadius, moon3OrbitDays); market = sys.getEntityById(moon3Name).getMarket(); market.addCondition("organics_plentiful"); market.addCondition("farmland_bountiful"); market.addCondition("ore_ultrarich"); market.addCondition("rare_ore_ultrarich"); market.addCondition("volatiles_plentiful"); market.addCondition("habitable"); market.addCondition("mild_climate"); market.addCondition("solar_array"); sys.addCustomEntity(null, null, "comm_relay", "player").setCircularOrbitPointingDown(planet, 90, moon3OrbitRadius, moon3OrbitDays); sys.addCustomEntity(null, null, "nav_buoy", "player").setCircularOrbitPointingDown(planet, 180, moon3OrbitRadius, moon3OrbitDays); sys.addCustomEntity(null, null, "sensor_array", "player").setCircularOrbitPointingDown(planet, 270, moon3OrbitRadius, moon3OrbitDays);