I always assumed that the good guys wouldn't want me as a friend so I never got close enough to be accepted - because then I couldn't get hurt by being dumped or rejected. the bad guys were the ones I was afraid of so I avoided them, too. the only friends I had growing up were the fellow rejects and outcasts and there wasn't much we could offer each other except our shared misery. that was until I was out of high school.
in college - it was different - nobody knew I was "supposed" to be the scapegoat - so I got a new start - but by then I was so wary of other people that I didn't really know how to be a friend. i was surface friends with lots of people - but not really close to any. a well-known loner.
I guess I can't answer your question beyond this -
in order to have a good solid friendship I *think* you have to respect yourself more - so that you don't sabotage yourself and the friendship. can't be too dependent and desperate because that scares people away. can't be too cool and distant and passive - cause that makes them think you don't care. just my observations of others...
keep at it, Luke - you'll learn as you go and eventually get it right. it is better than staying lonely.
"That you are here - that life exists, and identity; that the powerful play goes on and you may contribute a verse. . . What will your verse be?" Robin Williams as John Keating in "Dead Poets Society"