Okay 0s79, I left mine depletion alone, that still occurs the same was as before, but Resource Depletion has been completely rewritten. See what you think:
Each turn, for each player, the game calculates how much you are using each particular resource. If you are constructing a project, unit, or building that requires the resource, the *arbitrary* value of that resource increases by the production cost of the item. Also, every city is checked to see if it is earning an income from the resource, or happiness, or health, or defense, or if having the resource speeds up the production of the current building, unit, whatever. Anyway, this value is calculated only once per turn per player and stored. Since it's only calculated once per turn, it should have minimal (approximately none) affect on turn times.
Then, the game uses the Depletion XML value for the resource, scales for gamespeed AND world size AND how many of the resource there are TOTAL in the entire map (so really rare resources are unlikely to deplete) and then divides the by resource value for the player, as calculated above. So if you are using a resource alot, the resulting number will be lower. Then, the game rolls a random number, based on those odds. Remember a higher number means lower odds of it being 0. (It's less likely to roll a 0 if it's checking between 10000-0 then 10-0.)
So it's still random, but using a resource a lot will increase the odds. Oh, and it depletes if you simply have access to it, it doesn't matter if the city is working it or not.
I stuck a logging message on to log each resource and when it deplete. 30% the way through an AI Autoplay game and only two times has a resource deplete. Which makes sense though, the late game should be harder on the resource. I'm not 100 sure I've got the formula completely balanced yet, it may be too high or too low, more test games will reveal that.