#SHOP v0.99c (UPD: 27/12/2025) - Store & House Owner Patrol

1 messages · Page 3 of 1

silent geyser
#

here's how my code looks like right now

summer igloo
#

if not isDismissed then

uncomment this and let me know

silent geyser
#

don't look at the line numbers, I've run Format Document for your file

summer igloo
#

No worries

silent geyser
#

Now it properly resets when I go to the exterior, yet breaks in interiors

summer igloo
#

What companion do you use? I'm checking that with Rapport mod

silent geyser
#

Arvesa

summer igloo
#

so I have easy access to any companion

silent geyser
#

I also have Blademeister, but he works just fine. Probably because he's creature (dremora)

summer igloo
#

Hmmm, could you try please adding her full name to modules/config.lua in line 83?

config.DISABLED_NPC_NAMES = {"vasesius viciulus", "arvesa full name"}

#

I know Arvesa is quite problematic due to being scripted heavily

silent geyser
summer igloo
#

Ahhh

#

Then you have to add her name to that list 100%

#

That's a bug from like the beggining of SHOP, some scripted companions are not working good when not ignored by script

#

I will add her full name to next patch as well

silent geyser
#

"arvesa nadram"

#

yep, it seems to fix her now

summer igloo
#

Ufff, good that we have this discord for fast help

#

And that I had right now a bit of free time to jump in

#

config.DISABLED_NPC_NAMES - what this does essentially is these NPC names will be ignored for recruiting as following NPC

#

so if you meet any case of quest/companion problem, then it's the first way to go

#

(also worth reporting afterwards ^^ )

silent geyser
#

Also if you want to optimize filters a little, I might suggest changing ones that you check for exact matches to key-value ones

So that instead of

config.DISABLED_NPC_NAMES = {"vasesius viciulus", "arvesa nadram"}

You'd use

config.DISABLED_NPC_NAMES = {
  ["vasesius viciulus"] = true,
  ["arvesa nadram"] = true
}

Checking such lists is O(1) instead of O(n)

summer igloo
#

I'll add that to next patch, also thanks because it looks like companions still remove player invisibility chameleon effects (which should be fixed last patch)

silent geyser
#

And they're certainly not super-scripted as Arvesa

summer igloo
#

All right they will be added as well. I need to find a way to combat this without hand adding npcs to the list

#

Since this is tedious. Doable but tedious, especially when more and more companions are released

silent geyser
#

And nova from the same mod too xd

summer igloo
#

I need to seriously look into detecting ai companion package like hyacinth suggested already a month or two ago, just never got to accomplishing that in the first place

silent geyser
#

Isn't it just a matter of

function FollowsPlayer(player)
    local followedActor
    I.AI.forEachPackage(function (pkg)
        if pkg.type == "Follow" then
            followedActor = pkg.target
            return
        end
    end)

    local isSummon = string.find(self.recordId, "_summon$")
        or string.find(self.recordId, "_summ$")
    if isSummon then
        return StopAttackingLeader({ target = followedActor })
    end

    return followedActor == player
end
summer igloo
#

Hyacinth mentioned something about detecting mwscript package

#

Follow package is used to move NPCs by SHOP as far as I remember

#

Companion package is a different one

silent geyser
#

Is it?

summer igloo
#

Or shop is moving them by travel package…

silent geyser
#

It certainly was the only one package I saw while testing my mod

summer igloo
#

I would need to check that

silent geyser
#

Somehow I'm triggering this error

summer igloo
#

Yeah Ive also noticed that, I will need to rollback to earlier version and inspect because 0.99 has some mess in it, today I will have time to work on it and will make fixes🙌

summer igloo
#

I am working on the (untested) mess I've released as 0.99 and its' hotfixes. Rotations upon arrival to home position by the NPC is broken, a lot of errors are appearing. Sorry for this everyone, it was too rushed before christmas

#

After that, I will proceed to add Sleeping Darts as another mean of stunning NPCs :>

narrow ether
gaunt void
silent geyser
#

Btw does your mod add any greetings to the npcs? I've started to get really annoyed at everyone in my own faction threatening me with guards and stuff

