What makes creme brulee set? I've attempted to make creme brûlée several times using different recipes. The usually result is that the custard doesn't set, and gets up too runny. I've tried adjusting the ingredients, and the amount of time I let the finished product set in the fridge.

I'm wondering what is the cooking process or ingredient that determines the consistency? Time in the oven, level or water in the around the ramekins in the oven, amount of creme/milk compared to egg yoke?
I would prefer to give an answer that doesn't involve spending hundreds of dollars, but Modernist Cuisine has a great table about the consistency of custards comparing cooking temperature to egg concentration. If you can find a copy at your local library the kitchen guide has a table on page 233, otherwise check out volume 4 page 84.

Quick synopsis: What sets the creme brulee is the egg proteins coagulating. If you were to take the weight of the liquid in the brulee and add 30% of that weight as eggs and cook it to 181 degrees F you would have a creme brulee texture. Overcook to 190 F and you have flan, undercook to 176 F and you have creme anglaise. The two main factors are egg concentration and cooking temperature.