[MOD] l3lessed Enchanted Compass

A curated forum for compatible and maintained 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.
Post Reply
l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Almost there. Just pounding out the last of the load bugs. Need to sort these things out anyways for the city builder mod, as that mod will require tons of data storage and reloading.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Pushed updates. It should be in playable state. Tested it for a little. Will post the large update notes later. Report any bugs please.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Warning, this is still bugged and largely broken over any long play session.

However, I've hammered out all the current bugs on my end that are causing crashes while exploring daggerfall. However, I have on error left that is tied to the load sequence of data when loading a game. I keep getting null errors on loading a game after already starting/loading a new game. I can load any save from the main menu, but the moment I try to load a second save, the mod starts running into null errors and loses objects and properties.

Once I can figure out why my Dictionaries and other objects/properties are disappearing on loading a game from an already started/loaded game, it will be ready.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

OMG, Finally have a stable version for everyone I think. I'll push it by the end of today with a video showing how all the new features and how it works.

I also did a ton more play testing in the open world, running around, and I believe I fixed all the different bugs with camera positioning and plane clipping. Now, it should continually render the proper top down minimap view no matter where you are exploring. It should work in the lowest valleys and highest peaks, and indicators should always generate at the proper location height no matter where you are in the location block.

The last issue I was running into was more simple than I realized. I was trying to get the mod to allow loading of old saves with a corrupted version of the mod so users wouldn't have to start new saves. For a days I kept running into empty dictionaries, and I thought I was restoring save data properly to stop this.

However, if you don't already know, you need to recreate the dictionaries from scratch since they aren't in the previous saves save data. This can be done by tying it to a simple load event that checks for null save records and repopulates the null properties/objects with the default ones.

You can see how I do this in the below example. For any mod developers not doing this, I recommend adding this into any mod that uses save data restoration to ensure continual compatibility as you update you mod and add new objects/properties to the save data.

Code: Select all

        //Run the minimap setup routine to setup all needed objects and setup load event for dictionary repopulation.
        void Start()
        {
            SetupMinimap();
            SaveLoadManager.OnLoad += OnLoadEvent;
        }

        //use this to repopulate any loads that are missing these dictionaries because they are running an older version of the mod.
        //without this would break older saves.
        void OnLoadEvent(SaveData_v1 saveData)
        {
            if(iconGroupColors == null)
            {
                iconGroupColors = new Dictionary<MarkerGroups, Color>()
                {
                    {MarkerGroups.Shops, new Color(1,.25f,0,1) },
                    {MarkerGroups.Blacksmiths, new Color(0,1,1,1) },
                    {MarkerGroups.Houses, new Color(.285f,.21f,.075f,1) },
                    {MarkerGroups.Taverns, new Color(0,1,0,1) },
                    {MarkerGroups.Utilities, new Color(1,1,0,1) },
                    {MarkerGroups.Government, new Color(1,0,0,1) },
                    {MarkerGroups.Friendlies, Color.green },
                    {MarkerGroups.Enemies, Color.red },
                    {MarkerGroups.Resident, Color.yellow },
                    {MarkerGroups.None, Color.black }
                };
            }

            if (iconGroupActive == null)
            {
                iconGroupActive = new Dictionary<MarkerGroups, bool>()
                {
                    {MarkerGroups.Shops, true },
                    {MarkerGroups.Blacksmiths, true },
                    {MarkerGroups.Houses, true },
                    {MarkerGroups.Taverns, true },
                    {MarkerGroups.Utilities, true },
                    {MarkerGroups.Government, true },
                    {MarkerGroups.Friendlies, true },
                    {MarkerGroups.Enemies, true },
                    {MarkerGroups.Resident, true },
                    {MarkerGroups.None, false}
                };
            }

            if (npcFlatActive == null)
            {
                npcFlatActive = new Dictionary<MarkerGroups, bool>()
                {
                    {MarkerGroups.Shops, false },
                    {MarkerGroups.Blacksmiths, false },
                    {MarkerGroups.Houses, false },
                    {MarkerGroups.Taverns, false },
                    {MarkerGroups.Utilities, false },
                    {MarkerGroups.Government, false },
                    {MarkerGroups.Friendlies, false },
                    {MarkerGroups.Enemies, false },
                    {MarkerGroups.Resident, false },
                    {MarkerGroups.None, false}
                };
            }

            if (iconSizes == null)
            {
                iconSizes = new Dictionary<MarkerGroups, float>()
                {
                    {MarkerGroups.Shops, 1f},
                    {MarkerGroups.Blacksmiths, 1f},
                    {MarkerGroups.Houses, 1f},
                    {MarkerGroups.Taverns, 1f},
                    {MarkerGroups.Utilities, 1f},
                    {MarkerGroups.Government, 1f},
                    {MarkerGroups.Friendlies, 1f},
                    {MarkerGroups.Enemies, 1f},
                    {MarkerGroups.Resident, 1f},
                    {MarkerGroups.None, 1f}
                };
            }
        }
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Completed version has been released. You can find it on the github or its new nexus home here: https://www.nexusmods.com/daggerfallunity/mods/233/.

Please move this to the released thread.

Check out all the new features in this video:


I believe all bugs have finally been squashed. Please report issues and bugs if found.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
Macadaynu
Posts: 261
Joined: Sun Mar 07, 2021 1:18 pm

Re: l3lessed Enchanted Compass

Post by Macadaynu »

Congrats on the release, this is a great achievement, well done :D

I've downloaded and endorsed, I hope others will too.

I've added a link from my Hotkey Bar mod page to yours, and thanks again for letting me use the mod settings image for that

User avatar
Macadaynu
Posts: 261
Joined: Sun Mar 07, 2021 1:18 pm

Re: l3lessed Enchanted Compass

Post by Macadaynu »

Something I've noticed, is that when you use the 'Lock View' option, the Smart Icons spin around with the player whilst you turn the player around

User avatar
dani26795
Posts: 29
Joined: Sat Jan 25, 2020 3:51 am
Location: Spain

Re: l3lessed Enchanted Compass

Post by dani26795 »

Instantly downloading this one :D

l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

There are a few small bugs I let slip through. One is the spinning icons during flip. The other I believe is the dungeon map not creating/enabling properly. Both will be fixed some time today.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
dani26795
Posts: 29
Joined: Sat Jan 25, 2020 3:51 am
Location: Spain

Re: l3lessed Enchanted Compass

Post by dani26795 »

Okay after trying it out for a while I only noticed 2 other issues.

First one is that opening the game and loading a save that has the compass mod active will reset its settings, though it fixes itself after loading the save again.
The other one is that at one point the building colors and icons disappeared, while the rest of the minimap itself still worked. Only way to fix was closing the game entirely and opening it again.

Other than that I'm really liking this mod, makes me save a lot of time I would spend checking the local map.

Post Reply