lfnetwork.com mark read register faq members calendar

Thread: DeNCS Script Decompiler
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 05-22-2005, 02:56 PM   #1
Dashus
Rookie
 
Dashus's Avatar
 
Join Date: Apr 2005
Posts: 105
DeNCS Script Decompiler

TSLRP would like to announce the release of DeNCS Script Decompiler Beta 1. This is a GUI NCS-Script Decompiler written entirely in Java and uses the latest beta build of the JRE (1.6.0) to take advantage of the additional features it offers. The J2SE 1.6.0 beta can be obtained here.

While we encourage any suggestions/feature additions/critiques in this thread please note that this is merely a public release of a TSLRP internal tool; we do not plan on making updates to this a high priority. It will sometimes fail but it works for the majority of the scripts tested. At present it will only work on KotOR2 scripts. See the readme for more details.

Just a warning: this program can take up serious amounts of RAM with prolonged use.

Last edited by Dashus; 05-31-2006 at 01:04 PM.
Dashus is offline   you may: quote & reply,
Old 05-22-2005, 03:06 PM   #2
Jeff
Rating: Awesome
 
Jeff's Avatar
 
Status: Administrator
Join Date: Jan 2005
Location: Chicago, IL, USA
Posts: 8,431
Current Game: SWTOR
Imperialist Meatbags Guild Officer The Walking Carpets Guild Officer Notable contributor LFN Staff Member 
This will help me out a lot when I need to know what script somebody used so I can use that for my script. Great job.


Follow me on Twitter
Follow StarWarsMMO.net on Twitter | Like us on Facebook
Jeff is offline   you may: quote & reply,
Old 05-22-2005, 03:18 PM   #3
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
So what format does this decompile the scripts to. does it completly convert them to there *.nss format or to the *.pcode format?

I know I'll give it a go. However a script decompiler that uses that much RAM hopefully will be worthwhile as our current decompilers don't need that much memory.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 05-22-2005, 03:43 PM   #4
Dashus
Rookie
 
Dashus's Avatar
 
Join Date: Apr 2005
Posts: 105
Quote:
Originally posted by Darkkender
So what format does this decompile the scripts to. does it completly convert them to there *.nss format or to the *.pcode format?

I know I'll give it a go. However a script decompiler that uses that much RAM hopefully will be worthwhile as our current decompilers don't need that much memory.
*.nss format is what you can save them as.

We only recommend 256 so you can do other things (ie run Eclipse IDE which is a known memory hog) as well without having to worry about anything. Decompiling normal scripts (those with a main method and a handful of subroutines) only cause minor increases in RAM usage. I was able to decompile 2 dozen scripts and the RAM usage came to rest at about 30MB. The real problem lies in closing tabs; the program generates data that can get pretty big for larger files and it doesn't deallocate all of it. So prolonged use isn't going to do your RAM any favors
Dashus is offline   you may: quote & reply,
Old 05-22-2005, 05:36 PM   #5
Keiko
Forumite
 
Join Date: Jan 2005
Location: USA
Posts: 591
Thank you.


Keiko is offline   you may: quote & reply,
Old 05-23-2005, 02:57 PM   #6
Fred Tetra
Kotor Tool Guy
 
Fred Tetra's Avatar
 
Join Date: Jan 2004
Location: What a creepy photo, eh? Had to use it!
Posts: 947
Hot Topic Starter LFN Staff Member Helpful! Notable contributor 
Thumbs up

Very nice work - quite impressive!

I almost started working on something like this, but other Kotor Tool features took precedence.

You might want to mention in the Readme file that the command to start DeNCS is:

java -jar dencs.jar

Not everyone is familiar with Java


Kotor Tool Developer
http://kotortool.starwarsknights.com/

"You want to help everyone who asks for aid, answer all of their questions, write that crucial bit of code for which they're searching, and be the hero who saves the day (and their job), but there comes a point when you realize that sleep is sometimes necessary."
—Stephen Toub

Visit the Kotor Tool Forum
Fred Tetra is offline   you may: quote & reply,
Old 05-23-2005, 04:11 PM   #7
Dashus
Rookie
 
Dashus's Avatar
 
Join Date: Apr 2005
Posts: 105
By default I believe installing the JVM will associate jar files with java.exe or javaw.exe, eliminating the need to use the command line. However, you are right, we probably should have mentioned the command line way anyways
Dashus is offline   you may: quote & reply,
Old 05-24-2005, 03:51 PM   #8
Fred Tetra
Kotor Tool Guy
 
Fred Tetra's Avatar
 
Join Date: Jan 2004
Location: What a creepy photo, eh? Had to use it!
Posts: 947
Hot Topic Starter LFN Staff Member Helpful! Notable contributor 
Since I installed an archive tool after the JVM, it took over the "handling" of Jar files.


