Jump to content

Quest Scripting Help Needed


Feralkyn

Recommended Posts

Right, I've another question, if anyone can help out. I'll edit it onto post #1, too, but here goes: I have almost everything worked out, but there's one major problem. If the NPC is performing an AI package for a scene, and is interrupted (by entering combat for example), he will then go back to whatever he was doing beforehand and that's it. It will be impossible to progress the quest.

 

This especially becomes a problem during the long dungeon, since if we enter combat, he goes home. Now, I see an option in regards to the FollowPlayer AI package called "overrides" but I assume that means that combat would interrupt the AI. Should I be using a different package? What if he's interrupted while travelling? Any help is appreciated!

 

Edit: Tried ticking "must complete," didn't help. I also tried unticking all "interrupt flags" but he still dismounted, engaged in combat and went home (rather than where he's supposed to go).

Edited by Feralkyn
Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Hey again! That's a wonderful link and I've watched it through, and will definitely hang onto it. Unfortunately it doesn't actually address the problem I mentioned. I'll try to be a little more clear, since at the moment it's completely stumping my progress:

 

- Stages and AI packages are set, with scenes in place for the Actor to perform set sequences of travel/speaking to player/mounting up/travel etc in order to progress the quest.

- Entering combat interrupts the packages, at which point the scene breaks and he goes home, instead of resuming.

- That includes Follow packages. He won't follow after a fight; he'll go home instead. This of course destroys the quest.

 

Note that I DO NOT have it set as an AI package -on- the actor, set to fire at stage 60 of the quest or w/e. This is because it's a scene/sequence, and if I did that I imagine he'd be doing them all out of order and repeating them in loops and so on. It'd be all sorts of messed up. I just need to know how to have the scenes resume after combat.

 

I COULD use a workaround of telling the Actor to have dialogue asking him to follow me, if we're on that quest stage and he ends back up at his house. BUT, that means he won't go through the dungeon with you. I'm not sure if this is default for FollowPlayer or what. Thanks for any help, again.

 

Edit--FOR NOW, I've done a filthy dirty workaround which adds a second AI package directly to the Actor, which does the following:

 

- If the scene interrupts, and he heads back;

- A new dialogue option is opened IF he is on stage x and location y (back at home where he should not be).

- The dialogue option will ask him to follow, which will NOT re-initialize the scene, but instead just have him follow you so you can take him to the quest objective, by setting a new intermediate quest stage tied to a Follow AI package.

 

It's annoying, because I cannot figure out how to make combat not break "scene" packages, but such is life I guess :(

Edited by Feralkyn
Link to comment
Share on other sites

The sound thing is still also frustrating me all to hell. I know I'm doing something wrong, just can't figure out what. I made this script for an activator:

Scriptname WizFalkreathHowlsScript extends ObjectReference

GlobalVariable property GameHour auto    
Static property myHowlMarker auto
Sound Property SoundNamehere Auto

Event OnTriggerEnter (objectReference activateRef)
    RegisterForSingleUpdateGameTime(1)    ;Updates once per hour in-game. NEVER USE RegisterForUpdate or RegisterForUpdateGameTime. Ever.
endEvent

Event OnUpdateGameTime()
    if GameHour.GetValue() >= 20.0 || GameHour.GetValue() <= 6.0 ;Between 8PM and 6AM
        SoundNamehere.Play(Self)

    endif
endEvent