narrow ether
silent geyser
#

Like, the aggressive lines that tell me to fuck off or leave the place suddenly became reeeeeally frequent

summer igloo
#

I will investigate it, generally the private areas of NPCs will generate such responses (when not being in faction, or just being in a private area of a NPC or a shopkeeper etc), it activates upon coming to proximity of a bed which resembles private bedroom/quarters/sleeping area

summer igloo
silent geyser
summer igloo
#

I will take a look, I have a whole day today to work on my beloved SHOP

#

Looks like .99 was not successful, things broke and some that should be fixed possibly ain't

summer igloo
#

And the responses are indeed harsh that are being used for this function

silent geyser
#

I suppose the responses are accurate... But they sound really out of place when they are said at the wrong places and times

summer igloo
#

This is true and will be filtered out

#

thanks for the suggestion 🙏

silent geyser
#

I suppose I will keep an eye on these misfires and report to you

summer igloo
#

Thinking about hostels as well

#

to turn that off for this particular script

summer igloo
#

I need to actually download Arvesa mod to fix these pesky companions too

summer igloo
#

Okay, all bugs and errors (teleport, clearing states etc) are gone. Also couldn't reproduce the error log you sent SosnoviyBor (I suspect it might have confict with backstabs - although haven't checked and unsure). I'm moving on now to fix companion detection

summer igloo
silent geyser
# summer igloo I've managed to block off companions from being in the script thanks to your sni...

It's not in fact working and I've updated it since :)

function FollowsPlayer(player)
    if self.type == types.Player then
        return false
    end

    local followedActor
    I.AI.forEachPackage(function (pkg)
        if pkg.type == "Follow" then
            followedActor = pkg.target
            return
        end
    end)

    local followsPlayer = followedActor == player
    local isSummon = string.find(self.recordId, "_summon$")
        or string.find(self.recordId, "_summ$")

    local isFollowersSummon = false
    if not followsPlayer and isSummon then
        isFollowersSummon = FollowsPlayer(followedActor)
    end

    return followsPlayer or isFollowersSummon
end
summer igloo
#

I have modified it though

#

But without it it wouldnt work

#

I am adding filtering out bed script for hostels and temples and will upload new v

silent geyser
#

There were issues with detecting follower's summons. If your mod doesn't affect them, then you're probably fine

summer igloo
#

Yeah summons are untouched ^^

#

0.99c CHANGELOG
-Blacklisted temples and hostels from being affected by the bed script ("Get out" type voices near bedrooms)
-Fixed A LOT of errors from 0.99 release
-Companions now are properly fixed - no need to add any to the blacklist
-Fixed companions removing chameleon and invisibility effects from the player
https://www.nexusmods.com/morrowind/mods/57747

Nexus Mods :: Morrowind

Witness never seen Ai behavior in Morrowind (OpenMW). Stealing is now very hard (optional ErnBurglary - Burglary Overhaul integration). NPCs will follow you around and search for you in interior cells

#

Sosnoviy - please let me know if it fixed companion problems

#

Since you had several instances of companions breaking out

silent geyser
summer igloo
#

I will sort it out on 1.0 release ^^

#

SHOP v0.99c (UPD: 27/12/2025) - Store & House Owner Patrol

narrow ether
#

0.99c angyfargoth

summer igloo
#

It was a fuckin mess today

#

Spent half day debugging my mistakes 😛

#

Although now I am very happy, got rid of all red errors in the logs

#

(hopefully)

summer igloo
silent geyser
summer igloo
#

Skill issue 😄

#

Nah, must be that you have cached old version of site

narrow ether
summer igloo
#

It's readable 😄 I will fix it later

narrow ether
#

Soon(tm)

summer igloo
#

Sooner than later for sure ^^

summer igloo
summer igloo
#

Yeah falls down quite fast 😛

narrow ether
#

I would think about implementing restrictions, e.g. making them useless against armoured characters or sth

#

or lowering efficiency

summer igloo
#

