Jump to content

Photo

Cast Blessing After Dialogue

script blessing dialogue cast magic spell ability

  • Please log in to reply
3 replies to this topic

#1
MoonlightArcher

MoonlightArcher

    Regular

  • Members
  • PipPip
  • 72 posts

Hello Modders of Skyrim (SE),

 

I don't know if this question has been asked before but I couldn't find it anywhere.

So my goal is to have an NPC cast a blessing - similar to the doomstones - after a certain part of dialogue.

What I need it to do is:

 

On Dialogue End:

1. Cast the NPC-B lessing;

2. Remove current Doomstone-Blessing;

3. Show add NPC-Blessing message;

4. Show remove current Doomstone-Blessing message;

 

I have no idea how to do this as I'm fairly new to modding.

I tried a couple things already:

 

1. Add "TempleBlessingScript" to the dialogue -> Does nothing (obvious because it needs an activation trigger);

2. Copy doomstone script into "End Dialogue" box -> Doesn't compile;

3. Create a simple script myself:

 

Blessing.Cast(Game.GetPlayer())

BlessingAddMSG.Show()

BlessingRemMSG.Show()

 

This shows the messages but doesn't cast the blessing. Also it doesn't remove the other doomstone blessings which is obvious because I didn't add a line for this (don't know how).

Also there are a couple lines of dialogue but for some reason I have to create a seperate script for every line of dialogue instead of being able to reuse the same script for every line.

For some reason to make at least the messages show up I have to write it in every "End Dialogue" tab, creating a new script every time. Is there a way to make this easier?

 

You would be a lifesaver if you could help me out with this!
Thanks!

 

 



#2
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,315 posts

I'd just take a look at the vanilla 'Blessing' scripts, which you look like you have done. Try to understand what is being done at each line of code. Select the bits you need and duplicate them in the end fragment code for your dialogue. It won't compile at first because you need to declare the properties in the dialogue fragment.

 

When you try to add the script fragment to the dialogue it won't compile. Don't worry about this. Save the script fragment and open the 'source code' in the 'Script Name' box on the right. After the last entry that tells you not to edit anything between this and the start, declare your properties. Recompile the script and it will work.

 

By declaring properties, I mean things like 'Spell Property Myspell Auto', without the inverted commas.

 

This tells the game that your script is using a certain spell and exactly what this spell is.

 

The best example I can think of for this is the vanilla quest 'DialogueFollower'. Look at any entry in the 'DialogueFollowerDismiss' branch. here Bethesda do exactly what you need.



#3
MoonlightArcher

MoonlightArcher

    Regular

  • Members
  • PipPip
  • 72 posts

I'd just take a look at the vanilla 'Blessing' scripts, which you look like you have done. Try to understand what is being done at each line of code. Select the bits you need and duplicate them in the end fragment code for your dialogue. It won't compile at first because you need to declare the properties in the dialogue fragment.

 

When you try to add the script fragment to the dialogue it won't compile. Don't worry about this. Save the script fragment and open the 'source code' in the 'Script Name' box on the right. After the last entry that tells you not to edit anything between this and the start, declare your properties. Recompile the script and it will work.

 

By declaring properties, I mean things like 'Spell Property Myspell Auto', without the inverted commas.

 

This tells the game that your script is using a certain spell and exactly what this spell is.

 

The best example I can think of for this is the vanilla quest 'DialogueFollower'. Look at any entry in the 'DialogueFollowerDismiss' branch. here Bethesda do exactly what you need.

 

Thank you! I was thrown off by the compilation issue. I didn't think that the script would actually be editable if it didn't compile. The only thing I had to do for it to work was indeed declare the properties and of course adding my own spell to the original doomstone script so my blessing gets removed when the player decides to activate a doomstone again instead of the NPC.

 

Thank you again for the help!



#4
cumbrianlad

cumbrianlad

    Right turn, Clyde!

  • Premium Member
  • 1,315 posts

No worries.

 

CK is weird about stuff like this. You have to do it in the correct order for it to work.







Also tagged with one or more of these keywords: script, blessing, dialogue, cast, magic, spell, ability

Page loaded in: 1.153 seconds