Starting a non 'startgame enabled' quest

Post » Sat Oct 12, 2013 9:55 am

So I apologize if this has been covered, I have been looking around the web and not discovered anything. This is partly because I can't pin down exactly what is wrong.

I am attempting to, in order:

1. Declare a quest property in a previous quest

2. Reference this property in a script fragment, use the start(), then the setstage(0) functions sequentially in order to begin the quest.

I have been at this for days now, and even after having followed tutorials to the letter, I am having no luck. When I check the quest state using the console in game, every stage is still equal to 0, afterward, and none of the scripted events for the beginning of the quest occur.

Things I have tried:

Declaring the property in a previous quest, as above.

Making the quest start using the SM node location change event

Making an activator that has this quest as a property, and calling start and setstage in an OnActivate Event. This was particularly vexing, as it compiled fine, and the debug message I included inside the event played, but the queststage did not change.

I am almost tearing out my hair at this point, as according to all the tutorials I have read, all of these methods ought to have worked. If there are any known issues like this, I would love to hear suggestions. I will post the actual code snippet below.

User avatar
tiffany Royal
 
Posts: 3340
Joined: Mon Dec 25, 2006 1:48 pm

Post » Sat Oct 12, 2013 7:47 am

Here is the code(minus the boilerplate, which is generated by CK):

Quest Property QuestToStart auto (presumably, as I generated it in the Quest Manager for the previous quest using the dialog box)

QuestToStart.Start()

QuestToStart.SetStage(0)

;these above lines of code are the actual Papyrus fragment I have set in the final stage of the previous quest. This is how I tried to do it at first. Next:

Next, I made a SM node, as noted above. There was no actual scripting involved for this, and I am still puzzled as to why it didn't work. The tutorial I saw appeared to do the same thing and it worked just fine.

Finally, I made an activator object, duplicated from an existing lever. In the scripts tab, I placed:

Scriptname OnActivateStartQuest extends ObjectReference

Quest Property QuestToStart auto

int doublecheck = 0

EventOnActivate(ObjectReference akActionRef)

if (doublecheck==0 && akActionRef==game.GetPlayer())

QuestToStart.start()

QuestToStart.SetStage(0)

debug.MessageBox("Your lever worked!")

doublecheck+=1

endif

EndEvent

Then I edit the properties of this script, and point the quest property at my quest of interest.

Admittedly bare bones, but it compiled fine, and when I activate the lever it displays the debug message, which implies that it is getting into the if conditional. Yet if I use SQS AlterationQuest immediately afterwards, every stage remains at 0.

I have doublechecked that my quest isn't triggered by any events. I have doublechecked that it isn't set at some weird priority. I have doublechecked that it has a 'startup stage' (stage 0)

If anyone has ideas, I am open to suggestions.

User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Sat Oct 12, 2013 8:38 am

What are you doing at stage (0)? I mean if your quest is running then looking by what you have done it should be at stage (0). You shouldn't need to set stage (0) anyway if it's marked as start-up stage then the quest will start on that 0 anyway, the same way that if you declare a state as the shutdown state the quest will go to that state when shutting down.

Try using console SVQ QuestID in console see if that gives you any more info.

User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am

Post » Sat Oct 12, 2013 5:20 am

I used the setstage(0) because it didn't seem to be naturally progressing to that stage. It was a crude attempt to force it to happen. At any rate, I've figured it out, after stumbling across something on the Nexus Forums. I set all the quest aliases to be optional. Apparently the aliases weren't allowed to be filled, and the quest wouldn't start because of that, though even though I checked 'warn if aliases unfilled' box, I did not receive a warning. Anyway, this topic can be closed now. I got my quest to start.

Thanks for the quick reply, by the way. I was worried this would take days to get a response.

User avatar
tiffany Royal
 
Posts: 3340
Joined: Mon Dec 25, 2006 1:48 pm


Return to V - Skyrim