Author Topic: Error in scripts. New books in Durlag's Tower not appearing  (Read 1168 times)

ZFR77

  • Guest
Just spotted this in my game. I'm using an older version, but I downloaded 13.1 and it seems the same error is there too.

This code is supposed to add two books to the second dungeon of Durlag's tower. They don't appear however. I think the reason is that "Container 18" and "Container 26" have spaces?

Code: [Select]
///////////////////////////////////////////////////
// Additional Durlag's Tower Book ("Seek No Heirs")
<<<<<<<< .../bg1ub/bk_0102.baf
IF
  Global("BG1UBBOOK80","%DurlagsTower_D2%",0)
THEN
  RESPONSE #100
      ActionOverride("Container 26",CreateItem("%tutu_var%BOOK80",0,0,0))
      SetGlobal("BG1UBBOOK80","%DurlagsTower_D2%",1)
END
>>>>>>>>

OUTER_SPRINT temp_tutu "_AR0512" OUTER_SPRINT temp_bgt "ARD012" OUTER_SPRINT temp_bg "AR0512" LAUNCH_ACTION_MACRO "getcpmvara"
EXTEND_BOTTOM ~%temp_cpmvar%.bcs~ ~.../bg1ub/bk_0102.baf~
  EVALUATE_BUFFER

//////////////////////////////////////////////////
// Additional Durlag's Tower Book ("Know My Loss")
<<<<<<<< .../bg1ub/bk_0103.baf
IF
  Global("BG1UBBOOK85","%DurlagsTower_D2%",0)
THEN
  RESPONSE #100
      ActionOverride("Container 18",CreateItem("%tutu_var%BOOK85",0,0,0))
      SetGlobal("BG1UBBOOK85","%DurlagsTower_D2%",1)
END
>>>>>>>>


Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1135
  • Gender: Female
Re: Error in scripts. New books in Durlag's Tower not appearing
« Reply #1 on: July 03, 2014, 01:40:41 AM »
The books are there in my install (I checked for BGT), the spacing is not the problem. I'd assume you have a mod installed that might block the area script of executing the "place books into container"-action.

Or there might be the chance you expected them to be in the wrong places? The IESDP calls this level "Durlag's Tower, third subterranean level (Kiel, Islanne, door maze)" (AR0512, or ARD012 for BGT).

ZFR77

  • Guest
Re: Error in scripts. New books in Durlag's Tower not appearing
« Reply #2 on: July 03, 2014, 05:11:32 AM »
I just did some testing. I'm using the 5CD + TotSC version, and it seems that it is the spacing that's causing the problems. After removing the 2 spaces, the 2 books did appear.
Could it be that BGT doesn't care about the spacing, while BG does?

Here is my area script for reference (before removing spaces). I've highlighted the 2 instances where I removed spaces
Code: [Select]
IF
Global("DurlagLevel2","GLOBAL",1)
OpenState("DOOR15",FALSE)
THEN
RESPONSE #100
OpenDoor("DOOR15")
END

