Well, I don't know what any new research says but I don't believe that it is hereditary. I don't think that taking the substances you've mentioned will increase your chances of getting it though there has been some debate over the years (regarding weed) that some people with mental health issues react with paranoia which can lead to psychosis. Some people can't do weed at all and others are not affected that way, I would stay away from it if you can. Coffee is unlikely to cause mental health issues. The best thing you can do is to take care of your mental health and look after your health.
__________________
Pegasus
Got a quick question related to mental health or a treatment? Ask it here General Q&A Forum
“Everybody is a genius. But if you judge a fish by it's ability to climb a tree, it will live it's whole life believing that it is stupid.” - Albert Einstein