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.
: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?
"Excellent" It worked!!!!
I don't know how you figured that one out but thanx!
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.
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.
Originally posted by Darth333
Thanks for that info :)
Agreed! :D Good catch tk! ;)
*Goes back to impatiently awaiting the PC version of TSL*
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 (
http://www.lucasforums.com/showthread.php?s=&postid=1503663#post1503663) (steps 5 & 6)
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.
Modding KotOR makes you strong. :)
I used this for a couple of days and it worked perfectly. Now - without changing a single thing - it still compiles, but with a massive list of errors.
No idea what happened.
maybe you compiled nwnscript.nss by mistake ??
That seems to be what's happening. What I don't understand is why it didn't do the same before.
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.
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 *.ndbor
nwnnsscomp -v1.00 tk*.nss
del *.ndb
I'll also refer you to a Command Prompt Trick (
http://www.lucasforums.com/showthread.php?s=&threadid=130750)
The command prompt is your friend. Why doesn't anyone believe me? :D
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
Originally posted by tk102
The command prompt is your friend. Why doesn't anyone believe me? :D
An unhealthy exposure to far too much Windoze! :bored: Will do that to most people. :D
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
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 );
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
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:
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.
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.
I can only do like this:
nwnnsscomp -c myscript.nss
Cuz if I do with one of the ways you said I get that weird error that only says the version of the nwnnsscomp.
And with the bat file it says its compiled but it is nowhere in the folder.
I've been working more on the compiler, and I now have it set up so you can either:
1) put the desired nwscripts.nss in the same folder as the compiler (just as always)
2) specify an explicit path to the nwscript.nss file
3) specify the game version via a command line switch (-g = 0 or 1, meaning K1 or K2), which allows, in order of precedence:
(a) the compiler to read the file from override\nwscript.nss for the specified game, if it exists there
or
(b) the compiler to read the file from scripts.bif for the specified game
These extra options should cover alll of the possibilities, don't you think? Or have I missed something?
In order to update the "How to compile scripts" tutorial, I was wondering if, for international versions, nwscript.nss has been fixed with the latest patch? Can someone verify pleeeeease? :)
I confirm, for the French version, nwscript.nss has been fixed with the latest patch.
Merci! That will make things much simpler for a lot of people.