Morrowind

File information

Last updated

Original upload

Created by

krol

Uploaded by

mcccxxxvii

Virus scan

Safe to use

Tags for this mod

About this mod

Drinking potions causes alchemical toxicity! The more potions you drink, the worse your symptoms will become. The intention is to make alchemy more balanced by restricting potion use, in an immersive way.

Permissions and credits
Toxicity v2.2
===========
Change Log
===========
2.2 - Fixed a problem with toxicity decay on rest that was introduced in 2.1.
2.1 - Added easier/better customisation by editing the script krolToxicityCustomise. Open the script using the Morrowind Construction Set - there are detailed descriptions of the different things you can change and what effects they have.
2.0 - Improved performance when the player has many items in their inventory.
1.1 - Toxicity is removed when you rest (but not when you wait). Also fixed a small typo in one of the status messages.
1.0 - Initial release.

===========
Requirements
===========
Requires MWSE 9.4 or greater. (The version in your MGE will work, provided you're not using a super old version of MGE).

===========
Description
===========
Drinking potions causes alchemical toxicity! This is intended to balance the alchemy system in an immersive way by penalising heavy potion use.

The more you drink, the greater the concentration of toxins in your blood becomes. Various negative effects are applied as toxicity increases. Drink enough and you'll die. Every potion causes the same amount of toxicity.

There is a threshhold before you start seeing penalties. You should be able to chug at least two potions without any negative effects. You have to drink quite a few (at least five) before you'll start to receive damage.

Toxicity decays exponentially (in real time played). You'll see significant decay after a few minutes.

Alchemy and endurance stats increase your tolerance and speed up the decay.

All non-alchemical beverages will not effect your toxicity. This includes all NoM beverages. I'll add support for other mods/beverages by request, or you can do it yourself by editing the script. Note that you'll need MWedit since the script contains MWSE functions.

Messageboxes are displayed when your toxicity level changes significantly. These can be turned off by changing the value of the global krolToxicityMessages to 0, either in the editor or just by typing "set krolToxicityMessages to 0" in the console. Note that the console method must be done again each time you start a new game (but not when you load a save).

Resting for 8 hours removes all toxicity, resting for less time removes a correspondingly smaller amount. Waiting has no effect.

===========
Caveats
===========
The mod uses the spell hit sound effects to detect potion drinking (as far as I know, it's impossible to detect the drinking sound in a script).

The main issue is that if you drink a potion or equip a constant effect item, and then drop a potion on the ground without closing the inventory screen, you will receive toxicity for the dropped potion. This is averted if you close the inventory and reopen it before you drop potions. I don't think this is a huge issue since it's fairly rare to drink potions or equip items in the same inventory session as dropping potions on the ground. Remember kids, don't drink and drop!

Furthermore, any potions you drop right after being hit by a spell will apply toxicity, provided that the spell hit sound is still playing when you close the inventory. This is extremely unlikely as you'd have to open the inventory, drop the potions and close it again as fast as possible, which is really not something you'd do in normal play.

The penalties apply a drain endurance effect (amongst other things). This has no real effect unless you're using a mod like state-based hit points or GCD. I could've used drain health instead, but drain endurance is nice since the amount of health drained scales with the player's level. If there's interest, I can release a version with drain health instead. Or you can just edit the spell effects (krolToxicity2 etc.) to whatever you want.

If you have a lot of items in your inventory, you may experience slowdowns when drinking potions and when being hit by spells. These can be mitigated by increasing the value of the global krolToxicityFrameNumber (i.e. by typing "set krolToxicityFrameNumber to 45" in the console). This variable is the number of frames over which the script performs potion counting to determine if the player has drunk something. Increasing it spreads the calculation over a longer time, improving performance. However, there is a catch. If you drink more potions while the script is still doing a calculation, they will not add to your toxicity! That means that if krolToxicityFrameNumber is set to 45, any potions you drink within the next 45 frames will not give you toxicity. Note that this is frames, not seconds. Hence if you have an FPS of 45 at the time, it'll take about one second before potions are detectable. Note that drinking multiple potions AT ONCE does not cause a problem - they will all be counted together. It's when you drink a potion (or potions), then close the inventory and very quickly reopen it and drink another potion that you may have a problem.

The default value of krolToxicityFrameNumber is 20. I found that this gave no noticable slowdowns even with 100 different items in my inventory, and heaps of mods loaded. However, I do have a powerful processor, so others may have more difficulty.

Note: "different items" means "different types of items" in this context. So having 30 crab meats or 120k counts gold pieces as only one item! However, having two different potions both called "Restore Health", but which do not stack in the inventory, counts as two items.

============
Customisation
============
You can change the various parameters that determine how toxicity works by editing the script called krolToxicityCustomise, using the construction set. Just open the script up and have a look - it's very easy to do and there are detailed descriptions of what each parameter does. At the moment, you can change how fast toxicity appears and decays, how much it decays on rest, and whether you receive messageboxes telling you about your level of toxicity.

============
Installation
============
Just put the .esp in your data files folder and activate it with the launcher or another program. The scripts will start automatically. Load order does not matter for this mod.

============
Compatibility
============
If another mod adds non-alchemical beverages, they will cause toxicity when drunk, unless appropriate changes are made to the script. Currently, I've only added compatibility for NoM.

Compatibility is easily added by changing the appropriate line in the script (krolToxicityDetection). You can do this yourself (you'll need MWedit as they're MWSE scripts), or you can email me or leave a comment and I'll update the .esp to include compatibility for whatever mods you like.

Apart from that, there should be no incompatibilities whatsoever. Load order doesn't matter for this mod. Everything happens by completely independent scripts. Potions are detected by their item type within the game engine, which cannot be changed by mods, so mods that change the properties of potions or the alchemy system or add new potions or anything should be completely compatible.

============
Credits
============
darksecond, fliggerty and grmcdorman for creating MWSE! Without it, this mod would be impossible. They really did all the work here.