Jump to content

Papyrus Scripted Summoning Spell


Recommended Posts

Hi,

 

I'm trying to make two spells. Basically, one summons an NPC when casted, and the other one unsummons the NPC. Thing is, I want to reuse the same NPC, so the normal summoning spells won't work for that.

 

I've been reading around and asking people, what I've sort of got is that I need to make it so that the summoning spell has a script that moves the NPC to the player and then enable it. The Unsummoning spell disables the actor without deleting or killing it.

 

Now I have 0 experience with Papyrus, and despite my best efforts I have no idea how to make this work. I tried using a quest but I dunno how to connect that to a spell. I tried using just a spell, but the papyrus script section doesn't let me type in it, etc.

 

I am very confused, so can someone explain to me in detail, how might I create a spell like that, and give an example of how it looks in the creation kit, where to put the scripts, and how it functions? I don't think I'll be able to understand without very specific examples.

 

Really appreciate any help.

Link to comment
Share on other sites

I had a look at the script, but I have no idea how it works?

 

Where do I put the script? Do I put it in a quest or on a spell, and if so how do I do that?

 

What do all these functions mean and do? Do I need all of them? I just want a very simple, very basic spell...

 

Can someone please explain to me in detail how any of this works??

Link to comment
Share on other sites

You need to put the script into the magic effect of the spell. For the summoning reference you may see it in "DLC2SummonDremoraButlerEffect" or "DLC2SummonDremoraMerchantEffect" magic effect script. It's pretty much straightforward if you ignore the OnEffectFinish part.

 

As for the unsummon spell, you also can use the OnEffectFinish part of the same script.

Link to comment
Share on other sites

Yeah basically.

 

I will explain the function from that link.

 

Explanation of the arguments:

  1. akSummoner is the caster.
  2. akSummon is the actor to be summoned.
  3. afDistance is the distance from the caster that akSummon will appear.
  4. afZOffset is the offset relative to the caster's z axis
  5. arPortal is the thing that you normally see swirling around a vanilla summon just before it appears. arPortal can be anything you want.
  6. aiStage is for the while loop stages.

Explanation of the while loop:

  • This loop obviously goes in steps and makes a really good attempt at simulating how the vanilla summon effect works. It will keep going until the last stage of the sequence is reached, to which there is a short wait (I don't know why that's there)

STAGE 1:

  1. The swirling effect normally seen when vanilla summons are placed will be pulled directly from Skyrim.esm during this stage. This effect is not persistent and will delete itself when the animation is done. This is why there is a while loop because animation takes 6 seconds.
  2. This effect is assigned to arPortal and will be placed at arPortal's position.

STAGE 2:

  1. akSummon is disabled momentarily, so that it doesn't look like it's just "popping in" and out of sync with the portal animation.

STAGE 3:

  1. arPortal is moved to the front of the player. Trigonometry is used here and I don't understand it.

STAGE 4:

  1. akSummon is moved to the portal (it's disabled still)

STAGE 5:

  1. akSummon is enabled and appears during the dissipation of the portal.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...