Aller au contenu

Photo

Add script


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Taino

Taino
  • Members
  • 139 messages
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

#2
The Amethyst Dragon

The Amethyst Dragon
  • Members
  • 1 882 messages
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.

#3
Taino

Taino
  • Members
  • 139 messages
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. =)

#4
Vivienne L

Vivienne L
  • Members
  • 80 messages
Thanks for explaining this!