This is cool. In a NWN1 project, I recently used a solution to a scripting problem that made me wish such a function existed. Instead, within each affected object's OnSpawn I assigned the object a random string from a combination of integers and hoped they'd never get duplicated.