Recommended Posts

Greetings, fellow Jedi! May the Force be with you all. :cheers:

I have the DeNCS I grabbed from this post, but its format is on JAR. I have no experience with JAR files before and I'm kind of lost.

  • Can someone explain one-or-two basic move to have the DeNCS running?

Many thanks for considering this!

Share this post


Link to post
Share on other sites

It's a Java executable, so all you do is double click it to run it (assuming you have the Java Runtime Environment installed). After that you simply browse and load the NCS file you want to decompile. When you close the file, it will ask if you want to save it as an NSS.

You need a copy of nwscript.nss in the same folder, but I would advise making two copies of the program in two separate folders. Set one up with K1's nwscript.nss and the other with TSL's nwscript.nss.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, DarthParametric said:

It's a Java executable, so all you do is double click it to run it (assuming you have the Java Runtime Environment installed).

Thanks! I was downloading the 1.6.0 version as instructed in the readme but it seems what's your suggesting is the latest version; I'll go with that.

Quote

After that you simply browse and load the NCS file you want to decompile. When you close the file, it will ask if you want to save it as an NSS.

You need a copy of nwscript.nss in the same folder, but I would advise making two copies of the program in two separate folders. Set one up with K1's nwscript.nss and the other with TSL's nwscript.nss.

Thank you for the instructive details! Very much appreciated. :cheers:

Update: Greetings, @DarthParametric- I hope you don't mind me summoning you. I'm having this message on my end: "Decompiling...k_pend_trask_d.ncs: partial-could not recompile" which resulting the generated NSS couldn't be compiled back to NCS with KotOR Tool. Am I missing something substantial here? 🤔

Edited by ebmar

Share this post


Link to post
Share on other sites

Hello, ebmar!

I can answer your question. DeNCS does decompile most scripts "partially" but that is sufficient to display their content.

All you need to do is to right click on the Original or the Recompiled window that appears and choose "View Decompiled Code". 

In my experience with the original files, I would estimate around 20-25% of compiled script which DeNCS fail completely at decompiling (for a few of them there is the source available in the game files though) while the majority does decompile partially.

Cheers!

  • Thanks 1

Share this post


Link to post
Share on other sites
4 hours ago, ebmar said:

"Decompiling...k_pend_trask_d.ncs: partial-could not recompile" which resulting the generated NSS couldn't be compiled back to NCS with KotOR Tool. Am I missing something substantial here?

I would guess you tried decompiling it with TSL's nwscript.nss. Make sure you are using the version with K1's nwscript.nss, as I suggested by having two separate versions. If that still doesn't work, then you probably have JCarter's disease. He can't decompile certain scripts which other people can for some reason.

  • Thanks 1

Share this post


Link to post
Share on other sites

First, thank you both for the feedback! :cheers:

5 hours ago, DarthParametric said:

I would guess you tried decompiling it with TSL's nwscript.nss. Make sure you are using the version with K1's nwscript.nss...

I am certain that was using K1's nwscript.nss in the same folder with DeNCS.jar; as I extracted the said NSS straight by the KTool.

Quote

If that still doesn't work, then you probably have JCarter's disease. He can't decompile certain scripts which other people can for some reason.

Dang. More likely; as I had these two different report from two different scripts:

  • Decompiling...k_pend_trask_7.ncs: success

  • Decompiling...k_pend_trask_d.ncs: partial-byte code does not match

5 hours ago, Salk said:

Hello, ebmar!

Hello, Salk!

Quote

DeNCS does decompile most scripts "partially" but that is sufficient to display their content.

All you need to do is to right click on the Original or the Recompiled window that appears and choose "View Decompiled Code".

Many thanks for the information! I can see what's inside the decompiled script now. :cheers:

Quote

In my experience with the original files, I would estimate around 20-25% of compiled script which DeNCS fail completely at decompiling (for a few of them there is the source available in the game files though) while the majority does decompile partially.

Thanks for the insight! It seems to only see the what's inside the script/decompiled code was sufficient enough, as we can actually copy-paste the code to a text-editor, and then recompile it again using KotOR Tool, isn't it? Or DeNCS most likely failed to decrypt the code so there will be missing codes from the original?

Share this post


Link to post
Share on other sites
12 minutes ago, ebmar said:

Decompiling...k_pend_trask_d.ncs: partial-byte code does not match

Yeah that's fine. You can still save the NSS.

12 minutes ago, ebmar said:

Or DeNCS most likely failed to encrypt the code so there will be missing codes from the original?

DrMcCoy (lead Xoreos dev) explains here why certain scripts fail to decompile.

  • Thanks 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites

And just as a note, the task to extend the xoreos NWScript disassembler into a decompiler is still open :P. More information on that can be found here: https://github.com/xoreos/xoreos-tools/issues/16

Likewise, the task for an assembler, and then compiler, is also still open, probably. The person who started working on it has been silent for a few months now: https://github.com/xoreos/xoreos-tools/issues/17

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.