In this example my first hunch was to check .itm file format description in IESDP, but there was no offsets having "10e" or "de", neither NI's "raw" itm file wiever helped?
You are very much on the nose there, those are the hexadecimal offsets the features(usually a string reference) are at. You can view most the hexadecimal numbers in NI, when you open the item in the "Edit" view, and have the option enabled in the Options-> "Show Hex Offsets".
You won't mostly do a thing with them as shown in the Gwendolyne's reply, you can dynamically add/delete_and_alter the item and so have no need to actually figure what offset those are at.... as doing so requires things alike:
-reading other offsets to figure where the offset you want to read is at, after copying the file, this example is from my .spl modifying mod:
READ_LONG 0x64 "abil_off"
READ_SHORT 0x68 "abil_num"
READ_LONG 0x6a "fx_off"
READ_SHORT 0x70 "fx_num"
PATCH_IF ("%spl_type%" = "2") BEGIN
SET ~loops~ = 0
SET ~delta~ = 0
WHILE (~loops~ < ~abil_num~) BEGIN
READ_SHORT (abil_off + 0x1e + (0x28 * loops)) ~abil_fx_num~
READ_SHORT (abil_off + 0x20 + (0x28 * loops)) ~abil_fx_idx~
SET ~abil_fx_idx~ = (abil_fx_idx + delta)
WRITE_SHORT (~abil_off~ + 0x20 + (0x28 * loops)) ~abil_fx_idx~
-adding insertion bits to insert the effect you wanted:
INSERT_BYTES (~fx_off~ + ((~abil_fx_idx~) * 0x30)) 0x30 // New effect
WRITE_SHORT (~fx_off~ + ((~abil_fx_idx~) * 0x30)) 261 // Restore Lost Spell
WRITE_BYTE (~fx_off~ + 0x02 + ((~abil_fx_idx~) * 0x30)) 1 // Target Self
WRITE_LONG (~fx_off~ + 0x04 + ((~abil_fx_idx~) * 0x30)) ~spell_level~ // Parameter 1 (Restored Spell Level)
WRITE_BYTE (~fx_off~ + 0x08 + ((~abil_fx_idx~) * 0x30)) 1 // Parameter 2 (Cleric / Druid)
WRITE_BYTE (~fx_off~ + 0x0c + ((~abil_fx_idx~) * 0x30)) 4 // Delayed
PATCH_IF (~spell_level~ = 1) BEGIN
WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer1 + 6) // User-defined values
END
PATCH_IF (~spell_level~ = 2) BEGIN
WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer2 + 6) // User-defined values
END
PATCH_IF (~spell_level~ = 3) BEGIN
WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer3 + 6) // User-defined values
END
PATCH_IF (~spell_level~ = 4) BEGIN
WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer4 + 6) // User-defined values
END
PATCH_IF (~spell_level~ = 5) BEGIN
WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer5 + 6) // User-defined values
END
PATCH_IF (~spell_level~ = 6) BEGIN
WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer6 + 6) // User-defined values
END
PATCH_IF (~spell_level~ = 7 OR ~spell_level~ = 8) BEGIN
WRITE_LONG (~fx_off~ + 0x0e + ((~abil_fx_idx~) * 0x30)) (timer7 + 6) // User-defined values
END
WRITE_BYTE (fx_off + 0x12 + ((abil_fx_idx) * 0x30)) 100 // Probability
WRITE_BYTE (fx_off + 0x0d + ((abil_fx_idx) * 0x30)) 3 // Dispel/Bypass
SET ~delta1~ = 1
SET ~delta~ = (delta + delta1)
WRITE_SHORT (abil_off + 0x1e + (0x28 * loops)) (abil_fx_num + delta1)
-and then wrapping it up with BS, all in the same loop:
SET ~loops~ = (loops + 1)
END
END
END
BUT_ONLY
END
END
While you can do the same with a few less rows and with more ease:
READ_SHORT 0x1c "spl_type"
READ_LONG 0x34 ~spell_level~
PATCH_IF (~spell_level~ = 1) BEGIN
LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 1 parameter2 = 1 timing = 4 duration = ~timer1 +6~ resist_dispel = 2 probability1 = 100 END
PATCH_IF (~spell_level~ = 2) BEGIN
LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 2 parameter2 = 1 timing = 4 duration = ~timer2 +6~ resist_dispel = 2 probability1 = 100 END
PATCH_IF (~spell_level~ = 3) BEGIN
LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 3 parameter2 = 1 timing = 4 duration = ~timer3 +6~ resist_dispel = 2 probability1 = 100 END
PATCH_IF (~spell_level~ = 4) BEGIN
LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 4 parameter2 = 1 timing = 4 duration = ~timer4 +6~ resist_dispel = 2 probability1 = 100 END
PATCH_IF (~spell_level~ = 5) BEGIN
LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 5 parameter2 = 1 timing = 4 duration = ~timer5 +6~ resist_dispel = 2 probability1 = 100 END
PATCH_IF (~spell_level~ = 6) BEGIN
LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 6 parameter2 = 1 timing = 4 duration = ~timer6 +6~ resist_dispel = 2 probability1 = 100 END
PATCH_IF (~spell_level~ = 7 OR ~spell_level~ = 8) BEGIN
LPF ~ADD_SPELL_CFEFFECT~ INT_VAR opcode = 261 target = 1 parameter1 = 7 parameter2 = 1 timing = 4 duration = ~timer7 +6~ resist_dispel = 2 probability1 = 100 END
Edited by The Imp, 17 July 2017 - 07:38 AM.
Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit).
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.