Like many of us, I am using an empty journal entry of an existing Journal as a flag. The journal index starts at 0, and that is the value it has in my test save game. Dialog depends on the journal index being 0 and then sets the journal index to 5 through the results section to make the dialog entry do-once:

SetJournalIndex "JO_HRRules" 5

After testing, I re-load my test save without saving anything since my last load. When I open dialog, the expected response is not available. Checking the journal index through the console indicates that it is still set to the value 5 even though it was not saved and the saved game's index is 0

MSFD suggests that if one wants to preserve a journal index in a saved game that is set as opposed to added, there need be an entry for that index otherwise the value will be lost when the game is loaded. I am not even saving the game and the set journal index is preserved with my re-load. I am using an empty journal entry with an index of 5, but even if I used another index for which there is not an entry in the journal the results are the same. I have also tested by SetJournalIndex using a script and through the console with the same results.

Adding a journal (e.g. Journal "JO_HRRules" 5) is not preserved unless the game is saved after the journal entry is added. It appears that the journal index, when set, is still in memory while a saved game is loaded (and presumably overwriting it). It may be the same as when toggling boarders or collision through the console - your loaded game inherits the last setting of those flags. Closing and then re-starting Morrowind purges this data (including the journal index).

If my observations are generally true, this makes the use of SetJournalIndex very unreliable (It is also useless as a way of checking to see if the player has re-loaded as suggested by MSFD). I say 'if my observations are true' because I have been experiencing other inexplicable script errors and inconsistencies. I am wondering if my system is not suffering from heat stroke - the motherboard is a little hotter than usual at 42 Celcius, but that does not exceed the save operating temperature.

I would certainly appreciate a second opinion about this. I find the prospects of this revelation very scary. Already I have been able to generate a dialog loop because of this preserved, presumed temporary journal index.
I'm sure it didn't do that when I tested it for SfD! ohmy.gif

It does seem to be doing something very similar now though... blush.gif

I didn't get it to save an index without saving the game, but in certain circumstances it does save the journal at a nonexistent index - it's in the savegame (you can check in EE). Something else... It doesn't seem to save *any* index set by setJournalIndex (even if it's valid) unless journal is used for that ID first. It only saves the setJournalIndex ones if you've used journal, and saved the game (and I think... I'm not sure... it only saves the invalid ones if you've journalled, saved and reloaded first).

Sorry if that's a bit garbled, I didn't get much sleep last night. I'll try to get some more tests done later.

One thing I should confess... Some of the tests I based the info in SfD on were done before Bloodmoon was released, and some were not done by me personally. It could well be version-dependent.
No, I don't have a very clear idea about how you received similar results.

I have since tested with no mods loaded, alternately with Morrowind only and Morrowind with Tribunal (upon which SetJournal Index is supposed to depend). I set the journal index of an official journal (an index for which there is no record), then re-loaded my test save without saving, and used GetJournalIndex to see that the index for that quest was not 0 as it should have been, but the value I assigned it.

I have a sick feeling in my stomach.
I don't know about sick stomachs, but it's certainly giving me a throbbing headache confused.gif

SetJournalIndex does depend on an expansion - I just started testing it, starting with a MW-only installation. It doesn't matter if you have the masters selected - it depends on the version of the exe itself, not the esm. Without any expansions installed it doesn't recognise the command and throws an error. That was tested on 1.2.0722

I then added Trib to the installation (so the next tests were under 1.3.1029). It behaved in much the same as my play install (both expansions), but I'm taking my time now and I'm noticing some very weird things. If I get some time tomorrow I'll try with Bloodmoon installed, but right now I really need to sleep. I'll post more info tomorrow, but one quick note: I still haven't got it to save an index without saving the game, but I have got it to "forget" a valid index without saving. I used journal command to give a valid entry, saved, then used setJournalIndex to give an invalid entry and exited without saving - the value on reload was 0, which it shouldn't have been.

What can I say? This is obviously one huge [censored]-up. I did test it - quite thoroughly I thought - before I updated the section in SfD. I don't know how I could have got it quite that badly wrong.

I'm really, really sorry sad.gif

---

Edit: Scratch that bit about clearing the index - I haven't been able to repeat it. Could even have been a mistake that time. I was very tired.

PS All my testing is on the Australian version, in case that makes any difference.
This is a major discovery. Some of us have long had a suspicion that loading a save game into a running game does not re-initialise the engine correctly. You've proved it doesn't for Journal index, at least under these circumstances. It would be interesting (and explain much) if at least some globals shared this nasty trait at times.

I've not used <esc> Load since January and since then I have had almost no CTD and NO corrupt save games.

I've only had gut-instinct plus my own experience to back this up, coupled with a few other people agreeing it fits their experience too. You seem to have garnered proof.

Morrowind does NOT reset the game environment correctly on anything other than a load from the desktop.

