Player Resource Consortium

 

Author Topic: Craft Staff  (Read 5479 times)

0 Members and 1 Guest are viewing this topic.

June 25, 2012, 11:04:03 AM

The majority of the time I try to put spells onto my crafted staff, I get the message "This spell can not be used with the Craft Staff feat". Is there a way to enable more spells to be put on staffs?


June 25, 2012, 02:58:11 PM
Reply #1

It may be in one of the 2DA files...I'm not sure.
The eventual creator of the PRC Incarnum System!
23rd highest post count and counting!


June 25, 2012, 09:21:21 PM
Reply #2

It may be in one of the 2DA files...I'm not sure.

It's not in iprp_spells.2da.  I'm not sure what file or script controls that.
HEATSTROKE


June 26, 2012, 10:57:56 AM
Reply #3
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Craft Staff feat shares the same restrictions as Craft Wand feat - only 4th or lower level spells can be added to a staff. You can change that by editing des_crft_spells.2da "NoWand" option.


June 29, 2012, 08:07:55 AM
Reply #4
  • Adept
  • *
  • Posts: 17
  • Karma: +2/-0
    • View Profile

If this bothers anyone else, the include file prc_x2_craft.nss can be edited to allow any spells for staves... I mean, what's even the point of epic staff crafting if you're capped at level 4?

Find the function CIGetIsSpellRestrictedFromCraftFeat:
Code: [Select]
int CIGetIsSpellRestrictedFromCraftFeat(int nSpellID, int nFeatID)
{
    string sCol;
    switch(nFeatID)
    {
        case X2_CI_BREWPOTION_FEAT_ID: sCol = "NoPotion"; break;
        case X2_CI_SCRIBESCROLL_FEAT_ID: sCol = "NoScroll"; break;
        case X2_CI_CRAFTWAND_FEAT_ID:
        case X2_CI_CRAFTROD_FEAT_ID:
        case X2_CI_CRAFTSTAFF_FEAT_ID: sCol = "NoWand"; break;
    }
    return !!StringToInt(Get2DACache(X2_CI_CRAFTING_SP_2DA,sCol,nSpellID));
}
edit it to this (comment out everything but the last line and replace sCol in the last line with "NoScroll"):
Code: [Select]
int CIGetIsSpellRestrictedFromCraftFeat(int nSpellID, int nFeatID)
{
    /*string sCol;
    switch(nFeatID)
    {
        case X2_CI_BREWPOTION_FEAT_ID: sCol = "NoPotion"; break;
        case X2_CI_SCRIBESCROLL_FEAT_ID: sCol = "NoScroll"; break;
        case X2_CI_CRAFTWAND_FEAT_ID:
        case X2_CI_CRAFTROD_FEAT_ID:
        case X2_CI_CRAFTSTAFF_FEAT_ID: sCol = "NoWand"; break;
    }*/
    return !!StringToInt(Get2DACache(X2_CI_CRAFTING_SP_2DA,"NoScroll",nSpellID));
}

Now you can also do custom wand levels, however rods won't be properly capped.  To do that, you gotta copy and paste this little guy:
Code: [Select]
    // -------------------------------------------------------------------------
    // check if spell is below maxlevel for craft want
    // -------------------------------------------------------------------------
    int nMaxLevel = GetPRCSwitch(X2_CI_CRAFTWAND_MAXLEVEL);
    if(nMaxLevel == 0)
        nMaxLevel = 4;
    if (nLevel > nMaxLevel)
    {
        FloatingTextStrRefOnCreature(83623, oCaster);
        return TRUE;
    }
from either here or the wand crafting check function, and put it after this part in CICraftCheckCraftRod:
Code: [Select]
    int nLevel = CIGetSpellInnateLevel(nSpellID,TRUE);
    if(GetPRCSwitch(PRC_CRAFT_ROD_CASTER_LEVEL))
    {
        switch(nMetaMagic)
        {
            case METAMAGIC_EMPOWER:
                nLevel += 2;
                break;
            case METAMAGIC_EXTEND:
                nLevel += 1;
                break;
            case METAMAGIC_MAXIMIZE:
                nLevel += 3;
                break;
/*            case METAMAGIC_QUICKEN:
                nLevel += 1;
                break;
            case METAMAGIC_SILENT:
                nLevel += 5;
                break;
            case METAMAGIC_STILL:
                nLevel += 6;
                break;
These dont work as IPs since they are hardcoded */
        }
    }

then recompile prc_scripts.  Now you not only have uncapped staff crafting but can set the wand/rod level cap to whatever you want with switches.  I wouldn't recommend altering the brew potion max level unless you want to do extra editing of CICraftCheckBrewPotion to work properly with the master alchemist class.

edit: I suppose the quicker and dirtier method would be to simply move case X2_CI_CRAFTSTAFF_FEAT_ID: to the line before case X2_CI_SCRIBESCROLL_FEAT_ID:, but then you can't raise the wand/rod max crafting level.
« Last Edit: June 29, 2012, 08:10:51 AM by lolwhat »


June 29, 2012, 09:22:02 AM
Reply #5
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Actually you only need to compile prc_prespell.nss after applying above changes ;)
Thank you for the info.