clapfoot / warapi

The War API allows developers to query information about the state of the current Foxhole war.
Other
127 stars 10 forks source link

Enhancement Request - Add Restarting Flag to Dynamic Maps API #120

Open attrib opened 11 months ago

attrib commented 11 months ago

Issue Description: It is suggested to introduce a restarting flag within the dynamic maps API or the available maps route. Ideally, this flag would be set to true during the server's 2-minute cooldown phase. The purpose of this flag is to prevent the update of the current map and to inform users that the server is temporarily unreachable.

Problem Description: The issue is currently visible on foxholestats.com, where the problem is visually manifested.

image

The towns in the screenshot were never captured, yet the API initially responded with "town not captured" followed shortly by "town captured," resulting in a misleading "recent" change. A similar scenario was experienced in-game, where the hex appeared grayed out, followed by displaying white and blue subregions with no structures or intel. Eventually, all subregions turned blue, intel became available, and a red marker indicating reboot mode appeared.

Proposed Solution: The addition of a restarting flag would allow services like foxholestats.com and other mapping tools to utilize this information. By checking the flag, these tools can refrain from updating recent changes and displaying them in the event log during the server's reboot phase.

Note: This enhancement is crucial for maintaining the accuracy of displayed information and preventing confusion among users relying on the dynamic maps API.

Yin117 commented 11 months ago

I concur.

And related

philipdiehl1 commented 10 months ago

Does this occur every time a server restarts, or only sometimes?

attrib commented 10 months ago

Always, as mentioned its the same issue in game.

You only see it on the map sometimes, as it depends when it happens as most common sites request the API only every 30-60s. So if this bad state while booting happens between the calls you do not notice it. As higher you setup the frequency of the calls to the API as more can this issue seen.

Yin117 commented 10 months ago

I only poll the API once every 10mins, and I still catch the occasional issue.

hayden-t commented 6 months ago

Hey I worked out a way to stop this being a problem, now server restarts dont get shown on my map (foxholestats). Basically I dont reset my town cap timers (the counter that i use to calc the shading) unless the sector is taken by another team, just going noot (which happens during reset) doesnt. Since that my map has been fine.