It doesnt work in combat, it doesn't work when NPC sees the player. Are there any more restrictions needed? Considering it will be dropped only 1-2 darts on the drop. (1% chance shared between all droppable items by SHOP)

narrow ether
#

it's still auto-success, basically

#

sth which blacjack doesn't have

summer igloo
#

You still need to hit with marksman

narrow ether
#

limited availability is a good call although not sure whether it should be just loot

summer igloo
#

if you miss, it's not applied

#

I mean if the roll for applying the hit from engine fails

summer igloo
narrow ether
#

how long does the KO last?

summer igloo
#

With extremely high materials requirements

#

I think it uses base 45sec stun, I think I will be able to finetune it to work like blackjack or hand to hand

#

Since I had to create a new effect for it. Base Sleep Spell Mod didnt have onStrike enchant

narrow ether
#

well, since it's not KO and doesn't depend on your skill but the substance/magic in the dart

#

maybe NPCs stats should matter

#

level, endurance, sth

summer igloo
#

I will think about some formula

narrow ether
#

if it's poison then maybe poison resistance

#

if it's magic then maybe magicka resistance

#

to make it more varied

#

less safe

#

and more uncertain

icy bluff
narrow ether
#

ranged attack makes it far easier to use safely

summer igloo
#

Dunno how to balance that nicely

narrow ether
#

yeah it's tricky

summer igloo
#

Probably half of the stun time will be applied

#

To have atleast some drawback

narrow ether
#

and maybe add some inherent RNG

#

so you can never be sure how long it lasts

summer igloo
#

Basically how it is now with blackjack

narrow ether
#

yeah but with lower values

#

it also makes sense to check for magicka or poison resistance depending on what it is

summer igloo
#

Tbh it's a command humanoid spell lol

#

Pre-made effect made within the limitations of spell system api

#

So I guess magicka applies here, although for making them with crafting I would go for Poison ingredients

narrow ether
summer igloo
#

No, that needs to be coded

#

Until spell api is exposed, it all will be jank methods sadly

narrow ether
summer igloo
#

Yeah, I mean at the moment for the dart it uses default timer

cloud stone
#

How did you end up dealing with companions unregistering when going into an interior?

summer igloo
#

There is companion_detection.lua file, everything regarding that it’s there. I’ve modified code snippet Sosnoviy posted here. I am on my phone now so cannot explain more in detail without looking at it ^^

#

It pretty much checks for Follow and Escort packages and ignores these NPCs for the whole script

silent geyser
#

Yesterday I was thinking of decoupling follower detection from my mod for the sake of simplicity, reusability and optimisation. Maybe you'd be interested in it :)

cloud stone
#

Yeah trying to figure out a way to do this without attaching a script to every actor in the game haha

silent geyser
#

🧐

#

Like, in global scope?

#

I doubt you can do that, since the only way I know of detecting the follower is by checking their AI packages. Which in turn can be checked only in local scipt

silent geyser
summer igloo
silent geyser
#

I'll check it a bit later

summer igloo
#

Thank u very much 🙌🙏

eager stone
#

Hey there. Using the latest version, it seems like many areas where you have a companion to clear out a dungeon (like the quest The Necromancer of Vas) break due to SHOP.

#

The person you're supposed to work with stops being a follower immediately due to SHOP

#

The quests still work OK, but you lose out on any support

#

I ran into this in both vanilla dungeons and TR areas

summer igloo
silent geyser
#

Yeah that bug with onfollowing player's followers is back again

#

Specifically it happened when I entered a dungeon, killed a few monsters and the combat ended

#

Though I encountered an interesting interaction - followers picked locks for me. Due to bug, obviously. But the idea of them picking locks for you is really cool

icy bluff
#

haha nice emergent behavior

silent geyser
#

And even though I've rolled back to 0.98a of SHOP, it allowed me to have just 1 follower angyfargoth

silent geyser
icy bluff
#

yeah its a cool idea, like in some party based iso rpgs.

summer igloo
summer igloo
summer igloo
#

I would need to modify just a slight bit and give a button activation to give the order to companion

versed plume
#

