Jump to content

subtledoctor

Modders
  • Posts

    8,934
  • Joined

  • Last visited

Posts posted by subtledoctor

  1. 1 hour ago, GawainBS said:

    Is it deliberate that very few spheres contain the Iron Skin spell? Is it intended as a nerf for Divine casters?

    It depends on the sphere system. But in most, it is in the sphere of Earth. Any kits with that sphere will get it - druids, plus various cleric kits. So access is actually a bit more liberal gan in vanilla. Only thing is, it might be renamed “Stoneskin” because “Iron Skins” is not very druid-y. But it’s the same spell. 

    1 hour ago, GawainBS said:

    I created a Paladin (Zealot) of Eilistriae, Darksong Knight, I believe. She couldn't use any weapon, apart from blunt weapons. This doesn't seem right for the kit.

    I’m pretty sure paladins are not subject to the mod’s custom weapon restrictions. That’s only for clerics So something else is going on. 

  2. Small update to reassure folks I haven't forgotten this. Part 8 is proving to be a bit tricky. It needs to get you from the palace, to the jail, and then out to the secret sewer exit. Basically through a long series of dialogues and cut scenes. A lot of little things need to be arranged, and my free time has been quite limited in the last few weeks. But I think I at least have the framework laid out. Now I just need to write up the various little cut scene scripts and the dialogue entries. (The dialogue will be substantially shorter than the stuff in Part 7.)

    So basically I just need to do a bunch of writing and a bunch of scripting. It will get done eventually.

  3. Part 7: Choose a Side

    Okay! When last we left off, Sarevok was killed, but the game did not end. You have to return to the Ducal Palace to let them know that Sarevok is defeated at long last. The dukes specifically instructed you to find Sarevok, not to fight him. And they specifically instructed you to preserve his body if he dies, so that they can get the palace necromancers working on interrogating him. But we know from the wonderful 1998 CGI movie that Sarevok's body disintegrated, and the energy flowed to some great hall deep in the earth, or in another plane of existence, or whatever, hinting at all the other Bhaalspawn out there. (The prophecy says "a score" but this movie makes it seem like hundreds!) Telling people bad news is always unpleasant, so if you want to run away to a deserted island across the sea, or something, this is a perfectly good time.

    I should note, some things come up in each stage of this that require slight revisions to earlier stages. In this case, I went back to the Dukes and they were not acknowledging that Sarevok was dead, because a dialogue trigger needed to be updated. But I am not going to go back and update the old posts here, because these end up being a bit different from the mod's actual code. All the fixes go into the Github project though.

    At any rate, here again, first we prep a journal entry for the end of the campaign:

    Spoiler
    ADD_JOURNAL TITLE (@30036) ~The Hunt for Sarevok
    Sarevok and his followers are defeated at long last, his murderous schemes fully unraveled. Your foster father, Gorion, has been avenged. With the exception of your friend Imoen, those who helped you thwart your half-brother's schemes drift away from you, returning to their lives. For the first time since you left Candlekeep, you have the opportunity to reflect on the astonishing turns your life has taken.
    Though you are fêted by the rulers of Baldur's Gate, a sense of unease plagues you. You can't help but hear whispers, hinting that you killed your half-brother not for the good of the city, but so you could usurp his place and his power. For the moment, however, your persecutors' voices are drowned out by an ever-growing number of others with more immediate concerns.
    Every day, more refugees driven from their homes by the servants of Caelar Argent arrive at the city gates. Many have stories of the Shining Lady's grace; all have tales of her followers' wrath.
    You retire to your chamber in the Ducal Palace, your thoughts troubled. You wonder what effect Caelar's crusade will have on Baldur's Gate, little knowing how close at hand the answer is...~

    This is a modified version of the text scrawl from SoD when you finish Korlasz' dungeon. With a few small adjustments it fits very well here.

    Then we adjust the cut scene script that handles the transition from the BG1 campaign to the SoD campaign. This is taken whole from EndlessBG1, for maximum compatibility.

    Spoiler
    // SoD + EET: patch bdsodtrn.bcs so the BG1 Endmovie doesn't show twice 
    COPY_EXISTING ~bdsodtrn.BCS~ ~override~
    	DECOMPILE_AND_PATCH BEGIN
    		SPRINT textToReplace ~Wait(1)[%newline%]*StartMovie("ENDMOVIE")[%newline%]*FadeToColor(\[1\.0\],0)~
    		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
    		PATCH_IF (num_matches > 0) BEGIN
    			REPLACE_TEXTUALLY ~%textToReplace%~ ~~
    			PATCH_PRINT ~Patching: %num_matches% matches found in %SOURCE_FILESPEC% for REPLACE_TEXTUALLY: %textToReplace%~
    		END ELSE BEGIN
    			PATCH_WARN ~WARNING: could not find %textToReplace% in %SOURCE_FILESPEC%~
    		END
    	END
    BUT_ONLY

    Then we will set up our own cut scene for the end of BG1 that will glide into the base game's campaign-change cut scene. This will handle Imoen's status at the point of transition. This is adapted from a script in EndlessBG1, but is slightly different. It is okay that they differ, because if both are installed, the dialogue will point to mine:

    Spoiler
    // cutscene for transition to SoD, including handling of Imoen's stuff. 
    <<<<<<<< .../d5st2so2.baf
    /* move the group to some area so Imoen's stuff can be handled. I'll take the PC's room for now. (There is an Imoen in bd0103 already so we can't do it there.) */
    IF
    	AreaCheck("%NBaldursGate_DucalPalace_L1%")
    THEN
    	RESPONSE #100
            CutSceneId(Player1)
    		FadeToColor([1.0],0)
    		SaveGame(2)
    		SmallWait(1)
    		ActionOverride(Player2,LeaveAreaLUA("%NBaldursGate_DucalPalace_L3%","",[315.1390],S))
    		ActionOverride(Player3,LeaveAreaLUA("%NBaldursGate_DucalPalace_L3%","",[315.1390],S))
    		ActionOverride(Player4,LeaveAreaLUA("%NBaldursGate_DucalPalace_L3%","",[315.1390],S))
    		ActionOverride(Player5,LeaveAreaLUA("%NBaldursGate_DucalPalace_L3%","",[315.1390],S))
    		ActionOverride(Player6,LeaveAreaLUA("%NBaldursGate_DucalPalace_L3%","",[315.1390],S))
    		LeaveAreaLUAPanic("%NBaldursGate_DucalPalace_L3%","",[315.1390],SW)
    		LeaveAreaLUA("%NBaldursGate_DucalPalace_L3%","",[315.1390],SW)
    		MultiPlayerSync()
    		Wait(1)		
    		StartCutSceneEx("d5st2so2",TRUE)
    END
    
    /* if in group, let her leave the group */
    IF
    	AreaCheck("%NBaldursGate_DucalPalace_L3%")
    	InPartyAllowDead("%IMOEN_DV%")
    	InMyArea("%IMOEN_DV%")	
    	Global("C#EBG1_MoveImoenStuff","MYAREA",0)
    THEN
    	RESPONSE #100
            CutSceneId(Player1)
    		SetGlobal("C#EBG1_MoveImoenStuff","MYAREA",1)
    		ActionOverride("%IMOEN_DV%",LeaveParty())
    		SmallWait(10)
    		StartCutSceneEx("d5st2so2",TRUE)
    END
    
    /* for all cases: move her stuff into the chest and let her disappear */
    IF
    	AreaCheck("%NBaldursGate_DucalPalace_L3%")
    	InMyArea("%IMOEN_DV%")
    	GlobalLT("C#EBG1_MoveImoenStuff","MYAREA",2)
    THEN
    	RESPONSE #100
    		SetInterrupt(FALSE)
            CutSceneId(Player1)
    		SetGlobal("C#EBG1_MoveImoenStuff","MYAREA",2)
    		ActionOverride("Container 4",TakeCreatureItems("%IMOEN_DV%",ALL)) //BACKPACK
    		Wait(1)
    		StartCutSceneEx("d5st2so2",TRUE)
    END
    
    /* for all cases: let Imoen disappear */
    IF
    	AreaCheck("%NBaldursGate_DucalPalace_L3%")
    	InMyArea("%IMOEN_DV%")
    	Global("C#EBG1_MoveImoenStuff","MYAREA",2)
    THEN
    	RESPONSE #100
    		SetInterrupt(FALSE)
            CutSceneId(Player1)
    		SetGlobal("C#EBG1_MoveImoenStuff","MYAREA",3)
    		ActionOverride("%IMOEN_DV%",DestroySelf())
    		SmallWait(10)
    		StartCutSceneEx("d5st2so2",TRUE)
    END
    
    /* after Imoen is done, start transition to SoD */
    IF
    	AreaCheck("%NBaldursGate_DucalPalace_L3%")	
    	OR(2)
    		Global("C#EBG1_MoveImoenStuff","MYAREA",0)
    		Global("C#EBG1_MoveImoenStuff","MYAREA",3)
    THEN
    	RESPONSE #100
            CutSceneId(Player1)
    		SetGlobal("C#EBG1_MoveImoenStuff","MYAREA",4)
    		SetGlobal("bd_npc_camp_chapter","global",0)
    		SetGlobal("chapter","global",7)
    		SetGlobal("DREAM","GLOBAL",7)
    		SetGlobal("sprite_is_deadsafana","GLOBAL",0)
    		SetGlobal("sprite_is_deaddynaheir","GLOBAL",0)
    		SetGlobal("sprite_is_deadminsc","GLOBAL",0)
    		SetGlobal("sprite_is_deadrasaad","GLOBAL",0)
    		TakeObjectGoldGlobal("BD_TAKEN_GOLD","GLOBAL",Player1)
    		SetGlobal("BD_EXTRA_GOLD","GLOBAL",17)
    		SetGlobal("BD_SAFEHOUSE_DONE","GLOBAL",1)
    		ChangeAIScript("bdplayer",OVERRIDE)
    		SmallWait(2)
    		StartCutSceneEx("BDSODTRN",TRUE)
    		SetGlobal("d5st2so2","GLOBAL",2)
    END
    >>>>>>>>
    COPY ~.../d5st2so2.baf~ ~weidu_external/%MOD_FOLDER%/compile/d5st2so2.baf~
    COMPILE EVALUATE_BUFFER ~weidu_external/%MOD_FOLDER%/compile/d5st2so2.baf~ 

    Then three script additions: the first two just add some compatibility for optional EndlessBG1 components; the third makes sure Entar is in the palace with Belt and Liia when you return from Sarevok.

    Spoiler
    // cross-compatibility with component "Sarevok's Sword": we add script to remove Sarevok's Sword to BG1 area, too 
    
    ACTION_IF (MOD_IS_INSTALLED ~c#endlessbg1.tp2~ ~4~) BEGIN
    
    <<<<<<<< .../ar0110_remove_Sarevoks_sword.baf
    /* Sarevok's Sword will be stolen after PC returns from Korlasz' Dungeon */
    IF
      GlobalGT("bd_plot","GLOBAL",1)
      Global("C#st_RemoveSwordPCChest","MYAREA",0)
      HasItem("c#stsrvs","Container1")
    THEN
      RESPONSE #100
        ActionOverride("Container1",DestroyItem("c#stsrvs"))
        SetGlobal("C#st_RemoveSwordPCChest","MYAREA",1)
    END
    >>>>>>>>
    COPY ~.../ar0110_remove_Sarevoks_sword.baf~ ~weidu_external/%MOD_FOLDER%/compile/ar0110_remove_Sarevoks_sword.baf~
    EXTEND_BOTTOM ~%NBaldursGate_DucalPalace_L3%.bcs~ ~weidu_external/%MOD_FOLDER%/compile/ar0110_remove_Sarevoks_sword.baf~ EVALUATE_BUFFER 
    
    END	//	end EBG1 #4
    
    // cross-compatibility with component "Short Hero Tribute Scene": set a variable so the dialogue can trigger the cut scene 
    
    ACTION_IF (MOD_IS_INSTALLED ~c#endlessbg1.tp2~ ~2~) BEGIN
    
    <<<<<<<< d5/hero108.baf
    IF
    	Global("D5HeroSceneInstalled","GLOBAL",0)
    THEN
    	RESPONSE #100
    		SetGlobal("D5HeroSceneInstalled","GLOBAL",1)
    		Continue()
    END
    >>>>>>>>
    COPY ~d5/hero108.baf~ ~weidu_external/%MOD_FOLDER%/compile/hero108.baf~
    EXTEND_TOP ~%bg1_area_prefix%0108.BCS~ ~weidu_external/%MOD_FOLDER%/compile/hero108.baf~
    
    END	//	end EBG1 #2
    
    // put Entar in the palace for the last dialogues
    
    <<<<<<<< d5/ar108+7.baf
    IF
    	Dead("Sarevok")
    	!InMyArea("BDENTAR")
    THEN
    	RESPONSE #100
    		CreateCreature("BDENTAR",[810.365],SW)
    		Continue()
    END
    >>>>>>>>
    COPY ~d5/ar108+7.baf~ ~weidu_external/%MOD_FOLDER%/compile/ar108+7.baf~
    EXTEND_TOP ~%bg1_area_prefix%0108.BCS~ ~weidu_external/%MOD_FOLDER%/compile/ar108+7.baf~

    Then, all the dialogue additions. A long (and rather wordy, might need to be trimmed a bit) interchange between Charname, Belt, Liia, and Entar. With a potential interjection by Skie, perpetually embarrassed by her boomer dad.

    Spoiler
    <<<<<<<< d5/transit+.d
    APPEND BELT
    
    IF ~Global("D5EntarCut","GLOBAL",7) Dead("SAREVOK")~ BEGIN d5beltsd_0
      SAY ~<CHARNAME>! We did not expect you so quickly. Did you find passage to the Undercity? Do you have information on Sarevok's whereabouts? I have asked Captain Gregson of the Flaming Fist to have a company of soldiers and battlemages prepared to apprehend him. Not as many as I would like - the Crusade is gathering strength in the north and most of our armed forces are assembling to march in that direction. Never mind that, though - tell us what you have learned.~
      IF ~~ REPLY ~Sarevok is dead. I trailed him to an old temple of Bhaal, where he had arranged some kind of magical trap. The entire place was glowing with some kind of energy. I could not escape.~ GOTO d5beltsd_1
      IF ~~ REPLY ~It is Sarevok who has learned the hardest of lessons. He trapped me and thought he could best me, but he was very wrong. He and his last followers fell to my onslaught.~ GOTO d5beltsd_1
    END
    
    IF ~~ BEGIN d5beltsd_1
      SAY ~What! Are you- well obviously you survived. Tell us what happened.~
      IF ~~ REPLY ~We had no choice but to fight. It was that, or die. He had some kind of ritual planned, but in the end it came to naught. He and his associates fell, and his very body crumbled to nothing.~ GOTO d5beltsd_2
      IF ~~ REPLY ~Sarevok was overconfident, and fell to my power. In the end there was nothing left of him.~ GOTO d5beltsd_2
    END
    
    IF ~~ BEGIN d5beltsd_2
      SAY ~What do you mean 'nothing?' Please tell me that you safeguarded his remains. Dead or not, we need to interrogate him. There is still the matter of the attack against Duke Silvershield, and several other loose threads.~
      IF ~~ EXTERN LIIA d5liiasd_1
    END
    
    IF ~~ BEGIN d5beltsd_3
      SAY ~Entar. I sympathize with what you went through, but I disagree about that course of action. I have had accounts from the Flaming Fist about <CHARNAME>'s performance rooting out Korlasz, working with our men to defeat her while showing mercy where appropriate.~
      IF ~~ GOTO d5beltsd_5
    END
    
    IF ~~ BEGIN d5beltsd_4
      SAY ~Entar. I sympathize with what you went through, but I disagree about that course of action. I have had accounts from the Flaming Fist about <CHARNAME>'s performance rooting out Korlasz, working with our men to soundly defeat her and all of her followers.~
      IF ~~ GOTO d5beltsd_5
    END
    
    IF ~~ BEGIN d5beltsd_5
      SAY ~The threat of the Crusade is too great not to use all of our resources. <CHARNAME> has failed to follow our instructions, but ultimately, the outcome is the one we desired: Sarevok is no more. We should focus on the real, very visible threat to our city, rather than imagined threats. And what better way for <CHARNAME> to prove <PRO_HISHER> loyalty and good faith than by putting <PRO_HISHER> skills to use on the field of battle, in the name of Baldur's Gate?~
      IF ~~ EXTERN LIIA d5liiasd_3
    END
    
    IF ~~ BEGIN d5beltsd_6
      SAY ~We thank you for your honesty. It strikes me that may be a particularly sensitive thing to admit, so I appreciate your openness. If anything, I think this helps your case, since you easily could have remained in silence. You are acting like a true ally, which is to your benefit. I suppose, now that we know about Sarevok and that the time mentioned in the prophecy is upon us, every foundling child will be suspect. Er, no offense, of course.~
      IF ~~ GOTO d5beltsd_7
    END
    
    IF ~~ BEGIN d5beltsd_7
      SAY ~Ultimately, however, it changes little in the short term. I also would like to hear what you propose to do. Will you prove yourself by joining our campaign in the north? Or will you do so by tracking down the last threads of Sarevok's scheming and find out the truth of Duke Entar's murder?~
      IF ~Alignment(Player1,MASK_GOOD)~ REPLY ~I want to be a force for good in Baldur's Gate. Let me prove myself. I have had enough of Sarevok's schemes and shapechangers. The man is dead; the damage he caused will fade over time. Let me join the city's armed forces and put a stop to this crusade, as I put a stop to Sarevok.~ GOTO d5beltsd_8
      IF ~Alignment(Player1,MASK_GENEUTRAL)~ REPLY ~I want to be a force for good in Baldur's Gate. Let me prove myself. I have had enough of Sarevok's schemes and shapechangers. The man is dead; the damage he caused will fade over time. Let me join the city's armed forces and put a stop to this crusade, as I put a stop to Sarevok.~ GOTO d5beltsd_8
      IF ~Alignment(Player1,MASK_EVIL)~ REPLY ~In truth, I am not feeling very welcome in this city, and being here has become less and less fun. But this crusade sounds like an interesting challenge. Very well, I will join your army, and see about this threat in the north.~ GOTO d5beltsd_9
      IF ~~ REPLY ~I am not a soldier, and I would not know what to do among an army. Even if the Crusade interested me, it does not sound like an area where my skills can be effective. My place is here in the city. If someone or something out there is wearing my face, I need to know who, and why. Send your troops to face the crusade without me.~ GOTO d5beltsd_10
    END
    
    IF ~~ BEGIN d5beltsd_8 // chose SoD !evil
      SAY ~Are you sure that is your choice? There will be no going back: this will require you to rest up and then leave Baldur's Gate post-haste with the city's armed forces. Any unfinished business you have here will have to be left behind.~
      IF ~~ REPLY ~Yes, I am sure.~ GOTO d5beltsd_12
      IF ~~ REPLY ~Wait, let me reconsider.~ GOTO d5beltsd_11
    END
    
    IF ~~ BEGIN d5beltsd_9 // chose SoD evil
      SAY ~Are you sure that is your choice? There will be no going back: this will require you to rest up and then leave Baldur's Gate post-haste with the city's armed forces. Any unfinished business you have here will have to be left behind.~
      IF ~~ REPLY ~Yes, I am sure.~ GOTO d5beltsd_13
      IF ~~ REPLY ~Wait, let me reconsider.~ GOTO d5beltsd_11
    END
    
    IF ~~ BEGIN d5beltsd_10 // chose clone
      SAY ~Are you sure that is your choice? There will be no catching up: the city's armed forces need to march as soon as possible, and cannot wait for you. Whatever is happening at Castle Dragonspear will not be your concern; your business will be to the south.~
      IF ~~ REPLY ~Yes, I am sure.~ GOTO d5beltsd_18 // go to clone cut scene
      IF ~~ REPLY ~Wait, let me reconsider.~ GOTO d5beltsd_11
    END
    
    IF ~~ BEGIN d5beltsd_11
      SAY ~Well, what is it to be then? This is your one chance to make a choice as to where your future lies: north toward Dragonspear, or here in the south. Choose well.~
      IF ~Alignment(Player1,MASK_GOOD)~ REPLY ~I want to be a force for good in Baldur's Gate. Let me prove myself. I have had enough of Sarevok's schemes and shapechangers. The man is dead; the damage he caused will fade over time. Let me join the city's armed forces and put a stop to this crusade, as I put a stop to Sarevok.~ GOTO d5beltsd_8
      IF ~Alignment(Player1,MASK_GENEUTRAL)~ REPLY ~I want to be a force for good in Baldur's Gate. Let me prove myself. I have had enough of Sarevok's schemes and shapechangers. The man is dead; the damage he caused will fade over time. Let me join the city's armed forces and put a stop to this crusade, as I put a stop to Sarevok.~ GOTO d5beltsd_8
      IF ~Alignment(Player1,MASK_EVIL)~ REPLY ~In truth, I am not feeling very welcome in this city, and being here has become less and less fun. But this crusade sounds like an interesting challenge. Very well, I will join your army, and see about this threat in the north.~ GOTO d5beltsd_9
      IF ~~ REPLY ~I am not a soldier, and I would not know what to do among an army. Even if the Crusade interested me, it does not sound like an area where my skills can be effective. My place is here in the city. If someone or something out there is wearing my face, I need to know who, and why. Send your troops to face the crusade without me.~ GOTO d5beltsd_10
    END
    
    IF ~~ BEGIN d5beltsd_12 // chose SoD !evil
      SAY ~I am glad to hear it. As I say, you have proven your value, and after our recent travails, the city needs all the help it can muster to face the Crusade. From our reports, the crusaders have the wild energy of berserkers. And, unfortunately, the same disregard for innocents.~
      IF ~~ GOTO d5beltsd_14
    END
    
    IF ~~ BEGIN d5beltsd_13 // chose SoD evil
      SAY ~Well, you will have to chance to wet your blades, but mark well they are pointed at crusaders! I cannot say I enjoy your attitude, but fortunately our interests are aligned in this matter. And mark you well, you will be subject to army discipline, so be careful not to step out of line.~
      IF ~~ GOTO d5beltsd_14
    END
    
    IF ~~ BEGIN d5beltsd_14
      SAY ~You have a short time to rest before the army marches.~
      IF ~Global("C#st_HeroCutScene","GLOBAL",0) Global("D5HeroSceneInstalled","GLOBAL",1)~ GOTO d5beltsd_15 // hero tribute diversion
      IF ~Global("D5HeroSceneInstalled","GLOBAL",0)~ GOTO d5beltsd_16
      IF ~Global("C#st_HeroCutScene","GLOBAL",1)~ GOTO d5beltsd_16
    END
    
    IF ~~ BEGIN d5beltsd_15
      SAY ~But first, we must let the people of the city know that order has been restored. They need to know that the villain is defeated, slain by a hero. Whether or not that is what you really are, the fact is you did stop Sarevok. The whispers about you have already started; it would be prudent to make sure the less kind ones do not become dominant. Come: you will be presented as the 'Hero of Baldur's Gate.'~
      IF ~~ DO ~SetGlobal("C#st_HeroCutScene","GLOBAL",1)
    	ClearAllActions()
    	StartCutSceneMode()
    	StartCutSceneEx("c#stcut1",FALSE)~ EXIT // ... out to tribute cut scene
    END
    
    IF ~~ BEGIN d5beltsd_16
      SAY ~The forces of Baldur's Gate are mustering as we speak. We will provide you with quarters here in the palace until it is time to leave. Rest well, we will speak again in the morning.~
      IF ~~ DO ~SetInterrupt(FALSE)
    	ClearAllActions()
    	StartCutSceneMode()
    	StartCutSceneEx("d5st2so2",TRUE)
    	SetInterrupt(TRUE)~ EXIT 
    END
    
    IF ~Global("C#st_HeroCutScene","GLOBAL",1)~ BEGIN d5beltsd_17
      SAY ~The forces of Baldur's Gate are mustering as we speak. We will provide you with quarters here in the palace until it is time to leave. Rest well, we will speak again in the morning.~
      IF ~~ DO ~SetInterrupt(FALSE)
    	ClearAllActions()
    	StartCutSceneMode()
    	StartCutSceneEx("d5st2so2",TRUE)
    	SetInterrupt(TRUE)~ EXIT // ... back from hero cut scene, out to start SoD
    END
    
    IF ~~ BEGIN d5beltsd_18
      SAY ~Very well. I shall inform Corporal Duncan and Captain Corwin that they should make ready to leave at once, and not wait for you.~
      IF ~~ DO ~SetGlobal("D5GregsonPalace","GLOBAL",1) ActionOverride("Player1",DisplayStringHead(Myself,@70045))~ EXIT // ... clone cut scene
    END
    
    END
    
    APPEND LIIA
    
    IF ~Global("D5EntarCut","GLOBAL",7) Dead("SAREVOK")~ BEGIN d5beltsd_0
      SAY ~<CHARNAME>! We did not expect you so quickly. Did you find passage to the Undercity? Do you have information on Sarevok's whereabouts? I have asked Captain Gregson of the Flaming Fist to have a company of soldiers and battlemages prepared to apprehend him. Not as many as I would like - the Crusade is gathering strength in the north and most of our armed forces are assembling to march in that direction. Never mind that, though - tell us what you have learned.~
      IF ~~ REPLY ~Sarevok is dead. I trailed him to an old temple of Bhaal, where he had arranged some kind of magical trap. The entire place was glowing with some kind of energy. I could not escape.~ EXTERN BELT d5beltsd_1
      IF ~~ REPLY ~It is Sarevok who has learned the hardest of lessons. He trapped me and thought he could best me, but he was very wrong. He and his last followers fell to my onslaught.~ EXTERN BELT d5beltsd_1
    END
    
    IF ~~ BEGIN d5liiasd_1
      SAY ~This is a serious matter. We must know whether any remnants of his supporters may still threaten the city. The ranks of the crusade are swelling in the north, to the point where it may present an existential threat to nearby cities. We cannot have our attention divided between the threat without and a threat within.~
      IF ~~ REPLY ~I tell you, on my honor, Sarevok is dead and will trouble the city no more. The bodies of Tazok, Angelo, and another mage are still there. But Sarevok... he just disappeared in a swirl of some kind of glowing motes. Given where were, and what we know of him, I suppose it may have had something to do with the ritual he had planned? It is hard to say. But he is truly dead, and beyond returning. I know it. In my bones.~ EXTERN BDENTAR d5entarsd_1
      IF ~~ REPLY ~What do you want me to say? He's gone. Good riddance.~ EXTERN BDENTAR d5entarsd_1
    END
    
    IF ~~ BEGIN d5liiasd_2
      SAY ~That seems unlikely. The circumstances would have to be pretty convoluted for that to be the case. If <CHARNAME> were- ~
      IF ~~ EXTERN BDENTAR d5entarsd_2
    END
    
    IF ~~ BEGIN d5liiasd_3
      SAY ~I do not know... Since Sarevok's attack I have immersed myself in research about Bhaal's actions during the Time of Troubles, and the prophecies surrounding Sarevok and others of his ilk. Sarevok was not alone; there are scores of these... "Bhaal-spawned" individuals in the world. Prophecy holds that they will converge on the Sword Coast. Alaundo did not predict when it would happen, but what if Sarevok's actions have lit the flame that draws these beings to us, with chaos in their wake?~
      IF ~~ GOTO d5liiasd_4
    END
    
    IF ~~ BEGIN d5liiasd_4
      SAY ~This crusade in the north - do you think it is unrelated? Coincidental? Its leader, Caelar Argent... she is from a well-known family, but who is to say what may have happened. What if the concerns inside our city and outside it are connected? I fear the peril faced by our city has not ended, but will only intensify.~
      IF ~~ GOTO d5liiasd_5
    END
    
    IF ~~ BEGIN d5liiasd_5
      SAY ~<CHARNAME>, I would like to hear from you. Obviously we are not entirely happy with how your hunt for Sarevok resolved itself. I think it unlikely that you were in league with him, but your coin is on edge at the moment. You would do well to demonstrate that you have the interests of Baldur's Gate at heart, and not some other agenda. So, what would you propose? Will you stay and prove your innocence to Duke Silvershield? Or would you ride out with the forces of Baldur's Gate, and prove your worth by fighting for the city? I am afraid, under the circumstances, that there is no third option.~
      IF ~Alignment(Player1,MASK_GOOD)~ REPLY ~I want to be a force for good in Baldur's Gate. Let me prove myself. I have had enough of Sarevok's schemes and shapechangers. The man is dead; the damage he caused will fade over time. Let me join the city's armed forces and put a stop to this crusade, as I put a stop to Sarevok.~ EXTERN BELT d5beltsd_8
      IF ~Alignment(Player1,MASK_GENEUTRAL)~ REPLY ~I want to be a force for good in Baldur's Gate. Let me prove myself. I have had enough of Sarevok's schemes and shapechangers. The man is dead; the damage he caused will fade over time. Let me join the city's armed forces and put a stop to this crusade, as I put a stop to Sarevok.~ EXTERN BELT d5beltsd_8
      IF ~Alignment(Player1,MASK_EVIL)~ REPLY ~In truth, I am not feeling very welcome in this city, and being here has become less and less fun. But this crusade sounds like an interesting challenge. Very well, I will join your army, and see about this threat in the north.~ EXTERN BELT d5beltsd_9
      IF ~~ REPLY ~I am not a soldier, and I would not know what to do among an army. Even if the Crusade interested me, it does not sound like an area where my skills can be effective. My place is here in the city. If someone or something out there is wearing my face, I need to know who, and why. Send your troops to face the crusade without me.~ EXTERN BELT d5beltsd_10 // go to clone cut scene
      IF ~~ REPLY ~Duke Liia, Belt... I feel it would be best if I tell you this. When I went to Candlekeep, on the trail of the Iron Throne, I found a letter from Gorion. Apparently when I was a baby, he took me from a temple of Bhaal, right after the Time of Troubles. He believes I am also... one of the children sired by the god. It sounds crazy to even say it out loud. But that is what the letter. And it make sense. Gorion never hinted at such a thing. Evidently he wanted to shield me from the events of the prophecy. Or maybe, somehow, prevent it? I don't know. But it is who I am, and you should know that.~ EXTERN BDENTAR d5entarsd_4
    END
    
    IF ~~ BEGIN d5liiasd_6
      SAY ~That is... unexpected. Though, from everything I now know, perhaps unsurprising. And you never knew, until recently? Fascinating. Whatever your parentage, you are clearly not cut from the same cloth as Sarevok. Your actions heretofore have aptly proven that. There are debates among sages about whether direct divine influence in a mortal's blood would overpower them, or whether their own soul can retain its independence. I suppose we are seeing this question play out, in real time. My own opinion is that mortal souls are wondrous and powerful things, that even gods cannot subsume. That is, of course, why the gods need mortal flocks. But that is just supposition. To have a true test case...~
      IF ~~ EXTERN BELT d5beltsd_6
    END
    
    IF ~~ BEGIN d5liiasd_7
      SAY ~That is... unexpected. Though, from everything I now know, perhaps unsurprising.I am not sure how to feel about this revelation. I have noticed your tendency to put your concern for yourself above others. On its own, this is not a problem; heavens know many, many other people have similar tendencies! And whatever the shade of your moral fiber, you are clearly not cut from the same cloth as Sarevok. You are, as I say, balancing on a knife's edge at the moment. Your next move will be telling.~
      IF ~~ EXTERN BELT d5beltsd_6
    END
    
    END
    
    APPEND BDENTAR
    
    IF ~Global("D5EntarCut","GLOBAL",7) Dead("SAREVOK")~ BEGIN d5entarsd_0
      SAY ~<CHARNAME>! We did not expect you so quickly. Did you find passage to the Undercity? Do you have information on Sarevok's whereabouts? I have asked Captain Gregson of the Flaming Fist to have a company of soldiers and battlemages prepared to apprehend him. Not as many as I would like - the Crusade is gathering strength in the north and most of our armed forces are assembling to march in that direction. Never mind that, though - tell us what you have learned.~
      IF ~~ REPLY ~Sarevok is dead. I trailed him to an old temple of Bhaal, where he had arranged some kind of magical trap. The entire place was glowing with some kind of energy. I could not escape.~ EXTERN BELT d5beltsd_1
      IF ~~ REPLY ~It is Sarevok who has learned the hardest of lessons. He trapped me and thought he could best me, but he was very wrong. He and his last followers fell to my onslaught.~ EXTERN BELT d5beltsd_1
    END
    
    IF ~~ BEGIN d5entarsd_1
      SAY ~This is unbelievable! How do we know any of that even happened? I have heard the reports - Sarevok was said to be immensely powerful. Are we to believe this... this upstart could have defeated him and his top lieutenants, in his place of power? For all we know they could have been working together the whole time! Sarevok may be running to meet with Caelar Argent, then to march against the city at the head of a wildling army!~
      IF ~!IsValidForPartyDialogue("SKIE")~ EXTERN LIIA d5liiasd_2
      IF ~IsValidForPartyDialogue("SKIE")~ EXTERN SKIE d5skiesd_0
    END
    
    IF ~~ BEGIN d5entarsd_2
      SAY ~I am not interested in conjecture! I am interested in what can be proven! This has been a disaster for the city. Our iron was poisoned, our military readiness reduced, our trading costers brutally attacked, ONE of us was assassinated and the other three were nearly killed as well. And <CHARNAME> has been tangled up in it from the beginning!~
      IF ~~ GOTO d5entarsd_3
    END
    
    IF ~~ BEGIN d5entarsd_3
      SAY ~And he has still not answered for my murder. I tell you, it was no doppelganger. That would make no sense anyway; Sarevok left evidence connecting the murder to the Shadow Thieves, so why would the murderer not take the form of a Shadow Thief? I tell you, something about this stinks. I demand that <CHARNAME> submit to our custody until we can get to the bottom of it. <PRO_HESHE> should be subject to divination and interrogation.~
      IF ~!Dead("PORIOS")~ EXTERN BELT d5beltsd_3
      IF ~Dead("PORIOS")~ EXTERN BELT d5beltsd_4
    END
    
    IF ~~ BEGIN d5entarsd_4
      SAY ~You... what?? Are you all hearing this? <CHARNAME> is a chaos agent, just like Sarevok. Now more than ever, the Council must heed my concerns! Another Bhaal-child. And what of the others? Maybe it is a whole company of them! Who knows what danger they pose?~
      IF ~!IsValidForPartyDialogue("SKIE") Alignment(Player1,MASK_GOOD)~ EXTERN LIIA d5liiasd_6
      IF ~!IsValidForPartyDialogue("SKIE") Alignment(Player1,MASK_GENEUTRAL)~ EXTERN LIIA d5liiasd_6
      IF ~!IsValidForPartyDialogue("SKIE") Alignment(Player1,MASK_EVIL)~ EXTERN LIIA d5liiasd_7
      IF ~IsValidForPartyDialogue("SKIE")~ EXTERN SKIE d5skiesd_1
    END
    
    END
    
    APPEND SKIE
    
    IF ~~ BEGIN d5skiesd_0
      SAY ~Daddy, really, what are you talking about?~
      IF ~~ EXTERN LIIA d5liiasd_2
    END
    
    IF ~~ BEGIN d5skiesd_1
      SAY ~Oh my gods. Have you noticed, I am in this company? Ugh, this is so embarrassing!~
      IF ~Alignment(Player1,MASK_GOOD)~ EXTERN LIIA d5liiasd_6
      IF ~Alignment(Player1,MASK_GENEUTRAL)~ EXTERN LIIA d5liiasd_6
      IF ~Alignment(Player1,MASK_EVIL)~ EXTERN LIIA d5liiasd_7
    END
    
    END
    >>>>>>>> 
    COPY ~d5/transit+.d~ ~weidu_external/%MOD_FOLDER%/compile/transit+.d~
    COMPILE ~weidu_external/%MOD_FOLDER%/compile/transit+.d~

    And finally, because the campaign transition script sends you to the beginning of Korlasz' dungeon - which we want to retain, in case player begin a brand new campaign in SoD - we will add a block to the Korlasz Dungeon area script that will check if you have already completed it and that Sarevok is dead, and if so, shunt you forward to the palace kidnapping scene. Also slightly change the text crawl pop-up screen, to match our end-of-Sarevok journal entry.

    Spoiler
    ACTION_IF (GAME_IS ~bgee~) BEGIN
      STRING_SET 65221 @70045
      STRING_SET 70019 @70045
    END
    ACTION_IF (GAME_IS ~eet~) BEGIN
      STRING_SET 265221 @70045
      STRING_SET 270019 @70045
    END
    
    <<<<<<<< d5/bd120+7.baf
    IF
    	Global("D5KorlaszDone","GLOBAL",1)
    	Dead("Sarevok")  // Sarevok
    THEN
    	RESPONSE #100
    		SetGlobal("bd_Imoen_farewell","bd0120",2)
    		TakeObjectGoldGlobal("BD_TAKEN_GOLD","GLOBAL",Player1)
    		SetGlobal("BD_EXTRA_GOLD","GLOBAL",17)
    		SetGlobal("BD_SAFEHOUSE_DONE","GLOBAL",1)
    		SmallWait(5)
    		ActionOverride(Player2,LeaveAreaLUA("bd0103","",[131.485],E))
    		ActionOverride(Player3,LeaveAreaLUA("bd0103","",[152.510],NE))
    		ActionOverride(Player4,LeaveAreaLUA("bd0103","",[179.544],NE))
    		ActionOverride(Player5,LeaveAreaLUA("bd0103","",[202.567],NE))
    		ActionOverride(Player6,LeaveAreaLUA("bd0103","",[239.581],N))
    		ActionOverride(Player1,LeaveAreaLUAPanic("bd0103","",[215.396],SE))
    		ActionOverride(Player1,LeaveAreaLUA("bd0103","",[215.396],SE))
    END
    >>>>>>>>
    COPY ~d5/bd120+7.baf~ ~weidu_external/%MOD_FOLDER%/compile/bd120+7.baf~
    
    ACTION_IF (FILE_EXISTS_IN_GAME ~bd0120.bcs~) BEGIN
      EXTEND_TOP ~bd0120.bcs~ ~weidu_external/%MOD_FOLDER%/compile/bd120+7.baf~
    END

    And that's it for Part 7!

    So far, we added a new artifact, and an unsolved mystery at High Hedge, and added a bunch of content and general breathing room in chapter 7 of the BG1 campaign. Where the original game literally teleports you to the final fight with no explanation, now we have several new NPCs, and a whole dungeon to fight through, and a bunch of dialogue that addresses the isues and gives a narrative framework for the transition to SoD. The added dialogue here in Part 7 actually gives you a chance to tell the dukes "listen, I feel I should let you know, I am your father a Bhaalspawn." And the different dukes have different reactions to that, and to your actions in general. There are no overt consequences to that admission, but at least now the player has agency to role-play it as they see fit. And it creates the opportunity to change things later, in SoD, to be responsive to this choice.

    The transition to SoD happens right from Belt's dialogue, you say "I want to rest up and then march out with the army" and it gives the closure of the journal entry and text screen about the end of the fight against Sarevok, and then fades in to the early morning attack in which Imoen gets poisoned. So this is now fully playable if you choose the path that goes to SoD!

    On the other hand, you can tell the dukes "the Crusade is not my concern, go handle it without me, I need to investigate Entar's report that there is a murderer in the city with my face." Right now this alternative choice just has a placeholder action. In Part 8 we will add a cut scene with Captain Gregson running into the palace, and then have everyone go to the Flaming Fist jail cells. This avenue will tie into the Mirror Shard/Netherese Bracers mystery and send you to a modified version of the SoD ambush scene. That bit at least will be easier than Part 4, because we won't care about what comes afterward. The main difficulty there will be handling the alternate possibilities of actually going into BG2 (if you are playing EET and the SoA campaign is present), or just ending the game with a cinematic and final save (if you are playing BGEE/SoD and need an exported final save to import into BG2EE).

    Part 9 will jump back to the first path, where you actually play through SoD. This will insert the Mirror Shard cut scenes from Part 8 into the very end of SoD, and tie it all into SoD's Skie plot.

    And after that we'll address compatibility with EndlessBG1. And then, release!

  4. On 4/12/2024 at 1:57 PM, JediMindTrix said:

    Basically, the class-changer does not remove Imoen's Dual-Class flag from her character sheet and you have to manually remove it

    There is no way to change this flag in-game, short of using EEex. A mod would have to remove dual-class flags at install time. 

  5. Almost done with Part 7. This is probably the trickiest bit, as it involves cut scenes that can direct the game to different campaigns. 

    Just having a bit of difficulty with the transition to SoD: when I trigger the cut scene with the MoveToCampaign() action, it plops me down in Korkasz’ dungeon. But of course we have already finished that. I want to skip to the palace kidnapping attempt. 

    But I don’t necessarily want to change CAMPAIGN.2da, because if players start a brand new SoD game, I want it to start in Korlasz’ dungeon as usual. I want my changes to only take effect when playing through the end of BG1

    This is a bit complicated. I begin to understand why EndlessBG1 adds a whole new campaign when moving Korlasz’ dungeon forward into the BG1 game (just not as far forward as I am bringing it). But I don’t fully understand how EndlessBG1 uses that new campaign. Is it only for the section that includes Korlasz’ dungeon? So the ‘SoD’ campaign begins with the kidnapping? Or does ‘SoD’ work as normal, and the new campaign just shunts you ahead of the SoD prologue? I need to understand that mod better. 

    As I see it now, there are three options:

    1. Just remove Korlasz’ dungeon from SoD altogether, so the SoD campaign will begin with the kidnapping scene even when starting a new campaign. (How much does this matter? How many people skip BG1 and play SoD by itself? I imagine the number is close to zero…

    2. Learn what EndlessBG1 does with its added ‘campaign’ and try to do the same thing.

    3. Let the MoveToCampaign action put you in Korlasz’ dungeon, but before it even fades in from black, have that area script jump you forward to the kidnapping scene. 

    #3 sounds like the easiest way; #2 sounds like the hardest, but maybe best for compatibility…? Maybe. 

    EDIT - I have a working version of #3. Probably will go with that. 

  6. 2 hours ago, mickabouille said:

    Yeah, I'm probably a bit prejudiced because the fact that I don't believe a criminal organization of this kind can be severely injured by any police operation, as heavy-handed as they may be.

    As I have been thinking about it: it makes sense, IF Sarevok specifically ordered Angelo to target the Thieves’ Guild, because he specifically wanted access to that staircase that leads to the Undercity. It is almost the only explanation that makes sense, because it is not otherwise an important plot point (players will miss it entirely if they don’t happen upon Rededge and Silence), and there is no obvious reason why the entrance to the Undercity should be there in the first place.

    But even if that explanation makes sense… Bioware did not express anything like that in the game itself. We are left with the weird situation where the staircase is unusable for most of the game, located in the Guild for no stated reason, and Angelo happened to be cruel to the thieves for no stated reason, and Belt knows exactly where the Thieves’ Guild is and blithely teleports you there with no advance warning, even if Charname is a paladin or something…!

    It’s all a bit crazy. It should be at least a bit more sensible/satisfying with this mod. Not perfectly satisfying - “I heard a rumor there might be a warded entrance in the Thieves’ Guild; take this wardstone in case the rumor is true” - and lo and behold, the rumor is true. With more time and energy, I might try to set up a more open-ended investigation… like, maybe make it so Alatos has the only wardstone, and you need to find him. 

    But at the moment I am just trying improve the situation with a few quick dialogues, and that too-convenient rumor serves our purpose well enough. At least for now. 

  7. I think it’s fine. What I have set up in step 5 leaves some thieves in the Guild, but not as many, and the ones named in those dialogues (Alatos, Narlen, Rededge, etc.) are no longer there. Just Denkod, Lily, and a skeleton crew of nameless thieves. It fits the narrative while allowing the Thieves’ Guild location  to remain, you know, the Thieves’ Guild. 

    I have to get this thing done, at least a playable beta. It is taking up time I should be putting toward other projects. I am writing up the dialogue in step 7, and I have looked at how EndlessBG1 handles the transition to SoD. I should be able to use the same technique, and make it compatible, without much trouble. I will even support optional EndlessBG1 components like the hero tribute cut scene - though, that will be a bit more nuanced with this mod. 

  8. I’ve been playing (base) SR on IWDEE for years, it is pretty much fine AFAIK. Haven’t done it in a while. (The 2.5 update broke modding on iOS, so I have been playing IWD inside BG2EE.) But I think it is unlikely any recent changes would have busted it. 

  9. Another conundrum: I want to get across in dialogue that the dukes are grappling in real-time with the contents of Sarevok's diary. Alaundo's prophecy did not specify a time when it would occur, only "when Bhaal's bastard children come of age." This has not been on anyone's front burner; but the realization that Sarevok is a Bhaalspawn means that this prophesied era is suddenly upon them. There are a score of such children, or several score - they could be anywhere! (Dun dun dun!) The prophesy says their conflict will unfold in the Sword Coast, so the dukes of Baldur's Gate should be extremely concerned about their city. The threat of Sarevok, in other words, goes well beyond the man himself and his schemes - the dukes are now realizing that the greater threat by far is what Sarevok's existence portends.

    Spoiler
    Quote

     @70020  = ~[Liia] I do not know... Since Sarevok's attack I have immersed myself in research about Bhaal's actions during the Time of Troubles, and the prophecies surrounding Sarevok and others of his ilk. Sarevok was not alone - there are scores of these... Bhaal-spawn... in the world. Prophecy holds that they will converge on the Sword Coast. Alaundo did not predict when it would happen... but what if Sarevok's actions have lit the flame that draws these beings to us, with chaos in their wake?~
     @70021  = ~This crusade in the north - do you think it is unrelated? Coincidental? Its leader, Caelar Argent... she is from a well-known family, but who is to say what may have happened. What if the concerns inside our city and outside it are connected? I fear the peril faced by our city has not ended, but will only intensify.~

    This is great moment for Charname to pipe up and volunteer "hey, so just to show I am being fully honest with you guys, I got this letter from my foster-father, who found me as a baby in a temple of Bhaal at the same time Sarevok was born..." But how would the dukes respond to that? How would that change how they see you - especially given that the ultimate result has to be the same, with you accompanying their army in a place of pride, marching out to challenge the Crusade?

    At the same time, Charname might very well want to keep that a secret! If it was me I surely would not tell anyone. But SoD seems to operate on the assumption that everyone knows about you. I really dislike that.

    This one dialogue between Charname, Belt, Liia, and Entar is where that has to play out. And whether you disclose it or not, you still have to end up with a choice between marching against the Crusade, or investigating Entar's report that his killer had your face. Basically, the scene has to get railroaded to identical optional outcomes... but man, that is a BIG choice to incorporate while still getting to the same place(s) in the end.

    Thinking about it now, it is kind of shocking that the games never wrestled with this. You never have an option to disclose it, or keep it secret, or face any consequences either way. I suppose that wasn't very noticeable when the first game ended in a cut scene in the final battle, and the second game opened with you kidnapped in a dungeon by someone who knows all about you. But now, if we are to actually deal with the fallout from Sarevok's scheme, on-screen... this becomes rather important.

  10. 1 hour ago, polytope said:

    I don't have much to contribute to this topic, but I have noticed that on rare occasions initial kit bonuses can be applied to a character twice on creation. I'd guess something similar is happening here, best to make sure that whatever .spl encodes such bonuses also has a timing mode 9 protection from itself if it's only meant to be applied once.

    I also add an op318 effect blocking them from being applied at level 0, to make sure they are only applied once at level 1.

    But, as these are stat-based bonuses which are presumably dynamic and responsive to score changes in-game, I assume the bug has more to do with repeating effects via 272/232.

  11. Part 6: It's Not the End of the World

    This one came together extremely quickly, largely because it was already done in EndlessBG1. I just borrowed two bits of code to 1) prevent the game from ending when Sarevok dies, and 2) play the original BG1 game-end video when the combat ends:

    Spoiler
    ACTION_IF GAME_IS ~bgee~ THEN BEGIN
      COPY_EXISTING ~%Undercity_TempleofBhaal%.BCS~ ~override~
    	DECOMPILE_AND_PATCH BEGIN
    		SPRINT textToReplace ~Dead("Sarevok")[%newline%]*GlobalLT("EndOfBG1","GLOBAL",2)~
    		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
    		PATCH_IF (num_matches > 0) BEGIN
    			REPLACE_TEXTUALLY ~%textToReplace%~ ~False()~
    			PATCH_PRINT ~Patching: %num_matches% matches found in %SOURCE_FILESPEC% for REPLACE_TEXTUALLY: %textToReplace%~
    		END ELSE BEGIN
    			PATCH_WARN ~WARNING: could not find %textToReplace% in %SOURCE_FILESPEC%~
    		END
    	END
      BUT_ONLY
    END
    
    ACTION_IF GAME_IS ~eet~ THEN BEGIN
      COPY_EXISTING ~%Undercity_TempleofBhaal%.BCS~ ~override~
    	DECOMPILE_AND_PATCH BEGIN
    		SPRINT textToReplace ~Dead("Sarevok")[%newline%]*Global("EndOfBG1","GLOBAL",0)~
    		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
    		PATCH_IF (num_matches > 0) BEGIN
    			REPLACE_TEXTUALLY ~%textToReplace%~ ~False()~
    			PATCH_PRINT ~Patching: %num_matches% matches found in %SOURCE_FILESPEC% for REPLACE_TEXTUALLY: %textToReplace%~
    		END ELSE BEGIN
    			PATCH_WARN ~WARNING: could not find %textToReplace% in %SOURCE_FILESPEC%~
    		END
    	END
      BUT_ONLY
    END
    
    <<<<<<<< .../ar0125-et.baf
    IF
    	Dead("Sarevok")  // Armored Figure (Sarevok)
    	OR(2)
    		Dead("GALDOR")   //Angelo
    		!Exists("GALDOR")   //Angelo
    	OR(2)
    		Dead("SEMAJ")    // Semaj
    		!Exists("SEMAJ")    // Semaj
    	OR(2)
    		Dead("Tazok")    //Tazok
    		!Exists("Tazok")    //Tazok
    	Global("C#st_BG1End","GLOBAL",0)
    THEN
    	RESPONSE #100
    		SetInterrupt(FALSE)
    		SaveGame(0)
    		SmallWait(1)
    		ClearAllActions()
    		StartCutSceneMode()
    		SetGlobal("C#st_BG1End","GLOBAL",1)
    		SetGlobal("SarevokBehavior","GLOBAL",5)
    		TriggerActivation("Door0123",TRUE)
    		Wait(2)
    		FadeToColor([30.0],0)
    		Wait(2)
    		StartMovie("ENDMOVIE")
    		FadeFromColor([30.0],0)
    		EndCutSceneMode()
    		SetInterrupt(TRUE)
    END
    >>>>>>>>
    COPY ~.../ar0125-et.baf~ ~weidu_external/%MOD_FOLDER%/compile/ar0125-et.baf~
    EXTEND_TOP ~%Undercity_TempleofBhaal%.BCS~ ~weidu_external/%MOD_FOLDER%/compile/ar0125-et.baf~ EVALUATE_BUFFER

    The only other thing I wanted to add for this fight is to disable the exit from the temple of Bhaal when you enter, and reenable it after you defeat Sarevok:

    Spoiler
    <<<<<<<< d5/area0125.baf
    IF
    	!Dead("SAREVOK")
    	Global("D5TempleLock","GLOBAL",0)
    THEN
    	RESPONSE #100
    		TriggerActivation("Door0123",FALSE)
    		SetGlobal("D5TempleLock","GLOBAL",1)
    END
    
    IF
    	Dead("SAREVOK")
    	Global("D5TempleLock","GLOBAL",1)
    THEN
    	RESPONSE #100
    		TriggerActivation("Door0123",TRUE)
    		SetGlobal("D5TempleLock","GLOBAL",2)
    		AddJournalEntry(~The Hunt for Sarevok
    Sarevok has been defeated once and for all. He had prepared some kind of ritual in an old temple of Bhaal, trapping me there and hoping to gain power from my death somehow. Thankfully it was he who died. The ritual must have affected him instead, because his body disintegrated in an obviously magical way. I do not know what to make of that. In any event, I should report what happened to Dukes Belt and Liia. Maybe now that Sarevok is gone, things on the Sword Coast can go back to normal.~,QUEST)
    END
    >>>>>>>>
    COPY ~d5/area0125.baf~ ~weidu_external/%MOD_FOLDER%/compile/%bg1_area_prefix%0125.baf~
    EXTEND_TOP ~%bg1_area_prefix%0125.bcs~ ~weidu_external/%MOD_FOLDER%/compile/%bg1_area_prefix%0125.baf~

    The idea is, the dukes quite sensibly told you not to engage Sarevok in combat without any backup. They wanted him alive, or at the very least they wanted his body. But Sarevok laid a trap and locked you in the temple with him. He has set up the arena beforehand such that he can absorb your divine essence and double the strength of his own. So you are forced to fight him, and when he dies his body disappears in a cloud of golden particles.

    Now you will go back to the dukes to report your success... but you went fairly directly against their orders (even if through no fault of your own), and you don't have the body. So you are a hero... but they are not going to be very happy with you. That tension will set the stage for the final dialogues and cut scenes as the game moves to the next chapter.

  12. Part 5: The Boy Who Lived

    With Korlasz' dungeon cleared and having found a letter from Sarevok to Korlasz mentioning his intent to regroup in a place called 'The Undercity,' the player should report back to Dukes Belt and Liia. There will be a scene in the Ducal Palace with a lot of exposition to click through (veering toward PS:T levels of reading here, need to keep it brief). Duke Liia will direct you to the next step to finding Sarevok, and Duke Entar (a.k.a. The Boy Who Lived) will appear and make some wild accusations against you, and then, if Imoen is not in the party, she will appear in the palace and begin her friendship with Duke Liia. We are just getting the various pieces in position for the end of this campaign and the beginning of the next one.

    Then the player will go to the Thieves' Guild, and speak to Denkod, and then descend to the maze. The Denkod dialogue is a bit wacky, but honestly I don't think a bit of levity is out of order at this juncture.

    Most of Part 5 has been writing, writing, writing. I got a bit tired of it by the end. Maybe that comes through, maybe not. In any event this is a beta so the first draft is going in and I am pressing forward. Everything is subject to later revision.

    The first order of business is dealing with Journal entries, which I have never done before. I think I got it right...?

    Spoiler
    ADD_JOURNAL TITLE (~The Hunt for Sarevok~) @50035 @50079

    I also added similar lines back to the top of Step 3 and Step 4 in my local version. That should allow AddJournalEntry() script actions to lump all my journal entries into a proper quest log.

    Next, I add some checks to BALDUR.BCS to constantly check whether Imoen is in the party, and if so, what chapter it is. This should therefore set a variable value to the last chapter Imoen was in the party.

    Spoiler
    <<<<<<<< d5/baldur+.baf
    IF
    	Global("CHAPTER","GLOBAL",1)
    	InParty("IMOEN")
    	GlobalLT("D5ImoenChap","GLOBAL",1)
    THEN
    	RESPONSE #100
    		SetGlobal("D5ImoenChap","GLOBAL",1)
    END
    
    IF
    	Global("CHAPTER","GLOBAL",2)
    	InParty("IMOEN")
    	GlobalLT("D5ImoenChap","GLOBAL",2)
    THEN
    	RESPONSE #100
    		SetGlobal("D5ImoenChap","GLOBAL",2)
    END
    
    IF
    	Global("CHAPTER","GLOBAL",3)
    	InParty("IMOEN")
    	GlobalLT("D5ImoenChap","GLOBAL",3)
    THEN
    	RESPONSE #100
    		SetGlobal("D5ImoenChap","GLOBAL",3)
    END
    
    IF
    	Global("CHAPTER","GLOBAL",4)
    	InParty("IMOEN")
    	GlobalLT("D5ImoenChap","GLOBAL",4)
    THEN
    	RESPONSE #100
    		SetGlobal("D5ImoenChap","GLOBAL",4)
    END
    
    IF
    	Global("CHAPTER","GLOBAL",5)
    	InParty("IMOEN")
    	GlobalLT("D5ImoenChap","GLOBAL",5)
    THEN
    	RESPONSE #100
    		SetGlobal("D5ImoenChap","GLOBAL",5)
    END
    
    IF
    	Global("CHAPTER","GLOBAL",6)
    	InParty("IMOEN")
    	GlobalLT("D5ImoenChap","GLOBAL",6)
    THEN
    	RESPONSE #100
    		SetGlobal("D5ImoenChap","GLOBAL",6)
    END
    
    IF
    	Global("CHAPTER","GLOBAL",7)
    	InParty("IMOEN")
    	GlobalLT("D5ImoenChap","GLOBAL",7)
    THEN
    	RESPONSE #100
    		SetGlobal("D5ImoenChap","GLOBAL",7)
    END
    >>>>>>>>
    COPY ~d5/baldur+.baf~ ~weidu_external/%MOD_FOLDER%/compile/baldur+.baf~
    EXTEND_TOP ~baldur.BCS~ ~weidu_external/%MOD_FOLDER%/compile/baldur+.baf~

    I have four different lines of explanatory dialogue from Imoen, depending on her status:

    • Only in the party in chapter 1 or not at all
    • Last in the party in chapter 2, 3, or 4
    • In the party during chapter 5, 6, or 7
    • Dead

    Next, I will add some trigger in the Ducal Palace area script to set up the three cut scenes that will occur here, and script those cut scenes themselves:

    Spoiler
    <<<<<<<< d5/ar108+5.baf
    IF
    	Global("D5EntarCut","GLOBAL",1)
    THEN
    	RESPONSE #100
    		SetGlobal("D5EntarCut","GLOBAL",2)
    		CreateCreature("BDENTAR",[520.615],E)
    		ClearAllActions()
    		StartCutSceneMode()
    		StartCutScene("D5ENCUT1")
    END
    
    IF
    	Global("D5EntarCut","GLOBAL",4)
    THEN
    	RESPONSE #100
    		SetGlobal("D5EntarCut","GLOBAL",5)
    		ClearAllActions()
    		StartCutSceneMode()
    		StartCutScene("D5ENCUT2")
    END
    
    IF
    	Global("D5MazeOpen","GLOBAL",1)
    	Global("D5ImoenPalace","GLOBAL",0)
    	!InParty("%IMOEN_DV%")
    THEN
    	RESPONSE #100
    		SetGlobal("D5ImoenPalace","GLOBAL",1)
    		CreateCreature("BDIMOEN",[230.380],SE)
    		ClearAllActions()
    		StartCutSceneMode()
    		StartCutScene("D5IMCUT1")
    END
    >>>>>>>>
    COPY ~d5/ar108+5.baf~ ~weidu_external/%MOD_FOLDER%/compile/ar108+5.baf~
    
    ACTION_IF (FILE_EXISTS_IN_GAME ~%bg1_area_prefix%0108.bcs~) BEGIN
      EXTEND_TOP ~%bg1_area_prefix%0108.BCS~ ~weidu_external/%MOD_FOLDER%/compile/ar108+5.baf~ EVALUATE_BUFFER
    END
    
    <<<<<<<< d5/d5encut1.baf
    IF
    	True()
    THEN
    	RESPONSE #100
    		CutSceneId("BDENTAR")
    		DisplayStringHead(Myself,~What is going on here??~)
    		MoveToPoint([705.560])
    		SmallWait(1)
    		SetGlobal("D5EntarCut","GLOBAL",3)
    		SmallWait(2)
    		EndCutSceneMode()
    		ActionOverride("BDENTAR",StartDialogueNoSet(Player1))
    END
    >>>>>>>>
    COPY ~d5/d5encut1.baf~ ~weidu_external/%MOD_FOLDER%/compile/d5encut1.baf~
    COMPILE ~weidu_external/%MOD_FOLDER%/compile/d5encut1.baf~
    
    <<<<<<<< d5/d5encut2.baf
    IF
    	True()
    THEN
    	RESPONSE #100
    		CutSceneId("BDENTAR")
    		DisplayStringHead(Myself,~This is not over!~)
    		MoveToPoint([520.615])
    		SetGlobal("D5EntarCut","GLOBAL",6)
    		SmallWait(1)
    		EndCutSceneMode()
    		ActionOverride("BDENTAR",EscapeArea())
    /*		ActionOverride("BELT",StartDialogueNoSet(Player1)) */
    END
    
    >>>>>>>>
    COPY ~d5/d5encut2.baf~ ~weidu_external/%MOD_FOLDER%/compile/d5encut2.baf~
    COMPILE ~weidu_external/%MOD_FOLDER%/compile/d5encut2.baf~
    
    <<<<<<<< d5/d5imcut1.baf
    IF
    	True()
    THEN
    	RESPONSE #100
    		CutSceneId("%IMOEN_DV%")
    		DisplayStringHead(Myself,~Heya! It's me, Imoen!~)
    		MoveToPoint([530.360])
    		SmallWait(1)
    		SetGlobal("D5ImoenPalace","GLOBAL",2)
    		SmallWait(2)
    		EndCutSceneMode()
    		ActionOverride("LIIA",StartDialogueNoSet(Player1))
    END
    >>>>>>>>
    COPY ~d5/d5imcut1.baf~ ~weidu_external/%MOD_FOLDER%/compile/d5imcut1.baf~
    COMPILE ~weidu_external/%MOD_FOLDER%/compile/d5imcut1.baf~ EVALUATE_BUFFER
    
    <<<<<<<< d5/belt+.baf
    IF
    	!See([ENEMY])
    	CombatCounter(0)
    	Global("D5EntarCut","GLOBAL",6)
    THEN
    	RESPONSE #100
    		Dialogue([PC])
    END
    >>>>>>>>
    COPY ~d5/belt+.baf~ ~weidu_external/%MOD_FOLDER%/compile/belt+.baf~
    EXTEND_TOP ~BELT.BCS~ ~weidu_external/%MOD_FOLDER%/compile/belt+.baf~

    The first has Duke Entar enter and get in a conversation with Liia; the second has Entar leave in a huff; and the third has Imoen (the SoD BDIMOEN version) enter the area if she is not already in the party.

    Then I will add a bunch of dialogue to Belt and Liia. (I'm still duplicating the same dialogue for both of them, sue me... anyway here again, the player will never know because the dialogue only triggers once.) And also some lines for Entar and Imoen, and a couple short interjections from Skie in case she is in the party when Entar accuses you of murder.

    Spoiler
    <<<<<<<< d5/palace+.d
    APPEND BELT
    
    IF ~Global("D5KorlaszDone","GLOBAL",1) Global("D5MazeOpen","GLOBAL",0) Global("D5EntarCut","GLOBAL",0)~ BEGIN d5beltkd_0
      SAY ~You have returned! A Flaming Fist messenger has informed us of your success.~
      IF ~Dead("BDKORLAS")~ GOTO d5beltkd_2
      IF ~!Dead("BDKORLAS")~ GOTO d5beltkd_3
    END
    
    IF ~Global("D5KorlaszDone","GLOBAL",2) Global("D5MazeOpen","GLOBAL",0)~ BEGIN d5beltkd_1
      SAY ~Tell me, did you find any information about Sarevok or his whereabouts?~
      IF ~!PartyHasItem("D5SCRLSK")~ REPLY ~We have found nothing useful.~ GOTO d5beltkd_5
      IF ~PartyHasItem("D5SCRLSK")~ REPLY ~We found this letter from Sarevok to Korlasz. It mentions an Undercity? A place inside Baldur's Gate? Do you know what he is talking about?~ GOTO d5beltkd_6
    END
    
    IF ~~ BEGIN d5beltkd_2
      SAY ~It is a shame that Korlasz felt she had to die. I wonder that a knave like Sarevok can engender such stubborn loyalty...~
      IF ~~ GOTO d5beltkd_4
    END
    
    IF ~~ BEGIN d5beltkd_3
      SAY ~Korlasz is in custody. She is, for now, refusing to tell us anything about Sarevok. I wonder that a knave like Sarevok can engender such stubborn loyalty...~
      IF ~~ GOTO d5beltkd_4
    END
    
    IF ~~ BEGIN d5beltkd_4
      SAY ~Tell me, did you find any information about Sarevok or his whereabouts?~
      IF ~!PartyHasItem("D5SCRLSK")~ REPLY ~We have found nothing useful.~ GOTO d5beltkd_5
      IF ~PartyHasItem("D5SCRLSK")~ REPLY ~We found this letter from Sarevok to Korlasz. It mentions an Undercity? A place inside Baldur's Gate? Do you know what he is talking about?~ GOTO d5beltkd_6
    END
    
    IF ~~ BEGIN d5beltkd_5
      SAY ~Well, you should make sure you scour the crypt, it is our best lead at the moment. Korlasz is an important ally of Sarevok, she is sure to have some information.~
      IF ~~ DO ~SetGlobal("D5KorlaszDone","GLOBAL",2)~ EXIT
    END
    
    IF ~~ BEGIN d5beltkd_6
      SAY ~Liia is the history expert here, I will defer to her on this.~
      IF ~~ EXTERN LIIA d5liiakd_6
    END
    
    IF ~Global("D5EntarCut","GLOBAL",6)~ BEGIN d5beltkd_7
      SAY ~I apologize for that outburst. Do not worry, he will come around. While his accusation is disturbing, I am sure our explanation is the correct one. What else would it be? For now, please focus on the task at hand: it is imperative that Sarevok be found, and brought to justice. Do not confront him if you can help it. Let us know his location and we can arrange for a squadron of Flaming Fist soldiers to accompany you to detain him. We want him back here alive, if possible. But, even if dead, we can work with that. Just be sure to bring his body back here, so we can resurrect him, or in the worst case just commune with his spirit.~
      IF ~~ DO ~SetGlobal("D5EntarCut","GLOBAL",7)~ GOTO d5beltkd_8
    END
    
    IF ~~ BEGIN d5beltkd_8
      SAY ~You can prove Entar wrong, and show your loyalty to the city, by getting this task done.~
      IF ~~ DO ~SetGlobal("D5MazeOpen","GLOBAL",1)~ DO ~AddJournalEntry(~The Hunt for Sarevok
    Duke Liia Jannath has given me a clue to where to look for the Undercity. She mentioned passages underground which were specially warded long ago, but apparently the dukes have the power to bypass those wards. She inscribed a rune on my hand, in case I find such a passage. I have been directed to investigate the rumor of an old disused passage to the Undercity inside the Baldur's Gate Thieves' Guild. The dukes asked that I not confront Sarevok, directly, but only find his location and report back so they can send reinforcements. The situation still seems volatile...~,QUEST)~ EXIT
    END
    
    IF ~Global("D5EntarCut","GLOBAL",7)~ BEGIN d5beltkd_9
      SAY ~Please do not delay in finding Sarevok, and if you cannot avoid a fight, remember to bring his body back here.~
      IF ~~ EXIT
    END
    
    END
    
    APPEND LIIA
    
    IF ~Global("D5KorlaszDone","GLOBAL",1) Global("D5MazeOpen","GLOBAL",0) Global("D5EntarCut","GLOBAL",0)~ BEGIN d5liiakd_0
      SAY ~You have returned! A Flaming Fist messenger has informed us of your success.~
      IF ~Dead("BDKORLAS")~ GOTO d5liiakd_2
      IF ~!Dead("BDKORLAS")~ GOTO d5liiakd_3
    END
    
    IF ~Global("D5KorlaszDone","GLOBAL",2) Global("D5MazeOpen","GLOBAL",0)~ BEGIN d5liiakd_1
      SAY ~Tell me, did you find any information about Sarevok or his whereabouts?~
      IF ~!PartyHasItem("D5SCRLSK")~ REPLY ~We have found nothing useful.~ GOTO d5liiakd_5
      IF ~PartyHasItem("D5SCRLSK")~ REPLY ~We found this letter from Sarevok to Korlasz. It mentions an Undercity? A place inside Baldur's Gate? Do you know what he is talking about?~ GOTO d5liiakd_6
    END
    
    IF ~~ BEGIN d5liiakd_2
      SAY ~It is a shame that Korlasz felt she had to die. I wonder that a knave like Sarevok can engender such stubborn loyalty...~
      IF ~~ GOTO d5liiakd_4
    END
    
    IF ~~ BEGIN d5liiakd_3
      SAY ~Korlasz is in custody. She is, for now, refusing to tell us anything about Sarevok. I wonder that a knave like Sarevok can engender such stubborn loyalty...~
      IF ~~ GOTO d5liiakd_4
    END
    
    IF ~~ BEGIN d5liiakd_4
      SAY ~Tell me, did you find any information about Sarevok or his whereabouts?~
      IF ~!PartyHasItem("D5SCRLSK")~ REPLY ~We have found nothing useful.~ GOTO d5liiakd_5
      IF ~PartyHasItem("D5SCRLSK")~ REPLY ~We found this letter from Sarevok to Korlasz. It mentions an Undercity? A place inside Baldur's Gate? Do you know what he is talking about?~ GOTO d5liiakd_6
    END
    
    IF ~~ BEGIN d5liiakd_5
      SAY ~Well, you should make sure you scour the crypt, it is our best lead at the moment. Korlasz is an important ally of Sarevok, she is sure to have some information.~
      IF ~~ DO ~SetGlobal("D5KorlaszDone","GLOBAL",2)~ EXIT
    END
    
    IF ~~ BEGIN d5liiakd_6
      SAY ~Ah yes. The city's history is quite old. Older than the bricks of these buildings, older than Balduran. There have been rumors that the decaying remains of the original city still lie somewhere beneath us.~
      IF ~~ GOTO d5liiakd_7
    END
    
    IF ~~ BEGIN d5liiakd_7
      SAY ~Of course the rumors also say the old city is exceedingly dangerous. Who knows what evils might be buried down there? The truth is, as dukes of the city we have a responsibility to protect our citizens from dangers below. So, we were told that our predecessors magically warded any known passages. And, being unusable, they were mostly forgotten.~
      IF ~~ GOTO d5liiakd_8
    END
    
    IF ~~ BEGIN d5liiakd_8
      SAY ~I don't know what passage Sarevok found, or how he bypassed the wards. Maybe he found a route nobody ever knew about. I can only guess that he has found some source of power there - that could explain his extraordinary success in his schemes. In my lifetime, the only rumors I have heard of such things is of a blocked-off area in the thieves' guild, inaccessible even to its own members. That certainly conforms to the stories of those ancient warrens.~
      IF ~~ GOTO d5liiakd_9
    END
    
    IF ~~ BEGIN d5liiakd_9
      SAY ~We dare not send troops in force - Angelo was quite cruel in dealing with the guild, and it has created a volatile situation. I fear reprisals if we were to send Flaming Fist soldiers into the heart of their domain. Especially given the rumors from the north, it is important to promote unity and normalcy, not risk further strife. Better that an independent agent investigate the rumored passage. Here, I will apply a magical rune on your hand. Sort of a 'key to the city.' If you can find a way to the Undercity, this tattoo will allow you to traverse it.~
      IF ~~ DO ~SetGlobal("D5EntarCut","GLOBAL",1)~ EXIT
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5liiakd_10
      SAY ~Duke Silvershield! You're back! How are you feeling?~
      IF ~~ EXTERN BDENTAR d5entarkd_1
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5liiakd_11
      SAY ~<CHARNAME>? <PRO_HESHE> just returned from a mission for us- ~
      IF ~~ EXTERN BDENTAR d5entarkd_2
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5liiakd_12
      SAY ~Entar, you have been... er, away, these recent days. You are not aware of the threat: doppelgangers, posing as citizens, were infiltrating parts of the city. It was all part of Sarevok's plan. The iron crisis, the bandit raids, the Seven Suns and the Iron Throne - it was Sarevok all along.~
      IF ~~ EXTERN BDENTAR d5entarkd_3
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5liiakd_13
      SAY ~Entar... they killed a lot of people. Listen, you are not fully caught up on the situation. Resurrection takes a lot out of you. And this isn't your first. You need rest. The situation here is in hand. We have a lead on Sarevok's whereabouts. <CHARNAME> is going to find him, and report back to use so we can send the Flaming Fist to bring him to justice. Once he is in our custody, all will be made clear. Now please, go rest.~
      IF ~~ EXTERN BDENTAR d5entarkd_4
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5liiakd_14
      SAY ~Entar, please. You are back with us. Duke Eltan is on the mend. Emissaries have already been dispatched to sue for peace with Amn. The threat to the city has been eliminated - thanks in no small part to Charname. Now please, get some rest.~
      IF ~~ DO ~SetGlobal("D5EntarCut","GLOBAL",4)~ JOURNAL ~Duke Silvershield's Accusation
    Duke Entar Silvershield was resurrected and has returned to the Ducal Palace after having been murdered by agents of Sarevok. He appeared quite out of sorts, making angry accusations that *I* had murdered him. That of course is not possible, and the doppelganger situation was explained to him. Still, he seems adamant that his attacker was no doppelganger. I cannot say why he is so sure. Maybe after he has rested and fully recovered, he will see reason.~ EXIT
    END
    
    IF ~Global("D5EntarCut","GLOBAL",7) !Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5liiakd_15
      SAY ~Please do not delay in finding Sarevok, and if you cannot avoid a fight, remember to bring his body back here.~
      IF ~~ EXIT
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5liiakd_16
      SAY ~Before you go, <CHARNAME>, a small surprise. An old companion of yours would like to say hello.~
      IF ~!Dead("IMOEN") GlobalLT("D5ImoenChap","GLOBAL",2)~ EXTERN BDIMOEN d5imoenkd_0
      IF ~!Dead("IMOEN") GlobalGT("D5ImoenChap","GLOBAL",1) GlobalLT("D5ImoenChap","GLOBAL",5)~ EXTERN BDIMOEN d5imoenkd_1
      IF ~!Dead("IMOEN") GlobalGT("D5ImoenChap","GLOBAL",4)~ EXTERN BDIMOEN d5imoenkd_2
      IF ~Dead("IMOEN")~ EXTERN BDIMOEN d5imoenkd_3
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5liiakd_17
      SAY ~Imoen here is a very interesting young woman. It has been enjoyable getting to know her. She told me all about how you both came to be raised in Candlekeep. I believe that beyond her childlike exuberance is an unusually sharp mind.~
      IF ~~ EXTERN BDIMOEN d5imoenkd_5
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5liiakd_18
      SAY ~We shall see. There is certainly a depth of... potential in you that most cannot see. I think I would very much like to explore that together. In the meantime, I think it is best that close associates of <CHARNAME> stay here with us, under the watch of our guards. Until the machinations of Sarevok are well and truly ended, we would do well to keep Imoen secure.~
      IF ~~ REPLY ~We are going after Sarevok now. Imoen, why don't you join me, and help me take him down for good?~ EXTERN BDIMOEN d5imoenkd_6
      IF ~~ REPLY ~That makes sense.~ GOTO d5liiakd_19
      IF ~~ REPLY ~Whatever. Imoen is not my concern.~ GOTO d5liiakd_19
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5liiakd_19
      SAY ~There are many moving parts here. You have your mission, and Imoen has hers. Once you know Sarevok's location, we can discuss the matter further. Now go with haste, please. It would not do well to allow Sarevok to spend too much time fortifying whatever hole he has fled to.~
      IF ~~ DO ~SetGlobal("D5ImoenPalace","GLOBAL",3)~ JOURNAL ~Imoen's Return
    I have not seen Imoen in some time, but she has apparently made her own way to the Ducal Palace and befriended Duke Liia Jannath. Duke Liia seems interested in helping Imoen discover her full potential. While I search out Sarevok to put an end to his schemes at last, Imoen will stay at the palace under the dukes' protection.~ EXIT
    END
    
    END
    
    APPEND BDENTAR
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5entarkd_0
      SAY ~What in the Abyss is going on here?? Do you know who you are talking to?~
      IF ~~ EXTERN LIIA d5liiakd_10
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5entarkd_1
      SAY ~Never mind that! I want to know what this person is doing here in the palace, unguarded!~
      IF ~~ EXTERN LIIA d5liiakd_11
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5entarkd_2
      SAY ~A mission?! For you? How are you letting this happen? Don't you understand - Charname murdered me!~
      IF ~!IsValidForPartyDialogue("SKIE")~ EXTERN LIIA d5liiakd_12
      IF ~IsValidForPartyDialogue("SKIE") Alignment(Player1,MASK_GOOD)~ EXTERN SKIE d5skiekd_0
      IF ~IsValidForPartyDialogue("SKIE") Alignment(Player1,MASK_GENEUTRAL)~ EXTERN SKIE d5skiekd_0
      IF ~IsValidForPartyDialogue("SKIE") Alignment(Player1,MASK_EVIL)~ EXTERN SKIE d5skiekd_1
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5entarkd_3
      SAY ~Nonsense! Do you think a slimy hissing doppelganger could kill me?~
      IF ~~ EXTERN LIIA d5liiakd_13
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5entarkd_4
      SAY ~Yes, indeed, all will be made very clear. I tell you, that was no doppelganger. I know what I saw. This is not over!~
      IF ~~ EXTERN LIIA d5liiakd_14
    END
    
    END
    
    APPEND SKIE
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5skiekd_0
      SAY ~What? Daddy no! You don't understand - Charname is my friend. HESHE has been with me. There's no way HESHE could have killed you we were nowhere near the estate.~
      IF ~~ EXTERN LIIA d5liiakd_12
    END
    
    IF ~Global("D5EntarCut","GLOBAL",3)~ BEGIN d5skiekd_1
      SAY ~Is... is this true? Did you murder my dad? Wait, when could that even have happened?~
      IF ~~ EXTERN LIIA d5liiakd_12
    END
    
    END
    
    APPEND BDIMOEN
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5imoenkd_0
      SAY ~Heya <CHARNAME>! It's been a while. I hear you've been having lots of adventures, without me. That's fine. Really! They sound like amazing fun. Anyway, I've had a bit of a journey myself. I was back at Candlekeep, you know, and there was some real creepy stuff going on there. People changing faces. Most of the monks are so clueless, they had no idea. But I did! Only, I didn't really know what to do about it. And then I heard you were back! But you got arrested before I could see you. That wasn't very smart of you!~
      IF ~~ GOTO d5imoenkd_4
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5imoenkd_1
      SAY ~Heya <CHARNAME>! It's been a while. I hear you've been having lots of adventures, without me. That's fine. Really! I hung around Beregost and the Friendly Arm Inn for a while - Bentley has some really great stories, from when he was an adventurer. Only, I got bored pretty quick, you know? So, once news reached us of the murders at Candlekeep, I figured you probably got yourself into trouble and needed me to come help! It wasn't hard to see that the Iron Throne was probably at the heart of everything that was going on, so you would probably come to the city.~
      IF ~~ GOTO d5imoenkd_4
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5imoenkd_2
      SAY ~Heya <CHARNAME>! Have you taken down Sarevok yet, or what? Heh, just jokin'. I've been, you know, hanging around the city. Got kind of bored, to be honest. But then I met this halfling, and she can get into all kinds of places, and - er, maybe we shouldn't talk about that here. I'll tell you more about it later, I guess.~
      IF ~~ GOTO d5imoenkd_4
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5imoenkd_3
      SAY ~Heya <CHARNAME>! It's me! I was dead. I mean, mostly dead? I'm not *exactly* sure what happened, but I remember this nice cleric was talking to me, said he was a miracle worker (I think that means cleric) and he said there's a big difference between mostly dead and all dead, and I guess I was just mostly dead. It sounds a bit weird to me, but, here I am!~
      IF ~~ GOTO d5imoenkd_4
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5imoenkd_4
      SAY ~Anyway, I eventually heard about the doppelganger attack at the coronation, and tracked you down here! And that's how I met Duke Liia. She's super nice!~
      IF ~~ EXTERN LIIA d5liiakd_17
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5imoenkd_5
      SAY ~Duke Liia says she thinks I can do magic! I mean, not just do it, but that I could be really good at it!~
      IF ~~ EXTERN LIIA d5liiakd_18
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",2)~ BEGIN d5imoenkd_6
      SAY ~Aw, I really want to! I would love to give him a good smack when he's not looking. But Liia thinks it would be a bad idea. Something about 'not committing all one's resources in times of chaos.' I dunno, it made sense at the time. Anyway, she's teaching me magic, and Liia is, like, the BEST at magic. Just think how much stronger I'll be once I'm properly instructed!~
      IF ~~ EXTERN LIIA d5liiakd_19
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",3) !Dead("SAREVOK")~ BEGIN d5imoenkd_7
      SAY ~Heya. Do you believe this place? Liia gave me a room of my own. It's WAY nicer than anything in Candlekeep. The food's a lot better too. ...I really wanted to be traveling with you these past days. But, it's okay, I don't hold it against you. Liia says I've got to walk my own path for a while, and I think I agree with her. Good luck with Sarevok!~
      IF ~~ REPLY ~Thanks Imoen. I'm glad you are okay. Don't get into too much trouble here in the palace, okay?~ GOTO d5imoenkd_8
      IF ~~ REPLY ~I can't believe you aren't coming along to help.~ GOTO d5imoenkd_9
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",3) !Dead("SAREVOK")~ BEGIN d5imoenkd_8
      SAY ~Oh, don't worry, I'll get into just the right amount of trouble. I'm an expert.~
      IF ~~ EXIT
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",3) !Dead("SAREVOK")~ BEGIN d5imoenkd_9
      SAY ~Didn't you hear me, ya bufflehead? Not everything is about you!~
      IF ~~ EXIT
    END
    
    IF ~Global("D5ImoenPalace","GLOBAL",3) Dead("SAREVOK")~ BEGIN d5imoenkd_10
      SAY ~You got him! Great job! Now maybe things can get back to normal.~
      IF ~~ EXIT
    END
    
    END
    
    REPLACE_STATE_TRIGGER DENKOD 0 ~Global("D5MazeOpen","GLOBAL",99)~
    
    APPEND DENKOD
    
    IF ~Global("D5MazeOpen","GLOBAL",1) !Dead("SAREVOK")~ BEGIN d5denkod_0
      SAY ~Here now, who are you?? I warn you we have very little tolerance for trespassers at the moment!~
      IF ~~ REPLY ~Well, I have little tolerance for thieves who get in my way. Draw steel!~ DO ~Enemy()~ DO ~SetGlobal("AttackedThieves","GLOBAL",1)~ EXIT
      IF ~~ REPLY ~Don't worry, we are not here to attack you. This might sound odd but, is there are area here that you cannot access?~ GOTO d5denkod_1
    END
    
    IF ~Global("D5MazeOpen","GLOBAL",1) !Dead("SAREVOK")~ BEGIN d5denkod_1
      SAY ~Well. That is an odd question. And I have an odder answer, because I think there might be such a place.~
      IF ~~ GOTO d5denkod_2
    END
    
    IF ~Global("D5MazeOpen","GLOBAL",1) !Dead("SAREVOK")~ BEGIN d5denkod_2
      SAY ~Sometimes, especially when I have a Potion of Perception in my system, out of the corner of my eye, I have the most fleeting idea that I saw something over there. A staircase, maybe? But then I look, and of course there is nothing. Just a trick of the light, for sure.~
      IF ~~ REPLY ~What, you mean that staircase?~ GOTO d5denkod_3
    END
    
    IF ~Global("D5MazeOpen","GLOBAL",1) !Dead("SAREVOK")~ BEGIN d5denkod_3
      SAY ~What staircase.~
      IF ~~ REPLY ~That staircase right there.~ GOTO d5denkod_4
    END
    
    IF ~Global("D5MazeOpen","GLOBAL",1) !Dead("SAREVOK")~ BEGIN d5denkod_4
      SAY ~Friend, I have no idea what you are talking... wait. Are you telling me you see a staircase there?~
      IF ~~ REPLY ~Yes, right there, a staircase going down into the basement. It must be the one you just mentioned.~ GOTO d5denkod_5
    END
    
    IF ~Global("D5MazeOpen","GLOBAL",1) !Dead("SAREVOK")~ BEGIN d5denkod_5
      SAY ~Well this is getting odder and odder, friend, because this building has no basement. There is naught beneath our feet but earth. The sewers don't even reach this corner of the city.~
      IF ~~ REPLY ~I plainly see stairs going down. And if it is all the same to you, I am going to go down there.~ GOTO d5denkod_6
    END
    
    IF ~Global("D5MazeOpen","GLOBAL",1) !Dead("SAREVOK")~ BEGIN d5denkod_6
      SAY ~Go down... you know what, you are acting very weird, and I just don't have time for it right now. If you don't start making sense then I am going to insist you leave.~
      IF ~~ DO ~AddJournalEntry(~The Hunt for Sarevok
    I have discovered a staircase inside the Thieves' Guild which leads underground. The Past it is an old maze. From the corridors I can hear the sounds of shuffling bones and shifting slimes. I should be on guard - wherever this path leads, it is clearly not meant to be easy to reach.~,QUEST)~ EXIT
    END
    
    IF ~Global("D5MazeOpen","GLOBAL",2)~ BEGIN d5denkod_7
      SAY ~By Helm's bollocks! Where were you off to just then?? I saw you here with me, and then you were nowhere at all. But no trace of teleporting or dimension-dooring! And you weren't invisible neither - I felt all around for you! Felt reeeal hard. Mask perserve us, that's a neat trick! I don't... eh... don't suppose you can teach it to me, could you?~
      IF ~~ EXIT
    END
    
    END
    >>>>>>>> 
    COPY ~d5/palace+.d~ ~weidu_external/%MOD_FOLDER%/compile/palace+.d~
    COMPILE ~weidu_external/%MOD_FOLDER%/compile/palace+.d~

    That all goes into a single .D file, because various lines from one person EXTERN out to added lines for another person, and the variables that represent the new line numbers need to be resolved at the same time, in a single COMPILE command.

    Next I will modify the area script for the Thieves' Guild. I understand the issues mentioned about Angelo having come down hard on the thieves, but I don't want the Guild to be completely empty, so I will edit the script so that only named thieves get removed in chapter 7. Now, a handful of nameless "Rogue" thieves will still be present in the guild, and Denkod will appear and speak to Charname when you enter. And the stairs down to the maze will be enabled by my new global variables instead of the original ones.

    Spoiler
    ACTION_IF (FILE_EXISTS_IN_GAME ~%bg1_area_prefix%0153.bcs~) BEGIN
      COPY_EXISTING ~%bg1_area_prefix%0153.bcs~ ~override~
    	DECOMPILE_AND_PATCH BEGIN
    		SPRINT textToReplace ~\(Global("DukeThanks","GLOBAL",1)\)~
    		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
    		PATCH_IF (num_matches > 0) BEGIN
    			REPLACE_TEXTUALLY ~%textToReplace%~ ~Global("D5MazeOpen","GLOBAL",1)~
    			PATCH_PRINT ~Patching: %num_matches% matches found in %SOURCE_FILESPEC% for REPLACE_TEXTUALLY: %textToReplace%~
    		END ELSE BEGIN
    			PATCH_WARN ~WARNING: could not find %textToReplace% in %SOURCE_FILESPEC%~
    		END
    		SPRINT textToReplace ~\(Global("DukeThanks","GLOBAL",0)\)~
    		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
    		PATCH_IF (num_matches > 0) BEGIN
    			REPLACE_TEXTUALLY ~%textToReplace%~ ~Global("D5MazeOpen","GLOBAL",0)~
    			PATCH_PRINT ~Patching: %num_matches% matches found in %SOURCE_FILESPEC% for REPLACE_TEXTUALLY: %textToReplace%~
    		END ELSE BEGIN
    			PATCH_WARN ~WARNING: could not find %textToReplace% in %SOURCE_FILESPEC%~
    		END
    		SPRINT textToReplace ~\(!Exists("DENKOD")\)~
    		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
    		PATCH_IF (num_matches > 0) BEGIN
    			REPLACE_TEXTUALLY ~%textToReplace%~ ~!InMyArea("DENKOD")~
    			PATCH_PRINT ~Patching: %num_matches% matches found in %SOURCE_FILESPEC% for REPLACE_TEXTUALLY: %textToReplace%~
    		END ELSE BEGIN
    			PATCH_WARN ~WARNING: could not find %textToReplace% in %SOURCE_FILESPEC%~
    		END
    		SPRINT textToReplace ~\(!Dead("DENKOD")\)~
    		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
    		PATCH_IF (num_matches > 0) BEGIN
    			REPLACE_TEXTUALLY ~%textToReplace%~ ~~
    			PATCH_PRINT ~Patching: %num_matches% matches found in %SOURCE_FILESPEC% for REPLACE_TEXTUALLY: %textToReplace%~
    		END ELSE BEGIN
    			PATCH_WARN ~WARNING: could not find %textToReplace% in %SOURCE_FILESPEC%~
    		END
    		SPRINT textToReplace ~\(ApplySpellRES("ohdest","Rogue_\).+$~
    		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
    		PATCH_IF (num_matches > 0) BEGIN
    			REPLACE_TEXTUALLY ~%textToReplace%~ ~~
    			PATCH_PRINT ~Patching: %num_matches% matches found in %SOURCE_FILESPEC% for REPLACE_TEXTUALLY: %textToReplace%~
    		END ELSE BEGIN
    			PATCH_WARN ~WARNING: could not find %textToReplace% in %SOURCE_FILESPEC%~
    		END
    	END
      BUT_ONLY
    END
    
    <<<<<<<< d5/area0153.baf
    IF
    	Allegiance("DENKOD",[EVILCUTOFF])
    THEN
    	RESPONSE #100
    		SetGlobal("AttackedThieves","GLOBAL",1)
    END
    >>>>>>>>
    COPY ~d5/area0153.baf~ ~weidu_external/%MOD_FOLDER%/compile/%bg1_area_prefix%0153.baf~
    
    ACTION_IF (FILE_EXISTS_IN_GAME ~%bg1_area_prefix%0153.bcs~) BEGIN
      EXTEND_TOP ~%bg1_area_prefix%0153.bcs~ ~weidu_external/%MOD_FOLDER%/compile/%bg1_area_prefix%0153.baf~
    END
    
    ACTION_IF !(FILE_EXISTS_IN_GAME ~%bg1_area_prefix%0153.bcs~) BEGIN
      COMPILE ~weidu_external/%MOD_FOLDER%/compile/%bg1_area_prefix%0153.baf~
    END

    Finally, for now at least, I will remove Voleta Stiletto from the entrance to the maze. The original dialogue - that Sarevok passed by moments earlier and ran her through - make no sense anymore. I will think it over... maybe it would be best to leave her there, injured at the entrance to the maze, but change her dialogue to talk about being injured by the undead in the maze. It only wouldn't make much sense because the maze should not be accessible to anyone without the Dukes' rune. Need to think about it a bit.

    Spoiler
    COPY_EXISTING ~voleta.cre~ ~override~
    	WRITE_ASCII 0x280 ~VOLETA~ #20
    IF_EXISTS BUT_ONLY
    
    <<<<<<<< d5/area0146.baf
    IF
    	GlobalGT("D5MazeOpen","GLOBAL",0)
    	Global("D5VoletaGone","GLOBAL",0)
    THEN
    	RESPONSE #100
    		ActionOverride("VOLETA",DestroySelf())		
    		SetGlobal("D5VoletaGone","GLOBAL",1)
    END
    
    IF
    	GlobalGT("D5MazeOpen","GLOBAL",1)
    THEN
    	RESPONSE #100
    		SetGlobal("D5MazeOpen","GLOBAL",2)
    END
    >>>>>>>>
    COPY ~d5/area0146.baf~ ~weidu_external/%MOD_FOLDER%/compile/%bg1_area_prefix%0146.baf~
    
    ACTION_IF (FILE_EXISTS_IN_GAME ~%bg1_area_prefix%0146.bcs~) BEGIN
      EXTEND_TOP ~%bg1_area_prefix%0146.bcs~ ~weidu_external/%MOD_FOLDER%/compile/%bg1_area_prefix%0146.baf~
    END
    
    ACTION_IF !(FILE_EXISTS_IN_GAME ~%bg1_area_prefix%0146.bcs~) BEGIN
      COMPILE ~weidu_external/%MOD_FOLDER%/compile/%bg1_area_prefix%0146.baf~
    END

    And, that's it for Part 5! Basically, as I said, just a lot of exposition and moving pieces into place for the endgame. Imoen is in the palace, and we are on the way to confronting Sarevok. In fact this right here could be a fully-functioning mod. We have stretched out the end of BG1 and added some content and improved the narrative. Just point the start of SoD to the palace assassination scene instead of Korlasz’ dungeon, and job done! 

    But, Entar has claimed that someone looking just like Charname brutally murdered him. :hm:  We want to come back and address this mystery after dealing with Sarevok.

    So, we will do a bit more:

    • Make sure the game doesn't end when Sarevok dies
    • Write some closeout dialogues with the dukes, and arrange for the new transition to SoD
    • Set up the cut scene for the optional transition directly to SoA, and connect it to the SoD abduction scene
    • Possibly, modify the very end of SoD itself
    • Work on compatibility with EndlessBG1
  13. On 4/5/2024 at 10:03 AM, Trouveur80 said:

    I'm almost in chapter 7 in my current unmodded run. I will do some captures from the banters about the thieves guild. 

    Cool, that would be helpful. I see in the area script that most of the occupants of the guild are set to disappear in chapter 7. But neither Black Lily nor Denkod has anything to say about it, and in my recent playthrough I did not meet anyone who gave more information about it. It is a nice enough plot point, but if the game does not actually present it to players, then what is the use of it?

    I don't really like the idea that the guild has been completely eliminated. (And after all Denkod, Black Lily, and Voleta Stiletto are still there.) So I might reintroduce some nameless thieves to the area, just to have bodies there. I am going to write out a small conversation with Denkod, and if the player gets needlessly murderous and attacks him, I want others around to help him.

    I've got the post-Korlasz palace dialogue all written up and tested. (...Pending any necessary adjustments for addressing the current stat of the Thieves' Guild. Which, if it really comes to that, could also be addressed by simply moving the maze entrance as discussed earlier.)

    Meantime, it occurs to me that this is probably the appropriate time to re-introduce Imoen, if she is not already in the party. It is going to be complicated - need to go back to earlier chapters and add global variable to mark the last time she was in the party, and add appropriate dialogue now. And a further complication: what if Imoen was never in the party, and shows up at the palace now, and Liia says she wants to keep Imoen in protective custody until the threat of Sarevok has passed... should the player be able to recruit Imoen, ust for the last fight? Or should we say, if she is not in your party going at this point, then it is too late.

    I'll tinker with it. But it means this step will take a while longer.

  14. 4 hours ago, grodrigues said:

    Already pushed a PR for the saving throw tables, so that is covered. Will wait on you about the sleep patch.

    I just checked, and it is fine. Just a brain fart on my part. You can go ahead and make a release.

  15. 2 hours ago, Trouveur80 said:

    Alatos is dead, most thieves are either imprisoned, killed, or have flee the city because of Flaming Fist brutality under Angelo's rule.

    Is that actually shown or described? (Runs off to savegame) Okay so Alatos is not there but several rogues are in the guild and Black Lily is there with the guild’s most powerful and valuable gear. Nobody has anything to say about Alatos.

    I got arrested and Angelo has nothing to say about it. 

    Is this another thing Bioware did half-assedly (presumably they were under time pressure at the end) and the story of what happened was filled in by out-of-game sources? 

    I don’t love it. Why would one new commander - and a particularly corrupt one at that - be an existential threat to a thieves’ guild? Wouldn’t every new commander be incentivized to eliminate them? Why is Black Lily still there? Wouldn’t she just step up and become the new head of the guild?

    Honestly, sounds like another thing in the late game that needs fixing. 

    EDIT - might be as simple as changing a line from

    Quote

    Rumor has it one such passage is in the thieves’ guild. Of course, our troops are not welcome there. But an independent agent like you could go investigate.

    …to something like:

    Quote

    …in the thieves’ guild. We dare not send troops in force - Angelo was quite cruel in dealing with the guild, and it has created a volatile situation. I fear reprisals if we were to send Flaming Fist soldiers into the heart of their domain. Especially given the rumors from the north, it is important to promote unity and normalcy, not ridk further strife. Better that an independent agent investigate the rumored passage… we will decide how to deploy the Flaming Fist once you report back.

    Or something like that. 

  16. Hold off for like a day on rc5 - I need to make sure I didn’t screw up the Sleep patch. (Might have forgotten about the pre-EE engine and left an EE-only opcode in it.) I’ll double-check that, and make a PR with an extra component for the saving throw tables.

  17. Writing up dialogue for step 5. God, this is going to be so much easier than step 4.

    And I think there is a very simple solution  to the problem of the dukes teleporting you into the thieves’ guild, even if we don’t move the entrance of the maze, and also why Charname would be sent alone to confront Sarevok, instead of with an army at his back. Basically, just fix it with some expository dialogue. 

    Liia will tell you that all entrances to the Undercity were sealed long ago, and being useless, were forgotten. There is a rumor that one such sealed entrance was in the thieves guild. Of course, the civic leaders and city guard are not welcome there, so why doesn’t Charname go investigate that rumor. Not fight Sarevok, not end the game, just investigate the rumor. And in case it is true, here is a magical rune to unseal the passage. 

    This makes a ton of sense. The Flaming Fist consists of fighters, but they are largely low-level soldiers. (And I’ll probably add a line about the most experienced members gearing up to leave the city and confront the Crusade.) Thieves’ Guild members, by contrast, are probably higher-level thieves. They are probably more than a match for low-level fighters one-on-one… then add in the fact that the fight would be on their home turf, they have traps, they have poison, they have magic… it would be a bloodbath. 

    So even if the dukes know where the guild is, they cannot send their own troops. Instead they will ask Charname, as an independent agent, to investigate the possibility, and try to scout Sarevok’s location, and then report back without confronting Sarevok, do the Dukes can send in the cavalry. That is a much more sensible plan for the leaders of a major Sword Coast city, than blindly teleporting Charname into the thieves’ guild! 

    Of course that plan will be frustrated. Just need a “the door locks behind you, you cannot leave” moment when you find Sarevok, to force the fight. 

    So the actual end of the game can be the same as it always was, but become much more sensible and believable.

  18. If it is any consolation, my own mod adding save bonuses for ability scores operates by applying a 6-second bonus every round, and the spell is preceded by an op321 effect to make sure there is no stacking. Nevertheless, I have seen instances of the bonuses being doubled. Which should not be possible.

    Unfortunately I did not chase down the bug, and could not reproduce it reliably - I don't think it is happening anymore in my game. I can maybe check later today. But there is at least some anecdotal supporting evidence that this impossible thing can in fact happen.

    I have a theory that the bonus might be mechanically correct, but the EE Record screen is actually picking it up and simply displaying the wrong values. That needs testing though, it may not be the case. EDIT - ah, I see that the OP has actually checked the bonuses in EEKeeper, so it is not just a display bug.

  19. 15 hours ago, Guest imbadatgameok said:

    This is essentially an undocumented nerf for the player. If not going to be made an optional component, it should at least be added to the readme, I think.

    Fair points. Unfortunately, the mod author left with most of the work on v4 done, but without creating a readme for it. So this is not a case where someone is evilly twirling their mustache, slipping undocumented changes into unsuspecting players' games, but rather just an instance of real life getting in the way.

    Thank you for calling attention to this. As far as what we can do about it, being mere caretakers and not the author, I am not sure. I don't think I see a problem breaking the revised save tables out into a separate component.

    Will wait to see if anyone else chimes in with an opinion.

×
×
  • Create New...