Patch 7 - the mod works as-is thanks to Norbyte's work on the Script Extender. You will need to acknowledge it as a 3rd party mod when loading your game.
Been trying to load this in patch 8 through BG3 MM, but even after activating the aura nothing seems to happen. I do have script extender installed, and Better Dyes is my only other mod. Any advice?
Love the mod. Solved one of the reasons I wasnt able to enjoy the game. I cant enjoy exploring if I need to open 200 containers in each room just in case.
Sadly, it breaks this other mod https://www.nexusmods.com/baldursgate3/mods/7891 which was also quite important for me
Hi. I tweaked the script for my own use and thought I'd share it here in case anyone is interested. Custom Script (pastebin link) to be placed at: \Baldurs Gate 3\Data\Mods\RevealingAuraSE\ScriptExtender\Lua\Server\RevealingAura.lua
It has the following changes: 1- The main (multi-colored) filter will not highlight owned items i.e. no red highlights in neutral areas like goblin or druid camp. 2- The Valuable (magenta) filter will highlight all valuables including owned items i.e. with the main filter and valuable filters on, owned items with a valuable inside will be highlighted. This will help players identify which containers may have valuable items worth stealing. 3- Reworked the Unimportant item filter to Stealing Filter (localization remains unchanged). Now, toggling the Unimportant filter will highlight ALL owned items, not just valuable ones. This will highlight all owned items in red in neutral areas (same behavior as the base script).
For default use, I would suggest to turn on the Main (multi-colored) filter and the Valuable (magenta) filter. You can also turn on the generic filter to highlight other interactables in the world like ladders and levers.
All credits to the mod author specially for being kind enough to publish the underlying script and leaving comments to allow for simpletons like me to edit it.
Lastly, if you want the full quad-facta, I would suggest to use:
I tried doing that but I couldn’t find a tag which applies to interactable items but not to decorative items. I’ll keep looking and will update the script if I find something like that.
Not as is. There were already so many buttons, I didn't want to add more. You could override the script and replace each occurrence of "return EFFECT_STEALING" with "return EFFECT_NONE".
hello im just a bit confused. i tried adding the pak file to the data folder. didnt work. i tried the torch method. didnt work. tried to add it to bg3 MM, but it wont detect the pak file??? love some advice please lol thank you
I am getting a lot of the following error message in Act 3. Description of where I was in the spoiler.
Spoiler:
Show
When I am up on the roof near the Open Hand Temple / Carnival area. The game seems to be running fine for some time, and crash to desktop after a while if I stayed there and not move.
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:181: attempt to index a nil value (field 'ServerItem') stack traceback: RevealingAuraSE/Server/RevealingAura.lua:181: in global 'IsValuableIventories' RevealingAuraSE/Server/RevealingAura.lua:230: in global 'GetEffect' RevealingAuraSE/Server/RevealingAura.lua:366: in global 'UpdateEffects' RevealingAuraSE/Server/RevealingAura.lua:471: in function <RevealingAuraSE/Server/RevealingAura.lua:398>
Screenshot of the game in the area where I am at.
Spoiler:
Show
================= Another error message I noticed that happens occasionally, I think it may be when I loot an item, and it attempts to Update the Effect or something? bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:374: attempt to compare number with nil stack traceback: RevealingAuraSE/Server/RevealingAura.lua:374: in global 'UpdateEffects' RevealingAuraSE/Server/RevealingAura.lua:437: in function <RevealingAuraSE/Server/RevealingAura.lua:398>
Updating line: 374's condition seems to stop the message for me, unsure if it's the right condition to check or way to fixed it though. if type(effect_idx) == "number" and effect_idx > EFFECT_NONE then
For the first error, I manage to find what was causing it. It was a corpse that was causing it. More description in the spoiler.
Spoiler:
Show
It seems to be Brilgor's corpse that was causing it. It's buried under the dirt mound and in a wooden casket. Behind the Open Hand Temple / Carnival. After attacking and destroying the coffin, and the body is out, the error message stops.
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:181: attempt to index a nil value (field 'ServerItem') stack traceback: RevealingAuraSE/Server/RevealingAura.lua:181: in global 'IsValuableIventories' RevealingAuraSE/Server/RevealingAura.lua:230: in global 'GetEffect' RevealingAuraSE/Server/RevealingAura.lua:366: in global 'UpdateEffects' RevealingAuraSE/Server/RevealingAura.lua:471: in function <RevealingAuraSE/Server/RevealingAura.lua:398>
Thanks for the detailed report. I think the issue ultimately is that an Item contains a dead Character inside of it, but the function assumes there are only Items. The effect id variable is internal to the mod, and it looks like a secondary issue caused by the first crash. Give me a bit to try out solutions.
Could you try this and see if it resolves both issues (without the check you added for type(effect_idx))?
Replace lines 181-189 with this:
if v.Item.ServerItem ~= nil then if IsValuable(v.Item) then return 2 end
if alljunk and not FastHasTag(v.Item, TAGS["JUNK"]) then alljunk = false end end
The local variable i wasn't actually needed. I added a check around the Item-specific functions. After that, It descends into the body as a container, so if the corpse has a valuable item, the parent container will get the proper shimmer effect.
I have reverted type(effect_idx) == "number" condition and updated IsValuableIventories() function. It did fix the first error with regards to the corpse.
Though the 2nd error still does occur. My guess is it attempts to invoke the UpdateEffects() function when I am picking/looting an item, and the item is being moved into my inventory which caused the error message (Feels like a sort of async / concurrent issue, I am not 100% sure about it though). But from what I notice it happens occasionally when I pick up/loot items lying around.
Below is the updated snippet of the code for you to check if I updated it correctly. Updated IsValuableIventories():
Spoiler:
Show
function IsValuableIventories(item, depth) if depth > 5 then _P("RevealingAuraSE - Inventory recursion limit reached") return 0 end
local alljunk = true for _,inv in pairs(item.InventoryOwner.Inventories) do for _,v in pairs(inv.InventoryContainer.Items) do if v.Item.ServerItem ~= nil then if IsValuable(v.Item) then return 2 end
if alljunk and not FastHasTag(v.Item, TAGS["JUNK"]) then alljunk = false end end
if v.Item.InventoryOwner ~= nil then -- nested container local container = IsValuableIventories(v.Item, depth + 1)
if container == 2 then return 2 elseif alljunk and container == 1 then alljunk = false end end end end
if alljunk then return 0 end
return 1 end
Screenshot of BG3 Script Extender Debug console when I am mass looting items lying around:
Spoiler:
Show
================= I think I noticed another stack trace message with regards to summoning 😢. When I do a summon (Tried summoning Us, Scratch, Dryad and Water Elemental and I am seeing the same message when I summon a creature. Also tried a different save character which is still in Act 1 with the same message when summoning Scratch.). Doesn't seem to cause any major issue like crashing though. BG3 Script Extender Debug Message: bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:93: attempt to index a nil value (field 'ServerToggledPassives') stack traceback: RevealingAuraSE/Server/RevealingAura.lua:93: in function <RevealingAuraSE/Server/RevealingAura.lua:83>
What jumps out at me from your log screenshot is that you have several ScriptExtender mods installed. The Autosell mod in particular would probably activate as you're picking up items. If there's no vendor to take the sold items, it might be deleting them in a way that's unnatural for the game. Normally, selling would just move it from a player inventory to an NPCs.
Can you confirm this still happens with all the other mods disabled? I tested summoning Scratch, no errors for me.
I will give what you suggest a try. Though unsure if I could unload all the mods but could probably still unload a good chunk of it to test. ================= So, after spending hours trying, I uninstalled a bunch of mods (not all) but couldn't quite find the possible conflicting mods. Auto Loot Seller and Bags Bags Bags - Reforged were the 2 mods that I unloaded first as based on your explanation these two were similar to what you had explained, but it doesn't seem to be the culprit. I will try to uninstall the other mods when I have the time and see if I could figure out which mod is causing a conflict.
Thanks. It's possible it might not be a mod conflict, but I can't fix something if I can't reproduce it. I will fix the bug you found with dead Characters for now. If you just want to play, you can use your workaround to get through it.
No worries, understandable that it will be difficult to fix if you aren't able to replicate the issue. As, you won't be able to know exactly the cause to fixed it to begin with, might just be mine setup or something. Appreciate your work and thanks in advance for implementing the fix for the corpse in the next update.
Posting to say, in response to your thread with mrabsentminded about the tollhouse, auras of any kind seem to cause memory leak issues in places with hidden areas? (i.e., the necromancer's lair in the blighted village, last light inn, auntie ethel's teahouse, etc. ) I'm only mentioning it because the non-SE version of this mod is not the only mod that causes this problem... for me it was Valdacil's Idol Auras Enhanced, but I am sure other aura-adding mods would cause the issue as well.
Thanks for clarifying what the problem is in these instances!
Thanks for the info. Auras are the most straightforward, but it looks like they didn't intend it for any kind of heavy use. It's rare for a scripted solution to outperform the native solution, but my map polling functions are pretty efficient. I think the approach could work for any kind of aura/proximity effect.
I've done a great deal of troubleshooting on this after it stopped working during my runthrough. Up until today it was working fine. I'm hoping this console error might make it obvious to you what's wrong, because nothing I've tried has worked.
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:345: attempt to perform arithmetic on a nil value (local 'x') stack traceback: RevealingAuraSE/Server/RevealingAura.lua:345: in global 'InRange' RevealingAuraSE/Server/RevealingAura.lua:337: in global 'InRanges' RevealingAuraSE/Server/RevealingAura.lua:456: in function <RevealingAuraSE/Server/RevealingAura.lua:398>
For whatever reason, one of your party members hasn't been assigned a physical location (x y z coordinate) on the map. I've added a check for this in v4.1.1.
That's very baffling! I checked just now to see if I was having the problem where a summon didn't dismiss properly by running _D(Osi.DB_Players:Get(nil)), but no errant mage hand or familiar came up. In any case, thank you so much for such a quick fix! I'm glad it was a simple check.
Sorry for the late reply I didn't get a notification from nexus. This is the error bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:264: attempt to perform arithmetic on a nil value (local 'x') stack traceback: RevealingAuraSE/Server/RevealingAura.lua:264: in global 'InRange' RevealingAuraSE/Server/RevealingAura.lua:256: in global 'InRanges' RevealingAuraSE/Server/RevealingAura.lua:375: in function <RevealingAuraSE/Server/RevealingAura.lua:317>
This is not the current version of the script, the line numbers don't match. Make sure you have the latest version of the .pak file in the game's Data folder. If you also extracted the loose file version of the script, it overrides the .pak copy. You need to either update it or remove it.
It's a fun word. There are dead bodies that are always dead and function like containers. And there are Characters that were alive at some point, but then they took some non-living (and probably reversible) status and their body became lootable as a result.
134 comments
Tested and working.
Sadly, it breaks this other mod https://www.nexusmods.com/baldursgate3/mods/7891 which was also quite important for me
Custom Script (pastebin link) to be placed at: \Baldurs Gate 3\Data\Mods\RevealingAuraSE\ScriptExtender\Lua\Server\RevealingAura.lua
It has the following changes:
1- The main (multi-colored) filter will not highlight owned items i.e. no red highlights in neutral areas like goblin or druid camp.
2- The Valuable (magenta) filter will highlight all valuables including owned items i.e. with the main filter and valuable filters on, owned items with a valuable inside will be highlighted. This will help players identify which containers may have valuable items worth stealing.
3- Reworked the Unimportant item filter to Stealing Filter (localization remains unchanged). Now, toggling the Unimportant filter will highlight ALL owned items, not just valuable ones. This will highlight all owned items in red in neutral areas (same behavior as the base script).
For default use, I would suggest to turn on the Main (multi-colored) filter and the Valuable (magenta) filter.
You can also turn on the generic filter to highlight other interactables in the world like ladders and levers.
All credits to the mod author specially for being kind enough to publish the underlying script and leaving comments to allow for simpletons like me to edit it.
Lastly, if you want the full quad-facta, I would suggest to use:
1- Aura of Revealing to reveal lootable items.
2- Customizable Auto Loot Aura - Item Pickup AoE for Obsessive Hoarders for auto looting (I use it with the 3m AOE to avoid unintentional ranged looting).
3- Automatic Inventory Manager (AIM) for automatic inventory assignments.
4- A bag mod (Simple Sorting Bags or Bags of Sorting - Bean's Preset with auto-sort function) for auto-sorting to bags.
With these 4, exploration and inventory management is a breeze. I have been using these 4 together and they work flawlessly.
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:181: attempt to index a nil value (field 'ServerItem')
stack traceback:
RevealingAuraSE/Server/RevealingAura.lua:181: in global 'IsValuableIventories'
RevealingAuraSE/Server/RevealingAura.lua:230: in global 'GetEffect'
RevealingAuraSE/Server/RevealingAura.lua:366: in global 'UpdateEffects'
RevealingAuraSE/Server/RevealingAura.lua:471: in function <RevealingAuraSE/Server/RevealingAura.lua:398>
Screenshot of the game in the area where I am at.
=================
Another error message I noticed that happens occasionally, I think it may be when I loot an item, and it attempts to Update the Effect or something?
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:374: attempt to compare number with nil
stack traceback:
RevealingAuraSE/Server/RevealingAura.lua:374: in global 'UpdateEffects'
RevealingAuraSE/Server/RevealingAura.lua:437: in function <RevealingAuraSE/Server/RevealingAura.lua:398>
Updating line: 374's condition seems to stop the message for me, unsure if it's the right condition to check or way to fixed it though.
if type(effect_idx) == "number" and effect_idx > EFFECT_NONE then
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:181: attempt to index a nil value (field 'ServerItem')
stack traceback:
RevealingAuraSE/Server/RevealingAura.lua:181: in global 'IsValuableIventories'
RevealingAuraSE/Server/RevealingAura.lua:230: in global 'GetEffect'
RevealingAuraSE/Server/RevealingAura.lua:366: in global 'UpdateEffects'
RevealingAuraSE/Server/RevealingAura.lua:471: in function <RevealingAuraSE/Server/RevealingAura.lua:398>
Screenshot of the location:
Replace lines 181-189 with this:
if v.Item.ServerItem ~= nil then
if IsValuable(v.Item) then
return 2
end
if alljunk and not FastHasTag(v.Item, TAGS["JUNK"]) then
alljunk = false
end
end
The local variable i wasn't actually needed. I added a check around the Item-specific functions. After that, It descends into the body as a container, so if the corpse has a valuable item, the parent container will get the proper shimmer effect.
Though the 2nd error still does occur. My guess is it attempts to invoke the UpdateEffects() function when I am picking/looting an item, and the item is being moved into my inventory which caused the error message (Feels like a sort of async / concurrent issue, I am not 100% sure about it though). But from what I notice it happens occasionally when I pick up/loot items lying around.
Below is the updated snippet of the code for you to check if I updated it correctly.
Updated IsValuableIventories():
function IsValuableIventories(item, depth)
if depth > 5 then
_P("RevealingAuraSE - Inventory recursion limit reached")
return 0
end
local alljunk = true
for _,inv in pairs(item.InventoryOwner.Inventories) do
for _,v in pairs(inv.InventoryContainer.Items) do
if v.Item.ServerItem ~= nil then
if IsValuable(v.Item) then
return 2
end
if alljunk and not FastHasTag(v.Item, TAGS["JUNK"]) then
alljunk = false
end
end
if v.Item.InventoryOwner ~= nil then
-- nested container
local container = IsValuableIventories(v.Item, depth + 1)
if container == 2 then
return 2
elseif alljunk and container == 1 then
alljunk = false
end
end
end
end
if alljunk then
return 0
end
return 1
end
Screenshot of BG3 Script Extender Debug console when I am mass looting items lying around:
=================
I think I noticed another stack trace message with regards to summoning 😢. When I do a summon (Tried summoning Us, Scratch, Dryad and Water Elemental and I am seeing the same message when I summon a creature. Also tried a different save character which is still in Act 1 with the same message when summoning Scratch.). Doesn't seem to cause any major issue like crashing though.
BG3 Script Extender Debug Message:
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:93: attempt to index a nil value (field 'ServerToggledPassives')
stack traceback:
RevealingAuraSE/Server/RevealingAura.lua:93: in function <RevealingAuraSE/Server/RevealingAura.lua:83>
Can you confirm this still happens with all the other mods disabled? I tested summoning Scratch, no errors for me.
=================
So, after spending hours trying, I uninstalled a bunch of mods (not all) but couldn't quite find the possible conflicting mods. Auto Loot Seller and Bags Bags Bags - Reforged were the 2 mods that I unloaded first as based on your explanation these two were similar to what you had explained, but it doesn't seem to be the culprit. I will try to uninstall the other mods when I have the time and see if I could figure out which mod is causing a conflict.
Thanks for clarifying what the problem is in these instances!
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:345: attempt to perform arithmetic on a nil value (local 'x')
stack traceback:
RevealingAuraSE/Server/RevealingAura.lua:345: in global 'InRange'
RevealingAuraSE/Server/RevealingAura.lua:337: in global 'InRanges'
RevealingAuraSE/Server/RevealingAura.lua:456: in function <RevealingAuraSE/Server/RevealingAura.lua:398>
bg3se::esv::lua::OsirisCallbackManager::RunHandler(): Osiris event handler failed: [string "RevealingAuraSE/Server/RevealingAura.lua"]:264: attempt to perform arithmetic on a nil value (local 'x')
stack traceback:
RevealingAuraSE/Server/RevealingAura.lua:264: in global 'InRange'
RevealingAuraSE/Server/RevealingAura.lua:256: in global 'InRanges'
RevealingAuraSE/Server/RevealingAura.lua:375: in function <RevealingAuraSE/Server/RevealingAura.lua:317>