Hey, it's been awhile since I've actually needed help, I can usually figure out some sort of hackneyed solution to whatever I'm trying to accomplish, but this one really has me stumped.
In the spells.2da you can choose which level a specific power is available at. Let's say Force Lightning is available at level 6 for a jedi guardian. So you put 6 in that particular column and BAM. You can't get it until level 6.
The problem comes with multi-class characters. Let's say you're a level 3 scoundrel and a level 3 jedi guardian. Force lightning shouldn't be available for you until you're a level 6 Jedi Guardian, but lo and behold, you can get it at level 3 because it seems to be reading your global level only (level 3 Scoundrel + level 3 Jedi Guardian = Level 6 overall)
I'm pretty sure this is a hardcoded error and it is a very annoying one at best. I can sort of accept that there isn't much I can do here.
What I want to know is if there's some other way to limit it. I know there is a lot of mention of spell levels in NWN and there seems to be at least one 2da that is using spell levels. Is there any way I could possibly use spell levels to restrict which spells you can get upon level up? I have no godly idea how it all works, but if there are any NWN buffs out there, I'd appreciate any help.
I think this isn't an error, but just a different way of looking at this - it's coded in relation to character level, not class level. IIRC this distinction exists in NWN/2, but class-level related powers were cut out for KotOR. I'm not aware of any workaround, I'm afraid. You might try fiddling with the 'inate' column, but I don't remember if that does anything.
If you're making the power(s) for KotOR II, you can grant them via dialogue, and in that case you can probably put in a level check of some sort, but I'm not sure if you can check for levels in a particular class.
No, well I'm working on a mod with Vanir that aims to add Control Alter and Senes force feats to the game, which are dependent on the jedi level, at least. The only way that seems to be possible is having it fire through Heartbeat scripts, but even then, it's not perfect. Whatever we do, it inevitably requires a brief return to live gameplay in order for the check to register that you should have a spell.
That's unfortunate, but I don't see any viable workaround if checking OnHeartbeat doesn't work. :(