Jump to content

[How-To] Original NPC Scripts and Dialogue in Korlasz Tomb and compatibility with EndlessBG1 and Transitions (Community Effort)


Recommended Posts

Posted

[How-To] Original NPC Scripts and Dialogue in Korlasz Tomb and compatibility with EndlessBG1 and Transitions (Community Effort)

This post in short: with EndlessBg1 and Transitions, mods need to consider that Korlasz' Dungeon could still be in BG1, but the original NPCs will use their SoD dialogue and script while in it.

In the original SoD game, Korlasz' Tomb (Crypt / Dungeon) is the start of SoD technical wise: NPCs switch to their "SoD dialogue" and "SoD script" (if the latter is existent, which is not the case for all). Used dialogues and scripts in the original game can be seen in bdintro.bcs:

Spoiler

IF
    Global("SOD_fromimport","global",1)
    InMyArea("dynaheir")  // Dynaheir
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("dynaheir",SetDialog("bddynahj"))
        ActionOverride("dynaheir",ChangeAIScript("bddynahe",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("minsc")  // Minsc
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("minsc",SetDialog("bdminscj"))
        ActionOverride("minsc",ChangeAIScript("bdminsc",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("rasaad")  // Rasaad
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Rasaad",SetDialog("bdRasaaj"))
        ActionOverride("Rasaad",ChangeAIScript("bdrasaad",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Viconia")  // Viconia
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Viconia",SetDialog("bdViconj"))
        ActionOverride("Viconia",ChangeAIScript("bdviconi",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Safana")  // Safana
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Safana",SetDialog("bdSafanj"))
        ActionOverride("Safana",ChangeAIScript("bdsafana",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Edwin")  // Edwin
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Edwin",SetDialog("bdEdwinj"))
        ActionOverride("Edwin",ChangeAIScript("bdedwin",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Jaheira")  // Jaheira
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Jaheira",SetDialog("bdJaheij"))
        ActionOverride("Jaheira",ChangeAIScript("bdjaheir",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Khalid")  // Khalid
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Khalid",SetDialog("bdKhalij"))
        ActionOverride("Khalid",ChangeAIScript("bdkhalid",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Dorn")  // Dorn
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Dorn",SetDialog("bdDornj"))
        ActionOverride("Dorn",ChangeAIScript("bddorn",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Neera")  // Neera
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Neera",SetDialog("bdNeeraj"))
        ActionOverride("Neera",ChangeAIScript("bdneera",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Baeloth")  // Baeloth
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Baeloth",SetDialog("bdBaeloj"))
        ActionOverride("Baeloth",ChangeAIScript("bdbaelot",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Ajantis")  // Ajantis
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Ajantis",SetDialog("bdAjantj"))
        ActionOverride("Ajantis",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Alora")  // Alora
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Alora",SetDialog("bdAloraj"))
        ActionOverride("Alora",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Branwen")  // Statue
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Branwen",SetDialog("bdBranwj"))
        ActionOverride("Branwen",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Coran")  // Coran
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Coran",SetDialog("bdCoranj"))
        ActionOverride("Coran",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Eldoth")  // Eldoth
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Eldoth",SetDialog("bdEldotj"))
        ActionOverride("Eldoth",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Faldorn")  // Faldorn
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Faldorn",SetDialog("bdFaldoj"))
        ActionOverride("Faldorn",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Garrick")  // Garrick
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Garrick",SetDialog("bdGarrij"))
        ActionOverride("Garrick",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Kagain")  // Kagain
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Kagain",SetDialog("bdKagaij"))
        ActionOverride("Kagain",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Kivan")  // Kivan
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Kivan",SetDialog("bdKivanj"))
        ActionOverride("Kivan",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Montaron")  // Montaron
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Montaron",SetDialog("bdMontaj"))
        ActionOverride("Montaron",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Quayle")  // Quayle
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Quayle",SetDialog("bdQuaylj"))
        ActionOverride("Quayle",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    OR(2)
        InMyArea("Shar-Teel")
        InMyArea("SharTeel")  // Shar-Teel
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Shar-Teel",SetDialog("bdSharTj"))
        ActionOverride("Shar-Teel",ChangeAIScript("",OVERRIDE))
        ActionOverride("SharTeel",SetDialog("bdSharTj"))
        ActionOverride("SharTeel",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Skie")  // Skie
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Skie",SetDialog("bdSkiej"))
        ActionOverride("Skie",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Tiax")  // Tiax
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Tiax",SetDialog("bdTiaxj"))
        ActionOverride("Tiax",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Xan")  // Xan
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Xan",SetDialog("bdXanj"))
        ActionOverride("Xan",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Xzar")  // Xzar
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Xzar",SetDialog("bdXzarj"))
        ActionOverride("Xzar",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    InMyArea("Yeslick")  // Yeslick
THEN
    RESPONSE #100
        CutSceneId(Player1)
        ActionOverride("Yeslick",SetDialog("bdYeslij"))
        ActionOverride("Yeslick",ChangeAIScript("",OVERRIDE))
END

IF
    Global("SOD_fromimport","global",1)
    Global("BD_Imoen_Items","GLOBAL",1)
    OR(2)
        Global("bd_party_has_lockpicking","BD0120",0)  // Tomb Safehouse, First Floor
        Global("bd_party_has_traps","BD0120",0)  // Tomb Safehouse, First Floor
    BeenInParty("safana")  // Safana
THEN
    RESPONSE #100
        CutSceneId(Player1)
        MoveGlobal("BD0120","safana",[934.1718])  // Safana
        ApplySpellRES("bdresurr","safana")  // No such index
        SmallWait(1)
        ApplySpellRES("bdrejuve","safana")  // No such index
        ActionOverride("safana",ChangeAIScript("bdsafana",OVERRIDE))
        ActionOverride("safana",SetDialog("bdsafana"))
        ActionOverride("safana",JoinPartyOverride())
END

With Transitions mod and EndlessBG1 both offering the possibility to visit Korlasz' Dungeon inside the BG1 world, there are some complications the modding community should agree on how to handle to ensure compatibility of all mods playing well together:

  • Original NPCs talk in Korlasz' Dungeon with their SoD dialogue, e.g. original interjections into Korlasz' dialogue.
  • After leaving Korlasz' Crypt back into the BG1 world (with Transitions or EndlessBG1 installed) the original NPCs need to use their BG1 dialogue and script again (obviously).

What EndlessBG1 (and hopefully Transition, too @Lauriel) will therefore do unless someone has a better idea:

  • Switch to SoD dialogue and script (naming like in the original game, i.e. also scripts only if present in the original game, otherwise it will make OVERRIDE script slot empty*) upon entering Korlasz' Dungeon, so interjections and NPC comments can happen as wanted. [NPCs' leaving comments are disabled but that's a different topic.]
  • Switch back to BG1 dialogue and script (naming like in the original game) upon leaving the crypt.

The reason I am posting this here is because you modders need to keep this in mind when designing your mods that add SoD content:

  • Korlasz' Dungeon could be in BG1. This means the SoD-specific global variable "bd_plot" could be greater 0 while in BG1. Inside Korlasz' Tomb, the variable "bd_plot" will be increased up to "40". If the variable is higher, the switch into SoD palace scene has happened and official SoD campaign was entered. If it's max at "40" and Transitions or EndlessBG1 moved the crypt into BG1, we are still in BG1 world.
  • Nevertheless, original NPCs will use their SoD dialogue and script while inside the crypt. Thus, if you add content (interjections, banters) for original NPCs, you need to use the SoD dialogue (and script).
    This sounds simple enough, but as an example, it means that you need to make sure your mod NPC does not start a banter with an original NPC inside Korlasz' Dungeon that expects them to talk with their BG1 dialogue, because the banter would break.

Please note: Make sure your NPC mod does only switch to SoD script and dialogue upon entering Korlasz' Dungeon if it's meant to. I decided to treat Korlasz' Crypt as BG1 content for my own NPC mods, meaning they will use their BG1 script and dialogues inside it even if it's original SoD campaign and will recommend this in my SoD NPC Tutorials in the future.

*If there ever will be a mod adding content to original NPCs in Korlasz' Tomb and needing scripts assigned, make sure you cover EndlessBG1's script changes upon entering the dungeon, as well.

Posted

And i just realized there is one more important topic I didn't cover: Banter dlg files of original NPCs in Korlasz' Dungeon

Which banter files are being used is defined by the according (bd)banter.2da assigned to the active campaign via CAMPAIGN.2DA.

This means that if Korlasz' Dungeon is in "BG1 world", all original NPCs will use their BG1 banter file while inside the Dungeon.

This needs to be considered by NPC mods so they do not try to banter inside the crypt expecting the original NPCs to answer with their SoD banter file.

 

Posted

EDIT: Problem solved. The first post is what EndlessBG1 will follow.

I just learned that the engine will revert the joined dialogue of the NPCs if a saved game is reloaded. I guess it's according to the 2da. The save shows the wanted one (bdimoen.dlg for Imoen), but after loading, it's reverted to the BG1 one.

EDIT: EndlessBg1 solves with with resetting the soD dialogues inside Korlasz' Crypt with the help of an invisible creature.

 

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...