Craft Feats

Hi

How can i disable certain spells from being made into potions, wands, and scrolls without outright disabling the craft feats?

I’d like to disable True Strike, and a few others…

I think the script you need to edit would be x2_inc_craft and the function is

int CIGetSpellWasUsedForItemCreation(object oSpellTarget)

which is around line 750-ish (I am looking in my already edited version)
You could put in a check for spellid and if it is one you don’t like, put in a fail return.

int nID = GetSpellId();
if(nID==SPELL_TRUE_STRIKE) return FALSE;
//I did not check to see if it should return this or TRUE for failure.

The caveat with this is that there are a number of scripts that include it and you would need to find them and compile them:
x2_ci_craftitem1-5, x2_ci_gotgold_1-5, x2_ci_start, x2_im_can_ca and cw, x2_im_finished, x2_im_getaccept, x2_pc_craft, x2_pc_umdcheck, x2_s2_crafting are my suggestions.

2 Likes

Thanks, i’ll see if that works!

Edit - Works, thanks again for your help and detailed response!

1 Like

Another way to achieve this without editing any scripts is to edit the crafting system’s des_crft_spells.2da.

Des crft spells.2da | NWNWiki | Fandom

There are columns there for fine-grained control (scrolls, potions, wands, etc).

so once edited i just throw that .2da into override and it’ll work?

i already edited baseitems, feat and restduration .2da’s so i might be able to do this.

thanks!

It should if that page is right. Add 1s to where you want the spells to be blocked. Try to avoid mixing it with edited scripts or you may run into issues.

Eventually you may want to dump the modified 2das to a custom hak to avoid interference with other modules.

1 Like

got it working using this method, but was a pain 'cause nwnexplorer doesn’t list the names of the .2das.

was worth it though. thanks.

could use help in regards to making a custom hak…

What version of nwnexplorer you’re using? It should list 2das under “Game Data”.

Hak pak | NWNWiki | Fandom

under ‘Game Data’ is the 2da list, but the 2das are not named, each file is just named res#.2da.

Maybe i’m using an old version not completely compatible with nwnee.

Sounds like you’re not opening NWNExplorer in the right way for EE.

Even with the latest version, I find I need to use the big Open button to open

C:\Users####\Beamdog Library\00785\data\nwn_base.key

That lists all the EE official content with meaningful names.

I have three versions of NWN installed, which is maybe why the EE content doesn’t open automatically.

2 Likes

i was opening base_2da.bif, took a while to find the right one with none of the 2da names!

works now, tyvm!

Edit - hakpak created, that was too easy… did something wrong there also i bet.

1 Like