Sounds good to me(though I'm not good at patching, alas).
Neither am I, unfortunately—I've only just started learning. That's why my initial solution wasn't a terribly good one. It only accounts for the Fixpack's changes.
I educated myself on the use of ADD_SPELL_EFFECT earlier today, so here's some patch-code I cobbled together that does away with the need for Kelsey to overwrite spwi606.spl. (And, thus, nullifies the need for the code posted above.)
Apparently, the only additions to Kelsey's version of the spell were the extra [Modify script state] effects under each header. All that's needed is to replace this... (line 564, Kelsey.tp2)
COPY ~kelsey\SPWI606.spl~ ~OVERRIDE\SPWI606.spl~
... with this:
COPY_EXISTING ~spwi606.spl~ ~override~
READ_LONG 0x64 ~ab_off~
READ_SHORT 0x68 ~ab_num~
FOR (i=0; i<%ab_num%; ++i) BEGIN
SET ~opcode~ = 282 // effect: #282 (modify script state)
SET ~target~ = 2 // target: preset target (2)
SET ~timing~ = 0 // timing mode: duration (0)
SET ~parameter1~ = 1 // value: 1
SET ~parameter2~ = 27 // scripting state: 27
SET ~power~ = 4 // power: 4
SET ~resist_dispel~ = 3 // dispel/resist: 3 (dispel/bypass resistance)
READ_SHORT (%ab_off% + %i%*0x28 + 0x10) ~min_lvl~
PATCH_IF (%min_lvl% > 12) BEGIN
SET ~duration~ = (%min_lvl% * 60)
END ELSE BEGIN
SET ~duration~ = 720
END
SET ~probability1~ = 100 // prob1: 100%
SET ~probability2~ = 0 // prob2: 0%
SET ~dicenumber~ = 0 // dicenumber: 0
SET ~dicesize~ = 0 // dicesize: 0
SET ~savingthrow~ = 0 // save type: 0 (no save)
SET ~savebonus~ = 0 // save bonus: 0
SPRINT ~resource~ 0 // resref: n/a
SET ~header~ = %i%+1 // add to every header, accounting for variable duration
LAUNCH_PATCH_MACRO ~ADD_SPELL_EFFECT~
END
BUT_ONLY
If there's anything glaringly wrong with the code, please feel free to give a shout-out.
Eh... it just occurred to me... is the use of [Modify script state] for Kelsey's Detectable Spells? I recall reading his version of DS is outdated and troublesome. So I suppose if Kelsey's installer is modernised, this will be unnecessary, anyway.
I guess this code will help, though, until that happens.