Jump to content

Random stuff gathered from elsewhere


Recommended Posts

harp_v6
5
A
SPC1
B
SPC1
C
SPC1   harp_v6 A

... change the 5 to a 6.

 

COPY_EXISTING ~music/harp_v6.mus~ ~music~
 REPLACE_TEXTUALLY ~^5~ ~6~
 BUT_ONLY_IF_IT_CHANGES

 

Oh, and Bruenor's axe isn't marked as magical. I never payed attention to whether he was actually damaging the vampires or not (I don't know if the magical flag would break this, or if it's just based off enchantment level).

It's flagged as magical, but was lacking an enchantment level. Added to the existing patch.

 

// changes to axe proficiency; enchantment level incorrect
COPY_EXISTING ~bruenaxe.itm~ ~override~
 WRITE_BYTE 0x31 92
 WRITE_LONG 0x60 3
 BUT_ONLY_IF_IT_CHANGES

 

- The wizard version of Farsight has really funky timings (I couldn't find any logical pattern, so I just set it to the stated 3 + 1/level to match the priest version and description).

 

// mage farsight has wonky durations
COPY_EXISTING ~spwi424.spl~ ~override~
 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
   READ_SHORT ("%abil_off%" + 0x10 + (0x28 * "%index%")) "level"
   PATCH_IF ("%level%" = 1) BEGIN
     SET "level" = 7
   END
   READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
   READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
   FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
     READ_LONG  ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "duration"
     PATCH_IF ("%duration%" > 5) BEGIN // if longer than instant
       WRITE_LONG  ("%fx_off%" + 0x0e + (0x30 * ("%abil_fx_idx%" + "%index2%"))) (6 * (3 + "%level%"))
     END
   END
 END
 BUT_ONLY_IF_IT_CHANGES

 

- The Dispel Magic scroll uses the priest description, instead of the mage description.

 

// dispel magic scroll uses priest description of spell
COPY_EXISTING ~scrl1e.itm~ ~override~
 SAY IDENTIFIED_DESC #45821 // mage dispel magic descript
 BUT_ONLY_IF_IT_CHANGES

 

- AR1404 has AR1404.MOS and AR1404N.MOS area maps (despite not being an extended night area). I simply COPY_EXISTING ~AR1404N.MOS~ ~OVERRIDE/AR1404.MOS~ so that the map will always be correct (this is the "evil" temple ruins forest area).

 

// AR1404 has AR1404.MOS and AR1404N.MOS area maps (despite not being an extended night area)
COPY_EXISTING ~ar1404n.mos~ ~override/ar1404.mos~

 

- AR0522.BCS has the following gem:

 

// area objects can't have LOCALS variables
COPY_EXISTING ~ar0522.bcs~ ~override~
 DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~"SamuelAttacks","LOCALS"~ ~"SamuelAttacks","AR0522"~
 COMPILE_BAF_TO_BCS
 BUT_ONLY_IF_IT_CHANGES

 

ar4500.bcs also has a LOCALS issue with trying to set "ActiveKeldorn". Being as this variable is only used in Keldorn's SoA script and this is the Pocket Plane, I'm not too worried. :)

Link to comment
- Mazzy is supposed to have one dialogue after her stupid altar, but it never plays because of funky variable manipulation in the area script and her dialogue. This is particularly important, because the missed sequence ActionOverride("uhrang01",StartDialogueNoSet(Player1)); since Merella is just a body, it's pretty easy to ignore here entirely.

Cam's cop out: I really don't want to wade through these. What's the fastest way to fix this? :)

 

- The Cloak of the Wolf is actually in the game. It's on Wallag's body. You just can't ever access it. Not really a bug (UB to the rescue!).

 

We can OBC or UB. Either way, this'll work:

 

// wallag's stuff now available
EXTEND_TOP ~ar1403.bcs~ ~bg2fixpack/baf/ar1403.baf~

// make wallag a permanent corpse
COPY_EXISTING ~shabod01.cre~ ~override~
 READ_BYTE 0x10 "flags"
 WRITE_BYTE 0x10 ("%flags%" BOR 0b00000100)
 BUT_ONLY_IF_IT_CHANGES

 

And ar1403.baf:

 

IF
 Global("CDDropStuff","AR1403",0)
THEN
RESPONSE #100
 SetGlobal("CDDropStuff","AR1403",1)
 ActionOverride("shabod01",DropInventory())
END

 

It makes the body permanent, then forces it to drop everything.

 

