Jump to content

Cast Blessing After Dialogue


Recommended 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!

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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