Hi i create a module for NWN2 and in many scripts i see the inclusion of “ginc_debug” and the function PrettyDebug.
How this funcion work ?
Someone could tell me how to setup the toolset or the game to see the debug information of this function ?
Any information will be appreciated.
I think you need to go into the console and activate debugging. I had some instructions in the toolset guide, IIRC.
It’s been a while…
PrettyDebug() is just a fancy thing. The core NwScript functions are
SendMessageToPC() - prints to the chatbox
PrintString() - prints to the nwn2 logfile
DebugPostString() - prints to the screen
And here’s a guide to setting up logging on your machine:
here’s the description of DebugPostString()
// Prints a debug string to the screen at the given location for the given
// duration in the given color.
// It gets displayed on the screen of the object passed in as oTarget.
// - output controlled by ini settings:
// nwn.ini - [Game Options]Debug Text
// nwnplayer.ini - [Server Options]Scripts Print To Screen
void DebugPostString(object oTarget, string sMesg, int nX, int nY, float fDuration, int nColor=4294901760);
But personally i tried and gave up on PrettyDebug() and DebugPostString(). Nwn2 doesn’t seem to even use nwn.ini or nwnplayer.ini – it does use, rather, nwn2.ini and nwn2player.ini … and there’s no [Game Options] section in nwn2.ini; it looks to me like [Game Options] is in nwn2player.ini, etc. So my needs get covered by SendMessageToPC() and PrintString(). The latter is useful (prints to the logfile) when loading and the chatbox isn’t available.
mind, nwn2 brings whole new meaning to the kiss principle,
I’ve tried too change the nwn2.ini and nw2player.ini but nothing appened. I’ve activated the debug console and other things but nothing again. Now i debug my script with FloatingTextStringOnCreature(…) but is very awful.
this is what i use
so “blahblahablah” shows in the chat window, no matter what character i happen to be controlling. It doesn’t need any logging or changes to .ini files – it just works
(as long as you’re the only player).