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

Make cancellation of Passenger's activity on unload from Cargo optional #21079

Closed

Conversation

michaeldgg2
Copy link
Contributor

The PR makes it possible to keep passenger's next activity (after RideTransport). This is useful for "ride and capture" attacks:

  • queue loading engineers (or other capture-capable actors) onto a transporter (Cargo actor)
  • also queue the capture order for the engineers of the target building (or other capturable actor)
  • queue moving the transporter next to target building and queue deploy order

Example usage in OpenE2140 mod (here, any infantry actor can capture buildings):

opene2140_ride_and_capture

@PunkPun
Copy link
Member

PunkPun commented Sep 27, 2023

this will have issues when it comes to the most common way of loading transports. Which is ordering all unit to enter all transports via queueing

@michaeldgg2 michaeldgg2 force-pushed the passenger-cancel-activity branch 2 times, most recently from 89de10a to cfe5b03 Compare September 28, 2023 11:12
@michaeldgg2
Copy link
Contributor Author

As per our discussion on Discord, in INotifyKilled.Killed of Cargo I changed queuing Nudge activity directly on Actor to queuing child activity on current activity (RideTransport).

I tested it on TS, since APC there is using EjectOnDeath of Cargo trait. It seems to be working correctly:

ts_CancelActivitiesOnExit_false

As for your comment here, I don't know how to solve this. Because both scenarios are possible:

  1. scenario, which gets broken by the PR
  • load infantry onto first transporter and also queue loading onto second transporter
  • send the both transporters to target destination and queue unloading passengers

Player expects that after all infantry is unloaded, they can use all of them freely, but group of infantry that could not fit the first transporter, would try to enter the second transporter at target destination.

  1. scenario in OpenE2140, which this PR enables (also in the GIF):
  • load infantry onto transporter and also queue capturing enemy building
  • send transporter next to the enemy building and also queue unloading passengers

If the PR can preserve both scenarios somehow, even more powerful scenarios would be possible such as:

  • load infantry onto first transport and also queue loading onto second transporter
    • but also queue capturing first enemy building, exiting this building and then capturing second enemy building
  • send transporter next to both enemy buildings and also queue unloading passengers

Without solving this, player would need to do more micro-management: carefully load both transporters and then queue capturing enemy buildings.

@michaeldgg2
Copy link
Contributor Author

Closing the PR as it was deemed to be too mod-specific. Another PR (#21084) adds extension point to UnloadCargo activity, which makes it possible to implement this behavior in a mod.

@michaeldgg2 michaeldgg2 deleted the passenger-cancel-activity branch September 29, 2023 15:25
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