Salk

[KotOR] Gizka on Yavin Station bug

Recommended Posts

Hello!

I am sure some of you noticed that sometimes you go visit Suvam Tan on the Yavin Station and you hear the sound of Gizka even if there are none around. Conversely, it is possible to find a Gizka there which does not instead produce any sound (unless talked to by the player). This is a bug and it is caused by this:

    if (((GetIsObjectValid(GetObjectByTag("yav47_gizka", 0)) == 0) && (GetGlobalNumber("YAV_GIZKA") < 3))) {
        int nRandom = d6(1);
        if (((nRandom == 1) || (nRandom == 2))) {
            SetGlobalNumber("YAV_GIZKA", 1);
        }
        else {
            if (((nRandom == 3) || (nRandom == 4))) {
                SetGlobalNumber("YAV_GIZKA", 2);
            }
            else {
                if ((nRandom == 6)) {
                    SetGlobalNumber("YAV_GIZKA", 3);
                    CreateObject(1, "yav47_gizka", GetLocation(GetObjectByTag("gizspawn", 0)), 0);
                }
            }
        }
    }

together with these two scripts (yav47_gizka08.ncs and yav47_gizka09.ncs) that are triggered by gizsound1.utt and gizsound2.utt:

void main() {
    object oEntering = GetEnteringObject();
    if (((GetGlobalNumber("YAV_GIZKA") == 1) && (GetGlobalNumber("YAV_SUVAM") > 0))) {
        PlaySound("cs_gizkabeg");
        if ((GetIsPC(oEntering) == 1)) {
            AssignCommand(GetObjectByTag("yav47_suvam", 0), ActionStartConversation(oEntering, "yav47_gizkas", 0, 0, 0, "", "", "", "", "", "", 0));
        }
    }
}
void main() {
    object oEntering = GetEnteringObject();
    if (((GetGlobalNumber("YAV_GIZKA") == 2) && (GetGlobalNumber("YAV_SUVAM") > 0))) {
        PlaySound("cs_gizkabeg");
        if (((GetIsPC(oEntering) == 1) || (GetObjectByTag("yav47_suvam", 0) == oEntering))) {
            AssignCommand(GetObjectByTag("yav47_suvam", 0), ActionStartConversation(oEntering, "yav47_gizkas", 0, 0, 0, "", "", "", "", "", "", 0));
        }
    }
}


Apparently, from what I understand, upon loading the area, the onEnter script rolls a 1D6 die and depending on the result changes the YAV_GIZKA global variable to either 1 (rolling 1 and 2),  2 (rolling 3 and 4) or 3 (rolling 6) while it does not change it at all if rolling 5 (?).

Now, with the global on 1 and 2, you will be able to hear the Gizka's sound without seeing it because it simply isn't there while with 3, it will be there but won't make a sound. It also seems like if the Gizka is spawned the Global will stay at 3 until later, when a certain event will take place, because the initial IF condition requires the Global to be lower than 3.
 

Any suggestions about what should be done about it?


Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

Should some mods causing the bug to happened? 🤔 I had once encountered the bug, and then other time with another mod's setup the bug wasn't there.

Share this post


Link to post
Share on other sites
1 hour ago, ebmar said:

Should some mods causing the bug to happened? 🤔 I had once encountered the bug, and then other time with another mod's setup the bug wasn't there.

 

No, it is a vanilla bug.


I was considering making the Gizka appear only if the Player visits the station and the Ebon Hawk is infested with Gizka. It would make the most sense since Suvam says "Damn Gizka..." thus making me think he didn't choose to have such a pet there.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.