Git Product home page Git Product logo

Comments (10)

ByMykel avatar ByMykel commented on August 23, 2024 2

With the current structure I will not add the wear to the name because a lot of data would be repeated. I can add a property
named wears with all the wears.

{
    "id": "skin-65604",
    "name": "Desert Eagle | Urban DDPAT",
    "description": "As expensive as it is powerfu...",
    "weapon": "Desert Eagle",
    "pattern": "Urban DDPAT",
    "min_float": 0.06,
    "max_float": 0.8,
    "rarity": "Consumer Grade",
    "stattrak": false,
    "image": "https://steamcdn-a.akamaihd.n..."

    "wears": ["Factory New", "Minimal Wear", "..."]
}

from csgo-api.

hackeryutu avatar hackeryutu commented on August 23, 2024

Okay

from csgo-api.

ByMykel avatar ByMykel commented on August 23, 2024

@hackeryutu You can propose me a better structure if you think is better for the general use of this API.

from csgo-api.

hackeryutu avatar hackeryutu commented on August 23, 2024

@ByMykel I think your data structure is very good

from csgo-api.

ErezShahaf avatar ErezShahaf commented on August 23, 2024

With the current structure I will not add the wear to the name because a lot of data would be repeated. I can add a property named wears with all the wears.

{
    "id": "skin-65604",
    "name": "Desert Eagle | Urban DDPAT",
    "description": "As expensive as it is powerfu...",
    "weapon": "Desert Eagle",
    "pattern": "Urban DDPAT",
    "min_float": 0.06,
    "max_float": 0.8,
    "rarity": "Consumer Grade",
    "stattrak": false,
    "image": "https://steamcdn-a.akamaihd.n..."

    "wears": ["Factory New", "Minimal Wear", "..."]
}

Having the min-max values of a specific wear would make the API much better. For example, in buff163 you can look for a specific weapon in a specific wear such as "Factory new" and see the min and max float values for "Factory new" of that specific item.

You can add nested objects which contain the wears and their respective min-max float values.

Would be pretty useful for many developers, although items_game.txt doesn't seem to contain that data so it would have to be scraped from somewhere else.

from csgo-api.

ByMykel avatar ByMykel commented on August 23, 2024

@ErezShahaf If I'm not mistaken the min and max float values for every wear are the same:

image

But one thing I did't notice before, that the images are not the same for all wears:
image
image

I could do something with nested objects to display the different images for every wear but I can't find all the images.

For example for 'AWP | Corticera' I have 3 different images, but for the most of the skins I only have one.

    "econ/default_generated/weapon_awp_cu_favela_awp_heavy_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_heavy_large.e7e7ee23215e0ccfb22d39500522a0e4128500fa.png",
    "econ/default_generated/weapon_awp_cu_favela_awp_light_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_light_large.4329c047ea1899f3846a1a81539ba2a27665a54e.png",
    "econ/default_generated/weapon_awp_cu_favela_awp_medium_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_medium_large.7578b4d3233ca9d1e47cf51e6fd26fb38048a5ba.png",

from csgo-api.

ByMykel avatar ByMykel commented on August 23, 2024

@hackeryutu Until we find a better structure for the skins I think you can calculate the wears yourself using this image:

image

from csgo-api.

ErezShahaf avatar ErezShahaf commented on August 23, 2024

@ErezShahaf If I'm not mistaken the min and max float values for every wear are the same:

image

But one thing I did't notice before, that the images are not the same for all wears: image image

I could do something with nested objects to display the different images for every wear but I can't find all the images.

For example for 'AWP | Corticera' I have 3 different images, but for the most of the skins I only have one.

    "econ/default_generated/weapon_awp_cu_favela_awp_heavy_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_heavy_large.e7e7ee23215e0ccfb22d39500522a0e4128500fa.png",
    "econ/default_generated/weapon_awp_cu_favela_awp_light_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_light_large.4329c047ea1899f3846a1a81539ba2a27665a54e.png",
    "econ/default_generated/weapon_awp_cu_favela_awp_medium_large": "https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_awp_cu_favela_awp_medium_large.7578b4d3233ca9d1e47cf51e6fd26fb38048a5ba.png",

That would have made things easier, unfortunately each weapon has different ranges for their wear names. For example, one factory new could be between 0 to 0.06 and for the other weapon it could be from 0.02 to 0.1.

What you noticed in your image is the spray pattern, which also complicates things if you wanted to do it perfectly. For the floats you could just scrape the data once from somewhere else but if you wanted the accurate image it requires a server and SteamUser/NodeCSGO packages in order to send a request to the game coordinator. Another thing that you could do is scrape each image pattern if you wanted it to be more or less accurate (There are other things which may alter how the weapon looks, the skins are dynamic).

It's up to you if you want to do something about it, I just wanted to let you know that those differences exist. I don't know who this API is intended for but I personally think that the floats are by far more important.

from csgo-api.

ByMykel avatar ByMykel commented on August 23, 2024

That would have made things easier, unfortunately each weapon has different ranges for their wear names. For example, one factory new could be between 0 to 0.06 and for the other weapon it could be from 0.02 to 0.1.

@ErezShahaf Could you give one example?

I definitely want to add nested objects so I can add extra things like market hash name, accurate images for every wear, float values, etc. But I think that woud be some kind of hard to do without scraping some site.

from csgo-api.

ByMykel avatar ByMykel commented on August 23, 2024

@hackeryutu Deployed. Sorry for the delay I should have added this before.

from csgo-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.