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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...