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
283 stars 34 forks source link

collectible-996 missing #61

Closed Tom-jm03 closed 1 year ago

Tom-jm03 commented 1 year ago

Hey, the collectible-996(Global Offensive Badge) is missing from https://bymykel.github.io/CSGO-API/api/en/collections.json

Also i noticed, that the provided links items_game.txt and csgo_english.txt are not existing anymore, i think they've changed the repository structure.

ByMykel commented 1 year ago

Yeah I need some free time to add the new CS2 items, I will add this one quickly cause is only one item.

Also I need time to update the README and docs. I got the items_game.txt and languages from this repo.

Tom-jm03 commented 1 year ago

Thanks!

ByMykel commented 1 year ago

Deployed https://cs2-api.vercel.app/api/items?id=collectible-996

Tom-jm03 commented 1 year ago

Do you also have different resolutions of the image? And what is the new item path? The old one was C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\scripts\items iirc

ByMykel commented 1 year ago

Do you also have different resolutions of the image?

No

And what is the new item path? The old one was C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\scripts\items iirc

items_game.txt is inside Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/pak01_dir.vpk and the translations in Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/resource. I haven't found the images in game files yet.

Tom-jm03 commented 1 year ago

Thanks. Found it.

ByMykel commented 1 year ago

If you find the images let me know 😅

Tom-jm03 commented 1 year ago

You mean if i find the images in the cs2 game files? I think they are not there. I think maybe the game decompiles the models from the vpk file.

ByMykel commented 1 year ago

In what vpk file have you wound the images?

Tom-jm03 commented 1 year ago

In what vpk file have you wound the images?

Under C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\pak01_dir.vpk And the images itself in the vpk file under panorama\images\econ\status_icons\

ByMykel commented 1 year ago

You are right.

With ValveResourceFormat you can export them.

decompile and export: image

Image i got: weapon_glock_am_gamma_doppler_phase3_glock_light_large_png

Tom-jm03 commented 1 year ago

Yes. How do you automate these tasks for your github repo if i may ask?

ByMykel commented 1 year ago

The tool VRF has also a CLI. So you can do this:

C:\Users\name\Desktop\Decompiler-windows-x64\Decompiler.exe --input "D:\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\pak01_dir.vpk" --output D:\csgo_images -e "vtex_c"

This is an example on how to export them, the CLI should have something to also decompile them to .png.

In this issue I explain how to get de CDN url from the image (this might not work in CS2, i haven't test it)

BTW, there may be a better way to do all of this, but I only know this way.

Tom-jm03 commented 1 year ago

Thanks!

ByMykel commented 1 year ago

This is the command to decompile and export the images:

C:\Users\name\Desktop\Decompiler-windows-x64\Decompiler.exe --input "D:\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\pak01_dir.vpk" --output D:\csgo_images -e "vtex_c" -d -f "panorama\\"