You are on page 1of 9

--------------------

Morrowind Code Patch


--------------------

crafted by Hrnchamd at Sun's Reach


tempered and polished by Psyringe
version 2.2

About
-----
Morrowind is a game of great depth, a huge world, incredibly extensible and with a
thriving community. Unfortunately it's also full of bugs. This is our attempt at
defeating the worst bugs in the game, including save corruption; and also adding a
few more features people have dreamt of.

Getting started
---------------
Important: Before you install, make sure you remove any active Blind or Fortify
Health effects from your saved characters. This patch fixes some aspects of those
effects, but it only works properly if they are removed first.

Morrowind Code Patch will patch your Morrowind.exe file to fix things, and redate
your BSAs so that mods override vanilla files properly for Steam users. If you're
using the Polish version it will also patch your font files to display characters
in the console properly.

Installation
------------
Extract the zip to your Morrowind directory, the one with the Morrowind program in
it (not Data Files).

Run the Morrowind Code Patch program. If Morrowind is installed in Program Files,
you will need to run it as administrator.

Read the message, and examine the patches listed on the left. The program will
explain what each patch does, click on the patch name to display it on the right. A
default selection that covers all the bug fixes is already selected, if you're not
sure what to use. Press 'Apply chosen patches'.

Your Morrowind.exe will be updated with the selected bugfixes. The original program
is backed up to Morrowind.original.exe. The backup will always be the unpatched
version.

If necessary, your BSAs (game asset files) will be redated to the time of the
original release so that mods can override it correctly. The Steam version supplies
the assets with the incorrect creation times, so the patch fixes it.

The next time you start Morrowind, at the main menu you should see MCP and the
version number in the bottom left corner. Since the patch fixes bugs in Morrowind's
lighting, you may need to re-adjust your brightness settings.

If you want to save your current choice of installed patches, make a copy of the
file mcpatch/installed.

I would also recommend trying my Better Dialogue Font replacer for sharper and
easier to read text.
It supports multiple languages, and can be found at
http://www.nexusmods.com/morrowind/mods/36873/

Upgrading
---------
If you're upgrading from MCP 2.0 or later, you may then extract the zip on top of
the existing files. You need to run MCP to apply the new fixes and review new
gameplay options. New default bugfixes will be automatically added to the list of
selected patches. Just click "Install chosen patches" to update to the latest
version.

After starting Morrowind, confirm MCP is updated to the latest version by checking
the version number in the bottom left of the main menu.

Uninstalling
------------
Run MCP and use the Uninstall button. You may then delete the MCP program.

Compatibility
-------------
All savegames are compatible with original Morrowind. It is still advisable to make
backups in any case.

This patch is tested and compatible with MWSE, MWE, MGE and FPS Optimizer 1.96. It
is not compatible with FPS Optimizer 2.0.

This patch should support French, German, Italian, Polish and Russian editions. If
it doesn't work on your version please email me using the address in the Contact
section. This patch should also support the Steam edition, as long as Steam make no
further changes to the program. The Impulse / GameFly downloaded version of
Morrowind is NOT supported, as Impulse adds a custom DRM wrapper to the program,
which I am unable to work around.

The patcher currently requires Morrowind.exe 1.6.0.1820, that is, fully patched
Bloodmoon or GOTY edition. It cannot patch if Morrowind has already been modified
with another program such as Exe Optimizer, fpu2sse or a no-CD patch. You may run
the other programs _only after_ this patch is applied. You will need to re-run them
if you change your options in MCP and apply the changes.

For Russian users: This program also patches your Text.dll so it doesn't give an
error about the program checksum being different. It works with standard Text.dll
and also General Fixes Mod v5 Text.dll. It should recognize if you have updated
your Text.dll too.

If you have multiple installs of Morrowind, please note that the launcher always
runs the exe from the last installed directory (but with the settings from the
correct directory). You should run Morrowind.exe directly in this case.
Trying out all the features
---------------------------
There is a Morrowind Code Patch Showcase mod installed in your Data Files folder.
This is optional and for explaining and trying out MCP features only. Enable it,
start a new game and head through the trap door that appears outside the office in
Seyda Neen. You will get a demonstration of most of the features of this patch by
courtesy of Psyringe. Compare it to how normal, unpatched Morrowind works with the
same mod.

Savegame changes
----------------
The savegame corruption patch does not affect your current savegames. You can
continue playing your current game without problems. You can always load savegames
this patch creates in unpatched Morrowind. However, there are some things you
should know.

Morrowind now effectively cleans your savegame every time you remove a mod, with
the same effect as removing a mod using Wrye Mash.

This does reset everything the mod has changed from the original game, in
particular NPCs and items moved or modified, because those objects belong to the
mod. If the mod moved an NPC, the NPC will reset, including its position, script,
disposition etc.

If you wish to retain the changed information, you will need to use the new Keep
Replaced Refs feature.

This is an alternative to Wrye Mash cleaning, it attempts to merge your changes


into the original game instead of removing them. You MUST NOT use Wrye Mash to
repair/clean the save created using this feature, but only that save. It is fine to
repair savegames created afterwards.

Step-by-step:
1. Before you remove your mod. Load the savegame.
2. Open the console and type 'KRR', press return.
3. It should say 'Keep changed refs On'
4. Save the game under a different name (probably '-merged')
5. Exit the game immediately.
6. Adjust your mod load list. (DO NOT use Repair on the save in Wrye Mash)
7. Open Morrowind and load your merged save. You may still get errors for missing
objects and spells, as usual, but the loader will merge as much as possible.
8. Continue playing.

Map expansion changes


-------------------
The map expansion is primarily made to accommodate the whole of Tamriel Rebuilt. It
resizes the map to show a larger area of Tamriel than before, and moves the map
origin to the south of Vvardenfell. A saved map cannot be restored to normal size
after you remove the patch, so make a backup of your save /before/ you turn the
patch on.

Map boundaries:
Original map: (-28,-28) to (28,28)
Expanded map: (-51,-64) to (51,38)
The scale is reduced to 5/9 of the original.

It is possible to zoom in (2x) the world map to get a better view using PgUp/PgDn.
It uses magnification of the map texture, so texture quality is affected.

Savegames created before this patch is activated will have their maps automatically
rescaled, there is no need to make a new game. Removing the patch will not reset
the map, as you are removing the code that knows about the changes. You must
restore from a backup save in this case.

Mod author information


--------------------
MCP adds new engine features for modellers and animators to use when making new
mods. In this section I will describe the changes and how to use them.

Reflection, gloss maps and bump maps


---
MCP enables models to have working gloss maps, and lets skinned objects have
reflection maps where it was not allowed before. The engine was capable of these,
but the proper data handling was not implemented before.

Gloss maps allow control of the strength and colour of reflection from a reflection
map via an extra texture. Just set the gloss map entry in the texturing property.
If your model is using bump maps, it works differently; you must put the gloss map
in the blue channel of the bump texture, and being one channel, it controls just
the strength of the reflection.

Skinned models now support reflection maps, so you can finally make shiny clothing,
hair, etc. Make sure the NiTextureEffect is both in the children list and effects
list of the parent NiNode, and it should work. This also allows bumpmaps to work,
as bumpmaps require a reflection map in the engine.

For animators
---
The improved animation patch has support for new bones, but they have to be named
correctly. The engine has three bone groups, lower body (root bone, base spine and
legs), upper body (spine1 and above, right arm), and left arm (left clavicle and
arm bones). For animations to work together a bone has to belong to one of these
groups. The patch changes the bone checks from strict match to substring match, so
you have to append to your bone's name, a bone from the group it will attach to.

Typical use would be: If you want a bone "CustomBone" to be part of the lower body
group, name it "CustomBone (Bip01 Pelvis)", for upper body group "CustomBone (Bip01
Spine2)", for left arm group "CustomBone (Bip01 L UpperArm)".

A full list of acceptable non-conflicting bone names to add are (add Bip01 in front
of them):
Lower body group - Pelvis, L Thigh, L Calf, L Foot, L Toe0, R Thigh, R Calf, R
Foot, R Toe0, MRT, Tail
Upper body group - Spine1, Spine2, Neck, Head, R Clavicle, R UpperArm, R Forearm, R
Hand, R Finger0, R Finger1, R Finger2, R Finger3, R Finger4, Weapon Bone
Left arm group - L Clavicle, L UpperArm, L Forearm, L Hand, L Finger0, L Finger1, L
Finger2, L Finger3, L Finger4, Shield Bone

