Jump to content

Making a Quest - Scripting Problem..help


Graxster

Recommended Posts

This has me tearing my hair out in frustration. I'm missing *something*, but can't figure out what it is. I got it to work once, then modified my Quest and Scripts and have lost it.

 

What I'm trying to do is make a simple quest that forces and NPC to find the player and say something once, like a messenger quest. I've looked at all the quest tutorials I can find, and am following the steps, but none of those are for a "Say once and Goodbye"-type quest. Here are the steps I'm following:

 

1. Create a "Find Player" package. (This step always works fine).

2. Create a Quest. Give it a high priority. Add "IsPlayableRace" and "PlayerInSEWorld" (have tried it with and without that part). Check "Start Game Enabled".

3. Add a couple of quest stages. Add the Topic "GREETING" and click new, then type in my message, "Meet me in the Temple District at 11pm." Check off Goodbye and Say Once. Result script: SetStage TestQuest 10. Conditions: GetisID MaranaRian, GetStage TestQuest 0.

4. Create a Quest script. if GetStage TestQuest == 0, MaranaRianRef.AddScriptPackage FindPlayer, MaranaRianRef.EvaluatePackage.

 

Those are the basic steps (maybe not everything) that I've been following. Problem is, the NPC will run up to me, and instead of saying "Meet me in the Temple District at 11pm", she'll say "My name is Marana Rian...blah blah blah (her standard line)", or simply "What do you want?" or some such.

 

I tried doing it with a newly created NPC, so they wouldn't have any default greeting, and simply got "What do you want?" when they found me.

 

Any ideas of what I'm doing wrong would be appreciated. Thanks!

 

-Grax

Link to comment
Share on other sites

I'm going to throw out a few ideas here-- I don't pretend to any intensive knowledge of scripting, but I have made a lot of mistakes!

 

Is the "Meet me" option at the top of your list? The engine-- as far as I know-- starts at the top, and checks until it finds the first info where all conditions are true. That might be the problem.

 

Alternately, you can make the condition getstage == 1, and in the quest script, setstage to 1 (using DoOnce to not totally screw it up). That might be the problem.

 

It might also be that GetStage, since it checks for the highest stage completed, is confused by the 0; trying GetStageDone might help, since it checks for all stages.

 

Also-- and you're probably already doing this-- use the console to check what stage you're at, just in case.

 

This has me tearing my hair out in frustration. I'm missing *something*, but can't figure out what it is. I got it to work once, then modified my Quest and Scripts and have lost it.

I know that feeling.

Link to comment
Share on other sites

Don't use GREETING. It is treacherous. You have a random chance that the NPC will use your GREETING, or one from vanilla Oblivion or somebody else's mod. GREETING has broken many many quest lines and turned many mods into junk.

 

Options:

 

(1) Add a redundant backup. Also create a new topic that uses exactly the same lines as your custom greeting. Add the topic somewhere early in your mod before the player encounters the NPC. So when the NPC accosts the player and spouts nonsense, afterward, the player will have the ability to ask the NPC about the topic and initiate a conversation about it him or herself, rather than depending on the NPC.

 

(2) Completely ditch GREETING and use your own custom topic so that there can be no error. Use a different AI package than find, and use a script with something like:

If GetDistance.Player < 1000 StartConversation Player, AAMyTopic
    ; Don't place the DoOnce here.  Place it in the dialog info result script so that it only trips upon success rather than tripping upon attempt.
EndIf

Link to comment
Share on other sites

Thanks all. Between the advice here and looking at some vanilla quest scripts, I've been able to get it working.

 

Edit: I suppose I should post what I did, in case anyone ever searches this subject. I did use a "Find" package, but I used Location>Near Reference: Player> Radius 500. Then in the quest script I used GetDistance Player <= 1000 > StartConversation Player (topic). Works like a charm.

 

One thing I've found out during this ordeal is that although clicking the "Compile" button (both on Quest Stages and Quest Topics, in Result Scripts) may not trigger errors, many commands cannot be run from these boxes. They simply don't work like a script does.

 

-Grax

Edited by Graxster
Link to comment
Share on other sites

  • Recently Browsing   0 members

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