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

Reward is not given for enemy VIP if the soldier carrying him is the last one to evac #1342

Open
DSeyka opened this issue Jun 16, 2021 · 7 comments
Labels
bug Something isn't working highlander Requires a change to the community highlander probably fixed Feels like hasn't been a problem for a while, best still check with community or test in-game
Milestone

Comments

@DSeyka
Copy link

DSeyka commented Jun 16, 2021

Hello there! Attaching a save with a bug described above, it's 100% reproducible on my end.
save_lost vip_1.zip

Steps to reproduce:

  1. Load the save
  2. Evac everyone except for 'Big Nasty' (the grenadier carrying the enemy VIP)
  3. Evac 'Big Nasty', note Central saying "we've lost the package"
  4. While VIP is still shown at the post-mission screen, observe number of contacts on Avenger to be 5/6
  5. Load the save again
  6. Evac 'Big Nasty' first, then everyone else.
  7. Number of contacts is now 5/7 (mission reward for getting enemy VIP out alive is correctly applied)

I'm using LWOTC Beta 4.1 and no mods whatsoever outside of required ones.
Thank you for your attention, and I hope this is helpful.

@pledbrook
Copy link
Collaborator

That is so bizarre. The post mission "loot" screen shows the VIP as captured. Will look into it.

@pledbrook pledbrook added the bug Something isn't working label Jun 16, 2021
@pledbrook pledbrook added this to the 1.0 milestone Jun 16, 2021
@DerAva
Copy link

DerAva commented Jun 16, 2021

For what it's worth, this is a vanilla wotc/xcom2 bug.

@tracktwo
Copy link
Contributor

This bug has plagued me since XCOM2 first released. I mostly worked around it in evac all, but fixing it completely requires kismet changes for the mission script. I packaged a fixed mission script with the vanilla version of evac all but stopped doing that for the wotc version because it can cause compatibility issues with some other mods that also try to hook that particular mission. If you have already replaced this mission script with a custom one in LWOTC it should be fixable, though.

@pledbrook
Copy link
Collaborator

Haven't replaced it yet, but was considering doing so for this issue. But I couldn't work out what the problem is. The debugger didn't trip on the "UnitDied" event listener, but that's the only route through which the "Target lost" voice over is triggered. I didn't even understand why leaving the VIP behind still had "VIP Captured" displayed in the after-mission loot screen.

Do you remember what the workaround/fix was?

@tracktwo
Copy link
Contributor

The problem is that when you evac a soldier that is carrying a VIP both units are processed in the same game state submission. If the very last soldier on the map is carrying the VIP it trips the bug:

  • The game state for evacing the last unit w/ VIP is handled, and both are removed from the map.
  • The 'EvacActivated' kismet sequence is run for the evac'd soldier.
  • This isn't the VIP, so it runs another sequence to see if the VIP can still be extracted.
  • This runs the UMS_CheckIfXCOMHasSoldiersThatCanCarry sequence, which fails because there are no living, non-SPARK XCOM soldiers left in-game.
  • Kismet runs a bunch of mission failed kismet stuff for VO and objective marking.

In the original Evac All I think I reworked the kismet so that it checked specifically if the VIP was still on the map in addition to either being dead, unconscious, or bleeding out. If they're in one of those states but not on the map then they were evac'd.

For the wotc version of evac all I first tried to tease the game state submissions apart for the VIP and the soldier carrying them, but that wasn't something that was feasible just in Evac All without overrides that I wanted to avoid. This could possibly be more easily solvable in the highlander now, and fixing it there would solve the problem everywhere. OTOH I don't know if there would be other side effects from splitting the carrying/carried evac into two separate states.

What I ultimately decided on for evac all was to split the evac of multiple units into two submissions: first the unit carrying the VIP, then everyone else. The bug still remains in evac all in exactly the same situation it exists in unmodded wotc, but most of the time people bulk evac and it works.

@pledbrook
Copy link
Collaborator

Thanks for the explanation. It's really weird, because SeqEvent_EvacActivated clearly handles multiple units evaccing together. I guess the "team out of units" gets triggered as soon as the last soldier is processed. Awkward if that's the case.

@DSeyka
Copy link
Author

DSeyka commented Feb 12, 2022

This is still not fixed in 1.0.2, just so you guys know.

@copyrite copyrite added the probably fixed Feels like hasn't been a problem for a while, best still check with community or test in-game label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working highlander Requires a change to the community highlander probably fixed Feels like hasn't been a problem for a while, best still check with community or test in-game
Projects
None yet
Development

No branches or pull requests

5 participants