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

Juhani's and Jolee's dialogue - One line is never spoken due to wrong code in script #355

Closed
Salk73 opened this issue Nov 27, 2019 · 5 comments
Labels
Minor Issue Aesthetic issue or other problem that isn't really a bug Type: Scripting This issue is related specifically to a scripting bug/error

Comments

@Salk73
Copy link

Salk73 commented Nov 27, 2019

The original conditional script k_hjuh_p28.nss never returns true because sArea in the function

string sArea = GetName(GetArea(OBJECT_SELF));

seems to be returning a null string, despite the following remark I found on NWN Lexicon:

"Remarks:

GetName() returns the name of modules and areas (pre-1.25 it returned a null string)."

It is easy to replace it with something appropriate thus restoring one of Juhani's lost lines.

int StartingConditional()
{
    string sArea = GetModuleFileName();
    if ((sArea == "unk_m44aa") || (sArea == "unk_m44ab"))
    {
      if ((GetGlobalNumber("G_JUHANIP_STATE") != 10) || (GetGlobalNumber("G_FinalChoice") != 2))
      {
        return TRUE;
      }
    }
    return FALSE;
}
@DarthParametric DarthParametric added Type: Scripting This issue is related specifically to a scripting bug/error Minor Issue Aesthetic issue or other problem that isn't really a bug labels Nov 27, 2019
@Salk73
Copy link
Author

Salk73 commented Nov 27, 2019

I've added an extra check to make sure this won't interfere with the "This may be the last time I will have a chance to talk to you..." dialogue (E489).

EDIT: And it seems Jolee has the same kind of problem (k_swg_jolee20).

That also needs replacing with:

int StartingConditional()
{
    string sArea = GetModuleFileName();
    if ((sArea == "unk_m44aa") || (sArea == "unk_m44ab"))
    {
        return TRUE;
    }
    return FALSE;
}

@Salk73 Salk73 changed the title Juhani's dialogue - One line is never spoken due to wrong code in script Juhani's and Jolee's dialogue - One line is never spoken due to wrong code in script Nov 27, 2019
@Salk73
Copy link
Author

Salk73 commented Nov 29, 2019

One more bug in Juhani's dialogue. The script at E82 needs to be removed.

@DarthParametric
Copy link
Contributor

Is that secondary check for the globals intended to be an OR, or was it meant to be an AND?

@Salk73
Copy link
Author

Salk73 commented Jun 2, 2020

An OR check.

@DarthParametric
Copy link
Contributor

One more bug in Juhani's dialogue. The script at E82 needs to be removed.

Weird. The config block from the DLG in 1.8 is:

[k_hjuh_dialog.dlg]
ReplyList\233\EntriesList\0\Index=177
ReplyList\233\EntriesList\0\Active=k_hjuh_h07
ReplyList\233\EntriesList\1\Index=227
ReplyList\233\EntriesList\1\Active=k_hjuh_h02
ReplyList\233\EntriesList\2\Index=200
ReplyList\233\EntriesList\2\Active=k_hjuh_h05
ReplyList\243\EntriesList\0\Index=185
ReplyList\243\EntriesList\0\Active=k_con_ismale
ReplyList\243\EntriesList\1\Index=184
ReplyList\243\EntriesList\2\Index=186

but in my working folder it's:

[k_hjuh_dialog.dlg]
ReplyList\97\EntriesList\0\Active=
ReplyList\107\EntriesList\0\Active=
ReplyList\110\EntriesList\0\Active=

One of those removes the E82 starting conditional. Not sure what the other ones are about. Or what issue the existing changes are for. Doesn't seem like I did those.

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 Type: Scripting This issue is related specifically to a scripting bug/error
Projects
None yet
Development

No branches or pull requests

2 participants