Luzefiru / wuwatracker

wuwatracker.com - A Collection of Wuthering Waves Tools; Pity Tracker, Ascension Planner, Game Calendar, Database and more!
https://wuwatracker.com
146 stars 41 forks source link

Dynamically Display Banners & Assets #26

Closed Luzefiru closed 4 months ago

Luzefiru commented 5 months ago

Problem

We are currently hardcoding all our information taken from various sources inside /src/data. Whenever a new banner exists, we have to manually edit the website, or else we will be outdated. In the worst case scenario, for example, a banner's cardPoolType sort of acts like a unique ID to distinguish a banner.

cardPoolId our code name ingame name (EN) cardPoolType
1 Jiyan, Yinlin Featured Resonator Convene Resonators Accurate Modulation
2 Jiyan Weapon, Yinlin Weapon Featured Resonator Convene Resonators Accurate Modulation - 2
3 Standard Resonator Banner Standard Resonator Convene Weapons Accurate Modulation
4 Standard Weapon Banner Standard Weapon Convene Full-Range Modulation
5 40 Beginner Banner Beginner Convene Starter Modulation
6 80 pull selector Beginner's Choice Convene 6
7 Selector Ticket Beginner's Choice Convene (Giveback Custom Convene) 7

It's very inefficient to manually make a pull to get this information.

Possible Solution

Crawl their API to see if there are any other endpoints to get the data. I personally do not have any experience in data mining, but if the metadata in found in the files, we can at least get the data consistently and update the site ASAP for future banners.

Alternative Solutions

Instead of getting these data from their APIs, just manually do it, but find a more credible source for the metadata and cross-check it with the pulls generated form the history API.

Additional Context or Screenshots

Here is a sample JSON response from https://gmserver-api.aki-game2.net/gacha/record/query with the proper request body:

{
    "code": 0,
    "message": "success",
    "data": [
        {
            "cardPoolType": "Resonators Accurate Modulation - 2",
            "resourceId": 21010016,
            "qualityLevel": 5,
            "resourceType": "Weapons",
            "name": "Verdant Summit",
            "count": 1,
            "time": "2024-05-28 17:38:32"
        },
        {
            "cardPoolType": "Resonators Accurate Modulation - 2",
            "resourceId": 21030023,
            "qualityLevel": 3,
            "resourceType": "Weapons",
            "name": "Originite: Type III",
            "count": 1,
            "time": "2024-05-28 08:36:08"
        }
    ]
}
Luzefiru commented 5 months ago

Interesting, it seems Kuro Games decided to just merge all 5-star characters & weapons into the same pools. So, Jiyan & Yinlin are in cardPoolId: 1 and their weapons are in cardPoolId: 2. I was hoping they would just create more gacha pools so that I could track banner sales.

This means that we don't have to manually update the website outside the static images for now and that pity tracks correctly as of v1.2.2-beta.

sammy6345 commented 5 months ago

With the character icons for sequences being pulled from wanderer.moe, are the any other image resources that would still need to be dynamically pulled (other than image banners like from the news.)

Sidenote, the standard banner cardPullType is "Weapons Accurate Modulation"

Luzefiru commented 5 months ago

Sidenote, the standard banner cardPullType is "Weapons Accurate Modulation"

Thank you.

With the character icons for sequences being pulled from wanderer.moe, are the any other image resources that would still need to be dynamically pulled (other than image banners like from the news.)

I think that's about it as far as I know. The wanderer.moe resources are hardcoded into the code and same goes for the current banner metadata. This means that every banner patch, we'll have to manually edit the data to keep it updated. I want to explore on how I can let it update as hands-free as possible in the future.

Not sure yet.

Luzefiru commented 4 months ago

Not dynamic, but we made it a communal effort to updating them since our assets are public now. Closing this issue in the meantime.