Getting Mira into your party in Knights of the Old Republic 2 depends on your alignment.
You recruit Mira by playing as a light-side character when you reach Nar Shaddaa. If instead you are following the dark side, you will get Hanharr, the Wookiee bounty hunter, in her place.
So your moral choices on the road to Nar Shaddaa determine which of these two companions joins you.