Jump to content

values for param1 / kit.ids entry in opcode 177


Recommended Posts

I am trying to make a 177 effect that triggers an .EFF for a certain kit; but I want it to affect a mod-added kit.


When Parameter 2 is set to kit.ids, Parameter 1 has options in NI that look like this:


ASSASIN - 16394
BLADE - 16397



I don't know what value will be assigned to my mod kit, since I don't know a given player's mod list or order. So I figure I would make the .SPL with the 177 effect and then use ALTER_EFFECT to set it at install time:

COPY ~mymod/spell.spl~ ~override~

LPF ALTER_EFFECT INT_VAR match_opcode = 177 parameter1 = ?? STR_VAR match_resource = ~d5_rfxd~ END


I don't know how to fill out that function. I think Parameter 1 requires a numerical value, but I don't know how to derive that '16394' value. Do those values appear anywhere else, some table I can read to derive the number for my mod kit?

Link to comment

Also, when you install a kit, according to WeiDU:



ADD_KIT sets the variable %internalKitName% to the number your kit occupies in kitlist.2da.


You could pass the values of these variables to parameter1.

Link to comment

Those numbers are the same as the numbers used in kit.ids. 0x400A is 16394.

And it doesn't need translating? I could just read the entry in the last column in kitlist.2da (in EE) and pass that variable to the ALTER_EFFECT function?


@critto I'm not sure that would work, as I guess I need the IDS number, not the kitlist number. And I'm not sure the kit name could be used in the ALTER_EFFECT function, which requires an integer.

Link to comment

@ subtledoctor:


EDITED: you are, of course, right. There's a gotcha. The value you have in the %internalKitName% variable is the value of the first column in kitlist which is the byte that is located at 0x246 offset of the creature file. The complete kit value is a dword, however. In case of assassin it's 10, which 0x0A in hex. When you get your variable after installing the kit, something like that is usually performed to assign the kit to a creature:

WRITE_BYTE  0x246 ~%internalKitName%~
WRITE_BYTE  0x247 0x40

This is also stated in the documentation: "This value is exactly 0x4000 less than the number your kit is assigned in kit.ids". So you can either look up the last column for a complete DWORD integer related to that kit or calculate manually when passing to the parameter1.

Link to comment


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

  • Create New...