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

Escape from Xor to Ebon Hawk #704

Closed
WildKarrde1138 opened this issue Oct 15, 2023 · 8 comments
Closed

Escape from Xor to Ebon Hawk #704

WildKarrde1138 opened this issue Oct 15, 2023 · 8 comments
Labels
Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Kashyyyk Issue occurs primarily on Kashyyyk Module: Korriban Issue occurs primarily on Korriban Module: Manaan Issue occurs primarily on Manaan Module: Tatooine Issue occurs primarily on Tatooine Type: Module This issue involves changes to a module's properties (ARE, GIT, IFO, LYT, and VIS files). Type: Scripting This issue is related specifically to a scripting bug/error

Comments

@WildKarrde1138
Copy link

It is possible to escape the fight with Xor by running into the Ebon Hawk. This happened on accident on Korriban during my last playthrough when the fight got too close to the Ebon Hawk's ramp and I stumbled into the area transition trigger. Xor and his goons were still there when I went back outside, and I was able to continue the fight as if nothing had happened, so nothing was seriously broken. However, I do not know if traveling to another planet at that point would have broken anything. While I suppose escaping into the ship is arguably a realistic option, I suspect this was not intended behavior.

@DarthParametric DarthParametric added Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Tatooine Issue occurs primarily on Tatooine Module: Kashyyyk Issue occurs primarily on Kashyyyk Module: Manaan Issue occurs primarily on Manaan Module: Korriban Issue occurs primarily on Korriban Type: Scripting This issue is related specifically to a scripting bug/error Type: Module This issue involves changes to a module's properties (ARE, GIT, IFO, LYT, and VIS files). labels Oct 16, 2023
@DarthParametric
Copy link
Contributor

DarthParametric commented Oct 16, 2023

Yes, I did this myself accidentally at least once when testing the Xor fixes on Manaan. I'm not sure if it is possible to resolve. Transition zones are triggers, but they work automatically, not based on scripts. The only practical option I can see would be to extend the hangar room model outwards and push the Hawk back 5m or so in order to create enough space. Something that radical is really beyond the scope of K1CP though.

Kashyyyk is probably the same. Korriban is similar, although there at least we do have a little more wiggle room to push the fight a bit further away by tweaking the waypoint positions. Tatooine should have plenty of room, so those waypoints could also be pushed back further.

Edit: Tried SetAreaUnescapable(TRUE), but that had no effect on the Ebon Hawk transition zone.

@WildKarrde1138
Copy link
Author

What about a strategy like the transition from the Tatooine Dune Sea (tat_m18aa) to the Eastern Dune Sea (tat_m18ac)? For that case, there’s a second trigger (tat18_kraytspeak) placed just before the area transition which checks if the player has received the Sand People map and, if not, informs them that they can’t proceed and jumps them a short distance away. Maybe it could work to add a slightly larger trigger around the ramp which checks if the Xor fight is in-progress and similarly jumps the player away? It would still interrupt the fight, but less so than a full module transition.

@DarthParametric
Copy link
Contributor

DarthParametric commented Nov 18, 2023

There's not really enough room for that, at least on Manaan. And that's really the main problem. The other planets have a bit more room to shuffle positions around, although Kashyyyk is probably the next most limited.

We can't temporarily destroy the transition, because there is no scriptable command for spawning a trigger object. However, we could potentially temporarily spawn a placeable walkmesh (e.g. PLC_Blockage) over the top of the trigger that would block anyone from entering it. It's a pretty hacky approach, but it could work. The transition trigger zone would need to be modified to be smaller, since on Manaan Xor spawns right on the edge of it.

Edit: I suppose an alternative approach would be to replace the transition with a regular trigger, and then the OnEnter could gate what it would do. Could have it check a global boolean/number or a local on the trigger itself, something to indicate that Xor has been spawned. When that's active, entering it wouldn't do anything. At other times, it would just do a StartNewModule.

Edit 2: The problem with this approach is that you lose the visual pop-up of the pending transition that you get with a proper transition zone. I tried moving the existing transition trigger geometry behind the walkmesh so that you couldn't reach it, but that just makes the pop-up disappear in-game.

Edit 3: OK so you can edit the transition's GIT data to remove its LinkedToModule value. That way you'll still see the usual transition notification when you approach it, but entering the trigger area won't actually do anything. So all you'd need to do would be to overlay it with a regular trigger as described above to handle the actual transition or prevent it, as needed.

@DarthParametric
Copy link
Contributor

DarthParametric commented Nov 20, 2023

So I have done some preliminary testing of the solution I proposed above:

Ebon.Hawk.Transition.Zone.Replacement.Test.1.mp4

Extended version: https://www.youtube.com/watch?v=uB1-6k7TfYY

It still needs a little tweaking on the regular (non-combat) transition side of things in order to match the vanilla fade-out as closely as possible. But it seems to work fine mechanically. I'll add this to all the applicable modules for the first v1.10 beta test and see if any problems crop up.

The interesting thing is that the StrRef used is vanilla, so clearly this was originally the intended behaviour. I'm not sure why Bioware removed it.

@DarthParametric DarthParametric added Requires Implementation The solution for this issue needs to be implemented and added to the patch Requires Testing Testing is required before a fix can be developed and/or approved and removed Requires Implementation The solution for this issue needs to be implemented and added to the patch labels Nov 20, 2023
@DarthParametric
Copy link
Contributor

DarthParametric commented Nov 21, 2023

Test version: Edit - new version below.

Will basically require a new game, or at least one before leaving Dantooine.

@DarthParametric
Copy link
Contributor

DarthParametric commented Nov 23, 2023

Initial testing suggests it isn't entirely foolproof. If you save in combat with Xor and reload, if you are close enough you can manage to get to the trigger and enter the Hawk before the AI ticks over to combat re-engaging. Maybe it needs an additional check for hostile creatures within some radius (10m?) of the trigger.

Edit: The use of GetFirstObjectInShape / GetNextObjectInShape using SHAPE_SPHERE seems like it would be the best approach here. The origin could be the trigger's position, we could define some custom per-module positions, or perhaps we could just grab the position of the Xor waypoint that he is spawned in on.

Edit 2: So a simpler check is to see if Xor is present and his faction STANDARD_FACTION_GLB_XOR has been turned hostile. If he is you can just throw the barkstring and return. That will prevent the brief window where you can load a save from in combat and the AI hasn't yet ticked over to a combat round (up to ~3 seconds it seems like). I also had to add a !GetIsDead check, since it seems that I unintentionally broke that portion of the Xor OUD in #397 by turning him neutral before setting his original faction back to friendly. I'll have to adjust that.

Updated beta if anyone wants to test: K1CP_Xor_Ebon_Hawk_Transition_Replacement_BETA_v2.zip

@DarthParametric
Copy link
Contributor

DarthParametric commented Dec 4, 2023

Did the second encounter with Xor on Tatooine during the 1.10.0 beta test and it worked as intended. Didn't have any issues with normal transitions on Manaan/Kashyyyk/Tatooine. Just landed on Korriban, so yet to test there.

Edit: Tested on Korriban. Seems there's an issue with the resized trigger area, causing it to not pop up the transition notice correctly. Basically the same problem the vanilla Manaan transition had (clipping into the walkmesh) that was fixed in #710.

@DarthParametric
Copy link
Contributor

OK with some minor adjustments to the Dreshdae trigger, I think this is good to go for inclusion.

@DarthParametric DarthParametric removed the Requires Testing Testing is required before a fix can be developed and/or approved label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Kashyyyk Issue occurs primarily on Kashyyyk Module: Korriban Issue occurs primarily on Korriban Module: Manaan Issue occurs primarily on Manaan Module: Tatooine Issue occurs primarily on Tatooine Type: Module This issue involves changes to a module's properties (ARE, GIT, IFO, LYT, and VIS files). Type: Scripting This issue is related specifically to a scripting bug/error
Projects
None yet
Development

No branches or pull requests

2 participants