Kotor Tool Developer
http://kotortool.starwarsknights.com/

"You want to help everyone who asks for aid, answer all of their questions, write that crucial bit of code for which they're searching, and be the hero who saves the day (and their job), but there comes a point when you realize that sleep is sometimes necessary."
—Stephen Toub

Visit the Kotor Tool Forum
Fred Tetra is offline   you may: quote & reply,
Old 07-15-2005, 11:26 AM   #9
Jeff
Rating: Awesome
 
Jeff's Avatar
 
Status: Administrator
Join Date: Jan 2005
Location: Chicago, IL, USA
Posts: 8,431
Current Game: SWTOR
Imperialist Meatbags Guild Officer The Walking Carpets Guild Officer Notable contributor LFN Staff Member 
I am trying to decompile a_doormoor.ncs (the script that fires when the morgue door opens on peragus) and I have JRE installed, and I extracted nwscript.nss to kotor tool directory, and then ran DeNCS, and opened that above script, and it is still decompiling for almost 10 minutes, and my hard drive is doing nothing. Is there something that I did not install correctly or that I am missing?


Follow me on Twitter
Follow StarWarsMMO.net on Twitter | Like us on Facebook
Jeff is offline   you may: quote & reply,
Old 07-15-2005, 11:45 AM   #10
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally posted by DarthMoeller
I am trying to decompile a_doormoor.ncs (the script that fires when the morgue door opens on peragus) and I have JRE installed, and I extracted nwscript.nss to kotor tool directory, and then ran DeNCS, and opened that above script, and it is still decompiling for almost 10 minutes, and my hard drive is doing nothing. Is there something that I did not install correctly or that I am missing?
Did you install the correct version of the Java Runtime Environment? You'll need some beta version and not the official release AFAIK.

Must have hanged if it works for 10 minutes on that script since it's a very simple script:
Code:
void main() {
    object oDoor = GetObjectByTag("MorgueDoor");
    SetLocked(oDoor, FALSE);
    DelayCommand(1.0, AssignCommand(oDoor, ActionOpenDoor(oDoor)));
}
Don't know what else could be wrong if you have the proper JRE, Java doesn't work on my machine for some reason so I can't test DeNCS and see if the script works to decompile here. :/
stoffe is offline   you may: quote & reply,
Old 07-15-2005, 11:47 AM   #11
JdNoa
Rookie
 
JdNoa's Avatar
 
Join Date: Apr 2004
Location: Canada
Posts: 39
Notable contributor 
Quote:
Originally posted by DarthMoeller
I am trying to decompile a_doormoor.ncs (the script that fires when the morgue door opens on peragus) and I have JRE installed, and I extracted nwscript.nss to kotor tool directory, and then ran DeNCS, and opened that above script, and it is still decompiling for almost 10 minutes, and my hard drive is doing nothing. Is there something that I did not install correctly or that I am missing?
a_doormor.ncs takes about 1 second on my computer
(edit: snipped redundancy)

You mean you installed JRE 1.6, right? Have you been able to decompile anything with DeNCS, or was this the first script you tried? If you try running with an earlier JRE, it will usually appear to do nothing.

Last edited by JdNoa; 07-15-2005 at 12:47 PM.
JdNoa is offline   you may: quote & reply,
Old 07-15-2005, 11:51 AM   #12
Jeff
Rating: Awesome
 
Jeff's Avatar
 
Status: Administrator
Join Date: Jan 2005
Location: Chicago, IL, USA
Posts: 8,431
Current Game: SWTOR
Imperialist Meatbags Guild Officer The Walking Carpets Guild Officer Notable contributor LFN Staff Member 
Quote:
Originally posted by JdNoa
You mean you installed JRE 1.6, right? Have you been able to decompile anything with DeNCS, or was this the first script you tried?
Yeah, I couldn't remember if I had it installed or not so i went to install it and it said it was already installed. This was the first script that I have tried to decompile.


Follow me on Twitter
Follow StarWarsMMO.net on Twitter | Like us on Facebook
Jeff is offline   you may: quote & reply,
Old 07-15-2005, 11:54 AM   #13
JdNoa
Rookie
 
JdNoa's Avatar
 
Join Date: Apr 2004
Location: Canada
Posts: 39
Notable contributor 
Quote:
Originally posted by DarthMoeller
Yeah, I couldn't remember if I had it installed or not so i went to install it and it said it was already installed. This was the first script that I have tried to decompile.
Could you go to your file type association and check which version of Java is associated with JAR files? (On my system you have to select Advanced and then Edit the action to get the actual path).

