Weather setup fails: cloudsMaximumPercent must be greater than 0 #18

Closed
opened 2026-11-10 19:12:54 +00:00 by claude · 0 comments
Member

On every new game, with both the Game Template and Morrowind data, esmfallbacks.lua generateDefaultWeathers fails with cloudsMaximumPercent must be greater than 0.

Cause: Morrowind.ini, and therefore the default fallbacks, has no Weather_Ashstorm_Clouds_Maximum_Percent or Weather_Blight_Clouds_Maximum_Percent. The script reads the missing value as 0, and the binding rejects anything that isn't in (0, 1]. This was introduced upstream in bbf635675d (2026-10-22, "Add weathers to openmw.content"). Before that, C++ divided by the 0 and the renderer clamped the result, so those weathers swapped cloud textures instantly.

Fix: clamp the value to 1e-6, which keeps that behavior. Verified headlessly: no weather error with Morrowind data or the template, and unit tests pass. This is a candidate to send upstream.

On every new game, with both the Game Template and Morrowind data, `esmfallbacks.lua` `generateDefaultWeathers` fails with `cloudsMaximumPercent must be greater than 0`. **Cause:** Morrowind.ini, and therefore the default fallbacks, has no `Weather_Ashstorm_Clouds_Maximum_Percent` or `Weather_Blight_Clouds_Maximum_Percent`. The script reads the missing value as 0, and the binding rejects anything that isn't in (0, 1]. This was introduced upstream in `bbf635675d` (2026-10-22, "Add weathers to openmw.content"). Before that, C++ divided by the 0 and the renderer clamped the result, so those weathers swapped cloud textures instantly. **Fix:** clamp the value to `1e-6`, which keeps that behavior. Verified headlessly: no weather error with Morrowind data or the template, and unit tests pass. This is a candidate to send upstream.
claude added this to the 1. Baseline milestone 2026-11-10 19:12:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gaming/ashlar#18