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...

Script Fragment For Follower Quest Stage


Recommended Posts

Hello all,

 

  I know that there are detailed tutorials here and I am sure they answer my exact issue and/or explain why I am having this issue and I have read the tutorials here and in other places when it comes to scripting as well as followed along doing different things and I don't get it. My head isn't made for scripting.

 

It's like I am reading a foreign language I don't understand (which is exactly what it is really) and so something that is plain as day to a native speaker is impossible for me to comprehend. So regardless as to the simplicity of this issue, please trust and believe I have really tried to figure this out on my own before coming here and failed.

 

I used this tutorial: Making a Custom Follower but discovered an issue where the game isn't truly dismissing a follower that uses this framework when it auto dismisses. This is especially true for when the person you are marrying is an active follower at the time the ceremony starts.

 

So what I wanted to do, since my Follower Dialogue Quest incorporated stages already, was simply add a script fragment to the stage it uses when a follower is dismissed/not following that dismisses the follower.

 

So of course, I thought it would be easy to simply do what worked for the dialogue:

 

(GetOwningQuest() as ARCTESTDialogQuestScript).DismissFollower(0,0)

 

 

Then GetOwningQuest() errors because it isn't a function or something. To overcome this in the past, I would just declare the quest as a property for the fragment, but that doesn't work here because it is a script I need as a property and I don't know how to do that since I tried and that failed.

 

My plan was to then try this function:

 

ARCTESTDialogQuestScript.DismissFollower(0,0) or this:

 

ARCTESTDialogQuestScript.DismissFollower()

 

 

But somehow I think that even if I could declare the property, this wouldn't be right.

 

I even tried declaring ARCTESTDialogQuestScript as the kmyQuest but that didn't allow me to use the above fragment either.

 

So I am lost. All I am trying to do is make it to where when my follower's dialogue quest stage is set to 100, the follower is dismissed as if you dismissed them with the dialogue choice.

 

Any help to resolve this would be majorly appreciated as this is tormenting the Oblivion out of me.

 

Thank you.

 

Sincerely,

 

   Tons

Edited by TheObstinateNoviceSmith
Link to comment
Share on other sites

This fragment should work: (GetOwningQuest() as ARCTESTDialogQuestScript).DismissFollower(0,0). Is the name of your script called "ARCTESTDialogQuestScript" and are you using that fragment in the on end of the dialog where you're calling it? I wrote that tutorial, so if something isn't working or isn't clear, I'd like to know so I can update it. :)

  • Upvote 1
Link to comment
Share on other sites

Oh, okay. I think it only works as a dialog fragment. If you want to use it in a quest fragment, you'll need to use <your quest name> as ARCTESTDialogQuestScript.DismissFollower(0,0) and make a property for your quest (QuestProperty as whatever) I believe.

 

This is a script I used for Morte's recall tooth. The (JacMorteScript as JacMorteFollowerScript).DismissFollower() is what you'll need:

 

Scriptname JacMorteToothScript extends ObjectReference

Actor Property MorteRef Auto
Actor Property PlayerRef Auto
Armor Property MorteToothref Auto
Message Property MessageBox Auto
Quest Property JacMorteScript Auto
Faction Property MorteFaction Auto

Event OnEquipped(Actor akActor)
PlayerRef = Game.GetPlayer()
;Debug.Notification ("Activating Morte's ring.")
Utility.Wait(0.1)
Int Choice = MessageBox.Show()
If Choice == 0
Return
ElseIf Choice == 1; move Morte to player
MorteRef.MoveTo(PlayerRef, -120 * Math.Sin(PlayerRef.GetAngleZ()), -120 * Math.Cos(PlayerRef.GetAngleZ()), 0, abMatchRotation = true)
if MorteRef.IsInFaction(MorteFaction)
(JacMorteScript as JacMorteFollowerScript).SetFollower()
endif
ElseIf Choice == 2; send Morte home
(JacMorteScript as JacMorteFollowerScript).DismissFollower()
EndIf
PlayerRef.UnequipItem(MorteToothRef, False, True)

EndEvent
  • Upvote 1
Link to comment
Share on other sites

I'm hoping I could trouble you guys one last time over something that has to do with this still, just in a  different way.

 

So, Jac, what you told me to do definitely worked, but upon using it, I ended up realizing there was something else I was trying to do with this code. I wanted to make an auto dismiss of sorts and I thought I could just apply what you (Jac) told me do this simply by adding the code to Stage 0 of another quest that activates when the follower quest deactivates (instead of a Stage 20).

 

It complies, but of course it doesn't actually do anything.

 

I'll try to explain what I am trying to do better...

 

Basically, the follower will follow you as long as a number of conditions (a lot of them) are being met. These conditions are are stored in the Quest Data so if any of those conditions break, the quest no longer functions.

 

The other Quest becomes active when the original goes down, because it has the same conditions attached to it but with opposite value requirements.

 

This works just fine. The only thing is, I want the follower to be dismissed as soon as the new quest kicks in.

 

Attaching this to the Stage 0 of the quest that is meant to dismiss compiles, but doesn't actually do anything. I even tested it by changing the script to SetStage(20) and it failed to do so:

 

DrascsanaMainQuest.ARCTESTDialogQuestScript.DismissFollower()

 

 

Thanks again everyone just for taking a look at this and Jac for answering my question before it had evolved into yet another.

 

 

EDIT: I'm not sure if it is going to work, but I think I can resolve this issue incorporating an AI package. I don't understand package hierarchy (have a situation where the sleep package attached to my person seems to be overridden by the SpouseSandboxing one that allows sleeping) but I think this could work for me.

Edited by TheObstinateNoviceSmith
Link to comment
Share on other sites

Try putting that script into the quest script instead. As for AiPackages, you cannot apply one to the player that I know of. Also, I believe they go from top to bottom in terms of priority; you can have a top package only run if certain conditions are met, forcing the game to use a lower one until said conditions are met. Also, you'll want EvaluatePackage() whenever you change packages.

  • Upvote 1
Link to comment
Share on other sites

Thanks again Jac, but I basically got it figured out using the packages. Just having some odd issues that from what I can tell, after following two different tutorials to the letter, I shouldn't even be having. Still, I definitely got the basic function down.

 

Thanks for hitting me back though. I was going to update my post once I got it completely worked out but I should have done it sooner as I definitely found a way to resolve this.

 

 

EDIT: Everything is all good now. Thanks again for all the help/advice.

Edited by TheObstinateNoviceSmith
Link to comment
Share on other sites

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...