Jump to content

[Incompatibility] Disease immunity effect batch vs. TobEx


Recommended Posts

A request for BG2Fixpack to add the following line when fixing disease immunity effect batches. The installation clones an existing immunity to effect (disease) opcode. When it subsequently modifies the opcode to 100% poison resistance, it leaves junk data in param2. This doesn't agree with TobEx's Poison Resistance Mod hack, which makes use of param2

 

The code is located under the "// disease (revised by Wisp)" heading

Line 24855 (from v9 tp2)

PATCH_IF ("%new_fx_5%" = 0 AND !("%SOURCE_RES%" STRING_EQUAL_CASE spcl814 OR "%SOURCE_RES%" STRING_EQUAL_CASE misc8j)) BEGIN
INSERT_BYTES   ("%fx_off%" + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) (0x30 + (0xd8 * "%fx_type%"))
WRITE_ASCIIE ("%fx_off%"  + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) "%template%" // clones immunity effect
WRITE_SHORT  ("%fx_off%" + (0x08 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 173		  // reduced damage from poison
WRITE_LONG   ("%fx_off%" + 0x04 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 100		  // value
WRITE_LONG   ("%fx_off%" + 0x08 + (0x10 * "%fx_type%") + ("%abil_fx_idx%" * (0x30 + (0xd8 * "%fx_type%")))) 0			// set <---------- add this line to set param2 to 0
SET "new_fx" = ("%new_fx%" + 1)
SET "counter" = ("%counter%" + 1)
END

Link to comment

Archived

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

×
×
  • Create New...