Jump to content

4 Screenshots

Fortify MAX


Summary
 
Fortify MAX causes the Fortify Magicka and Fortify Fatigue magic effects to affect the maximum as well as the current value of the relevant stat. In other words, this mod does for Fortify Magicka and Fatigue what the "Fortify Maximum Health" feature of Morrowind Code Patch does for Fortify Health.
 
Description
 
Why?
 
In vanilla Morrowind, Fortify Magicka and Fortify Fatigue are broken for more than one reason, the most obvious of which is that they're just plain not very useful for their intended purpose.
 
Fortify Magicka tacks on a certain amount of magicka to your current pool, which can cause your current magicka to exceed your max magicka, but this extra magicka is not added to the maximum. The extra magicka cannot be restored and is one-time use only. When the Fortify Magicka effect expires, you'll lose all that extra magicka, possibly bringing your current magicka total all the way down to 0.
 
The same thing happens with Fortify Fatigue. The effect will give you a one-time use bonus of fatigue that will be gone after a minute of running down the road (or a few weapon swings), and when it expires you'll lose everything you gained, possibly causing you to collapse in exhaustion.
 
Clearly, these effects are of very limited utility in vanilla Morrowind; these effects are far more useful in exploits than for their intended purpose. The most obvious of these exploits is to boost your fatigue ratio.
 
In vanilla, Fortify Fatigue can increase your current fatigue far above the maximum, which will increase your fatigue ratio (current/max fatigue) above 1.0. Fatigue ratio affects a great number of things in Morrowind, among them things like spellcasting success chance, persuasion success chance, and the prices you can get from merchants. This makes Fortify Fatigue much more useful as a bartering or persuasion tool than for its intended use.
 
In addition, other exploits are possible with these effects in vanilla Morrowind. Using a combination of Drain Intelligence and Fortify Magicka, it's possible to end up with an enormous pool of current magicka (thousands or even tens of thousands of points). It's trickier to pull this off with fatigue, since more attributes are used in calculating it, but if done correctly it's broken in the extreme.
 
Clearly something must be done about this.
 
What?
 
The vanilla game has a similar problem with Fortify Health, which Morrowind Code Patch solves by making that effect increase maximum along with current health. This mod does the exact same thing for Fortify Magicka and Fatigue.
 
When you're subject to a Fortify Magicka/Fatigue effect, both the current and max value of the stat will increase by the magnitude of the effect, and both will decrease when the effect wears off. When the game recalculates these stats (for example, when one of the attributes used to calculate them changes), any Fortify Magicka/Fatigue magnitude you're under will be taken into account, and the correct ratio will always be maintained.
 
Note that, even with this mod, Fortify Magicka is still distinct from the Fortify Maximum Magicka effect, which modifies the "magicka multiplier" used along with intelligence to calculate max magicka.
 
This mod affects only the player. It does not affect NPCs or creatures.
 
How?
 
Instead of patching the Morrowind executable like Morrowind Code Patch does, this mod uses MWSE-lua to achieve the same effect. All you need to do is be using an up-to-date MWSE, and install the mod like any other, and you can enjoy actually useful and non-broken Fortify Magicka/Fatigue effects.
 
Configuration
 
Each component of the mod (for magicka and fatigue) can be disabled separately in the Mod Config Menu, so if for some reason you only want the mod's effects for one of these stats, you can do that (you can also disable the mod entirely if you wish).
 
One MCM setting that requires some additional explanation is the "attribute-modifying effect tweaks" setting. For technical reasons, it's necessary to make a couple minor tweaks to how Restore and Damage Attribute effects work, in order for the mod to work as intended. Otherwise, max magicka or fatigue might get reset to vanilla under certain unusual circumstances.
 
The tweaks made are listed below:
 
1. When an attribute is restored to full, any restore effect for that particular attribute will end early, rather than continue trying to restore the attribute.
 
2. When an attribute is damaged to 0, any damage effect for that particular attribute will end early, rather than continue trying to damage the attribute.
 
