1
Modding / [0.96a] Add Stable Locations using Console Commands
« on: August 13, 2023, 07:21:57 PM »
I made this mod because I wanted to add more Stable Locations in a system.
Obviously this is a cheat.
Instructions:
1) Park your fleet where you want to make a new Stable Location.
2) Open Console Commands
3) Type 'AddStableLocation'
4) Done
Requirements: Console Commands by LazyWizard
Credit to Histidine and Algester's posts, quoted below.
Obviously this is a cheat.
Instructions:
1) Park your fleet where you want to make a new Stable Location.
2) Open Console Commands
3) Type 'AddStableLocation'
4) Done
Requirements: Console Commands by LazyWizard
Credit to Histidine and Algester's posts, quoted below.
Editing the save is probably too complicated, but you can use the Console Commands mod with the following command (copy and paste):Code: javaThis creates a new stable location at your fleet's current location. You can tweak orbitDays for realism if you want.runcode SectorEntityToken fleet = Global.getSector().getPlayerFleet();
StarSystemAPI sys = (StarSystemAPI)fleet.getContainingLocation();
SectorEntityToken stable = fleet.getContainingLocation().addCustomEntity(null, null, "stable_location", "neutral");
float orbitRadius = com.fs.starfarer.api.util.Misc.getDistance(fleet, sys.getCenter());
float orbitDays = orbitRadius / (20f + new Random().nextFloat() * 5f);
float angle = com.fs.starfarer.api.util.Misc.getAngleInDegrees(sys.getCenter().getLocation(), fleet.getLocation());
stable.setCircularOrbit(sys.getCenter(), angle, orbitRadius, orbitDays);
this is the more simplified version of the Stable Location based on the player location found way earlier of this forum post you can search for it though unless you are a lazy personCodeyou can change stable location to "nav_buoy", "comm_relay", "sensor_array" while adding "nav_buoy_makeshift" so on and so forth turns them into makeshift variantsruncode PlanetAPI star = ((StarSystemAPI) $loc).getStar(); if (star != null) { $loc.addCustomEntity(null, null, "stable_location", "neutral").setCircularOrbitPointingDown(star, VectorUtils.getAngle(star.getLocation(), $playerFleet.getLocation()), MathUtils.getDistance(star.getLocation(), $playerFleet.getLocation()), 180f); }
I got autogenerate Hyperspace jump points to workCoderuncode Global.getSector().getStarSystem("System Name").autogenerateHyperspaceJumpPoints(true,true)
// the first true statement is for Gas Giants
// the second true statement is for generating Fringe Jump Points