Jump to content

Plant Growth


Recommended Posts

One of the wild surges causes entangle and is also not setting a portrait icon. Fixed as follows:

 

// entangle effects not setting entangle icon
COPY_EXISTING ~spin688.spl~ ~override~
		  ~spwm111.spl~ ~override~
 READ_LONG  0x64 "abil_off" ELSE 0
 READ_SHORT 0x68 "abil_num" ELSE 0
 READ_LONG  0x6a "fx_off"   ELSE 0
 SET "delta" = 0
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN
READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
SET "abil_fx_idx" = ("%abil_fx_idx%" + "%delta%")
WRITE_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"
  PATCH_IF ("%opcode%" = 154) BEGIN // entangle overlay
	READ_ASCII ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%"))) "clone" (48) // grab entire fx
	INSERT_BYTES			("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%"))) 0x30		  // new effect
	  WRITE_EVALUATED_ASCII ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%"))) "%clone%" #48 // clones entangle effect
	  WRITE_SHORT		   ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%"))) 142		   // display portrait icon:
	  WRITE_LONG			("%fx_off%" + 0x08 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) 144		   // entangled
	SET "delta" = "%delta%" + 1
	SET "abil_fx_num" = "%abil_fx_num%" + 1
	SET "index2" = "%index2%" + 1
  END
END
WRITE_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "%abil_fx_num%"
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

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

×
×
  • Create New...