File information

Last updated

Original upload

Created by

Always Hungry

Uploaded by

craftymonkey

Virus scan

Safe to use

Tags for this mod

71 comments

  1. craftymonkey
    craftymonkey
    • supporter
    • 27 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. Corporeal
    Corporeal
    • member
    • 0 kudos
    tyvm for great mod
    h2h has no record like a normal weapon does, it's nil

    sme_hitchance.lua:359
                    if settings.behavior:get('SMEisActive') then
                        local weaponType = types.Actor.getEquipment(self,types.Actor.EQUIPMENT_SLOT.CarriedRight)
                        if weaponType == nil then
                                weaponType = -1
                        else
                                weaponType = types.Weapon.record(types.Actor.getEquipment(self,
    types.Actor.EQUIPMENT_SLOT.CarriedRight)).type
                        end
                                ui.printToConsole(tostring(weaponType),ui.CONSOLE_COLOR.Default)
                        local isMarksmanWeapon = weaponSkillMap[weaponType] == "marksman"
                        if distance < 193 and not isMarksmanWeapon then
                            displayWidget(elementColour, hitChance)
                            
                        elseif isMarksmanWeapon then
                            displayWidget(elementColour, hitChance)
                        end
                    else
                        displayWidget(elementColour, hitChance)
                    end

    1. ashst0rm
      ashst0rm
      • premium
      • 0 kudos
      If you say you are getting errors when using hand to hand so do I. Is the above the issues?
  3. Berwve
    Berwve
    • supporter
    • 1 kudos
    Hey, really nice mod and I've been enjoying it!

    One small issue I have is that every time I change a cell, an HP bar pops up for a second and then disappears even though I am not looking at anyone. I have it set so it only shows hp bars when I'm in a ready stance. Any ideas what causes this?
    1. craftymonkey
      craftymonkey
      • supporter
      • 27 kudos
      I'll look into it, although I haven't been programming in Lua since the release of this mod. Hopefully I'll find a reason :)
    2. Berwve
      Berwve
      • supporter
      • 1 kudos
      Thank you!
    3. effeh
      effeh
      • premium
      • 0 kudos
      Are you using the difficulty mod "Harder Better Faster Stronger"? I get the same thing, and assumed the script updating actor stats was the culprit
    4. Berwve
      Berwve
      • supporter
      • 1 kudos
      I am using HBFS mod, didn't think of that as a possible culprit. Thanks for the heads up.
    5. micheru12
      micheru12
      • supporter
      • 4 kudos
      Same issue, also using HBFS. There is some sort of interaction between the two mods. 
    6. craftymonkey
      craftymonkey
      • supporter
      • 27 kudos
      I'll try to look into it to find some common code tomorrow. 
    7. effeh
      effeh
      • premium
      • 0 kudos
      https://www.nexusmods.com/morrowind/mods/56594

      MaxYari had a similar problem and ended up making his mod not trigger in the first 10 frames of an actor being initialized. not sure if there's a better solution or if this one would work for SME
    8. lillunchtable
      lillunchtable
      • member
      • 0 kudos
      Did you ever look into this? I'm currently experiencing it on my mod list with Harder Better Faster Stronger installed as well
  4. astraya101
    astraya101
    • member
    • 0 kudos
    Noticed this possible minor bug when I'm on 1st person fight stance specifically with no weapon equipped (so only fists/hand-to-hand readied). The hit chance percentage doesn't appear and the following error is getting spammed in logs? Nothing else impacted, though.

    [21:44:42.341 E] L@0x1[scripts/sme_hitchance.lua] onUpdate failed. Lua error: [string "scripts/sme_hitchance.lua"]:360: sol: no matching function call takes this number of arguments and the specified types 
    [21:44:42.341 E] stack traceback:
    [21:44:42.341 E]  [C]: in function 'record'
    [21:44:42.341 E]  [string "scripts/sme_hitchance.lua"]:360: in function 'displayHitChance'
    [21:44:42.341 E]  [string "scripts/sme_hitchance.lua"]:419: in function <[string "scripts/sme_hitchance.lua"]:416>
    [21:44:42.466 E] L@0x1[scripts/sme_hitchance.lua] onUpdate failed. Lua error: [string "scripts/sme_hitchance.lua"]:360: sol: no matching function call takes this number of arguments and the specified types 
    [21:44:42.466 E] stack traceback:
    [21:44:42.466 E]  [C]: in function 'record'
    [21:44:42.466 E]  [string "scripts/sme_hitchance.lua"]:360: in function 'displayHitChance'
    [21:44:42.466 E]  [string "scripts/sme_hitchance.lua"]:419: in function <[string "scripts/sme_hitchance.lua"]:416>
    [21:44:42.506 E] L@0x1[scripts/sme_hitchance.lua] onUpdate failed. Lua error: [string "scripts/sme_hitchance.lua"]:360: sol: no matching function call takes this number of arguments and the specified types
  5. Rovlad84
    Rovlad84
    • member
    • 10 kudos
    If you experience lag/freezing when picking up herbs with this mod and Graphics Herbalism enabled:
    1. Download this file:
    https://filebin.net/cev7pa56mnrzachn
    2. Replace sme_widget.lua from this mod with it
    All props go to Grempington for finding the solution.
    PS. There is no need to do anything further, hit chance widget and everything else should work properly without any additional edits.
    1. Teldram
      Teldram
      • premium
      • 1 kudos
      Thanks for sharing, but the link is dead.
    2. 6R4V3N
      6R4V3N
      • member
      • 3 kudos
    3. SandGentleman
      SandGentleman
      • premium
      • 49 kudos
      Thank you for this! Was wondering what mod was causing that massive stutter. 
    4. arbitrarysignal
      arbitrarysignal
      • member
      • 1 kudos
      Yes! Thank you! Was hoping for such a fix.
    5. pochanargat
      pochanargat
      • member
      • 0 kudos
      File is no longer available :(

      Edit: NVM, just downloaded the one 6R4V3N provided
    6. slaythedragonn
      slaythedragonn
      • supporter
      • 3 kudos
      Thanks for the fix for all those involved. The lag every time I picked up a mushroom was insane. 
    7. AidenWatson
      AidenWatson
      • supporter
      • 2 kudos
      Legend absolutely works, atlas I thought I was just going to be settling to wait every other plant freezing my game. Genuinely, modding morrowind has been a death sentence but I've finally got things working to a nice point that my playthrough is perfect, except for these tiny problems like this one. I don't even know how some random like me could even figure this out because I wouldn't even come near the conclusion the healthbar mod is freezing the game whenever picking up damn ingredients.

      Thank you practitioners of the dark arts that is morrowind modding 
    8. Skykitty17
      Skykitty17
      • member
      • 0 kudos
      Thank you for this fix!
  6. Grempington
    Grempington
    • premium
    • 2 kudos
    Oh I see the performance fix is implemented, nice!
  7. skyrimfoxUK
    skyrimfoxUK
    • premium
    • 0 kudos
    Hi, I love this mod, if at all possible can you tell me how to decrease the health bar fadeout time when you lose focus on target?
  8. DonkeyOfSteel
    DonkeyOfSteel
    • member
    • 0 kudos
    Doesn't work with 0.48? Only 0.49+?
    1. DonkeyOfSteel
      DonkeyOfSteel
      • member
      • 0 kudos
      Installed OpenMW 0.49. Works now. On 0.48 it crashed OpenMW on second game load.
  9. S3ctorOMW
    S3ctorOMW
    • premium
    • 16 kudos
    Hi, I wanted to make replacement textures for the health bar, which worked out well, but I found the widgets almost all have color props on them that really messed with my palette. Would you be willing to upload a version with the color props removed, or give me perms to upload such a file in a separate mod?

    I just wanted to make the health bars blue. :)
    1. craftymonkey
      craftymonkey
      • supporter
      • 27 kudos
      Hey, no problem, you can upload a separate file :)
  10. Grempington
    Grempington
    • premium
    • 2 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
      • 27 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
      • 2 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
      • 2 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
      • supporter
      • 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.
    5. pandastic4
      pandastic4
      • supporter
      • 9 kudos
      Did you figure it out?

      Edit: Never mind, it works fine if you just modify sme_widget.lua. Modify sme_hitchance.lua too if you want the hit chance.
    6. Sweezly
      Sweezly
      • member
      • 9 kudos
      pandastic4 Could you help me out a bit? Can't wrap my head around this. Where in sme_widget.lua do I have to place these lines? Do I have to do the same to sme_hitchance.lua or it won't function?
  11. HandsomeOre
    HandsomeOre
    • supporter
    • 8 kudos
    Hello, can I create a yaml file to facilitate localized script Settings?
    1. HandsomeOre
      HandsomeOre
      • supporter
      • 8 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