Alias Reference "match condition" problem

Post » Mon Nov 19, 2012 12:32 am

I have a quest that involves the player reading letters to advance the quest to new stages. After making sure I had one letter working I tried to add a second letter like this:

- Created the 2nd letter
- Created a Reference Alias to the 2nd letter object, set it to create the alias in the chest that holds the letters.
- Added my scripts to the letter which just advance the quest one stage when the player acquires the letter, and another when he reads it
- Added a condition in the "Match Conditions" box that tells the letter not to appear until the quest is past stage 20 (i.e. GetStage SLQMain >= 20.000)

The 1st letter was created identically to the 2nd one except it has no conditions.

Upon entering the game and going through the quest, the first note acts exactly as it should (it has no conditions on it, the alias is just created in the chest as soon as the quest starts), but the second note never shows up. I know that the first note has advanced the quest to the proper stage because it displays the correct objective (I put SetObjectiveDisplayed for each stage), and the part of the quest that occurs after the letter is read is not able to be completed until the quest has reached a certain stage (e.g. stage 30). This or slightly before the player has done what the first note asked is when the note should appear in the chest.

Any help would be greatly appreciated.
User avatar
ShOrty
 
Posts: 3392
Joined: Sun Jul 02, 2006 8:15 pm

Post » Sun Nov 18, 2012 10:28 pm

Ignoring any of the bugs with the game/ck that are currently awaiting a fix (I do not believe you are seeing symptoms of those) then it could be a couple of things:

1. I think you may be confusing testing for a completed stage and setting the next stage as active? http://www.creationkit.com/Quest.GetStageDone_%28Papyrus%29 (that should be how you test for a COMPLETED STAGE)

2. As well or instead ... Are you confusing Stages with Objectives? While the two appear to be tied together, they are not. So when you say you have SetObjectiveDisplayed for each stage, that has NOTHING to do with actually setting each STAGE as complete. You must advance BOTH items as necessary. So, have you actually advanced to your next quest STAGE by using http://www.creationkit.com/Quest.SetStage_%28Papyrus%29?

3. Have you setup logging? This may/will allow you to see if there is a problem creating the alias (which means your quest would stop, but you would not be otherwise alerted that such was the case). You can see how to setup logging here: http://www.creationkit.com/FAQ:_My_Script_Doesn%27t_Work!#My_Script_compiles.2C_but_doesn.27t_work.21_How_can_I_debug_this.3F

