Player Resource Consortium

 

Author Topic: Archivist High-level Spells  (Read 33716 times)

0 Members and 1 Guest are viewing this topic.

March 17, 2014, 01:50:28 AM

First off, PRC is totally awesome.  A lot of work must have gone into this.

My question is about the archivist base class.  I cannot learn 8th/9th level spells from any source when I level one (an archivist character) up.  I can't use the "learn spell" radial menu option on any high-level scroll, nor can I select spells of those levels when I level up all the way as a straight archivist.

I have been reading around on this forum and so far this is what I have tried to correct the problem:
1. Fresh install of NWN 1.69 Diamond Edition then use the PRC3.5 executable to install the PRC, run the updater for my modules, then run the oc fix for them
2. Delete the PRC_DATA files from the database directory and start a new game with an updated module to have them re-created
3. Delete those same files and replaced them with the same files from the PRC35.rar manual install archive
4. Replace the PRC_2das.hak file in my hak directory with one from the above archive

Please note, the above attempts have all come from other members advice on this forum - I know very little about the actual mechanics of the PRC.  Anyone wishing to help should therefore write to me as if I were a small, helpless child.

Last, I should probably explain that I have the GOG version of the game.  Not sure if this matters, but, in the interest of completeness, now you know.


March 18, 2014, 11:56:47 AM
Reply #1
  • Jr. Associate
  • **
  • Posts: 56
  • Karma: +1/-0
  • New Member
    • View Profile

By any chance, do you have 17 intelligence? You need a key attribute score of 10+the spell's level to cast spells, and (without looking) it would make sense if that limitation was enforced on learning spells as well.


March 18, 2014, 01:07:49 PM
Reply #2

I suppose I deserved that for the small child thing, but no, any archivist I make will have over 19 intelligence by CL 17.  High wisdom as well.  It doesn't say in their PRC description but in p&p wisdom always determined their bonus spells, and to be safe I just keep both stats high to cover my bases.

By all appearances I should be able to cast the 8s and 9s.  I mean the game recognizes that I can, it gives me the slots in my spellbook, but I just can't learn any scrolls of those levels and when I level all the way up as a straight archivist I can select those levels to learn bonus spells from, but when I do the only option is something like [learn all spells of this level] and when I pick it nothing happens - no knew spells in the spellbook and no bonus spell picks get used up.

I've read on here elsewhere that the archivist spell list is just too long for the game to cache properly sometimes so the higher levels get left out, but like I said before I have tried all the things I can find that have been recommended to fix that problem but it always ends up the same when I get to 15th or 17th level.


March 18, 2014, 03:20:58 PM
Reply #3

If you knew the Archivist spell feat number(s), could add manually w/ PRC Leto.

No guarantee they would show up in the Archivist radials.
Fermi was a Pyrokineticist


March 18, 2014, 05:12:13 PM
Reply #4

Not a bad idea. I don't know the exact feat numbers, and the PRC version of LETO (at least the one that I have) won't load the PRC 3.5 feat list on the regular feat screen, but it would be easy enough to look them up and add them via the advanced editor. Ctrl.-F to search the feats in the advanced editor has really helped me cheat when I'm feeling inclined. :)

But wait, my version doesn't have the archivist material. Is there a way to import a numbered feat list from the 3.5 version of PRC to browse in the advanced editor?

Also, I dig the advice, but I'd really like to know how to just make the damn game/mod work properly if anyone has some advice on that.

I've wondered if there is a way to just manually insert the archivist spells, or at least the ones that I want to take, into the cached database files. I, however, don't know the first thing about how to go about that or if it would even help.


March 18, 2014, 06:07:08 PM
Reply #5
  • Jr. Associate
  • **
  • Posts: 56
  • Karma: +1/-0
  • New Member
    • View Profile

