~/nms_ss

Everything you never wanted to know about Shadow Stars

Regions

Every galaxy is split into regions, which are cube shaped areas that can hold 4096 stars. In practice, each region only has around 500 stars, because the game generates only some of the possible stars. The stars which the game doesn't generate are called phantom stars. These can only be reached by cheating, or by having someone who cheated take you there.

Portal Addresses

Portal Addresses are made of 12 glyphs, and their format is PSSSYYZZZXXX. The first glyph is the planet index, the next three are the solar system index, and the rest are the coordinates of the region. You'll find that the available solar systems are all on the lower end of the scale. That is, if you start at 1 and continue increasing it, you will go through all of the available solar systems in a given region, and all of the phantom stars in the region have a greater SSI. There's some cutoff point and the game doesn't generate systems above that point, but it's a different number in each region.

Shadow Stars

Every region has exactly one shadow star in it. The SSI of the Shadow Star is one greater than the highest SSI that the portals will take you to in the region. This is exactly like phantom stars so far, but the difference is that these stars actually do exist and are reachable. The catch is that they can only be reached by warping to them from the galaxy map. That sounds manageable, but there isn't an obvious way to tell the shadow star apart on the map.

Finding Them

So, first we want to find out what the Shadow Star's SSI is, because once we find it we'll locate a portal and request the address in order to check that it is in fact the shadow star.
Locate a portal in the region you want to find the shadow star, and write down it's address. The easiest way to do this is to write the glyphs as hexadecimal. Then I like to change the planet address to something small like 1, as some systems only have a few planets. Now, if you portal to an address with a very high SSI, like 999, the portal will show an error and instead open to the closest available system.
What we want is to find the highest SSI the portal will take us to, and then add one to that. This can be brute forced if we just count up one-by-one, but this is very slow. It turns out that we can do something called a binary search to greatly reduce the amount of stars we have to check. Heres how it works:

  1. Pick a large SSI, like 250 (remember this is in hexadecimal, so its more like that upper bound of 500-600 in decimal).
  2. Take the portal address you wrote down and replace the SSI with the one you chose.
  3. If the portal gives you the error, this SSI is now your upper bound. The lower bound is 0.
  4. Try again with the SSI exactly between your upper and lower bound.
  5. If the portal gives you the error, this SSI is you new upper bound. If it doesn't then this is your new lower bound
  6. Repeat this process of choosing the middle SSI between the two bounds and then adjusting the bounds based on the result until you have one SSI which the portal accepts but which the portal stops accepting if you increase it by 1. The increased-by-one SSI is your shadow star.

Ok, so what? We can verify the Shadow Star now, but this doesn't help us find it. We still need to check each star in the region individually to find the Shadow Star. Here is where you can make a decision:
  1. We can use external tools that have been made by reverse engineering the game, in order to predict the name of the star. This helps greatly when looking for it in the map - just one look at a star is enough to determine if its the right one. This doesn't involve save editing or modding the game at all, but you may still consider it cheating.
  2. If you do consider the previous option cheating, you're left with either checking each star individually, the slow way, or giving up.
In the rest of this page I'll be talking about how to do the former.

The Better Way™

We'll use two tools. One to convert the portal address of the Shadow Star to galactic coordinates (guess the address isn't so useless after all!) and another which will generate the system name for us given those galactic coordinates.
The first is a handy webpage. Enter the address and copy the galactic address.
The next tool we are going to use is a command line program. Unfortunately this isn't very user-friendly, you even have to compile it yourself. This is a working solution but could be much better.
Run the program, and then when prompted run the following:
/system coords galactic:address:you:copied:and-then-the-galaxy-index-goes-here
where the galaxy index is the one listed on the wiki page minus one.
If you want to be sure you've done this correct, you can do the same for the system with the highest accessible SSI (the Shadow Star minus one) and make sure the name it gives you matches up with the system that the portal takes you to.
After this all that's left to do is look around on the map until you've found the system. This can take about 10 minutes.

It could be better.

Theres plenty of room for optimization in this method. If we could reverse engineer the star generation we could automatically know what the max SSI is, and maybe even determine what the closest portal-accessible star is. I've made an attempt at the former, but it's not a very easy introduction to reverse engineering, so no progress on that yet. The existing tools could also be combined into something more intuitive that takes your Shadow Star's portal address and galaxy and goes through the entire process to determine it's name from there.