How exactly does SetDetailLayer (xBase : int, yBase : int, layer : int, details : int[,]) work?
Check this question for an example.