Jump to content

Equalizer


Drew

Recommended Posts

Over at sorcerer's place they are talking about the alignment bonuses from Equalizer applying to both weapons for a dual wielder. This raises a couple of questions for me. Does that mean that the same is going to be true of dual wielding with weapons like Daystar or the Purifier? I haven't confirmed the bug for the Equalizer, yet, so please take this with a grain of salt. At any rate, assuming the bug is there, can it be fixed?

Link to comment
Over at sorcerer's place they are talking about the alignment bonuses from Equalizer applying to both weapons for a dual wielder.  This raises a couple of questions for me.  Does that mean that the same is going to be true of dual wielding with weapons like Daystar or the Purifier?  I haven't confirmed the bug for the Equalizer, yet, so please take this with a grain of salt.  At any rate, assuming the bug is there, can it be fixed?

 

Well, the simplest thing to do would be to give a fighter a SW1H54 and a SW1H04, and see what his to-hit bonuses are against various monsters, right?

 

So, let's verify: With 3 pips in two-weapon style:

BEARBL (N): +0 Main hand, -2 off hand, as expected.

IMP (LE): +3 Main hand, +1 Off hand: CLEAR BUG

 

So, there we go - now, let's see WHY...

The Equalizer is given a swill of special effects, which seem to have been built just for it: EQAUL01 through EQAUL16. OK, that's two for every alignment that needs a bonus (one for THAC0, one for Damage). These are while equipped, though, instead of for the Melee ability; I think that's our problem. In fact, it seems to be done the same way for the Sword of Balduran's Anti-were effect, and the Flametongue's bonuses... oh, dear, this is a BIG problem, it seems. Heh, mind gleams, thinking of dual-wield Equalizer and Daystar against CE...

 

Let me see if I can build those use eff into the melee ability, and solve this... using IEEP, I'll toss in on the melee ability use EFF pre-target.

And I just realized that if they had made it +3, then applied a negatives, then it would only have taken 10 effects...

Well, that did not give any bonus at all. Bother. Oh, it seems IEEP sucks. OK, let's edit it with NI... And still no go. Bother. Maybe it should be "targetself"... well, that worked, except that it did not take effect until the SECOND swing, and, what's more, it still gave the effect to the off-hand weapon. yuck.

Next try: Instant/Limited time 1... not hopeful... yep, the effect went away again.

 

So, I think there might not BE a fix for it, or, more likely, I'm not clever enough to figure one out.

Link to comment

Damage effects can go to the melee ability as they only apply on a hit. THAC0 bonuses, OTOH, have to be global or you won't get the bonus until after you use them in melee--the second hit effect that WizWom observed. So, it's another fun game of 'which bug is more egregious?' :)

Link to comment

I would vote for addressing the damage aspect of things as that seems to be the easier of the two. Then just try and justify in your minds that when you wield some special sword it gives you some magical insight of where/when to strike a target it "hates" and this insight can be applied for the other weapon if dual wielding (or make up your own justification).

Link to comment

So if we take, for example, SW1H03.ITM (Bastard Sword +1, +3 vs Shapeshifters). What should be done is:

 

1) Remove 2 global effects "Use EFF File (177)", DOPPDAM.EFF and LYCANDAM.EFF

2) Instead add 2 melee effects "Damage vs Type bonus (179)", IDS targets: DOPPLEGANGER and LYCANTHROPE

 

Is that correct?

 

It seems the following list of items in unmodded game may all need to be fixed:

SW1H03.ITM, SW1H24.ITM, SW1H31.ITM, SW1H32.ITM, SW1H54.ITM, SW1H62.ITM, SW1H63.ITM, SW1H64.ITM, SW1H65.ITM
BLUN18.ITM, BLUN23.ITM
DAGG09.ITM
HAMM04.ITM, HAMM06.ITM
WAMACE.ITM

Link to comment
So if we take, for example, SW1H03.ITM (Bastard Sword +1, +3 vs Shapeshifters). What should be done is:

 

1) Remove 2 global effects "Use EFF File (177)", DOPPDAM.EFF and LYCANDAM.EFF

