Player Resource Consortium

 

Author Topic: Stuck: Spell script 'unlearn spell' loop :(  (Read 2831 times)

0 Members and 1 Guest are viewing this topic.

December 22, 2013, 01:59:44 AM
  • Adept
  • *
  • Posts: 7
  • Karma: +0/-0
  • New Member
    • View Profile

Unfortunately I've already bumped into another problem.. When trying to level up (to 8th level duskblade) it will complete and then, once finished leveling, it will prompt if I want to unlearn a spell. If I choose yes, my only optino is level 0. Unlearning it has me  then immediately relearn it, then closes the unlearn window. Then it opens back up and repeats, indefinitely.

If I select no, same deal. Something seems mucked up with the unlearn/spell script, as 8th level duskblade should get a new selection of a spell and such, but it is not offered.. Anyone have any thoughts? It loops forever, so I can't do anything because of the constant dialogue popup and all, and also am not prompted for spells to learn, just the unlearn over and over and over.

I tried, just on a whim, setting the prc_unlearn_spell_maxnr to 0 before and after leveling but that didn't stop it, so I'm kinda at a loss. If anyone with some inkling of how the script is put together and why it might be acting up so I'd appreciate the help!


December 24, 2013, 03:20:40 PM
Reply #1
  • Jr. Associate
  • **
  • Posts: 56
  • Karma: +1/-0
  • New Member
    • View Profile

I'm adding the detail in my post to remind myself of stuff for when I look back, so don't be put off by it :P

The issue seems to be that DetermineNrOfSpellsToUnlearn is saying you could unlearn a level 0 spell (in prc_s_spellgain.nss). The conv script calls EvalPRCFeats 1s after closing, and that will reopen the conversation with the learn menu as you are then missing a level 0 spell, which will go round and round until you get sad and give up; yet for some reason that doesn't happen when real classes have the unlearn option? Interestingly, cls_spkn_duskbl.2da has different cantrip 0 known values to the tlk description used in the manual, I don't see how/why that would cause this problem though. Line 371 has a variable assignment during an if - something that I've never seen before (surely compilers won't like that?) and might want to investigate further.

It may be possible to get yourself out of it by tweaking a variable during the conversation. Until today I'd never really had to look at a dynamic conversation script in great detail, and I found it a little difficult to follow. I'll have another look at that whenever I find myself with the time, which probably won't be tomorrow :P

A couple of questions for you...

1) Is your character only duskblade 8 when this happens? No other classes, and you're not actually level 9 when the conversation pops up?
2) What values are you using for the following switches? (PRC options -> Alter code switches can tell you this)
- PRC_BIO_UNLEARN
- PRC_UNLEARN_SPELL_MAXNR (well I see you changed it, but what was it originally?)

There's a few more things that might help, such as what turning on the PRC_DEBUG switch does, but I'm hoping that won't be necessary.