The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Script of previous area still running
Baronius
post Jul 20 2005, 01:41 AM
Post #1


Master of energies
Group Icon

Council Member
Posts: 3325
Joined: 9-July 04
From: Magyarország




In my BG1 mod, the party is AR3300. Then as a result of a dialogue, it gets teleported via LeaveAreaLUA to BW0506. (BW0506 isn't an indoor area of AR3300, it has no travel regions at all, by the way.)
There is a battle in BW0506, and you have to kill both main villains to be able to leave the area. When this happens (their Death Variables are one), you can use a wardstone (give it to a guardian), who will teleport you back to AR2300 with LeaveAreaLUA. In AR2300, a cutscene script with a dialogue should start (which is also triggered by Dead() functions, so if you have killed both of the villains).

My problem: the script of AR3300 (Beregost) is still running in BW0506 (which is a hall), because AS SOON AS the second villain dies, the cutscene (basically a dialogue) in AR3300 is triggered, of course in a black screen. When it ends, the screen returns to BW0506. (So the wardstone isn't used; the party doesn't have to be teleported to the new area to trigger the cutscene in THAT area).

I added BW0506 to mastarea.2da, so its script is running on the top. But AR3300 is also in mastarea.2da, as an area of the original game. This may not be related with the script problem, but I thought it would help (it didn't).
What can the problem be? How can I entirely "leave" an area, so its script won't run anymore?

I could solve it (I could set a global variable when the wardstone is used, and use this as a trigger for the cutscene), but I want to sort out the original problem; I would like to know how those area scripts work, because it seems I am not familiar with them


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post
jastey
post Jul 20 2005, 05:06 AM
Post #2





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




As far as i understood, the area scripts get executed all the times? Please someone correct me if I'm wrong but JCompton mentioned somewhere that Keto is spawned in an area with assigned area script and then "teleported" to the inn where she can be met by the player, to make sure she is created after installation even if the Player has been to the inn before (this is for BGII, of course, but there it seems area scripts of areas that have one assigned originally are carried out even if the party is not there, in contrast to areas that do not have one originally leading to the problem that the player has to restart a savegame where he didn't visit that area before to see the changes after the mod installation). If this is how it works in BG1, too, that could be the reason for your problem.

Try inserting a trigger variable like you said, or an "See([PC])" if the cutscene is triggered by a creature.
Go to the top of the page
 
Quote Post
CamDawg
post Jul 20 2005, 11:11 AM
Post #3





Forum Member
Posts: 59
Joined: 22-July 04




The answer lies in mastarea.2da.

When you're in an area listed in mastarea.2da, the area script runs continuously until you enter another mastarea.2da listed area. For example, if you're in Beregost, the main Beregost area script will continue to run when you're inside a building in Beregost. Keto uses the Bridge District script to spawn in the FF since the FF doesn't have an area script in the default game.

Add BW0506 to mastarea.2da and the issue will go away. smile.gif


--------------------
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.
Go to the top of the page
 
Quote Post
Baronius
post Jul 20 2005, 06:13 PM
Post #4


Master of energies
Group Icon

Council Member
Posts: 3325
Joined: 9-July 04
From: Magyarország




QUOTE(Baronius)
I added BW0506 to mastarea.2da


...and it didn't work, as I've written in the initial post. sad.gif
I deleted all cache files, went to Beregost from another area of an earlier savegame, but it didn't help either. The script of AR3300 is still running in BW0506, because when both enemies die, the screen is moved to AR3300 (but obviously no objects can be seen, just the area in 'grey fog' /because it is explored/) and the dialogue then starts. When it ends, the screen gets back to BW0506.

In mastarea.2da, I have this row: BW0506 value

BW0506.ARE uses the TIS and WED of the original AR0129, but its script is BW0506.BCS. But I doubt that the script problem is related with the TIS and WED!


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post
Baronius
post Jul 20 2005, 07:23 PM
Post #5


Master of energies
Group Icon

Council Member
Posts: 3325
Joined: 9-July 04
From: Magyarország




Another area (BW0502), using the TIS of AR2300, is also in mastarea.2da. There, I haven't got such problems.

I checked the row of BW0506 in mastarea.2da, it has no typos. But the game might still not consider BW0506 as a master area:
Having no better idea, I set all outdoor/day&night/WEATHER flags for BW0506. Rain sounds appear, but no graphics. As the winner of the first BWL Technical Contest also pointed out, for weather effects, the area must be in mastarea.2da. BW0502 is also in mastarea.2da, and there the weather HAS effects.
Although BW0506 is an indoor area in graphic respect, but if it's in mastarea.2da and all weather/outdoor flags are enabled, the rain should have graphic effects as well, shouldn't it?!


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post
Baronius
post Jul 20 2005, 07:40 PM
Post #6


Master of energies
Group Icon

Council Member
Posts: 3325
Joined: 9-July 04
From: Magyarország




I used a SetMasterArea("BW0506") in one of the scripts, and everything worked PROPERLY! (The dialogue of AR3300 did NOT trigger in BW0506!)

I don't know why the mastarea.2da works in case of AR0502 (weather and scripts also work there, so it is definitely read out from mastarea.2da) but doesn't work in case of AR0506 apparently (in spite of the fact I deleted all cache and travelled to Beregost from an earlier save; additionally AR0506 was never visited before)

Dammit with mastarea.2da!
Attached File(s)
Attached File  Bez_n__zvu.gif ( 17.15k ) Number of downloads: 3
 


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post
CamDawg
post Jul 21 2005, 12:30 AM
Post #7





Forum Member
Posts: 59
Joined: 22-July 04




Are you using a save game or a new one? I don't know if mastarea data is cached in the save game, but it's possible.


--------------------
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.
Go to the top of the page
 
Quote Post
Baronius
post Jul 21 2005, 05:20 PM
Post #8


Master of energies
Group Icon

Council Member
Posts: 3325
Joined: 9-July 04
From: Magyarország




I didn't start a new game when I started to develop the mod, I reloaded a savegame. Then I added BW0502 as a master area, and it worked. (But after days, the newly added BW0506 didn't.) You may be right about the cache and savegames, I have no idea how or how often it might does this, if it does it at all.


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post
Avenger_teambg
post Jul 23 2005, 06:40 PM
Post #9





Forum Member
Posts: 78
Joined: 13-July 05




I'm VERY curious if you find where (if anywhere) the master area flag is stored in a saved game.
This might be very important for GemRB compatibility


--------------------
See GemRB !
Go to the top of the page
 
Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 28th August 2025 - 10:03 PM