Journal update after multiple other journal updates

3 posts / 0 new
Last post
vaelta's picture
vaelta
Joined:
2023-12-22 11:05
Last seen:
7 months 1 week ago

Hello.

I understand that this isn't really a place for general modding guidance, but I'm afraid I don't know where to go for that. People keep talking about Discord and I have no idea how to use that (and honestly, loading it up and trying to figure it out made me feel very old indeed..).

So my hopefully quite simple modding question is: How can I have a journal update happen only when x number of other separate journal updates have happened?

For example:

quest1 == 100

quest2 == 100

quest3 == 100

etc

 

And when all of them have hit the criteria, a "master" quest will get updated.

I am asking because I am basically doing an elaborate (and hopefully interesting) fetch quest, and I just want a simple way of logging it as complete once all items have been handed over.

Putting it in a simple script along the lines of this doesn't seem to work at all:

Begin val_collect

    if ( val_quest1 == 100 )
    if ( val_quest2 == 100 )
        journal "val_masterquest" 90
    endif
    endif

End val_collect

 

It seems completely crazy to me that Morrowind's scripting language didn't have, you know, simple things like "and" operators etc!

Any help much appreciated. And if there's a better place (that isn't Discord) to ask such questions I'd love to know that too!

Ronik's picture
Ronik
Senior DeveloperQuest Reviewer
Joined:
2023-04-16 18:05
Last seen:
4 hours 37 min ago

Hi, your script example is pretty much correct in its approach, but it's missing the GetJournalIndex command.

This should work:

Begin val_collect

    if ( GetJournalIndex val_quest1 == 100 )
    if ( GetJournalIndex val_quest2 == 100 )
        journal "val_masterquest" 90
    endif
    endif

End val_collect

vaelta's picture
vaelta
Joined:
2023-12-22 11:05
Last seen:
7 months 1 week ago

Brilliant. I should look through a list of the functions really, as I do know that's available..

I subsequently also found that Morrowind only allows ten nested "if" statements. So I ended up having to make further scripts that did the same thing on the "sub quests" to get to the final eventual result. Seriously, if only they had initially added in logic for "ands" "ors" etc etc..

Thanks Ronik. And, do you know of any non-Discord place to ask general modding questions?