and set it up with my sound and so on (cobbled together from other/others' scripts). I've tried various scripts, emitters, activators, trigger boxes and I'm going mad. This is one thing I've been trying to do since starting the mod over a year ago and still can't figure it out. I've tried it with and without "player activation" triggered. I've also tried simple "play sound" scripts, and the Trap Trigger scripts with -sounds on activation- so I could add a delay. None of them actually fire.

 

What I want to do:

 

Take the Ashlands_Howl sound (an AMB or AMBr, I forget). Set it so that it plays during a certain quest stage, at night, in Falkreath, every so often.

 

That's it :| It's such a pain. If anyone can lend a hand I'd hugely appreciate it. I'm sure if I can get an activator working for the rest of the variables I can just activate it during the quest, but it's the "everything else" driving me nuts.

Edited by Feralkyn
Link to comment
Share on other sites

The sound thing is still also frustrating me all to hell. I know I'm doing something wrong, just can't figure out what. I made this script for an activator:

Scriptname WizFalkreathHowlsScript extends ObjectReference

GlobalVariable property GameHour auto    
Static property myHowlMarker auto
Sound Property SoundNamehere Auto

Event OnTriggerEnter (objectReference activateRef)
    RegisterForSingleUpdateGameTime(1)    ;Updates once per hour in-game. NEVER USE RegisterForUpdate or RegisterForUpdateGameTime. Ever.
endEvent

Event OnUpdateGameTime()
    if GameHour.GetValue() >= 20.0 || GameHour.GetValue() <= 6.0 ;Between 8PM and 6AM
        SoundNamehere.Play(Self)

    endif
endEvent
and set it up with my sound and so on (cobbled together from other/others' scripts). I've tried various scripts, emitters, activators, trigger boxes and I'm going mad. This is one thing I've been trying to do since starting the mod over a year ago and still can't figure it out. I've tried it with and without "player activation" triggered. I've also tried simple "play sound" scripts, and the Trap Trigger scripts with -sounds on activation- so I could add a delay. None of them actually fire.

 

What I want to do:

 

Take the Ashlands_Howl sound (an AMB or AMBr, I forget). Set it so that it plays during a certain quest stage, at night, in Falkreath, every so often.

 

That's it :| It's such a pain. If anyone can lend a hand I'd hugely appreciate it. I'm sure if I can get an activator working for the rest of the variables I can just activate it during the quest, but it's the "everything else" driving me nuts.

Change (self) to (Game.GetPlayer())

Link to comment
Share on other sites

Regarding your follow package being interrupted by combat, There is something fishy with your set up. Are you just activating the package by just a quest stage condition? If you are, then there's more you need to do:

 

  • The npc needs a relationship (ally) with the player.
  • You also need to set npc as a player team mate. In your dialogue that initiates the package, add the code akSpeaker.SetPlayerTeamMate()

You may have done the above, in which case... I can't think of an answer (but it's probably something only you can work out).

 

Regarding your scene interruption, the only thing that I could think of trying is creating a second package that is a copy of the follow package but has the "ignore combat" flag checked. You could place this package at the top and set a condition (like a global) that it will trigger only during scenes.

 

 

Try and try again... :)

Link to comment
Share on other sites

Honestly, I'm not too bothered, now; my workaround is dirty but it works.

 

I did it with the flags and not, and the relationships, but he still wanders off; the issue, I think, is that the Follow package in that particular case is part of a scene, rather than set directly by quest stage. And scenes, it seems, are interrupted by combat no matter what you do. I've changed it so that on the OFFCHANCE he does get interrupted in the brief walk/follow scene (and theoretically he shouldn't, but vampires happen), and goes back to the Longhouse, you can talk to him to get him to follow you again, though it skips the rest of that scene.

 

The basic version is that he was meant to go outside, get on his horse, ride to another location, get off and initiate follow. i had tried to split it into a scene and then a follow package, but if I did that, he'd just walk home after the scene and never initiate follow. So yeah, I added a dialogue that can only be initiated from his start point (if he returns to it) on that quest stage, which prompts an intermediate hidden quest stage that has a follow AI directly attached, and that WON'T be interrupted by combat. It means if we get attacked during the travel sequence, and he walks off home, I can at least go get him to bring him to the next quest point. Messy, but it'll have to do.

 

My sounds are playing during the daytime so I'll need to figure that out, but on the bright side, the quest now works from start to finish. I'll be going back now to add in "flavor" dialogue throughout, then get the voices started.

 

Then it's just time to make a radiant quest, and a proper follower... *wipes brow*

 

If and when this ever gets published, you don't mind being credited for your help, do you? You've definitely been a lifesaver!

Edited by Feralkyn
Link to comment
Share on other sites

Edit--SOLVED the scene-interrupted-by-combat issue. Basically, I had to click Edit Actor Behavior button up top over the scene, and move the checks from the "End" tickboxes over to "Pause," instead. My GOD, such a simple fix, but it wasn't covered in ANY tutorial that I saw/read/watched. Thanks so much for your help!

 

Now the reason I've returned, if anyone has an answer: is it possible to use the radiant quest system to retrieve a -type- of item rather than a specific instance? I can set up an alias that looks for a keyword and chooses a random item, which works fine, but when it's added to inventory it isn't registering (via the onplayeracquire script attached to the item alias). Would I be right in guessing that it doesn't know what to look for? It also apparently doesn't remove the item from the player's inventory so I assume that for aliases I need to look into filtering and forms and so on (which I haven't even touched yet). I'm looking into that stuff now, but is it even possible to do what I want?

 

Specifically, if it has conditionals keyword "vendoritemsoulgem" -or- "keywordvendoritemingredient" or whatever it is--the questgiving letter will still fill the alias properly with a random item, which shows properly in all quest objectives/stages. -But- it does not register when the item enters inventory, and does not properly remove it, so I assume in terms of aliases, without a specific reference it gets a little lost...? If it's not possible I won't waste too much time on it, but as I've been going at it for a few hours with no luck I figured I'd ask if anyone knows if I am wasting that time!!

Edited by Feralkyn
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...