Jump to content

Home

Compiling Include Files


Recommended Posts

Is it possible to compile .nss include files into .ncs? I tried using the compilers from starwarsknights.com and KotOR tool, but they both ignore the .nss because they see it as an include file.

 

1. An Include file is any file that doesn't have void main() or int StartingConditional().

 

2. The Include file is compiled, in a sense. When you compile a script that has an include at the top of it, the functions are basically copied and pasted into the script you're compiling. This also happens to any includes that include has.

 

Example:

Show spoiler
(hidden content - requires Javascript to show)
File A is the script we compile,

File B is the include, and

File C is the include's include.

 

File A:

#include "File_B"
void main()
{
   IsPartyMemberInParty(GetObjectByTag("p_bastila"));
}

 

File B:

#include "File_C"
int IsPartyMemberInParty(object oParty)
{
   if(GetPartyMember(oParty) == 1) { return TRUE;}
   return FALSE;
}

 

File C:

void GetPartyMember(object oParty)
{
   GetObjectByTag(GetTag(oParty));
}

 

In that example, the final .ncs from File A would have all of the functions from File B and File C added to it before it was compiled. The final file size of the .ncs reflects the size of the included files. Hope this made sense! :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...