My generator is mostly done now.

It can generate star systems with multiple stars and planets in a relatively realistic fashion.
I could not find how to order stars and planets in a certain order after they have been generated without messing things up.
For example, I would like to take the generated stars in a new column and order them by mass to find the main star of the system. So if I have a system with a G star and a M star, the G star is considered the main star.

But that is not mandatory, it 's pretty obvious which star is the most massive in most cases. Giant old stars would be more problematic to classify mass-wise but they are very rare.
I've generated around 50 so far and haven't encountered any issues.

It would be cool if i could add subsystems (planet orbiting around a star that is orbiting around another star) but there is so little data on exoplanets that I might has well do whatever I want.

I've decided to include LMTY (whatever) stars known as Brown Dwarf since they are apparently not that common. About 1/6 of all stars, assuming they are considered to be stars. They are categorized as YTL.

I don't know how multiple star systems are supposed to be arranged. I assume that if 2 stars are of a similar mas, they will orbit one around the other (a common barycenter). But it gets weird if you have three stars of similar mass, since the system should be unstable. It is possible to have up to 7 or 8 stars in the same system. There is actually one of such system IRL. Multiple star systems are common but it's unlikely to generate anything above 4 stars.

You can test it here. It's the third tab. Press F9 to generate new systems.
System generator.zip

As I mentioned, I made planets pretty common, possibly an optimistic vision but not too much.
Yet, planets able to support life are not very common.
With more planet per systems, habitable planets became more likely. If you triple the number of planets, you triple the possibility to have at least one habitable planet per system.
I adjusted the number down. Many stars can't generate habitable planets at all.
Most have thin atmosphere, liquid/solid ones or none at all.