Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Questions about creating and removing planets  (Read 2547 times)

Nivri

  • Ensign
  • *
  • Posts: 27
    • View Profile
Questions about creating and removing planets
« on: May 04, 2020, 10:42:58 AM »

I installed the Console Commands Mod and I want to learn how to remove planets in a star system. As for creating planets, I found this code:
RunCode Global.getSector().getStarSystem("System_Name").addPlanet("Added_Planet_Name", Global.getSector().getStarSystem("System_Name").getStar(), "Added_Planet_Name", "Planet_type", Planet_Angle, Planet_Size, Planet_orbit_radius, Planet_Orbit_length)

I have questions about it like what is orbit radius and orbit length. I'm kind of new to these stuff but I really want to learn. Thank you in advance for anyone willing to answer
Logged

dead_hand

  • Lieutenant
  • **
  • Posts: 72
    • View Profile
Re: Questions about creating and removing planets
« Reply #1 on: May 04, 2020, 10:57:28 AM »

Orbit radius here means how far away your planet is from the star. Higher number -> further away from the star.

Orbit length, how fast does it circle around the chosen star. Higher value -> more time to take the circle around the star (iirc)
Logged

Nivri

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: Questions about creating and removing planets
« Reply #2 on: May 04, 2020, 11:59:24 AM »

Thank you so much. Do you know how to remove some of the planets by any chance?
Logged

dead_hand

  • Lieutenant
  • **
  • Posts: 72
    • View Profile
Re: Questions about creating and removing planets
« Reply #3 on: May 04, 2020, 12:32:58 PM »

Thank you so much. Do you know how to remove some of the planets by any chance?

I believe there is a removeEntity in the API, but I'm not sure if it will work. You would also want to probably ensure that the planet you are removing hasn't got a market etc.
Logged