Jump to content

Re-enabling the All Debug Output?


Recommended Posts

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 by Dak Vesser
Link to comment
Share on other sites

"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 :devil:

Edited by Dak Vesser
Link to comment
Share on other sites

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. :sorcerer:

 

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 by stoffe -mkb-
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...