Edit: I'm going to just post all the scripts DeNCS was able to decompile on PCGameMods. Don't know why I didn't think of that earlier. :/
JdNoa is offline   you may: quote & reply,
Old 07-15-2005, 12:00 PM   #14
Jeff
Rating: Awesome
 
Jeff's Avatar
 
Status: Administrator
Join Date: Jan 2005
Location: Chicago, IL, USA
Posts: 8,431
Current Game: SWTOR
Imperialist Meatbags Guild Officer The Walking Carpets Guild Officer Notable contributor LFN Staff Member 
You know what, looks like I only have v1.5 installed. The folders under java say jre1.5. I'll get the updates version and then I'm sure it will work.


Follow me on Twitter
Follow StarWarsMMO.net on Twitter | Like us on Facebook
Jeff is offline   you may: quote & reply,
Old 07-15-2005, 12:45 PM   #15
JdNoa
Rookie
 
JdNoa's Avatar
 
Join Date: Apr 2004
Location: Canada
Posts: 39
Notable contributor 
Here's an archive of every script from K2 that DeNCS was able to decompile or partially decompile:

http://www.pcgamemods.com/14269/

You'll need a .7z (7zip) extractor (WinRAR or 7-Zip are the two I know of). Decompressed it's about 31MB.
JdNoa is offline   you may: quote & reply,
Old 07-15-2005, 01:01 PM   #16
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Dragon Age: Origins
Forum Veteran Helpful! Notable contributor 
Wow, thanks JdNoa!


tk102 is offline   you may: quote & reply,
Old 07-15-2005, 01:04 PM   #17
ChAiNz.2da
Brony 4 Life. Yo.
 
ChAiNz.2da's Avatar
 
Join Date: Oct 2004
Location: Tennessee (USA)
Posts: 6,847
Quote:
Originally posted by tk102
Wow, thanks JdNoa!
What tk said!

Wow! This will come in nice and handly like

EDIT: Just took a second glance over this and I must say, VERY nice touch by seperating these scripts by the area number! This will definitely help in finding what we're looking for...


"Eagles May Soar, But Weasels Don't Get Sucked Into Jet Engines"


| Mods (FF) (DS) | Folding | SWK.com | FB: (LF) (Me) | Steam | The Herd |

Last edited by ChAiNz.2da; 07-15-2005 at 02:26 PM.
ChAiNz.2da is offline   you may: quote & reply,
Old 08-27-2005, 09:55 PM   #18
maaneeack
Rookie
 
maaneeack's Avatar
 
