Get Journal Entry.

Post » Tue Dec 29, 2009 2:41 pm

Journal Entry "MV_DeadTaxman" can have one of it's topics retrieved using GetJournalIndex.
I need to be able to figure out which indexes have been obtained for a given topic. So there are about 6-7 different results
under that one journal entry..how can I check if they currently have a specific sub-journal entry?
User avatar
Mrs shelly Sugarplum
 
Posts: 3440
Joined: Thu Jun 15, 2006 2:16 am

Post » Tue Dec 29, 2009 12:03 pm

In general I want to do different things depending on journal entries. So depending on the status of the dead taxman (what choices the player made) I want to do different things..how can I look and see which individual journal entries that the player has for the
taxman quest for example?
User avatar
Stu Clarke
 
Posts: 3326
Joined: Fri Jun 22, 2007 1:45 pm

Post » Tue Dec 29, 2009 5:30 am

In general I want to do different things depending on journal entries. So depending on the status of the dead taxman (what choices the player made) I want to do different things..how can I look and see which individual journal entries that the player has for the
taxman quest for example?


Edit, I could get the most recent entry but I am worried that I won't get the correct one. Some people make different choices during a quest and may not have done part of it, I want to take that into account.
User avatar
Beast Attire
 
Posts: 3456
Joined: Tue Oct 09, 2007 5:33 am

Post » Tue Dec 29, 2009 6:58 am

I don't believe it's possible to test for whether a specific journal index has been given in a journal topic.

You could go around it by setting a variable along with the wanted journal index. The hindrance of this (when used in a vanilla quest) is that you still cannot check whether the player had gained that journal index before having the mod loaded.
User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Tue Dec 29, 2009 8:08 pm

I think I am just going to make more general news item in this situation. I might do the variable thing if it's something I really need it for but not on these smaller quests. Thanks for the feedback.
Also I want it to be retroactive, so that might also pose me an issue. I will find some way around it. Thanks again for the feedback.
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am

Post » Tue Dec 29, 2009 6:58 am

No problem. :)

I think the cause why you can't check for specific indices is that Morrowind stores the player's journal as a text document rather than an array of entries and dates. This shows when you remove a previously loaded mod from your game and yet the journal entries that were added by that mod remain in your journal.
User avatar
Lawrence Armijo
 
Posts: 3446
Joined: Thu Sep 27, 2007 7:12 pm

Post » Tue Dec 29, 2009 9:07 pm

I don't believe it's possible to test for whether a specific journal index has been given in a journal topic.

if ( GetJournalIndex "journal_id" == < > >= <= "index #" ).
User avatar
Stephanie Nieves
 
Posts: 3407
Joined: Mon Apr 02, 2007 10:52 pm

Post » Tue Dec 29, 2009 7:53 am

Yes but that only gets the last one. Sometimes the player might have missed a journal entry and/or gotten a different one. I want to know whether they completed a specific step in a quest so I can do certain things based off of that. For example, Processus quest in Seyda Neen. You find the body. One step in the quest is to visit his girlfriend and give her back the ring, among other optional options. If you just do the entire quest you acn't use that function to find out if there was a specific journal entry. Giving you less power when creating conditionals for quests.
I am digging around for Alternatives however.
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Tue Dec 29, 2009 8:55 pm

GetJournalIndex looks for a specific journal index, not just the last one. What it does is it tests the current journal index against the one you're testing for. It's true that it won't test to see if the player missed a journal index, for that you'll need to use variables to set whenever a player completes a part of the quest.
User avatar
Adam Porter
 
Posts: 3532
Joined: Sat Jun 02, 2007 10:47 am

Post » Tue Dec 29, 2009 5:32 am

After a bit of testing, this is what I've found:

GetJournalIndex, "A1_Dreams" returns the current journal index for that topic. This is 0 by default.
SetJournalIndex, "A1_Dreams", 5 sets the journal index to 5, regardless of its current value.
Journal, "A1_Dreams", 5 sets the journal index to 5 only if its current value is below 5.


So in a test scenario, after starting a new game:

GetJournalIndex, "A1_Dreams";Returns 0Journal, "A1_Dreams", 10GetJournalIndex, "A1_Dreams";Returns 10Journal, "A1_Dreams", 5GetJournalIndex, "A1_Dreams";Returns 10SetJournalIndex, "A1_Dreams", 3GetJournalIndex, "A1_Dreams";Returns 3;Even though there is no entry at index 3 :)

Saving, loading, or restarting the game doesn't seem to affect the results for me at all, contrary to the behavior descriped in the Morrowind Scripting for Dummies.


So GetJournalIndex either returns the highest index in the topic, or the last one it was set to. In neither case can it be used for checking for specific journal entries. :wacko:
User avatar
Mandi Norton
 
Posts: 3451
Joined: Tue Jan 30, 2007 2:43 pm

Post » Tue Dec 29, 2009 3:23 pm

Very odd results. So the main question comes down to whether this function can in reality test for a specific journal entry. I am going to run a few test cases in a few days. I am going to try using the tax collector quest and do a variety of tests. I need to see
what situations of this function return what. It seems kind of add behaviour, but in reality if it's able to do that reliably then it would be immensely helpful. Once I play around wiht it some more here I will post the results here.
User avatar
Nana Samboy
 
Posts: 3424
Joined: Thu Sep 14, 2006 4:29 pm

Post » Tue Dec 29, 2009 12:26 pm

SetJournalIndex does just that: it sets a journal's index to whatever number you tell it to. There doesn't have to be a journal entry there for it to work. Journal, on the other hands, needs a valid journal entry for it to work. GetJournalIndex is great for testing: it can tell if a journal index is a specific number, if it's less than or equal to that number, if it's less than but not equal, if it's greater than or equal to, if it's greater than, or if it's not equal to. I'm starting to think that you guys are over complicating this.
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am

Post » Tue Dec 29, 2009 5:00 pm

Either way, I believe in the first post businessman332211 asked about a way to check for specific journal info (not only the highest index). GetJournalIndex won't do that, as it only returns the highest index in a journal topic. It's great for its own purposes, but it still cannot do that.

Sorry if I'm splitting hairs here, but I think there is a significant difference between those two behaviors and I wanted to make that clear. :)
User avatar
chloe hampson
 
Posts: 3493
Joined: Sun Jun 25, 2006 12:15 pm

Post » Tue Dec 29, 2009 7:44 am

GetJournalIndex will return the current journal index, not necessarily the highest because SetJournalIndex can be used to set a journal index to any number, regardless of whether or not it's an actual journal index. Journal, on the other hand, needs an index that has already been added for it to be used. So, GetJournalIndex will not always return the highest index number.
User avatar
NeverStopThe
 
Posts: 3405
Joined: Tue Mar 27, 2007 11:25 pm

Post » Tue Dec 29, 2009 9:37 pm

That's true, but unfortunately that doesn't help with the current situation if the quest needs to remain retroactive. If the developers used SetJournalIndex, or better yet, a local variable to update with the different quest stages as they happened then it would be fine, but no such in-game records exist in the vanilla game that would indicate what choices the player made while doing this particular quest.

So I think it comes down to either sacrificing functionality or retroactivity, in a manner of speaking. :rolleyes:
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am


Return to III - Morrowind