File information

Last updated

Original upload

Created by

Always Hungry

Uploaded by

craftymonkey

Virus scan

Safe to use

Tags for this mod

43 comments

  1. craftymonkey
    craftymonkey
    • supporter
    • 21 kudos
    Locked
    Sticky
    Hey guys, hopefully you enjoy this mod as much as I do. Some info:


    • Magicka and Fatigue: Not sure about Magicka but I might add a Fatigue bar in the future since it's an important gameplay feature, especially for hand to hand and melee players.
    • More healthbar styles: if you're up to it, you can draw a new widget and if it's good, I'll add it to the mod. The widget is made of 4 parts: background rectangle, animated health rectangle, healthbar rectangle and overlay (it can be another shape, just be sure that it overlays everything else).
    • Please note that combat is not dehardcoded yet so there's no way to know who hit who as of now.

    Meanwhile, I plan to continue exploring the possibilities of OpenMW UI Lua.

    Would be also great to know which widgets do you prefer.
  2. HandsomeOre
    HandsomeOre
    • supporter
    • 4 kudos
    Hello, can I create a yaml file to facilitate localized script Settings?
    1. HandsomeOre
      HandsomeOre
      • supporter
      • 4 kudos
      My friends and I did discover a few things when we were researching how to localize it.
      The script only takes the NPC_.CNAM field, and should then find the corresponding FNAM from CLAS to display the localized occupation name.
      Add these two lines to sme_widget.lua to display the occupation name in the corresponding language

              local classRecord = types.NPC.classes.records[class]
              class = classRecord and classRecord.name or class

  3. Grempington
    Grempington
    • premium
    • 1 kudos
    Hey there! first of all want to say awesome mod, really enjoying it.

    Just wanted to say I experience a large hiccup (1-5 second freeze) when picking up herbs with graphics herbalism on as well. I was able to narrow it down to this mod (turning off this mod stops the freezes, turning on this mod starts the freezes)

    Commenting out functionality from the script, I was able to also narrow it down specifically to the async raycast call itself. The callback had nothing to do with it, the state management had nothing to do with it. It was SPECIFICALLY the asynchronous raycasting.

    I tried limiting it to not create additional raycast calls until the callback was handled so there's only one async raycast per queue, but that didn't have any effect.

    Finally, I replaced the async raycast with a synchronous one  (this required adding an onFrame engine handler and calling the getTooltipTarget in onFrame instead - as castRenderingRay should not be called outside of onFrame):

    local result = nearby.castRenderingRay(from, to)
    ...


    This solved all the performance issues I was having and the script still behaves exactly the same (In fact, it had to have behaved the same - as an async call, the callback was only called after the onUpdate that called the asyncCastRenderingRay finished executing - so having it happen onFrame is no different in terms of behaviour. Hell, it was even possible to have multiple asyncCastRenderingRay calls queued up without a single callback called yet because of that, which could've also created performance issues - particularly on lower end machines)
    1. craftymonkey
      craftymonkey
      • supporter
      • 21 kudos
      Hi, that's an amazing job finding (and even fixing) this issue. Playing with GH, I didn't have it, nor did I have any performance issues with my setup but if it makes the mod more performant, that's a great job. I haven't had much time lately due to searching for a new job so it would be amazing if you'd send me the script so I could update the mod right away. 
      Again, great job, and I'm happy that you're enjoying the mod :)
    2. Grempington
      Grempington
      • premium
      • 1 kudos
      Sure thing, how do you want me to send it to you? I could paste the code here if it's short enough, actually I'll paste the fix-related stuff instead of the entire file here for two reasons:

      • Length and comment section sanity sake
      • I also changed the format to be "[Name], Lv. ## [Title-Cased Class]" for personal taste and that's a distracting change
      • I am not using the latest version, using version 1.2 cause I experienced a crash in 1.2.1 and I can't really report it cause I have no idea if it's anything specific to the latest version or if it's because I have it running on top of POTI modlist (or if it's actually a repeatable bug)

      Anyhow for the fix:

      • Replaced getTooltipTarget() with:--Casting a raycast and getting our actors, sync to be used onFrame
        local function getTooltipTargetSync(dt)
            local from = camera.getPosition()
            local to = from + camera.viewportToWorldVector(util.vector2(0.5, 0.5)) * settings.behavior:get('SMERaycastLength')
            
            local result = nearby.castRenderingRay(from, to)
            tooltipTarget = result.hitObject
            if result.hitPos ~= nil then
                raycastCurrentLength = (result.hitPos - from):length()
            end
        end

      • Removed call to getTooltipTarget in onUpdate()
      • Added onFrame that simply calls getTooltipTargetSync():local function onFrame(dt)
            getTooltipTargetSync()
        end

      • Added onFrame to engineHandlers:return {
            engineHandlers =
            {
                onUpdate = onUpdate,
                onFrame = onFrame
            },
            interfaceName = "SME_CORE",
            interface = {
                getRaycastTarget = getRaycastTarget,
                getDistance = getDistance,
            },
        }

    3. Grempington
      Grempington
      • premium
      • 1 kudos
      Oops those are three reasons, not two. Not gonna edit the post again cause it keeps breaking the code formatting lol

      Also regarding what I said with multiple asyncCastRenderingRay calls queueing up - I thought about it and it's probably not actually possible. The callback is most likely always called right before or after the next call to onFrame so the callback should always called in between two onUpdate calls. But that's irrelevant since the freezing happened to me anyways.

      Since you're not experiencing it but me and other POTI users have experienced it, it could be some strange interaction between this mod and another lua mod causing it. But since this fix works I don't think there's a reason to worry about compatibility
    4. ankenyr
      ankenyr
      • premium
      • 0 kudos
      Actually having issues implementing the fixes above. All changes I made were to sme_widget.lua but it is ambiguous if changes are necessary for other files.
  4. ankenyr
    ankenyr
    • premium
    • 0 kudos
    I am using the latest version of OpenMW development (7888a11c36) and I believe that this mod has some issues with game lag given the following being true
    Turn on "Settings>Visuals>Terrain>Distant Land"
    Turn on Graphic Herbalism
    Turn on this mod.

    With those all on I find that looting herbs will cause a very significant drop in frames. Subsequent looting of herbs will be fine for a few seconds but it will return.

    Herbalism + Distant Lands don't have this issue on their own.
    Happy to do more troubleshooting if you cannot reproduce this.
    Love the mod btw!
  5. deleted9410740
    deleted9410740
    • account closed
    • 11 kudos
    can you add     if not types.Actor.getEquipment(self, types.Actor.EQUIPMENT_SLOT.CarriedRight) then return endto sme_hitchance.lua line 263 so it doesnt spam warnings when unarmed?
  6. pcusanb333
    pcusanb333
    • member
    • 3 kudos
    NICE. TY
  7. Bas3213
    Bas3213
    • member
    • 0 kudos
    Very impressed by this mod, but there are 2 features missing that would make it perfect. I hope their inclusion would be feasible.

    • display hit chance counter in 3rd person camera
    • display hit chance counter for hand-to-hand combat (no weapon equipped)
    Thank you very much for this mod!
  8. zsouza13
    zsouza13
    • premium
    • 9 kudos
    I love this mod but I was wondering if the raycast/health bar affect performance? I notice fps drops. What's odd is with this mod enabled my game freezes/pauses briefly when harvesting plants with graphic herbalism. Thank you again
    1. craftymonkey
      craftymonkey
      • supporter
      • 21 kudos
      Technically it shouldn't, it has considerable background work due to raycasting, yes, but the guy who implemented Lua scripting for OpenMW told me that just one raycast shouldn't impact your fps. But if your hardware is really old I think it's possible. You can tap F3 and see what's happening and what processes are the heaviest. You can also tap F10 and look into Lua profiling, it should tell you what mods are least performant. I did what I could optimizing this mod but the bare minimum for it is 1 raycast (for both healthbar and hit chance) and UI updating that can be performance heavy for really old machines (probably). I've got a laptop with 6gb 3060 and don't see any fps drops playing with graphic herbalism.
  9. zsouza13
    zsouza13
    • premium
    • 9 kudos
    I assume this doesn't work with openhud, correct?
    1. craftymonkey
      craftymonkey
      • supporter
      • 21 kudos
      What is openhud and why shouldn't this mod work without it? No, it just requires OpenMW itself and nothing more. 
    2. zsouza13
      zsouza13
      • premium
      • 9 kudos
      This is openhud, my friend. https://www.nexusmods.com/morrowind/mods/52440
    3. zsouza13
      zsouza13
      • premium
      • 9 kudos
      Dumb question but do the textures go in thr main data files folder or the omw, etc. Tyvm. Hmm not sure what I did wrong, probably because I'm on 0.49 android. Mod looks fantastic regardless. 
    4. craftymonkey
      craftymonkey
      • supporter
      • 21 kudos
      No, textures just stay in the mod folder when you add it to your openMW mod list, no need to put them somewhere else. No sure about how modding works for Android though.
      Thanks!
    5. zsouza13
      zsouza13
      • premium
      • 9 kudos
      I got the mod to work and it's fantastic! I apologize for the misunderstanding. I didn't have the latest openmw. My only nitpick is that would it be possible, or is it already possible, for the reticle to disappear when in third person? I notice this mod forces the vanilla reticle. Tyvm for this fantastic mod and endorsed!!!
    6. craftymonkey
      craftymonkey
      • supporter
      • 21 kudos
      Thanks, vanilla reticle is probably just my mistake, I'll update the mod in the upcoming days to fix the found issues :)
  10. AniHVX
    AniHVX
    • premium
    • 39 kudos
    Any chance to be able to rescale the widgets in the future?
    also for users that don't plan on using the hit chance indicators and also use the small skyrim crosshair mod I made a tiny patch to restore it :)
    1. craftymonkey
      craftymonkey
      • supporter
      • 21 kudos
      Hi, you can rescale the widgets with all other Hud elements in the OpenMW config file. Since they are many, it's very hard to do that right for all of them individually but scaling works great :)
  11. De3ta
    De3ta
    • premium
    • 0 kudos
    deadass i was looking for a healthbar mod for morrowind, thank you.