Page 1 of 3

[MOD] Convenient Quest Log

Posted: Sun Mar 21, 2021 1:44 pm
by Macadaynu
Nexus Release here: https://www.nexusmods.com/daggerfallunity/mods/189

I wanted to streamline the current quest log. I find when I start to accumulate quests, I don't like scrolling through a load of text to find what I need. Also I can't tell how long it will take to travel to each quest location, without opening the fast travel pop up for each quest.

My solution is to display each quest on the main "Active Quests" page to display as follows:

{Quest Title} ({Time left to complete quest})
{Location} ({Time to travel to location})

If you want to read the quest info you can click the Quest Title.
Clicking on the Location will bring up the fast travel pop up.

Demo here:

Re: Convenient Quest Log

Posted: Sun Mar 21, 2021 5:58 pm
by Kamer
Macadaynu wrote: Sun Mar 21, 2021 1:44 pm This is my first attempt at modding, not sure how useful this will be to others, but if anyone is interested I can look into getting this available to download. :)
I assure you many people have wanted something like this for awhile. The existing quest log works but its cluttered and, for new players, hard to navigate.

Re: Convenient Quest Log

Posted: Sun Mar 21, 2021 10:15 pm
by Macadaynu
Kamer wrote: Sun Mar 21, 2021 5:58 pm
Macadaynu wrote: Sun Mar 21, 2021 1:44 pm This is my first attempt at modding, not sure how useful this will be to others, but if anyone is interested I can look into getting this available to download. :)
I assure you many people have wanted something like this for awhile. The existing quest log works but its cluttered and, for new players, hard to navigate.
Ok Thanks Kamer,

I'll get Travel Options working with it and sort a release out on Nexus mods

Re: Convenient Quest Log

Posted: Mon Mar 22, 2021 12:44 am
by Baler
Travel to location, That might give me a reason to open the quest log instead of just remember the first 5 or so characters of a location. :)

For a first attempted you're on the right path. I can see people using this mod and it getting attention in youtube videos or live streams.

Nexus Mods is for sure the way to go for more attention on it. Mod compatibility support is up to you.

Re: Convenient Quest Log

Posted: Mon Mar 22, 2021 10:39 am
by Hazelnut
Very nice.

Not sure what compatibility you need to add for Travel Options?

i assume you override the quest journal UI class to do this?

Re: Convenient Quest Log

Posted: Mon Mar 22, 2021 12:25 pm
by Macadaynu
Hazelnut wrote: Mon Mar 22, 2021 10:39 am Very nice.

Not sure what compatibility you need to add for Travel Options?

i assume you override the quest journal UI class to do this?
Thanks Hazelnut,

In terms of Travel Options, I 'm wanting to display the hours/mins to travel to the location instead of whole days like shown in the demo, nothing too difficult I don't think.

Yep I had to override the quest journal UI class to do that, using a lot of the same logic, with a few tweaks to group the quest messages by quest parent

Re: Convenient Quest Log

Posted: Mon Mar 22, 2021 7:13 pm
by Hazelnut
Do say if the base class needs modifying for you to be able to extend it for your needs. We've been changing protection levels for this as people need them, and I'd be happy to help if you need it. (please don't just copy code instead as it will cause maintenance issues for your mod)

The Travel Options calculations are approximations only based on the travel time calculator in DFU, you can see the code on my github repo. Let me know if you have any questions.

Re: Convenient Quest Log

Posted: Mon Mar 22, 2021 8:56 pm
by Macadaynu
Hazelnut wrote: Mon Mar 22, 2021 7:13 pm Do say if the base class needs modifying for you to be able to extend it for your needs. We've been changing protection levels for this as people need them, and I'd be happy to help if you need it. (please don't just copy code instead as it will cause maintenance issues for your mod)

The Travel Options calculations are approximations only based on the travel time calculator in DFU, you can see the code on my github repo. Let me know if you have any questions.
The Travel Options stuff is working now thanks.

Changing the protection levels of `DaggerfallQuestJournalWindow` would be great, as I've been coding around it up to now. I would need to be able to access quite a few fields/UI controls though as they are mostly private at the moment. So I would need the following fields to be made protected instead of private:

- lastMessageIndex
- currentMessageIndex
- questLogLabel
- messageCount
- titleLabel
- selectedEntry
- entryLineMap
- questMessages
- GetLastPlaceMentionedInMessage
- HandleClick (I need to be able to override this, so a protected virtual void?)

Also could lines 408-423 go into it's own method please? something like:

Code: Select all

        protected void HandleQuestClick(Message questMessage, Place place)
        {
            // Handle current quest clicks - ask if want to travel to last location for quest.
            Debug.Log(questMessage.ParentQuest.QuestName);
            if (place != null &&
                !string.IsNullOrEmpty(place.SiteDetails.locationName) &&
                place.SiteDetails.locationName != GameManager.Instance.PlayerGPS.CurrentLocation.Name)
            {
                findPlaceName = place.SiteDetails.locationName;
                if (DaggerfallUI.Instance.DfTravelMapWindow.CanFindPlace(place.SiteDetails.regionName, findPlaceName))
                {
                    findPlaceRegion = DaggerfallUnity.Instance.ContentReader.MapFileReader.GetRegionIndex(place.SiteDetails.regionName);
                    string entryStr = string.Format("{0} in {1} province", findPlaceName, place.SiteDetails.regionName);
                    DaggerfallMessageBox dialogBox = CreateDialogBox(entryStr, "confirmFind");
                    dialogBox.OnButtonClick += FindPlace_OnButtonClick;
                    DaggerfallUI.UIManager.PushWindow(dialogBox);
                }
            }
        }
I appreciate if this is not possible, thanks

Re: Convenient Quest Log

Posted: Thu Mar 25, 2021 5:56 pm
by Hazelnut
Hi there, before I submit the PR could you check here and review the changes I've made:

https://github.com/Interkarma/daggerfal ... e?expand=1

Have I missed anything that you need?
Does it still work properly?
(I have not tested the changes)

As soon as you say you're happy I will submit the PR.

Re: Convenient Quest Log

Posted: Thu Mar 25, 2021 7:36 pm
by imsobadatnicknames
Really cool that someone finally figured out how to do something like this, this is brilliant.
Quick question, though, how does the mod pick which timer and location to display? Afaik there are some quests that involve different timers for different events, and some where you have to go to several places.