SKSE64 Plugin · SE / AE · Runtime Patcher
Portal Strict Lights Patcher
SKSE64 SE / AE No ESP Runtime patch ShadowScene fix Open source
Description
Portal Strict Lights Patcher is a SKSE64 plugin that sets the portal-strict flag on placed lights, equipped torches, and spell/magic lights at runtime. This prevents interior lights from bleeding through walls and portals, fixing one of the most common visual artifacts in Skyrim's lighting system without requiring any ESP patch.
Requirements
⚙️SKSE64 — Skyrim Script Extender, required for all SKSE plugins.
📚Address Library for SKSE Plugins — provides version-independent address resolution.
🔧Visual C++ Redistributable 2019+ — required runtime for compiled C++ plugins.
Features
💡
Placed Lights
Sets the portal-strict flag on all static placed lights in interiors at load time, preventing light bleeding through walls and cell boundaries.
🔦
Equipped Torches
Applies the same fix to torch lights attached to actors, ensuring hand-held torches do not bleed through geometry when carried by the player or NPCs.
✨
Spell / Magic Lights
Patches spell-cast and magic-effect lights dynamically, covering Candlelight, Magelight, and other effect lights that are spawned at runtime.
✓ Interior lights stop leaking through walls — torches and magic lights keep working correctly inside cells.
About ShadowScene Node crashes: some users experience CTDs related to the ShadowScene lighting node, typically triggered by a large number of active shadow-casting lights. This plugin reduces the frequency of those crashes by limiting how many lights cast shadows outside their intended area, lowering overall shadow-light pressure on the engine.
How It Works
Scan on cell load: when a new interior cell is loaded, the plugin iterates over all placed light references in that cell and reads their current NiLight flags.
Flag injection: for each light that does not already have the portal-strict flag, the plugin sets it directly on the NiLight node in memory, with no ESP or record modification required.
Dynamic light tracking: equipped torches and spell lights are tracked through SKSE events. Whenever a new light is attached to an actor or spawned by a magic effect, the flag is applied immediately.
No persistent changes: all patches are applied at runtime and reset with each new game load. The plugin leaves no trace in saves and does not modify any game records.
Optional xEdit Patcher
Optional — xEdit / zEdit
An optional xEdit patcher is available in the Files section. It permanently bakes the portal-strict flag into light records in your load order, so the runtime plugin does not need to patch them each load. Recommended for larger load orders with many custom interiors. The runtime plugin remains compatible whether or not the patcher has been applied.
Configuration
The plugin creates a PortalStrictLightsPatcher.ini file in SKSE/Plugins/ on first launch. Available options:
; Portal Strict Lights Patcher — configuration file ; Located at: Data/SKSE/Plugins/PortalStrictLightsPatcher.ini [Filters] ; Patch placed lights in interior cells bPatchPlacedLights = true ; Patch lights attached to equipped torches bPatchTorchLights = true ; Patch lights created by spell and magic effects bPatchMagicLights = true ; Also apply to exterior cells (experimental) bPatchExteriors = false [Log] ; Log level: 0=off, 1=errors, 2=warnings, 3=info, 4=debug iLogLevel = 2 [Debug] ; Print patch count to log on each cell load bLogPatchCount = false ; Log the FormID of each patched light bLogFormIDs = false
Compatibility
✓Lux / Lux Orbis / Lux Via — fully compatible. The plugin patches lights regardless of their origin mod.
✓ENB — compatible with all ENB presets. The portal-strict flag is a game-engine property, not a shader parameter.
✓Realistic Lighting Overhaul / ELFX / Relighting Skyrim — compatible. No shared records modified.
✓Dynamic things and interior lighting mods — compatible, including mods that add lights via scripts at runtime.
⚠Skyrim VR — untested. Address Library VR edition may be required; results are unverified.
What to Expect
After installing and launching the game, you should notice the following changes in interiors:
- Candlelight and other placed lights no longer bleed through walls into adjacent rooms.
- Torch light stays contained to the area visible from the torch's position.
- Magic lights (Candlelight spell, Magelight) behave correctly within rooms and corridors.
- Overall shadow-cast light count is lower, which may reduce ShadowScene-related CTDs.
Performance impact is negligible. The patching step runs once per cell load and adds no per-frame overhead.
Frequently Asked Questions
Do I need an ESP or a bash patch?No. The plugin operates entirely at runtime and does not modify any game records. No ESP is required, and it does not need to be included in a bash or smash patch.
Is this save-safe to add or remove mid-playthrough?Yes. Because the plugin applies its changes at runtime each time a cell loads, it can be added or removed at any point without affecting your save file.
Does this conflict with other lighting overhauls?No conflicts have been identified. The plugin reads and sets a single NiLight flag in memory and does not touch ESP records, so it is compatible with any lighting mod regardless of load order.
Will my game crash more or less after installing this?Users with frequent ShadowScene Node crashes generally report fewer crashes after installing, since fewer lights are competing for shadow-casting slots. The plugin itself introduces no additional instability.
Credits
Truman — original research into the portal-strict flag and its effect on Skyrim's lighting system.
Bottle, Robert, Ivy, Blackread — testing and feedback throughout development.
Quantumyilmaz and RavenKZP — CommonLibSSE-NG assistance and code review.
The Modding Guild — community support and documentation.
Si vous souhaitez soutenir le développement :









Comments (0)
Log in to post a comment.
This thread is open for discussion.
Be the first to leave a community review!