3. When an attribute is being drained (and only then), it is no longer possible to restore that attribute all the way up to full, only up to 1 less than full. (It will be further restored to full when the drain effect ends).
 
See the comments in the code to learn exactly why these changes are needed.
 
These tweaks are very minor, and shouldn't bother anybody, but, just in case, they can be disabled in the MCM - just keep in mind that if you do so, max magicka and fatigue might get reset to vanilla under certain circumstances when you use these effects while under a Fortify Magicka/Fatigue effect.

Known Issues

There are a few known issues with this mod, all of them minor and/or very rare.
 
The first three of these issues are related to Fortify Magicka/Fatigue abilities (as opposed to regular spells/enchantments/potions). There are no Fortify Magicka/Fatigue abilities in vanilla Morrowind, but mods can implement them. You will not experience these first three issues if you're not using a mod that adds such abilities.
 
1. If you're using a mod that adds a Fortify Magicka/Fatigue ability to a race or birthsign, the ability will not be reflected in the "stat review" menu during chargen. It will not be reflected in your stats until after chargen is complete, i.e after you leave Sellus Gravius' office. (Note that without this mod, such abilities don't work at all.)
 
2. If you're using a mod that adds a Fortify Magicka/Fatigue ability to a race or birthsign, and then subsequently removes/re-adds that ability via script, the magnitude will be applied twice to the max stat.
 
I'm not aware of any mods that do this, but if you're using one, the solution is to fix the other mod so that it doesn't do this anymore. Fortify Magicka/Fatigue abilities should either be added to a race or birthsign, or added/removed via script, but not both.
 
3. There's a potential problem if both of the following things happen during the exact same frame:
 
    (1) A Fortify Magicka/Fatigue ability is added or removed via script
    (2) An attribute that contributes to that stat changes
 
If this happens, the result depends on the order those things happen in. If (1) happens first, everything is fine. If (2) happens first, the Fortify Magicka/Fatigue magnitude will end up being applied twice to the max stat.
 
This is most likely to happen when the effects are part of the same ability. For example, if a mod adds via script an ability with Fortify Intelligence and Fortify Magicka, in that order, the Fortify Magicka magnitude will be applied twice to max magicka.
 
To avoid this problem, other mods can ensure that, in any script-added abilities that contain both Fortify Magicka/Fatigue and an effect that changes a related attribute, the Fortify Magicka/Fatigue effect comes first.
 
Note that it's possible for this to happen in other circumstances, even when the attribute-changing effect is not part of the same ability. For example, a mod might add a Fortify Fatigue ability via script, and, in the exact same frame in which the ability is added, a Fortify Agility potion you were affected by expires. This kind of thing is very unlikely.
 
4. There's another potential problem if all three of the following things happen during the exact same frame:
 
    (1) The Fortify Magicka/Fatigue magnitude you're affected by changes
    (2) An attribute that contributes to that stat changes
    (3) The current value of the relevant stat changes due to some other cause
 
If all of these happen during the same frame, the change to the current stat due to the other cause will be basically reverted. For example, let's say you cast a spell, and, in the exact same frame in which you lose magicka due to the spellcast, your intelligence and Fortify Magicka magnitude both also change. In this case, you'll basically get the spell for free, with no magicka cost.
 
It would require extremely precise timing to intentionally exploit this - fortunately, the loss of magicka from casting a spell and the effects of that spell don't happen on the same frame - and it's very unlikely to happen by chance.
 
Interop
 
Fortify MAX includes an interop file, so MWSE-lua mod authors can detect the presence of this mod and/or trigger this mod's calculations.
 
For example, to detect whether or not the magicka component of this mod is enabled, use something like the following:
 
local fortifyMAX = include("FortifyMAX.interop")
 
if fortifyMAX and fortifyMAX.magicka then
-- do stuff
end

 
You can check for the fatigue or "attribute-modifying effect tweaks" features being enabled with fortifyMAX.fatigue and fortifyMAX.spellTick, respectively.
 
The interop variables are set on initialized, so don't check for them before then (and if you check on initialized, you might need to assign a negative priority to your initialized event so this mod's interop variables will be set first).
 
