BGS Modders

Would you like to react to this message? Create an account in a few clicks or log in to continue.

4 posters

    Making Spells

    avatar
    Guest
    Guest


    Making Spells Empty Making Spells

    Post by Guest Sat Jun 13, 2009 12:01 am

    Hey guys, Stickmenfalling here, I saw some of the great tutorials OblivionModda had on here and thought I would make one. I'm going to try and help you learn how to make spells the way I did, through example, and then you're own private practice.

    Okay so first of all, it's a pretty good idea to start out in the Construction Set (CS) itself clown
    • Now just load up the Oblivion Master file in File -> Data (this may take a while)

    • Once loaded, click on Gameplay -> Edit Scripts

    • Once in the script window, click on Script -> New...

    • Near the upper right-hand corner of the window, there is a drop-down box that says "script type" drop down the list, and select "Magic Effect"

    • Now first thing's first, the script needs a name. Begin the script with the following:

      Scriptname TutorialSpellScript

      (note that the CS is not case-sensitive)
      What you have just done is named your script. Naming your script allows you to find your script easily when you assign it to an item or spell, not to mention just plain giving it a label tongue

    • In this script, we will make a spell that removes all of a target NPC's items, making them naked (we will get to more advanced stuff, like conditions and making them run around, later) so type out the following:

      Begin ScriptEffectStart

      Allow me to quickly explain this. This is a block command. Block commands tell the script when to start happening. This particular block command is only usable for spell scripts. It means begin the script when the spell is cast.
      Alright back to business.

      Begin ScriptEffectStart
      RemoveAllItems
      end

      So what we just did was, we told the script to start when the spell effect begins, and then remove all of items on the target. Simple, right?
      Here is how your script should look:

      Scriptname TutorialSpellScript

      Begin ScriptEffectStart
      RemoveAllItems
      end

    • Now click file -> Save. If everything went right, it should save without complaining.

    Now lets put the actual script into a spell.
    • In the object window, expand the Magic set, then Spell, and then select "Spell"

    • Right click in the spell list, and select "New"

    • In the ID Box type TutorialSpell (it's always a good idea to name your script the same as your spell ID, but with the word "script" at the end. For example, this spell's ID is TutorialSpell, and the script is called TutorialSpellScript). In the Name Box type whatever you want to call it. This name will appear in your spell menu in the game.

    • In the area called "Effects" (to the right of the information area) right click and select "New"

    • Now in the Effect drop-down box, select Script Effect. In the Range box, select Target. Then select TutorialSpellScript in the Script drop-down box. For this spell type "Make naked" in the Effect Name box. Select "Charm" in the Visuals Effect box. Leave "Effect is Hostile" unchecked. Now click OK in the Effect menu and in the Spell menu. But you still aren't done yet.

    • Go to Items -> Clothing -> Amulet in the object window. Right-click your favorite amulet and select "Edit". Change the ID to SpellAmulet and the name to whatever you want it to be. Now make a new script and make it look like this:

      Scriptname SpellAmuletScript

      Begin OnEquip
      Player.addSpell TutorialSpell
      end

      Save it, and go back to the amulet's info menu. Select SpellAmuletScript from the Script drop-down box (if it is not there you will have to click OK, then come back to the amulet's info menu by double-clicking it) also don't forget to uncheck Quest Item, and click OK. Now go to Actors -> NPC -> Imperial -> Male. Look for a character with the ID Player and the name Bendu Olo. This is the player, in other words, you. Do not change ANYTHING! Just click and drag the amulet you made into the character's inventory.

    • Now go to File -> Save and name the file TutorialSpell.

    • Begin running Oblivion. In the menu that first appears as soon as you open Oblivion, select Data Files. You should see a list of files. Check the one that says TutorialSpell by clicking on it. Click OK and begin playing. Equip your amulet and then test out the spell. If it all worked out correctly, the person you shot should now be naked, wearing only their underwear. Now try some stuff out on you own. This website will help: http://cs.elderscrolls.com/constwiki/index.php/CS_Functions it lists all the different functions in the CS and what they do. We'll get to more advanced stuff later on in another tutorial. Happy scripting! Cool


    Last edited by Stickmenfalling on Mon Jun 15, 2009 5:45 pm; edited 1 time in total
    OblivionModda
    OblivionModda
    Admin


    Posts : 557
    Skill points : 964
    Reputation : 31
    Join date : 2009-06-08
    Age : 29
    Location : New Zealand

    Making Spells Empty Re: Making Spells

    Post by OblivionModda Sat Jun 13, 2009 2:05 am

    WOW thanks for the very informative tutorial Stickmenfalling king It sure helped me a lot and I know it will help numerous amounts of others Very Happy thanks and keep up the good work.
    Salt
    Salt


    Posts : 39
    Skill points : 54
    Reputation : 0
    Join date : 2009-06-12
    Location : Cyber Space

    Making Spells Empty Re: Making Spells

    Post by Salt Sat Jun 13, 2009 3:59 am

    Oh thanks a lot Sticky Laughing this really helped me as I am pretty much useless at scripting Sad but I am a lot more understandable to it now thanks to you Smile I know the basic building blocks of a script woot woot Very Happy thanks again and keep it up, we need more tutorials like this great one and the ones Oblivionmodda does.
    psman012
    psman012


    Posts : 335
    Skill points : 504
    Reputation : 20
    Join date : 2009-06-16
    Age : 29
    Location : Earth

    Making Spells Empty Re: Making Spells

    Post by psman012 Thu Jun 18, 2009 1:49 am

    Thanks!

    I will start Blender3D tutorials tonight!

    Very useful tutorial, Stickmenfalling!
    Penguinchao
    Penguinchao


    Posts : 33
    Skill points : 77
    Reputation : 2
    Join date : 2009-07-08
    Age : 29
    Location : Commonwealth

    Making Spells Empty Re: Making Spells

    Post by Penguinchao Wed Jul 08, 2009 4:02 am

    WOW...that should answer any question anyone has, i like you already Smile

    Sponsored content


    Making Spells Empty Re: Making Spells

    Post by Sponsored content

      Similar topics

      -

      Current date/time is Fri May 10, 2024 9:36 am