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

Xor only appears via rapid transit #29

Closed
JCarter426 opened this issue Feb 1, 2019 · 2 comments
Closed

Xor only appears via rapid transit #29

JCarter426 opened this issue Feb 1, 2019 · 2 comments
Assignees
Labels
Bug Something isn't working Tier 1 Just Fixes Type: Scripting This issue is related specifically to a scripting bug/error

Comments

@JCarter426
Copy link
Contributor

JCarter426 commented Feb 1, 2019

Split from #8

The second Xor encounter, the spaceport ambush, will only happen if the player returns to the Ebon Hawk using the rapid transit system. If you don't use it, you can't ever finish Juhani's quest.

The reason Xor consistently does appear after the rapid transit system is used is thanks to this bit of code:

        //This allows the players to be ambushed in the starport outside the Ebon Hawk
        if(nXor == 1)
        {
            Db_MyPrintString("Xor 1 == 1");
            if(GetGlobalBoolean("K_XOR_AMBUSH_FIX") == FALSE)
            {
                Db_MyPrintString("Xor 2 Ambush Fix == FALSE");
                if(nPlanet == 20 || nPlanet == 25 || nPlanet == 30 || nPlanet == 35)
                {
                    Db_MyPrintString("Xor 3 Ambush Choosing Planet");
                    SetGlobalNumber("K_XOR_AMBUSH", TRUE);
                    SetGlobalBoolean("K_XOR_AMBUSH_FIX", TRUE);
                    Db_MyPrintString("Xor 4 Hijack");
                    if(nPlanet == 20)
                    {
                        sPlanet = "kas_m22aa";
                    }
                    if(nPlanet == 25)
                    {
                        sPlanet = "manm26ad";
                    }
                    if(nPlanet == 30)
                    {
                        sPlanet = "korr_m33aa";
                    }
                    if(nPlanet == 35)
                    {
                        sPlanet = "tat_m17ab";
                    }
                    StartNewModule(sPlanet, "K_XOR_AMBUSH_SPAWN");
                    return;

I edited my save to manually set K_XOR_AMBUSH to 1 and was able to trigger the encounter after walking to the spaceport. I searched through the scripts and only found one other that sets the global to the correct state - a cheat script for quality assurance that isn't ever used anymore. So that'd be why nothing else works.

But we should be able to set this global and trigger the encounter without requiring the use of rapid transit. I think the best solution is to attach it to the OnEnter scripts of each module adjacent to the spaceports. That way when you leave the spaceport after the initial encounter with Xor, he'll be set up to ambush you when you return to the Ebon Hawk, via rapid transit or otherwise. The only potential oddity is if you immediately enter the Ebon Hawk and travel around the galaxy without leaving ever leaving a spaceport. Though if you did that, it would be no surprise that Xor would never catch you.

I'll sort this out later, too tired now. This is mostly a reminder to my future self.

@JCarter426 JCarter426 added the Bug Something isn't working label Feb 1, 2019
@DarthParametric DarthParametric added Type: Scripting This issue is related specifically to a scripting bug/error Tier 1 Just Fixes Requires Testing Testing is required before a fix can be developed and/or approved labels Feb 1, 2019
@JCarter426 JCarter426 added Requires Implementation The solution for this issue needs to be implemented and added to the patch and removed Requires Testing Testing is required before a fix can be developed and/or approved Requires Implementation The solution for this issue needs to be implemented and added to the patch labels Feb 2, 2019
@JCarter426
Copy link
Contributor Author

I've smoked Xor out and made him stop hiding like the coward he is.

@Salk73
Copy link

Salk73 commented Jan 17, 2022

Is the OnEnter change needed also for Dantooine?

k_pdan_14a_area has been modified accordingly but to my knowledge Xor won't ever appear on Dantooine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Tier 1 Just Fixes Type: Scripting This issue is related specifically to a scripting bug/error
Projects
None yet
Development

No branches or pull requests

3 participants