Compatibility
LB Phone β Weather App
Madonne Seasons is fully compatible with the LB Phone weather application. With the integration enabled, the phone's weather app will automatically reflect all data driven by Madonne Seasons in real time:
π‘οΈ Temperature β Coherent with the current weather type and season
π¦οΈ Current weather β Matches the weather currently active in the player's zone
π Upcoming forecasts β Displays the next weather predictions for the player's zone
π§οΈ Precipitation β Updated based on the active weather
π Sunrise & sunset times β Dynamically computed based on the current season and year progression
π οΈ How to Set Up the Integration
Two files need to be edited inside the lb-phone resource. Both are located in the apps folder of the LB Phone resource.
π File 1 β weather.lua
weather.luaLocation: lb-phone > client > apps > default > weather.lua
This file handles the Lua-side logic that feeds weather data into the LB Phone app. Replace its content with the version provided below, which queries Madonne Seasons exports to retrieve the current weather, predictions, and sun times for the player's zone.
β οΈ The exact implementation may vary depending on your version of lb-phone. Refer to the existing file to understand how data is passed to the NUI layer, and adapt accordingly.
π File 2 β Weather-xxxx.js
Weather-xxxx.jsLocation: lb-phone > ui > dist > assets > Weather-xxxx.js
π‘ The
xxxxpart of the filename is a hash that changes with each LB Phone update. Look for the file starting withWeather-in the assets folder.
This file is the compiled JavaScript that handles the weather app's display logic. It needs to be updated to read the data provided by the modified weather.lua, including weather type mapping, temperature logic based on season, and precipitation values.
β οΈ This file is minified. Editing it requires care. We recommend using your browser's developer tools or a code formatter to make the content readable before editing.
The key parts to update are:
The weather type mapping β so that GTA weather names (
EXTRASUNNY,RAIN, etc.) correctly display the right icons and labels in the app UIThe temperature calculation β to return values coherent with the current season and weather type (e.g. warmer in summer, colder in winter with snow)
The forecast rendering β to display the
predictionsarray from Madonne Seasons instead of the default LB Phone forecast data
β οΈ Important Notes
These changes need to be reapplied after each LB Phone update, as the compiled JS file is regenerated.
The
weather.luafile may also be overwritten by updates to lb-phone. Keep a backup of your modified version.If you need help adapting the integration to your specific version of lb-phone, feel free to reach out on our Discord.
π¬ Need Help?
π¬ Discord: discord.gg/madonne
π Website: madonnestudio.com
π§ Email: contact@madonnestudio.com
Last updated