Jump to content

Help with quest


Recommended Posts

So, I'm very noob when it comes to Oblivion modding.
I'm almost finished creating my first mod, but only one key component is missing.
Since the setting of the mod is a dungeon where another quest takes place (Crowhaven), I would like the changes of my mod to kick in after ''Origins of the Gray Prince'' has been completed, like a week after it or so.
How do I do it and how complicated is it?

Link to comment
Share on other sites

Depends on how you start your quest, but I would just make a simple if statement that checks if the quest is complete in your quest script. If the quest isn't, then you stop the quest script with a return statement

Another option is to have the Gray Prince quest to start your quest, that way you don't have a quest script running all the time. A bit less self contained however

Link to comment
Share on other sites

You should create a quest script and combine the GetStageDone with the GameDaysPassed conditions.

 

Don't forget to add the doOnce function so your scriptstops working once it completed its job.

 

Do you want mroe precisions?

Edited by Oblivionaddicted
Link to comment
Share on other sites

What exactly are your changes, that you have done so far? Depending on what they are, it might be easier than how Kat and Oblivionaddicted recommended (Except the week later part, that one is only possible with scripting).

Edited by mixxa77
Link to comment
Share on other sites

Pretty much I would like for the dungeon cells to remain the same as the vanilla ones throughout Agronak's quest but, once you complete it, have the cell changes kick either immediately or after a set amount of time.

More or less like it happens in normal game with Bruma Mages Guild that changes completely after a set point and never reverts.

Link to comment
Share on other sites

One way I can think of how to achieve this is the following:

I assume all the new items, statics and NPCs you placed have the "Initially disabled" option checked? They have to, otherwise they would be available immediatly.

Place a new xmarker in the cell and make it's "reference editor ID" something like "MyModMasterMarker", also set the "Initially disabled" flag for that one.

All your newly placed items, statics and NPCs have the option to define an "Enable Parent" when you double click them. Do that and choose your "MyModMasterMarker" for all of them.

Now create a new quest using the "Q" button at the top bar of the CS.

Name it something like "MyModQuestName", the "Start game enabled" flag is important, check that flag (It should already be checked by default).

Now open the script editor, using the pencil button next to the "Q" button.

Your new script should look something like this:

Scriptname MyModScriptName

;Everything after a ; is a comment and will not be read by the game.

Begin GameMode ;The following code in this block will be run every 5 seconds by default, as long as you are not in a menu (like inventory, save/load, dialogue, etc.)

	if getstage MS52 >= 100 ;Checks if the player has completed (-> Stage 100 or above) "Origin of the Gray Prince (-> Quest "MS52"), if not, then the code between if and endif will be skipped.

	MyMasterMarker.enable ;This will enable your master marker and all it's linked items, statics and NPCs.
	stopquest MyModQuestName ;This will stop your newly created quest and with it also it's script once your stuff has been enabled, because after your stuff has been enabled, this script and quest are no longer needed.

	endif ;Closes the if statement.

End ;Closes the Begin GameMode block.

Change the script type to "Quest script", using a button somewhere in that menu (Otherwise it can't be attached to the quest you created before).

Save and choose this script for your newly created quest (You may have to close and open the quest window again before it recognizes the new script in the drop down menu where you choose the script).

(Don't worry about using a quest for all of this, it only serves as a way for the script to run and will not bother the player in his journal, because your newly created quest has no own "stages" defined.)



Doing it delayed is possible as well, using the global value GameDay and some math inside the script, but I will leave experimenting with that to you.

Edited by mixxa77
Link to comment
Share on other sites

  • Recently Browsing   0 members

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