Jump to content

Foebane


Guest Naleem

Recommended Posts

Guest Naleem

Hi, I have a slight problem with upgraded Foebane.

 

The Larloch's Minor Drain it casts seems to be doing 1-4 dmg instead of full 4 dmg as the mage version.

 

I have no other mods aside from FixPack installed.

 

 

Also, I'd prefer if Foebane's LMD bypassed the target's MR, could anyone please tell me how to accomplish this? My editing skills are almost non-existant and I have no idea how to alter it.

 

Thank you :-)

Link to comment
The Larloch's Minor Drain it casts seems to be doing 1-4 dmg instead of full 4 dmg as the mage version.

Ooh, nice catch. The problem is actually with the underlying spell. The innate Bhaalspawn LMD does 1d4 damage instead of the fixed 4 (it correctly adds a fixed 4hp to the caster).

 

// innate LMD should do fixed damage of 4, not 1d4
COPY_EXISTING ~spin104a.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 // fix existing effects
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_SHORT ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
  READ_ASCII ("%fx_off%" + 0x14 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "spell"
  PATCH_IF ("%opcode%" = 12) BEGIN // damage opcode
	WRITE_LONG  ("%fx_off%" + 0x04 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 4 // fixed damage
	WRITE_LONG  ("%fx_off%" + 0x1c + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 0 // number of dice
  END
END
 END
 BUT_ONLY_IF_IT_CHANGES

 

Also, I'd prefer if Foebane's LMD bypassed the target's MR, could anyone please tell me how to accomplish this? My editing skills are almost non-existant and I have no idea how to alter it.

'round about line 17,263 in setup-bg2fixpack.tp2, find and remove (or comment out) this block of code:

 

// foebane's LMD is bypassing MR
COPY_EXISTING ~sw1h63.itm~ ~override~
 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"
SET "delta" = 0
SET "loops" = 0
WHILE ("%loops%" < "%abil_num%") BEGIN
  SET "delta1" = 0
  READ_BYTE  ("%abil_off%" +		("%loops%" * 0x38)) "type"
  READ_SHORT ("%abil_off%" + 0x1e + ("%loops%" * 0x38)) "abil_fx_num"
  READ_SHORT ("%abil_off%" + 0x20 + ("%loops%" * 0x38)) "abil_fx_idx"
  SET "abil_fx_idx" = ("%abil_fx_idx%" + "%delta%")
  WRITE_SHORT  ("%abil_off%" + 0x20 + ("%loops%" * 0x38)) "%abil_fx_idx%"
  PATCH_IF ("%type%" = 1) BEGIN // melee
	DELETE_BYTES ("%fx_off%" + (0x30 * "%abil_fx_idx%")) (0x30 * "%abil_fx_num%") // removes all old effects
	SET "delta1" = (1 - "%abil_fx_num%")
	INSERT_BYTES  ("%fx_off%" +		(0x30 * "%abil_fx_idx%")) 0x30	   // new effect
	  WRITE_SHORT ("%fx_off%" +		(0x30 * "%abil_fx_idx%")) 146		// cast spell
	  WRITE_BYTE  ("%fx_off%" + 0x02 + (0x30 * "%abil_fx_idx%")) 2		  // target: self
	  WRITE_BYTE  ("%fx_off%" + 0x03 + (0x30 * "%abil_fx_idx%")) 1		  // power
	  WRITE_LONG  ("%fx_off%" + 0x04 + (0x30 * "%abil_fx_idx%")) 1		  // cast at level
	  WRITE_LONG  ("%fx_off%" + 0x08 + (0x30 * "%abil_fx_idx%")) 1		  // cast instantly
	  WRITE_BYTE  ("%fx_off%" + 0x0d + (0x30 * "%abil_fx_idx%")) 1		  // dispel/not bypass resistance
	  WRITE_LONG  ("%fx_off%" + 0x0e + (0x30 * "%abil_fx_idx%")) 1		  // duration
	  WRITE_BYTE  ("%fx_off%" + 0x12 + (0x30 * "%abil_fx_idx%")) 100		// probability
	  WRITE_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~spin104a~ // spell
  END
  SET "abil_fx_num" = ("%abil_fx_num%" + "%delta1%")
  WRITE_SHORT  ("%abil_off%" + 0x1e + ("%loops%" * 0x38)) "%abil_fx_num%"
  SET "delta" = ("%delta%" + "%delta1%")
  SET "loops" = ("%loops%" + 1)
END
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

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

×
×
  • Create New...