Console

The console, also CLUAConsole, can be activated for a large number of cheat codes in the games. An alternative solution is to use save editors.
== Baldur's Gate / Baldur's Gate: Tales of the Sword Coast ==
=== Activating the Console ===
Enable
* Open the Baldur.ini file (located in the BG installation directory).
* Find the line [Game Options] and add the text Cheats=1 underneath. 
Access
* Create a new game or load a saved game.
* Press ctrl and tab together. (Ctrl+Space on Mac.)
* CLUA commands can be entered in the editing area that appears at the bottom of the screen.
* Commands must be prefixed with CLUAConsole:
=== Cheat Keys ===
After using the CLUAConsole:EnableCheatKeys() command the following cheat keys are activated. 
CTRL+1	Change armor level animation
CTRL+2	Fade screen to black
CTRL+3	Fade screen to normal
CTRL+4	Highlight background-interactive objects (e.g. traps), can be toggled
CTRL+5	Unknown
CTRL+6	Change avatar animation previous
CTRL+7	Change avatar animation next
CTRL+8	Highlights the text boxes
CTRL+9	Highlight the sprites
CTRL+0	Unknown
CTRL+A	Animation avatar (see CTRL+S)
CTRL+C	Jump to next chapter
CTRL+D	Display some numbers (framerate related?)
CTRL+F	Turn the character
CTRL+J	Teleport to cursor position
CTRL+K	Creature under cursor kick out party
CTRL+M	(Followed by ENTER) Debug Dump
CTRL+Q	Creature under cursor joins party (usually crashes the game soon after)
CTRL+R	Fully heals the creature under the mouse cursor and removes all effects affecting it unless they are permanent and would persist even after death and resurrection.
CTRL+S	Select avatar animation
CTRL+X	Extended position information
CTRL+Y	Kills creature under cursor
=== Using the Console ===
Commands
AddGold(<int>) 	Adds the gold specified by <int> to the party.
AddSpell("<string>") 	Adds the spell specified by <string> to the selected character.
CreateEngine(<int>) 	Unknown - seems to start a new single (0) or multi (1) player game.
CreateCreature("<string>") 	Creates the creature specified by <string>.
CreateItem("<string>",<int1>,<int2>,<int3>)	Creates the item specified by <string>.The parameters control the amount/charges of the item. [example: to make 2 Scrolls of Cure Serious Wounds, use C:CreateItem("SCRL56", 2) or CLUAConsole:CreateItem("SCRL56", 2)
DisplayText("<string>") 	Displays the text specified by <string>.
EnableCheatKeys(<int>) 	Enables (1) or disables (0) cheat keys, based on the value of <int>.
ExploreArea() 	Explores the current area.
MoveToArea("<string>") 	Move the selected characters to the area specified by <string>.
PlaySound("<string>") 	Plays the sound specified by <string>.
SetCurrentXP("<int>") 	Sets the XP of the selected character to <int>.
SetGlobal("<string1>","<string2>",<int>) 	Sets the variable specified by <string1> (of type <string2>) to the value of <int>.
SetWeather(<int>) 	Sets the current weather.
StartStore("<string>") 	Crashes (starts the store specified by <string>).
StrrefOn() 	Strings are displayed with their associated strref numbers.
StrrefOff() 	Strings are not displayed with their associated strref numbers.
NB. While the console is enabled, the following cheat is also enabled.At the stat distribution screen, pressing CTRL+8 will yield maximum stat value (Note that this will set Strength to 18/00 regardless of class or race, and lowering/raising the value will not set it back to a legal maximum).
== Baldur's Gate: Enhanced Edition ==
=== Activating the Console ===
Enable
* Open the Baldur.lua script in the user's document directory (%PLAYERPROFILE%\Documents in Win7).
* Insert SetPrivateProfileString('Program Options','Debug Mode','1') (it can be inserted anywhere).
Access
* During the game, press ctrl and space together.
* CLUA commands can be entered in the editing area that appears at the bottom of the screen.
* Commands must be prefixed with CLUAConsole:
=== Cheat Keys / Using the Console ===
* Refer to the cheat keys and console commands of Baldur's Gate II: Enhanced Edition, below.
== Baldur's Gate II / Baldur's Gate II: Throne of Bhaal ==
=== Activating the Console ===
Enable
* Open the Baldur.ini file (located in the BG2 installation directory).
* Find the line [Program Options] and add the text Debug Mode=1 underneath. 
Access 
* Create a new game or load a saved game.
* Press ctrl and space together.
* CLUA commands can be entered in the editing area that appears at the bottom of the screen.
* Commands must be prefixed with CLUAConsole:
=== Cheat Keys ===
After using the CLUAConsole:EnableCheatKeys() command the following cheat keys are activated.
CTRL+1	Change armor level animation
CTRL+2	Fade screen to black
CTRL+3	Fade screen to normal
CTRL+4	Highlight background-interactive objects
CTRL+5	Displays animation information
CTRL+6	Change avatar animation previous
CTRL+7	Change avatar animation next
CTRL+8	Highlights the text boxes
CTRL+9	Highlight the sprites
CTRL+0	Unknown
CTRL+A	Animation avatar (see CTRL+S)
CTRL+C	Runs NALIAND epilogue
CTRL+D	Display some numbers (framerate related?)
CTRL+E	Alters visual range 
CTRL+F	Turn the character
CTRL+G	Display list of areas loaded in cache
CTRL+H	(TOB might need to be installed.) Sets the Wild Surge ID. If non-zero, all spells will trigger the specified wild surge. Enable this shortcut by adding WILD SURGE KEYS=1 under the [Game Options] section of Baldur.ini. Surge #101 unavailable.
CTRL+I	Selects animation (see CTRL+L). Can force banters. 
CTRL+J	Teleport to cursor position
CTRL+K	Creature under cursor kick out party
CTRL+L	Plays animation (selected by CTRL+I)
CTRL+M	(Followed by ENTER) Debug Dump (if [Game Options] WILD SURGE KEYS = 1)
CTRL+O	(Followed by ENTER) Write Debug Dump to log file (if [Program Options] Logging On = 1)
CTRL+P	Keep screen centred on selected character
CTRL+Q	Creature under cursor joins party
CTRL+R	Fully heals the creature under the mouse cursor and removes all effects affecting it unless they are permanent and would persist even after death and resurrection.
CTRL+S	Select avatar animation
CTRL+T	Advance game time 1 hour
CTRL+U	Temporarily highlight Doors + Ground Objects
CTRL+X	Extended position information
CTRL+Y	Kills creature under cursor
=== Using the Console ===
Commands
AddGold(<int>) 	Adds the gold specified by <int> to the party.
AddSpell("<string>") 	Adds the spell specified by <string> to the selected character.
AdvanceRealTime(<int>) 	Advances the in-game 'real time' counter.
CreateEngine(<int>) 	Unknown - seems to start a new single (0) or multi (1) player game.
CreateCreature("<string>") 	Creates the creature specified by <string>.
CreateItem("<string>",<int1>,<int2>,<int3>)	Creates the item specified by <string>.The parameters control the amount/charges of the item.
CreateVEFVidCell("<string>") 	Plays the VVC specified by specified by <string>.
DisplayAllBAMFiles() 	Plays all graphic files in order.
DisplayText("<string>") 	Displays the text specified by <string>.
EnableCheatKeys(<int>) 	Enables (1) or disables (0) cheat keys, based on the value of <int>.
ExploreArea() 	Explores the current area.
GetGlobal("<string>","<string2>") 	Displays the variable specified by <string1> (of type <string2>).
LogMessages(<int>) 	Enables logging of game messages?.
LogSet("<string>") 	Filename to log message to?.
MoveToArea("<string>") 	Move the selected characters to the area specified by <string>.
PlayMovie("<string>") 	Plays the movie specified by <string>.
PlaySound("<string>") 	Plays the sound specified by <string>.
SetCurrentXP("<int>") 	Sets the XP of the selected character to <int>.
SetDisableBrightest 	Unknown - probably related to water alpha levels :)
SetGlobal("<string1>","<string2>",<int>) 	Sets the variable specified by <string1> (of type <string2>) to the value of <int>.
SetLimitTransparency(<int>) 	Unknown.
SetWaterAlpha(<int>) 	Unknown - probably related to water alpha levels :)
SetWeather(<int>) 	Sets the current weather.
StartStore("<string>") 	Crashes (starts the store specified by <string>).
StrrefOn() 	Strings are displayed with their associated strref numbers.
StrrefOff() 	Strings are not displayed with their associated strref numbers.
TestAllDialog() 	Lists all dialog file in the game, and checks for errors.
NB. While the console is enabled, the following cheat is also enabled.At the stat distribution screen, pressing CTRL+8 will yield maximum stat value.
== Baldur's Gate II: Enhanced Edition ==
=== Activating the Console ===
Close the game. For the following step, use WordPad (not the Windows-Editor).
Enable (patch v2.0 or later)
* Open the Baldur.lua file (default location is 'Documents\Baldur's Gate II - Enhanced Edition').
* Add the line SetPrivateProfileString('Program Options','Debug Mode','1') at the bottom.
* IMPORTANT: Make the file read only. Otherwise starting the game will initialize the file and remove the extra line.
Enable (before patch v2.0)
* Open the Baldur.ini file (located in the 'Documents\Baldur's Gate - Enhanced Edition' directory).
* Find the line INSERT INTO options ROWS ( and add the text 'Program Options', 'Debug Mode', '1', underneath. 
Access
* Create a new game or load a saved game.
* Press ctrl and space together.
* A user interface (with buttons) will appear that allows you to teleport selected members of your party to any location listed, add gold, add XP, remove fog of war from current map (Explore button), etc. 
* CLUA commands can be entered in the editing area that appears at the bottom of the screen.Commands must be prefixed with C: (since patch v2.0 and possibly before) or CLUAConsole: (before patch v2.0).
** example: to add a Potion of Mind Focusing, press ctrl and space, then put into the bottom command line: C:CreateItem("potn37",1) and press Enter.
=== Cheat Keys ===
After using the CLUAConsole:EnableCheatKeys() command the following cheat keys are activated.
CTRL+1	Change armor level animation
CTRL+2	Fade screen to black
CTRL+3	Fade screen to normal
CTRL+4	Highlight background-interactive objects
CTRL+5	Displays animation information
CTRL+6	Change avatar animation previous
CTRL+7	Change avatar animation next
CTRL+A	Animation avatar (see CTRL+S)
CTRL+C	Runs NALIAND epilogue
CTRL+E	Alters visual range 
CTRL+F	Turn the character
CTRL+H	Sets the Wild Surge ID. If non-zero, all spells will trigger the specified wild surge. Enable this shortcut by adding SetPrivateProfileString('Game Options','WILD SURGE KEYS','1') into Baldur.lua. Surge #101 unavailable.
CTRL+G	Display list of areas loaded in cache
CTRL+I	Selects animation (see CTRL+L). Can force banters. 
CTRL+J	Teleport to cursor position
CTRL+K	Creature under cursor kick out party
CTRL+L	Plays animation (selected by CTRL+I)
CTRL+M	Debug Dump in the game console, either area-related information or details on a given creature, depending on what the mouse cursor hovers.
CTRL+O	(Followed by ENTER) Write Debug Dump to log file (if [Program Options] Logging On = 1)
CTRL+P	Keep screen centred on selected character
CTRL+Q	Creature under cursor joins party
CTRL+R	Fully heals the creature under the mouse cursor and removes all effects affecting it unless they are permanent and would persist even after death and resurrection.
CTRL+S	Select avatar animation
CTRL+T	Advance game time 1 hour
CTRL+U	Temporarily highlight Doors + Ground Objects
CTRL+X	Extended position information
CTRL+Y	Kills creature under cursor
=== Using the Console ===
Commands
AddGold(<int>)  	Adds the gold specified by <int> to the party.
AddSpell("<string>") 	Adds the spell specified by <string> to the selected character.
AdvanceRealTime(<int>) 	Advances the in-game 'real time' counter.
CreateEngine(<int>) 	Unknown - seems to start a new single (0) or multi (1) player game.
CreateCreature("<string>") 	Creates the creature specified by <string>.
CreateItem("<string>",<int1>,<int2>,<int3>)	Creates the item specified by <string>.The parameters control the amount/charges of the item.
The item is always created in the main character's inventory, no matter who is currently selected.
CreateVEFVidCell("<string>") 	Plays the VVC specified by specified by <string>.
DisplayAllBAMFiles() 	Plays all graphic files in order.
DisplayText("<string>") 	Displays the text specified by <string>.
Eval(<string>) 	Executes the script action specified by <string>.The whole string can be enclosed into single quotes (') so that double quotes can still be used within the script action.
Exec(<string>) 	Executes all clua commands contained in the text file specified by <string>.
EnableCheatKeys(<int>) 	Enables (1) or disables (0) cheat keys, based on the value of <int>.
ExploreArea() 	Explores the current area.
GetGlobal("<string>","<string2>") 	Displays the variable specified by <string1> (of type <string2>).
LogMessages(<int>) 	Enables logging of game messages?.
LogSet("<string>") 	Filename to log message to?.
MoveToArea("<string>") 	Move the selected characters to the area specified by <string>.
PlayMovie("<string>") 	Plays the movie specified by <string>.
PlaySound("<string>") 	Plays the sound specified by <string>.
SetCurrentXP("<int>") 	Sets the XP of the selected character to <int>.
SetDisableBrightest 	Unknown - probably related to water alpha levels :)
SetGlobal("<string1>","<string2>",<int>) 	Sets the variable specified by <string1> (of type <string2>) to the value of <int>.
SetLimitTransparency(<int>) 	Unknown.
SetWaterAlpha(<int>) 	Unknown - probably related to water alpha levels :)
SetWeather(<int>) 	Sets the current weather.
StartStore("<string>") 	Starts the store specified by <string>. The Reputation multiplier affects prices, but not the Charisma modifier.
StrrefOn() 	Strings are displayed with their associated strref numbers.
StrrefOff() 	Strings are not displayed with their associated strref numbers.
TestAllDialog() 	Lists all dialog file in the game, and checks for errors.
WriteScript(<string>) 	Output scripts into the directory specified by <string>.Place mouse cursor of creature to evaluate scripts attached to that creature. Otherwise it will evaluate area scripts.
NB. While the console is enabled, the following cheat is also enabled.At the stat distribution screen, pressing CTRL+8 will yield maximum stat value.
A list of all item codes can be found here.
== Sources & references ==
*BG1: TotS || BG2: ToB || BG(2): EE || CLUA Console pages in IESDP
Category:Cheats