need ncs -> nss compiler

+
need ncs -> nss compiler

like in topic name.i have few versions of nwnnsscomp.exe and neverwinter installed. still the decompiled ncs files looks like ****. most part is translated to hex, dont know why.
 
Try this:Take "nwscriptdefn.nss" located in "the witcher\system\scripts", rename it to "nwscript.nss", and put it in the same directory as "nwnnsscomp.exe" along with your .ncs files.Now all the new functions defined for the witcher will get recognized by nwnnsscomp.But, decompiled scripts will STILL be in "hex", but you'll recognize the functions and most variables, and it will give you a good idea on how the script functions.
 
yep, they are in hex regardless of that nwscript.nss file, i dont see any difference :(. well, i know how to edit hex but im afraid that these .nss files wont work in the game.but thanks for the input
 
Well, if you just want to change a value, you can find the value you want in the decompiled script, then find it in the original, hex edit it. i used this method on the scripts for the rune stones to make them last forever.or you can remake the script based on the stuff you got from the decompiled one.
 
No no! sorry i should be more clear..The decompiled file is not nss, it's some form of byte code, and is to be used merely as reference.for example, the file "it_grease_22.ncs", after decompiling, look at the code and you'll find these lines:
Code:
0000034D 04 03 000005A0      CONSTI 000005A000000353 03 01 FFFFFFF8 0004   CPTOPSP FFFFFFF8, 00040000035B 04 05 000A str      CONSTS "grease_022"00000369 05 00 0325 03      ACTION AddGreaseAbility(0325), 03
this is a function to add grease to a sword wich goes like this:"int AddGreaseAbility(string sAbility, object oItem = OBJECT_SELF,int nMinutes = 0);"now the first constant in the code is 05A0, which is 1440 in decimal, and is the duration in minutes.next constant is the ability that will be applied from the lua filethen the action being applied using these constants on the previously defined object.this gives you a basic idea on what to do if you are remaking the script, but if you want to change a value, let's use the duration like i did, u take the value "05A0" and find it in the original NCS script and hex edit it. and that's the file going in your override, the now modified NCS.If you have the time, you can write some basic scripts, compile it, and then decompile it using nwnnsscomp to see what it would look like.
 
yep, but thats just the numeric values. editing whole nss script is impossible in this form. now editing nss files is limited to simple item changes and nss files can contain almost everything.still, thank you very much.
 
i believe what he's saying is that there is enough information with function calls and arguments listed in the hex output that you could create a new script of your own using that list of function calls and arguments.You'd have some idea of the order and what steps were taken and you'd just need to experiment a bit to get the right .nss file (the new one you make) to do what the other ncs file was doing (modulo your changes)so it is a method, if slow and closer to detective work than decompiling :)
 
yes, but that's not what i need. im not going to write new scripts to modify a game. i'd like to edit existing ones and basing on the form we get from current decompiling, edition is limited.thats why im asking for good decompiler. for now, we have only workarounds. i now that it'll work but i'm not so fond of doing it this way.
 
Or, they could just release the NSS sources, like Bioware used to do with Neverwinter Nights. It would be much easier.
 
Why the hell shall every modder ask them personally? They can release the codes to ALL modders like Bioware did. :mad:
 
Sorry, to revive this old thread, but I have a question. Can I run this decompiler without having nwn installed? Do I have to put the compiler in a special directory?

So far I have managed to create the batch file (.cmd file) which is described in the download section for the compiler. But it gives me some errors. If I put it in the The Witcher folder the badch file is unable to find the directory due to the fact that it uses spaces in the directory name (eg C:\Program Files (x86)\The Witcher Enhanced Edition\Data\Djinni). If I put it somewhere else (without the spaces) i get the mesaage that the program cannot find nwn (of course not, I have not installed it).

Any ideas? If it is not possible without nwn installed, then I will not be able to decomile scripts.

Kind regards,
G.
 
OneRing said:
Sorry, to revive this old thread, but I have a question. Can I run this decompiler without having nwn installed?
To the best of my knowledge, you do need Neverwinter Nights installed for the decompiler to work. I haven't used the decompiler much because it doesn't work all that well, so I've found it fairly useless. I do have a copy of NWN, though, so it's possible that there's a work-around that I haven't tried.


OneRing said:
Any ideas? If it is not possible without nwn installed, then I will not be able to decomile scripts.
Neverwinter Nights is available from GOG.com for $9.99. I gave up on the decompiler after a couple of tries, though, because it doesn't decompile the scripts all the way.

Since you're good with the Search function, I'm assuming that you already know about the uncompiled scripts that the Infrit boys wheedled out of CDPR. They didn't manage to get all of them, unfortunately -- nowhere near -- but the scripts for potions, spells, food, and a couple of other things are available.
 
Corylea said:
To the best of my knowledge, you do need Neverwinter Nights installed for the decompiler to work. I haven't used the decompiler much because it doesn't work all that well, so I've found it fairly useless. I do have a copy of NWN, though, so it's possible that there's a work-around that I haven't tried.



Neverwinter Nights is available from GOG.com for $9.99. I gave up on the decompiler after a couple of tries, though, because it doesn't decompile the scripts all the way.

Since you're good with the Search function, I'm assuming that you already know about the uncompiled scripts that the Infrit boys wheedled out of CDPR. They didn't manage to get all of them, unfortunately -- nowhere near -- but the scripts for potions, spells, food, and a couple of other things are available.

Thanks again for the quick reply. as you assumed correctly, I have already downloaded the available scripts and have, of course, skimmed through the ones avaiable in the CDPR adventures. But the one I wanted to customise I did not found there. But it is no big deal - it would have just shhortened time on a bit of work if I could have seen how CDPR had done it. But I think I can figuere it out by myself. Will just take much longer, but so be it.

On an afterthought: would nwn 1 suffice for the decompiler to work? I have nwn 1 here. But I was so disappointed by it, that I never ever tried nwn 2. I played with the idea to buy it only because I heard that the editor tool was much better than the one in nwn 1, which was rather disappointing, too.

Thanks again for everything.

Kind regards,
G.
 
OneRing said:
On an afterthought: would nwn 1 suffice for the decompiler to work? I have nwn 1 here.
The decompiler I know about works with NVN 1. I guess the Aurora Engine was used in both NVN1 and NVN2, so toolsets for either one might apply to TW1. Everything I've heard about that works with TW1 is NVN 1-based, not NVN 2-based, but like you, I don't have NVN 2, so I haven't investigated those things as thoroughly.

I reply to you even when I don't have 100% of the answers you want because TW1 modders have mostly moved on, and not many of them are around anymore. Fantasta checks in once in a while and Flash once in a VERY great while, but mostly you're stuck with me.
 
Corylea said:
The decompiler I know about works with NVN 1. I guess the Aurora Engine was used in both NVN1 and NVN2, so toolsets for either one might apply to TW1. Everything I've heard about that works with TW1 is NVN 1-based, not NVN 2-based, but like you, I don't have NVN 2, so I haven't investigated those things as thoroughly.

I reply to you even when I don't have 100% of the answers you want because TW1 modders have mostly moved on, and not many of them are around anymore. Fantasta checks in once in a while and Flash once in a VERY great while, but mostly you're stuck with me.
Hey, that are good news. Thanks again.

And what do you mean by "you're stuck with me" - that is actually quite the pleasure: you are so nice and helpful, really one of the nicest persons I have ever met on an internetforum! :) *big hug*
 
Top Bottom