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

Vanilla knives are missing float values #114

Closed Luksch187 closed 7 months ago

Luksch187 commented 7 months ago

Hey, I noticed that the vanilla knives don't have float values.

image

But they have a float min and float max as every other skin does.

Is this a problem in the items_game.txt where the information is pulled from or can it be fixed?

ByMykel commented 7 months ago

I think vanilla knives don't have a float value. These vanilla knives are not in items_game.txt or at least I have not seen them, I am just hardcoding them.

Check other sites like these two: https://csgostash.com/skin/1600/Kukri-Knife-Vanilla https://wiki.cs.money/weapons/kukri-knife

Luksch187 commented 7 months ago

https://csgoskins.gg/items/kukri-knife-vanilla/stattrak https://www.reddit.com/r/GlobalOffensiveTrade/comments/3resvg/discussion_do_vanilla_knives_have_floats_or_does/

They have float borders, it's just not relevant, they look the same even with different float values. I dont know, you might want to add it

ByMykel commented 7 months ago

https://csgoskins.gg/items/kukri-knife-vanilla/stattrak https://www.reddit.com/r/GlobalOffensiveTrade/comments/3resvg/discussion_do_vanilla_knives_have_floats_or_does/

They have float borders, it's just not relevant, they look the same even with different float values. I dont know, you might want to add it

Interesting, so they have a float but is not relevant at all. I rather not to add it as long as is not requested a lot in this issues.

Luksch187 commented 7 months ago

Hm, ok. I would appreciate it, I can also help you with researching

ByMykel commented 7 months ago

If you want to implement it, go ahead.

Here you have hardcoded all the knives: https://github.com/ByMykel/CSGO-API/blob/main/utils/index.js#L67-L168

You can add there the min_float and max_float of every knife.

Then you go to skins.js and add the min_float and max_float: https://github.com/ByMykel/CSGO-API/blob/main/services/skins.js#L174-L208

Then you to do the same in skinsNotGrouped.js: https://github.com/ByMykel/CSGO-API/blob/main/services/skinsNotGrouped.js#L232-L270

The changes should be applied to these endpoints:

https://bymykel.github.io/CSGO-API/api/en/skins.json https://bymykel.github.io/CSGO-API/api/en/skins_not_grouped.json

EDIT: I use other sites like csgostash or csmoney for reference, but in this case I don't know where to find the floats.

piyanggoon commented 7 months ago

I don't think we should include float min and max values for vanilla skins because in this parser, float refers to exterior (FN, MW, FT, WW, BS). On the marketplace, we don't want to use float for any relation.

ByMykel commented 7 months ago

I don't think we should include float min and max values for vanilla skins because in this parser, float refers to exterior (FN, MW, FT, WW, BS). On the marketplace, we don't want to use float for any relation.

Yeah, I kind of thought the same.

I'am closing this issue for now. If someone has a strong argument we can re-open this.