- Quayle the slime will cause the nearest PC to continually fart if Aerie is in the party. He only has one top-level state that checks to make sure Aerie's not in the party; if you get within 5 feet of him and Aerie's InParty(), he'll continuously try to initiate dialogue (and since he has nothing to say, the feedback window will fill up with "Bumbling simpeltons, get out of my way!"). Simply adding an action SetNumTimesTalkedTo(1) to state 0 (EXTERN from AerieJ) should solve this.

 

.d code:

 

ADD_TRANS_ACTION QUAYLEM
BEGIN 0 END
BEGIN 0 END
~SetNumTimesTalkedTo(1)~

 

Make sure you check the Harper Pin (it should only be usable by Harpers = Jaheira). I'd also suggest setting the price of NPC items to 0 so you can't sell them.

Usability flags are handled in the mass patch; added min attributes:

 

// harper pin supposed to be usable only by Jaheira
COPY_EXISTING ~misc5x.itm~ ~override~
 WRITE_BYTE 0x26 15 // min str
 WRITE_BYTE 0x2a 10 // min int
 WRITE_BYTE 0x2c 17 // min dex
 WRITE_BYTE 0x2e 14 // min wis
 WRITE_BYTE 0x30 17 // min con
 WRITE_BYTE 0x32 15 // min chr
 BUT_ONLY_IF_IT_CHANGES

Link to comment
the bigg was right about the power value -- it affects immunity to spell level. As such, all effect power values should be corrected. Additionally, some effects that target self should actually have 0 power. In particular, most summoning spells run Use EFF file with Target: Self, and this fails if you cast the spell while granted immunity to that spell level (e.g., casting Monster Summoning I fails if you have Minor Globe on). Setting the power to 0 for these spells allows them to be cast when the caster has immunity effects (I do this for all summoning spells and all create item spells). Finally, this also extends to items (if a creature has immunity to spell level LT 8 and you shoot a fire arrow at it, the normal damage is applied but the fire damage is resisted and the Spell Ineffective message runs), but the situation is a bit stickier. I doubt this has an appreciable effect on gameplay, however.

I'm working on a mass-patch for spells; should be ready tonight. W.r.t. player-castable priest and mage spells, is there any reason why spell effects not targeting the caster should be different than the spell level? For caster-targeted effects I'm not sure we can do such a wide-reaching patch as I can think of a few exceptions (i.e. Sunfire).

Link to comment

Most effects should use the correct power. I only set the various summoning spells that target self (even though they really aren't cast on the caster), the create item spells (the item's effects themselves should have the right power, but I think the item should always be created), and the set global variable effect (I think Fireball was the only one where they weren't all 0). Additionally, any spell that dispels invisibility or magic should be left at power 0 (this only applies to the dispel-type spells, not the ones that remove magical protections). There may be one or two exceptions (I set Earthquake and Implosion screen shake to power 0, for instance), but most other effects in player spells should have power matching the spell level. I think only SPDR, SPPR, SPRA, and SPWI spells should be mass-patched, however, and the others only updated where there's a clear issue.

 

Items were trickier, as BioWare wasn't really consistent in the power level for the effects. All equipping effects should have power 0 (although, I don't actually know if these effects will fail). For item abilities, I just tried to make things consistent (items that claim to cast a spell a certain number of times tend to have consistent powers, even if it doesn't entirely match the corresponding spell power, so I left most of them alone). Potions and protection scrolls seem to use a set power of 4 (the only two exceptions were anti-magic items that also dispel effects). I just made sure that all effects except for the display string ("Gulp!") effect used power 4 (even if the effects aren't applied, you still drank the potion).

Link to comment
There's a possible issue with one of Aerie's banters -- two of her banters check the same variable, and there is no variable 8 (i.e., there are two tied to BAERIEWHATEVER7, and then it jumps directly to 9).

 

