spectremk13 Posted June 12, 2012 Share Posted June 12, 2012 Decided to get in to modding Skyrim, and I am on my first attempt at adding in a quest, but I have become stuck on getting a quest stage to enable a chest placed in the world. My process looks like this... I have the chest created and placed in a location, and set to Initially Disable. Created a reference alias forced to the specific reference of the placed chest, with Allow Disabled checked.Picking up a note sets the stage of the quest to 20, and under Quest Stages at index 20, I have put the line "Alias_chestAlias.GetReference().Enable()" where chestAlias is the name of the chest object alias set previously. After advancing the quest to stage 20 in game, the chest is still disabled. Would anyone able to point me in the right direction as to where I went wrong? Link to comment Share on other sites More sharing options...
Hangman4358 Posted June 12, 2012 Share Posted June 12, 2012 I have had this problem too, but it is easy to fix. This, btw also applies if your quest objective markers are not working. You need to have all your aliases filled when the quest starts. The most likely problem is that you have some alias which is not getting filled. Otherwise I see no problem with it, If you are not getting a compiling error. I would have suggested you check the chest aliase has allow disabled checked but you already covered this step. I ran into a similar problem when My main quest giver NPC was not in the world and he of course had an alias which was not getting filled so it broke everything to do with aliases. The easiest thing to do is make all your aliases marked as optional. Then test it. If it works you know that one of your aliases is not filling. Then set set each one back to not optional one at a time. Then once it no longer works you know which one is broken. This of course only works if setting them all to optional makes it work. Link to comment Share on other sites More sharing options...
spectremk13 Posted June 12, 2012 Author Share Posted June 12, 2012 (edited) I attempted to check the alias optional (the quest currently only has which is for chest), and nothing changed. I am assuming I am doing something wrong with aliases; I originally attempted to start with the chest enabled, but not have the loot placed in the chest until the correct quest stage triggered (using the Create Reference Object to a custom item, and create it in the chest alias) in a similar manner to the above order, but had no luck either. Edited June 12, 2012 by spectremk13 Link to comment Share on other sites More sharing options...
Hangman4358 Posted June 13, 2012 Share Posted June 13, 2012 ok, I am a little confused about how you set this up. So let me see if I understand this correctly. 1. you have a note2. you read the note and the quest starts3. the chest enables and you try and find the chest. This sounds like a treasure hunt from the looks of it. So here is what I would do. 1. you make a note2. you make the chest with loot in it.3. You build the quest. For step 3 I would set up 2 aliases, 1 the note, 2 the chest.Then I would set up quest stages0, the begining, nothing happens here10, the player reads the note and is told to find the chest20, the player has found the chest and finishes the quest. For the note alias I would add a script to the alias, something like: If MyQuest.GetStage() < 10 Event OnRead() MyQuest.setstage(10) endEvent EndIf Of course you have to add the property to match your quest and such Then In quest stage 10 I would enable the chest. Then on the chest I would put a script that sets the quest stage to 20 when you interact with the chest. Also, if that does not work, try setting up a clean save. In the main menu, without loading a save, open up the console with "~" and type: coc TheCellNameOfWhereTheQuestIs Then it would also be good to set god mode( just type: tgm into the consolebecause you will be level one again and it is a pain to die why testing a quest. Link to comment Share on other sites More sharing options...
spectremk13 Posted June 13, 2012 Author Share Posted June 13, 2012 It is in fact a treasure hunt. Here's a more detailed breakdown of what I have done in the order I created them 1. Note12. Note23. MyChest4. MyQuest5. Alias to the chest The script to advance the quest stages are placed on the note items themselves, and trigger when picked up. Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer) if (newContainer == Game.GetPlayer()) MyQuesst.SetStage(x) ; 20 on the Note1, 40 on the Note2 endif EndEvent Quest Stages0 - nothing20 - Picked up the note, find chest <- Chest should enable at this stage40 - Found the chest, looting the note completes the actual quest What I intend to happen is to have the player1. Find Note1 in the world, which starts the quest2. Find the chest, take loot, Note2 in the chest ends the quest Of course where it all falls apart is the chest's failure to enable. The steps I have taken to try to get it to enable are:1. Create MyChestAlias pointing to the chest inside FortFellhammer01. It has Allow Disabled checked so it can see MyChest, which is set to be Initially Disabled2. added "Alias_MyChestAlias.GetReference().Enable()" to Papyrus fragments for Stage 20, so the entire section looks like this: SetObjectiveDisplayed(20) Alias_MyChestAlias.GetReference().Enable() Hopefully that is a bit clearer than my last post. As a side note, I am using my main save game to test it. Would it be better as you said to start a new game? Link to comment Share on other sites More sharing options...
Hangman4358 Posted June 13, 2012 Share Posted June 13, 2012 That is really strange. From the looks of it it should work. I'm sorry I am of no further help. Hopefully someone with more knowledge comes by and can shed some light on this. Link to comment Share on other sites More sharing options...
steve40 Posted June 13, 2012 Share Posted June 13, 2012 For the note alias I would add a script to the alias, something like: If MyQuest.GetStage() < 10 Event OnRead() MyQuest.setstage(10) endEvent EndIf Event OnRead() If MyQuest.GetStage() < 10 MyQuest.setstage(10) EndIf endEvent :biggrin: Link to comment Share on other sites More sharing options...
steve40 Posted June 13, 2012 Share Posted June 13, 2012 (edited) @ spectremk13 I'm not a quest guru (Gasti89 is probaby THE quest guru here)... Anyway, just as a test, could you try adding this script onto your Note1, and setting the property "myChest" to point to your actual chest reference (not the alias). Then see if the script will enable the chest, rather than doing it via the quest alias. ObjectReference Property myChest auto Event OnContainerChanged(ObjectReference newContainer, ObjectReference oldContainer) if (newContainer == Game.GetPlayer()) MyQuest.SetStage(20) ; 20 on the Note1, 40 on the Note2 myChest.enable() endif EndEvent Edited June 15, 2012 by steve40 Link to comment Share on other sites More sharing options...
gasti89 Posted June 13, 2012 Share Posted June 13, 2012 Thanks Steve40 for the "quest guru" but that's not true :P Well, since what you wrote seems ok, it could be that something f****ed up when you were working on the quest (from my experience, fragments are very instable. I had to delete a quest with 50 dialogues and a total of 135 users -.-). So maybe rewriting the quest from scratch would help. Also, it could be that the chest is enabling but it's not rendering (known problem of the Skyrim engine). So before anything else, double click on the chest reference and tick "is full LOD". Then test, if the chest appears, than it's just a bug. Remember to untick it before the release (it can cause performance issues) because it seems to be a problem only for the mod creator (users will always find the chest). If it doesn't help, here's what i would do: STAGES - 0 ---> tick "startup stage". Tick the quest as "Start Game Enabled". Nothing else - 10 ---> player has found the 1st note SetObjectiveDisplayed(10) Alias_myChest.GetReference().Enable() Setting the objective will effectively pop up the "quest started" message. To make things more exiting, just don't give the quest target to the objective. - 20 ---> player has opened the chest and picked up the note ---> tick "complete quest" SetObjectiveCompleted(10) nextQuest.Start() Stop() Objective completed is self explanatory. nextQuest must be defined in properties before writing it (Quest property pointing to the next quest), use it only if you want another quest to start after this). Stop() will definitely stop the quest, release every alias and ensure nothing will be binded to this already done quest. ALIASES: - Note1 ---> specific reference, select the note in the world. IMPORTANT: Attach the script to the alias! Not to the object itself! ---> create a new script on the note1 alias, then "edit source" ---> i'd prefer using OnRead() instead of OnContainerChanged(), since i find more immersive to set the stage when the player actually opens the note Scriptname NoteReadSCR Extends ReferenceAlias import game import debug Quest Property myQuest auto Int Property StageToSet auto Int Property PreReqStage auto Event OnRead() if myQuest.GetStage() == PreReqStage myQuest.SetStage(StageToSet) EndIf EndEvent Now fill the properties with stage 0, stage 10 and the quest. - myChest ---> specific reference, select the chest in the world ---> tick "allow disabled" - Note2 ---> create reference to object, select "in", select "myChest" ---> IMPORTANT: this alias must come AFTER the Chest alias. ---> Attach the above script to this note too, just change the properties to stage 10 for prereq and 20 for stagetoset. OBJECTIVES - 10 ---> find the chest FINAL NOTES - When testing, always use GetStage via console to check if the quest advances. When you read the 1st note, check the stage. If it's still 0, something's wrong. - I suggest to always work with aliases. They allow you to change the reference they are attached to without having to move scripts. Link to comment Share on other sites More sharing options...
steve40 Posted June 13, 2012 Share Posted June 13, 2012 ^^^^^ :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts