guerringuerrin Posted Sunday at 06:50 Report Share Posted Sunday at 06:50 (edited) When we try to produce units from multiple barracks at the same time but don't have enough resources to assign the desired number of units to each barracks, it often happens that units are added to the production queue of already occupied barracks, while free barracks remain idle. This results in long production queues accumulating in fewer barracks than we actually have available, and it also locks up resources that remain reserved for those units. This week, I have been working on a mod to fix this bug in 0 A.D.'s training system. Additionally, I added an option to define the maximum number of units in the production queue. This works the same way as for free barracks: if some of our barracks have reached the maximum queue limit, new units will only be assigned to the free barracks. I'm sharing two videos showing the behavior. When producing in batches, the mod takes into account the number of occupied "slots" in the queue. That is, it does not consider the number of units produced but rather the number of assigned batches in the queue. Also, I added an alternative production system based on the standard system from AoE2, where units are assigned, as we issue the command (via hotkey or click), to the free barracks or the one with the fewest queued units. For now, this system only applies to individual units (not batches). This means we can combine both systems—producing one unit per barracks each time we issue a command or distributing multiple batches among the selected barracks when using batch production. The spirit of this mod is to offer an alternative approach to what I consider to be design flaws in 0 A.D.'s vanilla training system. Distributing it as a mod gives us the opportunity to conduct the necessary tests and receive feedback with a view toward its implementation in the next release. I want to give a special thanks to @Atrik for pointing me to the necessary game files to modify and for sharing a preliminary code to implement this mechanism. To install: unzip the content of the folder into your mod's folder. (I plan to make the .pyromod file and add it to mod.io in the future) CustomTrainer.zip AoE2.mp4 176872599_MaxQueueLimit2.mp4 Edited Sunday at 19:42 by guerringuerrin 4 2 Quote Link to comment Share on other sites More sharing options...
Feldfeld Posted Sunday at 21:26 Report Share Posted Sunday at 21:26 14 hours ago, guerringuerrin said: When we try to produce units from multiple barracks at the same time but don't have enough resources to assign the desired number of units to each barracks, it often happens that units are added to the production queue of already occupied barracks, while free barracks remain idle. This results in long production queues accumulating in fewer barracks than we actually have available, and it also locks up resources that remain reserved for those units. I agree it is not smart, I also face that issue. 14 hours ago, guerringuerrin said: Also, I added an alternative production system based on the standard system from AoE2, where units are assigned, as we issue the command (via hotkey or click), to the free barracks or the one with the fewest queued units. Not exactly correct as far as I remember. AoE2 assigns the barrack based on the training/research time of queued items. So if barracks A has 1 item and barracks B has 3, next unit could still be assigned to B if A is researching a long technology. 1 1 Quote Link to comment Share on other sites More sharing options...
guerringuerrin Posted Sunday at 21:43 Author Report Share Posted Sunday at 21:43 9 minutes ago, Feldfeld said: I agree it is not smart, I also face that issue. Not exactly correct as far as I remember. AoE2 assigns the barrack based on the training/research time of queued items. So if barracks A has 1 item and barracks B has 3, next unit could still be assigned to B if A is researching a long technology. Thanks, FeldFeld, thats interesting. I thought it was only about amount of items in the queue. I might modify that feature to fully mimic that behavior besides it's not the main purpose of this mod, tho. But some players might find better to play that way. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted 21 hours ago Report Share Posted 21 hours ago I think number of items is a fine enough improvement, but length of time is better if achievable. If not, I'm perfectly happy with the incremental improvement. Good job. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.