Player Resource Consortium
Neverwinter Nights => Builders => Topic started by: barna10 on February 14, 2012, 07:52:31 PM
-
I am attempting to alter the craft system (arbitrary) to give more options while still avoiding TMIs. I wrote some functions into prc_craft, but they don't seem to work. It appears as if some other function (probably from one of the includes) is setting a limit that I can't change. Specifically I am trying to increase the number of feats available for bonus feats.
Does anyone know where to start looking? Also, where is the code for PRCGetFileEnd function?
or where the const NUM_MAX_FEAT_SUBTYPES is used?
-
Figured it out!
I'm going to attempt to add more feats to the list and then I'll post the files.
-
Ok, got feats working AND corrected an error that prevented adding spells using arbitrary crafting (always getting a TMI error)
For now, all you get is Bioware spells. Fix was in the code, but the error prevented it from working ("irp_spells" constant reference should have been capitalized).
Enjoy. My first NWN coding!
-
I have tweaked the fix as much possible to provide as many spells as possible (about twice as many as my first attempt). Some, but not all, of the PRC spells are enabled.
If playing on a server, I could tweak it to allow ALL spells, but it will require a separate prc_craft.ncs.
On that, is there a way for the system to detect if it is running in multi-player mode or not? I could incorporate an if statement to have it enable all spells automatically when playing on a server.
If you downloaded the previous file, this one supersedes the previous one.
-
On that, is there a way for the system to detect if it is running in multi-player mode or not? I could incorporate an if statement to have it enable all spells automatically when playing on a server.
I use GetPCPublicCDKey() for that - in single player mode (with default parameters) it returns blank string.
-
good to know, I will try that
-
I've integrated your fix with PRC sources. :)
Thank you!
-
No problem. I'm glad I could finally give something back.
-
I cleaned up the code a bit. Also, I noticed some code uses "IPRP_SPELLS", others use "iprp_spells". I added support for both. Now both arbitrary and non-arbitrary crafting work.
However, non-arbitrary crafting requires the PC to have the spell memorized. I haven't figured out how to tie-in the Warlock's UMD check for this, but I'll keep working on it so Warlock's can create scrolls and potions without using arbitrary crafting.
-
I cleaned up the code a bit. Also, I noticed some code uses "IPRP_SPELLS", others use "iprp_spells". I added support for both. Now both arbitrary and non-arbitrary crafting work.
However, non-arbitrary crafting requires the PC to have the spell memorized. I haven't figured out how to tie-in the Warlock's UMD check for this, but I'll keep working on it so Warlock's can create scrolls and potions without using arbitrary crafting.
Good point with iprp_spells case, though it's only needed for string comparision in PopulateList() function (Get2daCache always uses lowercased file names).
Thanks for fixing this. I've updated my copy of SVN repository.