Jump to content

Request for Area Check on one of Coran's Dialogues


Ana Christina

Recommended Posts

Hi.

 

I'm sorry, I know you guys are ready to release v16 soon, but I've just come across this issue. The following dialogue (warning, spoilers!) can happen on the Werewolf Island (Tutu's FW1500-1505 & FW 2000-2012, as per this topic):

 

IF WEIGHT #-3 ~%BGT_VAR% Global("P#CGBabyTalk","GLOBAL",6)~ THEN BEGIN CGBabyTalk3

SAY @1432

++ @1433 DO ~SetGlobal("P#CGBabyTalk","GLOBAL",7)~ + COBAB3.1

++ @1434 DO ~SetGlobal("P#CGBabyTalk","GLOBAL",7)~ + COBAB3.2

+ ~!Global("P#CoranVow","GLOBAL",1)~ + @1435 DO ~SetGlobal("P#CGBabyTalk","GLOBAL",7)~ + COBAB3.4A

+ ~Global("P#CoranVow","GLOBAL",1)~ + @1435 DO ~SetGlobal("P#CGBabyTalk","GLOBAL",7)~ + COBAB3.4B

+ ~Global("P#CoranVow","GLOBAL",1)~ + @1436 DO ~SetGlobal("P#CGBabyTalk","GLOBAL",7)~ + COBAB3.5A

+ ~!Global("P#CoranVow","GLOBAL",1) RandomNum(2,1)~ + @1436 DO ~SetGlobal("P#CGBabyTalk","GLOBAL",7)~ + COBAB3.5A

+ ~!Global("P#CoranVow","GLOBAL",1) RandomNum(2,2)~ + @1436 DO ~SetGlobal("P#CGBabyTalk","GLOBAL",7)~ + COBAB3.5B

END

 

Etc. I won't paste it all for brevity reasons. The point is that if his timer expires while on Balduran's Island, he leaves the party to return the baby.

 

Not only does it not make sense that, unlike the rest of the party, Coran can very well leave the Isle when he wishes (in spite of the lack of a ship), but it is also extremely difficult to follow him (for the same reasons as above) legitimately (i.e., without cheats). When that happened to me, the only alternatives I had were 1) reload, leave the game paused while in an acceptable area, and wait for the dialogue to happen or 2) do both Balduran's Isle areas without my thief.

 

So, could you please include an Area Check for this particular dialogue?

Link to comment
Guest jastey*

We could invest 2 min more and make an OR() check for the reachable areas instead, to prevent this to trigger in mod-areas. Maybe something for v17. :crazyeyes:

Link to comment

Ok, who came up with the silly idea to make this an OR()?

Anyway, here it is:

 

OR(50)
AreaCheck("%NWBaldursGate%")
AreaCheck("%WBaldursGate%")
AreaCheck("%SWBaldursGate%")
AreaCheck("%NBaldursGate%")
AreaCheck("%CentralBaldursGate%")
AreaCheck("%BaldursGateDocks%")
AreaCheck("%NEBaldursGate%")
AreaCheck("%EBaldursGate%")
AreaCheck("%SEBaldursGate%")
AreaCheck("%Farmlands%")
AreaCheck("%UlgothsBeard%")
AreaCheck("%WyrmsCrossing%")
AreaCheck("%FishingVillage%")
AreaCheck("%BanditCamp%")
AreaCheck("%CloakwoodWyverns%")
AreaCheck("%CloakwoodMines%")
AreaCheck("%CloakwoodDruids%")
AreaCheck("%FriendlyArmInn%")
AreaCheck("%Peldvale%")
AreaCheck("%CloakwoodNest%")
AreaCheck("%CloakwoodLodge%")
AreaCheck("%Larswood%")
AreaCheck("%SpiderWood%")
AreaCheck("%LionsWay%")
AreaCheck("%CoastWay%")
AreaCheck("%ShipwrecksCoast%")
AreaCheck("%HighHedge%")
AreaCheck("%Beregost%")
AreaCheck("%Temple%")
AreaCheck("%MutaminsGarden%")
AreaCheck("%Lighthouse%")
AreaCheck("%RedCanyons%")
AreaCheck("%SouthBeregostRoad%")
AreaCheck("%Ulcaster%")
AreaCheck("%Gullykin%")
AreaCheck("%ArchaeologicalSite%")
AreaCheck("%FishermansLake%")
AreaCheck("%NorthNashkelRoad%")
AreaCheck("%LonelyPeaks%")
AreaCheck("%FirewineBridge%")
AreaCheck("%XvartVillage%")
AreaCheck("%Nashkel%")
AreaCheck("%NashkelCarnival%")
AreaCheck("%ValleyoftheTombs%")
AreaCheck("%BearRiver%")
AreaCheck("%GnollStronghold%")
AreaCheck("%DryadFalls%")
AreaCheck("%FireLeafForest%")
AreaCheck("%NashkelMines%")
AreaCheck("%GibberlingMountains%")

