Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Class #3 - Spell Tomes


WillieSea
 Share

Recommended Posts

Many people want to make a spell tome in their mods.

Its a bit of work, but you can make some real nice spell tomes that work well and look nice.

 

Making Spell Tomes.

 

=============================================

1. Create the spell script. (optional)

=============================================

If the spell you want to make is a script type of spell, you must make the spell script first. In this example I will make a spell script that pushes the target of the spell away from the player.

 

Script Type: Magic Effect


scn ShivernSpellPush1Script

ref target

Begin ScriptEffectStart

	set target to getself

	if (target.GetIsReference player == 1)

		return

	endif

	player.pushactoraway target 20

end[/code]

 
 
 

=============================================

2. Create the Spell.

=============================================

Spell:

ID: Give it a construction set name for the spell.

Name: The name of the spell in the game.

Type: Spell

 

Give the spell some effects.

 

If you are attaching the script-spell from above, the spell will contain:

Effect: Script Effect

In the Script Effect Info box:

Script: The script you made above.

Effect Name: This will override the spell name.

 

 

=============================================

3. The book

=============================================

Give it an ID and a Name. Leave the Script dropdown list box empty for now.

 

Put the following (with your edits) into the 'Book Text'.

 

Fists Collection

School of Mysticism

 

Fist of Leather

Skill: Novice

Cost: 10

Range: Touch

 

Fist of Iron

Skill: Apprentice

Cost: 20

Range: Touch

 

Fist of Steel

Skill: Journeyman

Cost: 50

Range: Touch

 

Effects: Push a touched creature or NPC away from you. There are three levels of power in this collection of spells.

 

 

=============================================

4. Script for the book:

=============================================

Now lets make a new script with the Type: Object.

 

 
 
scn ShivernAddSpellPushScript
short doOnce
begin onactivate
if doOnce == 0
Activate
Message "You have memorized the spells of the Fist!"
playsound SPLMysticismCast
player.addspell ShivernPush1Spell
set doOnce to 1
endif
end

 

 

Teachers Note: For the spell name in the script (ShivernPush1Spell), I advise that you copy the spell name directly from the spell and paste it into the script above so you do not have a misspelling.

 

You can also add icons and pictures to the book text. You can change these to suit the type of spell tome you are making.

This location can be searched for the icon you would like to use. In order to see these, you will need to unpack your BSA files first.

 

Oblivion/Data/textures/menus/icons/magic

 

Inside this folder, you will find the following folders:

alteration_icons

conjuration_icons

destruction_icons

illusion_icons

mysticism_icons

restoration_icons

 

Here are some examples of changing the description line of the spell along with a corresponding icon to use:

 

<IMG src="IconsMagicrestoration_iconsabsorb_restoration.dds" width=68 height=61>Absorb Magicka, 10 points for 5 seconds on Touch

<IMG src="IconsMagicdestruction_iconsweakness_damage.dds" width=68 height=61>Weakness to Magic, 25% for 30 seconds on Touch

<IMG src="IconsMagicdestruction_iconsstunted_magicka_damage.dds" width=68 height=61>Stunted Magicka for 30 seconds on Touch

 

Now, you will need to know the size of the icon image so you can adjust the width and height to the correct dimensions.

Link to comment
Share on other sites

Its not perfect, I am sure. But if somebody does use it to make a spell tome, I will be happy to answer questions to fill in the grey areas or to fix errors in the instructions.

I understand it but perhaps some sections can be expanded on?

Anyway, I will probably add more small how-to guides soon.

Link to comment
Share on other sites

  • 1 year later...
  • 6 months later...

Yes, this little spell is great fun. For pure amusement, I set the magnitude very high, went to the IC Marketplace, with Better Cities installed and about 14 NPCs wandering around, and let it rip.

Hilarious.

Okay, back to serious. Another moment of inspiration, thanks to your classes. I've been thinking for awhile that I want to add a new disease to the game. The plot idea is very simple: a kind of plague effected part of Cyordiil, people died, and were hastily buried. The disease was contagious, sort of like Black Death. But I didn't know to implement it. Then along comes this tutorial.

Here is your script:

scn ShivernAddSpellPushScript

short doOnce

begin onactivate

        if doOnce == 0

                Activate

                Message "You have memorized the spells of the Fist!"

                playsound SPLMysticismCast

                player.addspell ShivernPush1Spell

                set doOnce to 1

        endif

end
Okay, scn = script name, got that. Short identifies functions, right? If you have a function in the script, you have to identify it at the top with a "short" designation? Otherwise, I'm not sure what "short" does. The meat of the script works like this: player opens book (onactivate), and if she hasn't opened the book before (doOnce is set to 0) then she's given the spell as a sound plays and the text appears. Using your script, I'd like to give a spell (disease) to the player if they open a coffin. So player opens coffin, gets disease. Pretty basic. Here is my script:
scn RONINBlackDeathScript

short doOnce

begin onactivate

        if doOnce == 0

                Activate

                Message "You have contracted the Black Plague"

                playsound SPLMysticismCast

                player.addspell RONINBlackPlague

                set doOnce to 1

        endif

end

Now, I have two problems and I'm looking for suggestions. I need the script to check and see if the player already has Black Plague, return a 1 (I think), and then end without giving her the plague a second time.

Problem two: I need it be random and low random. I know there's a function for this, but I'm not certain that's the best way to handle it. Should I just put that in this script - player has a 5% chance of getting the Black Plague if they search this coffin - or is it better as leveled list item (then I could put it in any coffin). That may be a stupid question, just trying to think creatively.

Thanks for your help.

~ Dani ~ :blink:

Link to comment
Share on other sites

scn is short for ScriptName. You can use either.

Short identifies a 'variable'. Variables are used to store values that are used in your script.

So, doOnce initially starts the script with a default value of 0. I then check to see if its never been set to anything else. If its still 0, I set it to 1 inside the IF statement. Now, this statement will never run again because the variable now equals a '1'.

Short definitions will only hold whole numbers, like 1, or 2.

Float definitions will hold values with decimal positions, like 1.5 or 2.5648.

I dont think there is a non-OBSE way of knowing a player has the spell. What you could do is add an invisible token to the player and check for that instead, using GetItemCount.

5% chanch to get it with this...

scn RONINBlackDeathScript  
short doOnce
begin onactivate
if doOnce == 0
if GetRandomPercent > 94
Message "You have contracted the Black Plague"
playsound SPLMysticismCast
player.addspell RONINBlackPlague
set doOnce to 1
endif
endif
Activate
end[/code]

If you have further questions not related to spell tomes, please start a new thread or use the general questions thread.

Link to comment
Share on other sites

I dont think there is a non-OBSE way of knowing a player has the spell. What you could do is add an invisible token to the player and check for that instead, using GetItemCount.

Actually, I think IsSpellTarget would work for this.

So the script would look like:

scn RONINBlackDeathScript  

short doOnce  

begin onactivate  

	if doOnce == 0  

		if GetRandomPercent > 94 && Player.IsSpellTarget RONINBlackPlague == 0

			Message "You have contracted the Black Plague"  

			playsound SPLMysticismCast  

			player.addspell RONINBlackPlague  

			set doOnce to 1  

		endif

	endif

	Activate

end

Link to comment
Share on other sites

  • 1 year later...
  • 4 years later...
  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...