Allow automatically loading constructed units into constructed transports #6164
+110
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Demo of two backend lua widgets for autoloading units in transports. Allows (for example) infinite construction of stingers carrying mech marines.
First widget: If a land factory is assisting an air factory, any non-engineer units from the land factory will be routed to assist the air factory instead of going to the land factories rally point.
Second widget: When an air factory finishes constructing a transport, it checks for the presence of any non-engineer land unit guards. This works independently of the first element; units can be manually ordered to assist a factory and will be loaded into transports in the same manner. Prototype only loads 1 unit per transport, but additional logic can check the size of the transport and load units as appropriate.
Stretch goals: give units assisting an air fac special formations, either a basic square or a more advanced arrangement where they group up with respect the air factory's build queue. Right now they play musical chairs as more units arrive/are loaded, which is workable but distracting and carries all the usual factory assist pathfinding issues.
autoloader_v2.mp4
See discussion here: https://discord.com/channels/197033481883222026/1144605729911738439