Jump to content

strange bug for vanilla BG1


jastey

Recommended Posts

I encounter a strange bug with the slime quest (yes, that's my own mod :) ) when played in vanilla BG1.

 

This is how it should be: The main part of the quest happens inside a house. The first time the PC enters, there is a woman and a slime. After everything is over, there are two persons standing inside the house. One of them was created via script after destroying the slime.

 

Now comes the bug: If I walk outside and come back into the house, I find the the situation like it was for the first entering, at the beginning of the quest: The woman is moved to her first coordinates, the man is gone and the slime is back.

 

If I make a save inside the house before I go outside, the two persons remain inside as expected upon return.

 

This is weird... I don't see anything in the scripts that could be the reason. Is this some sort of strange BG1-engine bhaviour or something? Unfortunately, I can't try out Tutu or BGT at the moment because of missing installs.

Has anyone an explanation?

Link to comment
Probably has something to do with the limitations of the BG1 engine. Might be that areas that have been entered are not stored in the saved game. Can you use NI on BG1?

 

If areas were not stored in the savegame, playing the game would not make that much sense. And yes, Baldur's Gate is Near Infinity compatible.

 

Jastey: Try posting the scripts. Maybe they contain something which might explain this.

 

-Echon

Link to comment

Thank you. I will post the scripts. I don't know which one might be interesting so I'll start with some. I am talking about BG + TotSC, btw.

I have the feeling the reason might be something really embarassing...

 

This is the area script (AR3344):

IF
 Global("BW07JQ01_SlimeCreation","GLOBAL",0)
THEN
 RESPONSE #100
SetGlobal("BW07JQ01_SlimeCreation","GLOBAL",1)
CreateCreature("BW07J003",[357.250],0) //this is the slime
Continue()
END

IF
 Global("BW07JQ01_AlannaCreationInside","GLOBAL",0)
 Global("BW07JQ01_TalkedOutside","GLOBAL",1)
THEN
 RESPONSE #100
SetGlobal("BW07JQ01_AlannaCreationInside","GLOBAL",1)
CreateCreature("BW07J001",[230.266],0) //this is the woman
END

IF
 Global("BW07JQ01_Transformation","GLOBAL",1)
THEN
 RESPONSE #100
CreateCreature("BW07J002",[357.250],3) //this is the man
SetGlobal("BW07JQ01_Transformation","GLOBAL",2)
SetGlobal("BW07JQ01_Retransformation","GLOBAL",1)
END

 

This is the .baf of the woman:

//Script file for BW07J001.CRE (Alanna, slime quest)
//Alanna goes to PC and initiates dialogue

IF 
 Dead("BW07J003")
 See([PC])
 Global("BW07JQ01_Eltoltdead","GLOBAL",0)
THEN
 RESPONSE #100
SetGlobal("BW07JQ01_Eltoltdead","GLOBAL",1)
StartDialog("BW07J001",[PC])
END

IF
 Dead("BW07J002")
 See([PC])
 Global("BW07JQ01_Eltoltdead","GLOBAL",0)
THEN
 RESPONSE #100
SetGlobal("BW07JQ01_Eltoltdead","GLOBAL",1)
StartDialog("BW07J001",[PC])
END

IF
 !See([ENEMY])
 Global("BW07JQ01_TalkedOutside","GLOBAL",0)
 See([PC])
 !StateCheck([PC],STATE_INVISIBLE)
 !StateCheck([PC],STATE_IMPROVEDINVISIBILITY)
THEN
 RESPONSE #100
Dialogue([PC])
END

IF
 See("BW07J003")
 Global("BW07JQ01_Retransformation","GLOBAL",0)
 Global("BW07JQ01_TalkInside","GLOBAL",0)
 See([PC])
THEN
 RESPONSE #100
Wait(1)
SetGlobal("BW07JQ01_TalkInside","GLOBAL",1)
StartDialog("BW07J001",[PC])
END

IF
 See("BW07J002")
 Global("BW07JQ01_Retransformation","GLOBAL",1)
 Global("BW07JQ01_AlannaEnddialog","GLOBAL",0)
 See([PC])
THEN
 RESPONSE #100
SetGlobal("BW07JQ01_AlannaEnddialog","GLOBAL",1)
MoveToObject("BW07J002")
StartDialog("BW07J001",[PC])
END

 

This is the .d of the slime:

BEGIN ~BW07J003~

IF ~True()~ THEN slime_01
SAY @0
++ @1 EXIT
+ ~PartyHasItem("BW07J003")~ + @2 DO ~
ClearAllActions()
StartCutSceneMode()
TakePartyItem("BW07J003")
Wait(1)
ForceSpellPoint([357.250],RED_SWIRL)
Wait(1)
ForceSpellPoint([357.250],RED_SWIRL)
DestroySelf()
SetGlobal("BW07JQ01_Transformation","GLOBAL",1)
EndCutSceneMode()
~ EXIT
END

 

 

This is the .baf of the man:

 

//Script file for BW07J002.CRE (Eltolth, slime quest)
//if Alanna was killed by PC

IF
 Dead("BW07J001")
 See([PC])
 Global("BW07JQ01_AlannaDead","GLOBAL",0)
THEN
 RESPONSE #100
SetGlobal("BW07JQ01_AlannaDead","GLOBAL",1)
StartDialog("BW07J002",[PC])
END

Link to comment

I "solved" the problem by integrating Exists-checks for both creatures and destroying / spawning as needed after the quest is finished, btw., but I don't think it's the most elegant thing to do. Actually I would like to understand what's going on.

Link to comment

I do not see anything which should be causing this behaviour, but I have an idea for finding out whether the problem is caused by the mod or the game engine (related to how it apparently matters where you save). Solve the quest and make a savegame inside the house. Solve the quest again and make a savegame outside the house. You can use NI to open the savegames and compare them. See if the ARE is stored in both and whether the variables are identical. If not, then it looks like the game is acting strange.

 

-Echon

Link to comment

I compared two saves, both inside the house, one directly after the transformation and one after returning and finding a slime, but I can't see a difference. I never used NI to look up a save, what should I look at? I compared the variables, and the non-party cres.

Plus I can't reproduce the bug, today everything is working fine. I can't see the end dialogue of the quest anymore, no idea how often I played it now. :)

Well, now I am still like :) , but I don't think I will investigate it further. Thank you for your help! If you have any more ideas, let me know.

Link to comment

Archived

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

×
×
  • Create New...