I do not think that calling Tallinn a failing example here is so fair. They can improve transport but making it free is a good step, the problem is with the people in the cars not with the idea of how to make the public transport more interesting to them.
But yes it has to come together as well with making sure that the public transport can reach all parts of the city and is regular so that peole do not have to wait around. Easier in bigger cities than small ones maybe.