Jump to content

Home

Compiling Scripts


*Atris*

Recommended Posts

Atris, I think you should use Fred's compiler executable, but don't actually use KT to compile (via Project Builder). It's as effecient as cleaning bathroom with a toothbrush. :o:p (erm, sorry.. but in time I kind of started to hate that KT feature...).

Extract all scripts sources (nss) to a separate directory, copy Fred's nnwnsscomp.exe to that directory too, and use some kind of batch file.

Link to comment
Share on other sites

Well, in a practical scenario, I always need to compile one or two scripts at a time, therefore my batch looks like this:

 

@echo off
nwnnsscomp -c somescript

 

Mind, that I am using previous version of Fred's compiler.

If you have the latest version, it would probably look like this:

 

@echo off
nwnnsscomp -c g 2 somescript

 

g switch is for game version (2 means TSL).

Link to comment
Share on other sites

Originally posted by *Atris*

well i cant even load up nwnnsscomp, right sorri but treat me as if im an idiot (which i am but...) ive downloaded the nwnnsscomp and nwsript where do i put them?

 

Just anywhere you want. Create some custom directory where you will store all your scripting stuff. Keeps things organized. :D

 

Files in your directory:

 

nwnnsscomp.exe

nwscript.nss

somescript.nss

compile.bat

 

 

compile.bat is a batch file containing the lines I posted above. somescript.nss is the script you actually want to compile. Then you just double-click on compile.bat and off it goes. If everything goes well, you should find somescript.ncs in that same directory.

Link to comment
Share on other sites

Ok, change your bat file to look like this (basically add "pause" at the end) and check what it says in the dos window. (or better, post a screenshot of that)

 

@echo off
nwnnsscomp -c g 2 somescript
pause

Link to comment
Share on other sites

I have a new version of Kotor Tool (which will be posted tonight) that knows how to compile Kotor II:TSL projects.

 

You just need to have created an override folder in your Kotor II:TSL game directory and placed the "fixed" version of nwscript.nss in it to prepare for using the updated Project Manager.

 

The instructions for using the Project Manager feature are here

 

(Bear in mind these apply to Kotor Tool version 1.0.1900.26653 or later, which is due to be released later today {2005-3-15})

Link to comment
Share on other sites

 

What is that? :confused:

Are you sure you are using Fred's compiler? I've never seen such message.

 

You obviously have Kotor Tool. Go to c:\program files\fred tetra\kotor tool and find nwnnsscomp.exe there. Copy it to your custom Scripts directory which you created (and obviously overwrite the other executable you have there). And try again.

 

Also post the script you are trying to compile. Just to make sure.

Link to comment
Share on other sites

 

In my limited experience, I have noticed that the nwnnsscomp.exe from the kotor tool site is fickle. I haven't been able to make it compile without giving --outputdir and -g switches.

 

I put all my scripts in a Source sub-folder, and then create an Override sub-folder. So I have nwnnsscomp.exe, nwscript.nss, compile.bat files and Override and Source sub-folders in one directory.

D:.
¦   compile.bat
¦   nwnnsscomp.exe
¦   nwscript.nss
¦
+---Override
¦       script1.ncs
¦       script2.ncs
¦
+---Source
       script1.nss
       script2.nss

 

Then I run the batch file:

cls
@echo off
echo.
echo Compiling scripts from Source to Ovveride
nwnnsscomp.exe -c -g 2 --outputdir "Override" "source\42_eb_cargo.nss" "source\k_003ebo_enter.nss"
tree /f
pause

 

I have never been able to get the Project Manager in kotor tool to work (same error that you showed). I'm looking forward to the new version tonight to try again. I had assumed that it was because I was running .NET 2.0 instead of 1.1.

Link to comment
Share on other sites

Kotor Tool hasn't supported TSL script compilation via the Project Manager prior to the upcoming release, so if you were getting errors, this is most likely the reason.

 

Edit: The version posted 2005-3-15 (v1.0.1900.40262 (2005-3-15 23:27)) has the support built in.

 

See here

Link to comment
Share on other sites

Originally posted by Fred Tetra

Kotor Tool hasn't supported TSL script compilation via the Project Manager prior to the upcoming release, so if you were getting errors, this is most likely the reason.

 

Edit: The version posted 2005-3-15 (v1.0.1900.40262 (2005-3-15 23:27)) has the support built in.

 

See here

 

If anyone cares, the new version of kotor tool compiled fine for me. 8)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...