You pointed me towards this when asking about traps, so I figure I'll ask a few things I was wondering about...

Could there a way to separate magical and physical locks, perhaps as Lock and Seal? This would allow security to be relevant in the face of Alteration. Could make thief playthroughs more interesting without having to self impose a "no alteration or unlock scrolls" rule.

Probes I can still see being useful if traps gain the ability to trigger an AoE effect - in such a case, disarming it may be preferable to using Telekinesis depending on the situation.

summer igloo
# versed plume You pointed me towards this when asking about traps, so I figure I'll ask a few ...

Hey, with SHOP you can already lock the doors as a thief with Keylock items and it is already implemented and working. And it is security influenced and Keylock item quality influenced.
https://www.youtube.com/watch?v=zMrlCHsx530

Disarming trap failure which can trigger a trap is a great idea, I am adding it to SHOP todo list. Thanks for suggestion

Luk

SHOP AI and mechanics overhaul for OpenMW
Download on NexusMods

▶ Play video
#

I highly recommend reading the whole readme on NexusMods to get a feeling what's already available. The list is vast.

#

You can stun NPCs, NPCs can open locked doors, NPCs follow you around in their houses and shops, NPCs tell you to get out from their private areas, NPCs can remove invisibility and chameleon if too close to player to imitate being detected

versed plume
# summer igloo Hey, with SHOP you can already lock the doors as a thief with Keylock items and ...

Was... mostly asking about a way to change Lock and Unlock spells to not completely invalidate lockpicks by replacing them with Seal and Unseal, so that whether you use Security or Alteration is based on if the lock is physical, magical, or both.

Placing traps via trap kits could work for a new security use, and having AoE traps could introduce a reason not to invalidate probes existing by just using Telekinesis to trigger it remotely.

#

Like, if you have an escort and you come across a trap, you'll want to use a probe and not just trigger it with telekinesis because you could damage your escort.

#

It'd be a way to help keep Security valuable as a skill and not completely invalidate it via magic.

summer igloo
versed plume
#

Ah, so a new effect you could layer onto objects/doors isn't possible yet in OpenMW? Are keylocks not unlockable via spells?

summer igloo
#

They are unlockable with spells, just like locked spell doors are unlockable with lockpicks

#

New lock layer is nothing I've heard of tbh, and there is really niche use case. SHOP npc lock opening divides into 3 categories - combat, magic, stealth. Depending on the NPC stats, it either bashes, unlock with spell or lockpicks the door

versed plume
#

Yeah, adding Seal/Unseal isn't as simple as it sounds either - as part of the mod, you'd have to actually make it relevant, meaning you'd need to go into the game and figure out "which lock should become a seal instead, and which door should have both a lock AND a seal?", and then do the same for Tamriel Rebuilt content.

#

But it'd do a lot for keeping magic from just completely invalidating the Security skill.

summer igloo
#

SHOP does a lot already to un-invalidate security skill

versed plume
#

If something I implement, I'd look at where it would matter situationally, and would be random assignment for all other cases.

#

Like, the locks in the mage guild or telvani would become seals, while thieves guild and fighters guild would stay locks, while other places would be more randomized as an example.

summer igloo
#

Locking doors have no meaning without SHOP to be honest, it just locks out the doors which NPCs will never open. With SHOP, the lock magnitude changes a lot vs the NPC who has to open it, making the open time varied by the lock magnitude

versed plume
#

Since to me it addresses the "what is the user more likely to apply here?" when done based on faction location.

summer igloo
#

so it encourages to use better lock spell/better keylock and have better skill

versed plume
#

Speaking of... it's called SHOP, right?

#

I am working on a mercantile based character for my next playthrough...

#

Off chance this lets us run a shop?

#

Could be cool to have some procedurally generated orders to fill.

#

Like, say someone comissions I enchant an axe, or needs X numbers of potions that heal at least Y amount.

summer igloo
#

Noo not really, it's more of AI overhaul and thief overhaul mod

versed plume
#

lol gotcha. Definitely worth keeping track of, thanks for letting me know about it :D

summer igloo
#

