Testing: Difference between revisions

From OpenMW Wiki
Jump to navigation Jump to search
(Add some intresting cells)
m (Remove superfluous '=1' from command-line boolean option)
 
(38 intermediate revisions by 8 users not shown)
Line 1: Line 1:
For anyone who wants to give OpenMW a try, this will get you started in testing things out.
For anyone who wants to give OpenMW a try, this will get you started in testing things out.


== Game Arguments ==
== Starting the Game with Special Arguments ==


The game has terminal/command line arguments available when you run it through the executable that are can be added with the form "openmw --something --something-else"
There are two ways to start the game with special arguments:


'''--help''' gives a good overview of options available at launch.
* Add the commands to the user's <samp>openmw.cfg</samp> file (See [[Paths]]), in the form of <code><var>something</var>=<var>value</var></code>, with each command being on a new line.
* Add terminal/command line arguments when you run it through the executable that are can be added with the form <code>openmw --<var>something</var> --<var>something-else</var></code>
** On macOS, these commands must be run like this: <code>./OpenMW.app/Contents/MacOS/openmw --help</code>


'''--new-game''' will place in the beginning of the game aboard the boat.
{| class="wikitable"
|-
! Openmw.cfg
! Command Line
! Description
|-
| N/A
| <code>--help</code>
| Gives a good overview of options available at launch.
|-
| <code>skip-menu=1</code>
| <code>--skip-menu</code>
| Skips the introduction tutorial and generates a default character at a default cell.
|-
| <code>start=Sadrith Mora</code>
| <code>--start="Sadrith Mora"</code>
| '''Requires <code>skip-menu=1</code>/<code>--skip-menu</code>''', starts the game at the designated starting cell.
|-
| <code>activate-dist=<var>value</var></code>
| <code>--activate-dist=<var>value</var></code>
|  Allows you to override the maximum activation distance for objects the player is looking at. The normal value is the GMST <samp>iMaxActivateDist</samp> (<samp>192<samp> by default). Increasing this value can speed up testing.
|-
| <code>script-run=<var>/path/filename</var></code>
| <code>--script-run=<var>/path/filename</var></code>
| Execute all in-game console commands in the specified file upon starting a game. Applies to regular, newly started games, but also when using the <samp>--skip-menu</samp> argument. For example, this can be used to set up your new testing characters with items, spells, etc.
|}


'''--nosound''' will start the game with the sound turned off.
== In-game Commands==


