Merged from upstream master

0.6.1
Andrei Kortunov 8 years ago
commit 6c1e3a0618

@ -526,7 +526,6 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
window->setStore(mEnvironment.getWorld()->getStore());
window->initUI();
window->renderWorldMap();
//Load translation data
mTranslationDataStorage.setEncoder(mEncoder);

@ -160,22 +160,31 @@ namespace MWGui
void ReviewDialog::setHealth(const MWMechanics::DynamicStat<float>& value)
{
mHealth->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
int current = std::max(0, static_cast<int>(value.getCurrent()));
int modified = static_cast<int>(value.getModified());
mHealth->setValue(current, modified);
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
mHealth->setUserString("Caption_HealthDescription", "#{sHealthDesc}\n" + valStr);
}
void ReviewDialog::setMagicka(const MWMechanics::DynamicStat<float>& value)
{
mMagicka->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
int current = std::max(0, static_cast<int>(value.getCurrent()));
int modified = static_cast<int>(value.getModified());
mMagicka->setValue(current, modified);
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
mMagicka->setUserString("Caption_HealthDescription", "#{sMagDesc}\n" + valStr);
}
void ReviewDialog::setFatigue(const MWMechanics::DynamicStat<float>& value)
{
mFatigue->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
int current = std::max(0, static_cast<int>(value.getCurrent()));
int modified = static_cast<int>(value.getModified());
mFatigue->setValue(current, modified);
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
mFatigue->setUserString("Caption_HealthDescription", "#{sFatDesc}\n" + valStr);
}