Link to comment

Got it... hold one moment...

 

ok. new code.

 

IF %BGT_VAR%
RealGlobalTimerExpired("P#CGBabyTalkTime","GLOBAL")
InParty(Myself)
!InParty("safana")
!AreaType(DUNGEON)
CombatCounter(0)
!See([ENEMY])
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
See(Player1)
ReputationGT(Player1,10)
Global("P#CoranRomancePath","GLOBAL",6)
!Global("P#CoranRomanceInactive","GLOBAL",1)
GlobalGT("P#CGLoveTalk","GLOBAL",32)
OR(3)
Global("P#CGBabyTalk","GLOBAL",1)
Global("P#CGBabyTalk","GLOBAL",3)
Global("P#CGBabyTalk","GLOBAL",5)
OR(50)
AreaCheck("%NWBaldursGate%")
AreaCheck("%WBaldursGate%")
AreaCheck("%SWBaldursGate%")
AreaCheck("%NBaldursGate%")
AreaCheck("%CentralBaldursGate%")
AreaCheck("%BaldursGateDocks%")
AreaCheck("%NEBaldursGate%")
AreaCheck("%EBaldursGate%")
AreaCheck("%SEBaldursGate%")
AreaCheck("%Farmlands%")
AreaCheck("%UlgothsBeard%")
AreaCheck("%WyrmsCrossing%")
AreaCheck("%FishingVillage%")
AreaCheck("%BanditCamp%")
AreaCheck("%CloakwoodWyverns%")
AreaCheck("%CloakwoodMines%")
AreaCheck("%CloakwoodDruids%")
AreaCheck("%FriendlyArmInn%")
AreaCheck("%Peldvale%")
AreaCheck("%CloakwoodNest%")
AreaCheck("%CloakwoodLodge%")
AreaCheck("%Larswood%")
AreaCheck("%SpiderWood%")
AreaCheck("%LionsWay%")
AreaCheck("%CoastWay%")
AreaCheck("%ShipwrecksCoast%")
AreaCheck("%HighHedge%")
AreaCheck("%Beregost%")
AreaCheck("%Temple%")
AreaCheck("%MutaminsGarden%")
AreaCheck("%Lighthouse%")
AreaCheck("%RedCanyons%")
AreaCheck("%SouthBeregostRoad%")
AreaCheck("%Ulcaster%")
AreaCheck("%Gullykin%")
AreaCheck("%ArchaeologicalSite%")
AreaCheck("%FishermansLake%")
AreaCheck("%NorthNashkelRoad%")
AreaCheck("%LonelyPeaks%")
AreaCheck("%FirewineBridge%")
AreaCheck("%XvartVillage%")
AreaCheck("%Nashkel%")
AreaCheck("%NashkelCarnival%")
AreaCheck("%ValleyoftheTombs%")
AreaCheck("%BearRiver%")
AreaCheck("%GnollStronghold%")
AreaCheck("%DryadFalls%")
AreaCheck("%FireLeafForest%")
AreaCheck("%NashkelMines%")
AreaCheck("%GibberlingMountains%")
THEN
RESPONSE #100
IncrementGlobal("P#CGBabyTalk","GLOBAL",1)
END

IF %BGT_VAR%
RealGlobalTimerExpired("P#CGBabyTalkTime","GLOBAL")
InParty(Myself)
!InParty("safana")
!AreaType(DUNGEON)
CombatCounter(0)
!See([ENEMY])
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
See(Player1)
ReputationGT(Player1,10)
Global("P#CoranRomancePath","GLOBAL",6)
!Global("P#CoranRomanceInactive","GLOBAL",1)
GlobalGT("P#CGLoveTalk","GLOBAL",32)
OR(3)
Global("P#CGBabyTalk","GLOBAL",1)
Global("P#CGBabyTalk","GLOBAL",3)
Global("P#CGBabyTalk","GLOBAL",5)
THEN
RESPONSE #100
SetRealGlobalTimer("P#CGBabyTalkTime","GLOBAL",FIVE_MINUTES)
END 

