[MOD] World Tooltips

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.
User avatar
jefetienne
Posts: 134
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

[MOD] World Tooltips

Post by jefetienne »

World Tooltips
Updated 10/24/2020, v1.0 (DFU 0.10.27)

Nexus mod page


One of the most taken-for-granted features of any first-person video game has now arrived to Iliac Bay. This mod adds first-person tooltips that display information about interactable objects upon hovering over it, in a style that is partly influenced by Morrowind. Since writing and using this mod, I can't even go back to playing Daggerfall without it — it feels almost as if the mod is missing from the base game.

world_tooltips.jpg
world_tooltips.jpg (336.73 KiB) Viewed 987 times

World Tooltips displays multiple pieces of information without needing to interact with it:
  • For friendly (non-hostile) and static NPCs, it will display their name
  • Static doors on named buildings will display information such as its name, lock level, and hours available (if closed). In fact, simply hovering over the door will discover the building for you without needing to go inside or switch to Info Mode. In dungeons, it will display the dungeon name on the exterior and the region or town name from the interior.
  • Single-dropped items will display its name, while ones with multiple items will be called "Loot Pile"
  • Corpses will display their names if they have inventory
  • Animated doors can display its lock level if it is locked
  • House containers that have storage will also be accompanied by their furniture name (to the best of my ability)
  • Bulletin boards, ladders, levers, turnable wheels, bookshelves, and shop shelves are named
  • A non-exhaustive list of special quest items/objects are also named
  • Any other objects that are interactable will simply be named "<Interact>". If you feel this that this takes too much away from secret triggers (e.g. opening hidden doors, teleporting), you can disable this behavior in the mod settings.



My list may not be complete, and there might be other edge case interactables in some dungeons or in quests. If you find something that is interactable but isn't highlighted by a tooltip, or is named incorrectly, please let me know and I'll try and patch it.

NOTE:
  • A Lock Level of 0 is not a glitch but in fact a real value primarily found on city walls. The formula for door bashing is (25 - Lock Level)%. So a Lock Level of 0 means that you have a 25% chance to successfully open via bashing, and a Lock Level of 1 would mean a 24% chance.
  • This mod is English-centric and most of the objects have hardcoded English words. I unfortunately do not know of any other languages, but if I get enough demand and support for translation for some other languages I'll see if I can come up with a solution. The only ones that may be properly translated to your localization at the present time (but I have not tested this) would be unnamed mobile NPCs, their corpses, and generic items.
-----------------------

For modders:

I have also implemented a simple way for you to add your own custom tooltips. It takes a System.Tuple that has a float for the tooltip distance (should be matched with the activation distance) and a function with the RaycastHit parameter and returns a string name for the tooltip. Make the function return null if the RaycastHit does not match your specifications. Here is an example that adds a tooltip over the terrain called "Terrain":

Code: Select all

ModManager.Instance.SendModMessage("World Tooltips", "RegisterCustomTooltip", new System.Tuple<float, Func<RaycastHit, string>>(
    PlayerActivate.DefaultActivationDistance,
    (hit) =>
    {
        if (hit.transform.name.Length > 16 && hit.transform.name.Contains("DaggerfallTerrain"))
        {
            return "Terrain";
        }
        return null;
    }
));
You only need to add it once, so I recommend you put it in a Start method, an Init mod method, or in a constructor.
Last edited by jefetienne on Sun Oct 25, 2020 6:18 pm, edited 1 time in total.
El jefe, Etienne
Nexus Mods | GitHub

User avatar
jefetienne
Posts: 134
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: [MOD] World Tooltips

Post by jefetienne »

Reserved
El jefe, Etienne
Nexus Mods | GitHub

User avatar
jefetienne
Posts: 134
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: [MOD] World Tooltips

Post by jefetienne »

Reserved
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Ralzar
Posts: 1759
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: [MOD] World Tooltips

Post by Ralzar »

Suggestions, if possible:

For buldings, show their quality level. (If possible, split into very low, low, medium, high and very high).

For dungeon entrances, show their dungeon type (Orc Fortress, Spider Nest etc)
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

User avatar
jefetienne
Posts: 134
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: [MOD] World Tooltips

Post by jefetienne »

Ralzar wrote: Sat Oct 24, 2020 9:05 pm Suggestions, if possible:

For buldings, show their quality level. (If possible, split into very low, low, medium, high and very high).

For dungeon entrances, show their dungeon type (Orc Fortress, Spider Nest etc)
I may add those as mod settings in the future. The thing about those two descriptors are that roleplay-wise, you don't know what is inside a building until you go into them. The information about what is currently shown is essentially all the information you would see on a sign (except for Lock Level, which I borrowed from Morrowind).
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Ralzar
Posts: 1759
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: [MOD] World Tooltips

Post by Ralzar »

Yeah, I could see that. Although it could be argued that you really should be able to tell the difference between an upscale and low-end building without going inside.
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

User avatar
Hazelnut
Posts: 2663
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [MOD] World Tooltips

Post by Hazelnut »

Are you going to be putting your mod code on github? I'm curious about how you did this. :)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
jefetienne
Posts: 134
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: [MOD] World Tooltips

Post by jefetienne »

Hazelnut wrote: Sun Oct 25, 2020 5:01 pm Are you going to be putting your mod code on github? I'm curious about how you did this. :)
Yes, it's already in my fork under the branch mod_hudtooltips.

I had to do something I called "stealing" private properties/variables/methods via reflection which was thrilling - for a programmer :lol:

I mostly took and modified parts of PlayerActivate and had to seriously optimize it. Static doors were the worst.
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Baler
Posts: 170
Joined: Thu May 23, 2019 1:39 am
Location: Earth

Re: [MOD] World Tooltips

Post by Baler »

This is quickly becoming one of my favorite mods.

Only odd thing i've noticed, is the fighters guild door said residence until you info the building.
There was once a bug with Handpainted models that just got fixed with the latest "Fighter’s guild is now clickable in info mode."

This may be a stretch but are these tooltips intractable at all?
Looting without having enter a menu would be a real feat.
https://i.imgur.com/3B1oGkK.png
DFU Discord Link: http://discord.gg/HXMrKU6

User avatar
NikitaTheTanner
Posts: 353
Joined: Sun Oct 18, 2015 7:57 pm

Re: [MOD] World Tooltips

Post by NikitaTheTanner »

Using the mod, very cool! :D I especially like that the hidden doors are noticeable, no need to click every wall or check the map very carefully. As hidden doors are very common - it's a very useful feature! I might turn this off in the future, if I feel like adding back the challenge, but right now I'm thoroughly enjoying it :D

Post Reply