Alchemy Advanced Adjustments by migck
Oblivion » Patches
Added: 01/03/2014 - 04:44PM
Updated: 01/03/2014 - 06:30PM

45 Endorsements

1.0 Latest version

275 Unique D/Ls

372 Total D/Ls

5,402 Total Views

Uploaded by miguick


Last updated at 18:30, 1 Mar 2014 Uploaded at 16:44, 1 Mar 2014

Alchemy Advanced Adjustments


Alchemy Advanced by JRoush cranks the alchemy menu up to eleven and then some. Its mind boggling features will make you wonder how the hell were you making potions without it, and turn the vanilla alchemy menu into a kindergarten toy by comparison.
It is also the perfect example of the kind of stuff you can make when you wield the XML and scripting in this game to your will... and to date it seems only JRoush was capable to do this. Because as incredible as the mod is, what is more incredible is that it was done with OBSE version 17, in 2009. Function calls were non-existent, so this mod has to rely on remote activators to hold scripted variables for its menus. Geniality needs not the latest technology to do amazing things.

And yet... it could be better, of course. Some things which could be improved are left as is, since JRoush has been MIA for some time. This plugin will improve a few of the easier things that can be improved, and leave the rest as it is. XML is really not my speciality.
So, onwards to what this plugin does:

Uncapped alchemy skill calculation.
Alchemy Advanced completely replaces the vanilla alchemy menu so, among other things, the calculations which the game engine did of your effective alchemy level are no longer used. The mod calculates its own through its scripts. JRoush implemented the same calculations that the vanilla game uses, but did not account for uncapper mods such as his own AV Uncapper plugin. Which means that Alchemy Advanced still ignores any Fortify Alchemy magic effects, just like the vanilla game does.
The scripts have been changed to support the AV Uncapper plugin. It will now use its alchemy game settings to determine your effective alchemy skill level, taking into account favuAlchemyEffectiveSkillBaseMult (multiplier for base alchemy skill and luck attribute), favuAlchemyEffectiveSkillCurrentMult (multiplier for current alchemy skill and luck attribute), and favuMaxAlchemyEffectiveSkill (maximum alchemy skill).

Cloneform management.
By replacing the vanilla alchemy menu, the game engine no longer manages new potion base objects that result from alchemy brewing. And while Alchemy Advanced does more or less a good job of having them stack, it can be further improved through Fundament's Formulator database management, which handles new cloned forms automatically to reduce potential bloat. New potions are now created by calling Formulator, rather than by directly cloning them in the script.

Event handling.
And yet another issue due to replacing the vanilla alchemy menu, since potions are now created through script instead of through the engine, OBSE's event handler that fires when creating a potion (OnCreatePotion) will no longer fire when using Alchemy Advanced. This means that any third party mod which makes use of such a handler will find that the handler no longer works when Alchemy Advanced is in use. Unfortunately, it is then the responsibility of the third party mod to provide an alternative when using AA, but now I provide facilities to do this.
When a potion is brewed, a custom event handler will be dispatched. TThis event will be named "OnRshPotion", with an array with arguments "potion" as the potion created, and "quantity" as the amount of them. For a third party mod to make use of this, all it needs to do is replicate any "OnCreatePotion" handler scripts it uses in a manner such as:

scn aaaRshPotionHandler
array_var args
ref potion
int quantity
Begin Function{args}
Let potion := args->potion
Let quantity := args->quantity
;do the stuff with potion you do in the regular OnCreatePotion event handler

When setting the event handlers, use code like this:

If GetGameRestarted
If IsModLoaded RshAlchemy.esp
SetEventHandler "OnRshPotion" aaaRshPotionHandler
SetEventHandler "OnCreatePotion" aaaCreatePotionHandler ;or whatever you've named it

This will alow the mod to work the same with or without Alchemy Advanced installed.

To use the mod, simply make sure the file RshAlchemy - AVU.esp loads after RshAlchemy.esp It can be merged just fine in a bashed patch with Wrye Bash. To uninstall, simply unload or get rid of the file.

Thanks go to JRoush for creating Alchemy Advanced in the first place.
Thanks to the OBSE team for OBSE.
Thanks to tejon for Fundament.
Thanks to shadeMe for the CS Extender.

Have fun.