Jump to content

Photo

Undead creatures are erroneously immune to Lightning Bolt


No replies to this topic

#1 aVENGER_(RR)

aVENGER_(RR)
  • Modders
  • 1008 posts
  • Gender:Not Telling

Posted 21 May 2011 - 11:31 PM

As reported here. Judging by the adjacent entries, it seems like one of the developers made a typo and entered SPWI308 (Lightning Bolt) instead of SPWI306 (Hold Person) into the ring which grants undead creatures their innate immunities. Here's the fix:

// Undead creatures are erroneously immune to Lightning Bolt instead of Hold Person

COPY_EXISTING ~ring95.itm~ ~override~ // undead immunity ring
PATCH_IF (%SOURCE_SIZE% > 0x71) THEN BEGIN // file size sanity check
READ_LONG   0x6a "fx_off"
READ_SHORT  0x70 "fx_num"
  FOR (index = 0; index < fx_num; index = index + 1) BEGIN
	READ_SHORT ("%fx_off%" +		("%index%" * 0x30)) "opcode"
	READ_ASCII ("%fx_off%" + 0x14 + ("%index%" * 0x30)) "resref"
	PATCH_IF (("%opcode%" = 206) AND ("%resref%" STRING_EQUAL_CASE ~SPWI308~)) BEGIN // Lightning Bolt
	  WRITE_ASCII ("%fx_off%" + 0x14 + ("%index%" * 0x30)) "SPWI306" #8 // Hold Person
	END
  END
END
BUT_ONLY_IF_IT_CHANGES

Edited by aVENGER_(RR), 21 May 2011 - 11:53 PM.




Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users