Baldur's Gate 3
0 of 0

File information

Last updated

Original upload

Created by

Volitio

Uploaded by

VoIitio

Virus scan

Safe to use

About this mod

Automatically tag nearby containers with 'Empty' or their item count.­ Configurable via JSON and user-defined item lists, and is localized.

Requirements
Permissions and credits
Changelogs
Donations
Overview
Preemptively Label Containers aims to streamline looting by automatically labeling empty containers/corpses before you open them, while also being able to filter out items read from a JSON file (e.g.: rotten food, miscellaneous items with no particular use, etc). You can also label containers with the number of items inside if they're not empty, establish a DC for a perception check to determine whether a container should be labeled, configure various label options, etc.

The mod works out of the box, defaulting to appending '(Empty)' to the name of all nearby empty containers. Items commonly deemed as 'useless' are ignored by default. See the settings breakdown in the Configuration section below for more details.



By design, it does NOT save any of the labels or other info to your save. Instead, it dynamically updates container handles when scanning for nearby containers on a timer. This approach should be more efficient than the constant monitoring used by aura mods. Therefore, upon loading a save, container names return to their original state (they will be instantly updated again if the mod is enabled), as no changes are recorded to your .loca files or entities. This enables an easier uninstallation and avoids problems associated with lost references to string handles.

Players that use German, Polish, Russian, Simplified Chinese, Turkish, Traditional Chinese, Ukrainian, Korean, or Japanese translations: please let me know in the Posts tab if the mod works at all, if the label makes sense in your language, and what you would suggest as an alternative (I don't know if I can do anything about it though, but I can consider it). Also, note that some options detailed below might not work for non-Latin characters. Thanks!


Installation

  • Download the .zip file and install using BG3MM (recommended); Vortex is not recommended.

Requirements
Volition Cabinet
BG3 Script Extender (you can easily install it with BG3MM through its Tools tab or by pressing CTRL+SHIFT+ALT+T while its window is focused)

Configuration
When you load a save with the mod for the first time, it will automatically create a preemptively_label_containers_config.json file with default options.

You can easily navigate to it on Windows by pressing WIN+R and entering

explorer %LocalAppData%\Larian Studios\Baldur's Gate 3\Script Extender\PreemptivelyLabelContainers

Open the JSON file with any text editor, even regular Notepad will work. Here's what each option inside does (order doesn't matter):

"GENERAL":
"enabled": Set to true to enable the mod, false to disable it without uninstalling. Enabled by default.

"FEATURES": Defines various operational parameters of the mod.
"radius": Specifies how far (in meters) the mod searches for nearby containers. Default is 10 meters. The controller search radius is 5.
"refresh_interval": Determines how often (in milliseconds) the list of nearby containers is refreshed. Default is 500ms. Set it between 200-2000ms based on your CPU power.
        "also_check_for_party_members": Considers distant party members when searching for containers if true. Useful for multiplayer sessions. Enabled by default.

"labeling": Configuration for the labeling of containers.
 - "owned_containers"   : If true, labels containers owned by others (containers/corpses having red highlight). Enabled by default.
 - "perception_check_dc": Sets the difficulty for a 'fake' perception check to label a container. 0 means always successful. Default is 0.
                  - "always_relabel"
: Always update labels, even if containers have been labeled already. Enabled by default.
- "nested_containers": If true, will label nested containers. Disabled by default.
"label": Adjustments for the appearance and placement of labels.

 - "capitalize"             : Capitalizes the label if true. Enabled by default.
 - "add_parentheses"        : Adds parentheses around the label if true. Enabled by default.
 - "append"                 : Determines if the label is added before (false) or after (true) the container's name. Appends by default.
 - "simulate_controller"    : Tries to replicate the padded '(Empty)' label seen in the controller UI's search results if true. Disabled by default, as it looks bad when using the KB/M UI.
 - "display_number_of_items":
- "enabled"  : Shows the number of items in a container if true. Disabled by default.
- "if_empty" : Shows the number of items even if the container is empty. Enabled by default.

"filters":
 - "ignored_items": Items specified in 'ignored_items.json' (automatically created alongside the config file) will be ignored when counting container items if set to true. Enabled by default.

"DEBUG":
"level": Sets the verbosity of debug logs. 0 = no debug, 1 = minimal, 2 = verbose. Default is 0.

After saving your changes while the game is running, load a save to reflect your changes or run !plc_reload in the SE console.


Compatibility
- This mod should be compatible with most game versions and other mods, as it mostly just changes the handles of containers/corpses during runtime (and without serializing them). Using this with other mods that do the same (I'm not aware of any) might provoke unpredictable behavior where one handle change overwrites the other.
- Mods that create new containers should be compatible.
- Localization mods should be compatible.
- Multiplayer: only containers close to the host will be labeled, unless you set also_check_for_party_members to true.


Special Thanks

Huge thanks to Focus for the invaluable help during the early stages of this mod by showing me an alternative when I was about to give up on this idea!; to pavelk and Proxa for their insights when I was still naive enough to consider doing this through some UI interaction 😁; to folks over Larian's Discord server; and to Norbyte for the Script Extender.

Source Code
The source code is available on GitHub or by unpacking the .pak file. Endorse on Nexus and give it a star on GitHub if you liked it!

My mods
Waypoint Inside Emerald Grove - 'adds' a waypoint inside Emerald Grove
Auto Send Read Books To Camp - send read books to camp chest automatically
Auto Use Soap - automatically use soap after combat/entering camp
Send Wares To Trader - automatically send all party members' wares to a character that initiates a trade
Preemptively Label Containers - automatically tag nearby containers with 'Empty' or their item count
Smart Autosaving - create conditional autosaves at set intervals
Auto Send Food To Camp - send food to camp chest automatically
Auto Lockpicking - initiate lockpicking automatically

Tools/Resources
AV Item Shipment Framework - allows authors to easily send items to player/camp chests
Volition Cabinet - library mod for my other mods