Try to name extra bones to the closest available bone for clearness and future use.
The list of animation names are unchanged, as they are referred to by numerical IDs
in the engine. It's recommended to replace the sneak animations (there are 20
available) if you need custom animations for a single NPC, as these are unused for
most NPCs.

PlayGroup / LoopGroup
---
The improved animation patch also changes PlayGroup and LoopGroup to work properly
with NPCs and their bone groups. Before it would only play on the lower body, now
it should cover the whole NPC.

PlayGroup and LoopGroup both play animations. PlayGroup is essentially doing


LoopGroup -1. These both have optional flags, which are important in getting the
animations to loop correctly.

PlayGroup groupname, flags


LoopGroup groupname, count, flags

flags = 0 (default)
The controller waits until the current animation is complete before starting the
given animation. It plays the whole animation and ignores any Loop Start/End text
keys. If you want to avoid glitches, the whole animation must loop cleanly.

flags = 1
The current animation will stop, and the new animation will start from its
beginning. Respects Loop text keys.

flags = 2
The current animation will stop, and the new animation will start from the Loop
Start key. Respects Loop text keys.

The patch also allows animations to work on the player character in third person
view. Use PlayGroup or LoopGroup with flags 1 or 2. e.g. {PlayGroup idle9, 1}. It
will freeze player input until the animation is over, but you may use {PlayGroup
idle} to immediately give control back. If you forget to use the flags, the
animation will not apply correctly and only the lower body will be affected.

Hi-def cutscenes
---
Allows mods to include cutscenes up to 2048x1024 (the default maximum was 640x480).

You can encode video to Bink format using RAD Video Tools at
http://www.radgametools.com/bnkdown.htm

It's a game codec, so it's not as efficient as H.264. You also have to take into
account the CPU power of lower end of your target audience. A resolution of
1280x720 at 24fps should decode at full speed for most end users. Good quality
video is encoded at a bitrate around 1 Mbyte/sec, but it depends a lot on the
content. You should try several encodes and check them in-game.

Soul gem rebalance


---
In case you need to check soul gem value for your modded creatures when using this
option, the rebalanced soul gem value is calculated from soul points and is no
longer dependent on the type of soul gem.
value = 0.0001x^3 + 2x, where x is soul points

This obtains a minimal but non-zero value for the weakest souls, and sharp scaling
at only the highest soul amounts.

Creature AR
---
Creatures can now gain AR from the Shield spell effect, where it had no effect on
defense before. If you give creatures a shield ability, they will become armoured.
This AR is not limited by the standard damage reduction cap (fCombatArmorMinMult),
so you can make extremely well protected creatures.

Service refusal filtering


---
This option allows the special 'Service Refusal' topic to be filtered for each
individual service an NPC provides, instead of refusing all services or none. This
allows more scriptable service limits like training limits, rank based access, or
quests/bribes for additional services.

The 'Choice' dialogue filtering function indicates service type for the service
refusal topic:

Barter 1
Repair 2
Spells 3
Training 4
Travel 5
Spellmaking 6
Enchanting 7

Disintegrate spell effects


---
When building spells, it is recommended to set all disintegrate weapon and armor
effects as 0 duration effects, so they apply in one frame. Due to the game design,
disintegrate effects over time fail to work, even over 1 second, as the game cannot
track fractional damage to items.

Unfortunately the game is designed with integer durability values. For example, a
50 damage over 1 second effect will apply a fraction of that damage every frame. If
the player runs at 25-50 frames per second, their weapon/armor will receive 1
damage per frame due to the integer rounding. If the player is running over 50
frames per second, their item will recieve 0 damage per frame, and 0 damage in
total. This is entirely due to the design, which cannot be fixed without changing
every place in the game durability is examined.

This version of MCP does fix the problem by converting the disintegrate effects to
a 0 duration equivalent on hit. I still recommend using 0 duration spells, which
avoid this problem for people without the latest MCP.

FAQ
---

Q: It says 'There is no compatible patch for your version of Morrowind.exe...'. How


do I get it to work?
A: Make sure you use a freshly installed copy of Bloodmoon with only the official
patch applied, or the GOTY edition, which is equivalent. It should work with most
editions by now, except Impulse/GameFly, which is not supported due to its DRM
wrapper. If you have a Steam edition and it doesn't work, you should email me, as
Valve may have changed something recently.

Q: Morrowind doesn't launch after I use MCP.


A: While there may be several causes, the most common is anti-virus. MCP edits your
Morrowind.exe, and an anti-virus scanner may think it is suspicious and prevent the
edited program from working. Try making an exception for both MCP and Morrowind.

Q: The game UI is transparent and MGE shaders show on top it.


A: The 'UI display quality' option alters the UI alignment so the pixels line up
properly on the screen, to avoid being unevenly blurred. MGE fails to recognize the
UI with that option on and draws shaders on top of it. This issue is fixed in MGE
XE.

Q: What happened to my Light spell?


A: The Light spell effect was originally poorly coded, with lit objects popping
into view and everything saturated with flat overbright lighting. I tried my best
to get objects to come smoothly into the light radius and retain some shading,
which means the brightness of distant objects will appear different. I recommend
using the Night Eye spell outside and Light in interiors.

Q: My world map appears completely blank!


A: Morrowind's world map rendering is linked to a background texture called
"menu_icon_none.dds". It is normally blank, but if you have a modified version of
that texture, the world map does not render properly. To fix it, remove the
modified "menu_icon_none.dds" from your Textures directory. This problem exists
because I had to change the code slightly to fix another bug.

Q: My world map is corrupted.


A: You have probably enabled and disabled the map expansion patch multiple times.
You should restore from a savegame from before you used the map expansion. Read the
"Map expansion changes" section for more details.

Q: My screen is tinted red / My mini-map looks strange / Text is a solid block of


colour. What's going on?
A: Try turning off the "transparent clothes in the inventory" option. That fix does
change the rendering methods the engine uses, and rarely causes other graphics
issues with certain graphics cards. It's hard to tell what the problem is, these
bugs depend a lot on graphics drivers.

Q: A window flashes for a second and nothing happens. What's wrong?


A: It's most likely an incorrect installation. You need MCP and the mcpatch folder
to be in the same place as the Morrowind program.

Q: Can I use Exe Optimizer (and other patchers) with this?


A: Apply them after you've installed this patch, not before. You have to re-apply
it every time you change options in MCP. If you have run it already before you
installed MCP, you will have to restore the original Morrowind from a backup.

Q: Morrowind crashes when I load a savegame made before the patch.


A: Try repairing the savegame with Wrye Mash. If it still crashes try removing
debris cells and spawned creatures in Wrye Mash. If it still crashes, you should
ask for help at the official forums.

Q: What happened to the increase light falloff option?


A: It seems to cause problems with lighting mods, and in some dungeons, due to the
limitation on the number of lights that can affect one object. It could get to the
point where the player's torch didn't light large objects properly, so it's been
removed. The problem is better fixed by mesh partitioning on specific meshes.

Contact
------

Contact me, Hrnchamd, for further questions or bug reports at


iamalannoble@hotmail.com
Put 'Morrowind Code Patch' in the subject line, or it's going to be filtered.

There is normally a discussion thread about this patch at:


http://forums.bethsoft.com/forum/12-morrowind-mods/
Look for the latest 'Repairing the Cogs of Morrowind' topic. You can ask for help
there.

Credits
-------
Understanding and Coding: Hrnchamd
Insightful Testing and Discussion: Psyringe

Data structure and code points info:


Tp21

Japanese localization:
TObject

Special thanks:
philologos
povuholo
Arsuru
Knef
Dirges
tetchy
Aeven
Mordicus
Pwin
DavidB1111
quorn
Sildra
Gato
Runspect
Symon69
john.moonsugar
neildarkstar
melian
Toccatta
Minamir
SilentThief
Korlus
BTB
papill6n
PeterBitt
raym
abot
Greatness7
...
everyone else

Morrowind Code Patch is (c) 2008-2015 Hrnchamd


You may not use this work for commercial purposes.
You may not redistribute this program or its patch files without my permission.

You might also like