Are The Current Potion Recipe Variants, Or Lack Of Them Accurate To DOS Daggerfall?

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
Magicono43
Posts: 587
Joined: Tue Nov 06, 2018 7:06 am

Are The Current Potion Recipe Variants, Or Lack Of Them Accurate To DOS Daggerfall?

Post by Magicono43 »

So similar to what I had just done with gathering some information from DFU about the various books in the game and their values. I was doing the same thing for the potions and their recipes respectively, and at first I was surprised to find that there are 20 different potions in the game with their own "recipe keys" (not the surprising part), but the amount of recipe keys that are used to actually create those potions is the same number, and they all have a pair. At first I was expecting multiple different potion recipe variants that created the same potion type, but that is not the case I found.

As I know is a bad practice at this point, I had looked at the Unofficial Elder Scrolls wiki about the potions in Daggerfall and it shows there are multiple different recipes seemingly for the various potion types, not just one for each. Now i'm not sure if the reason for this is that whoever created the page did not have consistent information about what recipes worked, so they just listed multiple for each, or if it literally is saying that DOS Daggerfall had multiple potion recipes that would make one potion, giving more wiggle room for ingredients required in for a potion.

When I look at the scripts in DFU for the various magic effects that correspond with a potion, it confirmed what I had discovered that in DFU there is only one recipe for each potion type in the game, meaning for the 20 potion types in the vanilla game, there are also only 20 total recipes in the game as well, not like 40 or whatever in variants.

After that overly long and scattered explanation, the question is, how it currently works in DFU, is this accurate to how it worked in DOS? Which account is correct here? Also, would multiple potion recipe variants be possible in the current code of DFU? I figure maybe all that would need to be done is to give a unique recipe key to the corresponding recipe variants and attach them to the effect in question? Perhaps that overly simplified, i'm not sure.

User avatar
Interkarma
Posts: 6019
Joined: Sun Mar 22, 2015 1:51 am

Re: Are The Current Potion Recipe Variants, Or Lack Of Them Accurate To DOS Daggerfall?

Post by Interkarma »

Potion recipes in DFU are based on Daggerfall Chronicles (not UESP), starting from page 119. There are 20 recipes listed and all are accounted for in DFU afaik.

If the other variants listed on UESP are actually valid in classic, it would be easy enough to add them in SetPotionProperies() of related effect. See HealHealth.cs ln 42 for an effect that already has multiple variants.

The potion recipes are keyed by ingredient hash. Provided each recipe is unique, there can be any number of potion recipes with their own properties. These can introduced into base game or by effect mods.

If someone wants to spend the time in classic gathering ingredients and testing, I'd be interested to know if those recipes listed on UESP are actually valid.

User avatar
Magicono43
Posts: 587
Joined: Tue Nov 06, 2018 7:06 am

Re: Are The Current Potion Recipe Variants, Or Lack Of Them Accurate To DOS Daggerfall?

Post by Magicono43 »

Interkarma wrote: Thu Jan 14, 2021 6:30 am Potion recipes in DFU are based on Daggerfall Chronicles (not UESP), starting from page 119. There are 20 recipes listed and all are accounted for in DFU afaik.

If the other variants listed on UESP are actually valid in classic, it would be easy enough to add them in SetPotionProperies() of related effect. See HealHealth.cs ln 42 for an effect that already has multiple variants.

The potion recipes are keyed by ingredient hash. Provided each recipe is unique, there can be any number of potion recipes with their own properties. These can introduced into base game or by effect mods.

If someone wants to spend the time in classic gathering ingredients and testing, I'd be interested to know if those recipes listed on UESP are actually valid.
Yeah, that seems fair enough. Too bad the console is not nearly as powerful in Classic DF as it is in DFU, lol. Good to hear that it would be a simple matter to add more recipe variants though, thanks for the info, IK.

User avatar
Magicono43
Posts: 587
Joined: Tue Nov 06, 2018 7:06 am

Re: Are The Current Potion Recipe Variants, Or Lack Of Them Accurate To DOS Daggerfall?

Post by Magicono43 »

So adding custom potion variants worked a lot better than I expected actually.
Capture1.JPG
Capture1.JPG (16.86 KiB) Viewed 70 times
Capture2.JPG
Capture2.JPG (23.9 KiB) Viewed 70 times

However, one thing that I still don't understand is how the custom "non-classic" potion recipe keys are created?
Like look at this from the debug log listing the newly added recipe keys.
Capture.JPG
Capture.JPG (30.04 KiB) Viewed 70 times
My only guess is that it creates the keys based on the ingredients required in the specific recipe in question and based on that makes a unique recipe key? That's all that I could think of, also interesting that one of the values is negative.

User avatar
Interkarma
Posts: 6019
Joined: Sun Mar 22, 2015 1:51 am

Re: Are The Current Potion Recipe Variants, Or Lack Of Them Accurate To DOS Daggerfall?

Post by Interkarma »

Happy to see you had some success with that. :) I tried to design it to be reasonably easy to script in new recipes against an effect, the only requirement being the recipe has to be unique. It works when registering custom effects too, they can add new potions.

The RecipeID key value is created by a hashing algorithm using the ingredients as input. It's normal for some values to be negative - what matters is the number is unique and always comes out the same based on inputs.

User avatar
Magicono43
Posts: 587
Joined: Tue Nov 06, 2018 7:06 am

Re: Are The Current Potion Recipe Variants, Or Lack Of Them Accurate To DOS Daggerfall?

Post by Magicono43 »

Interkarma wrote: Fri Jan 15, 2021 2:27 am Happy to see you had some success with that. :) I tried to design it to be reasonably easy to script in new recipes against an effect, the only requirement being the recipe has to be unique. It works when registering custom effects too, they can add new potions.

The RecipeID key value is created by a hashing algorithm using the ingredients as input. It's normal for some values to be negative - what matters is the number is unique and always comes out the same based on inputs.
That's pretty awesome, you and whoever else worked on this system did a great job I must say. It's disappointing that the original game had so few potions, but as i'm seeing just from a few minutes of adding in my own variants, there are quite a few possibilities here to make the alchemy system not an absolutely unfinished mess that the original system was left as in DOS! Thanks for the added info IK, the system works very well and so far has been fairly intuitive to work with, especial when using some other recipes as examples.

Post Reply