I have successfully using triggers to let the barrack train samurai and archer range train longbows.
The issue is that I do so for the ai player as well but it does not know to train them,
it’s an especially serious issue when I replace the archer line with longbows.
What about using triggers? Set area to all the map or where their base is, condition have X resources in stock and a timer… effect: train unit from building y and remove X resource as a cost.