2) Instead add 2 melee effects "Damage vs Type bonus (179)", IDS targets: DOPPLEGANGER and LYCANTHROPE

Sure, but the effects really don't need to change--they just need to be attached to the melee ability instead of applied globally.

 

SW1H03.ITM, SW1H24.ITM, SW1H31.ITM, SW1H32.ITM, SW1H54.ITM, SW1H62.ITM, SW1H63.ITM, SW1H64.ITM, SW1H65.ITM
BLUN18.ITM, BLUN23.ITM
DAGG09.ITM
HAMM04.ITM, HAMM06.ITM
WAMACE.ITM

 

Well, I've got no excuse now. :)

Link to comment

edit: Yes, the Dwarven Thrower can be used in melee, though dual-use items like this can not be equipped in a dual-wield configuration anyway. Since it's already coded...

 

// damage bonuses v special shouldn't be applied globally
COPY_EXISTING ~blun18.itm~ ~override~ // skullcrusher
		  ~blun23.itm~ ~override~ // bone club +2/+3 v undead
		  ~dagg09.itm~ ~override~ // werebane
		  ~hamm04.itm~ ~override~ // hammer +1/+4 v giantkin
		  ~hamm06.itm~ ~override~ // dwarven thrower
		  ~sw1h03.itm~ ~override~ // bastard sword +1/+3 v shapeshifters
		  ~sw1h24.itm~ ~override~ // flame tongue
		  ~sw1h31.itm~ ~override~ // daystar
		  ~sw1h32.itm~ ~override~ // dragonslayer
		  ~sw1h54.itm~ ~override~ // equalizer
		  ~sw1h62.itm~ ~override~ // foebane
		  ~sw1h63.itm~ ~override~ // upgraded foebane
		  ~sw1h64.itm~ ~override~ // purifier
		  ~sw1h65.itm~ ~override~ // upgraded purifier
		  ~wamace.itm~ ~override~ // jerrod's mace
 PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
READ_LONG   0x64 "abil_off"
READ_SHORT  0x68 "abil_num"
READ_LONG   0x6a "fx_off"
READ_SHORT  0x70 "fx_num"
FOR (index2 = 0; index2 < fx_num; index2 = index2 + 1) BEGIN
  READ_SHORT ("%fx_off%" +		(0x30 * "%index2%")) "opcode"
  PATCH_IF ("%opcode%" = 177) BEGIN
	READ_ASCII ("%fx_off%" + 0x14 + (0x30 * "%index2%")) "resref"
	PATCH_IF (("%resref%" STRING_COMPARE_CASE "skullcr"	   = 0) OR // skullcrusher +2
			  ("%resref%" STRING_COMPARE_CASE "unddam1"	   = 0) OR // bone club +2, +3 v undead
			  ("%resref%" STRING_COMPARE_CASE "lycndam3"	  = 0) OR // werebane +1
			  ("%resref%" STRING_COMPARE_CASE "giantdam"	  = 0) OR // hammer +1/+4 v giantkin
			  ("%resref%" STRING_COMPARE_CASE "hamm06"		= 0) OR // dwarven thrower +3
			  ("%resref%" STRING_COMPARE_CASE "doppdam"	   = 0) OR // bastard sword +1/+3 v shapechangers
			  ("%resref%" STRING_COMPARE_CASE "lycandam"	  = 0) OR // bastard sword +1/+3 v shapechangers
			  ("%resref%" STRING_COMPARE_CASE "trolld1"	   = 0) OR // flame tongue
			  ("%resref%" STRING_COMPARE_CASE "evildam2"	  = 0) OR // daystar
			  ("%resref%" STRING_COMPARE_CASE "daystar1"	  = 0) OR // daystar
			  ("%resref%" STRING_COMPARE_CASE "sw1h32a"	   = 0) OR // dragonslayer +2
			  ("%resref%" STRING_COMPARE_CASE "damacea"	   = 0) OR // jerrod's mace
			  ("%resref%" STRING_COMPARE_REGEXP "ft[1-3]dam"  = 0) OR // flame tongue
			  ("%resref%" STRING_COMPARE_REGEXP "equal0[1-8]" = 0) OR // equalizer
			  ("%resref%" STRING_COMPARE_REGEXP "sw1h62[b-f]" = 0) OR // foebane, both normal and upgraded
			  ("%resref%" STRING_COMPARE_REGEXP "sw1h6[45]a"  = 0)) BEGIN // purifier, both normal and upgraded
	  READ_ASCII ("%fx_off%" +		(0x30 * "%index2%")) "clone" (48)
	  SET "delta" = (0 - 1)
	  FOR (index = 0; index < abil_num; index = index + 1) BEGIN
		READ_BYTE   ("%abil_off%" +		("%index%" * 0x38)) "type"
		READ_SHORT  ("%abil_off%" + 0x20 + ("%index%" * 0x38)) "abil_fx_idx"
		PATCH_IF (("%type%" = 1) OR ("%type%" = 2)) BEGIN // melee or ranged
		  READ_SHORT  ("%abil_off%" + 0x1e + ("%index%" * 0x38)) "abil_fx_num"
		  INSERT_BYTES			("%fx_off%" +		("%abil_fx_idx%" * 0x30)) 0x30
			WRITE_EVALUATED_ASCII ("%fx_off%" +		("%abil_fx_idx%" * 0x30)) "%clone%"
		  WRITE_SHORT ("%abil_off%" + 0x1e + ("%index%" * 0x38)) ("%abil_fx_num%" + 1)
		  WRITE_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x38)) ("%abil_fx_idx%" + "%delta%")
		  SET "delta" = ("%delta%" + 1)
		END ELSE BEGIN // if non-melee/ranged ability, only need to adjust effect indices
		  WRITE_SHORT ("%abil_off%" + 0x20 + ("%index%" * 0x38)) ("%abil_fx_idx%" + "%delta%")
		END
	  END
	  DELETE_BYTES ("%fx_off%" +		(0x30 * "%index2%")) 0x30
	  SET "fx_num" = ("%fx_num%" - 1)
	  SET "index2" = ("%index2%" - 1)
	END
  END
END
WRITE_SHORT 0x70 "%fx_num%"
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

I'm relocating this to General Discussion.

 

The fix ought to be revoked. I'd mentioned last time that the damage bonus will be absent on the first strike with a weapon modified in this way, and that's still true after double checking (and my previous post I deleted when I got too depressed to leave any of my blather standing, so no blame if it was never read).

 

It's worse though - these damage bonus versus type effects stick around after unequipping the weapon, despite the zero duration. They last until reload, you can equip a different weapon after bashing someone with The Equalizer and still get +1 damage versus chaotic neutral opponents - though the Equalizer has never worked correctly.

 

The effect is non-self cumulative, and someone who has a 32,767 damage versus type bonus versus anyone and a 1 damage versus type bonus versus Drizzt actually has a situational damage bonus of one. I'm not altogether clear yet whether the last effect to be applied always wins, or if something more complex is going on (it might be that targetting via different .ids files will allow multiple effects to coexist peaceably, if not stack - no holding breath over it though).

 

Grrr.

Link to comment

Do you mean that an Undead Hunter "loses" his +3 to hit/damage while wielding MoD or Daystar? ;)

 

If it is so than a pure fighter will benefit more from those weapons than someone who has specialized himself in killing specifically that type of monsters...really odd.

Link to comment

It's on my list of things to check, but I expect that the Undead Hunter kit boni will be replaced while wielding one of these items.

 

The damage bonus may be recoverable by moving it into a 0x0c effect called by .eff - it will display separately, and not use the equipped weapon's damage type, and not multiply on a critical hit or backstab, but it'll be there at least.

 

There's really nothing (that I can think of) we can do with THAC0 bonus versus type, which is also non-cumulative.

 

It deserves more discussion at least, and there are some byzantine solutions that most likely won't work but haven't been empirically ruled out.

Link to comment

Archived

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

×
×
  • Create New...