Yes, it influences the ending.
Would you be able to tell me where you can no longer affect which ending you get is?
You can change it up until the last battle basically.
Awesome thanks and love the game btw