Jump to content

More stuff for v10


Recommended Posts

Spook is still letting the 'panic' string past magic resistance:

 

// spook's 'panic' string not properly quashed by MR
COPY_EXISTING ~spwi125.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%" + 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
  WRITE_BYTE ("%fx_off%" + 0x0d + (0x30 * ("%index2%" + "%abil_fx_idx%"))) 1 // change to dispel, no bypass MR
END
 END
 BUT_ONLY_IF_IT_CHANGES

One of the sound effects has no save, so this should really be

 

// one sound can't be saved against
COPY_EXISTING ~spwi125.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%" + 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
  WRITE_BYTE ("%fx_off%" + 0x0d + (0x30 * ("%index2%" + "%abil_fx_idx%"))) 1 // change to dispel, no bypass MR
  WRITE_BYTE ("%fx_off%" + 0x24 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) THIS | BIT0
  WRITE_LONG ("%fx_off%" + 0x28 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) (index * "-1")
END
 END
 BUT_ONLY

Link to comment
Also, I've better centered the BAMs for the spell scroll icons that were cut off (attached).
Two things I've been meaning to say about this: BioWare actually fixed these icons in TotSC, so there are "official" versions of them in the TotSC override (they just never made their way back upstream, so BG2 still has the fugly ones).

 

Additionally, the engine does something with scroll icons (does it composite them with the generic scroll background? I can't remember). If you look at my TP2, you should see a way to fix this just by editing the icon reference in those items (I think; I don't remember what I did), giving you get a perfect scroll icon. This would cut down on the number of files we need to ship.