No worries, hopefully you will have fun with it one day

gaunt void
flint mango
#

hi, writer here

please.

summer igloo
summer igloo
flint mango
#

and if you forget you immediately have 1 million bounty/j

flint mango
# summer igloo Hm?

it's mostly a personal issue but the amount of times most storytelling just handwave away an unlocked chest where it wasn't is brain melting

#

maybe it's the autism but like you can tell when something was Closed Different.

summer igloo
#

Well I definitely added this to future to-do to work together with synergy for Burglary Overhaul to not apply bounty for the items gone from chests and re-locked by the player (with adding rising % chance of bounty added for these items when re-locked the chest with a lock level further from the original lock magnitude)

narrow ether
#

Very interesting idea

icy bluff
#

Skrow the blackjack is so much fun, thank you

summer igloo
narrow ether
#

@summer igloo don't know if you are interested in the feature but how about guards reacting to you putting skooma, moon sugar and other illegal goods on the floor? It's always been weird that a merchant refuses you service, you put skooma on the floor and even if a guard sees it, no reaction at all. At the very least items should be confiscated.

icy bluff
#

I was just thinking about this too. something like Sheathe Your Weapon but its Sheathe Your Sugar

#

would make sense as part of shop but could be its own mod too

narrow ether
#

yeah, SHOP does a lot with detection and AI so this might be a nice feature here

gaunt void
#

it'd be better if npcs just didn't know about your sugar

#

and only informed the guards when you tried selling it

summer igloo
gaunt void
#

I think my suggestion would be more in line with shop

summer igloo
#

I will look into it, dunno if I can stop the detection but 99% sure I can do something when skooma/sugar is on the floor or anywhere around these npcs

gaunt void
#

Sure, it's just the service refusal dialogue for traders

summer igloo
#

And sorry everyone for no updates, last days I was busy with irl things, hopefully from tommorow I can start working back on the mods

#

🙌

gaunt void
#

So, basically you tell them not to care and detect via code when you sold them something nasty.

summer igloo
#

I am just not sure if thats open to lua api

#

If it is then that is a no brainer to add

gaunt void
#

removing the service refusal would be a dialogue edit, the second part would be a check of your inventory against the traders

summer igloo
#

I will check if it can be done luaside which I would prefer. Although shop also has .omwaddon so pretty much everything is possible with SHOP at this point

narrow ether
#

but I guess it's just an item list. Shouldn't be hard to do if the funtionality is in

summer igloo
narrow ether
#

so it doesn't work like that. There is also the "newly discovered" clause, ha ha

#

it works great for service refusal but of course, if you put raw ebony on the floor, nobody gives a shit

#

just as with skooma

summer igloo
#

Like I said, I will look into that and will serve a solution, one way or another

#

🙌

lone nymph
#

.

summer igloo
raw axle
#

@summer igloo Hi, in a discussion a few weeks earlier about your mod you told me to write about either bugs or comments here. I got the opportunity to interact a bit more with SHOP, and noticed the following:
-Shop owners in small spaces/cells that serve both as a bedroom and a shop, for example in small shops in Vivec, will tell you to leave as you peruse their wares.
-Areas like monasteries, that are "semi-private" as except for bedrooms, they don't have a "shopping" area and people are free to wander in most places. Homalayan monastery is an example of this, several other places of cult, people behave like shop owners too.
-Once while doing an "Exterminate the Brutes" quest, I had to kill an NPC in his home. He continued to yell at me even in death to leave his house.

I'm not knowledgeable about the complexity of modding in general, I hope though this can help to refine some aspects of an already accomplished mod.

summer igloo
raw axle
#

Thanks, you're welcome. 🙂

narrow ether
#

BTW this is random but have you thought about some alternative name? Maybe a secondary one for Nexus purposes at least. Finding this mod there is painful. This is what happens when I write "shop" is the search bar:

summer igloo
#

Any suggestion for name is welcome 😄

#

This was the one I could come up with fairly fast

neat mantle
#

"Loss Prevention"

summer igloo
#

Loss Prevention - AI and Thief Gameplay Overhaul, might do the justice

