fnbr.js
fnbr.js copied to clipboard
Added new properties to TournamentWindow
- resolvedLocations: list of resolved locations used for cumulative stats and rank-based results (Bronze, Gold, Unreal, etc.).
- leaderboardDefs: serializable list mapping leaderboardDefId to its associated payout table.
- Added additional types to support the new data structures.
This is how my personal project works.
For example:
eventId: epicgames_S39_MobileSeriesJan_NAC
windowId: S39_MobileSeries_JanRound1_NAC
resolvedLocations: [
"Fortnite:epicgames_S39_MobileSeriesJan_NAC:S39_MobileSeries_JanRound1_NAC",
"Fortnite:epicgames_S39_MobileSeriesJan_NAC:S39_MobileSeries_JanRound1_NAC_3",
"Fortnite:series:epicgames_S39_MobileSeriesJan_NAC_Qualifier3_series"
]
this
metadata: {
hideScoreLocationsIndexes: [
0
]
By default, getWindowResults was used eventId and windowId, with this data, but this returns the default results (with index being 0 in resolvedLocations), and if we view the results, they will show 0 points. And if we look at hideScoreLocationsIndexes, it indicates that index 0 is hidden, and the rest are hidden. It would show the results displayed on the website or in the game (Round 1 results and cumulative series results).
so something like this could be used for example:
const hidden = new Set(w.metadata.hideScoreLocationsIndexes ?? []);
const parsed = w.resolvedLocations
.filter((_, i) => !hidden.has(i))
.map(loc => {
const [, eventId, eventWindowId] = loc.split(':');
return { eventId, eventWindowId };
});
and thus be able to use it with getWindowResults