Jump to content

Need Help with Quest Aliases


Recommended Posts

Hi guys,

 

I'm trying to create a quest using Vanilla furniture as aliases.

 

For testing purposes, I created a test quest, StartsGameEnabled, with a priority of 70. Created 2 aliases, Chair00 and Chair01, both optional, references to find in Loaded Area from a FormList listing all Skyrim chairs and a simple script attached to each Alias tab:

Event OnActivate(ObjectReference akActionRef)
	ObjectReference ChairRef = GetReference()
	If ChairRef != None
		Debug.Notification("this chair has been activated")
	EndIf
	Wait(1.5)
	If akActionRef == Game.GetPlayer()
	Debug.Notification("Player is akActionRef")
EndEvent

I placed one CommonChair in a test cell and Coc'ed from the Launch screen to that test cell. Never got any message box to show.

 

So I added one start stage to the quest with a fragment script to make sure that the quest did start, with a debug line 'if Alias_Chair00 != None' and 'If Alias_Chair01 != None'.

 

Coc again to the test cell, now both notifications from that fragment fired, sort of comforting me in the fact that the quest had properly started and aliases were filled.

 

Still, when I activate the damn chair, I get no notification at all. I know I'm doing something wrong but I can't figure out what. I'm sort of new with quests, the only ones I created before used specific references or the player as aliases - that worked of course.

 

Can someone please help me understand where I goof in this case?

 

A thousand thanks in advances :smile:

 

 

Hoamaii

 

PS. I missed the last 'EndIf' before "EndEvent" when I pasted this, but it's there!.. ;)

Link to comment
Share on other sites

Did you create the chair from an activator otherwise I can't see how a chair would activate. If you did it wouldn't of course do chairy things anymore.

Link to comment
Share on other sites

Try cocing there from the game world instead of the launch screen.

 

I just did - doesn't work either. I added a debug line to the fragment to return the filled Alias' ID and the strange thing is it returns '0' (which'd mean None, right?)

 

From what I read, 'in loaded area' scans 5 cells around the player - but from an isolated test cell I would have thought it'd only scan that given cell. Yet debug tells me both aliases are filled even though there's only one chair in that cell...

 

Perhaps I should create another dummy quest for the sole purpose of stopping the quest onCellDetach() and restarting it onCellAttach()?

 

 

Did you create the chair from an activator otherwise I can't see how a chair would activate. If you did it wouldn't of course do chairy things anymore.

 

Nope, I didn't create an activator, I just used a Vanilla chair listed in the FormList.

 

Basically, I'm trying to add a script to Vanilla furniture using quest aliases to avoid editing Vanilla Objects. If OnActivate() works on scripts added to furniture instances, wouldn't it work too on that given furniture's alias?

 

In doubt I created a SEQ file (tho' I thought they were only needed for quests with dialog) but it makes no difference either.

Link to comment
Share on other sites

1. When dealing with quest testing the command "sqv <questname>" (without <, > and ") is very useful to see if aliases are filled correctly.

 

2. Alias != Reference. Your script hast to extend "ReferenceAlias" instead of "ObjectRefernce". Then the Events should fire.

Link to comment
Share on other sites

@ DarthWayne:

 

1. ok. What does sqv do exactly?

 

2. sorry, English is not my native language, when you say "extend ReferenceAlias", you mean in the script heading or in the functions? If in the script heading, yes it does extend referenceAlias. Or do you mean I should replace "ObjectReference ChairRef = GetRef()" by "ReferenceAlias ChairRef = GetRef()" after OnActivate?

 

Edit: oh, sqv = ShowQuestVariables - ok, thanks!

Link to comment
Share on other sites

Sorry brain freeze your right it will - But If the script is on the chair it must be the thing you have activated so why have you got a further IF-then test for the Chair (which is not firing) surely you just need the Debug notification.

Link to comment
Share on other sites

Sorry, my Frenchy English must be failing me again, not sure I get what you mean... The script is not on the chair, it's on the alias of a chair, so I guess if THAT chair (tho' only one is my test cell) is not the one which filled the alias, then nothing happens.

 

I did remove the "if" condition last night, keeping only the Debug line - still doesn't fire.... :wallbash:

Link to comment
Share on other sites

Damn, I just got it to fire!..

 

Actually what I was missing was a Dummy quest running on the player alias to reset the 'Chair' quest onLocationChange() - and thus clear and refill the Aliases. I guess the game was filling my Aliases with other random chairs which were not loaded in my first attempts, and my poor lonely chair in my test cell never got promoted as Alias!.. (I also ticked the 'closest' box in the Find Reference in Loaded Area tab)

 

Well, that's a beginning, now I need to narrow down the onLocationChange() which can be a very large number of cells... Apparently, onCellAttach() does not work on Aliases, so I'm gonna try onCellLoad(), though not much reliable either from my experience. Any advice still welcome, guys!.. :D

 

Thanks all the same for your help, sometimes when you get stuck, it helps a GREAT deal just to be able to explain your issue to other modders, many times the answer lies in the issue itself, in some stupid detail you overlooked :geek: - like in this instance aliases being filled, but NOT by the one chair I needed.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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