Anyone find out how the Texture Declaration System works?

From messing around with it, this looks like the best way to add in custom textures for existing units.
However I've been testing it with a gateway that has an alternate skin.
Getting this to work on another unit has been somewhat annoying since there are quite a few variables in it.