Dev Notes: Code generation tools - openly-retro/stellaris-machine-robot-expansion GitHub Wiki
There are so many blocks of repeated code, if there was just a way to automatically generate them to avoid hours of copy-pasting and accidentally creating typos in the meanwhile....
So... "Why Not?"
The concept will be to iterate over a YAML file with info about traits, and generate GUI code and button effects for all classes, all traits, for both core-modifying and leader-making features. Then copy-paste the output into the mod's files.
And Code generation tool underway
Interestingly while developing this I discovered that not all the effects buttons have been renamed yet from their 3.9 versions :)
Some effects were set not to show the trait if paragons dlc isnt intalled. I felt that was redundant.. since there is code to stop it from being clicked if the dlc isn't enabled.