AEBS Weather Fix
Fixes a bug introduced in Build 42.15 where AEBS (Automated Emergency Broadcast System) weather broadcasts display raw format placeholders "%s" instead of actual temperature, humidity, and wind values.
Before:
After:
- Self-disabling — Automatically switches to passthrough mode once the bug is fixed upstream. No harm if you forget to unsubscribe, but unsubscribing is recommended.
- All languages — Works with every language. This mod fixes the escaping at display time without modifying any translation data.
- Lightweight — Minimal implementation that overrides a single game function.
- Requires: Build 42.15+
- Singleplayer and Multiplayer
- No conflicts with other mods (only overrides getRadioText)
Check your console or log file for one of the following messages:
In Build 42.15, the translation system was refactored and the file format migrated from .txt (Lua-style key = "value") to .json. As part of this change, Translator.java now applies percent-escaping (% → %%) to all loaded values for use with Java’s String.format.
This works correctly for most translation categories processed on the Java side. However, AEBS weather broadcast texts (DynamicRadio category) are passed directly to Lua via getRadioText() and processed by Lua’s string.format. Since the Java-side unescaping is never applied, %%s is interpreted as a literal %s by Lua, causing the raw placeholders to appear in broadcasts.
Overrides getRadioText() to unescape %% back to % before returning values to Lua. On the first call, it uses a canary key (AEBS_temperature) to auto-detect whether the double-escape bug is present. If the bug is not detected, the original function is used as-is.
- AEBS_temperature (temperature and humidity)
- AEBS_wind_0 (wind direction and speed)
- AEBS_weather_warning (severe weather alerts)
- AEBS_weather_0_a / _c (weather forecast periods)
- AEBS_random_0–3 (random AEBS transmissions)
- Bug Report #92451[theindiestone.com]
Workshop ID: 3687634406
Mod ID: AEBSWeatherFix