Story Manager Question

Post » Tue Nov 20, 2012 7:59 am

When sending an event to the story manager via papyrus:
Spoiler
ScriptName MyActivatorScript extends ObjectReferenceKeyword Property QuestEventProperty AutoEvent OnActivate(ObjectReference akActionRef)	QuestEventProperty.SendStoryEvent(akRef1 = akActionRef)EndEvent

I have an alias in my quest that waits to be filled from this event (and thus starts the quest), how does the story manager know which quest I actually want to send it to? I know that you make a node for your quest in the story manager but surely sending just akRef1 is far too generic??? This is really confusing me.

My setup was generated by instructions from this post:

Spoiler
@Antares
Ok, I think I know how you could do it.
Create your quest and in the quest data tab select, from the event drop down list, script event.
Then go to the SM event node tab in the object window and double click the script event object.
Right click on Stacked Event Node:Script Event and select new branch node. A new stacked branch node will appear at the bottom of the list, right click on it and select new quest node.
On the stacked quest node that is created, tick the shares event box and right click on the stacked quest node and select add quests. This will bring up a list of quest forms, select your quest from this list and on your quest node add a condition to check if your quest is already running (GetQuestRunning [Yourquest] ==0).
Go back to your quest and create a new reference alias. In the quest aliases tab add your AI package to the alias package data tab and for the fill type select find matching reference from event and in the event data drop down select Ref1. To be safe also tick the optional checkbox in the alias tab.
Then attach a script to your activator that sends a story event to the story manager to start your quest.
ScriptName MyActivatorScript extends ObjectReferenceKeyword Property QuestEventProperty AutoEvent OnActivate(ObjectReference akActionRef)	QuestEventProperty.SendStoryEvent(akRef1 = akActionRef)EndEvent

The only problem is I don't know what the keyword should be! I think it should be a custom keyword that you attach to your activator but I honestly have no idea...
User avatar
Myles
 
Posts: 3341
Joined: Sun Oct 21, 2007 12:52 pm

Post » Tue Nov 20, 2012 4:55 pm

how does the story manager know which quest I actually want to send it to?
The SM will start a/many quest from the node based on conditions, that's actually it's job. Then it sends those params to whichever is the one it started. There are two separate things sending the event+params from papyrus as in your example (you don't care here which quest if any) and starting a quest from SM based on conditions (where you can use references from the event, there are condition functions for that if I remember correctly).
User avatar
Symone Velez
 
Posts: 3434
Joined: Thu Sep 07, 2006 12:39 am

Post » Tue Nov 20, 2012 1:58 pm

how does the story manager know which quest I actually want to send it to? I know that you make a node for your quest in the story manager but surely sending just akRef1 is far too generic??? This is really confusing me.

Typically it's the keyword itself that tells Story Manager which quest to start--often alone, possibly in combination with the other event data you can pass in the SendStoryEvent function. What the instructions you were given didn't include is that typically, when you create your branch in Story Manager, you add a condition to the branch with the GetEventData condition function and Keyword / GetIsID / YourKeyword conditions. That tells Story Manager to only start your quest when it has received a request "keyed" to your keyword.
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am

Post » Tue Nov 20, 2012 10:36 am

Typically it's the keyword itself that tells Story Manager which quest to start--often alone, possibly in combination with the other event data you can pass in the SendStoryEvent function. What the instructions you were given didn't include is that typically, when you create your branch in Story Manager, you add a condition to the branch with the GetEventData condition function and Keyword / GetIsID / YourKeyword conditions. That tells Story Manager to only start your quest when it has received a request "keyed" to your keyword.
Thank you, I have already done this. I checked some of the other nodes there and they all had similar keyword conditions. The part that was confusing me was the fact that even though I was filling the property with the wrong keyword and only had a GetQuestRunning condition on the event, it was still starting my quest flawlessly.
User avatar
adam holden
 
Posts: 3339
Joined: Tue Jun 19, 2007 9:34 pm


Return to V - Skyrim

cron