Jump to content

Crash entering Hall of Wonders


WizWom

Recommended Posts

Entering Hall of Wonders at night, for the telescope quest, you get a crash.

 

I tracked it down to the "move Alora to Gullykin" component

 

The trouble is, with Alora not in the hall, the Script blocks that deactivate her trigger, because she exists (being a global object) but cannot affect her (since she isn't around)

 

Adding the trigger

InMyArea("Alora")

 

should fix that.

 

I don't know, but what would happen if the party sent Alora to do this quest? I think I should test that... nothing at night or during the day. I guess Deactivate() doesn't work on an NPC that's in party. Good.

Link to comment

I'm sorry, WizWom, I am not sure I understand (but am willing to fix right away...)

 

I have the following for the area script manipulations we do:

 

	/* Trying to prevent Alora from Stuttering. */
COPY_EXISTING ~%tutu_var%ALORA.bcs~ ~override~
  DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY
	~TimeOfDay(DAY)~ ~AreaCheck("%WBaldursGate_HallofWonders%") NumberOfTimesTalkedTo(0) TimeOfDay(DAY) !InParty(Myself)~
  COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

 

 

/* Alora Starts in Gullykin */
BEGIN @1070  /* Alora Starts in Gullykin. */
 SUBCOMPONENT @1068  /* The BG1 NPC Project: Alora's Starting Location. */
 GROUP @1065 /* The BG1 NPC Project: Tweaks */
 REQUIRE_FILE ~override/X#BG1NPCCore.G3~ @1004 /* BG1 NPC Required Changes component is not installed. */
COPY ~BG1NPC/Core/X#component.xx~ ~override/X#AloraMove.G3~

 /* makes sure PIDs go last */
 UNINSTALL ~bg1npc.tp2~ 200

 COMPILE EVALUATE_BUFFER ~BG1NPC/Phase3/MOVELOC/DLG/x#aloramoves.d~
USING ~BG1NPC/TRA/%LANGUAGE%/X#ALORAN.TRA~

ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN
/* Trying to prevent Alora's CTD */
 COPY_EXISTING ~_AR0130.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY
  ~!InParty("alora")~
  ~!InParty("alora") Global("X#AloraDontBeDificult","GLOBAL",1)~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

 /* patching Alora's location */
 COPY_EXISTING ~baldur.gam~ ~override~
READ_LONG 0x30 non_joined_npcs_off
READ_LONG 0x34 non_joined_npcs_count
FOR (i = 0; i < non_joined_npcs_count; i+=1) BEGIN
  SET cre_offset = non_joined_npcs_off + i * 0x160
  READ_ASCII 0xc + cre_offset ~CREName~
  PATCH_IF !(~%CREName%~ STRING_COMPARE_CASE ~_ALORA~) BEGIN
	WRITE_ASCII cre_offset + 0x18 ~FW4000~ #8
	WRITE_SHORT cre_offset + 0x20 553
	WRITE_SHORT cre_offset + 0x22 506
  END
END
BUT_ONLY_IF_IT_CHANGES
PRINT @1071  /* Remember to start a new game for Alora to start in Gullykin near the door to the winery. */
 END ELSE BEGIN
 /* Patching Alora's location BGT */
 COPY_EXISTING ~AR7230.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY ~Global("BGTNPC7230","GLOBAL",0)~ ~False()~
  REPLACE_TEXTUALLY ~Exists("Alora")~ ~False()~
COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES
 EXTEND_BOTTOM ~AR9900.bcs~ ~BG1NPC/Phase3/MOVELOC/BAF/X#ALORASPA.baf~
EVALUATE_BUFFER
 PRINT @1071  /* Remember to start a new game for Alora to start in Gullykin near the door to the winery. */
 END

 

I think I can clean up some of this, and tighten it up - do you have suggestions on the best way to implement that InMyArea check?

Link to comment

OK, you've already got a fix for the reported CTD with Alora in the party and going to get the telescope.

 

So, in that same block for _AR0130, do

REPLACE_TEXTUALLY ~Exists("Alora")~ ~Exists("Alora")

InMyArea("Alora")~

 

Er, give me a sec to check that BGT also needs the fix... well, if you're going and making the Exists() blocks garbage, then it wouldn't, but I don't know the content of X#ALORASPA.baf - that might need the InMyArea() if it's still got enable/disable blocks.

Link to comment

OK, fixes so far:

 

On both platforms, .tp2 changes

	/* Trying to prevent Alora from Stuttering. */
COPY_EXISTING ~%tutu_var%ALORA.bcs~ ~override~
  DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY
	~TimeOfDay(DAY)~ ~AreaCheck("%WBaldursGate_HallofWonders%") NumberOfTimesTalkedTo(0) TimeOfDay(DAY) !InParty(Myself)~
  COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

  /* WizWom's Prevent Alora Area Script from Crashing. */
COPY_EXISTING ~%HallofWonders_BCS%.bcs~ ~override~
  DECOMPILE_BCS_TO_BAF
	REPLACE_TEXTUALLY ~Exists("Alora")~ ~Exists("Alora") InMyArea("Alora")~
  COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

 

 

BGT creates and adds the NPCs by script, so Pro5's extension to the area script is pretty straightforward - we false out the relevant lines in the old area script (both the Exists and the actual variable), and rebuild them in the new area by appending x#aloraspa.baf

IF %BGT_VAR%
 Global("BGTNPC7230","GLOBAL",0)
 LevelLT(Player1,6)
THEN
 RESPONSE #100
SetGlobal("BGTNPC7230","GLOBAL",1)
CreateCreature("ALORA",[553.506],5)
END

IF %BGT_VAR%
 Global("BGTNPC7230","GLOBAL",0)
 LevelGT(Player1,5)
THEN
 RESPONSE #100
SetGlobal("BGTNPC7230","GLOBAL",1)
CreateCreature("ALORA6",[553.506],5)
END
Link to comment

well, i've reached the hall of wonders, and found alora.

 

I'm with SCS installed, in particular, the NPC management component, which allow mw send the NPCs to inns.

 

Well, If I ask alora to join the party (inside the hall), but remove her and send her to any inn, the game crashes about 10 seconds later.

 

If I ask her to join, leave the hall, it's ok. But if i remove her and enter the hall again, after sometime the game crashes.

 

I think it's a problem similar to the one post in this thread, so, is this related to BG1NPC, to SCS, or anything else?

 

what can i make to fix it?

Link to comment
I think it's a problem similar to the one post in this thread, so, is this related to BG1NPC, to SCS, or anything else?

 

what can i make to fix it?

I don't know if it's any particular mod, but a combination of things going back to a bug in the vanilla game. I think her scripting needs to be completely redone. Folks are discussing it in the Fixroom and hopefully between plainab, cmorgan, WizWom and the other gurus, it'll get sorted soon.
Link to comment

yeah, the fix to assure Alora is InMyArea() should fix Darth Slaughter's crash. I don't have SCS installed, but I suspect they did not account for Alora being active and not in the area, which is the reason for the crash.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...