Braga and Moore have said they actually put that scene in themselves in order to entice Shatner.
It's real easy to tell when a story is written for the character, or the actor. Compare Ron Moore's TNG episode "Relics" to "Generations". There is a lot of respect and understanding towards Scotty's character. Not only does he recite some of his memorable encounters from the original series, he also reflects on where he is in life and how out of place he is with newer technology. It gives him something new to do without being out of character.
I don't care what the apologists for Generations say, Kirk's #1 desire has always been commanding a starship. When he gets promoted to Admiral and given an office job, he always finds ways to get back his command back whether through a crises that he thinks only he can handle or at the insistent of his friends. When he's sitting on that captain's chair, that's where he wants to be. What kills me is that the opening of Generations uses this as an actual set up with Kirk looking longingly at the Captain's chair of the Enterprise B and having to resist the urge to take command when Captain Harriman leaves the bridge. This is a set up that has no pay off because we're lead to believe that Kirk's number one fantasy is to live in a cabin up in the mountains with a woman we've never heard of and ride horses. Christopher Pike had more connection to horses than Kirk did!