tame harbor
#

there's someone watching me. i can tell.

summer igloo
gaunt void
#

Supervised shops

round dagger
gaunt void
#

hmm, oh

#

Anti-Theft

round dagger
gaunt void
#

A.N.T.I.-T.H.E.F.T., Argonian-Proof Nocturnal Trespass Inhibitor - Thief Humbling Experiences For swiTs

summer igloo
summer igloo
#

I know the list is massive, let's pick a winner. I cannot decide myself 😄

icy bluff
#

Nowhere to Hide is pretty snappy, Anti-Theft is the clearest but We're Watching You, Scum just has that Morrowind charm

summer igloo
#

There are really good candidates, truly. Im also closest to the last one on the list ^^ But let's see

silent geyser
#

Anti-Theft gang

#

Utilitarian naming

icy bluff
#

Scum: Anti-Theft AI
Best of both worlds

summer igloo
#

Or
We're Watching You, Scum – Anti-Theft AI Overhaul (OpenMW) (but I'm really biased to that voice line 😄 - need unbiased votes haha)

round dagger
#

SCUM seems like something you could turn into an acronym 👀

neat mantle
round dagger
#

Anti-theft was my second choice

summer igloo
# summer igloo
poll_question_text

Let's choose the name (Nexus name) - You can choose more than 1 answer if you can't decide

victor_answer_votes

10

total_votes

40

victor_answer_id

10

victor_answer_text

We're Watching You, Scum – NPC Theft AI Overhaul

dense bobcat
#

Hi. I noticed a small problem with a trader in a "Suran, Ralds Oril: Trader". He stays behind a counter, and when I go upstairs he tries to follow me, but unable to open the counter. Maybe it's possible to fix.

west lava
#

How are interiors being chosen for this behavior? I'm experiencing a lot of "get out!"s in all kinds of places. Or is that some kind of interference from another mod?

summer igloo
summer igloo
brazen depot
#

Morgen @summer igloo , is there (or can be added) a way to check through an interface that noc is knocked out? Currently sneak is good now thinks that noc starts combat when you knock it ou (since you didnt kill it) and kicks you outa sneak, which is undesirable

summer igloo
summer igloo
#

The id is detd_sleep ? Or something like that, it’s in the sleep code

brazen depot
#

Oh yes thats perfect, 👍

#

Thanks

summer igloo
#

You’re welcome 🫡😊

silent geyser
#

Seems like SHOP is breaking Follower Commands. When any command with Travel package is issued, follower loses its Follow package

Easiest way to reproduce the bug:

  1. Install Follower Commands and Attend Me (to see exactly when the Follow package is lost)
  2. Issue a Travel command by looking into a wall or ground and pressing C
  3. Follower package gets lost as soon as Travel package is sent
summer igloo
narrow ether
#

Sorry, couldn't resist 36vehks

#

One day SHOP will return

silent geyser
#

as we say
the rat hanged themselves (in the fridge) scarytodd

summer igloo
#

Give me like a week or two, definitely not participating in week 4 modathon. Need to unburden myself of the backlog

narrow ether
#

understandable. It's not important whether it comes in a month or in two months. Just that it comes. There are many good ideas in SHOP and it will be good to do some cleaning 🧹.

summer igloo
#

It scares me though, so many ai behavior mods have been released since the last time I was working on SHOP😅 hopefully FDU from Sosnovyi will help with follower problem but Foxunder mods and Sit Down are another thing

icy bluff
#

Yeah Vaults Restricted is a cool mod with a similar goal to SHOP but smaller in scope. And with Liam's behaviour ai coming soon too it might be best to wait and see how that affects things 🤔 would you consider seperating the blackjack into a separate mod?

summer igloo
#

I might do that

#

We’ll see. It will need a major refactor anyway. Gonna be a pain the butt

icy bluff
#

Fair

narrow ether
#

If it worked, I'm sure that some players would use blackjack mod as standalone. SHOP is big and the bigger the mod is, the greater the chance that some features will turn people off and they will skip it... or even miss the fact that the feature is there.