Skip to content

Remove immunity to opcode

Can this be done? Suppose an enemy has immunity to opcode, or immunity to backstab or time stop (not sure if they are granted though immunity to opcode or their own opcodes). Can you create, say, a weapon where on hit it removes that immunity so that they are vulnerable?

Comments

  • RaduzielRaduziel Member Posts: 4,714
    edited October 2019
    Yes, by using opcode 337.
    #337 (0x151) Remove: Opcode
    Parameter #1: Param
    Parameter #2: Opcode
    Description:
    Removes all 'Opcode' from target, that has the same param2 as 'Param'. Use -1 to ignore the parameter.

    Bhaal's Bone Dagger from Deities of Faerûn does precisely that (check RABHAA11.spl for an example), as well as some abilities from I Hate Undead.

    Usually, parameter #2 will be 101 and parameter #1 will be the opcode you want to remove the protection from.

    So if you, for instance, want to remove the immunity against disease from a creature you would use it with p1 = 78 p2 = 101
  • OlvynChuruOlvynChuru Member Posts: 3,079
    Take a look at Chill Touch in Icewind Dale: Enhanced Edition. In that game, Chill Touch causes undead to panic. It uses opcode 337 to remove the undead's immunity to fear.
  • yoboseyoyoboseyo Member Posts: 8
    Thanks!

    I'm trying to mod a spell to remove Opcode 193 - detect invisibility by script from the target. I can't get it to work. I'm not sure if I'm using it wrong.
  • yoboseyoyoboseyo Member Posts: 8
    I got it working - need to change param 1 to -1, otherwise it only removes opcode where param 1 matches the param 1 you set
Sign In or Register to comment.