I don't have a modded game for fear of messing up my KotOR game.
And I achieved this alternate ending on my XBOX, not pc. And I have no idea how to mod KotOR on consoles.
I didn't mod this game. It is fully possible to achieve the alternate ending on the console version.