Before you can fetch any weather data, GodotNWS needs to know where you are. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/OdintheDoggo/GodotNWS/llms.txt
Use this file to discover all available pages before exploring further.
Nws singleton contacts the NWS /points endpoint to resolve your coordinates into a forecast grid, observation stations, and all the internal URLs used by every subsequent fetch call. Nothing else will work until this setup step completes successfully.
Choosing a Setup Method
GodotNWS offers two ways to provide your location. Pick the one that fits your game’s design:- Explicit Coordinates
- IP Geolocation
Use
Nws.setup() when you already have a latitude and longitude — for example, from a location the player typed in, a map pin, or a saved game file.setup() accepts latitude and longitude as float values. It stores them internally and immediately fires the /points lookup.The location_setup_complete Signal
Setup is asynchronous. After calling either setup method, GodotNWS makes at least two HTTP requests before it is ready. The location_setup_complete signal fires only after both the /points data and the nearest observation station list have been fetched.
Always connect to location_setup_complete before calling setup() or setup_ip(). If you connect after the call, you risk missing the emission entirely.
The Nws.SetUp Property
Nws.SetUp is a bool that starts as false and flips to true the moment location_setup_complete is emitted. Every fetch method calls Check() internally, which contains:
Nws.SetUp.
Changing Location During Gameplay
If your game allows players to switch between cities or regions, callsetup() again with the new coordinates. The singleton’s internal URLs will be overwritten and location_setup_complete will fire again once the new grid is resolved.