ByMykel / CSGO-API

An unofficial JSON API for Counter-Strike 2 in multiples languages. List of skins, cases, stickers, collections, collectibles, agents, graffiti, keys, patches and music kits.
https://bymykel.github.io/CSGO-API/
MIT License
296 stars 34 forks source link

Different images for different wears #103

Closed HermesDE closed 8 months ago

HermesDE commented 8 months ago

Is it somehow possible to get an image for every possible wear? Currently every skin in skins.json only has one image.

ByMykel commented 8 months ago

hmm without scapping I don't thing so. The game files have 3 images per skin:

light medium heavy
image image image

This is the most I can try to do.

If this solutions is enough for you, you can take any skin image and change the substring _light_ for one of the words in the table.

{
    "id": "skin-65604",
    "name": "Desert Eagle | Urban DDPAT",
    "image": "https://raw.githubusercontent.com/ByMykel/counter-strike-image-tracker/main/static/panorama/images/econ/default_generated/weapon_deagle_aa_flames_light_png.png"
}
ByMykel commented 8 months ago

I have made some changes in skins_not_grouped.json to use also de medium and heavy image for skins.

You can check it live here

WhoisUnknown commented 8 months ago

Is this selection of images approximate or exact?

HermesDE commented 8 months ago

hmm without scapping I don't thing so. The game files have 3 images per skin:

light medium heavy image image image This is the most I can try to do.

If this solutions is enough for you, you can take any skin image and change the substring _light_ for one of the words in the table.

{
    "id": "skin-65604",
    "name": "Desert Eagle | Urban DDPAT",
    "image": "https://raw.githubusercontent.com/ByMykel/counter-strike-image-tracker/main/static/panorama/images/econ/default_generated/weapon_deagle_aa_flames_light_png.png"
}

Thank you for the fast reply. Good to know that with the substring but its not quite what im looking for. Best thing would be something where I can put in a float and it gives me the appropriate image. Like the screenshot tools some marketplaces have. I would even build an API like that by myself but I dont know how to start.

ByMykel commented 8 months ago

hmm without scapping I don't thing so. The game files have 3 images per skin: light medium heavy image image image This is the most I can try to do. If this solutions is enough for you, you can take any skin image and change the substring _light_ for one of the words in the table.

{
    "id": "skin-65604",
    "name": "Desert Eagle | Urban DDPAT",
    "image": "https://raw.githubusercontent.com/ByMykel/counter-strike-image-tracker/main/static/panorama/images/econ/default_generated/weapon_deagle_aa_flames_light_png.png"
}

Thank you for the fast reply. Good to know that with the substring but its not quite what im looking for. Best thing would be something where I can put in a float and it gives me the appropriate image. Like the screenshot tools some marketplaces have. I would even build an API like that by myself but I dont know how to start.

ah got it. Yeah that is a little bit harder to do and I don't know how to do that. The only thing I know about screenshot tool for skins is this repo that I saw a time ago, maybe it can help you to start.

ByMykel commented 8 months ago

Is this selection of images approximate or exact?

I just set FN and MW to light, FT and WW to medium and BS to heavy. Not really sure if this is correct, let me know if you know the correct version.