Join Date: Oct 2003
Location: Bug Fixer Paradise
Posts: 81
I don't know if anyone is going to notice this thread, but I can't get DeNCS to decompile anything. I downloaded the 25mb jre file from the link given, but I also have jre 1.5.0 (I have eclipse 3.0 and ibm's RAD installed too).

DeNCS will work for a few seconds at 100% cpu, then my cpu will go back to its normal usage percent and nothing will change in the DeNCS window. I tried to use path:\to\jre1.6.0\bin\javaw.exe path:\to\kotortool\dencs.jar , but it gave me errors...
maaneeack is offline   you may: quote & reply,
Old 08-28-2005, 08:50 AM   #19
Tupac Amaru
Junior Member
 
Tupac Amaru's Avatar
 
Join Date: Mar 2005
Location: Tahuantinsuyu
Posts: 273
Quote:
Originally Posted by maaneeack
I don't know if anyone is going to notice this thread, but I can't get DeNCS to decompile anything. I downloaded the 25mb jre file from the link given, but I also have jre 1.5.0 (I have eclipse 3.0 and ibm's RAD installed too).

DeNCS will work for a few seconds at 100% cpu, then my cpu will go back to its normal usage percent and nothing will change in the DeNCS window.
DeNCS requires jre 1.6.0, it may not work with 5.0. You can download it here:
http://www.java.net/download/jdk6/binaries/

Make sure you have the latest version of nwnnsscomp.exe (1.03) in the same directory as DeNCS. If it's missing you get the behaviour you described.
Tupac Amaru is offline   you may: quote & reply,
Old 08-28-2005, 12:42 PM   #20
maaneeack
Rookie
 
maaneeack's Avatar
 
Join Date: Oct 2003
Location: Bug Fixer Paradise
Posts: 81
@Tupac - I downloaded the 25mb file from java.net and it has the jre (its just the jre: jre-6_0-ea-bin-b49-windows-i586-25_aug_2005.jar). Do I need the 1.6.0 JVM too?
maaneeack is offline   you may: quote & reply,
Old 08-28-2005, 06:47 PM   #21
Tupac Amaru
Junior Member
 
Tupac Amaru's Avatar
 
Join Date: Mar 2005
Location: Tahuantinsuyu
Posts: 273
Quote:
Originally Posted by maaneeack
@Tupac - I downloaded the 25mb file from java.net and it has the jre (its just the jre: jre-6_0-ea-bin-b49-windows-i586-25_aug_2005.jar). Do I need the 1.6.0 JVM too?
Don't think so. The JVM is included in the jre, AFAIK.
Tupac Amaru is offline   you may: quote & reply,
Old 08-28-2005, 07:48 PM   #22
JdNoa
Rookie
 
JdNoa's Avatar
 
Join Date: Apr 2004
Location: Canada
Posts: 39
Notable contributor 
You only need the jre.

You could use the full path for java from the command line to make sure you're using 1.6. I often do that because I have 3 versions installed and my path variable never seems to be set up to use the one I want.
So, frex, on my computer:
H:>"g:\program files\java\jre1.6.0\bin\java.exe" -jar dencs.jar

Alternately, you could go to your environment variables and check which java version is in your Path variable.
JdNoa is offline   you may: quote & reply,
Old 08-28-2005, 09:17 PM   #23
maaneeack
Rookie
 
maaneeack's Avatar
 
Join Date: Oct 2003
Location: Bug Fixer Paradise
Posts: 81
It decided to work properly that time. Thanks.

Now I need to figure out a better way to add something to dm_bmedbox80.ncs (it won't decompile fully).
maaneeack is offline   you may: quote & reply,
Old 08-29-2005, 05:49 AM   #24
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by maaneeack
Now I need to figure out a better way to add something to dm_bmedbox80.ncs (it won't decompile fully).
Since it's not a standard script that comes with the game the easiest way is probably to ask the one who made the mod it belongs to for the source code.

stoffe is offline   you may: quote & reply,
Old 10-12-2005, 07:32 PM   #25
kdsphantom
Rookie
 
kdsphantom's Avatar
 
Join Date: Sep 2005
Location: on a planet far far away
Posts: 104
Quote:
Originally Posted by JdNoa
Here's an archive of every script from K2 that DeNCS was able to decompile or partially decompile:

http://www.pcgamemods.com/14269/

You'll need a .7z (7zip) extractor (WinRAR or 7-Zip are the two I know of). Decompressed it's about 31MB.
correct link is now (took me few min to find hope this helps next guy(gal) out
http://www.pcgamemods.com/mod/14269.html


and thank you Jdnoa !
kdsphantom

Last edited by kdsphantom; 10-12-2005 at 07:34 PM. Reason: cat jumped on keyboard
kdsphantom is offline   you may: quote & reply,
Old 01-19-2006, 01:46 AM   #26
rgdelta
Junior Member
 
rgdelta's Avatar
 
Join Date: Aug 2005
Posts: 303
Ok I have a problem trying to decompile anything I have all the proper files and I am running JRE 1.6.0-rc-b67 the very lastest version here is what happens I open a script and nothing happens here is what I am getting in the console.

Quote:
read actions. There were 877

---> starting decompilation: a_sion_cut.ncs <---
Variable Naming: consider adding GetPositionFromLocation
Variable Naming: consider adding GetPositionFromLocation
Variable Naming: consider adding EffectMovementSpeedDecrease
Variable Naming: consider adding GetPositionFromLocation
Variable Naming: consider adding GetPositionFromLocation
Execing nwnnsscomp -d -g 2 -o "D:\My Documents\My Development\Knights of the Old
Republic\Knights of the Old Republic 2 - The Sith Lords Enhanced\Development\Mo
dules\a_sion_cut.pcode" "D:\My Documents\My Development\Knights of the Old Repub
lic\Knights of the Old Republic 2 - The Sith Lords Enhanced\Development\Modules\
a_sion_cut.ncs"
OUTPUT>Lookup path root set to: E:\Program Files\LucasArts\SWKotOR2\
OUTPUT>Decompiling: a_sion_cut.ncs
OUTPUT>Total Execution time = 47 ms
Execing nwnnsscomp -c -g 2 -o "E:\Program Files\LucasArts\SWKotOR2\_generatedcod
e.ncs" "E:\Program Files\LucasArts\SWKotOR2\_generatedcode.nss"
OUTPUT>Lookup path root set to: E:\Program Files\LucasArts\SWKotOR2\
OUTPUT>Compiling: _generatedcode.nss
OUTPUT>Total Execution time = 47 ms
Execing nwnnsscomp -d -g 2 -o "E:\Program Files\LucasArts\SWKotOR2\_generatedcod
e.pcode" "E:\Program Files\LucasArts\SWKotOR2\_generatedcode.ncs"
OUTPUT>Lookup path root set to: E:\Program Files\LucasArts\SWKotOR2\
OUTPUT>Decompiling: _generatedcode.ncs
OUTPUT>Total Execution time = 62 ms
Exception in thread "Thread-2" java.lang.NoSuchMethodError: javax.swing.JTabbedP
ane.getTabComponentAt(I)Ljavax/swing/JComponent;
at com.knights2end.nwscript.decomp.Decompiler.stateCh anged(Decompiler.ja
va:332)
at javax.swing.JTabbedPane.fireStateChanged(JTabbedPa ne.java:312)
at javax.swing.JTabbedPane$ModelListener.stateChanged (JTabbedPane.java:2
44)
at javax.swing.DefaultSingleSelectionModel.fireStateC hanged(DefaultSingl
eSelectionModel.java:116)
at javax.swing.DefaultSingleSelectionModel.setSelecte dIndex(DefaultSingl
eSelectionModel.java:50)
at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabb edPane.java:500)
at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPa ne.java:486)
at javax.swing.JTabbedPane.insertTab(JTabbedPane.java :617)
at com.knights2end.nwscript.decomp.Decompiler.newNCST ab(Decompiler.java:
749)
at com.knights2end.nwscript.decomp.Decompiler.newNCST ab(Decompiler.java:
661)
at com.knights2end.nwscript.decomp.Decompiler.decompi le(Decompiler.java:
833)
at com.knights2end.nwscript.decomp.Decompiler.open(De compiler.java:991)
at com.knights2end.nwscript.decomp.Decompiler.access$ 0(Decompiler.java:9
79)
at com.knights2end.nwscript.decomp.Decompiler$3.run(D ecompiler.java:962)
Then if I try save or try to click anywhere it gives me more errors.
rgdelta is offline   you may: quote & reply,
Old 01-19-2006, 01:51 AM   #27
JdNoa
Rookie
 
JdNoa's Avatar
 
Join Date: Apr 2004
Location: Canada
Posts: 39
Notable contributor 
Argh, Razorfish mentioned this a few days ago. They changed one of the methods in the new JRE recently. (This is what we get for using a beta version...) Bleh. I'm kind of swamped with school work at the moment (essay due in one hour, whee!), so I can't fix anything right now. Sorry. :/ Um... I don't suppose the script archive would help you?
JdNoa is offline   you may: quote & reply,
Old 01-19-2006, 02:06 AM   #28
rgdelta
Junior Member
 
rgdelta's Avatar
 
Join Date: Aug 2005
Posts: 303
Unfortunatly the 2 scripts I need in the archive have the compare does not match the scripts are a_sion_cut.ncs and a_sion_cut2.ncs but I could see if the USM team has those scripts as they modified them or if the version in the archive work right in game.

For tonight I will try the ones in the archive and see if I have any bugs.

Thanks for the quick respond.

I tried the ones in the archive and they are bugged the npc's don't move I will just ask the USM scripter if he still has his original NSS

Last edited by rgdelta; 01-19-2006 at 03:20 AM.
rgdelta is offline   you may: quote & reply,
Old 01-19-2006, 07:29 AM   #29
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by rgdelta
Unfortunatly the 2 scripts I need in the archive have the compare does not match the scripts are a_sion_cut.ncs and a_sion_cut2.ncs
Here are two scripts that match a_sion_cut and a_sion_cut2 without any errors, if those in the decompiled archive doesn't work:

Code:
// ST: a_sion_cut.nss (153HAR_s.rim)

void main() {
    object oSion = GetObjectByTag("DarthSion");
    if (!GetIsObjectValid(oSion)) {
        AurPostString("Darth Sion isn't here, don't bother with the rest of the cut scene", 5, 7, 10.0);
        return;
    }
    
    SetPartyLeader(NPC_PLAYER);
    
    object oPC = GetFirstPC();
    object oAtton = GetObjectByTag("atton");
    object oKreia = GetObjectByTag("kreia");
    
    if (!GetIsObjectValid(oAtton) || !GetIsObjectValid(oKreia)) {
        AurPostString("No Atton or Kreia, don't bother with the rest of the cut scene", 5, 7, 10.0);
        return;
    }
    
    int nParam = GetScriptParameter(1);
    switch (nParam) {
        case 0: {
            AssignCommand(oPC,    ClearAllActions());
            AssignCommand(oKreia, ClearAllActions());
            AssignCommand(oAtton, ClearAllActions());
            
            AssignCommand(oPC,    ActionJumpToLocation(GetLocation(GetObjectByTag("WP_pc"))));
            AssignCommand(oKreia, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_npc2"))));
            AssignCommand(oAtton, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_npc3"))));

            object oWP1 = GetObjectByTag("WP_SION_PC1");
            object oWP2 = GetObjectByTag("WP_SION_PC2");
            object oWP3 = GetObjectByTag("WP_SION_PC3");
            AssignCommand(oPC, ActionForceMoveToLocation(GetLocation(oWP1)));

            vector vPos = GetPositionFromLocation( GetLocation(GetObjectByTag("WP_pc_look")) );
            AssignCommand(oPC, ActionDoCommand(SetFacingPoint(vPos)));

            AssignCommand(oPC, SetLockOrientationInDialog(oPC, TRUE));
            DelayCommand(0.1, AssignCommand(oKreia, ActionForceMoveToLocation(GetLocation(oWP2))));
            DelayCommand(0.1, AssignCommand(oAtton, ActionForceMoveToLocation(GetLocation(oWP3))));
        }
        break;
        
        case 1:
            AssignCommand(oPC, ActionWait(1.8));
            AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_HEAD_TURN_LEFT ));
        break;
        
        case 2: {
            AssignCommand(oPC,    ClearAllActions());
            AssignCommand(oKreia, ClearAllActions());
            AssignCommand(oAtton, ClearAllActions());
            
            AssignCommand(oPC, SetLockOrientationInDialog(oPC, FALSE));
            
            vector vFace1 = GetPositionFromLocation(GetLocation(oSion));
            AssignCommand(oPC,    ActionDoCommand(SetFacingPoint(vFace1)));
            AssignCommand(oKreia, ActionDoCommand(SetFacingPoint(vFace1)));
            
            DelayCommand(0.5, AssignCommand(oAtton, ActionDoCommand(SetFacingPoint(vFace1))));
        }
        break;
        
        case 3:
        break;
        
        case 4: {
            effect eSlow = EffectMovementSpeedDecrease(50);
            AssignCommand(oSion, ClearAllActions());
            ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSlow, oSion, 4.0);
            AssignCommand(oSion, ActionForceMoveToObject(GetObjectByTag("WP_SION_2")));
        }
        break;
        
        case 5: {
            AssignCommand(oKreia, ClearAllActions());
            AurPostString("Kreia flourish.", 5, 12, 10.0);
            
            vector vFace2 = GetPositionFromLocation(GetLocation(oPC));
            AssignCommand(oKreia, ActionDoCommand(SetFacingPoint(vFace2)));
            
            AssignCommand(oKreia, SetLockOrientationInDialog(oKreia, TRUE));
            AssignCommand(oKreia, CreatureFlourishWeapon(oKreia));
        }
        break;
        
        case 6:
            AurPostString("Kreia runs first WP.", 5, 14, 10.0);
            AssignCommand(oKreia, ClearAllActions());
            AssignCommand(oKreia, ActionForceMoveToObject(GetObjectByTag("WP_kreia_leave_1"), TRUE));
        break;
        
        case 7:
            AssignCommand(oKreia, ClearAllActions());
            AssignCommand(oKreia, ActionForceMoveToObject(GetObjectByTag("WP_kreia_leave_2"), TRUE));
        break;
        
        case 8: {
            object oDoor = GetObjectByTag("kreia_sion_door");
            if (GetIsObjectValid(oDoor)) {
                AssignCommand(oDoor, ActionCloseDoor(oDoor));
                AssignCommand(oDoor, SetLocked(oDoor, TRUE));
            }
        }
        break;
        
        case 9: {
            AssignCommand(oKreia, ClearAllActions());
            
            vector vFace3 = GetPositionFromLocation(GetLocation(oPC));
            AssignCommand(oKreia, ActionDoCommand(SetFacingPoint(vFace3)));
            
            AssignCommand(oKreia, SetLockOrientationInDialog(oKreia, TRUE));
        }
        break;
        
        case 10: {
            object oKreiaCheck = GetObjectByTag("kreia");
            if (GetIsObjectValid(oKreiaCheck)) {
                AurPostString("Kreia removed from party.", 5, 10, 10.0);
                RemovePartyMember(NPC_KREIA);
            }
        }
        break;
        
        case 11:
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, OBJECT_SELF) ));
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_LEFTWEAPON, OBJECT_SELF) ));
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON2, OBJECT_SELF) ));
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_LEFTWEAPON2, OBJECT_SELF) ));
            AssignCommand(oKreia, ActionEquipItem( CreateItemOnObject("w_melee_06", oKreia, 1, TRUE), INVENTORY_SLOT_RIGHTWEAPON, TRUE) );
        break;
        
        case 12: {
            object oSword = GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, oKreia);
            DestroyObject(oSword);
        }
        break;
    }
}
Code:
// ST: a_sion_cut2.nss (153HAR_s.rim)