@ -289,6 +289,7 @@ namespace MWGui
mMenu = new MainMenu(w, h, mResourceSystem->getVFS(), mVersionDescription);
mLocalMapRender = new MWRender::LocalMap(mViewer->getSceneData()->asGroup());
mMap = new MapWindow(mCustomMarkers, mDragAndDrop, mLocalMapRender, mWorkQueue);
mMap->renderGlobalMap();
trackWindow(mMap, "map");
mStatsWindow = new StatsWindow(mDragAndDrop);
trackWindow(mStatsWindow, "stats");
@ -376,11 +377,6 @@ namespace MWGui
MWBase::Environment::get().getInputManager()->changeInputMode(false);
}
void WindowManager::renderWorldMap()
{
mMap->renderGlobalMap();
}
void WindowManager::setNewGame(bool newgame)
{
// This method will always be called after loading a savegame or starting a new game
@ -555,13 +551,6 @@ namespace MWGui
if (mGuiModes.empty())
{
mInventoryWindow->setGuiMode(GM_None);
// If game is not running, we can't be sure that widgets are initialized properly
MWBase::StateManager::State state = MWBase::Environment::get().getStateManager()->getState();
if (state != MWBase::StateManager::State_Running)
return;
mMap->setVisible(mMap->pinned() && !(mForceHidden & GW_Map) && (mAllowed & GW_Map));
mStatsWindow->setVisible(mStatsWindow->pinned() && !(mForceHidden & GW_Stats) && (mAllowed & GW_Stats));
mInventoryWindow->setVisible(mInventoryWindow->pinned() && !(mForceHidden & GW_Inventory) && (mAllowed & GW_Inventory));

@ -137,7 +137,6 @@ namespace MWGui
void setStore (const MWWorld::ESMStore& store);
void initUI();
void renderWorldMap();
virtual Loading::Listener* getLoadingScreen();

@ -596,6 +596,21 @@ namespace MWMechanics
}
}
// purge levitate effect if levitation is disabled
// check only modifier, because base value can be setted from SetFlying console command.
if (MWBase::Environment::get().getWorld()->isLevitationEnabled() == false && effects.get(ESM::MagicEffect::Levitate).getModifier() > 0)
{
creatureStats.getSpells().purgeEffect(ESM::MagicEffect::Levitate);
creatureStats.getActiveSpells().purgeEffect(ESM::MagicEffect::Levitate);
if (ptr.getClass().hasInventoryStore(ptr))
ptr.getClass().getInventoryStore(ptr).purgeEffect(ESM::MagicEffect::Levitate);
if (ptr == getPlayer())
{
MWBase::Environment::get().getWindowManager()->messageBox ("#{sLevitateDisabled}");
}
}
// attributes
for(int i = 0;i < ESM::Attribute::Length;++i)
{

@ -500,8 +500,7 @@ namespace MWMechanics
{
// get the range of the target's weapon
float rangeAttackOfTarget = 0.f;
bool isRangedCombat = false;
MWWorld::Ptr targetWeapon = MWWorld::Ptr();
MWWorld::Ptr targetWeapon = MWWorld::Ptr();
const MWWorld::Class& targetClass = target.getClass();
if (targetClass.hasInventoryStore(target))
@ -516,7 +515,10 @@ namespace MWMechanics
boost::shared_ptr<Action> targetWeaponAction (new ActionWeapon(targetWeapon));
if (targetWeaponAction.get())
{
bool isRangedCombat = false;
rangeAttackOfTarget = targetWeaponAction->getCombatRange(isRangedCombat);
}
// apply sideway movement (kind of dodging) with some probability
// if actor is within range of target's weapon

@ -171,10 +171,10 @@ void MWMechanics::Alchemy::updateEffects()
if (fPotionT1DurMult<=0)
throw std::runtime_error ("invalid gmst: fPotionT1DurMult");
float magnitude = magicEffect->mData.mFlags & ESM::MagicEffect::NoMagnitude ?
1 : (x / fPotionT1MagMul) / magicEffect->mData.mBaseCost;
float duration = magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration ?
1 : (x / fPotionT1DurMult) / magicEffect->mData.mBaseCost;
float magnitude = (magicEffect->mData.mFlags & ESM::MagicEffect::NoMagnitude) ?
1.0f : (x / fPotionT1MagMul) / magicEffect->mData.mBaseCost;
float duration = (magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration) ?
1.0f : (x / fPotionT1DurMult) / magicEffect->mData.mBaseCost;
if (!(magicEffect->mData.mFlags & ESM::MagicEffect::NoMagnitude))
applyTools (magicEffect->mData.mFlags, magnitude);

@ -230,13 +230,6 @@ namespace MWPhysics
return direction - project(direction, planeNormal);
}
static inline osg::Vec3f reflect(const osg::Vec3& velocity, const osg::Vec3f& normal)
{
return velocity - (normal * (normal * velocity)) * 2;
// ^ dot product
}
public:
static osg::Vec3f traceDown(const MWWorld::Ptr &ptr, const osg::Vec3f& position, Actor* actor, btCollisionWorld* collisionWorld, float maxHeight)
{

@ -211,7 +211,7 @@ namespace MWPhysics
float mTimeAccum;
float mWaterHeight;
float mWaterEnabled;
bool mWaterEnabled;
std::auto_ptr<btCollisionObject> mWaterCollisionObject;
std::auto_ptr<btCollisionShape> mWaterCollisionShape;

@ -1058,11 +1058,9 @@ namespace MWRender
float timepassed = duration * state.mSpeedMult;
while(state.mPlaying)
{
float targetTime;
if (!state.shouldLoop())
{
targetTime = state.getTime() + timepassed;
float targetTime = state.getTime() + timepassed;
if(textkey == textkeys.end() || textkey->first > targetTime)
{
if(mAccumCtrl && state.mTime == mAnimationTimePtr[0]->getTimePtr())

@ -139,7 +139,8 @@ void MWState::StateManager::newGame (bool bypass)
{
cleanup();
MWBase::Environment::get().getWindowManager()->setNewGame (!bypass);
if (!bypass)
MWBase::Environment::get().getWindowManager()->setNewGame (true);
try
{
@ -148,8 +149,6 @@ void MWState::StateManager::newGame (bool bypass)
MWBase::Environment::get().getWorld()->startNewGame (bypass);
mState = State_Running;
MWBase::Environment::get().getWindowManager()->updateVisible();
}
catch (std::exception& e)
{

@ -538,13 +538,9 @@ namespace MWWorld
std::cout << "Changing to interior\n";
// unload
int current = 0;
CellStoreCollection::iterator active = mActiveCells.begin();
while (active!=mActiveCells.end())
{
unloadCell (active++);
++current;
}
int refsToLoad = cell->count();
loadingListener->setProgressRange(refsToLoad);

@ -222,8 +222,6 @@ namespace MWWorld
renderPlayer();
mRendering->resetCamera();
MWBase::Environment::get().getWindowManager()->updatePlayer();
// we don't want old weather to persist on a new game
// Note that if reset later, the initial ChangeWeather that the chargen script calls will be lost.
delete mWeatherManager;
@ -283,6 +281,8 @@ namespace MWWorld
if (!mStartupScript.empty())
MWBase::Environment::get().getWindowManager()->executeInConsole(mStartupScript);
MWBase::Environment::get().getWindowManager()->updatePlayer();
}
void World::clear()

@ -48,8 +48,8 @@ This value controls the maximum visible distance (also called the far clipping p
The constant 8192 is the size of a cell, and 1024 is the threshold distance for loading a new cell. Additionally, the field of view setting also interacts with this setting because the view frustrum end is a plane, so you can see further at the edges of the screen than you should be able to. This can be observed in game by looking at distant objects and rotating the camera so the objects are near the edge of the screen. As a result, this setting should further be reduced by a factor that depends on the field of view setting. In the default configuration this reduction is 7%, hence the factor of 0.93 above. Using this factor, approximate values recommended for other exterior cell load distance settings are:
======= ========
Cells Viewing
Distance
Cells Viewing
Distance
======= ========
2 14285
3 21903

@ -66,3 +66,21 @@ show effect duration
Show the remaining duration of magic effects and lights if this setting is true. The remaining duration is displayed in the tooltip by hovering over the magical effect.
The default value is false. This setting can only be configured by editing the settings configuration file.
prevent merchant equipping
--------------------------
:Type: boolean
:Range: True/False
:Default: False
Prevents merchants from equipping items that are sold to them.
followers attack on sight
-------------------------
:Type: boolean
:Range: True/False
:Default: False
Makes player followers and escorters start combat with enemies who have started combat with them or the player. Otherwise they wait for the enemies or the player to do an attack first.

@ -23,13 +23,29 @@ Specify the format for screen shots taken by pressing the screen shot key (bound
The default value is "png". This setting can only be configured by editing the settings configuration file.
texture filtering
-----------------
texture mag filter
------------------
:Type: string
:Range: nearest, linear
:Default: linear
Set the texture magnification filter type.
texture min filter
------------------
:Type: string
:Range: bilinear, trilinear
:Default: trilinear
:Range: nearest, linear
:Default: linear
Set the texture minification filter type.
Set the isotropic texture filtering mode to bilinear or trilinear. Bilinear filtering is a texture filtering method used to smooth textures when displayed larger or smaller than they actually are. Bilinear filtering is reasonably accurate until the scaling of the texture gets below half or above double the original size of the texture. Trilinear filtering is an extension of the bilinear texture filtering method, which also performs linear interpolation between mipmaps. Both methods use mipmaps in OpenMW, and the corresponding OpenGL modes are LINEAR_MIPMAP_NEAREST and LINEAR_MIPMAP_LINEAR. Trilinear filtering produces better texturing at a minimal cost on modern video cards.
texture mipmap
--------------
:Type: string
:Range: none, nearest, linear
:Default: nearest
The default value is trilinear. This setting can be changed in game using the Texture filtering pull down in the Detail tab of the Video panel of the Options menu.
Set the texture mipmap type to control the method mipmaps are created. Mipmapping is a way of reducing the processing power needed during minification by pregenerating a series of smaller textures.

@ -2,28 +2,29 @@
Advanced Settings Configuration
###############################
This part of the guide will cover how to make modifications to the more arcane settings in OpenMW, most of which are not available from in-game menus, to optimize or customize your OpenMW experience. If you are familiar with ``.ini`` tweaks in Morrowind or the other games, this will be quite similar. All settings described in this section are changed in ``settings.cfg``, located in your OpenMW user directory. See :doc:`paths` for this location.
This part of the guide will cover how to make modifications to the more arcane settings in OpenMW, most of which are not available from in-game menus, to optimize or customize your OpenMW experience. If you are familiar with ``.ini`` tweaks in Morrowind or the other games, this will be quite similar. All settings described in this section are changed in ``settings.cfg``, located in your OpenMW user directory. See :doc:`../paths` for this location.
Although this guide attempts to be comprehensive and up to date, you will always be able to find the full list of settings available and their default values in ``settings-default.cfg`` in your main OpenMW installation directory. The ranges I have included with each setting are the physically possible ranges, not recommendations.
.. warning::
As the title suggests, these are advanced settings. If digging around plain text files and manually editing settings sounds scary to you, you may want to stear clear of altering these files. That being said, this guide should be plenty clear enough that you can find the setting you want to change and safely edit it.
As the title suggests, these are advanced settings. If digging around plain text files and manually editing settings sounds scary to you, you may want to steer clear of altering these files. That being said, this guide should be plenty clear enough that you can find the setting you want to change and safely edit it.
.. toctree::
:caption: Table of Contents
:maxdepth: 2
:caption: Table of Contents
:maxdepth: 2
camera
cells
map
GUI
HUD
game
general
input
saves
sound
terrain
video
water
windows
camera
cells
map
GUI
HUD
game
general
shaders
input
saves
sound
terrain
video
water
windows

@ -1,8 +1,19 @@
Map Settings
############
global map size
---------------
global
------
:Type: boolean
:Range: True/False
:Default: False
If this setting is true, a world map on a map window will be displayed, otherwise a local map will be displayed.
The default value is false. This setting can be toggled with the local/world map switch button on the map window.
global map cell size
--------------------
:Type: integer
:Range: >= 1
@ -10,7 +21,8 @@ global map size
This setting adjusts the scale of the world map in the GUI mode map window. The value is the width in pixels of each cell in the map, so larger values result in larger more detailed world maps, while smaller values result in smaller less detailed world maps. However, the native resolution of the map source material appears to be 9 pixels per unexplored cell and approximately 18 pixels per explored cell, so values larger than 36 don't produce much additional detail. Similarly, the size of place markers is currently fixed at 12 pixels, so values smaller than this result in overlapping place markers. Values from 12 to 36 are recommended. For reference, Vvardenfell is approximately 41x36 cells.
Warning: Changing this setting affects saved games. The currently explored area is stored as an image in the save file that's overlayed on the default world map in game. When you increase the resolution of the map, the overlay of earlier saved games will be scaled up on load, and appear blurry. When you visit the cell again, the overlay for that cell is regenerated at the new resolution, so the blurry areas can be corrected by revisiting all the cells you've already visited.
.. Warning::
Changing this setting affects saved games. The currently explored area is stored as an image in the save file that's overlayed on the default world map in game. When you increase the resolution of the map, the overlay of earlier saved games will be scaled up on load, and appear blurry. When you visit the cell again, the overlay for that cell is regenerated at the new resolution, so the blurry areas can be corrected by revisiting all the cells you've already visited.
The default value for this setting is 18. This setting can not be configured except by editing the settings configuration file.
@ -27,6 +39,15 @@ Note that the actual size of the widget is always the same on the screen unless
The default value for this setting is 256. This setting can not be configured except by editing the settings configuration file.
local map hud fog of war
------------------------
:Type: boolean
:Range: True/False
:Default: False
This setting enables fog of war rendering on the HUD map. Default is Off since with default settings the map is so small that the fog would not obscure anything, just darken the edges slightly.
local map resolution
--------------------
@ -52,13 +73,11 @@ This setting controls the canvas size of the GUI mode local map window. Larger v
The default value for this setting is 512. This setting can not be configured except by editing the settings configuration file.
global
------
local map cell distance
-----------------------
:Type: boolean
:Range: True/False
:Default: False
If this setting is true, a world map on a map window will be displayed, otherwise a local map will be displayed.
:Type: integer
:Range: >= 1
:Default: 1
The default value is false. This setting can be toggled with the Local/World map switch button on the map window.
Similar to "[Cells] exterior cell load distance", controls how many cells are rendered on the local map. Values higher than the default may result in longer loading times.

@ -0,0 +1,101 @@
Shader Settings
###############
force shaders
-------------
:Type: boolean
:Range: True/False
:Default: False
Force rendering with shaders. By default, only bump-mapped objects will use shaders. Enabling this option may cause slightly different visuals if the "clamp lighting" option is set to false. Otherwise, there should not be a visual difference.
force per pixel lighting
------------------------
:Type: boolean
:Range: True/False
:Default: False
Force the use of per pixel lighting. By default, only bump mapped objects use per-pixel lighting. Has no effect if the 'force shaders' option is false. Enabling per-pixel lighting can result in visual differences to the original MW engine. It is not recommended to enable this option when using vanilla Morrowind files, because certain lights in Morrowind rely on vertex lighting to look as intended.
clamp lighting
--------------
:Type: boolean
:Range: True/False
:Default: True
Restrict the amount of lighting that an object can receive to a maximum of (1,1,1). Only affects objects that render with shaders (see 'force shaders' option). Always affects terrain. Setting this option to 'true' results in fixed-function compatible lighting, but the lighting may appear 'dull' and there might be color shifts. Setting this option to 'false' results in more realistic lighting.
auto use object normal maps
---------------------------
:Type: boolean
:Range: True/False
:Default: False
If this option is enabled, normal maps are automatically recognized and used if they are named appropriately (see 'normal map pattern', e.g. for a base texture foo.dds, the normal map texture would have to be named foo_n.dds). If this option is disabled, normal maps are only used if they are explicitly listed within the mesh file (.nif or .osg file). Affects objects.
auto use object specular maps
-----------------------------
:Type: boolean
:Range: True/False
:Default: False
If this option is enabled, specular maps are automatically recognized and used if they are named appropriately (see 'specular map pattern', e.g. for a base texture foo.dds, the specular map texture would have to be named foo_spec.dds). If this option is disabled, normal maps are only used if they are explicitly listed within the mesh file (.osg file, not supported in .nif files). Affects objects.
auto use terrain normal maps
----------------------------
:Type: boolean
:Range: True/False
:Default: False
See 'auto use object normal maps'. Affects terrain.
auto use terrain specular maps
------------------------------
:Type: boolean
:Range: True/False
:Default: False
If a file with pattern 'terrain specular map pattern' exists, use that file as a 'diffuse specular' map. The texture must contain the layer color in the RGB channel (as usual), and a specular multiplier in the alpha channel.
normal map pattern
------------------
:Type: string
:Range:
:Default: _n
The filename pattern to probe for when detecting normal maps (see 'auto use object normal maps', 'auto use terrain normal maps')
normal height map pattern
-------------------------
:Type: string
:Range:
:Default: _nh
Alternative filename pattern to probe for when detecting normal maps. Files with this pattern are expected to include 'height' in the alpha channel.This height is used for parallax effects. Works for both terrain and objects.
specular map pattern
--------------------
:Type: string
:Range:
:Default: _spec
The filename pattern to probe for when detecting object specular maps (see 'auto use object specular maps')
terrain specular map pattern
----------------------------
:Type: string
:Range:
:Default: _diffusespec
The filename pattern to probe for when detecting terrain specular maps (see 'auto use terrain specular maps')

@ -1,5 +1,5 @@
Terrain Settings
###############
################
distant terrain
---------------

@ -50,7 +50,7 @@ minimize on focus loss
:Type: boolean
:Range: True/False
:Default: False
:Default: True
Minimize the OpenMW window if it loses cursor focus. This setting is primarily useful for single screen configurations, so that the OpenMW screen in full screen mode can be minimized when the operating system regains control of the mouse and keyboard. On multiple screen configurations, disabling this option makes it easier to switch between screens while playing OpenMW.

@ -42,6 +42,15 @@ This setting has no effect if the shader setting is false.
The default setting is false. This setting can be toggled with the Refraction button in the Water tab of the Video panel of the Options menu.
reflect actors
--------------
:Type: boolean
:Range: True/False
:Default: False
This setting controls whether or not NPCs and creatures are drawn in water reflections. Setting this to true will enable actors in reflections and increase realism with a likely decrease in performance. This setting is off by default.
small feature culling pixel size
--------------------------------

@ -84,7 +84,7 @@
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="532 397 42 23" name="OKButton">
<Property key="Caption" value="#{sOK]"/>
<Property key="Caption" value="#{sOK}"/>
</Widget>
</Widget>
</Widget>

@ -68,11 +68,13 @@
<Resource type="ResourceLayout" name="MW_StatNameValue" version="3.2.0">
<Widget type="Widget" skin="" position="0 0 200 18" name="Root">
<Property key="NeedMouse" value="true"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" align="Left HStretch" name="StatName">
<Widget type="TextBox" skin="SandText" position="0 0 168 18" align="Left HStretch" name="StatName">
<Property key="NeedMouse" value="false"/>
<Property key="TextAlign" value="Left"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 40 18" align="Right Top" name="StatValue">
<Widget type="TextBox" skin="SandTextRight" position="168 0 32 18" align="Right Top" name="StatValue">
<Property key="NeedMouse" value="false"/>
<Property key="TextAlign" value="Right"/>
</Widget>
</Widget>
</Resource>

@ -139,24 +139,24 @@ color_misc=0,205,205 # ????
<Resource type="ResourceSkin" name="MW_ChargeBar_Blue" size="204 18">
<Child type="ProgressBar" skin="MW_Progress_Blue" offset="0 0 204 18" align="Right Top Stretch" name="Bar"/>
<Child type="TextBox" skin="ProgressText" offset="0 1 204 14" align="Right Top Stretch" name="BarText"/>
<Child type="TextBox" skin="ProgressText" offset="0 0 204 16" align="Right Top Stretch" name="BarText"/>
</Resource>
<Resource type="ResourceSkin" name="MW_DynamicStat_Red" size="204 18">
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
<Child type="ProgressBar" skin="MW_Progress_Red" offset="74 0 130 18" align="Right Top" name="Bar"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 18" align="Right Top" name="BarText"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
</Resource>
<Resource type="ResourceSkin" name="MW_DynamicStat_Blue" size="204 18">
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
<Child type="ProgressBar" skin="MW_Progress_Blue" offset="74 0 130 18" align="Right Top" name="Bar"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 18" align="Right Top" name="BarText"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
</Resource>
<Resource type="ResourceSkin" name="MW_DynamicStat_Green" size="204 18">
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
<Child type="ProgressBar" skin="MW_Progress_Green" offset="74 0 130 18" align="Right Top" name="Bar"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 18" align="Right Top" name="BarText"/>
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
</Resource>
</MyGUI>

Loading…
Cancel
Save