Dear @rubik! This piece of code is one of the most beautiful things I had pleasure implement into them mod. When I read that this version of troop-tree will do with even most complicated army compositions I was very sceptical about it. Not that I don't believe your coding skills, but because I have around 1300 different troops on the counter. Divided into over 20 different factions. Different races... and so on.
Then I implemented this into my mod, Paradigm Worlds, and it works perfectly. More, thanks to that Tree View I was able to locate few mistakes. But most important, first time in life of that mod I could see all troops, not as a numbers in module file, but as very nice visualisations, linked one to another.
Thank You very much man, you made a great thing that improves a lot of mods, mine too. I will give it to players with version 1.05. They asked me to make that work for many days and thanks to you it happened. Cheers!
link to the mod if anyone interested: