I actually do not know as I never explored this part of Heroes V modding.
However you can inspect Skeggy's presents for 5.5. They are quite some dated now but will do the work. Download the files and check how he did it.