Creating a Disease Spell

In this tutorial we are going to make a simple Disease Spell called hemorrhagic fever. This infection will slowly drain away the victim's heath until they either find a cure or die. The disease will be transmitted by contact with any Skeever Race creature during combat. Lets do this tutorial as a stand-alone mod.

Step by Step InstructionsEdit

Fire up the Creation Kit (CK) and click the Load Master/Plugin files icon   on the main toolbar. In the Data Window that appears, double-click on Skyrim.esm to put a check-mark in the box in front of it. Now click OK. Wait a minute or two while the library loads. When an error box pops up, click "YES TO ALL" to ignore all "errors".

Navigating the Object WindowEdit

In the Creation Kit, we will mainly be using the Object Window. Scroll down the left-hand side of the window until you find the Magic category. Expand this tree and look for the subcategory called Magic Effect. Now type "disd" in the Filter at the top-left of the Object Window. You should now see 14 items in the right-hand window with a "top hat" symbol in front of them - these are the magic effects that are used for the basic diseases in Skyrim (Bone-break fever, Ataxia, etc). Six of these effects are used by traps and the other 8 are used by creatures. The only difference between the trap contracted disease effects and the regular effects is that the regular effects cost magicka, but the trap effects don't (traps don't have magicka of course).

Creating the Disease Magic EffectEdit

Double-click on the DisDamageStamina Magic Effect form - we will use that as a template for the new disease. In the Magic Effect form that opens, there are a daunting number of options. Now the first thing that you need to do is edit the ID field and type in a new name for our Magic Effect. Let's give it the ID of DisDrainHealth and in the Name field type in Drains Health. Change the Effect Archetype from Peak Value Modifier to Value Modifier. The Effect Archetype is one of the options that you can experiment with later. It's important that the Casting Type chosen is Constant Effect and that the Delivery method is Contact. Also change Magic Skill to NONE. In the Flags area, remove the Recover flag, otherwise our effect will just decrease the maximum health of the player. Let's not worry about Visual Effects or Sounds for this simple example.

So now we need to set how the disease will damage the player. In the field called Assoc. Item 1 pick Health from the drop-down list.

Tip: note that the Detrimental flag is ticked. This is important because it will apply the magnitude of the actor value that we are modifying negatively, so that health will decrease rather than increase.

Tip: if we wanted to, we could set a secondary damage effect for the disease. To do this you would change the Effect Archetype to Dual Value Modifier and then you could pick another stat to damage in the Assoc. Item 2 field. You would then have to set a value for 2nd AV Weight (a weight of 1 would mean that the magnitude of damage for the secondary effect is the same as the magnitude of the primary effect, while 0.5 would mean the secondary effect does half as much damage as the primary effect).

Tip: In the Resist Value field, choose Disease Resist, so that actors that are resistant to diseases will also be resistant to our new disease.

Applying Condition FunctionsEdit

We also can specify some Condition Functions that control how the disease is applied. In the Target Conditions box you will see that there is already a Condition (S GetRandomPercent NONE <= 5.00 AND). This condition basically sets a 5% chance that the disease will be contracted. GetRandomPercent is a random number generator that picks a number between 0 and 100. The condition will return TRUE if the random number is less than or equal to 5, that is, the MagicEffect will activate. There are a lot of Condition Function variables that can be used in Conditions, but many of them are undocumented. Just for fun, lets increase the chance from 5% to 50%. Just double-click the condition (an error box will pop up, just ignore it by clicking "yes to all"). In the Condition Item box that then appears, change 5.00000 to 50, then click OK. You can do a lot of nifty creative things with conditions, for example, you could make it that the disease can't be contracted on a certain day of the week, or on a certain type of creature, or on a bright sunny day, etc.

Formatting the DescriptionEdit

The last thing left for us to do is to update our Magic Effect's description. In the Magic item description field, delete the text that's there (Drains <mag> points from stamina.) and type in "Drains <mag> health per second." (without quotes). <mag> is a text replacer for the magnitude of the effect (we'll set it in the next step), and <dur> would be the same for its duration, although in this example we don't use it. Now click OK on the Magic Effect form and a "Create New Object?" dialog box will appear asking if you want to create a new form. Click YES.

Well, that's the complicated part done. Now we need to create a Disease Spell form to apply our new Magic Effect to.

Creating the Disease SpellEdit

In the left-hand side of the Object Window look for the Spell category. Expand that tree and click on the Disease subcategory. We need to clear the search filter to see all the items in this category, so clear the text "disd" from the Filter field in the top-left corner of the window. Now you should see 13 diseases in the right side of the window. Let's use DiseaseBrainRot as a template. Double-click it to open this form. Note in the window name that this is actually a Spell form. Spells, Abilities, Diseases, Poisons and Powers are all essentially just spells and they are all set up in very similar ways. Now, edit the ID and change it to DiseaseHemorrhagicFever then edit the Name field and change it to Hemorrhagic Fever. Now in the big white Effects field, select the effect that is already in the form (Damage Magika : Magika) and hit the [Delete] key and click the YES button to confirm the deletion. Now right-click within the Effects field and choose New. An Effect Item form will appear. In the Effect drop-down list choose our new Magic Effect (DisDrainHealth). Now in the Magnitude field we have to set the strength of our disease. Type in the value 10. You can't set a negative number for the magnitude, but because the Detrimental box was ticked in the Magic Effect form that we created earlier, the magnitude that we set will be applied negatively anyway. You can experiment with how strong you want the effect to be, a larger number will drain the health faster. Notice that there is another Conditions box here. This one controls the overall disease, whereas the previous Conditions box controlled the individual magic effect. You can have multiple Magic Effects on a single disease for more flexibility. We don't need to add any more conditions, so click OK to close the Effect Item form. Now, in the Description box of the Spell form, type "You are dying of hemorrhagic fever." That's the text that you will see when you look at the magic effects that are active on you in the Skyrim menus, so keep it quite brief. We don't need to change any other settings in the Spell form so just close it by clicking OK. Again, when the Create New Object? box appears, click YES.

Applying the Disease to a Creature's Attack DataEdit

So now all we have to do is find a way to apply our new disease. One simple way to do this is to add the disease to one (or more) of the attacks of an actor. You can do this at the Race level or on an individual Actor form. Let's look at the Skeever Race.

In the left-hand side of the Object Window, scroll up to the Race category. Select it and type "skeever" in the Filter box at the top-left of the window. You should see SkeeverRace and SkeeverWhiteRace in the right-hand side. Double-click SkeeverRace. In the Race form, click on the Attack Data tab near the top of the form, it's the 6th tab along. Notice that there are 6 different attacks listed in the Attacks: field. Select one of them. Now underneath where all the stats are, look at the Attack Spell drop-down list. That is where we put the disease. Notice that all of the 6 attacks already have a disease spell attached (DiseaseAtaxia). Select all six attacks in turn and change the Attack Spell to our new disease, DiseaseHemorrhagicFever. Then click OK to close the Race form. We won't bother changing the white skeever race.

Saving the ModEdit

We're almost done. So let's save our mod. Click the Save Plug-in button   on the Creation Kit toolbar. When asked, type in a name for your new mod, such as "aaTestNewDisease".

Now load up the new mod in Skyrim and find a Skeever to attack and see what happens. Make sure you are not wearing any items that give you disease immunity. This disease will keep draining your health until it kills you, so make sure that you have a cure disease potion or three handy. Hawk feathers, if eaten, will cure a disease instantly.