IF
Global("DOPDUR1","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("DOPDUR1","GLOBAL",2)
CloseDoor("DOOR01")
PlaySound("AMB_D04A")
END

IF
Global("DOPDUR2","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("DOPDUR2","GLOBAL",2)
CloseDoor("DOOR02")
PlaySound("AMB_D04A")
END

IF
Global("DOPDUR3","GLOBAL",1)
THEN
RESPONSE #100
OpenDoor("DOOR08")
OpenDoor("DOOR09")
PlaySound("AMB_D04A")
END

IF
Global("DOPDUR3","GLOBAL",2)
THEN
RESPONSE #100
SetGlobal("DOPDUR3","GLOBAL",3)
SetGlobal("KielDoor1","GLOBAL",0)
CloseDoor("DOOR03")
PlaySound("AMB_D04A")
END

IF
Global("Firedrake1","GLOBAL",0)
THEN
RESPONSE #100
TriggerActivation("Firedrake1A",FALSE)
Continue()
END

IF
Global("Firedrake2","GLOBAL",0)
THEN
RESPONSE #100
TriggerActivation("Firedrake2A",FALSE)
Continue()
END

IF
Global("Firedrake3","GLOBAL",0)
THEN
RESPONSE #100
TriggerActivation("Firedrake3A",FALSE)
Continue()
END

IF
Global("Firedrake4","GLOBAL",0)
THEN
RESPONSE #100
TriggerActivation("Firedrake4A",FALSE)
Continue()
END

IF
Global("Firedrake5","GLOBAL",0)
THEN
RESPONSE #100
TriggerActivation("Firedrake5A",FALSE)
Continue()
END

IF
Global("Firedrake6","GLOBAL",0)
THEN
RESPONSE #100
TriggerActivation("Firedrake6A",FALSE)
Continue()
END

IF
Global("Firedrake7","GLOBAL",0)
THEN
RESPONSE #100
TriggerActivation("Firedrake7A",FALSE)
Continue()
END

IF
PartyHasItem("HELM14")
Global("KielHelm","GLOBAL",0)
THEN
RESPONSE #100
OpenDoor("DOOR03")
DisplayString(Myself,'The halls resonate with the sound of grinding stone. A door has opened somewhere nearby.')
CreateCreature("DOPDUR3",[1517.1020],0)
PlaySound("AMB_D04A")
SetGlobal("KielHelm","GLOBAL",1)
END

IF
Global("kieldoor1","GLOBAL",1)
Global("kieldoor2","GLOBAL",1)
OpenState("DOOR03",FALSE)
THEN
RESPONSE #100
OpenDoor("DOOR03")
DisplayString(Myself,'The halls resonate with the sound of grinding stone. A door has opened somewhere nearby.')
PlaySound("AMB_D04A")
END

IF
!Contains("MISC2F","Container21")
OpenState("DOOR18",FALSE)
THEN
RESPONSE #100
OpenDoor("DOOR18")
OpenDoor("DOOR19")
TriggerActivation("Teleport1",TRUE)
TriggerActivation("Teleport2",TRUE)
END

IF
!Contains("MISC2F","Container22")
OpenState("DOOR18",FALSE)
THEN
RESPONSE #100
OpenDoor("DOOR18")
OpenDoor("DOOR19")
TriggerActivation("Teleport1",TRUE)
TriggerActivation("Teleport2",TRUE)
END

IF
Contains("MISC2F","Container21")
Contains("MISC2F","Container22")
OpenState("DOOR18",TRUE)
THEN
RESPONSE #100
CloseDoor("DOOR18")
CloseDoor("DOOR19")
TriggerActivation("Teleport1",FALSE)
TriggerActivation("Teleport2",FALSE)
END

IF
Global("BG1UBBOOK80","AR0512",0)
THEN
RESPONSE #100
ActionOverride([glow=red,2,300]"Container 26"[/glow],CreateItem("BOOK80",0,0,0))
SetGlobal("BG1UBBOOK80","AR0512",1)
END

IF
Global("BG1UBBOOK85","AR0512",0)
THEN
RESPONSE #100
ActionOverride([glow=red,2,300]"Container 18"[/glow],CreateItem("BOOK85",0,0,0))
SetGlobal("BG1UBBOOK85","AR0512",1)
END


ZFR77

  • Guest
Re: Error in scripts. New books in Durlag's Tower not appearing
« Reply #3 on: July 03, 2014, 05:13:10 AM »
So the GLOW code doesn't work, but you can see the 2 instances in the code where spaces where removed. Just ignore the Glow tags.

Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1135
  • Gender: Female
Re: Error in scripts. New books in Durlag's Tower not appearing
« Reply #4 on: July 03, 2014, 07:05:42 AM »
Indeed! Very good catch. But since the CreateItem doesn't work properly in BG1 (the items are in front of the container on the floor), I guess it would be best to add the items by area editing in the tp2. I'll keep it in mind for the next version.

Thank you for reporting!

ZFR77

  • Guest
Re: Error in scripts. New books in Durlag's Tower not appearing
« Reply #5 on: July 03, 2014, 09:57:15 AM »
Thanks.
Yes, the books indeed appear on the floor next to the container if you remove the spaces.

All the other books on the level appear on the floor too, so it might be good to put them there instead of a container. Also, I was a bit surprised at choice of placement. The Seek no Heir maybe is better suited in his eldest son's (heir's) room?

By the way, in this are also there are 9 or so ChaseLeft and ChaseRight scripts that summon dopplers in various places. But it seems only one each are used (the Left in the Teleporter room, the Right in Bridge room). Was dopplegangers chasing you as you go around this level a feature that later go abandoned?

Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1135
  • Gender: Female
Re: Error in scripts. New books in Durlag's Tower not appearing
« Reply #6 on: July 03, 2014, 02:19:07 PM »
Chasing Doppelgangers: I don't know. It's strange there are so many scripts with different names that do the same, though.

Maybe in Durlag's Tower, the books on the floor aren't that much out of concept. But BG1UB introduces other items, too, and they should be in the containers.

I won't change the mod content-wise, so I will not change the container the Seek no Heir"" is placed in, but which would be the eldest son's room (I don't remember)?

ZFR77

  • Guest
Re: Error in scripts. New books in Durlag's Tower not appearing
« Reply #7 on: July 03, 2014, 02:36:50 PM »
Kiel's crypt is near the exit. The one with 4 guardians.

Offline jastey

  • Moderator
  • Planewalker
  • *****
  • Posts: 1135
  • Gender: Female
Re: Error in scripts. New books in Durlag's Tower not appearing
« Reply #8 on: July 05, 2014, 06:12:16 AM »
I decided to make this an easy fix and just removed the spaces in the container names. In the next version, the items will be there for BG1 but laying on the floor.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: