To make the cheats work, you'll first have to edit a game file with a text editor. Make sure you back this file up before proceeding.
In the game's folder, find the file named "nwn.ini." In the Game Options section of this file, add this phrase:
Debug Mode=1
If you are going to be affecting the character at all, open the "nwnplayer.ini" file and add these lines:
Single Player Enforce Legal Characters=0
Single Player ItemLevelRestrictions=0
This will allow you to play past the module you're on.
Once these things are changed, save the file and start the game. During gameplay, press the ~ key, then type DebugMode=1 in the console that appears. This will enable cheat mode. Now, you can cycle through the codes with the ~ key. Enter cheats from the list below. If you get the message "Enter Target Mode" appears, click on the character you'd like it to affect in order to enable the code. A "Success" message will tell you you've entered the code correctly.
Change age: SetAge (number)
Change base attack SetAttackBase (number)
Change Charisma: SetCHA (number)
Change Constitution: SetCON (number)
Change Dexterity: SetDEX (number)
Change fortitude save modifier: ModSaveFort
Change Intelligence: SetINT (number)
Change Level: dm_givelevel (number)
Change race: SetAppearance (race)
Change reflex save modifier: ModSaveReflex
Change spell resistance modifier: ModSpellResistance (number)
Change Strength: SetSTR (number)
Change will save modifier: ModSaveWill
Change Wisdom: SetWIS (number)
Flying Cows: dm_cowsfromhell
Get Gold: dm_givegold (number)
Hobby Horse: dm_mylittlepony
Invincibility: dm_god
Restore HP: dm_heal Raise levels: GetLevel (number)
Raise XP: GiveXP (number)