Preset : Epic Free Games Tracker V6

Hello Kustomers,

This one is gonna be Epic. Rather than giving a long backstory, I will say that I made a game tracker a couple years back, but this one does much more. This is a KWGT preset that displays a number of things about the current free Epic Game that is being offered. This would not have been possible without Lootscraper, a set of RSS feeds and HTML pages generated. Link at bottom.

Thanks to their hard work, I was able to show the following data without the use of an API.

Game Title
Offer Dates
Metacritic Rating
Steam Rating
Steam Recommended by numbers
IGDB Ratings : see ##HIDDEN FOR NOW## group
Cover Art of the current game : Complex globals
Price of game in Euros : will add currency converter hopefully

Still need to add game description, other sources, and genre. I gave up on XML for most of it, but HTML might work with wg() formula

So without further ado, here is a more sustainable Game Tracker

Attribution

This took a long time and there were several versions. I added the github link to the repository.

Lootscraper Repo

Epic_Free_Games_Tracker_V6.kwgt (195.8 KB)

For reference, the older one from 2023 is here
Epic_Tracker.kwgt (584.0 KB)

4 Likes

V7 of this preset

Added a Metacritic touch action that sends you to the Metacritic site for the current game

Epic_Free_Games_Tracker_V7.kwgt (203.4 KB)

Video of it in action

Adding a touch action for the Steam button seems like it would take a lot of extra work because I would need to hardcode the steam id into a global and add it to the url. For now, this is on hold.

Hope you enjoy

1 Like

Version 8

Added gradients to make it pop

Epic_Free_Games_Tracker_V8.kwgt (203.6 KB)

Just a minor update, but it looks a lot more polished

1 Like

Urgent Hotfix Alert

HOTFIX : Something got messed up with the formulas. Trying to fix Metacritic portion, but the rest is good for now.

Version 9

Epic_Free_Games_Tracker_V9.kwgt (218.4 KB)

Version 10 - Fixed

Finally fixed it

Here is what changed, in summary

Fixed the Metacritic logic. The feed for this game does not contain the score on the lootscraper repo, but now it checks if that is the case. It also adjusts the margin depending on if the score is available.

Note: Tapping the green Metacritic square still sends you to the corresponding site

Major changes

Added a currency converter as a komponent. The proper credit is given in the komponent. Currently, it only converts from Euro to USD, but you can modify the url to EUR.Currency It is found in the rate global

Also, I made it so the url parses the game title minus special characters, since those are removed in the final Metacritic game url.

Note: keep EUR as the base in the url because that is the currency the developer of lootscraper has used.

For example, to convert from Euro to FOO (not a real currency) change the formula to

$wg("https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@2024-03-06/v1/currencies/eur.json", json, .eur.foo)$

Formula Update

For the latest currency rate, use

$wg("https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/eur.json", json, .eur.usd)$

Epic_Free_Games_Tracker_V10.kwgt (231.7 KB)

New Hotfix

Sorry to keep on doing this, but something keeps happening to the widget. I have added more checks to see if data that is supposed to show up does, if not then it displays a message.

V11

Epic_Free_Games_Tracker_V11.kwgt (230.6 KB)

Here is the messed up one for reference

Hotfix again

V12 adds a check for whether the release date is shown on the feed or HTML. I know the title of the game needs some width fixes, but I will get to it someday. Also, the use of a blue gradient for the check makes it look out of place, but it should be the last hotfix.

Here is the check in the overlap group with Fallback in its title

$if(tc(split, tc(reg, gv(ratings), "", ""), "", 17)~=17, REMOVE, ALWAYS)$

Epic_Free_Games_Tracker_V12.kwgt (210.1 KB)

Update

I filed an issue to the Github repo that has the source. Hopefully it gets fixed. The widget works except for the release date not displaying because it is not displayed on the repo source. I guess that I could add one more check for if the release date is there, then show it. However, this is not my priority at the moment. I will get it done though. Thank you for your continued patience and for the support and likes.

Issue 427

The developer has filed 2 separate issues that hopefully will add fallbacks

Issue 428

Issue 429

Okay, so the developer added what he said, but it completely broke some parts of the widget. I tried to keep most of my changes in the HIDDEN FOR NOW group. It was pretty much the following that broke.

Validity group
Metacritic group
Steam group
Released on logic fixed in V14
Price logic maybe - fixed in V14

I made it more future proof by adding a cut formula. This only shows the Offer valid from and to, Date from and to.

As always, here is what it looked like this morning, and what I fixed.

Version 13 - Hotfix Ultra

Epic_Free_Games_Tracker_V13.kwgt (209.3 KB)

I actually like the valid from and to scrunched up more than before. Anyways, this was quite the undertaking, and I hope this reduces stress for anyone who wants a working game tracker widget.

Version 14 - finishing touches

Epic_Free_Games_Tracker_V14.kwgt (206.9 KB)

Quick Fix 14.2 (I lost count)

If you can’t get the cover art to show, go to the Cover Art object in Root location and remove .png from the formula.

