CactusCole 2 Posted August 10, 2017 So I'm trying to understand how everything works and is structured and I when I was looking at triggers some of them use scripts that I can't find. For example, the trigger called bridgeexplosi001.utt (the very first one listed in the first endar spire module) uses the script k_pend_bridge05.nss which is not found in the directory containing all the scripts. Is it located somewhere else or how does the trigger work? Also as a side question under dynamic area info how are triggers defined? I see each of them uses a list of structs defining its geometry, the reference to the blueprint, and then its position and orientation. Specifically, what is the geometry section defining? Is it defining a cube and then XPosition, YPosition, etc. define where the cube is? Is there a program I can use to view each level and all the objects within it? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted August 10, 2017 Most module-specific scripts are stored in that module's archive. For example, k_pend_bridge05 is stored in end_m01aa_s.rim. In KTool go to RIMs -> Modules. Scripts are in the _s RIMs, under the Script, Compiled section. Triggers are always planes, as far as I know. The positions of the N vertices that form its corners are defined by the geometry structs you mentioned. The XYZ and orientation values are basically the position of its axis/pivot. Quote Share this post Link to post Share on other sites
CactusCole 2 Posted August 10, 2017 Thanks, not sure how I missed that. Is there a way to decompile the scripts if I wanted to modify them? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted August 10, 2017 Java-based DeNCS is probably your best bet. There's no longer an official host for it still live, but you can source it via the link Fair Strides provides here: http://deadlystream.com/forum/topic/3003-starwarsknightscom-down/?p=30625 Quote Share this post Link to post Share on other sites
CactusCole 2 Posted August 10, 2017 Do I need NWN to run it? I'm getting this error: Couldn't initialize the NwnStdLoader Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted August 10, 2017 Have you put a copy of nwscript.nss in the same folder as DeNCS.jar? You should have a copy in your Override folder after running KTool. Quote Share this post Link to post Share on other sites
CactusCole 2 Posted August 10, 2017 Yeah I did that already. The full thing says OUTPUT>Lookup path root set to: C:/NeverwinterNights/Nwn/ OUTPUT>Error: Couldn't initialize the NwnStdLoader nwnnsscomp decompile of old compiled file failed. Check code. Not sure what the lookup path root is but I tried creating those directories and placing the files in there as well. Still didn't work Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted August 10, 2017 Where are you seeing this? Is it a commandline output or something? Quote Share this post Link to post Share on other sites
CactusCole 2 Posted August 10, 2017 Yep command line output Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted August 10, 2017 It's GUI-based. You should be able to just run the JAR directly. Quote Share this post Link to post Share on other sites
CactusCole 2 Posted August 10, 2017 I see, it works now if I run it directly but it didn't before which is why I used the command line. The decompiled code doesn't appear in the GUI but when I save it I could open the file to view it. Guess it's not an error I need to worry about. Thanks for all the help Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted August 10, 2017 Weird. Are you using some ancient version of Java? Anyway, you are best off just opening an NCS file and then closing it straight away, saying yes if you want to save it as an NSS. Often times loading an NCS will only display P-Code in DeNCS, yet when saved as an NSS it will magically be properly decompiled. Quote Share this post Link to post Share on other sites
Kexikus 995 Posted August 10, 2017 Not sure if that's what you're experiencing here but if DeNCS shows only byte-code, you can right-click it and select "View Decompiled Code" to get the decompiled code. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted August 10, 2017 It's not on all scripts, just ones that typically fail to decompile with nwnnsscomp, etc. Quote Share this post Link to post Share on other sites