elsid ec0c76d2f3
Ignore false positive warning
cellSize > 1 so the result of the division cannot be undefined.

/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:18:35: error: The result of the '/' expression is undefined [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
   18 |         std::size_t cell = global / (cellSize - 1);
      |                                   ^
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:244:13: note: Assuming 'lodLevel' is >= 0
  244 |         if (lodLevel < 0 || 63 < lodLevel)
      |             ^~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:244:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:244:29: note: Assuming 'lodLevel' is <= 63
  244 |         if (lodLevel < 0 || 63 < lodLevel)
      |                             ^~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:244:9: note: Taking false branch
  244 |         if (lodLevel < 0 || 63 < lodLevel)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:247:13: note: Assuming 'size' is > 0
  247 |         if (size <= 0)
      |             ^~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:247:9: note: Taking false branch
  247 |         if (size <= 0)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:272:13: note: Assuming the condition is false
  272 |         if (land != nullptr)
      |             ^~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:272:9: note: Taking false branch
  272 |         if (land != nullptr)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:363:9: note: Calling 'sampleCellGrid<const (lambda at /home/elsid/dev/openmw/components/esmterrain/storage.cpp:280:35) &>'
  363 |         sampleCellGrid(cellSize, sampleSize, beginX, beginY, distance, handleSample);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:72:13: note: Assuming 'cellSize' is >= 2
   72 |         if (cellSize < 2 || !Misc::isPowerOfTwo(cellSize - 1))
      |             ^~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:72:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:72:9: note: Taking false branch
   72 |         if (cellSize < 2 || !Misc::isPowerOfTwo(cellSize - 1))
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:75:13: note: Assuming 'sampleSize' is not equal to 0
   75 |         if (sampleSize == 0 || !Misc::isPowerOfTwo(sampleSize))
      |             ^~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:75:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:75:9: note: Taking false branch
   75 |         if (sampleSize == 0 || !Misc::isPowerOfTwo(sampleSize))
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:78:13: note: Assuming 'distance' is >= 2
   78 |         if (distance < 2 || !Misc::isPowerOfTwo(distance - 1))
      |             ^~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:78:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:78:9: note: Taking false branch
   78 |         if (distance < 2 || !Misc::isPowerOfTwo(distance - 1))
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:84:13: note: Assuming 'distance' is >= 'cellSize'
   84 |         if (distance < cellSize || sampleSize > cellSize - 1)
      |             ^~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:84:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:84:36: note: Assuming the condition is true
   84 |         if (distance < cellSize || sampleSize > cellSize - 1)
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:84:9: note: Taking true branch
   84 |         if (distance < cellSize || sampleSize > cellSize - 1)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:85:20: note: Calling 'sampleCellGridSimple<const (lambda at /home/elsid/dev/openmw/components/esmterrain/storage.cpp:280:35) &>'
   85 |             return sampleCellGridSimple(cellSize, sampleSize, beginX, beginY, endX, endY, f);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:56:16: note: 'cellSize' is > 1
   56 |         assert(cellSize > 1);
      |                ^
/usr/include/assert.h💯27: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |                           ^~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:56:9: note: '?' condition is true
   56 |         assert(cellSize > 1);
      |         ^
/usr/include/assert.h💯7: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |       ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:57:9: note: '?' condition is true
   57 |         assert(Misc::isPowerOfTwo(cellSize - 1));
      |         ^
/usr/include/assert.h💯7: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |       ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:58:16: note: 'sampleSize' is not equal to 0
   58 |         assert(sampleSize != 0);
      |                ^
/usr/include/assert.h💯27: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |                           ^~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:58:9: note: '?' condition is true
   58 |         assert(sampleSize != 0);
      |         ^
/usr/include/assert.h💯7: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |       ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:60:9: note: Calling 'sampleGrid<(lambda at /home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:61:13)>'
   60 |         sampleGrid(sampleSize, beginX, beginY, endX, endY,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   61 |             [&](std::size_t globalX, std::size_t globalY, std::size_t vertX, std::size_t vertY) {
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   62 |                 const auto [cellX, x] = toCellAndLocal(beginX, globalX, cellSize);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   63 |                 const auto [cellY, y] = toCellAndLocal(beginY, globalY, cellSize);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   64 |                 f(cellX, cellY, x, y, vertX, vertY);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   65 |             });
      |             ~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:33:38: note: Assuming 'y' is < 'endY'
   33 |         for (std::size_t y = beginY; y < endY; y += sampleSize)
      |                                      ^~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:33:9: note: Loop condition is true.  Entering loop body
   33 |         for (std::size_t y = beginY; y < endY; y += sampleSize)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:36:42: note: Assuming 'x' is < 'endX'
   36 |             for (std::size_t x = beginX; x < endX; x += sampleSize)
      |                                          ^~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:36:13: note: Loop condition is true.  Entering loop body
   36 |             for (std::size_t x = beginX; x < endX; x += sampleSize)
      |             ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:36:42: note: Assuming 'x' is < 'endX'
   36 |             for (std::size_t x = beginX; x < endX; x += sampleSize)
      |                                          ^~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:36:13: note: Loop condition is true.  Entering loop body
   36 |             for (std::size_t x = beginX; x < endX; x += sampleSize)
      |             ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:37:17: note: Calling 'operator()'
   37 |                 f(x, y, vertX++, vertY);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:62:41: note: Calling 'toCellAndLocal'
   62 |                 const auto [cellX, x] = toCellAndLocal(beginX, globalX, cellSize);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:18:35: note: The result of the '/' expression is undefined
   18 |         std::size_t cell = global / (cellSize - 1);
      |                            ~~~~~~~^~~~~~~~~~~~~~~~
2025-07-27 12:11:24 +02:00
2025-07-02 17:56:46 +02:00
2025-07-26 16:36:50 +02:00
2025-07-27 12:11:24 +02:00
2025-07-12 12:31:15 +02:00
2025-07-23 17:35:35 +02:00
2025-07-26 13:39:37 +02:00
2022-09-16 00:53:24 +01:00
2025-07-03 07:37:58 +02:00
2023-04-22 22:16:43 +01:00
2023-11-02 13:07:22 +04:00
2025-06-18 17:48:09 -07:00
2021-12-14 09:21:41 +00:00
2025-07-16 13:43:59 +03:00
2025-07-25 00:53:04 +02:00
2024-05-25 18:44:47 +03:00
2025-01-06 16:43:54 +01:00

OpenMW

OpenMW is an open-source open-world RPG game engine that supports playing Morrowind by Bethesda Softworks. You need to own the game for OpenMW to play Morrowind.

OpenMW also comes with OpenMW-CS, a replacement for Bethesda's Construction Set.

Font Licenses:

Current Status

The main quests in Morrowind, Tribunal and Bloodmoon are all completable. Some issues with side quests are to be expected (but rare). Check the bug tracker for a list of issues we need to resolve before the "1.0" release. Even before the "1.0" release however, OpenMW boasts some new features, such as improved graphics and user interfaces.

Pre-existing modifications created for the original Morrowind engine can be hit-and-miss. The OpenMW script compiler performs more thorough error-checking than Morrowind does, meaning that a mod created for Morrowind may not necessarily run in OpenMW. Some mods also rely on quirky behaviour or engine bugs in order to work. We are considering such compatibility issues on a case-by-case basis - in some cases adding a workaround to OpenMW may be feasible, in other cases fixing the mod will be the only option. If you know of any mods that work or don't work, feel free to add them to the Mod status wiki page.

Getting Started

The data path

The data path tells OpenMW where to find your Morrowind files. If you run the launcher, OpenMW should be able to pick up the location of these files on its own, if both Morrowind and OpenMW are installed properly (installing Morrowind under WINE is considered a proper install).

Command line options

Syntax: openmw <options>
Allowed options:
  --help                                print help message
  --version                             print version information and quit
  --data arg (=data)                    set data directories (later directories
                                        have higher priority)
  --data-local arg                      set local data directory (highest
                                        priority)
  --fallback-archive arg (=fallback-archive)
                                        set fallback BSA archives (later
                                        archives have higher priority)
  --resources arg (=resources)          set resources directory
  --start arg                           set initial cell
  --content arg                         content file(s): esm/esp, or
                                        omwgame/omwaddon
  --no-sound [=arg(=1)] (=0)            disable all sounds
  --script-verbose [=arg(=1)] (=0)      verbose script output
  --script-all [=arg(=1)] (=0)          compile all scripts (excluding dialogue
                                        scripts) at startup
  --script-all-dialogue [=arg(=1)] (=0) compile all dialogue scripts at startup
  --script-console [=arg(=1)] (=0)      enable console-only script
                                        functionality
  --script-run arg                      select a file containing a list of
                                        console commands that is executed on
                                        startup
  --script-warn [=arg(=1)] (=1)         handling of warnings when compiling
                                        scripts
                                        0 - ignore warning
                                        1 - show warning but consider script as
                                        correctly compiled anyway
                                        2 - treat warnings as errors
  --load-savegame arg                   load a save game file on game startup
                                        (specify an absolute filename or a
                                        filename relative to the current
                                        working directory)
  --skip-menu [=arg(=1)] (=0)           skip main menu on game startup
  --new-game [=arg(=1)] (=0)            run new game sequence (ignored if
                                        skip-menu=0)
  --encoding arg (=win1252)             Character encoding used in OpenMW game
                                        messages:

                                        win1250 - Central and Eastern European
                                        such as Polish, Czech, Slovak,
                                        Hungarian, Slovene, Bosnian, Croatian,
                                        Serbian (Latin script), Romanian and
                                        Albanian languages

                                        win1251 - Cyrillic alphabet such as
                                        Russian, Bulgarian, Serbian Cyrillic
                                        and other languages

                                        win1252 - Western European (Latin)
                                        alphabet, used by default
  --fallback arg                        fallback values
  --no-grab                             Don't grab mouse cursor
  --export-fonts [=arg(=1)] (=0)        Export Morrowind .fnt fonts to PNG
                                        image and XML file in current directory
  --activate-dist arg (=-1)             activation distance override
  --random-seed arg (=<impl defined>)   seed value for random number generator
Description
OpenMW is an open-source open-world RPG game engine that supports playing Morrowind. Main repo and issue tracker can be found here: https://gitlab.com/OpenMW/openmw/
Readme GPL-3.0 164 MiB
Languages
C++ 93.6%
Lua 3.4%
CMake 1.1%
C 0.6%
GLSL 0.5%
Other 0.8%