Jump to content

Items lacking Display string effects


Wisp

Recommended Posts

The Stiletto of Demarchess +2 has a chance of inflicting Hold upon the target and Darts of Stunning has a chance of stunning the target. Neither have any Display string effects.

 

Working under the assumption that this is something you would want to have in the Fixpack, I took the time to write a simple fix. The code assumes that the items are in vanilla shape and would probably mess them up if they are not. Additionally, both items are treated at the same time. If any of this needs to be changed, I can rewrite it (or you can simply disregard me and modify it yourselves or write your own fix, whichever you prefer).

 

If someone affiliated with the Fixpack would prefer it if I merely stuck to reporting bugs and left the coding to someone who knows what (s)he is doing, they have but to say so.

 

(The code could be condensed more, but I think it looks better this way.)

COPY_EXISTING ~dagg17.itm~ ~override~ // Stiletto of Demarchess +2
		  ~dart03.itm~ ~override~ // Dart of Stunning
 READ_LONG  0x64 abil_off ELSE 0
 READ_SHORT 0x68 abil_num ELSE 0
 READ_LONG  0x6a fx_off   ELSE 0
 FOR (index = 0; index < abil_num; index += 1) BEGIN
READ_SHORT (%abil_off% + 0x1e + (0x38 * %index%)) abil_fx_num
READ_SHORT (%abil_off% + 0x20 + (0x38 * %index%)) abil_fx_idx
FOR (index2 = 0; index2 < abil_fx_num; index2 += 1) BEGIN
  READ_SHORT   (%fx_off% + 0x30 * (%abil_fx_idx% + %index2%)) opcode
  PATCH_IF %opcode% = 109 BEGIN //Opcode is Hold
	READ_ASCII (%fx_off% + 0x30 * (%abil_fx_idx% + %index2%)) clone (0x30)
	INSERT_BYTES   (%fx_off%	   + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) 0x30
	  WRITE_ASCIIE (%fx_off%	   + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) "%clone%" //Clones effect
	  WRITE_SHORT  (%fx_off%	   + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) 139 //Display string
	  WRITE_LONG   (%fx_off% + 0x4 + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) 14102 //Held
	  WRITE_BYTE   (%fx_off% + 0xc + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) 1 //Instant/Permanent
	SET abil_fx_num += 1
	SET index2 = %abil_fx_num%
  END
  PATCH_IF %opcode% = 45  BEGIN //Opcode is Stun
	READ_ASCII (%fx_off% + 0x30 * (%abil_fx_idx% + %index2%)) clone (0x30)
	INSERT_BYTES   (%fx_off%	   + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) 0x30
	  WRITE_ASCIIE (%fx_off%	   + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) "%clone%" //Clones effect
	  WRITE_SHORT  (%fx_off%	   + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) 139 //Display string
	  WRITE_LONG   (%fx_off% + 0x4 + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) 1280 //Stunned
	  WRITE_BYTE   (%fx_off% + 0xc + 0x30 * (%abil_fx_idx% + %abil_fx_num%)) 1 //Instant/Permanent
	SET abil_fx_num += 1
	SET index2 = %abil_fx_num%
  END
  WRITE_SHORT (%abil_off% + 0x1e + (0x38 * %index%)) %abil_fx_num%
END
 END
 BUT_ONLY
Link to comment

Archived

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

×
×
  • Create New...