OLD $gv(imagKustom.png
NEW $gv(imagereg)$

The dev must have made some changes to the code, but it works this way now.

Happy Kustomizing

1 Like

Hotfix Version 16 (skipped a couple versions)

This fixes the widget getting jumbled by adjusting the values in the formulas affected. I can give a side by side, but for now I leave you with this build.

By the way, tapping on the cover art should switch between Epic mobile and Epic PC game offerings.

Epic_Free_Games_Mobile_Tracker_V16.kwgt (266.6 KB)

Changelog (this took a long time)

Fix - Changed the value of Price Fix formula from 26 => 23

Old formula

$if(tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 21)/gv(rate)>1, tc(cut, tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 26)/gv(rate),5))$ USD πŸ’°

New formula

$if(tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 21)/gv(rate)>1, tc(cut, tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 23)/gv(rate),5))$ USD πŸ’°


Fix - Changed the value of Released On Fix formula from 23 => 20

Old formula

$(tc(split, tc(reg, gv(ratings), \"[a-z]\", \"\"), \"\", 23))$

New formula

$(tc(split, tc(reg, gv(ratings), \"[a-z]\", \"\"), \"\", 20))$

Fix - Changed the value of Released On Fallback formula from 23 => 20

Old formula

$if(tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 23)~=2, REMOVE, ALWAYS)$

New formula

$if(tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 23)~=2, REMOVE, ALWAYS)$


Fix - Changed the value of Steam Badge > Platform formula from 2 => 4

Old formula

$if(tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 2)~=\"Steam\",\"No Price on RSS!!!\",\"Steam\")$

New formula

$if(tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 4)~=\"Steam\",\"No Price on RSS!!!\",\"Steam\")$

Fix - Changed the value of Steam Badge > Score formula from 6 => 3

Old formula

$if(gv(ratings)~=Steam, tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 6),🚧)$

New formula

$if(gv(ratings)~=Steam, tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 3),🚧)$


Fix - Changed the value of Positive Ratings- Steam > Positive from 8 => 5

Old formula

$if(tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 6)=x,NO Ratings on RSS ,tc(split,tc(reg, gv(ratings), \"\", \"\"), \"\", 8))$ Positive Ratings

New formula

$if(tc(split, tc(reg, gv(ratings), \"\", \"\"), \"\", 6)=x,NO Ratings on RSS ,tc(split,tc(reg, gv(ratings), \"\", \"\"), \"\", 5))$ Positive Ratings

Those are all of the changes I could find.

Update : Please revert to version 14.2

The one with the cover art fix, but really it is version 14.

Version 14 preset

Just remember to delete the .png text in the cover art formula

1 Like

Update on the new design

Contemplating on using the official backend url as a source.

https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=en-us

Official Update

Changelog of Epic Widget

I finally have gotten around to fixing the widget. There is a lot to go over, so get ready.

New Source

As mentioned in this message a couple of weeks ago, I decided to use the official Epic Games backend (props go to Epic Games Tracker Siri Shortcut for using this backend url in their Apple Shortcut). This backend is much easier to parse, and I finally figured out how to use XPATH to query the price (props go to this awesome post Firebug lite on Stack).

The article talks about creating a bookmarklet ( a little line of javascript) to mimic the Firefox Firebug functionality. In essence, I am able to go to almost any website, highlight a piece of the website (price in this case), tap the bookmarklet, and expose the xpath element. I plugged it into the Kode editor, and it shows the price much easier.

What happened to the old source? It is still there, so attribution is referenced, but it is behind the leaner redesign. Here is the breakdown

Old design had 29 slots
#######
8 objects
5 groups (plus 1 DEBUG group)
15 globals
#######

The new design has 12 slots
#######
5 objects
3 groups
1 stack
3 globals (ratings, valid, priced)
#######

Now, it references the new source for Cover Art, Currency, and Game Title, but retains the old source for when it makes sense.

Show me the Kode

Game Title Backend

$wg("https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=en-us", json, .data.Catalog.searchStore.elements.[1].title)$

Cover Art Backend

$wg("https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=en-us", json, .data.Catalog.searchStore.elements.[1].keyImages.[2].url)$

Currency Stack :laughing: (yes it is a pun)

Price Fix Test (working title)

$tc(split, tc(reg, gv(pricing/priced), "", ""), "", 3)$ EUR πŸ’Ά

Price Fix Backend (working title)

$if(tc(split, tc(reg, gv(pricing/priced), "", ""), "", 21)/gv(rate)>1, tc(cut, tc(split, tc(reg, gv(pricing/priced), "", ""), "", 3)*gv(rate),5))$ USD πŸ’°

As you can tell, it is less to fiddle with, and it looks polished.

I am calling it

Epic Free Games Mobile Tracker Alternate V2

That should not break any time soon. This project has taught me a lot in terms of the inner workings of APIs, XPATH, bookmarklets, the forum, and PATIENCE. I am grateful for all of the views and the support, and to Frank for creating KWGT in the first place.

Epic_Free_Games_Mobile_Tracker_Alternate_V2.kwgt (480.6 KB)