[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: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Okay, I updated the github. There is an zip file to use with vortex mod manager, and there is the raw directories with the mod file and textures for copying and pasting directly into the streaming asset folder.

You should be able to test it now.
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
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: l3lessed Enchanted Compass

Post by Daniel87 »

l3lessed wrote: Sun May 23, 2021 7:41 pm As said in above post, pushing both zoom in and zoom out at the same time will completely hide it, no matter what mode your in.

The alpha channel on the icons was an accidently addition. I need to swap at the materials.

Lastly, the raycast was already a thought and the last feature I was going to experiment with before NMM drop. I need to see how it impacts performance, as each npc would have to be shooting a single ray towards the player on every check.

Thanks for the feedbacks.

Also, I realized you can't use the mod file right now, unless you know what textures to put in streaming textures folder. I'll put a proper install folder up that has the mod file and directories setup properly.
What I did to improve the firefly performance (many thousand gameObjects at the same time active, each with its own rigidbody and physics calculation) was to set a flag if the player is within a certain range, before its flying behaviour even gets activated. Next, I set a ticker that counts down from 2 seconds to zero, to make sure I do these raycasts only once every 2 seconds. I also randomized the starting number of this ticker, to not have all thousands of fireflies raycast at the same time. Maybe these approaches help you too. It helped the performance of my mod quite a lot.
In Julianos we Trust.

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

Re: l3lessed Enchanted Compass

Post by l3lessed »

I'm using a ienumerator update routine, with an adjusting wait real seconds return timer, to control marker activations. The adjusting timer switches based on players current frame rate. As of now, if they are above 60FPS, it ticks every single frame. If they are below 60 FPS, it ticks every two frames (AKA halves the script cost). I also put in distance checks, but the random start time is a good idea to keep all the markers from activating at the same time and checking at the same time.

First big thing done today was to add a Line of Sight raycast checked to the NPC marker class that returns true or false based on a single raycast shoot at the player and limited by the set minimap radius distance. It's working great.

I also fixed and updated the key inputs in the settings. You settings should now update the proper key inputs when you change them in mod settings.

I did allot of bug clean up today also. Icon layer has been fixed to not show an alpha/blend channel. Label color text has been changed to magenta to ensure it can be seen easily, no matter the icon color (outside purples).

Now, if I can track down this last bug that is killing me. A few mobile npcs in town will not properly activate their markers, and I can't sort out why. They clearly have the script attached like all the other npcs, and when I look at their object records, I can't find a difference in them. However, they won't update/activate the marker icon. It's like their ienumerator update routine is stick, but I can't understand why it is only a few, since the code process of adding the markers and running them is the same across all mobile npcs.
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: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Found the issue with the last bug. It is caused by using an ienumerator, with a while switch to keep it looping endlessly, and then starting it in a classes Start() method.

A few npcs were being spawned during frame skips I believe, and as a result, the ienumerator was not getting kicked on. But since it is such a small chance for the npc to be added during a frame skip, it only happens to a few of them. I'll remedy this by adding the random timer, and I need to either update my ienumerator or use an update loop with a timer, like you Daneil..
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: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Pushed a new version on the github. Tons of updates and fixes. Give it a go and report back.

The largest thing is you can use unity keycode properties in the mod settings to setup custom keys for zoom in and zoom out and their double tap inputs.
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
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: l3lessed Enchanted Compass

Post by Daniel87 »

l3lessed wrote: Mon May 24, 2021 9:58 pm I'm using a ienumerator update routine, with an adjusting wait real seconds return timer, to control marker activations. The adjusting timer switches based on players current frame rate. As of now, if they are above 60FPS, it ticks every single frame. If they are below 60 FPS, it ticks every two frames (AKA halves the script cost). I also put in distance checks, but the random start time is a good idea to keep all the markers from activating at the same time and checking at the same time.

First big thing done today was to add a Line of Sight raycast checked to the NPC marker class that returns true or false based on a single raycast shoot at the player and limited by the set minimap radius distance. It's working great.

I also fixed and updated the key inputs in the settings. You settings should now update the proper key inputs when you change them in mod settings.

I did allot of bug clean up today also. Icon layer has been fixed to not show an alpha/blend channel. Label color text has been changed to magenta to ensure it can be seen easily, no matter the icon color (outside purples).

Now, if I can track down this last bug that is killing me. A few mobile npcs in town will not properly activate their markers, and I can't sort out why. They clearly have the script attached like all the other npcs, and when I look at their object records, I can't find a difference in them. However, they won't update/activate the marker icon. It's like their ienumerator update routine is stick, but I can't understand why it is only a few, since the code process of adding the markers and running them is the same across all mobile npcs.
Awesome! Will definitely include this into my standard mod setup :D
Didnt have much time these days to play DFU at all. Finally got a lot of customers again and tons of work (good for the wallet, bad for DFU modding).
In Julianos we Trust.

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

Re: l3lessed Enchanted Compass

Post by l3lessed »

Found the render texture size property. This allowed me to fix the biggest and largest issue with the minimap; it getting super pixelated anytime you increase the compass size. Now, just need to fix that black pawn shop mesh, and it is done. I need some people to test it a little, before I declare it done.

The changes are pushed to github versions.

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: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Transparencies now work for all icons, labels, and marker for both building and NPC.

I'm going to add in one last thing, a custom map zoom size for inside and outside, so whatever you set it to, it will restore on save for both inside and outside levels.
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: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: l3lessed Enchanted Compass

Post by l3lessed »

Check out what I was able to do by replicating the base engines method for pulling the npc texture atlas number. I may submit some engine changes to the MobilePersonNPC object class. I feel the texture int arrays should be public with a private set. Using that, with the mobile person PersonOutfitVariant property that is already public, and the built in ImageReader.GetTexture(), modders could then pull the current npc texture array without having to reconstruct the texture switch that is in MobilePersonNPC, like I did.

Image
Image
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
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: l3lessed Enchanted Compass

Post by King of Worms »

Man you polished this a lot, great progress and functions :ugeek:

Post Reply