(more debugging advice is available here: http://www.creationkit.com/FAQ:_My_Script_Doesn%27t_Work!
User avatar
tegan fiamengo
 
Posts: 3455
Joined: Mon Jan 29, 2007 9:53 am

Post » Mon Nov 19, 2012 2:50 am

Ignoring any of the bugs with the game/ck that are currently awaiting a fix (I do not believe you are seeing symptoms of those) then it could be a couple of things:

1. I think you may be confusing testing for a completed stage and setting the next stage as active? http://www.creationkit.com/Quest.GetStageDone_%28Papyrus%29 (that should be how you test for a COMPLETED STAGE)

2. As well or instead ... Are you confusing Stages with Objectives? While the two appear to be tied together, they are not. So when you say you have SetObjectiveDisplayed for each stage, that has NOTHING to do with actually setting each STAGE as complete. You must advance BOTH items as necessary. So, have you actually advanced to your next quest STAGE by using http://www.creationkit.com/Quest.SetStage_%28Papyrus%29?

3. Have you setup logging? This may/will allow you to see if there is a problem creating the alias (which means your quest would stop, but you would not be otherwise alerted that such was the case). You can see how to setup logging here: http://www.creationkit.com/FAQ:_My_Script_Doesn%27t_Work!#My_Script_compiles.2C_but_doesn.27t_work.21_How_can_I_debug_this.3F

(more debugging advice is available here: http://www.creationkit.com/FAQ:_My_Script_Doesn%27t_Work!

I am fairly confident that the quest stage is actually progressing, but I will doubly check using the methods you suggested. it's far past time that I enabled logging so I should definitely do that and I will report back if I find the error that way as well. I am using SetObjectiveCompleted in conjunction with SetObjectiveDisplayed, while the script attached to the 1st note alias contains the actual code to SetStage for the quest. Maybe my SetStage commands are not in order or working properly. Hmm.

Edit: And after spending the last 2 hours futzing with papyrus and the quest I am still puzzled. I inserted Debug.Notification("Stage XX") into the papyrus fragment for each stage of the quest, so that I could see in-game as the stages progressed. I tried to do the error detection methods outlined in the wiki but nothing would compile properly. Each time I tried to use the "bool Function GetStageDone(int aiStage)" or the other function syntax nothing would compile properly. I even tried to just make the simplest Function and nothing was compiling (I even copied a function example directly from the wiki, did not work). This was all inside the Creation Kit. I have Notepad++ but I wasn't using it in this instance.

I'll probably attack it again, but not today.
User avatar
Mandy Muir
 
Posts: 3307
Joined: Wed Jan 24, 2007 4:38 pm

Post » Sun Nov 18, 2012 8:41 pm

I may be reaching here, but in the stage you want the second note to be available on, add a line of code that reads:

Alias_NOTE2.GetReference().Enable()

Where NOTE2 is the ID of the note you want to be available.
User avatar
Bellismydesi
 
Posts: 3360
Joined: Sun Jun 18, 2006 7:25 am

Post » Mon Nov 19, 2012 3:45 am

I did what I should have done yesterday and set the condition to the opposite, now the condition states that if the main quest has NOT reached stage 20 to create the reference in the chest and lo, there it is in the chest when I load my save (a save that existed before the .esp was enabled, so it starts the quest anew each time). So apparently the condition is working but my quest does not appear to have stages completed, as it seems when I'm in-game.
User avatar
elliot mudd
 
Posts: 3426
Joined: Wed May 09, 2007 8:56 am

Post » Sun Nov 18, 2012 11:40 pm

Whoops, double post.
User avatar
Lifee Mccaslin
 
Posts: 3369
Joined: Fri Jun 01, 2007 1:03 am

Post » Mon Nov 19, 2012 2:24 am

Well I have spent a few more hours experimenting today, even creating a new .esp just for testing purposes. I created an alias for an Xmarker that sits in the middle of the main street in Whiterun, then aliases for two objects to be created at that Xmarker. None of the objects that I put conditions on will appear, and this happened with every condition I tried (GetIssix, GetStage, GetIsRunning), I'm wondering if it has to do with this:

http://www.creationkit.com/Quest_Alias_Tab#Fill_Type_Conditions

and if I am somehow needing to change what the condition is running on, because right now I'm leaving it as Subject. As soon as I remove the conditions, the objects are created. is anyone else willing to test this out and see if they get the same problem? I might have to reinstall the CK unless this is a known bug.

Edit: I'm currently working around the problem by just having the quest complete after the player does what the first letter asks, then the last stage of the first quest sets the stage of a second quest to 0, so that the second quest is now running. The second quest has the letter-creating alias for the second letter with no conditions, so the letter essentially appears when the first quest is completed, which is how I intended it to work anyway. I can "chain" quests like this to do the whole project, which I will probably do.
User avatar
Lalla Vu
 
Posts: 3411
Joined: Wed Jul 19, 2006 9:40 am

Post » Sun Nov 18, 2012 11:11 pm

Edit: I'm currently working around the problem by just having the quest complete after the player does what the first letter asks, then the last stage of the first quest sets the stage of a second quest to 0, so that the second quest is now running. The second quest has the letter-creating alias for the second letter with no conditions, so the letter essentially appears when the first quest is completed, which is how I intended it to work anyway. I can "chain" quests like this to do the whole project, which I will probably do.
Interestingly, I almost always do my Quest-Chains this way. I find it easier to debug or extend if each logical part of my overall-quest is in its own chunk. So you're not doing anything wrong.


As to your question ... As the article you linked states, what you run a routine on has a big effect, so this could well be your problem. The easiest way to find out - I guess - is just to change the value in the drop-down and test whether your mod then works ... Rubbish way, but probably easiest given there are so few options to try.

(though note that Subject is probably the most oft-used choice)




THOUGHT: Are you using "Location" References (for the chest in which you store the letters) or are you using "Created" References (create alias to letter in chest clicked in render window ... Or in another alias in the quest??)

If you are using LOCATION Aliases then you MIGHT be seeing one of the recently reported, might-be-might-not-be symptoms of the DIALOGUE-BUG (which, it looks like, isn't necessaily dialogue related at all).

http://www.gamesas.com/topic/1403919-dialogue-no-longer-works-thread-2-quest-bug-dialogue-scenes-etc/
http://www.gamesas.com/topic/1409022-travel-packages-to-mod-added-locations/
User avatar
Calum Campbell
 
Posts: 3574
Joined: Tue Jul 10, 2007 7:55 am

Post » Sun Nov 18, 2012 8:06 pm

Re: THOUGHT

No I am just using the created references. I do wish I knew if this was a bug or not. If I really need to I may try the options in the drop down but for now I think I'll chain quests as it actually works.
User avatar
le GraiN
 
Posts: 3436
Joined: Thu Mar 22, 2007 6:48 pm

Post » Mon Nov 19, 2012 12:17 am

One of the Run-On entries is QuestAlias ... please try that (I think it may error, though)

If that doesn't work ... then I'm trying to read this (from your link earlier) in a way that would mean you can't test for what you want to test for:

These fill types run the conditions on THE PLAYER (because there is no loaded reference available to test):
(created is included in the list of RunonPlayer stuff)


So ... can you only test for things to do with the player and never with the object you are ABOUT TO CREATE (there is no object to test on, when the conditions are checked ... only an Object AFTER the Alias has been created)




Oh, btw: I have a Story-Mod I put on hold (Dialogue Bug issues too prevelent) that uses a similar mechanism to yours. Reading One Book - and doing some stuff - gives the player another Book with more things needed to be done. Only I do the Book-Chain by using a script in the OnRead Event of the first book. (The script sets the next stage of the Quest to Active ... with its own Objects etc). That all works just fine ... With created references, just like yours ... So it is definately a problem with conditions that you are experiencing, I think.
User avatar
Scotties Hottie
 
Posts: 3406
Joined: Thu Jun 08, 2006 1:40 am


Return to V - Skyrim