Console command
From NWNWiki
Console commands are text commands that can be given to the game client. These commands can be entered after opening the console (which appears as a yellow ">" in the top left corner of the screen) by hitting the backtick (`) key on English keyboards. (This is often referred to as the tilde (~) key, presumably because the name "tilde" is more widely recognized and because shift-backtick produces a tilde.) On other keyboards, the key that opens the console varies; likely candidates are the backtick, the tilde, and whatever key is to the left of the one (1). For simplicity, the key that opens the console will be referred to as the console key. Once the console is open, the command can be typed (and will be displayed in yellow text in the top left corner of the screen).
While entering a console command, the "tab" key can be used to display a list of recognized commands that match what has been typed so far. In addition, the console key can be used to exit the console without losing what has been typed so far.
An alternate method for entering console commands is to enter the command in the chat bar, preceded by two hash marks (##). For example, entering ## d10 in the chat bar will run the "d10" command. The tab key functionality cannot be used with this method.
Contents |
[edit] Player commands
The following console commands can be used at any point during game play by any player.
Example: To simulate rolling five 10-sided dice, the console key is hit and d10 5 is typed. There must be a space between "d10" and "5".
| Command | Usage | Where | Description |
|---|---|---|---|
| d10 | d10 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 10-sided dice and display the result on screen. |
| d100 | d100 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 100-sided dice and display the result on screen. |
| d12 | d12 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 12-sided dice and display the result on screen. |
| d2 | d2 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 2-sided dice and display the result on screen. |
| d20 | d20 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 20-sided dice and display the result on screen. |
| d3 | d3 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 3-sided dice and display the result on screen. |
| d4 | d4 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 4-sided dice and display the result on screen. |
| d6 | d6 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 6-sided dice and display the result on screen. |
| d8 | d8 <x> | x is an integer value specifying the number of dice to roll. | This function will simulate rolling the specified number of 8-sided dice and display the result on screen. |
| makesafe (non-debug) | makesafe | This function will move the player to a safe location, meaning a valid location in the area (ie. not in walls or on other creatures). | |
| hidepartynames | hidepartynames | This function will hide the names of party members displayed on the partybar GUI. | |
| showpartynames | showpartynames | This function will show the names of party members displayed on the partybar GUI. | |
| setchatbuffersize | setchatbuffersize <x> | x is an integer value indicating how many lines the chat window's buffer should be. | This function will set the buffer size of the chat window buffer. |
[edit] Dungeon master commands
The following console commands can normally only be used by Dungeon Masters due to their effects on game play. However, in single-player, ordinary players can access these commands by entering debug mode. This is done by entering the console command
DebugMode 1
Important: Playing in debug mode can cause stability problems. After using the desired DM console command, a player should exit debug mode by entering the console command
DebugMode 0
It is possible for ordinary players to enter debug mode in multiplayer on servers that explicitly permit it. Normally, only private multiplayer games will give such permission.
Note: The period (.) key can be used to call up the "Chooser" window while in debug mode.
| Command | Usage | Where | Description |
|---|---|---|---|
| dm_allspells | dm_allspells <x> | x is an integer value of either 0 or 1. | This function will enable all spells from all classes to be cast by the player if a value of 1 is specified. Specifying 0 will disable this and the player will only be allowed to cast spells his/her character is permitted according to that character's class/abilities. This command is only functional for ordinary players if debug mode is active at the moment of casting. |
| dm_enablecombatdebugging | dm_enablecombatdebugging <x> | x is an integer value of either 0 or 1. | This function will enable and display additional information about how attacks, damage, and saving throws are computed. |
| dm_getfactionreputation | dm_getfactionreputation <faction1> <faction2> | faction1 is the name of a faction. faction2 is the name of a faction. | This function will retrieve the reputation value for how faction2 feels about faction1 and display it. |
| dm_getmodulevarfloat | dm_getmodulevarfloat <varname> | varname is the name of the variable to get. | This function will retrieve and display on screen the specified local variable from the module. |
| dm_getmodulevarint | dm_getmodulevarint <varname> | varname is the name of the variable to get. | This function will retrieve and display on screen the specified local variable from the module. |
| dm_getmodulevarobject | dm_getmodulevarobject <varname> | varname is the name of the variable to get. | This function will retrieve and display on screen the specified local variable from the module. |
| dm_getmodulevarstring | dm_getmodulevarstring <varname> | varname is the name of the variable to get. | This function will retrieve and display on screen the specified local variable from the module. |
| dm_getmodulevarvector | dm_getmodulevarvector <varname> | varname is the name of the variable to get. | This function will retrieve and display on screen the specified local variable from the module. |
| dm_gettime | dm_gettime | This function will display the current game time of the module on screen. | |
| dm_getvarfloat | dm_getvarfloat <varname> | varname is the name of the variable to get. | This function will activate action target mode. The specified local variable will be retrieved from the target you click and be displayed on screen. |
| dm_getvarint | dm_getvarint <varname> | varname is the name of the variable to get. | This function will activate action target mode. The specified local variable will be retrieved from the target you click and be displayed on screen. |
| dm_getvarobject | dm_getvarobject <varname> | varname is the name of the variable to get. | This function will activate action target mode. The specified local variable will be retrieved from the target you click and be displayed on screen. |
| dm_getvarstring | dm_getvarstring <varname> | varname is the name of the variable to get. | This function will activate action target mode. The specified local variable will be retrieved from the target you click and be displayed on screen. |
| dm_getvarvector | dm_getvarvector <varname> | varname is the name of the variable to get. | This function will activate action target mode. The specified local variable will be retrieved from the target you click and be displayed on screen. |
| dm_giveXP | dm_giveXP <x> | x is an integer value indicating the amount of experience points to give. | This function will activate action target mode. The target you click will be given the specified amount of experience points. |
| dm_givegold | dm_givegold <x> | x is an integer value indicating the amount of gold to give. | This function will activate action target mode. The target you click will be given the specified amount of gold. |
| dm_givelevel | dm_givelevel <x> | x is an integer value indicating the number of experience levels to give. | This function will activate action target mode. The target you click will be given enough experience points to advance the specified number of experience levels. |
| dm_god | dm_god | This function will make the player invulnerable. | |
| dm_heal | dm_heal | This function will restore the player back to full hitpoints. | |
| dm_jumptopoint | dm_jumptopoint <x> <y> <area> | x is a floating point value indicating the x-coordinate in the area you wish to jump to. y is a floating point value indicating the y-coordinate in the area you wish to jump to. area is the area tag of the area you wish to jump to. | This function will send the player to the specified x,y coordinate in the area specified. |
| dm_levelup | dm_levelup | This function will advance the player by one level of experience. | |
| dm_modifyCHA | dm_modifyCHA <x> | x is an integer value indicating the amount to adjust the skill by. | This function will activate action target mode. The target you click will have its base Charisma adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifyCON | dm_modifyCON <x> | x is an integer value indicating the amount to adjust the skill by. | This function will activate action target mode. The target you click will have its base Constitution adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifyDEX | dm_modifyDEX <x> | x is an integer value indicating the amount to adjust the skill by. | This function will activate action target mode. The target you click will have its base Dexterity adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifyINT | dm_modifyINT <x> | x is an integer value indicating the amount to adjust the skill by. | This function will activate action target mode. The target you click will have its base Intelligence adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifySTR | dm_modifySTR <x> | x is an integer value indicating the amount to adjust the skill by. | This function will activate action target mode. The target you click will have its base Strength adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifyWIS | dm_modifyWIS <x> | x is an integer value indicating the amount to adjust the skill by. | This function will activate action target mode. The target you click will have its base Wisdom adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifyage | dm_modifyage <x> | x is an integer value indicating the amount to adjust the age by. | This function will activate action target mode. The target you click will have its age adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifyattackbase | dm_modifyattackbase <x> | x is an integer value indicating the amount to adjust the base attack bonus by. | This function will activate action target mode. The target you click will have its base attack bonus adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifysavefortitude | dm_modifysavefortitude <x> | x is an integer value indicating the amount to adjust the save value by. | This function will activate action target mode. The target you click will have its fortitude save value adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifysavereflex | dm_modifysavereflex <x> | x is an integer value indicating the amount to adjust the save value by. | This function will activate action target mode. The target you click will have its reflex save value adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifysavewill | dm_modifysavewill <x> | x is an integer value indicating the amount to adjust the save value by. | This function will activate action target mode. The target you click will have its will save value adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_modifyspellresistance | dm_modifyspellresistance <x> | x is an integer value indicating the amount to adjust the spell resistance by. | This function will activate action target mode. The target you click will have its spell resistance adjusted by the value specified. Positive values will cause an increase, while negative values will cause a decrease. |
| dm_movetoarea | dm_movetoarea <area> | area is the area tag of the area to move to. | This function will move the player to the specified area. |
| dm_runscript | dm_runscript <script> | script is the name of the script to run. | This function will run the specified script. |
| dm_setCHA | dm_setCHA <x> | x is an integer value indicating the value to set the ability score to. | This function will activate action target mode. The target you click will have its base Charisma set to the value specified. |
| dm_setCON | dm_setCON <x> | x is an integer value indicating the value to set the ability score to. | This function will activate action target mode. The target you click will have its base Constitution set to the value specified. |
| dm_setDEX | dm_setDEX <x> | x is an integer value indicating the value to set the ability score to. | This function will activate action target mode. The target you click will have its base Dexterity set to the value specified. |
| dm_setINT | dm_setINT <x> | x is an integer value indicating the value to set the ability score to. | This function will activate action target mode. The target you click will have its base Intelligence set to the value specified. |
| dm_setSTR | dm_setSTR <x> | x is an integer value indicating the value to set the ability score to. | This function will activate action target mode. The target you click will have its base Strength set to the value specified. |
| dm_setWIS | dm_setWIS <x> | x is an integer value indicating the value to set the ability score to. | This function will activate action target mode. The target you click will have its base Wisdom set to the value specified. |
| dm_setCR | dm_setCR <x> | x is an integer value indicating the challenge rating. | This function will activate action target mode. The target you click will have its challenge rating set to the value specified. |
| dm_setage | dm_setage <x> | x is an integer value indicating the value to set the age to. | This function will activate action target mode. The target you click will have its age set to the value specified. |
| dm_setattackbase | dm_setattackbase <x> | x is an integer value indicating the value to set the base attack bonus to. | This function will activate action target mode. The target you click will have its base attack bonus set to the value specified. |
| dm_setfaction | dm_setfaction <x> | x is the name of the faction to set the target to. | This function will activate action target mode. The target you click will have its faction set to the one specified. |
| dm_setfactiondefender | dm_setfactiondefender | This function will activate action target mode. The target you click will have its faction set to be a defender. | |
| dm_setfactionenemy | dm_setfactionenemy | This function will activate action target mode. The target you click will have its faction set to be an enemy. | |
| dm_setfactionreputation | dm_setfactionreputation <faction1> <faction2> <x> | faction1 and faction2 are the names of factions. x is an integer value indicating the value to set the reputation value to. | This function will set the reputation value for how faction2 feels about faction1 (0 is hostile, 100 is friendly). |
| dm_setmodulevarfloat | dm_setmodulevarfloat <varname> <value> | varname is the name of the variable to set. value is a floating point value that varname will be set to. | This function will set a local variable on the module with the specified name and value. |
| dm_setmodulevarint | dm_setmodulevarint <varname> <value> | varname is the name of the variable to set. value is an integer value that varname will be set to. | This function will set a local variable on the module with the specified name and value. |
| dm_setmodulevarobject | dm_setmodulevarobject <varname> <value> | varname is the name of the variable to set. value is an object id value that varname will be set to. | This function will set a local variable on the module with the specified name and value. |
| dm_setmodulevarstring | dm_setmodulevarstring <varname> <value> | varname is the name of the variable to set. value is a string that varname will be set to. | This function will set a local variable on the module with the specified name and value. |
| dm_setmodulevarvector | dm_setmodulevarvector <varname> <x> <y> <z> | varname is the name of the variable to set. x is a floating point value indicating the x component of the vector. y is a floating point value indicating the y component of the vector. z is a floating point value indicating the z component of the vector. | This function will set a local variable on the module with the specified name and value. |
| dm_setspellresistance | dm_setspellresistance <x> | x is an integer value indicating the value to set the spell resistance to. | This function will activate action target mode. The target you click will have its spell resistance set to the value specified. |
| dm_settime | dm_settime <h> <m> | h is the hour to set the time to. m is the minutes to set the time to. s is the seconds to set the time to. ms is the milliseconds to set the time to. | This function will set the game time in the module to the specified hour, minute, second, and millisecond. |
| dm_setvarfloat | dm_setvarfloat <varname> <value> | varname is the name of the variable to set. value is a floating point value that varname will be set to. | This function will activate action target mode. The target you click will have a local variable set with the specified name and value. |
| dm_setvarint | dm_setvarint <varname> <value> | varname is the name of the variable to set. value is an integer value that varname will be set to. | This function will activate action target mode. The target you click will have a local variable set with the specified name and value. |
| dm_setvarobject | dm_setvarobject <varname> <value> | varname is the name of the variable to set. value is an object id that varname will be set to. | This function will activate action target mode. The target you click will have a local variable set with the specified name and value. |
| dm_setvarstring | dm_setvarstring <varname> <value> | varname is the name of the variable to set. value is a string that varname will be set to. | This function will activate action target mode. The target you click will have a local variable set with the specified name and value. |
| dm_setvarvector | dm_setvarvector <varname> <x> <y> <z> | varname is the name of the variable to set. x is a floating point value indicating the x component of the vector. y is a floating point value indicating the y component of the vector. z is a floating point value indicating the z component of the vector. | This function will activate action target mode. The target you click will have a local variable set with the specified name and value. |
| dm_showarea | dm_showarea | This function will reveal all the tiles in the current area by removing the 'fog of war'. | |
| dm_spawncreature | dm_spawncreature <creature> | creature is the creature tag of the creature to spawn in. | This function will effectively cause the player to summon the specified creature. |
| dm_mylittlepony | dm_mylittlepony | This function will enable a cool visual treat! Typing it again will toggle the effect off. | |
| dm_cowsfromhell | dm_cowsfromhell | This function will summon, well... cows from hell! |
[edit] Builder commands
The following console commands are intended to aid those building tilesets. Some require DebugMode to be active (as for dungeon master commands).
| Command | Usage | Where | Description |
|---|---|---|---|
| renderaabb | renderaabb <x> | x is either '1' or '0', indicating "yes" or "no" | This function produces visual information about the current tileset's walkmesh. |
| rendertilepathnodes | rendertilepathnodes <x> | x is either '1' or '0', indicating "yes" or "no" | This function produces visual information about the edges of tiles and tile features. |