It's also possible to instruct Fortify MAX to do its magicka or fatigue calculations. These calculations add any Fortify Magicka/Fatigue magnitude to the max stat, and adjust the current stat as needed to maintain the correct ratio. This mod's calculations are normally done immediately after the game does its own vanilla calculations (usually when one of the relevant attributes changes).
 
If your mod changes the player's max magicka/fatigue under circumstances in which the game would normally not redo the vanilla calculations, you can instruct this mod to do its own calculations with (replace magicka with fatigue as appropriate):
 
fortifyMAX.recalc.magicka = true
 
FortifyMAX will then do its thing, compensating for any Fortify Magicka/Fatigue magnitude the player is under. (Remember that this mod affects only the player.)
 
This mod's loaded and enterFrame events are assigned a priority of -10, to ensure that other mods go first. If your mod changes magicka/fatigue calculations on loaded or enterFrame, don't set an event priority <= -10.
 
See Class-Conscious Character Progression for an example of interop use.
 
Requirements
 
This mod requires MGE XE and the latest version of MWSE 2.1. Just install MGE XE and run MWSE-Update.exe to download the latest build.
 
In particular, this mod requires a recent MWSE build, as it uses a couple of newly-added MWSE features. The build date must be at least 2021-05-18. Just update to the latest version and you're good to go.
 
Recommendations
 
Morrowind Code Patch is a soft requirement for this mod. Parts of this mod assume that you're using MCP's bugfix patches regarding Fortify/Drain/Restore Attribute. If you're not, the "attribute-modifying effect tweaks" won't work as intended.
 
For consistency (and in general, since Fortify Health sucks much worse without it), I also recommend using MCP's "Fortify Maximum Health" feature.
 
Compatibility
 
As an MWSE-lua mod, Fortify MAX is compatible with most other mods. It is likely to have compatibility issues with any mod that changes how magicka or fatigue is calculated, unless the other mod takes this mod into account (see the interop section).
 
CCCP, as of version 2.0.2, is compatible. If you're using another mod that changes magicka/fatigue calculations and conflicts with this one, you can disable the corresponding component of this mod.

Mods that add Fortify Magicka/Fatigue abilities might not play nice with this mod under certain unusual circumstances. See the Known Issues section for details.
 
Version History
 
Version 1.0.3 - 2021-07-14
   - Fixed more weirdness when magicka/fatigue would have been exactly 0 if not for a fortify effect, and was then recalculated.

Version 1.0.2 - 2021-07-10
   - Fixed a bug where weird things could happen if magicka/fatigue was damaged to less than your Fortify Magicka/Fatigue magnitude and was then recalculated.

Version 1.0.1 - 2021-07-07
   - (Mostly) fixed a bug where Fortify Magicka/Fatigue abilities added via script counted twice towards the max stat (see Known Issues section for caveats).
   - Fortify Magicka/Fatigue abilities on a race or birthsign will now be effective immediately after chargen is complete, instead of having to save/load or change a related attribute as in 1.0 (in vanilla, such abilities did not work at all).
   - Made the code that runs while the player is under a Restore Attribute effect more efficient.
   - Minor coding improvements.

Version 1.0 - 2021-05-21
   - Initial release.
 
Contact
 
Feel free to contact me on the Nexus or Moddinghall with any comments or suggestions. You can also find me on Discord as Necrolesian#9692.

Use a mod management tool such as Wrye Mash, or just copy the MWSE directory to your Data Files directory.
 
If your character is under any Fortify Magicka or Fortify Fatigue effects, it's recommended to remove them before installing (or uninstalling) this mod.

Credits
 
Thanks to NullCascade for tweaking MWSE for me twice. Also thanks to Greatness7 for giving some tips when something wasn't working as expected.
 
Usage
 
You can use this however you want.

 Share


User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

×
×
  • Create New...