Script/macro/executed-file that teaches all arcane spells to a wizard?

Is it possible to make some automated and convenient way of teaching all the OC/SOU/HOTU arcane spells to a wizard character (playing OC/SOU/HOTU campaigns)?

I tried the “enable all spells” cheat but that just lets you cast from the radial menu - it doesn’t permanently teach the wizard all the arcane spells.

Thank you for helping out.

Isn’t there a column named “knows all spells” in the classes.2da of NWN1?
Or was that added in NWN2 only?

In alternative, you could just give all the scrolls out there (via cheat or script) to the wizard and learn them manually one by one.

#include "70_inc_nwnx"

void main()
{
    object oPC = GetFirstPC();
    if(GetLevelByClass(CLASS_TYPE_WIZARD,oPC) < 1) return;
    int nSpell;
    for(;nSpell < 570;nSpell++)
    {
        if(Get2DAString("spells","Wiz_Sorc",nSpell) != "")
        {
            if(!NWNXPatch_GetKnowsSpell(oPC,CLASS_TYPE_WIZARD,nSpell))
            {
                NWNXPatch_AddKnownSpell(oPC,CLASS_TYPE_WIZARD,nSpell);
            }
        }
    }
}

this is a script that does this using nwnx_patch / nwncx_patch plugin

1 Like