A common understanding about a fundamental belief. As in a religious viewpoint, or a die hard love for Star Trek or just about anything. The main thing is that we agree on a core value and communicate from that perspective. I have a few friends and my relationships with each of them is based on something different in every case. Simply put, the most important character trait is that we agree on a life value (not Star Trek - but for some this works too). After that, loyalty.
As much as I hate the human compulsion to gather in groups, I must admit that that compulsion is manifested in my friendship values. But once I have made that connection, it is highly unlikely you lose me as a friend, no matter what mistakes you make, and I hope that my friends will always forgive me for mine!