void main() {
    object oSion = GetObjectByTag("DarthSion");
    object oKreia = GetObjectByTag("kreia");
    object oAtton = GetObjectByTag("atton");
    
    if (!GetIsObjectValid(oSion) || !GetIsObjectValid(oKreia) || !GetIsObjectValid(oAtton)) {
        AurPostString("No Darth Sion and/or Kreia, don't bother with the rest of the cut scene", 5, 7, 10.0);
        return;
    }
    
    int nParam = GetScriptParameter(1);
    switch (nParam) {
        case 0: {
            AssignCommand(oKreia, ClearAllActions());
            AssignCommand(oKreia, ActionJumpToLocation( GetLocation(GetObjectByTag("WP_kreia_start")) ));
            
            vector vFace1 = GetPositionFromLocation( GetLocation(GetObjectByTag("WP_fight_kreia")) );
            AssignCommand(oKreia, ActionDoCommand(SetFacingPoint(vFace1)));
            
            AssignCommand(oKreia, SetLockOrientationInDialog(oKreia, TRUE));
        }
        break;
        
        case 1: {
                effect eSlow = EffectMovementSpeedDecrease(50);
                ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSlow, oSion, 15.0);
                
                AssignCommand(oSion, ClearAllActions());
                AssignCommand(oSion, ActionForceMoveToLocation( GetLocation(GetObjectByTag("WP_fight_sion"))) );
                
                vector vFace2 = GetPositionFromLocation( GetLocation(GetObjectByTag("WP_sion_left") ));
                AssignCommand(oSion, ActionDoCommand(SetFacingPoint(vFace2)));
                
                AssignCommand(oSion, SetLockOrientationInDialog(oSion, TRUE));
        }
        break;
        
        case 2: {
            SetFakeCombatState(oKreia, TRUE);
            
            vector vSion1 = GetPositionFromLocation(GetLocation(oSion));
            AssignCommand(oKreia, ActionDoCommand(SetFacingPoint(vSion1)));
            
            AssignCommand(oKreia, ActionPlayAnimation(10173));
            AssignCommand(oKreia, ActionPlayAnimation(ANIMATION_LOOPING_READY, 1.0, -1.0));
            AssignCommand(oKreia, SetLockOrientationInDialog(oKreia, TRUE));
            AssignCommand(oKreia, CreatureFlourishWeapon(oKreia));
        }
        break;
        
        case 3: {
            AssignCommand(oKreia, ClearAllActions());
            AssignCommand(oKreia, ActionForceMoveToLocation( GetLocation(GetObjectByTag("WP_fight_kreia")) ));
            
            vector vSion2 = GetPositionFromLocation(GetLocation(oSion));
            AssignCommand(oKreia, ActionDoCommand(SetFacingPoint(vSion2)));
            
            AssignCommand(oKreia, SetLockOrientationInDialog(oKreia, TRUE));
        }
        break;
        
        case 4:
            AssignCommand(oSion, CreatureFlourishWeapon(oSion));
        break;
        
        case 5:
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, OBJECT_SELF) ));
            ChangeObjectAppearance(oKreia, 627);
        break;
        
        case 6: {
            vector vFace3 = GetPositionFromLocation( GetLocation(GetObjectByTag("WP_sion_right")) );
            AssignCommand(oSion, ActionDoCommand(SetFacingPoint(vFace3)));
            AssignCommand(oSion, SetLockOrientationInDialog(oSion, TRUE));
        }
        break;
        
        case 7: {
            vector vDoor = GetPositionFromLocation( GetLocation(GetObjectByTag("kreia_sion_door")) );
            AssignCommand(oSion, ActionDoCommand(SetFacingPoint(vDoor)));
            AssignCommand(oSion, SetLockOrientationInDialog(oSion, TRUE));
        }
        break;
        
        case 8:
            AssignCommand(oAtton, ClearAllActions());
            AssignCommand(oAtton, ActionForceMoveToObject(GetFirstPC(), TRUE));
        break;
        
        case 9: {
                object oSword = GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, oKreia);
                DestroyObject(oSword);
        }
        break;
        
        case 10:
        break;
        
        case 11:
            AssignCommand(oSion, ClearAllEffects());
        break;
        
        case 12:
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, OBJECT_SELF) ));
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_LEFTWEAPON, OBJECT_SELF) ));
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON2, OBJECT_SELF) ));
            AssignCommand(oKreia, ActionUnequipItem( GetItemInSlot(INVENTORY_SLOT_LEFTWEAPON2, OBJECT_SELF) ));
            AssignCommand(oKreia, ActionEquipItem( CreateItemOnObject("w_melee_06", oKreia, 1, TRUE), INVENTORY_SLOT_RIGHTWEAPON, TRUE) );
        break;
    }
}

