Player Resource Consortium

Neverwinter Nights => Help => Topic started by: caramelwhistle on April 20, 2016, 11:30:16 AM

Title: How does a custom class script get included from a hak-pak?
Post by: caramelwhistle on April 20, 2016, 11:30:16 AM
I've managed to hack a new custom class and feats/spells to work. :)  However this has involved me editing some of the files in the PRC 2da, includes, script and spell hak-paks, not least to mention replacing one of the classes the PRC pack provides.  I know this is naughty, but it worked.

I'd like to package my class for distribution.  However the other PrC and Base Classes I've used for research don't require hacking PRC files to work, drop them in, associate them, they (usually) work.  The main interest is getting the file, for instance I replaced the contents of the prc_brawler.nss file with my own and compiled it to also replace prc_brawler.ncs in the prc_scripts hak-pak.  If I made my own script, say myclass_script.nss+ncs in a hak-pak and didn't hack the PRC scripts how do I get that script file included and run with the game code? 

Associating a hak pak with modules I understand, 2da over rules other 2da,  but what needs to be done to include a new script file?



Title: Re: How does a custom class script get included from a hak-pak?
Post by: ThE LoSt BoY on April 20, 2016, 08:16:06 PM
Home brew class? Like to see the particulars.
Title: Re: How does a custom class script get included from a hak-pak?
Post by: caramelwhistle on April 22, 2016, 12:08:59 PM
Home brew class? Like to see the particulars.

Happy to share when I've made the hak-pak.  Still needing a little help knowing how the script files get included. ^
Title: Re: How does a custom class script get included from a hak-pak?
Post by: ThE LoSt BoY on April 22, 2016, 04:12:23 PM
Was thinking more the PnP bits. BAB, Feats, Spell progression, etc.
Title: Re: How does a custom class script get included from a hak-pak?
Post by: xwarren on April 23, 2016, 05:42:43 AM
When you modify a script file (.nss) you need to compile it (.ncs) and put the resulting file in a hak with highest loading priority (this step is the same as with 2da's and other files).
Title: Re: How does a custom class script get included from a hak-pak?
Post by: caramelwhistle on April 23, 2016, 02:38:35 PM
When you modify a script file (.nss) you need to compile it (.ncs) and put the resulting file in a hak with highest loading priority (this step is the same as with 2da's and other files).
How do I compile it and get the includes to work?  I use #include <filename> but there is no way to reference directories, so whilst my additional scripts (in the same directory) work the NWN scripts can't be found.