Link to comment
If you look at my TP2, you should see a way to fix this just by editing the icon reference in those items (I think; I don't remember what I did), giving you get a perfect scroll icon. This would cut down on the number of files we need to ship.
I applaud such wizardry, and indeed it should be possible to adjust BAM offsets without shipping new BAMs.
Link to comment
Also, I've better centered the BAMs for the spell scroll icons that were cut off (attached).
Two things I've been meaning to say about this: BioWare actually fixed these icons in TotSC, so there are "official" versions of them in the TotSC override (they just never made their way back upstream, so BG2 still has the fugly ones).

 

Additionally, the engine does something with scroll icons (does it composite them with the generic scroll background? I can't remember). If you look at my TP2, you should see a way to fix this just by editing the icon reference in those items (I think; I don't remember what I did), giving you get a perfect scroll icon. This would cut down on the number of files we need to ship.

Nah, it looks much simpler--you've found existing scroll BAMs. I.e. scrl5a casts Mental Domination (sppr405) and you're just swapping in sppr405a for the BAM, which is the icon on an uncropped scroll background.

Link to comment

Hold and paralyze opcodes target via IDS, so we need to review and run their associated effects (portrait icon, string, spinny head animation) through EFFs when the effect is not universal (looking at you, Hold Person).

 

Let's discuss whether the Horror spell should cause the spinny head animation while we're at it.

 

Let's also talk about avenger druids ("may not wear better than leather armor") and animal-based armor. They can currently wear shadow dragon scale, red dragon scale, blue dragon plate, and ankheg plate but not white dragon scale.

Link to comment

Let's discuss whether the Horror spell should cause the spinny head animation while we're at it.

Yes, it should. It has been doing it for 10+ years and it is a very noticeable change (for no reason?).

 

Let's also talk about avenger druids ("may not wear better than leather armor") and animal-based armor. They can currently wear shadow dragon scale, red dragon scale, blue dragon plate, and ankheg plate but not white dragon scale.

I say either leave things as they are or ban them all. They have all got on-equip effects consistent1 with armour better than plain leather. Personally I'm leaning towards banning them all being overzealous, even if it may be technically correct. Not to mention the arguing that would ensue (non-obvious technicalities hardly make for an overwhelming and forceful argument).

 

I suppose if you temporarily ignore the specifics of the kit description and only consider consistency, allowing the use of the white dragon armour is another option. You achieve consistency and there are no particular upheavals of game balance, what with the armour itself being of limited consequence. But that's a bit spurious.

 

 

1. Except Ankheg and Red Dragon, which are consistent with type full plate in everything but the magnitude of some of the on-equip effects. It would, however, be hard to argue they are not better armour types than plain leather (one being plate and the other being plate or scale).

Link to comment
Let's discuss whether the Horror spell should cause the spinny head animation while we're at it.
Yes, it should. It has been doing it for 10+ years and it is a very noticeable change (for no reason?).

Well, let's at least create an identical animation that won't be blocked by mind shields.

 

Let's also talk about avenger druids ("may not wear better than leather armor") and animal-based armor. They can currently wear shadow dragon scale, red dragon scale, blue dragon plate, and ankheg plate but not white dragon scale.
I say either leave things as they are or ban them all. They have all got on-equip effects consistent1 with armour better than plain leather. Personally I'm leaning towards banning them all being overzealous, even if it may be technically correct. Not to mention the arguing that would ensue (non-obvious technicalities hardly make for an overwhelming and forceful argument). I suppose if you temporarily ignore the specifics of the kit description and only consider consistency, allowing the use of the white dragon armour is another option. You achieve consistency and there are no particular upheavals of game balance, what with the armour itself being of limited consequence. But that's a bit spurious. 1. Except Ankheg and Red Dragon, which are consistent with type full plate in everything but the magnitude of some of the on-equip effects. It would, however, be hard to argue they are not better armour types than plain leather (one being plate and the other being plate or scale).

Looking at these in the broader context of kits, we may have more work here.

 

Kits/classes have the following armor restrictions: no armor for kensais and shapeshifters, no metal armor for archers, no plate for barbarians, nothing greater than studded leather for stalkers, and nothing better than leather for avengers.

 

White Dragon Scale: Per descript only unusable by mages, In patched BG2 it's disallowed from avengers and kensais, allowed for stalkers, archers, shapeshifters and barbarians. Fixpack makes it unusable by shapeshifters and usable by mage-thieves. My recommendation is to add a restriction for stalkers.

 

Shadow dragon scale: Per descript only unusable by mages, In patched BG2 it's disallowed from kensais, allowed for stalkers, archers, shapeshifters, avengers and barbarians. Fixpack makes it unusable by shapeshifters. Internally, the game treats this as a variant of leather, so I'm fine with the status quo.

 

Red dragon scale: Per descript unusable by mages, bards, and thieves. In patched BG2 it's disallowed from kensais, archers, stalkers, shapeshifters, and barbarians and allowed for avengers. Fixpack makes no changes. My recommendation here is to add the avenger flag, especially since the less-restricted stalkers can't use it, and allow for use by archers.

 

Blue dragon plate: Per descript unusable by mages, bards, and thieves. In patched BG2 it's disallowed from kensais, archers, stalkers, shapeshifters, and barbarians and allowed for avengers. Fixpack alllows it to be usable by druids per the descript. My recommendation here is to add the avenger flag, especially since the less-restricted stalkers can't use it, and allow for use by archers.

 

Ankheg plate: Per descript unusable by mages, bards, and thieves. In patched BG2 it's disallowed from kensais, archers, stalkers, shapeshifters, and barbarians and allowed for avengers. Fixpack makes no changes. My recommendation here is to add the avenger flag, especially since the less-restricted stalkers can't use it, and allow for use by archers.

Link to comment

Other to-do items for v10: tighten up usabilities for Valygar's armor, double-check XP for enemy-only summons, Neb's a gnome, Miloch's animation fixes.

 

Here's another fun one: everyone uses the racial skill table (skillrac.2da) to calculate their thieving skills, i.e. a ranger's stealth and a bard's pickpocketing. Unfortunately, skillrac.2da is not racial bonuses, but racial bonuses + starting thief scores, so bards get an extra 15% starting PP score and rangers get the starting 10% MS and 5% HiS of thieves. I think this is unintended, but there's not enough to say this unequivocally, so I'd suggest a new OBC to take these away from rangers and bards.

Link to comment
Also, I've better centered the BAMs for the spell scroll icons that were cut off (attached).
Two things I've been meaning to say about this: BioWare actually fixed these icons in TotSC, so there are "official" versions of them in the TotSC override (they just never made their way back upstream, so BG2 still has the fugly ones). Additionally, the engine does something with scroll icons (does it composite them with the generic scroll background? I can't remember). If you look at my TP2, you should see a way to fix this just by editing the icon reference in those items (I think; I don't remember what I did), giving you get a perfect scroll icon. This would cut down on the number of files we need to ship.
Nah, it looks much simpler--you've found existing scroll BAMs. I.e. scrl5a casts Mental Domination (sppr405) and you're just swapping in sppr405a for the BAM, which is the icon on an uncropped scroll background.

Well, this won't work either. When you move items with spprXXa BAMs around your inventory, they do not change to the rolled-up scroll icon like other scrolls since they lack the frame. I can't copy the relevant frame data since WeiDU doesn't have a decompression routine for BAMCs (apparently it does nowadays but the palettes would be wrong anyway).

 

Since they're more official than mine, I've grabbed the relevant BAMs from TotSC instead.

Link to comment
Hold and paralyze opcodes target via IDS, so we need to review and run their associated effects (portrait icon, string, spinny head animation) through EFFs when the effect is not universal (looking at you, Hold Person).

Sigh. Ghoul attacks paralyze everyone, but the attacks of liches, ghoul lords, lacedons, etc. use the old BG-style paralyze setup, which only works on humans, half-elves, dwarves, gnomes, and halflings.

 

In BG they did this to keep elves immune to ghoul paralyzation, but they changed their minds for BG2. I'm pretty sure they didn't mean for ghoul lords et al. to have a less effective attack than bogstandard ghouls.

Link to comment

Alright, finally have the IDS-specific opcodes sorted, and found a few more bugs to boot. Hold animal is supposed to last 2 rounds/level, but was lasting 10 rounds at all levels. The ghoul lord would nauseate victims on attack, but the portrait icon stuck around too long. Most of the undead attacks that paralyze would play their un-paralyze sounds too late.

 

// unparalyze sould plays too late
COPY_EXISTING ~ghoul1.itm~ ~override~
 LPF cd_item_alter_effect INT_VAR opcode = 174 duration_high = 30 END

// paralyze not universal
COPY_EXISTING ~demmau01.itm~ ~override~
 LPF DELETE_ITEM_EFFECT INT_VAR opcode_to_delete = 109 END
 LPF ADD_ITEM_EFFECT INT_VAR opcode = 109 target = 2 param2 = 2 resist_dispel = 1 duration = 30 probability1 = 15 savingthrow = BIT2 END
 LPF cd_item_alter_effect INT_VAR opcode = 174 duration_high = 30 END // unparalyze sound

// paralyze not universal
COPY_EXISTING ~ghoullor.itm~ ~override~
		  ~lacedo.itm~   ~override~
		  ~lacedo02.itm~ ~override~
		  ~lich02.itm~   ~override~
 LPF DELETE_ITEM_EFFECT INT_VAR opcode_to_delete = 109 END
 LPF ADD_ITEM_EFFECT INT_VAR opcode = 109 target = 2 param2 = 2 resist_dispel = 1 duration = 30 savingthrow = BIT2 END
 LPF cd_item_alter_effect INT_VAR opcode = 174 duration_high = 30 END // unparalyze sound

// ghoul lors nauseated icon lasts too long
COPY_EXISTING ~ghoullor.itm~ ~override~
 READ_LONG  0x64 abil_off
 READ_SHORT 0x68 abil_num
 READ_LONG  0x6a fx_off
 FOR (index = 0 ; index < abil_num ; ++index) BEGIN
   READ_SHORT  (abil_off + 0x20 + (index * 0x38)) abil_fx_idx
   READ_SHORT  (abil_off + 0x1e + (index * 0x38)) abil_fx_num
   FOR (index2 = 0 ; index2 < abil_fx_num ; ++index2) BEGIN
  READ_SHORT (fx_off +	    ((abil_fx_idx + index2) * 0x30)) opcode
  READ_LONG  (fx_off + 0x08 + ((abil_fx_idx + index2) * 0x30)) icon
  PATCH_IF ((opcode = 142) AND (icon = 7)) BEGIN // nauseated icon
    WRITE_LONG  (fx_off + 0x0e + ((abil_fx_idx + index2) * 0x30)) 100 // duration
  END
   END
 END
 BUT_ONLY

COPY_EXISTING ~cdblind1.eff~ ~override/cdheld.eff~
 WRITE_LONG 0x1c 14102 // 'held'
 WRITE_LONG 0x24 1	 // instant/perm
 WRITE_LONG 0x28 0	 // duration

COPY_EXISTING ~cdblind.eff~ ~override/cdhda30.eff~
 WRITE_LONG 0x20 13 // held icon
 WRITE_LONG 0x28 30 // duration

COPY_EXISTING ~dawnvis.eff~ ~override/cdhdb30.eff~
 WRITE_LONG  0x18 0		  // power
 WRITE_LONG  0x28 30		 // duration
 WRITE_ASCII 0x30 ~spmindat~ // swirly anim

// create extended effs for hold animal; use abil_num from spell patch
OUTER_FOR (index = 60 ; index < 241 ; index += 12) BEGIN

 COPY_EXISTING ~cdhda30.eff~ ~override/cdhda%index%.eff~
		    ~cdhdb30.eff~ ~override/cdhdb%index%.eff~
   WRITE_LONG 0x28 index // duration

END

// handle separately since it's on its own specific header
COPY_EXISTING ~spcl415.spl~ ~override~ // target 2, power 3, 3/1, dur 30, spell -1 (min lev 11)
 LPF cd_spell_alter_effect INT_VAR header = 2 opcode = 142 opcode_new = 999 END
 LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 215 END // delete existing visual
 LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 999 END // delete existing portrait icon, spcl415
 LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 2 power = 3 parameter1 = 1 parameter2 = 3 resist_dispel = 1
   timing = 1 savingthrow = BIT0 savebonus = "-1" header = 2 STR_VAR resource = cdheld END
 LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 2 power = 3 parameter1 = 1 parameter2 = 3 resist_dispel = 1
   duration = 30 savingthrow = BIT0 savebonus = "-1" header = 2 STR_VAR resource = cdhda30 END
 LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 2 power = 3 parameter1 = 1 parameter2 = 3 resist_dispel = 1
   duration = 30 savingthrow = BIT0 savebonus = "-1" header = 2 STR_VAR resource = cdhdb30 END

// associated hold effects playing on non-affected creatures
COPY_EXISTING ~spin648.spl~ ~override~ // target 2, power 1, 3/1, dur 60, no save
		  ~spin988.spl~ ~override~ // target 2, power 3, 3/1, dur 60, spell -1
		  ~sppr208.spl~ ~override~ // target 2, power 2, 3/1, dur 60, spell 0
		  ~sppr989.spl~ ~override~ // target 2, power 3, 3/1, dur 60, spell -1
		  ~spwi306.spl~ ~override~ // target 2, power 3, 3/1, dur 60, spell -1
		  ~spwm122.spl~ ~override~ // target 2, power 2, 3/1, dur 60, spell 0
 LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 142 END // delete existing portrait icon
 LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 215 END // delete existing visual
 LPF DELETE_SPELL_EFFECT INT_VAR opcode_to_delete = 139 END // delete existing string
 // add new icon and animation via eff, adjust as needed below
 LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 2 power = 3 parameter1 = 1 parameter2 = 3 resist_dispel = 1
   timing = 1 savingthrow = BIT0 savebonus = "-1" STR_VAR resource = cdheld END
 LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 2 power = 3 parameter1 = 1 parameter2 = 3 resist_dispel = 1
   duration = 60 savingthrow = BIT0 savebonus = "-1" STR_VAR resource = cdhda60 END
 LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 2 power = 3 parameter1 = 1 parameter2 = 3 resist_dispel = 1
   duration = 60 savingthrow = BIT0 savebonus = "-1" STR_VAR resource = cdhdb60 END

// fix power, saves
COPY_EXISTING ~spin648.spl~ ~override~
 LPF cd_spell_alter_effect INT_VAR opcode = 177 power = 1 savingthrow = 0 savebonus = 0 END

// fix power, saves
COPY_EXISTING ~sppr208.spl~ ~override~
		  ~spwm122.spl~ ~override~
 LPF cd_spell_alter_effect INT_VAR opcode = 177 power = 2 savebonus = 0 END

// handle separately due to durations
COPY_EXISTING ~sppr305.spl~ ~override~
 // first, get abil 1 effects correct before extending headers
 LPF cd_spell_alter_effect INT_VAR opcode = 215 opcode_new = 177 parameter1 = 2 parameter2 = 3 timing = 1 duration = 0 STR_VAR resource = cdheld END
 LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 2 power = 3  parameter1 = 2 parameter2 = 3 resist_dispel = 1
   duration = 60 savingthrow = BIT0 STR_VAR resource = cdhda60 END
 LPF ADD_SPELL_EFFECT INT_VAR opcode = 177 target = 2 power = 3 parameter1 = 2 parameter2 = 3 resist_dispel = 1
   duration = 60 savingthrow = BIT0 STR_VAR resource = cdhdb60 END
 READ_LONG  0x64 abil_off
 READ_SHORT 0x68 abil_num
 READ_LONG  0x6a fx_off
 WHILE (abil_num < 16) BEGIN // build out ability headers
   READ_ASCII (abil_off +	    ((abil_num - 1) * 0x28)) abil_last (0x28) // clone last ability
   READ_SHORT (abil_off + 0x1e + ((abil_num - 1) * 0x28)) abil_fx_num
   READ_SHORT (abil_off + 0x20 + ((abil_num - 1) * 0x28)) abil_fx_idx
   READ_ASCII (fx_off +	    (abil_fx_idx * 0x30)) fx_last (abil_fx_num * 0x30) // clone fx block
   // now insert new effects for new ability
   INSERT_BYTES (fx_off + (0x30 * (abil_fx_idx + abil_fx_num))) (abil_fx_num * 0x30) // insert new block of effects
   WRITE_ASCIIE (fx_off + (0x30 * (abil_fx_idx + abil_fx_num))) "%fx_last%"		  // write old block info
   FOR (index = 0 ; index < abil_fx_num ; ++index) BEGIN // adjust durations of new effects
  READ_SHORT (fx_off +	    (0x30 * (abil_fx_idx + abil_fx_num + index))) opcode
  READ_LONG  (fx_off + 0x0e + (0x30 * (abil_fx_idx + abil_fx_num + index))) duration
  PATCH_IF (duration > 5) BEGIN
    SET duration += 12
    WRITE_LONG (fx_off + 0x0e + (0x30 * (abil_fx_idx + abil_fx_num + index))) duration // 2 rounds per level
    PATCH_IF (opcode = 177) BEGIN
	  WRITE_ASCIIE (fx_off + 0x19 + (0x30 * (abil_fx_idx + abil_fx_num + index))) "%duration%"
    END
  END
   END
   // now insert new ability
   INSERT_BYTES (abil_off + (abil_num * 0x28)) 0x28
   WRITE_ASCIIE (abil_off + (abil_num * 0x28)) "%abil_last%"
   WRITE_SHORT (abil_off + 0x10 + (abil_num * 0x28)) (abil_num + 5) // min level
   WRITE_SHORT (abil_off + 0x20 + (abil_num * 0x28)) (abil_fx_idx + abil_fx_num) // index to new effect
   // update counters
   fx_off += 0x28
   abil_num += 1
 END
 WRITE_SHORT 0x68 abil_num
 WRITE_LONG  0x6a fx_off

 

And yes, my function library is now included.

Link to comment

OK, a few more items while we were away. The easy one is that scrolls for Chaotic Commands and Champion's Strength required 9 wisdom instead of 9 intelligence.

 

The Rings of Fire/Air/Earth control cast spells as part of their abilities, but not all of their effects had been updated with the fixes we've made to the underlying spells. Rather than continuing to chase our tail, these rings now directly cast the underlying spell at a level appropriate to their description, much like we did with the Staff of Power and MGoI.

 

Bows, on the other hand, are a mess:

 

  • Ripper +2 was not receiving its extra +1 to-hit from being a composite long bow
  • Long Bow +2, Long Bow +3, Mana Bow +4, Taralash +4 and +5 were not receiving their extra +1 to-hit from being long bows
  • Bow of Arvoreen is a +2 short bow but has the speed of an unenchanted short bow
  • Catti-Brie's copy of Tansheron's Bow provides an extra point of damage

 

^^ I've got these addressed locally.

 

The Short Bow of Gesen is slow for a +4 short bow (should be speed 2, is speed 4) but given its unique ammo this may be intentional. I'm leaning towards no change here.

 

There are several more anomalies, but for now I've filed these all under no change. Several unique bows have damage higher than their enchantment and type would indicate: Ripper +2, Strong Arm +2, Heartseeker +3, and Tuigan Bow +1. The Long Bow of Marksmanship is also priced way out of line with its abilities compared to other bows, but it's unused.

Link to comment

Archived

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

×
×
  • Create New...