stoffe is offline   you may: quote & reply,
Old 01-19-2006, 03:18 PM   #30
rgdelta
Junior Member
 
rgdelta's Avatar
 
Join Date: Aug 2005
Posts: 303
Thanks so much stoffe
rgdelta is offline   you may: quote & reply,
Old 02-23-2006, 05:26 PM   #31
Osuirof
Rookie
 
Osuirof's Avatar
 
Join Date: Jan 2006
Posts: 60
1. What was the last version of JRE, that DeNCS worked with ?

Added\Edited

If JRE 1.4.2 works, then I suggest this link:

http://java.sun.com/j2se/1.4.2/download.html

It`s JRE 1.4.2.10 to be exact, but probably will do.


Top 25 Lines in Star Wars that Can Be Improved by Substituting the word "Pants"

6. I find your lack of pants disturbing.

Last edited by Osuirof; 02-23-2006 at 08:34 PM.
Osuirof is offline   you may: quote & reply,
Old 02-23-2006, 06:11 PM   #32
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
I know that it worked with JRE 1.4.2 which I've been planning to locate my self-extract archive of that and reinstall it on my machine. PM me if you need a copy of the archive and I'll see what I can do about getting it sent out to you.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 02-26-2006, 07:08 PM   #33
Osuirof
Rookie
 
Osuirof's Avatar
 
Join Date: Jan 2006
Posts: 60
Now after installing 1.4.2.10 it won`t run at all.
1.5 Update 2 (I think), jdk6 beta2, don`t worked propelry either, but at least I`ve seen DeNCS window when using them.

