CarthOnasty

Requesting Some Decompiled Scripts Please

Recommended Posts

I've been having a hell of a time attempting to get scripts decompiled. I've tried DeNCS (keeps failing), KotOR Scipting Tool (errors out and crashes), and xoreos-tools (I can't read bytes). If anyone would be so kind, I'm attempting to get the holo scripts from the Rancor Trio room on Taris. (I believe the mod is tar_m03ad.) There are some scripts in there named holoon, holooff, holoboom, etc. I've tried to find the source, but couldn't find anything that matched up. So if anyone would be so kind as to attempt a decompile on their end, I'd be much obliged. TYIA.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, CarthOnasty said:

xoreos-tools (I can't read bytes)

Yeah, ncsdis in xoreos-tools is a disassembler, not a decompiler. You won't get anything like the original script source out of it, but a more direct representation of the underlying bytecode.

With some prior knowledge of assembly and the internals of NWScript, it is readable and understandable. But it's hardly comfortable, yes.

There is an open task, up for grabs, to extend the disassembler into a full-fledged decompiler: https://github.com/xoreos/xoreos-tools/issues/16. If anybody reading here feels up for it, please work on this. I'd just request that you comment on that GitHub tracker issue, so that this can be coordinated properly.

Likewise, there's an open task to create an NWScript compiler (which will then be able to handle all the games under one single "roof", so to speak): https://github.com/xoreos/xoreos-tools/issues/17.

I made some hubbub to advertise these issues yesterday, and there's already two people who expressed interest in working on the compiler. If we're lucky, this might be there in the not so distant future. I know, I know, there do exists versions of the OpenKnights nwnnsscomp that work with KotOR/KotOR2, but I still think this might be of interest to some people here.

(Also, this might be, AFAIK, the first NWScript compiler that can handle Dragon Age: Origins and Dragon Age II scripts, what with the 4 new opcodes (two for arrays and two for references). Me, I'm pretty excited about that. YMMV, though. :P)

In either case, anybody wanting to help there, please chime in on these GitHub issues.

Share this post


Link to post
Share on other sites
On ‎6‎/‎8‎/‎2018 at 10:07 AM, DarthParametric said:

The key with DeNCS is using the correct game nwscript.nss. 

K1_tar_m03ad_holo_scripts.7z

Can you please tell me how to do this? There are some scripts I want to decompile for a mod. Thank you in advance.

Share this post


Link to post
Share on other sites

Have two copies of DeNCS, one for each game with the game-specific nwscript.nss. Read the readme that comes with it.

Although DeNCS will not decompile every script. Some scripts simply cannot be decompiled and the best that can be done is to look at the bytecode.

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.