Jump to content

ALTER_EFFECT and opcode 12


Recommended Posts

I'm trying to edit a spell, which is a direct-damage effect, and I would simply like to change the damage type from one to another - say, from fire damage to magic damage.


But when I look at opcode 12 in NI, it's one of these ones where parameter2 is split into two fields. So the ALTER_EFFECT function isn't quite equipped to deal with it. Anyone know how I can set the "Mode" to "normal (0)" and set the "Damage type" to "MAGIC - 64" ?



LPF ALTER_EFFECT INT_VAR match_opcode = 12 parameter2 = ______ END



Link to comment

Set it in NI with the split param2 opcode, then change the opcode to one that has it listed as "unused".

Opcode 12, Value = ###, Mode = 0(normal), Damage Type = 64(magic)


Opcode 11, Unused(1) = ###, Unused(2) = 4194304


Or convert to hex:

0 + [64 * (2^16)]

Link to comment

Another example where this could be useful are the various color glow opcodes where you specify the RGB values as separate bytes for param1. It's not necessary to look up the long value of the RGB field in NI/DLTCEP if you can write this:


SET parameter1 = (150 << 8) + (150 << 16) + (150 << 24) // color hue (150,150,150), the first byte at "<< 0" is skipped
Link to comment


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

  • Create New...