Jump to content

Bug: Infinite spawn-despawn-loop of Denkod with EET


Guest Gwinn

Recommended Posts

Guest Gwinn
Posted

I installed only the main component of Endless BG1 v19.

When I got teleported to the Thieves' Guild Denkod appears, talks and disappears. Again and again and again ...

Posted

That could also be a spawn/deactivate loop. Denkod gets spawned in by the area script, then deactivated, then another one spawns in ...

Unmodded, this is the only relevant scripting for Denkod:

IF
	Global("DukeThanks","GLOBAL",1)
	!Exists("DENKOD")  // Denkod
	!Dead("DENKOD")  // Denkod
	!Dead("blacklily")  // Black Lily
THEN
	RESPONSE #100
		CreateCreature("DENKOD",[881.430],S)  // Denkod
		TriggerActivation("Door0146",TRUE)
END

That's in the area script. Once the ducal palace scene is over, if Denkod is neither active nor dead, spawn him in.

So, obviously, another script has been added. And as you helpfully pointed to EndlessBG1 ... the main component runs this:

/* Thieves Guild, main area: prevent Denkod from apwning again. DestroySelf() or last dialogue will be added depending on install choice basic /flavor */
  COPY_EXISTING ~%EBaldursGate_ThievesGuild%.bcs~ ~override~
	DECOMPILE_AND_PATCH BEGIN
		SPRINT textToReplace ~!Exists("DENKOD")~
		COUNT_REGEXP_INSTANCES ~%textToReplace%~ num_matches
		PATCH_IF (num_matches > 0) BEGIN
			REPLACE_TEXTUALLY ~\(%textToReplace%\)~ ~\1 !Dead("Sarevok")~
			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

Which edits Denkod's block in the area script; it should become this:

IF
	Global("DukeThanks","GLOBAL",1)
	!Exists("DENKOD")  // Denkod
	!Dead("Sarevok")
	!Dead("DENKOD")  // Denkod
	!Dead("blacklily")  // Black Lily
THEN
	RESPONSE #100
		CreateCreature("DENKOD",[881.430],S)  // Denkod
		TriggerActivation("Door0146",TRUE)
END

That ... doesn't look capable of looping. But there's more. Another block gets added to the area script for Denkod:

IF
	!Global("C#st_DenkodTalk","MYAREA",1)
	Exists("DENKOD")  // Denkod
	InMyArea("DENKOD")
	GlobalGT("SarevokBehavior","GLOBAL",0)
THEN
	RESPONSE #100
		ActionOverride("DENKOD",DestroySelf())
END

That despawns Denkod, if a variable isn't set (which it won't be, with just the main component) and the "SarevokBehavior" variable tracking the end-of-BG1 plot sequence is positive. It will be, if you go there when you're expected to. This is the block that needs its trigger conditions fixed. As is, Denkod will spawn and despawn repeatedly as that area script runs if you go to the thieves guild exactly when the plot expects you to. (maincomponent/sarevok_cleaup.tpa, search ar_0153_add.baf)

Guest Gwinn
Posted

Thanks for your reply. So I managed to break the infinite loop with this console command:

C:SetGlobal("C#st_DenkodTalk","BG0153",1)

 

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...