Making a quest.

Post » Sat May 28, 2011 8:22 am

I'm making a lot of books/notes that, when read, will update the player's journal. I'm setting up a sort of mystery quest and I only want the journal to update if the player reads the notes in order. The way I have it right now, the journal can update even if the player reads note 2 before note 1. If that happens, the journal wont make any sense (i.e if they find note 2 first, their journal will start off saying "I have found another note..." when it is actually the first one the player has found.). Is there a way to prevent that, or perhaps make it to where note 2 will only spawn if they have read note 1?
User avatar
GPMG
 
Posts: 3507
Joined: Sat Sep 15, 2007 10:55 am

Post » Sat May 28, 2011 2:49 am

The easiest way, and the more realistic for a quest, is to just make the note Disabled until the proper Journal Index has been met. This will avoid any possibility of confusion/conflict because you won't be able to accidentally read the note in any way before necessary.
Change the variable of 10 for the proper index you need.
Begin Script_name		if ( GetDisabled == 0 )	if ( GetJournalIndex Journal_name < 10 )		Disable	endifelseif ( GetDisabled == 1 )	if ( GetJournalIndex Journal_name >= 10 )		Enable	endifendif	end

User avatar
Joey Avelar
 
Posts: 3370
Joined: Sat Aug 11, 2007 11:11 am

Post » Fri May 27, 2011 6:30 pm

So then my final script should look like the following:

Begin Script_name		if ( GetDisabled == 0 )	if ( GetJournalIndex "Journal_name" < 10 )		Disable	endifelseif ( GetDisabled == 1 )	if ( GetJournalIndex "Journal_name" >= 10 )		Enable	endifendifshort done        if ( done == 1 )                return        endif        if ( onactivate == 1 )		Journal "Journal_name" 20		set done to 1		activate	endifend


This will cause the book with this script to spawn upon the player's reading of note #1 and then update the journal accordingly. Is this correct or am I over complicating it?
User avatar
Jesus Lopez
 
Posts: 3508
Joined: Thu Aug 16, 2007 10:16 pm

Post » Fri May 27, 2011 9:30 pm

You haven't said if the notes can be found in any order at any time

So I'll make an assumption that they can be found at any time in any order

I had a similar style quest where 3 similar things needed to be done however the player could choose to do them in any order which made me wonder how to update the journal correctly

I ended up looking at how the Vivec informants quests

There is a main quest - A1_V_VivecInformants where you are told to go talk to 3 people

Then there are 3 sub-quests 1 for each person

A1_10_MehraMilo
A1_6_AddhiranirrInformant
A1_7HuleeyaInformant

When you complete each of these you go back to the spymaster who in dialogue is looking for each of these subquests to be achieved before closing the main quest.

You could choose to do something similar with your quest in that no matter how many notes the player finds they will not make sense until you get the complete set

Say you have 4 notes to find - ideally then you can have a main Journal entry eg MY_PaperChase then a separate one for each of the notes eg

MY_PaperChasenote1
MY_PaperChasenote2
MY_PaperChasenote3
MY_PaperChasenote4

For Note 1 you attach a script similar to the one attached to the book Pilgrims Path

Begin MY_Note1if [GetJournalIndex MY_PaperChasenote1 >=1]ReturnEndifIf [Onactivate == 1]   Journal MY_PaperChasenote1 1   ActivateEndifEnd


For note 2 it checks to see if note 1 has been found first

Begin MY_Note2if [GetJournalIndex MY_PaperChasenote2 >=1]ReturnEndifIf [Onactivate == 1]    if [GetJournalIndex MY_PaperChasenote1 <1]        MessageBox "This note makes no sense to me as yet."    Else       Journal MY_PaperChasenote2 1       Activate    endifendifEnd


So what we have done here is not allow your journal to update until Note 1 has been found.

Note 3 and 4 would follow a similar pattern however for Note 4 once it has checked you have all the correct notes it can now update your main quest journal entry with the message you wanted.

At least that's one way of doing it :)

All the best with the quest

Illy
User avatar
Farrah Barry
 
Posts: 3523
Joined: Mon Dec 04, 2006 4:00 pm


Return to III - Morrowind