For instance, queuing a villager to build several buildings in a row is now possible. Also adds a task queue for villagers. Any idle villager will automatically grab the first task in the queue. The task queue is used to implement the more complex initial villager tasks, so it is possible that a different villager will do later tasks in the queued villager's chain of tasks, but only if there are already idle villagers. As long as the user does not wish to leave villagers idle for a long time, this should not affect accuracy too badly.
This is a simulator that produces a timeline of villager production and resource gathering for Age of Empires 2.
You can see the tests/test.py file for examples of how to use it.
The sofware has been lightly verified (i.e., I ran some tests), but it has not been validated (i.e., I didn't check that it actually matches AoE2 results).
The code tries to keep you from shooting yourself in the foot. It checks whether you are housed, do not have enough resource to build what you are trying to build, etc. There are various known limitations, such as the fact that farming produces food constantly in the simulator, and there are undoubtably more checks that I forgot to include.
Why would you need this? Well, say you were trying to develop a new build order. You could play variations out in the game for maximum accuracy. You could do simple math by hand or in a spreadsheet to quickly get approximate answers. Or, you could use a Python library you found online that is probably clunkier and less accurate than both other options! What's not to love?
With a nice GUI, the software might be somewhat usable, but I doubt I will get around to that.
Enjoy!
Data source
My thanks to https://ageofempires.fandom.com/wiki