The Witcher 3
0 of 0

File information

Last updated

Original upload

Created by

mandelbrodt

Uploaded by

mandelbrodt

Virus scan

Safe to use

Tags for this mod

About this mod

A patch for the mod 'Darker Nights' by shaedhen, making transitions into/from night completely smooth and seamless. Also works with Friendly Meditation, allowing for seamless transitions into/from night while meditating.

Requirements
Permissions and credits
Changelogs
What it does

This patch fixes an immersion-breaking bug in the mod Darker Nights by shaedhen,  by changing how the transitions to/from night work. The bug really bothered me and the author doesn't seem to be active anymore, so I decided to fix it myself.
With this patch, if and only if any of the mod's settings are changed during a transition, darkness will be reintroduced at an intensity calculated based on how far you are into the transition and blend smoothly throughout and after the rest of the transition. This allows you to pause during a transition, change intensity values and darkness start/end hours in the menu, and resume to darkness at an intensity that it would have been at if you had entered the transition with the new values and waited up until that point. If you did this in the original mod, the darkness would abruptly change upon resuming, even if you hadn't changed anything, and it would abruptly change again at the end of the transition.
Contained in the main file is also an optional patch for the mod Friendly Meditation by wghost8making the above effect compatible with real-time meditation, i.e. seamless darkness transitions while meditating with both mods. If you are using Friendly Meditation with Darker Nights then this optional patch is highly recommended. Without it, a transition would continue at the increased game speed from during meditation if you exited meditation during one, and darkness may also suddenly deactivate while meditating during a transition.



Updates

As of version 2.0 (full changelist below), darkness settings can be configured separately for each area, or optionally through a single set of global settings. I tried to tweak the settings for each area so that transitions in each of them felt as natural as possible (with Wiedzmin Lighting mod) - these are stored in the 'Default' preset for each area in the menu.
Unfortunately, the 'darkness_upon_us.env' variable in the original mod leaves bright red/yellow clouds around the horizon near the sun when darkness is activated above 0 intensity during or close to daytime, including well before/after sunrise/sunset. If you want, you can get rid of these by tweaking the settings so that darkness ends/starts well before/after sunrise/sunset.
NOTE: The .env variable also leaves an extremely apparent white glow around the horizon whenever activated at night in Toussaint, so at the moment it is recommended to disable the mod in Toussaint (just set intensity to 0). I tried to fix this this but to no avail, so if you are experienced in tweaking env files, any suggestions/fixes are welcome (turning the alpha of 'fxSkyRain' down to something absurdly low seemed to remove it for half of the sky, i.e. the glow persisted in a semicircle around the horizon that flips direction around midnight...)

This patch (both main and lite versions) removes dependency of Darker Nights on Custom Localization Fix to display names correctly. If you don't have any other mods depending on Custom Localization Fix, feel free to uninstall it after installing this patch.

Translations are welcome (instructions in 'modDNNew/localization').



Download

Main file requires Darker Nights AND Unification Patch, and, if you want to experience smooth Darker Nights transitions with real-time meditation, Friendly Meditation. There is also an optional lite version of this patch that doesn't require Unification Patch (or Friendly Meditation), with bare modifications to only the original Darker Nights files.

UPatch-compatible version of Darker Nights courtesy of wghost81.



Installation/Update

All required mods must be the latest versions

1. Copy 'modDnNew' folder into mods folder. Replace.
2. Copy 'modDnNew/bin' folder into Witcher 3 main folder. Replace.
(If you are using the main version and want just the UPatch-compatibility patch OR if you are using the lite version then re-merge if necessary and stop here)

3. Copy 'modFriendlyMeditation' folder into mods folder. Replace.
4. Re-merge. There will be a conflict when merging 'meditationWaiting.ws', but just select the line from Friendly Meditation (it should be just whitespace). If you get tired of doing this each time, then delete the conflicting line from Darker Night's 'meditation.ws'.



Notes


- You'll have to readjust all your intensity values after installing the patch, as this patch only uses one .env variable to create the darkness effect whereas the original mod uses two. For your convenience, use this formula to preserve your original darkness levels: I_new = I_old * (3 - I_old) / 2, where I_old is the value you used with the original mod (normalized between 0 and 1), and I_new the value to use with this patch to match the original level of darkness.
- Full explanation of changes in 'r4Player.ws', if you are interested (Ctrl-f "mandelbrodt").




Further debugging

This mod also tries to fix all cases in the original mod where the function to update the darkness depending on the time isn't called (or isn't called correctly) when it needs to be, resulting in vanilla (or not dark enough) nights. The cases I've come across and fixed so far are:
- Loading a saved game (the original mod calls the update function too early in the spawn sequence - before a certain variable (CurrentArea) is defined.
- Waking up after being killed by guards (the sequence for this speeds up the game time, which throws off day/night cycle)

If you're using this patch and the darkness effect is suddenly off or lower than its set value after a loading screen, a cutscene, being teleported, etc., please report it so I can expand this list and improve the patch.




Credits

shaedhen - Author of Darker Nights
wghost8 - Author of Friendly Meditation and creator of Unification Patch-compatible version of Darker Nights