Tedious Travel 0.4.1 (2019-06-08)

A curated forum for approved mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
DFIronman
Posts: 40
Joined: Sat Aug 24, 2019 12:48 am

Re: Tedious Travel 0.4.1 (2019-06-08)

Post by DFIronman » Mon Sep 02, 2019 8:29 am

It's possible to fully disabling pausing (I've done it for the next version of my mod), so you can still travel with a book open, but it requires some use of Reflection (which Tedious Travel already does a little of) and replacing a couple of Components at runtime for a more seamless experience. The changes I've had to make to those Components are so incredibly minor that maybe Interkarma will allow them into the regular build, avoiding the need to replace the Components, at least.

Also, yeah, this mod is excellent. Thanks for your work on it, jedidia. Would you be willing to add the ability to automatically stop travel once you get a disease message? I was planning on doing it through my own mod (if possible), but it's the kind of thing that should be native to yours.

jedidia
Posts: 137
Joined: Sat Sep 15, 2018 9:49 am

Re: Tedious Travel 0.4.1 (2019-06-08)

Post by jedidia » Tue Sep 03, 2019 3:47 pm

Would you be willing to add the ability to automatically stop travel once you get a disease message?
Sounds like a sensible idea, the problem will be intercepting the message. I guess it goes into a similar area like the quest hooks, which Pango provided, but It'll need some testing, which is a problem currently...

DFIronman
Posts: 40
Joined: Sat Aug 24, 2019 12:48 am

Re: Tedious Travel 0.4.1 (2019-06-08)

Post by DFIronman » Mon Sep 16, 2019 5:20 am

Code: Select all

    void FixedUpdate()
    {
            UserInterfaceWindow window = DaggerfallUI.Instance.UserInterfaceManager.TopWindow;
            
            // TODO: Make this whole thing faster.
            if (window == TediousTravelUIMenu)
            {
                LinkedList<TextLabel> textRows = (LinkedList<TextLabel>)DaggerfallUI.Instance.DaggerfallHUD.PopupText.GetFieldByName("textRows");

                if (textRows.Count > 0 && textRows.Last.Value.Text == HardStrings.youFeelSomewhatBad)
                {
                    // Need to remove the message so it doesn't keep closing the traveling
                    // window on resume.
                    textRows.RemoveLast();

                    // Close the travel window and pop up a message with our health status.
                    window.GetMethodInfo("CloseWindow").Invoke(window, null);
                    DaggerfallUI.Instance.CreateHealthStatusBox(DaggerfallUI.Instance.UserInterfaceManager.TopWindow).Show();
                }

                // Don't allow weather particles during Tedious Travel.
                if (GameManager.Instance.WeatherManager.PlayerWeather.RainParticles.activeSelf)
                    GameManager.Instance.WeatherManager.PlayerWeather.RainParticles.SetActive(false);
                else if (GameManager.Instance.WeatherManager.PlayerWeather.SnowParticles.activeSelf)
                    GameManager.Instance.WeatherManager.PlayerWeather.SnowParticles.SetActive(false);
            }
    }
This is the code I'm using in an unreleased version of my mod. It will stop the player when they get a disease message and will also hide the weather particles. This is really dirty and was written without consideration for speed, so it could use some cleaning up; but it might help you out. The ideal thing would be to add an event in DFUnity's DiseaseEffect.UpdateDisease() that gets thrown when the disease goes live and work off of that instead of trying to string-match a message.

Also, I use a class extension to help out a bit with reflection, so GetMethodInfo just returns a MethodInfo object and GetFieldByName runs GetValue() on a FieldInfo object. TediousTravelUIMenu is just TediousTravel.TediousTravel.travelUi.

jedidia
Posts: 137
Joined: Sat Sep 15, 2018 9:49 am

Re: Tedious Travel 0.4.1 (2019-06-08)

Post by jedidia » Mon Sep 16, 2019 3:05 pm

Oh, thanks! I'll take a look at it when I get around to it. Doing some itsy bitty things every once in a while, but I have to update to the new travel map ui, which will take a while...
The ideal thing would be to add an event in DFUnity's DiseaseEffect.UpdateDisease() that gets thrown when the disease goes live and work off of that instead of trying to string-match a message.
Yeah, there's not much of an event architecture in DFUnity as far as I could see so far. Not surprising when you look at where it's coming from, I wouldn't be surprised if the closest thing the original code had to events were interrupts... :lol:

ZerioctheTank
Posts: 1
Joined: Mon Sep 16, 2019 2:06 am

Re: Tedious Travel 0.4.1 (2019-06-08)

Post by ZerioctheTank » Tue Sep 17, 2019 9:56 pm

Just wanted to come on here, and say thank you for this mod. You really get the feeling on how big world really is. I absolutely love listening to Oversnow while I'm on my way to a new dungeon.

Slydk1982
Posts: 3
Joined: Thu May 30, 2019 2:07 pm

Re: Tedious Travel 0.4.1 (2019-06-08)

Post by Slydk1982 » Wed Sep 18, 2019 8:06 pm

I just updated to the new version. It still runs very laggy. It runs most stable at 10x speed.. But im also using nearly every texture mod on this site. Guessing that is what killing the performance??

User avatar
Jay_H
Posts: 2712
Joined: Tue Aug 25, 2015 1:54 am

Re: Tedious Travel 0.4.1 (2019-06-08)

Post by Jay_H » Wed Sep 18, 2019 9:02 pm

Some mods take more power than others. Realtime Reflections, Trees of Daggerfall, and Postprocess Effects take a lot.

Traveling in rain and snow also significantly increases the workload. I can run 100x during sunny time, and my computer isn't amazing.

Post Reply