Jump to content

A few misc bugfixes


Wisp

Recommended Posts

Plat09 and leat06 are the only two suits of magical armour that are not on the itemexcl list.

//Mithril field plate can be worn together with items of protection
APPEND itemexcl.2da "plat09 1" UNLESS plat09
//As can studded leather of missile attraction +2
APPEND itemexcl.2da "leat06 1" UNLESS leat06

 

The following issue is not that likely to manifest itself, but it can result in one or more of the actors going hostile, which also sets off Haer'Dalis.

Pcapt03 is also the only member of the prison staff who has the shout script. The other members either have no shout script or use gensht01.

//One prison captain share the same shout script as the actor inmates. Give him the same shout script as the other members of the prison staff.
COPY_EXISTING pcapt03.cre override
 FOR (i=0;i<6;i+=1) BEGIN
READ_ASCII 0x248 + 0x8*i script ELSE blank
PATCH_IF "%script%" STRING_EQUAL_CASE shout BEGIN
  WRITE_ASCII 0x248 + 0x8*i gensht01 #8
END
 END
BUT_ONLY

 

Also, an attempt to fix the issue with Saemon dissappearing on his way out of the Brynnlaw tavern:

//Try to prevent Saemon from getting lost on his way out of the Vulgar Monkey
//See also changes to ar1600.bcs
COPY_EXISTING ppsaem3.dlg override
 DECOMPILE_DLG_TO_D
REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~EscapeAreaMove("AR1600",2949,2504,8)~ ~EscapeArea()~
 COMPILE_D_TO_DLG
BUT_ONLY

//Try to prevent Saemon from getting lost on his way out of the Vulgar Monkey
//See also changes to ppsaem3.dlg
EXTEND_BOTTOM ar1600.bcs "bg2fixpack/baf/ar1600.baf"

With the contents of ar1600.baf being (assuming it's not inappropriate to use CamDawgs prefix like that):

IF
 Global("AsylumPlot","GLOBAL",66)
 Global("CDSaemonSpawn","ar1600",0)
 !Exists("ppsaem3")
THEN RESPONSE #100
 CreateCreature("ppsaem3",[2949.2504],8)
 SetGlobal("CDSaemonSpawn","ar1600",1)
END

 

Solaufein has a similar tendency to get lost when Phaere is to be rescued (as with Saemon, it's a rather frequently occuring problem). Analogous fix for that:

//Try to prevent Solaufein from getting lost
//See also changes to ar2100.bcs
COPY_EXISTING udsola01.dlg override
 DECOMPILE_DLG_TO_D
REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~EscapeAreaMove("ar2100",4707,3105,4)~ ~EscapeArea()~
 COMPILE_D_TO_DLG
BUT_ONLY

//Try to prevent Solaufein from getting lost
//See also changes to udsola01.dlg
EXTEND_BOTTOM ar2100.bcs "bg2fixpack/baf/ar2100.baf"

With the contents of ar2100.baf being:

IF
 Global("SolaufeinJob","GLOBAL",2)
 Global("CDSolaufeinSpawn","ar2100",0)
 !Exists("solaufein")
THEN RESPONSE #100
 CreateCreature("udsola01",[4707.3105],4)
 SetGlobal("CDSolaufeinSpawn","ar2100",1)
END

 

Both actors are (re)created just before this happens, so there should hopefully not be any harm in recreating them again.

 

A simple fix for the issue Grim Squeaker reported here.

Added to bg2fixpack/dlg/beta_soa-dlg.d

// state 69 is identical to state 70 except for 4 transitions
EXTEND_BOTTOM c6elhan2 69 #0
 IF ~PartyHasItem("miscbn")~ THEN REPLY #59218 GOTO 76
 IF ~PartyHasItem("miscbl")~ THEN REPLY #59219 GOTO 76
 IF ~PartyHasItem("miscbo")~ THEN REPLY #59220 GOTO 76
 IF ~PartyHasItem("miscbm")~ THEN REPLY #59221 GOTO 76
END

 

The following two bugs were reported here.

 

Chapter 7 starts when you enter Suldanessellar. I figured the dream stops making sense at that point.

//Ellesime dream can happen after you've done the whole Suldanessellar bit
COPY_EXISTING player1d.bcs override
 DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Global("HadEllesimeDream1","GLOBAL",0)~ ~Global("HadEllesimeDream1","GLOBAL",0) GlobalLT("Chapter","GLOBAL",7)~
 COMPILE_BAF_TO_BCS
BUT_ONLY
//Only patch if we just have the two standard triggers
IF ~CO%lnl%TR%lnl%16448 0 0 0 0 "EllesimeDream1" "GLOBAL" OB%lnl%0 0 0 0 0 0 0 0 0 0 0 0 ""OB%lnl%TR%lnl%TR%lnl%16399 0 0 0 0 "GLOBALHadEllesimeDream1" "" OB%lnl%0 0 0 0 0 0 0 0 0 0 0 0 ""OB%lnl%TR%lnl%CO~

 

The evil hell trial rewards have Play Sound effects with Target: Self (instead of pre-target) and power level 1. The bad targeting would keep the sounds from playing and the power level would make e.g. GoI block the sounds even if they were targeted correctly.

//Evil hell rewards have some effects with non-zero power levels and bad targeting.
COPY_EXISTING spin747.spl override //selfish, evil
		  spin749.spl override //wrath, evil
		  spin751.spl override //pride, evil
		  spin753.spl override //fear, evil
		  spin755.spl override //greed, evil
 READ_LONG  0x64 ab_off
 READ_SHORT 0x68 num_ab
 READ_LONG  0x6a fx_off
 FOR (i=0;i<num_ab;i+=1) BEGIN
READ_SHORT ab_off + 0x28*i + 0x1e num_l_fx
READ_SHORT ab_off + 0x28*i + 0x20 fx_idx
FOR (j=0;j<num_l_fx;j+=1) BEGIN
  WRITE_BYTE fx_off + 0x30*(fx_idx + j) + 0x2 2 //Target
  WRITE_BYTE fx_off + 0x30*(fx_idx + j) + 0x3 0 //Power
END
 END
BUT_ONLY

Edit: Stupid codeboxes.

Link to comment
Also, an attempt to fix the issue with Saemon dissappearing on his way out of the Brynnlaw tavern:
Solaufein has a similar tendency to get lost when Phaere is to be rescued (as with Saemon, it's a rather frequently occuring problem). Analogous fix for that:
It won't work if they have locals variables stored. Are there any?
Link to comment

No.

Additionally, Saemon is created there and then inside the tavern when the player first enters after having escaped Brynnlaw and Solaufein gets to the platform by Imrae through a CreateCreature.

 

But I guess it is possible that some mod out there adds locals to one of them.

Link to comment

Nice work. Here's some of my own local stuff:

 

 

The map note for the Western Tunnels in the Underdark area is placed over inaccessible terrain which prevents the player from ever seeing it.

// Correct the position of the Western Tunnels map note in the Underdark

COPY_EXISTING ~AR2100.are~ ~override~
 READ_LONG  0xc4 "note_off"
 READ_LONG  0xc8 "note_num"
FOR (index = 0; index < note_num; index = index + 1) BEGIN // cycle through automap notes
  READ_SHORT ("%note_off%" +		("%index%" * 0x34)) "x_coord"
  READ_SHORT ("%note_off%" + 0x02 + ("%index%" * 0x34)) "y_coord"
  PATCH_IF (("%x_coord%" = 335) AND  ("%y_coord%" = 1569)) BEGIN // Western Tunnels map note
   WRITE_SHORT ("%note_off%" +		("%index%" * 0x34)) "250" // Coordinate X (250)
   WRITE_SHORT ("%note_off%" + 0x02 + ("%index%" * 0x34)) "1830" // Coordinate Y (1830)
  END
END  
BUT_ONLY_IF_IT_CHANGES

 

 

For some reason, the main door to Bodhi's lair remains unpickably locked due to a "powerful sense of danger" even if the player sides with her in Chapter 2. This doesn't make sense as the player gains full access to Bodhi's lair after joining her and can even rest there.

// Unlock the main door to Bodhi's lair if the player sides with her in Chapter 2

COPY_EXISTING ~AR0801.BCS~ ~override~ 
DECOMPILE_BCS_TO_BAF
 REPLACE_TEXTUALLY EXACT_MATCH ~SetGlobal("SpawnBodhiFriends","AR0801",1)~ ~SetGlobal("SpawnBodhiFriends","AR0801",1) Unlock("DOOR03")~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

 

 

The Skull of Death allows a hidden saving throw for the Death Spell that it casts, which is contrary to both the item and the spell description. It also needlessly allows two separate magic resistance and power level checks.

// The Death Spell cast by the Skull of Death should not require a saving throw nor should it allow two magic resistance and power level checks

COPY_EXISTING ~HELM17.ITM~   ~override~ // Skull of Death
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // looks for magical ability header
READ_BYTE   ("%abil_off%" +		("%index%" * 0x38)) "type"
PATCH_IF ("%type%" = 3) BEGIN // if magical
  READ_SHORT  ("%abil_off%" + 0x1e + ("%index%" * 0x38)) "abil_fx_num"
  READ_SHORT  ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "abil_fx_idx"
  FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
	READ_SHORT ("%fx_off%" +		(("%abil_fx_idx%" + "%index2%") * 0x30)) "opcode"
	PATCH_IF ("%opcode%" = 146) BEGIN  // effect #146 - cast spell at target
	  WRITE_BYTE ("%fx_off%" + 0x03 + (("%abil_fx_idx%" + "%index2%") * 0x30)) 0 // power level: 0 (the power level is handled within the spell itself)
	  WRITE_BYTE ("%fx_off%" + 0x0d + (("%abil_fx_idx%" + "%index2%") * 0x30)) 0 // non-magical (MR is handled within the spell itself)
	  WRITE_LONG ("%fx_off%" + 0x24 + (("%abil_fx_idx%" + "%index2%") * 0x30)) 0 // saving throw: none
	END
  END
END
 END
BUT_ONLY_IF_IT_CHANGES

 

 

Several beholders have mismatched names and tooltips. This can be confusing as one string appears in the combat log and a different one under the targeting cursor.

// Make the Beholder names and tooltips consistent with each other

COPY_EXISTING ~UDELDER.CRE~	~override~ // Elder Orb
 SAY NAME1 #10901
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~BEHOBS01.CRE~   ~override~ // Observer
 SAY NAME1 #10726
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~BEHSPE01.CRE~   ~override~ // Spectator
 SAY NAME1 #10834
BUT_ONLY_IF_IT_CHANGES

 

 

There's also a small error in Mazzy's soundset, the matter of Ice Trolls losing their coloring upon death, a typo in the Barkskin fix and the Greater Command issue.

Link to comment

Yeah, some of her slaves actually spawn outside the door, which is proof positive enough for me that they wanted it open.

 

OBS and SPE aren't used in the default game; is UDELDER?

 

Are you sure the helmet issue isn't caused by us (the saving throw shouldn't translate to the death throw, but to a save vs. the wearer actually casting the spell in the first place!)? I thought we covered all those bad cast spell setups over the years, sigh.

 

 

PLAT09 may be unused (I know there are two field plates, with only one actually on Bruenor).

 

I'm not keen on changing Saemon or Sola this late in life. :(

Link to comment
Are you sure the helmet issue isn't caused by us (the saving throw shouldn't translate to the death throw, but to a save vs. the wearer actually casting the spell in the first place!)? I thought we covered all those bad cast spell setups over the years, sigh.
There's a fix for it here but it doesn't look like it made it any further than that.

 

PLAT09 may be unused (I know there are two field plates, with only one actually on Bruenor).
You are right. It's bruenpla that should go on the list and not plat09.

 

I'm not keen on changing Saemon or Sola this late in life. ???

Maybe it is something that's better left untouched.

Link to comment
OBS and SPE aren't used in the default game

 

Correct, but I added them because some mods make use of them (either Quest Pack or SCSII I can't remember exactly).

 

is UDELDER?

 

Yup, it's used in the Underdark beholder lair (AR2101).

 

Are you sure the helmet issue isn't caused by us

 

No, it's unmodded game behavior.

Link to comment
The map note for the Western Tunnels in the Underdark area is placed over inaccessible terrain which prevents the player from ever seeing it.

 

Funny, I somehow thought it was on purpose (player can't see exit of the Underdark too soon).

 

 

While we're talking maps, the oversight map doesn't make much sense: Brynnlaw and Spellhold are two different islands, yet you can go from Brynnlaw to Spellhold on foot.

Link to comment

Archived

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

×
×
  • Create New...