'''--start="Seyda Neen"''' will start the game at the designated starting cell.
UESPwiki has {{UESP|Morrowind:Console|basic console tips}} and {{UESP|Tes3Mod:Categorical Function List#Console|a full list}} of console commands. For the current implementation status of these commands in OpenMW, see [[Scripting (status)]].


'''--encoding=win125X''' will start the game with the appropriate localization. See '''--help''' for the available options.
Note that OpenMW's console supports tab completion, so in most cases you don't have to fully type a command / name. For example, entering <code>COC "Balmora, Caius <kbd>&lt;Tab&gt;</kbd></code> results in <code>COC "Balmora, Caius Cosades' House"</code>


== Controls ==
To obtain all valid IDs for a particular command, you can use ESMTool or OpenMW-CS (OpenCS), both included [https://github.com/OpenMW/openmw/tree/master/apps in the OpenMW repository].
See [[Controls_and_Commands | Controls and Commands]] for the full rundown.


Also note that, GUI windows with a square on the top right corner can be pinned during game mode by clicking them.
=== Extended Tooltips ===


== General Commands==
The <samp>TFH</samp> (<samp>ToggleFullHelp</samp>) command will reveal more information in item tooltips, such as the owner of the item and the script attached to it, if any.


=== Cells ===
=== Cells ===
Teleport: the commands are '''coc''', to be used with [[Morrowind_Interior_Cell_Names|cell names]] and '''coe''' for exterior cells with the provided coordinates ('''coc "Seyda Neen"''' or '''coc Balmora''', '''or coe 2,3''')
Teleporting commands are:
* <samp>COC</samp> (<samp>CenterOnCell</samp>), to be used with [[Morrowind Interior Cell Names|cell names]] (interior or exterior), e.g.: <code>COC "Seyda Neen, Arrille's Tradehouse"</code> or <code>COC Balmora</code>
* <samp>COE</samp> (<samp>CenterOnExterior</samp>) for world-map <var>x,y</var> coordinates for exterior cells, e.g.: <code>COE 2,3</code>


=== Physics ===
=== Physics ===
* Use the console command '''ToggleCollision''' (or the short version '''tcl''') to toggle gravity and physics interactions.  
* Use the console command <samp>TCL</samp> (<samp>ToggleCollision</samp>) to toggle gravity and physics interactions (i.e., clipping – you can fly through walls, floors, etc.).  
* '''ToggleCollisionGrid/tcg''' reveals the collision grid.
* <samp>TCG</samp> (<samp>ToggleCollisionGrid</samp>) reveals the collision geometry.


=== Environment ===
=== Environment ===
You can alter global variables with console syntax of the form "set value to x" (e.g. "set timescale to 2000") and reveal their current value by typing their name.
You can alter global variables with console syntax of the form <code>set <var>variable</var> to <var>value</var></code> (e.g., <code>set timescale to 2000</code>) and reveal their current value by typing their name.
Interesting global variables to tinker with are '''timescale''' for the game speed (default is 30) and '''gamehour''' for the game hour.
Interesting global variables to tinker with are <samp>timescale</samp> for the game speed (default is 30) and <samp>gamehour</samp> for the game hour.


ChangeWeather sets the weather in a certain region. Look it up in the [http://www.uesp.net/wiki/Tes3Mod:ChangeWeather UESP wiki] for the definition and examples.
<samp>ChangeWeather</samp> sets the weather in a certain region. Look it up in the {{UESP|Tes3Mod:ChangeWeather|UESP wiki}} for the definition and examples.
 
=== Animations ===
The command to run the animations of an object is '''npcid->playgroup all 1''' (e.g. '''"Caius Cosades"->playgroup all 1''').


=== GUI ===
=== GUI ===


==== Journal ====
==== Journal ====
You can populate the journal by talking to quest-offering NPCs or through the console with a command of the form '''Journal, A2_4_MiloGone, 10'''
You can populate the journal by talking to quest-offering NPCs or through the console with a command of the form <code>Journal, "A2_4_MiloGone", 10</code> (i.e., <code>Journal, <var>"QuestID"</var>, <var>QuestStage</var></code>).


==== Character creation====
== Environment variables ==
The available character creation commands are '''EnableBirthMenu''', '''EnableClassMenu''', '''nableNameMenu''', '''EnableRaceMenu'''


== Scripting ==
[[Environment Variables|Main article]]
The current status of [[Scripting_(status)|script commands]] used in OpenMW.


The complete list of [http://www.uesp.net/wiki/Morrowind:Console console] script commands used in Morrowind along with their description.
== Debugging ==


== Game Settings ==
This section is intended purely for developers that compile their own build of OpenMW. Regular users will need to rely on the built in crash reporting tool.
The game has settings available that you can tweak by altering the settings file (until we set up a GUI for it). The file is called settings.cfg and can be found in


My Documents/My Games/openmw in Windows,
=== Compiling a Debug Build ===
 
~/.config/openmw in Linux
 
to see the available options and their explanations you can see settings-default.cfg found in
 
the game directory in Windows,
 
/etc/openmw/settings-default.cfg in Linux, or the build directory
 
(do not alter the settings-default.cfg file)


If you run openmw in a debugger like gdb, you will see that many sections of code have been optimized out by the compiler, making it difficult to track what is going on.  In order to disable this optimization, specify cmake to switch to a debug build.  Go to your <code>openmw/build</code> folder, and run the command
<syntaxhighlight lang="bash">
cmake ../ -DCMAKE_BUILD_TYPE=Debug
make
</syntaxhighlight>


Available settings include object/terrain/water shaders, sound settings, viewing distance, shadows, texture filtering modes and other settings.
You can also speed up compilation time by compiling different targets.  For example <code>make openmw</code> will build just the openmw engine without building other tools like the launcher and construction set.  This can be applied to other components as well, like <code> make openmw-cs</code>


== Debugger ==
=== Using a Debugger ===
If you are running the game with a debugger to analyze a segmentation fault you should run the game with the --debug argument to avoid the game locking up the keyboard input when it crashes.
If you are running the game with a debugger to analyze a segmentation fault you should run the game with the <code>--no-grab</code> argument (or equivalent) to avoid the game locking up the mouse input when it crashes.


For example with gdb:
For example, with gdb:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
  gdb ./openmw
  gdb ./openmw
  run --debug
  run --no-grab
</syntaxhighlight>
</syntaxhighlight>
== Crashcourse ==
You can test the beginning of the game by going to the Imperial Prison Ship ('''coc "Imperial Prison Ship"''') and playing out the functionality that is available.
Note that the AI is missing so the guards don't walk up to you, and also you can't collect the ring in the barrel since the inventory GUI is still a WIP.
=== Interesting Cells ===
Here is a list of interesting cells to test:
* [http://www.uesp.net/wiki/Morrowind:ToddTest ToddTest]
<!--* [http://www.uesp.net/wiki/Morrowind:Mark%27s_Vampire_Test_Cell Mark's vampire test cell]-->
* [http://www.uesp.net/wiki/Morrowind:Balmora Balmora]
* [http://www.uesp.net/wiki/Morrowind:Ghostgate Ghostgate]
== Extra Information ==
Here is a list of [[Morrowind_Interior_Cell_Names|interior cell names]] in Morrowind that you can use to go from one place to another.
There is a [[Test_Level | test level]] project that is also interesting.

Latest revision as of 18:30, 12 March 2018

For anyone who wants to give OpenMW a try, this will get you started in testing things out.

Starting the Game with Special Arguments

There are two ways to start the game with special arguments:

  • Add the commands to the user's openmw.cfg file (See Paths), in the form of something=value, with each command being on a new line.
  • Add terminal/command line arguments when you run it through the executable that are can be added with the form openmw --something --something-else
    • On macOS, these commands must be run like this: ./OpenMW.app/Contents/MacOS/openmw --help
Openmw.cfg Command Line Description
N/A --help Gives a good overview of options available at launch.
skip-menu=1 --skip-menu Skips the introduction tutorial and generates a default character at a default cell.
start=Sadrith Mora --start="Sadrith Mora" Requires skip-menu=1/--skip-menu, starts the game at the designated starting cell.
activate-dist=value --activate-dist=value Allows you to override the maximum activation distance for objects the player is looking at. The normal value is the GMST iMaxActivateDist (192 by default). Increasing this value can speed up testing.
script-run=/path/filename --script-run=/path/filename Execute all in-game console commands in the specified file upon starting a game. Applies to regular, newly started games, but also when using the --skip-menu argument. For example, this can be used to set up your new testing characters with items, spells, etc.

In-game Commands

UESPwiki has basic console tips and a full list of console commands. For the current implementation status of these commands in OpenMW, see Scripting (status).

Note that OpenMW's console supports tab completion, so in most cases you don't have to fully type a command / name. For example, entering COC "Balmora, Caius <Tab> results in COC "Balmora, Caius Cosades' House"

To obtain all valid IDs for a particular command, you can use ESMTool or OpenMW-CS (OpenCS), both included in the OpenMW repository.

Extended Tooltips

The TFH (ToggleFullHelp) command will reveal more information in item tooltips, such as the owner of the item and the script attached to it, if any.

Cells

Teleporting commands are:

  • COC (CenterOnCell), to be used with cell names (interior or exterior), e.g.: COC "Seyda Neen, Arrille's Tradehouse" or COC Balmora
  • COE (CenterOnExterior) for world-map x,y coordinates for exterior cells, e.g.: COE 2,3

Physics

  • Use the console command TCL (ToggleCollision) to toggle gravity and physics interactions (i.e., clipping – you can fly through walls, floors, etc.).
  • TCG (ToggleCollisionGrid) reveals the collision geometry.

Environment

You can alter global variables with console syntax of the form set variable to value (e.g., set timescale to 2000) and reveal their current value by typing their name. Interesting global variables to tinker with are timescale for the game speed (default is 30) and gamehour for the game hour.

ChangeWeather sets the weather in a certain region. Look it up in the UESP wiki for the definition and examples.

GUI

Journal

You can populate the journal by talking to quest-offering NPCs or through the console with a command of the form Journal, "A2_4_MiloGone", 10 (i.e., Journal, "QuestID", QuestStage).

Environment variables

Main article

Debugging

This section is intended purely for developers that compile their own build of OpenMW. Regular users will need to rely on the built in crash reporting tool.

Compiling a Debug Build

If you run openmw in a debugger like gdb, you will see that many sections of code have been optimized out by the compiler, making it difficult to track what is going on. In order to disable this optimization, specify cmake to switch to a debug build. Go to your openmw/build folder, and run the command

 cmake ../ -DCMAKE_BUILD_TYPE=Debug
 make

You can also speed up compilation time by compiling different targets. For example make openmw will build just the openmw engine without building other tools like the launcher and construction set. This can be applied to other components as well, like make openmw-cs

Using a Debugger

If you are running the game with a debugger to analyze a segmentation fault you should run the game with the --no-grab argument (or equivalent) to avoid the game locking up the mouse input when it crashes.

For example, with gdb:

 gdb ./openmw
 run --no-grab