Jump to content

Items with bonuses vs. X bugs


CamDawg

Recommended Posts

This started as looking to see if the Hammer +1, +4 vs. Giantkin fixes were relevant for BGEE, when I noticed a slight bug. Then I thought I'd check to see if the same bug was present in other items. Before I knew it, I was doing a pretty broad review of EFF files in all items. This is all based off aVENGER's 9.14 with core, GTU Light, and beta core installed.

 

First, Azuredge. Two damage EFFs are made for the extra undead damage--one slashing for melee attacks, one missile for ranged--but then the slashing one is used for both. Just swap the final FOR loop in the existing patch:

 

  FOR (i =  0; i < abil_num; ++i) BEGIN
READ_BYTE abil_off + i * 0x38 abil_type
PATCH_IF abil_type = 2 BEGIN				//ranged
  WRITE_SHORT abil_off + (i * 0x38) + 0x18 1			 //number of dice of damage (1d6)
  WRITE_BYTE  abil_off + (i * 0x38) + 0x26 THIS BOR BIT0 //allow strength bonus
  READ_SHORT  abil_off + (i * 0x38) + 0x1e "abil_fx_num"
  READ_SHORT  abil_off + (i * 0x38) + 0x20 "abil_fx_idx"
  WRITE_ASCII (((0x30 * (abil_fx_num + abil_fx_idx)) + fx_off) - 0x4c) ax1h10b
END
 END

 

A lot of one-handed weapons have their damage bonuses vs. X applied globally. For example, if you have skullcrusher in your off hand, suddenly your main hand weapon picks up extra damage vs. humanoids. These effects need to be moved to the melee/ranged header, targeted to X, and the EFF changed to straight damage. Since Wolfsbane and Kondar share an eff, one is created; targeting is also tightened for the dwarven thrower--currently it'll add damage to any GIANTHUMANOID, which includes trolls, instead of just ogres and giants.

 

 

// lycandam shared by wolfsbane amulet, kondar
COPY_EXISTING ~lycandam.eff~ ~override/cdsw1h03.eff~

// remove specific damage bonuses from one weapon bleeding to offhand/main weapon
// move global eff to melee/ranged headers
// no fix for thac0 bonus
COPY_EXISTING ~blun18.itm~   ~override~ // skullcrusher
		  ~blun23.itm~   ~override~ // bone club +2, +3 vs. undead
		  ~dagg09.itm~   ~override~ // silver dagger
		  ~hamm04.itm~   ~override~ // hammer +1, +4 vs. giantkin
		  ~phanblad.itm~ ~override~ // phantom blade
		  ~sw1h03.itm~   ~override~ // sword +1, +3 vs. shapeshifters
		  ~sw1h18.itm~   ~override~ // sword o' balduran
		  ~sw1h24.itm~   ~override~ // flame tongue
		  ~sw1h31.itm~   ~override~ // daystar
		  ~sw1h54.itm~   ~override~ // equalizer
		  ~sw1h62.itm~   ~override~ // foebane +3
		  ~sw1h63.itm~   ~override~ // foebane +5
		  ~sw1h64.itm~   ~override~ // purifier +4
		  ~sw1h65.itm~   ~override~ // purifier +5
		  ~wamace.itm~   ~override~ // foebane +5
 READ_LONG   0x64 "abil_off"
 READ_SHORT  0x68 "abil_num"
 READ_LONG   0x6a "fx_off"
 READ_SHORT  0x70 "fx_num"
 SET delta = 0
 FOR (index = 0 ; index < fx_num ; ++index) BEGIN
READ_SHORT ("%fx_off%" +		("%index%" * 0x30)) "type"
READ_ASCII ("%fx_off%" + 0x14 + ("%index%" * 0x30)) "eff_file"
PATCH_IF (("%type%" = 177) AND
		  (("%eff_file%" STRING_COMPARE_CASE "DAMACEA" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "DOPPDAM" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "EVILDAM2" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "GIANTDAM" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "LYCANDAM" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "LYCNDAM3" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "LYCNDAM4" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "PHANBLAD" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "SKULLCR" = 0) OR
		   ("%eff_file%" STRING_COMPARE_CASE "UNDDAM1" = 0) OR
		   ("%eff_file%" STRING_COMPARE_REGEXP "EQUAL0[1-8]" = 0) OR
		   ("%eff_file%" STRING_COMPARE_REGEXP "FT[1-3]DAM" = 0) OR
		   ("%eff_file%" STRING_COMPARE_REGEXP "SW1H6[45]A" = 0) OR
		   ("%eff_file%" STRING_COMPARE_REGEXP "SW1H62[bCDEF]" = 0))) BEGIN
  PATCH_IF ("%eff_file%" STRING_COMPARE_CASE "LYCANDAM" = 0) BEGIN
    WRITE_ASCII ("%fx_off%" + 0x14 + ("%index%" * 0x30)) "cdsw1h03"
  END
  READ_ASCII   ("%fx_off%" +		("%index%" * 0x30)) "clone" (48)
  DELETE_BYTES ("%fx_off%" +		("%index%" * 0x30)) 0x30
  SET fx_num = (fx_num - 1)
  SET delta  = (delta - 1)
  SET index  = (index - 1)
  INNER_ACTION BEGIN // lazy, just grab ids targeting from eff

	COPY_EXISTING ~%eff_file%.eff~ ~override~
	  READ_ASCII 0x1c "ids" (8)
	  BUT_ONLY

  END
  FOR (index2 = 0 ; index2 < abil_num ; index2 = index2 + 1) BEGIN
	READ_BYTE   ("%abil_off%" +		("%index2%" * 0x38)) "type"
	READ_SHORT  ("%abil_off%" + 0x20 + ("%index2%" * 0x38)) "abil_fx_idx"
	SET "abil_fx_idx" = "%abil_fx_idx%" + "%delta%"
	WRITE_SHORT ("%abil_off%" + 0x20 + ("%index2%" * 0x38)) "%abil_fx_idx%"
	PATCH_IF (("%type%" = 1) OR ("%type%" = 2)) BEGIN
	  INSERT_BYTES (fx_off +		(0x30 * abil_fx_idx)) 0x30
	  WRITE_ASCIIE (fx_off +		(0x30 * abil_fx_idx)) "%clone%"
	  WRITE_SHORT  (fx_off +		(0x30 * abil_fx_idx)) 177	 // use eff
	  WRITE_BYTE   (fx_off + 0x02 + (0x30 * abil_fx_idx))   2	 // preset target
	  WRITE_ASCIIE (fx_off + 0x04 + (0x30 * abil_fx_idx)) "%ids%" // ids target from eff
	  WRITE_BYTE   (fx_off + 0x0c + (0x30 * abil_fx_idx))   1	 // instant/perm
	  READ_SHORT  ("%abil_off%" + 0x1e + ("%index2%" * 0x38)) "abil_fx_num"
	  WRITE_SHORT ("%abil_off%" + 0x1e + ("%index2%" * 0x38)) ("%abil_fx_num%" + 1)
	  SET delta = (delta + 1)
	END
  END
END
 END
 WRITE_SHORT  0x70 "%fx_num%"
 BUT_ONLY

// since targeting is changing, patch separately
COPY_EXISTING ~hamm06.itm~ ~override~ // dwarven thrower
 LPF DELETE_ITEM_EQEFFECT INT_VAR opcode_to_delete = 177 END
 PATCH_FOR_EACH race IN 142 113 BEGIN // giants and ogres
LPF ADD_ITEM_EFFECT INT_VAR
  opcode		= 177		// use eff
  target		= 2		  // preset target
  timing		= 1		  // instant/perm
  parameter1	= "%race%"   // races from
  parameter2	= 4		  // race.ids
  type		  = 99		 // gets melee and ranged
  STR_VAR resource = "hamm06"
END
 END

// now patch effs from above to do damage directly instead of damage vs. type (damage matches weapon)
ACTION_DEFINE_ASSOCIATIVE_ARRAY cd_effing_effs BEGIN
 cdsw1h03 => 256 // new eff for bastard sword +1, +3 vs. shapeshifters
 damacea  =>   0 // jerrod's mace
 doppdam  => 256 // bastard sword +1, +3 vs. shapeshifters
 equal01  => 256 // equalizer
 equal02  => 256 // equalizer
 equal03  => 256 // equalizer
 equal04  => 256 // equalizer
 equal05  => 256 // equalizer
 equal06  => 256 // equalizer
 equal07  => 256 // equalizer
 equal08  => 256 // equalizer
 evildam2 => 256 // daystar
 ft1dam   => 256 // flame tongue
 ft2dam   => 256 // flame tongue
 ft3dam   => 256 // flame tongue
 giantdam =>   0 // hammer +1, +4 vs giantkin
 hamm06   =>   0 // dwarven thrower
 lycndam3 =>  16 // silver dagger
 phanblad => 256 // phantom blade
 skullcr  =>   0 // skullcrusher's eff
 sw1h62b  => 256 // foebane(s)
 sw1h62c  => 256 // foebane(s)
 sw1h62d  => 256 // foebane(s)
 sw1h62e  => 256 // foebane(s)
 sw1h62f  => 256 // foebane(s)
 sw1h64a  => 256 // purifier +4
 sw1h65a  => 256 // purifier +5
 unddam1  =>   0 // bone club eff
END

ACTION_PHP_EACH cd_effing_effs AS eff => damtype BEGIN

 ACTION_IF FILE_EXISTS_IN_GAME "%eff%.eff" BEGIN

COPY_EXISTING "%eff%.eff" override
  WRITE_LONG  0x10 12		   // change to damage
  WRITE_SHORT 0x20  0		   // normal
  WRITE_SHORT 0x22  "%damtype%" // damage type
  READ_LONG   0x60 "dam"		// read and move
  WRITE_LONG  0x60 0			// from here
  WRITE_LONG  0x1c "%dam%"	  // to there

 END

END

 

 

Deva weapons have the same issues as the old IMoD, specifically the undead destroyed string never played due to EFF ordering.

 

// deva needs to have mesdie fire before die
COPY_EXISTING ~deva.itm~ ~override~
 LAUNCH_PATCH_FUNCTION ~DELETE_ITEM_EFFECT~ INT_VAR "opcode_to_delete" = "177" header = "1" END // delete existing 177
 PATCH_FOR_EACH resref IN cddisr die mesdie BEGIN // three for undead and
LPF ADD_ITEM_EFFECT INT_VAR
  type		 = 1   // melee
  opcode	   = 177 // use eff
  target	   = 2   // preset target
  parameter1   = 4   // undead
  parameter2   = 3   // general.ids
  timing	   = 1   // instant perm
  insert_point = 0   // first effect
  STR_VAR resource = EVAL "%resref%" // eff from list
END
 END
 LPF ADD_ITEM_EFFECT INT_VAR
type		 = 1   // melee
opcode	   = 177 // use eff
target	   = 2   // preset target
parameter1   = 7   // illusion
parameter2   = 7   // gender.ids
timing	   = 1   // instant perm
insert_point = 0   // first effect
STR_VAR resource = "die" // eff from list
 END
 BUT_ONLY

 

Wisp, some items for the GTU lght--Crom Faeyr (60863) does an undocumented 5 points of electrical damage and Kondar (7345) provides an undocumented +2 to hit shapeshifters.

 

Noted but not coded fixes for yet: Sol's Searing Orb is supposed to blind undead for 12 rounds; undead damage for both Runehammers is wrong.

Link to comment

Runehammers are supposed to cause double damage to undead; Runehammer +4 is doing 2d4+4 base + 1d6+1 from cddisr.eff and Runehammer +5 is doing 2d4+5 base + 1d6+1 from cddisr.eff. A pair of new effs and changed ref should fix:

 

// runehammer undead damage incorrect
COPY_EXISTING ~hamm10.itm~ ~override~
		  ~hamm11.itm~ ~override~
 READ_LONG   0x64 "abil_off" ELSE 0
 READ_SHORT  0x68 "abil_num" ELSE 0
 READ_LONG   0x6a "fx_off" ELSE 0
 FOR (index2 = 0 ; index2 < abil_num ; index2 = index2 + 1) BEGIN
   READ_BYTE   ("%abil_off%" +	    ("%index2%" * 0x38)) "type"
   READ_SHORT  ("%abil_off%" + 0x20 + ("%index2%" * 0x38)) "abil_fx_idx"
   READ_SHORT  ("%abil_off%" + 0x1e + ("%index2%" * 0x38)) "abil_fx_num"
   PATCH_IF (("%type%" = 1) OR ("%type%" = 2)) BEGIN // melee ability check
  FOR (index3 = 0 ; index3 < abil_fx_num ; index3 = index3 + 1) BEGIN
    READ_SHORT ("%fx_off%" +	    (("%abil_fx_idx%" + "%index3%") * 0x30)) "opcode"
    READ_ASCII ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + "%index3%") * 0x30)) "eff_file"
    PATCH_IF (("%opcode%" = 177) AND ("%eff_file%" STRING_COMPARE_CASE "cddisr" = 0)) BEGIN
	  WRITE_ASCIIE ("%fx_off%" + 0x14 + (("%abil_fx_idx%" + "%index3%") * 0x30)) "%SOURCE_RES%" #8
    END
  END
   END
 END
 BUT_ONLY

COPY_EXISTING ~cddisr.eff~ ~override/hamm10.eff~
 WRITE_LONG 0x38 2 // 2d
 WRITE_LONG 0x3c 4 // 4
 WRITE_LONG 0x1c 4 // +4

COPY_EXISTING ~hamm10.eff~ ~override/hamm11.eff~
 WRITE_LONG 0x1c 5 // +5,

 

Per its descript, Sol's Searing Orb should be blinding undead for 6 rounds, 12 on a failed save:

 

// sol's searing orb - undead blindness should be 6 rounds, 12 on failed save
COPY_EXISTING ~sorb.itm~ ~override~
 LAUNCH_PATCH_FUNCTION ~DELETE_ITEM_EFFECT~ INT_VAR "opcode_to_delete" = 177 header = 1 END // delete existing 177s
 LPF ADD_ITEM_EFFECT INT_VAR
   opcode	   = 177 // use eff
   target	   = 2   // preset target
   power	    = 6   // power
   parameter1   = 4   // undead
   parameter2   = 3   // general.ids
   timing	   = 1   // instant perm
   type		 = 2   // add to ranged
   STR_VAR resource = "udead66" // damage
 END
 FOR (index = 0 ; index < 2 ; ++index) BEGIN
   LPF ADD_ITEM_EFFECT INT_VAR
  opcode	   = 177 // use eff
  target	   = 2   // preset target
  power	    = 6   // power
  parameter1   = 4   // undead
  parameter2   = 3   // general.ids
  timing	   = (3 * index) // instant/lim or delay/lim
  savingthrow  = index // no save, save vs spells
  duration	 = 36    // duration
  type		 = 2	 // add to ranged
  STR_VAR resource = "udeadbli" // blind
   END
 END

COPY_EXISTING ~udeadbli.eff~ ~override~
 WRITE_LONG 0x28 36 // duration
 BUT_ONLY

Link to comment

A bit belatedly, but the EFF screwup on Azuredge was fixed in this commit (authored just after 3.14).

Cheers, but there's also a minor (and currently harmless) bug in the final FOR loop--the changes are always being applied to the first ability header (which happens to be the correct one).

Link to comment

I blame violent video games.

 

Fix: replace the whole loop with this:

GET_OFFSET_ARRAY ab_array ITM_V10_HEADERS
 PHP_EACH ab_array AS i => o BEGIN
   PATCH_IF BYTE_AT o = 2 BEGIN	   //ranged
  WRITE_SHORT o + 0x18 1		   //number of dice of damage (1d6)
  WRITE_BYTE  o + 0x26 THIS | BIT0 //allow strength bonus
   END
 END

Link to comment

I'm afraid this problem is not fully resolved yet. I discovered the issues with the Bonuses vs. Creature Type effects some time ago myself, in a different way with other ramifications. CamDawg, I would need you to put the patch code you've posted so far aside for a moment and consider my following explanations, because I believe we have to make this fix a little more comprehensive than it is right now.

 

The central question is whether and which Bonuses vs. Creature Types are supposed to be global effects or ability effects. As we will see, this is trickier than expected. Here's the unorganized roundup of all my observations:

  • As CamDawg has stated, if a one-handed weapon deals additional damage vs. a creature type and this is implemented as a global effect, then the additional damage spills over to the main hand if two weapons are wielded. However, thinking of this problem as a one-handed weapons issue because only then it becomes visible is short-sighted. I am generally asking myself: Shouldn't a weapon's attack bonuses be limited only to the attack itself, instead of being applied globally to the character (as if the weapon was an amulet, e.g. amul18 (wolfsbane charm))? In principle, that goes for EVERY weapon with bonuses vs. creature types, including two-handed ones.
  • Now for the fun part. Applying those bonuses as global effects actually has another unwanted consequence, which occurs regardless of the weapon type! Short version: Kit-specific bonuses against creatures do not stack with identical bonuses from a weapon's global effects. Long version: Take a paladin with the kit undead hunter. The kit grants a permanent +3 bonus to damage and thac0 vs. undead. If you attack an undead creature, say shadow01.cre, with a long sword +1, the undead hunter gets the +3 kit bonus for a total of +4 to thac0 and damage (+1 weapon, +3 kit). Now let that same paladin attack the same shadow using sw1h24 (flame tongue +1). The paladin's bonuses are gone. Instead, the weapon's own +3 additional bonuses to damage and thac0 vs. undead apply, thereby leading to an overall thac0/damage bonus of +4 again (this time +4 weapon, +0 kit) when it should be +7 (+4 weapon, +3 kit). I assume this is because the kit bonuses use the same effects (178: thac0 vs. type and 179: damage vs. type) as the weapon does in its global effects. The same thing happens with the cavalier's bonuses vs. demons if the character wields jerrod's mace for instance, and so forth. I've tested this extensively. Both damage and thac0 bonuses from a kit are always overwritten with the bonuses granted by the weapon. If the weapon only has a damage bonus, then of course the kit's thac0 bonus stays in place. Furthermore, if for instance an undead hunter uses blun23 (bone club), his bonuses vs. undead are effectively lowered, because the club only grants +1 additional thac0/damage vs. undead, which is lower than the undead hunter's innate +3 bonus. (Careful though if you want to test this yourself: The bone club's +1 thac0 bonus vs. undead (undhit1.eff) happens to be bugged at the moment, we'll come back to that later.) By the way, the ranger's racial enemy is not visibly affected in the same way: I made a ranger with lycanthrope as racial enemy and the ranger's innate +4 bonus stacks neatly with Kondar's (sw1h03) +2 damage/thac0 bonuses vs. shapeshifters when attacking werewo01.cre. So the racial enemy bonuses happen to be different from the global effect of the weapon.
  • The bonuses vs. lycanthropes granted by the wolfsbane charm (amul18) do not stack with the additional damage/thac0 from Kondar (sw1h03), the silver dagger (dagg09) or the Sword of Balduran (sw1h18), again presumably because only one of these effect types can be active. If a character wields any of those weapons while wearing the amulet, only one of the bonuses is applied. Needless to say that if you wear amul18 and dual-wield Kondar and Balduran's ... I'll leave it alone.
  • Furthermore, given my findings so far, I say that in any case, the thac0 bonuses should be fixed as well, not just the damage bonuses. Since I believe CamDawg would have figured that already, I wonder: Is there something standing in the way of transforming the thac0 bonuses to somehow be applied as part of the abilities?
  • Finally, there's another reason why both 1H and 2H weapons should be treated equally: When the damage bonus is moved to the ability header, this damage will henceforth be displayed separately during combat. For consistency, all weapons with these damage types should display the additional damage the same way.

Now, it should be rather obvious to conclude that what we have to do is to change the global effects on all weapons with bonuses vs. creature types to apply the damage and thac0 bonuses within the melee/ranged ability, like CamDawg has started coding up. However, there might be some concerns with this method as well. Don't get me wrong, I completely welcome the change, but I want to remark the following things:

  • Since I've done the same legwork as CamDawg and identified all weapons with bonuses vs. creature types, I have a complete list now. Conclusion: There are a total of 28 items granting bonuses vs. creature types: one amulet (amul18) and 27 weapons. Of those 27 weapons, only 9 weapons have (part of) their damage bonuses applied within the abilities, the rest currently uses global effects. As stated previously, if the damage bonuses are moved to the abilities, the combat feedback will change. When battling the respective creatures, the bonus damage will display as an additional string, like elemental damage, instead of being part of the overall damage figure. Now I'm completely cool with this, and some of the items have always displayed the bonus damage this way, but nevertheless we just need to be aware that it will notably change the feedback.
  • Secondly, when the bonus damage is not a global effect and thus not part of the one single damage dealt, a critical hit won't double the bonus damage anymore, which currently is the case. Again, I don't find this controversial, but we need to acknowledge that our change has this effect on the gameplay.

So, how do we proceed? I'd like you guys to consider my findings. From my point of view, I suggest we make sure that all of the 27 weapons have their damage bonuses applied in the same way as part of their abilities, and the same goes for the thac0 bonuses if that's possible. Once the way to go is set, I can provide my documentation about which (additional) items need which adjustments. I also found a whole bunch of bugs in various of the associated .eff files, which I will reveal once I know how we're going to handle the bonuses vs. types. First things first.

Link to comment

Hurricane, you will never be allowed near the Fixpack docs. :) I'm going to ruthlessly hack apart your post for brevity:

 

Furthermore, given my findings so far, I say that in any case, the thac0 bonuses should be fixed as well, not just the damage bonuses. Since I believe CamDawg would have figured that already, I wonder: Is there something standing in the way of transforming the thac0 bonuses to somehow be applied as part of the abilities?

There's no way to fix the thac0 problems AFAICT.

 

However, thinking of this problem as a one-handed weapons issue because only then it becomes visible is short-sighted ... there's another reason why both 1H and 2H weapons should be treated equally: When the damage bonus is moved to the ability header, this damage will henceforth be displayed separately during combat. For consistency, all weapons with these damage types should display the additional damage the same way.

I ignored the two-handers like Carsomyr because, in general, damage vs. type is a much better solution than damage screened by EFF and I was trying to keep the changes minimal. However, given...

 

Kit-specific bonuses against creatures do not stack with identical bonuses from a weapon's global effects. ... Both damage and thac0 bonuses from a kit are always overwritten with the bonuses granted by the weapon ... The bonuses vs. lycanthropes granted by the wolfsbane charm (amul18) do not stack with the additional damage/thac0 from Kondar (sw1h03), the silver dagger (dagg09) or the Sword of Balduran (sw1h18), again presumably because only one of these effect types can be active.

 

Secondly, when the bonus damage is not a global effect and thus not part of the one single damage dealt, a critical hit won't double the bonus damage anymore, which currently is the case. Again, I don't find this controversial, but we need to acknowledge that our change has this effect on the gameplay.

 

...this becomes a much broader and nasty issue. Having two different approaches doesn't bother me too much, as Bioware did it willy nilly (i.e. Daystar vs. Dragonslayer), though it does have an effect on spellcasting interruption (another point for damage vs. type).

 

This looks like a golden opportunity for a Fixpack Free-for-all, so let's set the terms:

  1. Change all weapon-based damage vs. type to bonus damage on melee hits. Cons: The bonus damage is no longer subject to critical hit bonuses; separating the damage affects spellcasting interruption. Pros: Offhand damage bonuses no longer apply to main hand (and vice versa); bonus damage can stack properly with other items or kit abilities.
  2. Do nothing. Pros and cons opposite of above.
  3. Make changes for one-handed weapons only. Pros and cons from approach one only apply to one-handed weapons such as Daystar and not for, say, Carsomyr or the Flame of the North.

I've got my opinion, but I'll withhold it until we can get some discussion going.

 

// carsomyr - damage applied globally, ignore (2h, unused)
// chevil10 - damage applied globally, ignore (undroppable sarevok weapon)
// halb04 - damage applied globally, ignore (2h)
// hsword - damage applied globally, ignore (unused)
// sw2h10 - damage applied globally, ignore (2h)
// sw2h12 - damage applied globally, ignore (2h)
// sw2h19 - damage applied globally, ignore (2h)

Link to comment

I will just throw in and say that Option 3 looks the best to me. Looks like a real mess though... and I would prefer to NOT do nothing... would miss the criticals with those weapons. Perhaps my lack of insight will get the ball rolling:)

Link to comment

Hurricane, you will never be allowed near the Fixpack docs. :) I'm going to ruthlessly hack apart your post for brevity

You may hack away as you please. :D That post wasn't all that long though, I'm generally capable of much more monstrous stuff! :p

 

// carsomyr - damage applied globally, ignore (2h, unused)
// chevil10 - damage applied globally, ignore (undroppable sarevok weapon)
// halb04 - damage applied globally, ignore (2h)
// hsword - damage applied globally, ignore (unused)
// sw2h10 - damage applied globally, ignore (2h)
// sw2h12 - damage applied globally, ignore (2h)
// sw2h19 - damage applied globally, ignore (2h)

Huh, I missed the unused/undroppable ones. Weapon's count changed to 30.

 

There's no way to fix the thac0 problems AFAICT.

Bummer. If CamDawg says AFAICT, you know it's for real. Guess I'll just have to live with it.

 

As for the damage, here's my reasoning:

 

There are two things I hate. One is stuff not working as intended (bugs), which disallows the "do nothing" option, and two is equal things not being treated equally (inconsistency), which is what kills the third option.

 

I believe changing the damage vs. type of all weapons to be part of the melee ability is the best solution. However, lacking the insight, I don't understand why this affects the spell interruption behavior, and didn't think of it as an issue. Maybe someone can enlighten me? But regardless of my ignorance, doesn't the same behavior also occur in the prominent case of elemental damage, anyway?

 

Spell interruption aside, the first option is superior in every other way.

  • Think about it: With the bonus damage currently being applied globally, we have identified two ACTUAL bugs (non-stacking and character-wide application of the bonus damage) that need holistic fixing. To me, that alone already trumps every other consideration. If we nonetheless decided to go with the third instead of the first option, we would willfully accept that we don't actually resolve the issue.
  • Furthermore, remember that some of the weapons' bonus damages are a range, not a flat number (azuredge, both runehammers, both maces of disruption, dragonslayer, daystar). Damage ranges cannot be applied as global effects. Those weapons have always used and will continue to use the ability header to apply their bonus damages. Hence I don't see the controversy in changing the other, similar weapons with exactly the same type of bonus damage to act exactly the same way.
  • Having thought about the critical damage behavior independently, I've come to think that the additional damage vs. creature type should be separated from the ordinary damage even if the global effects issues weren't present. In other words, the doubling bonus damage itself is wrong in the first place. Basic question: What's a critical hit? Answer: Catching the opponent off-guard, thus being able to physically strike more severely for above-average damage. What's the bonus damage vs. type? An additional amount of damage the weapon ITSELF causes when used against a specific creature, regardless of the actual strike. The bonus damage originates from the weapon's magical nature - it is not caused by the weapon's physique (except maybe flame tongue ... :D). Hence it cannot be doubled by physically striking more severely. It's an innate, specified bonus damage that should not be confused with the weapon's ordinary damage, which depends on how the wielder wields the weapon. Can everyone see now how absurd it is that this magically specified bonus damage would suddenly increase due to a critical hit? And then, on the other hand, again there are those weapons with a damage range, which never double their bonus damage anyway when a critical hit occurs, and we don't mind or even notice that particular behavior because we're used to it with those weapons. So why do we accept the other weapons' deviating critical hit behavior? Overall, it actually makes perfect sense to have the bonus damage separated from the normal damage, and have it not doubled in case of a critical hit.

Link to comment

With G3 being back online (thanks guys :)), I can finally return to the discussion. CamDawg, in case you haven't already noticed, I sent you a PM at SHS which is redundant now.

 

I see the transformation of the damage bonuses from global effects to ability effects is complete now since Fixpack v9.22 - thank you, CamDawg. Some of the items with bonuses against creatures have further issues, though. I've checked all properties and corresponding eff files and it turns out we have to fix a couple of remaining bugs. In some cases I am also not sure about the correct values. Let's go through the following list to assess which adjustments are necessary.

 

(Note: Please don't be confused by the many queries about the effs having "target = 0" and "timing = 2". I meticulously listed those properties only because I don't know their correct values, with the bonus damages being ability effects now. This is always the same, one issue and can be settled easily.)

 

 

amul18.itm: Wolfsbane Charm

 

The description deviates from the effs (lycandam.eff and lycanhit.eff). It says +1, and not to damage & thac0 but to thac0 & AC. In BG1, the description says +2 to damage & thac0, reflecting the effs. Either change the effs or change the description. IMHO the BG1 stats are the correct ones.

 

Also, since this is an amulet and thus the effs are global effects, they still won't stack with similar bonuses from other sources. Is there anything else we can do in this case?

 

 

blun10.itm: The Root of the Problem

 

Concerning monstdam.eff, undeddam.eff, giandam.eff:

- The ability effect calling monstdam.eff uses dispel/resistance = 2, whereas the others use 0. What is correct here?

- All effs have the damage amount set to 3, this must be 2 (equals +3 with the basic +1 enchantment of the club).*

- Because they used to be globalfx in BG1: All effs have parameter3 = 2, this must be 0.

- Because they used to be globalfx in BG1: All effs have target = 0 (none), should this be 2 (preset target)?

 

*Note: I understand one could interpret the description of the item as giving an additional bonus of +3 (instead of +2) vs. unnatural creatures on top of the +1 enchantment, but judging from the item's effs in BG1, +2 is the correct interpretation. Also see the descriptions of Bone Club, Dragon's Bane, War Hammer vs. Giantkin, Rod of Smiting, Kondar, Daystar etc. for prove of consistency.

 

 

blun18.itm: Skullcrusher

 

- The ability effect calling skullcr.eff uses dispel/resistance = 2. Should this be 0?

 

 

blun23.itm: Bone Club

 

Concerning unddam1.eff:

- The ability effect calling unddam1.eff uses dispel/resistance = 2. Should this be 0?

- unddam1.eff has target = 0, should this be 2?

 

Concerning undhit1.eff:

- The global effect calling undhit1.eff uses dispel/resistance = 2. Should this be 0?

- Wrong IDS target: The second parameter (referenced IDS file) is 2, this must be 3.

- The timing mode is 1 (instant/permanent until death). Shouldn't this be 2 (while equipped) b/c it's a global effect?

 

 

dagg09.itm: Silver Dagger

 

Concerning lycndam3.eff:

- lycndam3.eff has target = 0, should this be 2?

- lycndam3.eff has timing = 2, should this be 1?

 

Concerning lycnhit3.eff:

- Wrong probability? It's 0%, should likely be 100%.

 

I'm not sure about the thac0 bonus. The original BG1 description clearly specifies the bonus to both damage and thac0 to be +3 (equaling "+4" together with the basic +1 enchantment). However, the thac0 bonus is gone in the BG2 description, and this may seem consistent with the "bug" of lycnhit3.eff having zero probability. Given that the BG2 description is messed up at other places as well though (damage figures), I suggest that we adhere to the BG1 description and fix lynchit3.eff. In that case, the BG2 description must be updated to include the additional thac0 bonus. Can you back me up?

 

 

halb04.itm: Dragon's Bane

 

- dragdam3.eff is also used by spcl221.spl. If the spell requires the eff to be opcode 179 instead of 12, we need a separate file.

 

 

hamm04.itm: War Hammer +1, +4 vs. Giantkin

 

- giantdam.eff has target = 0, should this be 2?

- giantdam.eff has timing = 2, should this be 1?

 

 

hamm06.itm: Dwarven Thrower

 

- The ranged ability requires its own effect in order to do missile bonus damage (same as Azuredge).

- hamm06.eff has target = 0, should this be 2?

- hamm06.eff has timing = 2, should this be 1?

 

Additionally, I think the description needs to be touched up slightly with respect to the +8 bonus damage. The "Statistics" state "Damage: 2D4 + 3, +8 damage to giants and ogres", which according to the traditional way of denoting bonus damages (see Root of the Problem and all the others) would mean a bonus of +5. However, this time the bonus damage is also mentioned in the item's story text, explicitly saying "additional +8 damage", thereby defining the bonus damage to be understood as separate from the 2D4+3 base damage, and this is also reflected by hamm06.eff doing 8 damage. For the sake of clarity, I would therefore suggest to do one of two things: Either add the word "extra" in the damage listing to make that distinction (see Flame of the North for instance), or change it to say "2D4 + 3, +11 damage to giants and ogres" like all the other weapons.

 

 

phanblad.itm: Phantom Blade

 

- The ability effect calling phanblad.eff uses dispel/resistance = 2. Should this be 0?

 

 

reaver.itm: Unholy Reaver (+5 damage vs. good-aligned creatures)

 

- The ability effect calling dam5.eff uses dispel/resistance = 1. Should this be 0?

- dam5.eff has damage type = magic, this must be slashing if we apply the "bonus dmg type = base dmg type" rule.

- The bonus damage is missing from the description.

 

 

rods04.itm: Rod of Smiting

 

No issues, just a Fixpack remark: The transfer of smitgol1.eff from global effect to ability effect was implemented in an earlier version of the Fixpack. The corresponding code is located somewhere among the other item file fixes. Since the procedure is exactly the same as for the effing effs, the fix should instead be integrated into the effing effs code where it now belongs.

 

 

sw1h03.itm: Kondar

 

Concerning cdsw1h03.eff, doppdam.eff:

- The switching of lycandam.eff to cdsw1h03.eff somehow doesn't work for me. cdsw1h03.eff is created but not used.

- The effs have target = 0, should this be 2?

- The effs have timing = 2, should this be 1?

 

Concerning lycanhit.eff, dopphit.eff:

- The thac0 bonus vs. shapeshifters is missing from the item's description.

 

With respect to the thac0 bonus, we can either add it to the description or remove both lycanhit.eff and dopphit.eff from the weapon in order to match the current description. Given that the effs have always been present in both BG1 and BG2, my take is that the thac0 bonus does belong to the weapon. Ergo I say we keep the effs and update the description to include the thac0 bonus vs. shapeshifters.

 

 

sw1h18.itm: Sword of Balduran

 

Concerning lycndam4.eff:

- The eff currently is still opcode 179 because it was forgotten in the cd_effing_effs array. ;)

 

Additionally, the bonus stats (both damage and thac0) were stripped entirely from the item's description in BG2 for no reason. See the BG1 description to restore the values.

 

 

sw1h24.itm: Flame Tongue

 

Concerning ft1dam.eff, ft2dam.eff, ft3dam.eff:

- The effs have target = 0, should this be 2?

- The effs have timing = 2, should this be 1?

 

Concerning trolld1.eff:

- Currently, trolld1.eff is still a global effect. It must be added to the effing effs patch code.

- Wrong IDS target: The second parameter (referenced IDS file) is 5, this must be 4.

- Bugged target: trolld1.eff has target = -1.

 

Concerning trollh1.eff:

- Wrong IDS target: The second parameter (referenced IDS file) is 5, this must be 4.

- Bugged target: trollh1.eff has target = -1.

- trollh1.eff has timing = 1. Shouldn't this be 2 b/c it's a global effect?

 

Concerning the description:

- Bonus against "fire creatures" is plain wrong. The BG1 description is correct (only cold-using creatures).

- All thac0 bonuses are missing.

- Hence, the correct description is:

 

THAC0: +1 bonus, +2 vs. regenerating creatures, +3 vs. cold-using creatures, +4 vs. undead

Damage: 1D8 + 1, +2 vs. regenerating creatures, +3 vs. cold-using creatures, +4 vs. undead

 

 

sw1h31.itm: Daystar

 

Concerning evildam2.eff:

- The ability effect calling evildam2.eff uses dispel/resistance = 2. Should this be 0?

- The eff has target = 0, should this be 2?

 

Concerning dbldead.eff:

- The ability effect calling dbldead.eff uses dispel/resistance = 2. Should this be 0?

- The eff has damage type = magic, this must be slashing if we apply the "bonus dmg type = base dmg type" rule.

 

Concerning daystar1.eff:

- Leftovers from vanilla: Dice thrown, dice sides, and parameter3 should all be zero.

- The eff has target = 0, should this be 2?

- The eff has timing = 2, should this be 1?

- Fixpack remark: Move the earlier code to transform daystar1.eff into an ability effect down to the effing effs code now?

 

Concerning daystar2.eff:

- The eff has damage type = magic, this must be slashing if we apply the "bonus dmg type = base dmg type" rule.

 

Concerning evilhit2.eff:

- The ability effect calling evilhit2.eff uses dispel/resistance = 2. Should this be 0?

- evilhit2.eff has timing = 1. Shouldn't this be 2 b/c it's a global effect?

 

 

sw1h32.itm: Dragonslayer

 

- sw1h32c.eff has parameter3 = 2, this must be 0.

 

 

sw1h54.itm: The Equalizer

 

Concerning equal01.eff through equal08.eff:

- The effs have target = 0, should this be 2?

- The effs have timing = 0 (limited), should this be 1?

 

Concerning equal09.eff through equal16.eff:

- The effs have timing = 0 (limited), should this be 1?

 

 

sw1h62.itm: Foebane +3

 

Concerning sw1h62b.eff through sw1h62f.eff:

- The effs have target = 0, should this be 2?

- The effs have timing = 2, should this be 1?

 

Description: Same problem as with the Dwarven Thrower. The "Damage: 2D4 + 3, +6 damage vs. undead, ..." implies that the bonus is only +3 when comparing this description to the other weapons. Change it to either "+6 extra damage vs. ..." or "+9 damage vs. ...". Alternatively, Foebane could also display the damage bonus separately under "Combat Abilities", same as similar items like the two Purifiers, Runehammers, Carsomyrs, or Maces of Disruption.

 

 

sw1h63.itm: Foebane +5

 

- Same description problem as Foebane +3 above: "Damage: 2D4 + 5, +6 damage vs. ..." implies +1.

 

 

sw1h64.itm: Purifier +4

 

- The ability effect calling sw1h64a.eff uses dispel/resistance = 2. Should this be 0?

- sw1h64a.eff has target = 0, should this be 2?

- sw1h64a.eff has timing = 2, should this be 1?

 

 

sw1h65.itm: Purifier +5

 

- The ability effect calling sw1h65a.eff uses dispel/resistance = 2. Should this be 0?

- sw1h65a.eff has target = 0, should this be 2?

- sw1h65a.eff has timing = 2, should this be 1?

 

 

sw2h10.itm: Carsomyr +5

 

- holyaven.eff has target = 0, should this be 2?

- holyaven.eff has timing = 0 (limited), should this be 1?

 

 

sw2h12.itm: Flame of the North

 

- flamenor.eff has target = 0, should this be 2?

- flamenor.eff has timing = 0 (limited), should this be 1?

 

 

sw2h19.itm: Carsomyr +6

 

- sw2h19a.eff has target = 0, should this be 2?

- sw2h19a.eff has timing = 0 (limited), should this be 1?

 

 

wamace.itm: Jerrod's Mace

 

Concerning damacea.eff:

- Bugged target: damacea.eff has target = -1.

- damacea.eff has Dice Sides = 8, this must be 0.

 

Concerning damaceb.eff:

- Bugged target: damaceb.eff has target = -1.

- damaceb.eff has Dice Sides = 8, this must be 0.

- damaceb.eff has timing = 1. Shouldn't this be 2 b/c it's a global effect?

 

Description: Same problem as with the Dwarven Thrower. Current display:

 

THAC0: +2 bonus, +5 vs. demons

Damage: 1D6 + 3, +5 vs. demons

 

What it should look like:

 

THAC0: +2 bonus, +7 vs. demons

Damage: 1D6 + 3, +8 vs. demons

 


And a final remark: I think there is an error in the comment preceding the effing effs patch code. The non-stacking opcodes are not 278 and 277 but 179 and 178, and the Fixpack fixes the problem with opcode 179.

Link to comment

A couple of broad notes before I go in, since a lot of these are recurring issues.

  • Dispel/resist values of 0 and 2 are functionally equivalent, since both can't be dispelled and bypass MR.
  • The timing in an EFF file is, I believe, overridden by the effect calling it. Repeatedly equipping the Bone Club with its permanently-timed undhit1.eff doesn't leave a bunch of effects on the wielder, for example, which it would if it wasn't behaving as instant/while equipped.
  • I believe the target in an EFF file behaves the same way, but this is something I need to double-check.

amul18.itm: Wolfsbane Charm

 

The description deviates from the effs (lycandam.eff and lycanhit.eff). It says +1, and not to damage & thac0 but to thac0 & AC. In BG1, the description says +2 to damage & thac0, reflecting the effs. Either change the effs or change the description. IMHO the BG1 stats are the correct ones.

 

Also, since this is an amulet and thus the effs are global effects, they still won't stack with similar bonuses from other sources. Is there anything else we can do in this case?

The only opcode that can provide a selective AC bonus is 219, which is hardcoded to be a +2 bonus. And there's no way to solve the stacking bonus--for weapons we can move the damage to the melee header and be done with it, but there's no way to do it here.

 

Well, the good news here--for me, at least--is that I can punt since this is unused in BG2.

 

blun10.itm: The Root of the Problem

 

Concerning monstdam.eff, undeddam.eff, giandam.eff:

- All effs have the damage amount set to 3, this must be 2 (equals +3 with the basic +1 enchantment of the club).*

- Because they used to be globalfx in BG1: All effs have parameter3 = 2, this must be 0.

Good catch on the damage.

 

blun23.itm: Bone Club

- Wrong IDS target: The second parameter (referenced IDS file) is 2, this must be 3.

I didn't notice anything amiss here. I think as long as the value from the IDS file is 0, I think it catches all values from the IDS file (which means everything).

 

dagg09.itm: Silver Dagger

 

Concerning lycndam3.eff:

- lycndam3.eff has target = 0, should this be 2?

- lycndam3.eff has timing = 2, should this be 1?

 

Concerning lycnhit3.eff:

- Wrong probability? It's 0%, should likely be 100%.

 

I'm not sure about the thac0 bonus. The original BG1 description clearly specifies the bonus to both damage and thac0 to be +3 (equaling "+4" together with the basic +1 enchantment). However, the thac0 bonus is gone in the BG2 description, and this may seem consistent with the "bug" of lycnhit3.eff having zero probability. Given that the BG2 description is messed up at other places as well though (damage figures), I suggest that we adhere to the BG1 description and fix lynchit3.eff. In that case, the BG2 description must be updated to include the additional thac0 bonus. Can you back me up?

Another punt here, as this is also unused in BG. It looks like they just changed the descript and then changed their mind--it's still 1d4+1 damage and +1 to hit, despite the description, with an extra +3 to-hit and damage for lycans once you fix lycnhit3.

 

halb04.itm: Dragon's Bane

 

- dragdam3.eff is also used by spcl221.spl. If the spell requires the eff to be opcode 179 instead of 12, we need a separate file.

Good catch. The halberd is now going to use cdhalb04 in place of dragdam3.

 

Still working on the rest.

Link to comment

Archived

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

×
×
  • Create New...