Twice so far I've found an instance of the following trigger -- !GlobalGT("AerieRomanceActive","GLOBAL",0) !GlobalLT("AerieRomanceActive","GLOBAL",3) -- obviously, this trigger will always be false (should be !Global(1) and !Global(2)). I think these were in Cernd's quest dialogue (one of the CEFALDOR dialogues, and one I don't remember).

Since I was so vague:
//// Aerie's bad banter variable check:

BEGIN ~BAERIE25~
IF WEIGHT #15 ~InParty("HaerDalis")
See("HaerDalis")
!StateCheck("HaerDalis",STATE_SLEEPING)
CombatCounter(0)
Global("ExpBaerie6","LOCALS",0)~ THEN BEGIN 23 // from:
 SAY #68198 /* ~Haer'Dalis... you've been staring at our leader with that look off and on for several hours, now. Don't you think that's a little rude?~ [AERI2516] */
 IF ~~ THEN DO ~SetGlobal("ExpBaerie6","LOCALS",1)~ EXTERN ~BHAERD25~ 0
END

// ... ExpBaerie 1-7 and 9+ are used, no ExpBaerie8

IF WEIGHT #17 ~InParty("Mazzy")
See("Mazzy")
!StateCheck("Mazzy",STATE_SLEEPING)
CombatCounter(0)
Global("ExpBaerie6","LOCALS",0)~ THEN BEGIN 34 // from:
 SAY #68249 /* ~Mazzy? Do you think you'll ever be a true paladin for Arvoreen?~ [AERI2518] */
 IF ~~ THEN DO ~SetGlobal("ExpBaerie6","LOCALS",1)~ EXTERN ~BMAZZY25~ 6
END

//// Bad Aerie romance checks; problem triggers and actions

BEGIN ~TREVIL02~
IF WEIGHT #0 ~Global("GrovePoisoned","GLOBAL",1)~ THEN BEGIN 5 // from:
 SAY #50871 /* ~Hold! What are you doing? What have you placed in the holy font? Oh my...~ */
 IF ~OR(3)
!IsValidForPartyDialog("Aerie")
GlobalGT("AerieRomance","GLOBAL",0)
GlobalLT("AerieRomance","GLOBAL",3)
!IsValidForPartyDialog("Jaheira")
!IsValidForPartyDialog("Cernd")~ THEN DO ~ActionOverride("Valygar",LeaveParty())
ActionOverride("Valygar",Enemy())
ActionOverride("Minsc",LeaveParty())
ActionOverride("Minsc",Enemy())
ActionOverride("Keldorn",LeaveParty())
ActionOverride("Keldorn",Enemy())
ActionOverride("Mazzy",LeaveParty())
ActionOverride("Mazzy",Enemy())~ GOTO 6
 IF ~IsValidForPartyDialog("Aerie")
!GlobalGT("AerieRomance","GLOBAL",0)
!GlobalLT("AerieRomance","GLOBAL",3)~ THEN EXTERN ~AERIEJ~ 167
 IF ~OR(3)
!IsValidForPartyDialog("Aerie")
GlobalGT("AerieRomance","GLOBAL",0)
GlobalLT("AerieRomance","GLOBAL",3)
IsValidForPartyDialog("Jaheira")~ THEN EXTERN ~JAHEIRAJ~ 491
 IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Jaheira")
IsValidForPartyDialog("Cernd")~ THEN EXTERN ~CERNDJ~ 125
END

// IsValid("Aerie") will always be false, the others almost always true
// Should use "AerieRomanceACTIVE" and check for 1 and 2
// Cernd's !IsValid("Aerie") check should be extended to OR(3)
// Even if !IsValid() for the party members, Jaheira and Cernd should still
//   be forced to leave (you can just make sure !IsValid(), take the evil
//   route, and not have Cernd or Jaheira complain at all)

BEGIN ~CEFALD04~
IF ~~ THEN BEGIN 3 // from: 2.0
 SAY #51019 /* ~It burns the very soul of the grove!! The water is dying! All is lost!~ [CEFALD17] */
 IF ~OR(3)
!IsValidForPartyDialog("Aerie")
GlobalGT("AerieRomance","GLOBAL",0)
GlobalLT("AerieRomance","GLOBAL",3)
!IsValidForPartyDialog("Jaheira")
!IsValidForPartyDialog("Cernd")~ THEN DO ~ActionOverride("Valygar",LeaveParty())
ActionOverride("Valygar",Enemy())
ActionOverride("Minsc",LeaveParty())
ActionOverride("Minsc",Enemy())
ActionOverride("Keldorn",LeaveParty())
ActionOverride("Keldorn",Enemy())
ActionOverride("Mazzy",LeaveParty())
ActionOverride("Mazzy",Enemy())~ GOTO 4
 IF ~IsValidForPartyDialog("Aerie")
!GlobalGT("AerieRomance","GLOBAL",0)
!GlobalLT("AerieRomance","GLOBAL",3)~ THEN EXTERN ~AERIEJ~ 167
 IF ~OR(3)
!IsValidForPartyDialog("Aerie")
GlobalGT("AerieRomance","GLOBAL",0)
GlobalLT("AerieRomance","GLOBAL",3)
IsValidForPartyDialog("Jaheira")~ THEN EXTERN ~JAHEIRAJ~ 491
 IF ~!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Jaheira")
IsValidForPartyDialog("Cernd")~ THEN EXTERN ~CERNDJ~ 125
END

Link to comment

Archived

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

×
×
  • Create New...