if( !Sp_BetterRelatedPowerExists( oTarget, GetSpellId() )
This function won't be useful for your own custom powers. It specifically checks for the standard powers and does not work generically for anything else, since scripts can't do direct 2da file lookups. You'll have to write your own checks for your new powers. You can use the GetHasSpellEffect() function to check if a creature is affected by a particular spell (first parameter is the line number in spells.2da).
In k_inc_force, we'd find "FORCE_POWER_WHATEVER" instead of GetSpellId().
Those are just constants (listed in nwscript.nss) that represent line number values in spells.2da, to make it a bit easier for a human script reader to remember what the value refers to. You can just use the numbers directly instead and avoid some needless global variable declarations (unless you use a script compiler capable of handling constant declarations). If you just need the line number for the currently cast spell, use the GetSpellId() function.
I suppose (not even sure on that one) a way to go around this would be to put the effects of each "tier" into a single script
It should work either way with a separate impact script for each tier, or a combined one for all of them. That's just a matter of taste how you prefer to organize things. In either case you'd need to know the line numbers in spells.2da for your custom spells since you'd need to check for other powers of the same "school" already being active.
Viable solution, I guess, but I'd rather make the script compatible with other FP mods.
You can use mod installers to do this. I know TSLPatcher can be used to that effect, not sure if KISS can do it. In the former you'd stick the line numbers at install-time into tokens which the installer would insert into the scripts and recompile them before placing them in the user's override folder. That way you wouldn't have to hardcode the line numbers into your script, but they'd match whatever line numbers they end up at. The same thing could be used to properly reference dynamically added effect icons (in effecticon.2da) from your impact scripts to make sure your powers are properly displayed in-game in the Effects screen.
So, what, do I have to punch in at the end of the script the "nRelated" FPs like it's done in k_inc_force? Does the "case FORCE_POWER_WHATEVER" format is the solution outside of k_inc_force???
Are you referring to the Sp_BetterRelatedPowerExists() function? If so I wouldn't suggest modifying the standard include file needlessly. Make those checks directly in your scripts instead (or use a custom function in an include file of your own).
P.S. Oh, and if Stoffe happens to be my savior on this one... PLEASE, don't use the variables from your st_force_inc, lol. Doesn't exactly help with dealing with that pesky k_force_inc since I don't even know what's in your script...
This one? st_inc_force.nss (
http://www.algonet.se/~stoffe/st_inc_force.nss). :p
(It has no global variables declared.)