Log Context to Console (for Modding Toolkit)
🟠 Updated over a year ago⚠️ Install Order · 2 steps
Install in this order, then this mod last — most mods fail to load without their framework and dependencies in place.
Preview

🔍 Analysis
- 🏆 #11 of 98 Utilities mods in this game by downloads
📋 About This Mod
Adds a function for logging context-data like 'context.Source' to the BG3-Toolkit console (useful for debugging spells, statuses, passives etc.).
Adds the stat-functor 'LogContextToConsole()' to the modding-toolkit, for logging things like 'context. Source' to the console (useful for debugging spells, statuses, passives etc.).
Installation
To install it globally when working on any mod, extract the 'Data' folder to your base Baldur's Gate 3 folder.
The folder structure should be something like:
/Baldurs Gate 3/Data/Scripts/thoth/helpers/LogContextToConsole.khn
Alternatively if you just want it when working on a single mod, copy the 'Scripts' folder to your specific mod.
The folder structure should be something like:
/Baldurs Gate 3/Data/Mods/<YOURMOD_00000000>/Scripts/thoth/helpers/LogContextToConsole.khn
LogContextToConsole(,)
The function takes an optional 'contextData' entry as an input (defaults to the full 'context'), and an optional 'maxDepth' entry that you can specify to only go X levels deep when parsing nested data structures (useful for limiting the length of the logged data if you're hitting the ~16,000 error-string length limit).
When the function is called by whatever it's attached to (like a spell, status, passive etc.), it will throw a runtime error that will log the context-data to the modding-toolkit console (the area at the bottom of the modding-toolkit, see the preview screenshot below).
Example usage:
data "OnApplyFunctors" "IF(LogContextToConsole()):ApplyStatus(CHILLED,100,1)"
data "OnApplyFunctors" "IF(LogContextToConsole(context. Source)):ApplyStatus(CHILLED,100,1)"You can put the function into any of the conditional/IF() parts of a stat-entry (spells, passives, statuses etc.), and when that conditional check is triggered, it will throw a runtime error to log the specified context-data into the modding-toolkit console (it will show up as a 'Condition execution failed:' error in the console).
Clicking on the ''Condition execution failed:'' error in the console will expand it and allow you to select and copy+paste the logged data to actually examine it. The data is in a JSON format, so to make it human readable you'll want to throw it into a JSON formatter/linter (like JSON Editor Online) to give it proper indentation etc. (I couldn't pretty-print it by default as the data tended to get cut-off).
📊 Mod Details
- Game
- Baldurs Gate 3 Mods
- Author
- Bluesatin
- Version
- 0.4.0
- Downloads
- 131
- Endorsements
- 8
- Category
- Utilities
- Created
- 10/18/2024
- Updated
- 11/14/2024
🔧 How to Install Baldurs Gate 3 Mods
Download from Nexus.
📖 Full step-by-step install guide for Baldurs Gate 3 →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for Baldurs Gate 3 commands, item IDs, and more.
Keep browsing — more Baldurs Gate 3 mods await