You could indeed just add all the relevant spells to your character. The way I'd go about doing this might actually be to make a fake spellscript of a spell that you can already cast and stick it in your override folder for a few minutes to add level 8/9 spells, but then again I have no knowledge whatsoever of how the caching system works. Just adding the spell feats isn't enough: you have to set a load of variables on you/your hidetoken (it's been long enough since I dabbled in this stuff, I forget). The PRC spellbook keeps track of which spells you know independently of the feats you have - it only sticks the feats on your hide when you have that spell memorised, IIRC. I'm pretty sure that just adding the control feats will mean that the spells don't appear in the spellbook, so you won't have the ability to cast the things. I've never looked at leto, but unless having the PRC letoscript switch set changes the entirety of the spellbook mechanics then that should be the case.

If you're into scripty stuff, one of the spell/spellbook related prc scripts has a fairly detailed description of the array structures. If memory serves, it's got "spell" or "spellb" or something in the name.

When I'm more awake and have a little more time tomorrow, I'll have a little play around to see if I can come up with something that'll sort it out.


March 18, 2014, 06:31:38 PM
Reply #6

Loggy, thank you for the advice. I do not know how to write scripts, but I don't think it would be beyond my ability to do that if you could provide some guidance when you get the chance to check things out. Appreciate the help.

What I don't get is why my archivist isn't working properly if others get them to work as all I have installed is NWN diamond edition and a fresh install of the PRC 3.5. No other mods, no settings messed with, etc.



March 18, 2014, 09:42:24 PM
Reply #8

Ya, those were the posts I was referring to in my first post. Tried those things already. No dice.

The second link was new to me, though, but that's not the problem I am having. I can open the spellbook fine, and for the most part it works properly, just not when trying to learn (in any fashion) or prepare 8th or 9th level spells.

I'm about to try it with a non-GOG version version of the game. Seems like a long shot at best, but at this point I'm willing to try anything. I figure (complete and utter conjecture) that maybe the GOG version caches things differently and if I use the regular game it might work. I have no idea why this might be, but I'm gonna try.


March 19, 2014, 12:30:15 AM
Reply #9

Nope, that didn't work either. But I now have the non-GOG version of the game. Feels better.


March 19, 2014, 12:20:23 PM
Reply #10
  • Jr. Associate
  • **
  • Posts: 56
  • Karma: +1/-0
  • New Member
    • View Profile

I made a little quick and nasty script that gives you all 8/9 archivist spells without checking for any requirements whatsoever (in theory you could even not be an archivist and this would work...)

Code: [Select]
#include "prc_alterations"

void SpellLoop(int nRow, int nBlanks=0);

void main()
{
    //Don't try this on non-PCs as it's rather pointless
    if (!GetIsPC(OBJECT_SELF))
    {
        return;
    }

    SpellLoop(0);
}

void SpellLoop(int nRow, int nBlanks=0)
{
    //If more than 20 blank simultaneous rows, return as it's probably the end of the file
    if (nBlanks >= 20)
    {
        return;
    }
    string sSpellID = Get2DAString("cls_spell_archv", "RealSpellID", nRow);
    int nSpellID = StringToInt(sSpellID);

    //Check for blanks, continue if one is found
    if (sSpellID == "")
    {
        nBlanks++;
        DelayCommand(0.01f, SpellLoop(nRow + 1, nBlanks + 1));
        return;
    }

    //Make sure it isn't a metamagic version
    if (Get2DAString("cls_spell_archv", "ReqFeat", nRow) != "")
    {
        //Complain and abort...
        SendMessageToPC(OBJECT_SELF, PRC_TEXT_RED + "Unexpected metamagic feat at line " + IntToString(nRow));
        return;
    }

    int nSpellLevel = Get2DAString("cls_spell_archv", "Level", nRow);
    string sSpellName = GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", nSpellID)));

    if (nSpellLevel > 7)
    {
        object oToken = GetHideToken(OBJECT_SELF);
        sArrName = "Spellbook_Known_"+IntToString(CLASS_TYPE_ARCHIVIST)+"_"+IntToString(nSpellLevel);

        //Ensure the array exists
        if (!array_exists(oToken, sArrName))
        {
            array_create(oToken, sArrName);
        }

        //Add the spellbook id (which is the same thing as the row in cls_spell_archv) to the array
        array_set_int(oToken, sArrName, array_get_size(oToken, sArrName), nRow);
        SendMessageToPC(OBJECT_SELF, "Added spell " + sSpellName);
    }
    else
    {
        SendMessageToPC(OBJECT_SELF, PRC_TEXT_LIGHT_GRAY + "Did not add " + sSpellName + " as it is only level " + IntToString(nSpellLevel));
    }

    //Now skip all the metamagic versions of the same spell
    while (1)
    {
        if (Get2DAString("cls_spell_archv", "RealSpellID", nRow + 1) == sSpellID)
        {
            nRow++;
        }
        else
        {
            break;
        }
    }

    //Next iteration: blank count will now be 0
    DelayCommand(0.01f, SpellLoop(nRow + 1));
}

I couldn't get it to work via override so in the end I used a blank PRC enabled module to do it in. I suppose you could drop a script into the haks and run it via the debug console, too.

(I attached the compiled version, but the extension will need changing back to .ncs to use it)

That still doesn't answer the question of why the scroll spellgiver doesn't work. If it's really a caching problem then this might avoid it as I'm not using the Get2DACache function added in PRC as I'm not sure there's any point in caching all these values. I'm honestly not sure how that function works, anyhow :P
« Last Edit: March 19, 2014, 12:22:26 PM by Loggy »


March 19, 2014, 01:50:12 PM
Reply #11

Wow thanks for doing that. So now that I have the script, what do I do with it? Sorry that I need a step-by-step, but I've never worked with scripts.


March 19, 2014, 03:25:29 PM
Reply #12
  • Jr. Associate
  • **
  • Posts: 56
  • Karma: +1/-0
  • New Member
    • View Profile

You have several options...

1) Stick it into a PRC hakpak, use it, then remove it again.

