I'm doing a bit of modding at the moment. And a difficulty I've found on a number issues I've tried to get my head around is to work with IDs. For example I'm looking at someone else's mod (morrowind lockpicking) to see if I can figure out a way round a limitation in the mod that because the lockpicks are renamed they are taken away from you when you're sent to prison. So I'm looking at the way objects from your container are removed and placed in a new container when you are sent to jail. In this example it's complicated slightly by the fact that when you're arrested the first time the container your items is moved to has a null reference in OnAdd or OnDrop. But I can see ways of figuring round that. However the issue I keep coming up against is I want to be able to tell if a reference belongs to a certain type of object. So in this case I want to be able to tell if the chest I am opening is the Evidence chest. I know that they are all based on the same object and that it has a form ID of 11 or StolenGoods and that I has a name Evidence, but I don't know how to check that any reference I have is actually that Object in the game.
To be honest I think I'm just quite confused about how the whole reference thing works in Oblivion.