Download
(2 Kb)
Download
Updated: 09/15/20 07:09 PM
Compatibility:
Stonethorn (6.1.5)
Updated:09/15/20 07:09 PM
Created:09/15/20 07:09 PM
Monthly downloads:45
Total downloads:2,592
Favorites:3
MD5:
TamrielGuard - disable accidental stealing
Version: 1.0
by: Schrodi [More]
Tamriel Guard

This simple addon will prevent you from accientally stealing. In order to attempt whatever mischief you were planning, you need to be in one of the following sneak states:
  • hidden
  • hidden (almost detected)

Github repository containing this addon (and a few others): https://github.com/wjtk4444/eso-addons
Optional Files (0)


Post A Reply Comment Options
Unread 05/13/24, 11:57 AM  
Clattuc
 
Clattuc's Avatar

Forum posts: 1
File comments: 15
Uploads: 0
2024 version if you need it...

I started popping LUA errors on this recently because FISHING_MANAGER.StartInteraction was nil. I'm sure ZOS changed something. Anyway, I went back to Dolgubon's Lazy Writ Crafter as called out in the comments, and he has since changed his hook logic to catch this. I made the same changes here and it works without errors. I generated a patch file but it's bigger than the LUA file, and I can't seem to attach a file here, so I'll just embed the text for TamrielGuard.lua:
Code:
local info =           function(msg) CHAT_SYSTEM:AddMessage("[Tamriel Guard]: "        .. msg) end
local dbg  = false and function(msg) CHAT_SYSTEM:AddMessage("[Tamriel Guard][DEBUG]: " .. msg) end or function() end

local ALLOWED_STEALTH_STATES = {
        [STEALTH_STATE_HIDDEN                ] = "hidden",
        [STEALTH_STATE_HIDDEN_ALMOST_DETECTED] = "hidden (almost detected)"
    }

-- Shoutout to Dolgubon, no way in hell I'd find FISHING_MANAGER.StartInteraction
-- hook if I didn"t randomly look trough Lazy Writ Crafter"s code.
-- https://www.esoui.com/downloads/info1346-DolgubonsLazyWritCrafter.html

-- Patch Clattuc 5/2024 to use current DLWC logic and avoid LUA errors

local interactionManager = FISHING_MANAGER or INTERACTIVE_WHEEL_MANAGER
local oldInteract = interactionManager.StartInteraction
if oldInteract then

    local function hook(...)
        local _, _, isBlocked, _, _, _, _, isCriminalAction = GetGameCameraInteractableActionInfo()
        if isBlocked then
            return oldInteract(...)
        end
    
        if isCriminalAction then
            local allowedState = ALLOWED_STEALTH_STATES[GetUnitStealthState("player")]
            if allowedState then
                dbg("Allowed stealing; stealth state: " .. allowedState)
            else
                info("I can see you, criminal!")
                return isCriminalAction
            end
        end
    
        return oldInteract(...)
    end
    interactionManager.StartInteraction = hook
end
Report comment to moderator  
Reply With Quote
Unread 04/27/23, 01:47 PM  
SimpsForBreda
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 2
You've saved me thousands in fines!

Could you add a keybind for enabling/disabling this?
I keep it enabled 100% of the time because it's awesome, but occasionally it'd be great to turn it off for a bit (e.g., thieving dragon hoards of apples when there are no [living] witnesses)


I may try to hack that in myself because I'm impatient, but I figure others might find that useful as well so I'm throwing it out there publicly


(+10 bonus points if you can make it turn back on after some period of time, or have a way to always enable at login... that's far beyond my capabilities though, I'm just spit-ballin!)
Report comment to moderator  
Reply With Quote
Unread 07/11/21, 05:28 PM  
LustyGayArgonian

Forum posts: 0
File comments: 4
Uploads: 0
Smile Thanks for this!

Very simple like NoAccidentalStealing used to be and doesn't touch necromancer skills! Thanks!
Report comment to moderator  
Reply With Quote
Unread 06/04/21, 08:35 PM  
A_Darklore

Forum posts: 0
File comments: 97
Uploads: 0
Originally Posted by DewiMorgan
How does this differ from https://www.esoui.com/downloads/info...lcasting.html?

That one seems all-singing, all-dancing, so what's this one's "selling point", as it were?

Simplicity of code, lack of reliance on libraries...?
Well I can tell you one "selling point", it doesn't control your 'criminal casting' which is not compatible with gamepad mode on the other one. So for Necros that use gamepad mode, this seems to be the solution.
Report comment to moderator  
Reply With Quote
Unread 12/22/20, 07:58 PM  
DewiMorgan
 
DewiMorgan's Avatar
AddOn Author - Click to view AddOns

Forum posts: 14
File comments: 86
Uploads: 1
How does this differ from https://www.esoui.com/downloads/info...lcasting.html?

That one seems all-singing, all-dancing, so what's this one's "selling point", as it were?

Simplicity of code, lack of reliance on libraries...?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: