Player Resource Consortium

 

Author Topic: How does a custom class script get included from a hak-pak?  (Read 4273 times)

0 Members and 2 Guests are viewing this topic.

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?





April 20, 2016, 08:16:06 PM
Reply #1

Home brew class? Like to see the particulars.
Fermi was a Pyrokineticist


April 22, 2016, 12:08:59 PM
Reply #2

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. ^


April 22, 2016, 04:12:23 PM
Reply #3

Was thinking more the PnP bits. BAB, Feats, Spell progression, etc.
Fermi was a Pyrokineticist


April 23, 2016, 05:42:43 AM
Reply #4
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

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).


April 23, 2016, 02:38:35 PM
Reply #5

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.