×
Меню
Индекс

MSFD The Console

 
Using the Console to check variables:
In the game you can use the console to check on the state of variables. Bring up the console window (standard key is ~ or whatever key is left of the "1" key if you are using a non-US keyboard layout) and type "sv" – this lists all the global variables with their values, then all running global scripts (including targeted scripts) with their variables. Now find an object that has a script running on it. Bring up the console again, left click on the object – the console window title will change. Type "sv" again – now the local variables for the script running on this object will be listed. To check a single variable, use "show var_name", however, if trying to get a var from a object that doesn’t have a script, it can sometimes crash the game.
Using the Console to quickly test scripts:
The console can help you test your scripts. For objects you don’t need to place them with the editor and then go there. Just write down the ID for your object, load any savegame and then, in the console type:
PlaceatPC "My_Object" 1,1,1
This will drop the object directly at your feet.
Player->AddItem "My_Object" 1
This will drop the item into your inventory
To go to a specific location use
coc "cell_name"
for interior cells or
coe -1,-7
for exterior cells (write down the cell coordinates in the editor). coc works for exterior cells too but since most exterior cells have non-unique names you may not land quite where you want. It can still be useful though, for example coc balmora will take you somewhere in Balmora.
tcl
Toggles collision – float through walls, visit difficult to reach places easily.
Tgm
Toggle God mode – test without worrying about some monster killing you.
 
Also, the invaluable console commands to run the game in "debug" mode allow one to view hard numbers about spell effects, chances to hit, etc (thanks to Wakim). Some of these are:
1) press the "~" key to call up the console.
2) type "tcs" into the console and hit return.
3) click (right or left click, can't recall) anywhere on the screen outside of the console box to continue game time while leaving the box displayed and active.
That's it. There are other variants on the "tcs" command, such as (but not limited to) "tks" and "tms" which all stand for "toggle xxxxxx statistics" where xxxxx is: c = combat, m = magic, k = kill, or what have you.