In which case it needs to be said:-
Do NOT use Quick-load.
Do Not use <esc> Load: Quit back to desktop a reload from scratch. (A pain if you use MWSE so I'm told.)

Your discovery explains many incidents of odd situations people report with quests.
For example: load a game; get a vital, unique, journal entry; get killed; reload; journal entry still set; quest breaks.
QUOTE(Symon69 @ Jul 14 2008, 02:17 PM) *
Do Not use <esc> Load: Quit back to desktop a reload from scratch. (A pain if you use MWSE so I'm told.)

I use MWSE quite a bit and haven't noticed any real difference loading it versus not loading it.

I wonder if global variables keep their settings or are they reset to the default on a load? If they're not reset, could that be a way to tell if a game was reloaded?
QUOTE(Symon69 @ Jul 15 2008, 04:17 AM) *
Morrowind does NOT reset the game environment correctly on anything other than a load from the desktop.

Sorry, but that's exactly what I was doing. I always quit to desktop, then wait a little, then restart the game when I'm testing.

I'm sure you're right - I know loading a save into a running game is bad news for me too (I used to do it when I was playing, but stopped because of CTDs) - but that's not the issue here. Would that it was. sad.gif
@Melian: Do not blame yourself for the oversight - I'm just grateful to have some else investigating this or I might have thought I was crazy. In all the years of playing and modding I never suspected this behavior. As for your testing it, I have miss-interpreted the results of my own tests before (again why I am asking for fresh eyes on this problem). There are many variables that can confound the results of our tests, so I am always ready to be proven wrong. When it happens, the way I look at it is we know more about the engine than we did before.

You are correct about testing with a Morrowind-only install. In my haste, I carelessly tested with 'Morrowind' only by un-checking Tribunal. When I tested again with my true Morrowind-only installation I received the errors to my console command that you described.

@Symon and Jac: I did not honestly expect any problems, but your speculations made me wonder. I tested a few globals (Day, DaysPassed and FreedSlavesCounter) also player->SetReputation, Fargoth->SetDisposition and Fargoth->SetLuck. Without saving I reloaded my tester and none of the values I set through the console were preserved. So I would say that globals are reset to the saved values when the game is loaded.

When I am testing, I am routinely closing the game before reloading because there is usually something that I have to fix through the construction set. When I used to play, I thought little of reloading in the same session. Considering the damage that can be done and the time it takes to correct it, it is worth the short pause in one's gaming to close Morrowind before loading a saved game.
OK I've done more testing. I'll try to present my results clearly here, but if anyone wants to check (or test the same way on a different system) I've uploaded the esps that were active (a basic quick char gen and my test mod) with my beta comment file here.

All my tests are on the Australian version. All tests were perfomed on fresh installs. The only mods running were a quick char gen mod and my journal test mod.

Testing with 1.2.0722 (no expansions) only confirmed that setJournalIndex requires an expansion (command not recognised).

Testing with 1.3.1029 (Tribunal) and 1.6.1820 (both expansions) produced the same results, as follows:
> Using setJournalIndex will not save the journal index in the savegame unless the journal command has been used previously for that journal ID. This applies whether or not the index is associated with a valid entry.
> Once the journal command has been used for a particular journal ID, any index given by setJournalIndex will be saved in the savegame, whether or not it's associated with a valid entry.
> Exit without saving will not save any change to the journal index, regardless of how it's given or what has gone before - at least not reliably and not usually (might have happened once, not sure).

PS If anyone wants to check a journal index in a save with EE and doesn't know how - here's a pic.

---

Again, I'm really sorry for the misinformation. I'm thinking it's about time to start working seriously on version 9.1 of SfD - thoughts, anyone?

---

Edit: Missed your last post, Cyrano. I'm glad you're not angry with me, but right now I'm angry with myself! blush.gif
I would look into using a global variable to determine if a game was reloaded or not. You could initially have it set to zero, then set it to one using a start script. That way you could check its state (0 or 1) to determine if a game was loaded without exiting and adjust as necessary.
Jac - Yes, of course you can use a startscript to detect a reload (or there are other things you can use, like setScale), but in some cases it would be nice to have a simpler way to detect it from dialogue, and for a long time we thought we had one. On the positive side, setJournalIndex might be more useful than we thought for storing information for use in dialogue (provided it's only used after journal has been used) - IF there aren't any more oddities to discover. We live in hope. rolleyes.gif
Well, you could always use a filter to determine if a global variable has been set or not. heee.gif

Anyways, there's nothing simple with the Morrowind engine as I've slowly discovering. unsure.gif
@Melian: I have re-performed many of your tests (as I understand them) and a few others. In doing so I have verified all but the very last result. I am using the US version so perhaps that is the difference. However as we all understand, when you release a mod publicly it does not matter that it works in some instances and not others. If it is unreliable, it should not be used at all.

My tests are as follows (Morrowind US-version w/Tribunal functions). No mods loaded so tested with official journal. All re-loads were without exiting Morrowind (what would be the point of the tests after all - except to see exactly what records are saved during a save):

Journal "HR_Courier" 10 (existing index)
w/o save and reload: GetJournalIndex "HR Courier" returns 0 - expected
w/ save and reload: GetJournalIndex "HR Courier" returns 10 - expected

Journal "HR_Courier" 15 (non-existent index)
w/o save and reload: GetJournalIndex "HR Courier" returns 0 - expected
w/ save and reload: GetJournalIndex "HR Courier" returns 15 - unexpected, but reasonable

SetJournalIndex "HR_Courier" 10 (existing index)
w/o save and reload: GetJournalIndex "HR Courier" returns 10 - freaking me out
w/ save and reload: GetJournalIndex "HR Courier" returns 10 - disquieting

SetJournalIndex "HR_Courier" 15 (non-existent index)
w/o save and reload: GetJournalIndex "HR Courier" returns 15 - freaking me out
w/ save and reload: GetJournalIndex "HR Courier" returns 15 - disquieting

Journal "HR_Courier" 10 (existing index)
SetJournalIndex "HR_Courier" 20 (existing index)
w/o save and reload: GetJournalIndex "HR Courier" returns 0 - as it should be
w/ save and reload: GetJournalIndex "HR Courier" returns 20 - expected

Journal "HR_Courier" 10 (existing index)
SetJournalIndex "HR_Courier" 35 (non-existent index)
w/o save and reload: GetJournalIndex "HR Courier" returns 0 - as it should be
w/ save and reload: GetJournalIndex "HR Courier" returns 35 - unexpected

Journal "HR_Courier" 10 (existing index)
Save and continue
SetJournalIndex "HR_Courier" 20 (existing index)
w/o save and reload: GetJournalIndex "HR Courier" returns 10 - as it should be
w/ save and reload: GetJournalIndex "HR Courier" returns 20 - expected

Journal "HR_Courier" 10 (existing index)
Save and continue
SetJournalIndex "HR_Courier" 35 (non-existent index)
w/o save and reload: GetJournalIndex "HR Courier" returns 10 - as it should be
w/ save and reload: GetJournalIndex "HR Courier" returns 35 - unexpected

The only serious problem here is that if Journal is not used to establish the journal index before SetJournalIndex is used, the value assigned using SetJournalIndex is preserved on a re-load without saving. That was exactly the circumstance that I had stumbled into the other day. I can live with that because I can work around that.

The other thing we notice (and this may already be known to many) is that there is no difference between Journal and SetJournalIndex when using a non-existent index (except in the case above - Journal does not preserved the value after a re-load without saving).

So it appears that I overreacted because I did not fully recognize all of the variables affecting the results of my tests (where have I written that before). I thank all of you for helping me better understand the issue - I (we) know more than I (we) did before. I am feeling much better now. smile.gif

Edit: typo
Right, I think I understand what is being reported now. The game engine is preserving the effects of SetJournalIndex, even when not saving, quiting to desktop and reloading from before the SetJournalIndex?
But Journal is not preserved in this manner?

That's
a. insane
b. explains much.

Please tell me I'm misreading this. You've proved the game is saving state information it should be discarding?
That's horrible!
Not quite. The only time the journal index setting is preserved without first saving is if SetJournalIndex is used before any Journal entries for that particular journal. This happens if a previous save is loaded while the current game (the one that SetJournalIndex was called) is running, but not saved. The information is dumped if Morrowind is quit and then restarted to load the save.

It looks like this:

Load tester
SetJournalIndex "HR_Courier" 10
Do not save
Load tester
GetJournalIndex "HR Courier" returns 10 - this is bad

Load tester
SetJournalIndex "HR_Courier" 10
Do not save
Quit Morrowind
Load Morrowind
Load tester
GetJournalIndex "HR Courier" returns 0 - this is good

If that datum was preserved after quitting Morrowind that would be more than horrible, that would be a virus! ohmy.gif
That is what I thought the first time. A load without quiting to desktop. It's just that Melian seemed to be saying she was getting these effects EVEN with a quit to desktop.
As I thought, these are proven Bad Practice.
Phew!
Nicely proven!
I didn't know that journal could be used for a nonexistent index. I know I tested that once and it didn't work, but I tried again just now and it works - I even tried from script as well as dialogue just to be sure. confused.gif

Cyrano - I just tried setJournalIndex without journal first, and reloaded without quitting to desktop - I didn't do that before - and yes it's persistent. It's not stored in the save but it isn't cleared on reload.

So, yeah, Cyrano is exactly right and I'm just befuddled. blush.gif

I tend to think that anyone who doesn't quit to desktop before loading a save is just asking for trouble, so that part doesn't bother me all that much, but I think I'd like to update SfD soon anyway. There are some other bugs in it as well.

Sorry everyone - I was so sure I tested setJournalIndex thoroughly, but now I can't even reproduce the results I got before! confused.gif
@Melian: Again, don't beat yourself up over this. It were your posts that helped me realize that the source of my grief was using SetJournalIndex before the journal have been given a legitimate entry. Certainly we can avoid doing that, so I am much relieved about the situation.
No worries. And thank you for the information! smile.gif

I just can't understand how nobody noticed this before! Kind of spooky, really...
I agree. You've both done everyone a massive service in quantifying this bug. At last some evidence to back a gut feeling. No longer will we have to wave chicken bones at bunnies in an attempt to ward of game corruption. (grin) No more suggestions people avoid things that cannot possibly have an effect on the game.

I'm a little surprised there is less comment about something this significant but I suppose this is always going to be the least frequented forum.
Submit a Thread