Any idea how to fix this problem ?


Top 25 Lines in Star Wars that Can Be Improved by Substituting the word "Pants"

6. I find your lack of pants disturbing.
Osuirof is offline   you may: quote & reply,
Old 02-27-2006, 11:41 AM   #34
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
Quote:
Originally Posted by Osuirof
Now after installing 1.4.2.10 it won`t run at all.
1.5 Update 2 (I think), jdk6 beta2, don`t worked propelry either, but at least I`ve seen DeNCS window when using them.

Any idea how to fix this problem ?
Unfortunately not. I'm not even a big fan of Java for numerous reasons beyond measure.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 02-27-2006, 03:01 PM   #35
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Dragon Age: Origins
Forum Veteran Helpful! Notable contributor 
Just wondering, but do you really need the tool to work when JDNoa has uploaded all the KotOR2 source scripts to PCGM?
tk102 is offline   you may: quote & reply,
Old 02-27-2006, 10:18 PM   #36
rgdelta
Junior Member
 
rgdelta's Avatar
 
Join Date: Aug 2005
Posts: 303
tk not all scripts are in the library I have found 5-10 alone that either are not there or the compare failed also it is a good tool if you make a script and accidently lose your nss file you can recover it instead of rebuilding it in case you forgot how you did it :-)
rgdelta is offline   you may: quote & reply,
Old 02-28-2006, 11:51 AM   #37
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
Also the Tool is useful for those not so decompiled K1 scripts Tk.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 05-30-2006, 04:50 PM   #38
Dashus
Rookie
 
Dashus's Avatar
 
Join Date: Apr 2005
Posts: 105
Beta 2 has been packed. It's just a patched version of Beta 1 to make it work with the JRE 1.6.0 beta (http://java.sun.com/javase/6/download.jsp). Hopefully it'll replace beta 1 over on the tools page soonish.
Dashus is offline   you may: quote & reply,
Old 05-31-2006, 05:52 PM   #39
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
Thank you for this Dashus. So now it will work again for those of us who have been sitting in DeNCS limbo.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 07-21-2006, 09:27 AM   #40
Arátoeldar
Flame Imperishable
 
Arátoeldar's Avatar
 
Join Date: Nov 2003
Location: Karningul
Posts: 1,574
This is really starting to annoy me.

I am using Kotor Tool v1.0.2210.16738 (2006-1-19 12:38)

I have DeNCS.jar & nwscript.nss in my Kotor directory

My nwnnsscomp.exe was created on March 16 2005

I first downloaded jdk-6-beta2-windows-i586.exe from
http://java.sun.com/javase/downloads/ea.jsp

I have also downloaded jdk-6-rc-bin-b92-windows-i586-20_jul_2006.exe from
http://download.java.net/jdk6/binaries/

I have no problem opening DeNCS.jar. When I try decompile a script I get the right hand pane that should show the decompiled script but no actual script. If I right click in this pane I will get the pop command "View Byte Code" but nothing happens.

I am getting sick and tired off not being able decompile scripts and having to ask other members to fix files so that I can merge mods.


Not all those who wander are lost.-J.R.R. Tolkien

I believe in Christianity as I believe the sun has risen, not only because I see it but by it I see everything else - C.S. Lewis

Last edited by Arátoeldar; 07-21-2006 at 09:47 AM.
Arátoeldar is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > T3-M4's Astromech Droid Center > DeNCS Script Decompiler

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:52 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.