Idea for UU Infantry - more use cases

It would be interesting if all UUs could be trained from normal production buildings, not only from castle. Would give much more use to these. Maybe doable with a mod?