Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow automatically loading constructed units into constructed transports #6164

Draft
wants to merge 4 commits into
base: deploy/fafdevelop
Choose a base branch
from

Conversation

clyfordv
Copy link
Contributor

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

@Garanas
Copy link
Member

Garanas commented May 12, 2024

About the feature: I like it, but I'm also feeling conflicted. I do certainly think it is interesting and novel and I also understand the value. While testing I noticed two problems:

  • (1) At the moment only one unit attaches to the transport. That appears to be intentional though, given the Stinger example.
  • (2) This only works when the land factory shares at least one blueprint that it can build with the air factory. When an Aeon land factory assists a UEF air factory then the assist order is cancelled. This is engine behavior and it makes sense from a code perspective but to the user it could be annoying.

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.

While working on #5908 I noticed that units can have unique guard formations. The property is called GuardFormationName and it is in the AI table section. I assume links to a function name in formations.lua. I think you can experiment with that to create a better, alternative formation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants