Jump to content

Bug while fixing Barbarian Rage


Wisp

Recommended Posts

In fixing the Barbarian Rage spell, Fixpack changes the old save vs. spell bonus effect from a -2 penalty to a +2 penalty. Additionally, it inserts two new effects. However, a mistake is made at this point, leading to some unintended results.

At line 18618 (v6.1) there is the following code:

	  PATCH_IF ("%opcode%" = 37) BEGIN // save v magic
	READ_ASCII  ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%"))) "clone" (48) // clone effect
	WRITE_LONG ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 2 // should be a +2 bonus not -2 penalty
	SET "index2" = ("%abil_fx_num%" - 1) // kills loop, advances insert point to right before last effect
	FOR (index3 = 0; index3 < 2; index3 = index3 + 1) BEGIN
	  INSERT_BYTES			("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0x30 // new effect
		WRITE_EVALUATED_ASCII ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "%clone%" #48 // use spell immunity as template
	END
	// write in opcodes and parameters for new effects
	WRITE_SHORT ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%" + 1))) 46  // opcode: unstun
	WRITE_BYTE  ("%fx_off%" + 0x0c + (0x30 * ("%abil_fx_idx%" + "%index2%" + 1))) 1   // timing: instant/permanent
	WRITE_SHORT ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%" + 2))) 240 // opcode: remove icon
	WRITE_LONG  ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 2))) 55  // icon: stun
	SET "fx_delta" = ("%fx_delta%" + 2)
	WRITE_SHORT  ("%abil_off%" + 0x1e + (0x28 * "%index%")) ("%abil_fx_num%" + 2)
  END

The result of this is that two copies of the old save vs. spell penalty are inserted, but only the second one is overwritten (by unstun). For the second effect (remove icon), the old Protection from spell (Rage) effect is unintentionally cannibalised.

 

If the relevant lines of code are change to the following, the fix should perform as intended:

		WRITE_SHORT ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%")))	 46  // opcode: unstun
	WRITE_BYTE  ("%fx_off%" + 0x0c + (0x30 * ("%abil_fx_idx%" + "%index2%")))	 1   // timing: instant/permanent
	WRITE_SHORT ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%" + 1))) 240 // opcode: remove icon
	WRITE_LONG  ("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%" + 1))) 55  // icon: stun

Additionally, it would appear as if Rage does not get its disable string (Stunned) effect for some reason.

Link to comment
Guest temujin.
Now, where to find someone willing to mantain and update the .tp2 updating project that Nythrun started many months ago?

i don't understand why devSin doesn't show any interest in putting up a more updated tp2. he used to be an eccentric, quality poster and probably the only remaining hope.

 

the fixpack is NOT a mod that should remain inactive for this long especially when there are still bugs floating around. it's just a matter of tying up a few remaining loose ends.

 

come on Mr. Sin, don't be like that... :)

Link to comment

Archived

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

×
×
  • Create New...