Merge pull request #105 from OpenMW/master

Add OpenMW changes up to 19 Nov
coverity_scan^2
David Cernat 8 years ago committed by GitHub
commit 49a78d8462

@ -435,14 +435,15 @@ namespace MWWorld
gmst["fNPCHealthBarTime"] = ESM::Variant(5.f);
gmst["fNPCHealthBarFade"] = ESM::Variant(1.f);
gmst["fFleeDistance"] = ESM::Variant(3000.f);
gmst["sMaxSale"] = ESM::Variant("Max Sale");
// Werewolf (BM)
gmst["fWereWolfRunMult"] = ESM::Variant(1.f);
gmst["fWereWolfSilverWeaponDamageMult"] = ESM::Variant(1.f);
gmst["iWerewolfFightMod"] = ESM::Variant(1);
gmst["fWereWolfRunMult"] = ESM::Variant(1.3f);
gmst["fWereWolfSilverWeaponDamageMult"] = ESM::Variant(2.f);
gmst["iWerewolfFightMod"] = ESM::Variant(100);
gmst["iWereWolfFleeMod"] = ESM::Variant(100);
gmst["iWereWolfLevelToAttack"] = ESM::Variant(20);
gmst["iWereWolfBounty"] = ESM::Variant(10000);
gmst["iWereWolfBounty"] = ESM::Variant(1000);
gmst["fCombatDistanceWerewolfMod"] = ESM::Variant(0.3f);
std::map<std::string, ESM::Variant> globals;

@ -6,23 +6,23 @@ Normal maps from Morrowind to OpenMW
- `Normal Mapping in OpenMW`_
- `Activating normal mapping shaders in OpenMW`_
- `Normal mapping in Morrowind with Morrowind Code Patch`_
- `Normal mapping in Morrowind with MGE XE (PBR version)`_
- `Normal mapping in Morrowind with MGE XE`_
- `Converting PeterBitt's Scamp Replacer`_ (Mod made for the MGE XE PBR prototype)
- `Tutorial - MGE`_
- `Converting Lougian's Hlaalu Bump mapped`_ (MCP's fake bump map function, part 1: *without* custom models)
- `Tutorial - MCP, Part 1`_
- `Converting Apel's Various Things Sacks`_ (MCP's fake bump map function, part 2: *with* custom models)
- `Converting Apel's Various Things - Sacks`_ (MCP's fake bump map function, part 2: *with* custom models)
- `Tutorial - MCP, Part 2`_
General introduction to normal map conversion
------------------------------------------------
:Authors: Joakim (Lysol) Berg
:Updated: 2016-11-09
:Updated: 2016-11-11
This page has general information and tutorials on how normal mapping works in OpenMW and how you can make mods using the old fake normal mapping technique (such as `Netch Bump mapped`_ and `Hlaalu Bump mapped`_ work in OpenMW.
This page has general information and tutorials on how normal mapping works in OpenMW and how you can make mods using the old fake normal mapping technique (such as `Netch Bump mapped`_ and `Hlaalu Bump mapped`_, and maybe the most (in)famous one to give shiny rocks in OpenMW, the mod `On the Rocks`_!, featured in MGSO and Morrowind Rebirth) work in OpenMW.
*Note:* The conversion made in part four of this tutorial require the use of the application NifSkope, which is a Windows-only application. Read part one of this tutorial to learn more.
*Note:* The conversion made in the `Converting Apel's Various Things - Sacks`_-part of this tutorial require the use of the application NifSkope. There are binaries available for Windows, but not for Mac or Linux. Reports say that NifSkope versions 1.X will compile on Linux as long as you have Qt packages installed, while the later 2.X versions will not compile.
*Another note:* I will use the terms bump mapping and normal mapping simultaneously. Normal mapping is one form of bump mapping. In other words, normal mapping is bump mapping, but bump mapping isn't necessarily normal mapping. There are several techniques for bump mapping, and normal mapping is the most common one today.
@ -35,7 +35,7 @@ Normal mapping in OpenMW works in a very simple way: The engine just looks for a
So to expand on this a bit, let's take a look at how a model seeks for textures.
Let us assume we have the model *example.nif*. In this model file, there should be a tag (NiSourceTexture) that states what texture it should use and where to find it. Typically, it will point to something like *exampletexture_01.dds*. This texture is supposed to be located directly in the Textures folder since it does not state anything else. If the model is a custom made one, modders tend to group their textures in separate folders, just to easily keep track of them. It might be something like *Textures\moddername\exampletexture_02.dds*.
Let us assume we have the model *example.nif*. In this model file, there should be a tag (NiSourceTexture) that states what texture it should use and where to find it. Typically, it will point to something like *exampletexture_01.dds*. This texture is supposed to be located directly in the Textures folder since it does not state anything else. If the model is a custom made one, modders tend to group their textures in separate folders, just to easily keep track of them. It might be something like *./Textures/moddername/exampletexture_02.dds*.
When OpenMW finally adds normal mapping, it simply takes the NiSourceTexture file path, e.g., *exampletexture_01.dds*, and looks for a *exampletexture_01_n.dds*. If it can't find this file, no normal mapping is added. If it *does* find this file, the model will use this texture as a normal map. Simple.
@ -80,8 +80,8 @@ The biggest problem with this is not that it doesn't look as good as it could
These are basically the reasons why OpenMW does not support fake bump maps like MCP does. It is just a really bad way to enhance your models, all the more when you have the possibility to do it in a better way.
Normal mapping in Morrowind with MGE XE (PBR version)
*****************************************************
Normal mapping in Morrowind with MGE XE
***************************************
**Conversion difficulty:**
*Easy*
@ -97,7 +97,7 @@ Converting PeterBitt's Scamp Replacer
**Mod made for the MGE XE PBR prototype**
:Authors: Joakim (Lysol) Berg
:Updated: 2016-11-09
:Updated: 2016-11-11
So, let's say you've found out that PeterBitt_ makes awesome models and textures featuring physically based rendering (PBR) and normal maps. Let's say that you tried to run his `PBR Scamp Replacer`_ in OpenMW and that you were greatly disappointed when the normal map didn't seem to work. Lastly, let's say you came here, looking for some answers. Am I right? Great. Because you've come to the right place!
@ -112,11 +112,11 @@ So, follow these steps:
#. Go to the Nexus page for PeterBitt's `PBR Scamp Replacer`_
#. Go to the *files* tab and download the main file and the "PBR materials" file.
#. Extract the main file as if you'd install a normal mod (**Pro tip**: Install using OpenMW's `Multi-data`_ folder function!)
#. Extract the main file as if you'd install a normal mod (**Pro tip**: Install using OpenMW's `Multiple data folders`_ function!)
#. Now, open the PBR materials file:
- Go to ``Materials/PB/``.
- Go to ``./Materials/PB/``.
- Select the ``tx_Scamp_normals.dds`` file, which is, obviously, the normal map texture.
- Extract this file to the place you extracted the main file to, but in the subdirectory ``Textures/PB/``.
- Extract this file to the place you extracted the main file to, but in the subdirectory ``./Textures/PB/``.
#. Rename your newly extracted file (``tx_Scamp_normals.dds``) to ``tx_Scamp_n.dds`` (which is exactly the same name as the diffuse texture file, except for the added *_n* suffix before the filename extention).
#. You're actually done!
@ -131,7 +131,7 @@ Converting Lougian's Hlaalu Bump mapped
**Mod made for MCP's fake bump function, without custom models**
:Authors: Joakim (Lysol) Berg
:Updated: 2016-11-09
:Updated: 2016-11-11
Converting textures made for the Morrowind Code Patch (MCP) fake bump mapping can be really easy or a real pain, depending on a few circumstances. In this tutorial, we will look at a very easy, although in some cases a bit time-consuming, example.
@ -141,8 +141,8 @@ Tutorial - MCP, Part 1
We will be converting a quite popular texture replacer of the Hlaalu architecture, namely Lougian's `Hlaalu Bump mapped`_. Since this is just a texture pack and not a model replacer, we can convert the mod in a few minutes by just renaming a few dozen files and by *not* extracting the included model (``.nif``) files when installing the mod.
#. Download Lougian's `Hlaalu Bump mapped`_.
#. Install the mod by extracting the ``Textures`` folder to a data folder the way you usually install mods (**Pro tip**: Install using OpenMW's `Multi-data`_ folder function!).
- Again, yes, *only* the ``Textures`` folder. Do *not* extract the Meshes folder. They are only there to make the MCP hack work, which is not of any interest to us.
#. Install the mod by extracting the ``./Textures`` folder to a data folder the way you usually install mods (**Pro tip**: Install using OpenMW's `Multiple data folders`_ function!).
- Again, yes, *only* the ``./Textures`` folder. Do *not* extract the Meshes folder. They are only there to make the MCP hack work, which is not of any interest to us.
#. Go to your new texture folder. If you installed the mod like I recommended, you won't have any trouble finding the files. If you instead placed all your files in Morrowinds main Data Files folder (sigh), you need to check with the mod's .rar file to see what files you should look for. Because you'll be scrolling through a lot of files.
#. Find all the textures related to the texture pack in the Textures folder and take note of all the ones that ends with a *_nm.dds*.
#. The *_nm.dds* files are normal map files. OpenMW's standard format is to have the normal maps with a *_n.dds* instead. Rename all the normal map textures to only have a *_n.dds* instead of the *_nm.dds*.
@ -151,7 +151,7 @@ We will be converting a quite popular texture replacer of the Hlaalu architectur
Now if the mod you want to change includes custom made models it gets a bit more complicated I'm afraid. But that is for the next tutorial.
Converting Apel's Various Things Sacks
Converting Apel's Various Things - Sacks
----------------------------------------
**Mod made for MCP's fake bump function, with custom models**
@ -160,7 +160,7 @@ Converting Apel's Various Things Sacks
In part one of this tutorial, we converted a mod that only included modified Morrowind model (``.nif``) files so that the normal maps could be loaded in Morrowind with MCP. We ignored those model files since they are not needed with OpenMW. In this tutorial however, we will convert a mod that includes new, custom made models. In other words, we cannot just ignore those files this time.
Before we begin, you need to know that we will be needing a Windows OS for this, unless you can get the application we will be using to work in Wine or something similar.
Before we begin, you need to know that unless you want to build the NifSkope application from source yourself, you will be needing a Windows OS to do this part, since the application only has binaries available for Windows.
Tutorial - MCP, Part 2
**********************
@ -168,10 +168,10 @@ Tutorial - MCP, Part 2
The sacks included in Apel's `Various Things - Sacks`_ come in two versions Without bump mapping, and with bump mapping. Since we want the glory of normal mapping in our OpenMW setup, we will go with the bump-mapped version.
#. Start by downloading Apel's `Various Things - Sacks`_ from Nexus.
#. Once downloaded, install it the way you'd normally install your mods (**Pro tip**: Install using OpenMW's `Multi-data`_ folder function!).
#. Once downloaded, install it the way you'd normally install your mods (**Pro tip**: Install using OpenMW's `Multiple data folders`_ function!).
#. Now, if you ran the mod right away, your sacks will be made out of lead_. This is because the normal map is loaded as an environment map which MCP fixes so that it looks less shiny. We don't use MCP, so therefore, it looks kind of like the shack was made out of lead.
#. We need to fix this by removing some tags in the model files. You need to download NifSkope_ for this, which, again, is a Windows-only application.
#. Go the place where you installed the mod and go to ``Meshes/o/`` to find the model files.
#. We need to fix this by removing some tags in the model files. You need to download NifSkope_ for this, which, again, only have binaries available for Windows.
#. Go the place where you installed the mod and go to ``./Meshes/o/`` to find the model files.
- If you installed the mod like I suggested, finding the files will be easy as a pie, but if you installed it by dropping everything into your main Morrowind Data Files folder, then you'll have to scroll a lot to find them. Check the mod's zip file for the file names of the models if this is the case. The same thing applies to when fixing the textures.
#. Open up each of the models in NifSkope and look for these certain blocks_:
- NiTextureEffect
@ -179,7 +179,7 @@ The sacks included in Apel's `Various Things - Sacks`_ come in two versions
#. Remove all these tags by selecting them one at a time and press right click>Block>Remove.
#. Repeat this on all the affected models.
#. If you launch OpenMW now, you'll `no longer have shiny models`_. But one thing is missing. Can you see it? It's actually hard to spot on still pictures, but we have no normal maps here.
#. Now, go back to the root of where you installed the mod. Now go to ``Textures/`` and you'll find the texture files in question.
#. Now, go back to the root of where you installed the mod. Now go to ``./Textures/`` and you'll find the texture files in question.
#. OpenMW detects normal maps if they have the same name as the base diffuse texture, but with a *_n.dds* suffix. In this mod, the normal maps has a suffix of *_nm.dds*. Change all the files that ends with *_nm.dds* to instead end with *_n.dds*.
#. Finally, `we are done`_!
@ -187,12 +187,13 @@ Since these models have one or two textures applied to them, the fix was not tha
.. _`Netch Bump mapped`: http://www.nexusmods.com/morrowind/mods/42851/?
.. _`Hlaalu Bump mapped`: http://www.nexusmods.com/morrowind/mods/42396/?
.. _`On the Rocks`: http://mw.modhistory.com/download-44-14107
.. _`texture modding`: https://wiki.openmw.org/index.php?title=TextureModding
.. _`MGE XE`: http://www.nexusmods.com/morrowind/mods/26348/?
.. _PeterBitt: http://www.nexusmods.com/morrowind/users/4381248/?
.. _`PBR Scamp Replacer`: http://www.nexusmods.com/morrowind/mods/44314/?
.. _settings.cfg: https://wiki.openmw.org/index.php?title=Settings
.. _`Multi-data`: https://wiki.openmw.org/index.php?title=Mod_installation
.. _`Multiple data folders`: https://wiki.openmw.org/index.php?title=Mod_installation
.. _`Various Things - Sacks`: http://www.nexusmods.com/morrowind/mods/42558/?
.. _Lead: http://imgur.com/bwpcYlc
.. _NifSkope: http://niftools.sourceforge.net/wiki/NifSkope

@ -61,7 +61,7 @@
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="0 60 60 24" name="MaxSaleButton" align="Left Top">
<Property key="Caption" value="Max. Sale"/> <!-- GMST sMaxSale doesn't work -->
<Property key="Caption" value="#{sMaxSale}"/>
</Widget>
</Widget>

Loading…
Cancel
Save