Jump to content

Home

Syntax Error in KotOR2 nwscript.nss


tk102

Recommended Posts

For those of you attempting to compile KotOR2 scripts that include new constant values or new functions, there appears to be a syntax error in nwscript.nss that will prevent you from compiling!

 

Near line 5710 you will see:

// RWT-OEI 01/29/04
// 794: Disables or Enables the Orient On Click behavior in creatures. If
//      disabled, they will not orient to face the player when clicked on
//      for dialogue. The default behavior is TRUE.
void SetOrientOnClick( object = OBJECT_SELF, int nState = TRUE );

 

The problem lies in this part:

object = OBJECT_SELF

 

Change it to this:

object oCreature=OBJECT_SELF

 

and then place the modified nwscript.nss file in the same folder as nwnsscomp.exe.

Link to comment
Share on other sites

:D Ok I see that.

 

Now I have the Compiler in the Kotor 1 directory next to the Override folder, now I use it for the Xbox and the k1 Override is where I put the K2 scripts. Now If I fix that entry like you said, all I'll need to do is save it as nwscript.nss and just put it in the same directory right next to the compiler.exe, right?

 

And everything will be k0ol?

Link to comment
Share on other sites

Cool.

 

Just remember, if you have nwscript.nss in the same directory as nwnnsscomp.exe, nwnnsscomp.exe will use it -- otherwise it will try to read it from the KotOR1 scripts.bif using the registry as its guide.

 

Since KotOR1 and 2 use different nwscript.nss files, it is wise to do your compiling in different folders for the two games, with a copy of nwnnsscomp.exe and the appropriate nwscript.nss in each.

Link to comment
Share on other sites

Very good. Thanks for the info. It will save some fustration once everyone starts modding Kotor II scripts. I for one can not wait until this game comes out for the PC next month.

 

It is concerning that nwscript.nss does not compile. It makes me think the source scripts may not be the ingame script.

Link to comment
Share on other sites

It is also possible that this will be "fixed" in the PC version, but I'm not holding my breath.

 

This would not be the first time that .nss files have had errors...

 

KotOR1 also had at least 2 syntax errors that I can think of... here (steps 5 & 6)

Link to comment
Share on other sites

I agree with you there, I doubt it will be fixed in the PC release.

 

It really is a shame that mods are so unsupported with the KOTOR series. One would think that a company would incourage mods to their game. Games like Morrowind that are over two years old are still being modded by the community. Morrowind's mod forums generates over eight pages of posting a day! Talk about building a strong fan base.

 

Oh well, no sense in complaining about it. I am still excited about modding for KOTOR, I just wish it was easier.

Link to comment
Share on other sites

  • 3 weeks later...
Originally posted by beancounter

I agree with you there, I doubt it will be fixed in the PC release.

 

It really is a shame that mods are so unsupported with the KOTOR series. One would think that a company would incourage mods to their game. Games like Morrowind that are over two years old are still being modded by the community. Morrowind's mod forums generates over eight pages of posting a day! Talk about building a strong fan base.

 

Oh well, no sense in complaining about it. I am still excited about modding for KOTOR, I just wish it was easier.

For some strange reason, KotOR is the only game that I've ever had any interest in modding. Perhaps it's because the members here have had to work so hard for the tools. Murphy's Law, I guess.
Link to comment
Share on other sites

Ah you're using a .bat file to compile aren't you? Now that nwscript.nss is extracted and lives in your directory with nwnsscomp, it will be subject to

nwnnsscomp -v1.00 *.nss

 

You can avoid that by not using the .bat file method and just typing the command directly. If you have a special naming convention for your scripts, you can probably use a wildcard to save you some keystrokes. :rolleyes:

 

nwnnsscomp -v1.00 tk_script1.nss
nwnnsscomp -v1.00 tk_script2.nss
nwnnsscomp -v1.00 tk_script3.nss
del *.ndb

or

nwnnsscomp -v1.00 tk*.nss
del *.ndb

 

I'll also refer you to a Command Prompt Trick

 

The command prompt is your friend. Why doesn't anyone believe me? :D

Link to comment
Share on other sites

Originally posted by BoL_Stryke

Well, good news is Obsidian allows discussion of TSL mods on their forums so they are already supporting us more than Bioware did. Now hopefully they will be even MORE supportive by answering questions and helping use once TSL is out on PC :D

 

Well that's good. I think Obsidian needs the support of the holowan labs community to "Help them out on this game" Seeing as how they screwd up on things like syntax errors, and feat glitches, and frame rate lags, and the list goes on and on and on.... lol

Link to comment
Share on other sites

  • 2 weeks later...

BTW, they fixed it in the release of the PC version! Thanks to tk102!!! :D

 

New nwscript.nss

// RWT-OEI 01/29/04
// 794: Disables or Enables the Orient On Click behavior in creatures. If
//      disabled, they will not orient to face the player when clicked on
//      for dialogue. The default behavior is TRUE.
void SetOrientOnClick( object oCreature = OBJECT_SELF, int nState = TRUE );
Link to comment
Share on other sites

Originally posted by Darth333

BTW, they fixed it in the release of the PC version! Thanks to tk102!!! :D

 

New nwscript.nss

// RWT-OEI 01/29/04
// 794: Disables or Enables the Orient On Click behavior in creatures. If
//      disabled, they will not orient to face the player when clicked on
//      for dialogue. The default behavior is TRUE.
void SetOrientOnClick( object oCreature = OBJECT_SELF, int nState = TRUE );

 

 

Figures. I still think that Osidian should give all the xbox users a "Free" DVD of KotorII with all this fixed!:mad:

 

but that's just me

Link to comment
Share on other sites

  • 3 weeks later...

Note this problem appears to still be present in non-US versions of the game. If you are trying to compile scripts and are getting nwscript.nss error messages and you have a non-US version, please follow the instructions listed in the first post of this thread or use the following fixed copy of nwscript.nss:

nwscript.zip

Link to comment
Share on other sites

I have the US version, but the errors I get when compiling are more then that.

Well I don't know much about scripting but I don't think that just that line could cause all the errors I see.

I sent Darth333 the log of it, ask her about it please tk102.

Tho I could compile the script I wanted, but there were several errors in my nwscript.nss even when I used Darth333's one I had issues, of course if you want I can send you my nwscript.nss.

Link to comment
Share on other sites

Originally posted by Uchiha Itachi

I have the US version, but the errors I get when compiling are more then that.

Well I don't know much about scripting but I don't think that just that line could cause all the errors I see.

I sent Darth333 the log of it, ask her about it please tk102.

Tho I could compile the script I wanted, but there were several errors in my nwscript.nss even when I used Darth333's one I had issues, of course if you want I can send you my nwscript.nss.

You were compiling nwscript. Use the batch file provided in the "How to compile scripts" tutorial (it should work now) or use the following command:

nwnnsscomp -v1.00 myscript.nss

 

edit: when you use

 nwnnsscomp -c *.nss

you are compiling all the .nss files in your folder. If you want to compile them all without compiling nwscript.nss, you have to use the batch file made by tk.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...