IF %BGT_VAR%
RealGlobalTimerExpired("P#CGBabyTalkTime","GLOBAL")
InParty(Myself)
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
OR(3)
Global("P#CGBabyTalk","GLOBAL",2)
Global("P#CGBabyTalk","GLOBAL",4)
Global("P#CGBabyTalk","GLOBAL",6)
THEN
RESPONSE #100
PlaySong(0)
PlaySound("coranb")
StartDialogueNoSet(Player1)
END

 

There are OR(84)s in the Wait At An Inn portion, but that is run via .dlg. Do we have someone who can edit this in using NI and test that it still evaluates and fires, or show a .bcs codeblock with a similar setup? I assume it is fine, because DavidW's script calls run into a zillion cionditions and they work well.

Link to comment

The block will take a while to evaluate, but as long as you are closing the variable right before the END, you'll be fine, I think. It's only going to run once.

 

It isn't like you're running this in baldur.bcs.

Link to comment

It's silly.

 

Find the variable which sets when PC is left on the island, and find the variable that sets when they leave the island, and base the check on this.

 

OR(50) will kill Pentium II's(and III's, I'll wager).

Link to comment
Guest jastey*

There are also the ice island, and probable mod areas that might not be reachable. I'd prefer an inclusive OR() check rather than an exclusive !AreaCheck(), albeit maybe not with 50. The above list are all openly reachable BG1 original areas. If OR(50) is a problem concerning slow down, we could cut it down ot OR(10) and only take the main city and road areas.

Link to comment

Guys, we're using OR(50) blocks in the "go to the inn" component. These blocks fire just fine on the fossil of a computer I use for Tutu testing, a low-end Pentium III purchased in 2001, which is pretty close to the minimum that can be used for a Tutu conversion.

 

We could probably sit here and speculate about whether the game can even run on a Pentium II. It was last manufactured in 1999, though, so we might have some trouble finding one for testing.

 

But it's a simple matter to test it. Build an OR(50) block that has nothing to do with the issue in question, have it do a DSH on completion, something like "block fired."

 

IF

Global("BlockFired","GLOBAL",0)

OR(50)

Global("test","GLOBAL",1)

Global("test","GLOBAL",2)

//etc

Global("test","GLOBAL",50)

THEN

RESPONSE #100

DisplayStringHead(Myself,~BlockFired~)

SetGlobal("BlockFired","GLOBAL",1)

END

 

Extend the bottom of the script of somebody with a large bcs, then use the console to set the global "test" to 50. Time how long it takes for the DSH to appear.

Link to comment
I still have a 400Mhz one. Anyway, I suggest excluding Ice Island and Werewolf island, and leaving it at that.

 

Without comment on the overall issue (I don't know BG1NPC well enough), I don't think you really need to worry about script running times for a single run-through of an OR(50). The Beholder script for SCSII, for instance, looks through about 18000 lines of code per second, including ten OR(14) loops - that's hugely more demanding than what you're looking at here, and yet it seems to run fine on old computers.

 

On the other hand, is this bit of code sitting in Coran's script? If so, it won't fire once; it'll fire once per script round (i.e., 30 times per second) when you're on the Island or in other areas not on the OR(50) list. I suspect that even that won't cause any problems (script evaluation just isn't very processor-intensive) but you should probably avoid it even so. Just shove

 

IF %BGT_VAR%
RealGlobalTimerExpired("P#CGBabyTalkTime","GLOBAL")
InParty(Myself)
!InParty("safana")
!AreaType(DUNGEON)
CombatCounter(0)
!See([ENEMY])
!StateCheck(Player1,CD_STATE_NOTVALID)
!StateCheck(Myself,CD_STATE_NOTVALID)
See(Player1)
ReputationGT(Player1,10)
Global("P#CoranRomancePath","GLOBAL",6)
!Global("P#CoranRomanceInactive","GLOBAL",1)
GlobalGT("P#CGLoveTalk","GLOBAL",32)
OR(3)
Global("P#CGBabyTalk","GLOBAL",1)
Global("P#CGBabyTalk","GLOBAL",3)
Global("P#CGBabyTalk","GLOBAL",5)
THEN
RESPONSE #100
SetRealGlobalTimer("P#CGBabyTalkTime","GLOBAL",FIVE_MINUTES)
END

 

between the two blocks of code you've got. That will also stop Coran dashing off the second you land.

 

EDIT after a quick test: admittedly the computer I'm on now is reasonably fast, but it's coping fine with twenty creatures all running an OR(253) block.

Link to comment

Archived

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

×
×
  • Create New...