Sign in to follow this  
uwadmin12

Help: K1 Kotor Tool OutOfMemoryException With Extracted Nss Script

Recommended Posts

This may be a dumb question. Before I begin, I installed the Kotor Tool from here, and I am pretty sure I installed it properly.

 

When I double click the nss and ncs files in the Kotor Tool resource list (Tree View), the text editor brought up the code and there is no problem. However, when I extract a single file or a group of nss and/or ncs files to a new directory, and try to open it through Right Click -> Open With -> Kotor Tool, then I get two weird errors:

1. Opening Nss File, I get System.OutOfMemoryException:

image.png.99bbc5932baa3285bb6bec7754d594d8.png

The complete error message is here: NssError.txt

2. Opening Ncs File, I get Unable to read beyond the end of the stream Error:

image.png.729c579addd5a335e3b658c70a86931f.png

The complete error message is here: NcsError.txt

---------------------------------------

I highly suspect I am missing something obvious. I double checked the README file, the description in the download page but might still missed it. Has anyone dealt with similar issue and can shed some light?

I am really hoping to fix this issue and start working with scripts. Any help would be much appreciated!

 

Edited by uwadmin12

Share this post


Link to post
Share on other sites
Guest Qui-Gon Glenn

Interesting errors, but entirely avoidable.

1 - .nss file, open KTool text editor first and then open the file in question.

2 - .ncs file, nothing to see it is byte code. .ncs is simply the compilation of .nss

3 - any text editor can open and edit .nss scripts, I use notepad quite a bit for this purpose.

Share this post


Link to post
Share on other sites

Thanks man for the tip! Now I see this issue isn't a blocker and is just some slight inconvenience.

The reason I tried to open ncs file to begin with was to DeNCS certain module-contained scripts. The DeNCS failed, and I wanted to open it to ensure the file is in good condition, but got blocked by this error. 💀

Now that I tried DeNCS again, I am able to DeNCS/partially DeNCS most files except the one I wanted, (k_trg_calonord2.ncs in eastern dune sea module). Smh, smh... 

I'll do more trial and error to figure sh#t out and would appreciate any enlightenment on this matter.

Share this post


Link to post
Share on other sites
53 minutes ago, uwadmin12 said:

most files except the one I wanted, (k_trg_calonord2.ncs in eastern dune sea module)

There are three potential cases for a decompile error:

  1. The file cannot be decompiled, period (not true in this case). Obtaining bytecode is the only option.
  2. The file will only decompile with the game-appropriate nwscript.nss in the DeNCS folder.
  3. You have the @JCarter426 disease and can't decompile a script that everyone else can due to some weird system shenanigans.

k_trg_calonord2.nss

For reading/editing NSS, I would recommend Notepad++ with the Odyssey++ user defined language.

  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you @DarthParametric so much for saving my ass again!!! I will try installing some Windows VM and decompile on there to see if it resolves my issue. Worse comes to worst I'll try it on some school lab computer 💀.

Quote

For reading/editing NSS, I would recommend Notepad++ with the Odyssey++ user defined language.

Will try!

Edited by uwadmin12

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this