Here's a rework of a system I made about a year or two back, a lockpicking system for doors (easily adapted for chests) based on the d20 system. It's really just a bunch of variable comparisons. The comments are all explaining why a given thing is neccesary or works the way it does.