Assuming that you don't have one of many community-made hak editors, you should be able to do that by using nwhak.exe found in NWN/utils. Anyway, once the file is in (don't forget to change the extension!), you'll need to put the following into the debug console.

DebugMode 1
runscript arch_spellget (or whatever you want to call it) - if it works it will spam your chatbox with messages.

It's not an ideal solution as you will probably want to take it out your haks again.

2) Make a module in the toolset with the script in. This might be better seeing as you'll be able to use it again if you bump into problems in the future, however it will require you to export your character and restart whatever module you're in which isn't so great.

- Open nwtoolset.exe, in your NWN folder
- Make a new module, create any area you want
- Close the toolset, use the PRC module installer (which will add the right hakpaks to the module, or you won't be able to be an archivist in it)
- Open the toolset again
- Copy the ncs file into NWN/modules/temp0
- Save the module, play it
- Use the same console commands as above

You could compile it yourself, but as Bioware's compiler can't handle PRC scripts then it's more trouble than it's worth unless you plan on doing more with it.

I must admit, the override solution would have been a lot nicer, but alas I just can't seem to figure out why I can't change spellscripts with it. I haven't tried the first method above, but seeing how hakpaks work I can't see any reason for it to go wrong.


March 19, 2014, 03:36:30 PM
Reply #13

Ya, the second option sounds great. I just don't know where to insert it into a hak file, so I will just make a "leveling module" and use the debug menu to run the script and then level my archivist up to 17 and add the spells I want. Or do I even need to level him/her up and add the spells after I run the script or can I just export the 1st level character after I run the script?

Also, to make the file an ncs file do I just change the extension in Windows explorer or do I need to get a program to convert it?


March 19, 2014, 04:26:16 PM
Reply #14
  • Jr. Associate
  • **
  • Posts: 56
  • Karma: +1/-0
  • New Member
    • View Profile

You can just change the extension using explorer. The forums don't allow attachments of other types, so I changed it from ncs to txt to be able to put it on here.

I'm not sure what will happen if you run the script on a 1st level character. It seems unlikely that anything will remove those variables as you shouldn't be able to have them in the first place, so I suppose it should work.