Author Topic: Add script  (Read 400 times)

Legacy_Taino

  • Sr. Member
  • ****
  • Posts: 268
  • Karma: +0/-0
Add script
« on: April 02, 2012, 01:42:15 am »


               Hopefully I am posting in the correct location. Anyways I was wondering how to add scripts to a HAK. DO I just add them into the HAK or would I have to create a file and place them in their?

Thanks in advance!
DMT
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Add script
« Reply #1 on: April 02, 2012, 02:34:03 am »


               Once you make and compile your script in the toolset, open your NWN/modules/temp0 folder.  In it you'll find your script file(s).  The one you really need is your script name ending in .ncs (I believe this is "neverwinter compiled script" or something), but I always like to also take the file ending in .nss ("neverwinter script source"?).

The .ncs one is the one the game module actually uses.  The .nss version is the human-readable text that the toolset compiler turns into something the game engine can use.

Once you've found your script file(s), open your hak file with nwhak.exe (found in NWN/utils).  Drag and drop you script file(s) into your open hak.  Save the hak.

Save and close your module.  Reopen your module and associate the new hak with it (Edit > Module Properties > Custom Content).  The script should be available to you to read and add to things in the toolset.

Note: If you have plans of editing a particular script in the near future, don't bother putting it in a hak.  You can't edit a hak-stored script in the toolset.  Well, you can, but the changes won't get saved in the module (the hak takes precedence).  To edit such a script, you'd need to export it from the hak, pull it into your NWN/modules/temp0 folder, remove it from the hak, then edit it in the toolset...and I probably missed a step or three in there.

I usually only put scripts in a hak (cep2_custom.hak, since I use CEP) if I haven't altered them for at least a year.
               
               

               
            

Legacy_Taino

  • Sr. Member
  • ****
  • Posts: 268
  • Karma: +0/-0
Add script
« Reply #2 on: April 02, 2012, 02:58:45 am »


               Cool and thanks for your response AD. I have a forge system which uses over 150+ scripts and uses the Craft Skills. Wanted to place them in a HAK instead of just importing them. Trying to keep my resources low as possible. =)
               
               

               
            

Legacy_Vivienne L

  • Full Member
  • ***
  • Posts: 130
  • Karma: +0/-0
Add script
« Reply #3 on: April 02, 2012, 02:42:49 pm »


               Thanks for explaining this!