Dak Vesser Posted September 28, 2005 Share Posted September 28, 2005 (edited) This post is for the Devs, or anybody that knows NWN scripting very well. // 761: ShipBuild() // This will return if this is a shipping build. this should be used to disable all debug output. int ShipBuild(); Can this actually be re-enabled? I would like to debug my own AI scripts with SpeakStrings, instead of using the "void SendMessageToPC" function. Thankyou.. Edited September 28, 2005 by Dak Vesser Link to comment Share on other sites More sharing options...
Shadowstrider Posted September 28, 2005 Share Posted September 28, 2005 Well, you can give it a try by simply removing it from the script. I don't know what else it will do, but it could theoretically work. Link to comment Share on other sites More sharing options...
Dak Vesser Posted September 30, 2005 Author Share Posted September 30, 2005 (edited) "int ShipBuild();" is an Integer. The problem is there's no sign of an action command constant listed anywhere in the nwscript.nss that relates to this integer. Like for instance there's no " voide SetShipBuild();" or "void EnableDebugMode();"<----doesn't exsist and is more likely not correct either. It could be that ShipBuild() was used to set a hidden boolean to TRUE, making it a retailed version for the market. So the Million dollar question is how to set it to FALSE, thus make it a debug verson. Whatever was used to set the ShipBuild() was obviously taken out of the nwscript list which really sux, they should of left it in. I really wish one of the actual gamescript programmers of SWKotOR II could tell me how to set it... If anybody has the 411 on this, please post it here or Email me!!!! Thanks Edited September 30, 2005 by Dak Vesser Link to comment Share on other sites More sharing options...
stoffe -mkb- Posted September 30, 2005 Share Posted September 30, 2005 (edited) It could be that ShipBuild() was used to set a hidden boolean to TRUE, making it a retailed version for the market. So the Million dollar question is how to set it to FALSE, thus make it a debug verson. My guess is that the ShipBuild() function was just used for checking an internal engine condition to determine if the current build of the game engine was a development build or a release build. This was probably intended to make it possible to block out certain custom debug statements in scripts (see k_inc_debug.nss) in the release version of the game to prevent any debug printouts from remaining by mistake. In order to change this you would likely have to recompile/build the swkotor2.exe binary with the debug define set, which, of course, you can't since the odyssey engine source code isn't opensource. The scripting functions you are interested in, such as SpeakString() and AurPostString() (and debug text, such as the console text, being shown on screen) are most likely only accessible in the debug build of the executable, and are excluded when building a release version to save resources and memory. I won't pretend to know how Bioware or Obsidian have organized their code, but many programming languages have easy mechanisms for excluding chunks of code at compile time depending on if a define is set, which is often used to get rid of debug specific code when the final release version of a project is built. Edited September 30, 2005 by stoffe -mkb- Link to comment Share on other sites More sharing options...
Dak Vesser Posted September 30, 2005 Author Share Posted September 30, 2005 (edited) Ok thank you for the information. "Aw well" I kinda knew it was somewhere in the executable, but since I'm not a hacker, void SendMessageToPC(); will have to do. I Edited September 30, 2005 by Dak Vesser Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now