XCOM 2
319 ratings
[WOTC] Faction Anchor
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
935.032 KB
7 Feb, 2021 @ 12:57pm
15 Apr, 2023 @ 10:11am
19 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] Faction Anchor

Description
What is this?
This mod is a slightly unorthodox solution to a bug/issue that has been on my mind since the HIVE released back in 2019 !!

So the issue is this; when a mission has the 'sweep' objective (kill all remaining enemies) and the mission contains units from the CHL Faction Teams, they don't count towards this objective.
What this means in practice is that you could be having an epic 4-way battle and suddenly 'the last Lost' dies to an overwatch and boom, mission ends. To be honest this didn't bother me with any of the faction teams.
But the HIVE changed my view on this when I lost a chance to kill the Queen by the above example.

I have spent time since that mission trying to find a solution, using MCO's, CHL notes and in discussion with some very talented modders. Nothing short of editing every map/mission and kismet seemed to work (which is a highly incompatible solution).
The Kismet action just did not want to acknowledge the extra Faction Teams.
-- until NOW!

Wha?.. you fixed this! How?
Well, here's the unorthodox part. 'Kismet' is what the mission code runs on, it's kind of half-baked into the actual maps. The kismet only cares about units on the Advent or Lost teams.
So... I give it an extra unit on the Advent team. Spawned post-mission start, this extra unit is immune to all damage and completely invisible to the player.
The kismet sweep objective correctly ID's this unit as an 'alive advent' and won't end the mission!
... Now some code magic; each turn I have an event that checks on ALL the alive units, from every enemy team. Adds them all up. As long as the count is higher than 1 nothing happens.
But when the count gets to my special little hidden Faction Anchor unit being the last enemy unit alive, it kills it through code. Kismet sees 'the last enemy unit' has died. Mission ends.

Huzzah! No more abrupt mission endings with faction units in play!

As well as making you kill all faction units to complete the 'sweep' objective the mod also makes you correctly wait for (and kill) any faction team reinforcements that might be inbound.

Known Issues
Yeah, nothing is perfect, so here's what goes 'slightly' wrong;
  1. At mission start the camera pans to where the hidden unit is spawned.
  2. Flyovers for some effects may play on the unit, like 'Scanned' or 'Tactical Analysis'.
    Mostly noticeable with larger AoE stuff ... and ...
  3. I had some issues with odd targeting errors if the Anchor was within an AoE hit radius, it is still visibly hidden but can be aimed at by squadsight. Unable to reliably reproduce.
  4. Tactical UI Kill Counter reports the unit in its numbers. As does the end of mission report.
    Tactical UI Kill Counter REDUX does not have the issue of this unit showing up in it's active numbers. :)
  5. The unit has some odd behaviour in correlation to the X2AllowSelectAll console command. As it becomes selectable, duh!.
  6. Sometimes it will take an extra turn for the unit to notice it is the last unit and kill itself.
    This means you may need to manually end your turn, to trigger the end of mission.
    The code runs on 'turn order processed'...
  7. Sometimes the unit refuses to die by the event listener code ...
    *hopefully fixed in the 1st June 2022 update*
Woah, hold UP! That last issue could create never-ending missions! That's a huge bug reversal! Yes. Although it IS rare. 1/100 test cases. AND here's what you can do about it;
Open the console and use the X2AllowSelectAll true command. Tab to the unit, and it has a player-only-use ability to force it to die. Spam it to end the mission. This fallback method seemed to work, every time. You can also use the console command KillAllAis.

Compatibility
Due to how some faction team units are actually 'expecting' the old rules and head into an infinite bleedout state (Rogue XCOM, Rebellious MOCX, MOCX ) you may need Udaya's Execution ability to finish them off and end the mission !!

Some wonkyness can happen with Fulton/ExtractCorpses, in particular with MOCX units. There is nothing more I can do to fix this issue.

Out Of BETA
The mod has been stable now since April 2021, with only a few minor updates.
The BETA tag was to catch all the issues, which should all now be addressed.
If you have issues, could you please enable logging (in this mods configs) and send me a copy of your launch.log by either pastebin or discord for a mission that you softlock in and I will try to come up with a solution :)

Credits And Thanks
Massive Thanks to everyone that helped me over the last year with this mod project. From all my random questions on the xcom2 modders discord!
MrShadowCX for the Ai behaviour tree pointers.
ObelixDK for the 'make an invisible unit' help.
Iridar and Leader Enemy Boss for the Denmother mods unit spawning code.
Iridar again for the solution to hide the death message pop-up.
RealityMachina and RoseBomb for helping solve MOCX/Evac issues.
MrCloista, TeslaRage and Flashstriker for helping me beta-test this solution to death.

~ Enjoy !! and please buy me a Cuppa Tea [www.buymeacoffee.com]
Popular Discussions View All (2)
1
1 May @ 9:04am
Russian Translation
Sadler
5
10 Oct, 2021 @ 6:37pm
PINNED: 'Faction Mods'
RustyDios
267 Comments
RustyDios  [author] 8 May @ 9:34am 
The lost will spawn until all the "originally placed" units are dead.
This mod functions correctly in that regard in that the mission won't end until they are all dead.
You have likely hit an issue where there is a single/pod of Lost in some corner of the map, or indeed INSIDE a shipping container (the most common cause of this issue).

If you feel this mod is stopping your mission from ending, you can use the console-commands as discussed in the description to kill-off the anchor and return to 'normal' gameplay rules.
madmater 8 May @ 8:58am 
this mod as a HUGE BREAKING BUG the lost sometimes spawn endlessly and will not stop on missions the one it happened on was a heaven
RustyDios  [author] 6 Jan @ 1:29pm 
If you use [Shift] instead of tab you should get to the anchor faster and before cycling through enemies ... also don't use the console command to kill it, this won't trigger it's death handling correctly, use the perks it has to kill it correctly ....
steamt 6 Jan @ 12:25pm 
Regarding Lost interactions. One or two Lost almost always head towards the faction anchor. The Lost never target the anchor but remain beside it presumably with the intention to target it in the next turn. These are the 'hiding' lost that can cause the 'infinite waves' of lost.

Personally, if I start a lost mission without a third party, I use
X2AllowSelectAll true, followed by tab to select it, move the cursor to it
KillClosestUnitToCursor
to remove it. This may cycle your through some enemies showing their location but I prefer that over a couple lost just seeming to randomly run away and the continuous lost waves that result.
RustyDios  [author] 4 Oct, 2024 @ 9:23pm 
As long as whatever is KO'ing them is doing it correctly there should be no issues .. however! as stated in the description you may need to actually execute some units (like MOCX) with another mod
PanMops 4 Oct, 2024 @ 1:40pm 
does this mod conflict in any way with knocking enemy units unconcious?
Cookie 27 Sep, 2024 @ 12:57am 
Was the invisible tile thing on a sitrep with MoxC? I've had one occurence where a MocX rookie and a pathfinder spawned under the walkmesh and I ended up with mostly invisible foes and very glitchy targeting.
Phoenix 30 Aug, 2024 @ 11:01am 
My bad sorry
Soul 30 Aug, 2024 @ 10:55am 
Check issue 6
Phoenix 30 Aug, 2024 @ 10:41am 
It seems with this mod that once you kill all the enemies for a mission, the game doesn't count the mission as completed until you end the turn instead of it doing it automatically for you.