cs2-inventory-resolver
v0.2.0
Published
Resolve CS2 Game Coordinator protobuf items into human-readable names, images, and categories
Downloads
245
Readme
cs2-inventory-resolver
Resolve raw CS2 Game Coordinator (GC) items into human-readable names, images, and categories.
Installation
The package is not yet published to npm. Install directly from GitHub:
npm install cs2-inventory-resolverUsage
resolveItem(gcItem)
Takes a raw GC item and returns its name, image URL, and category.
import { resolveItem } from 'cs2-inventory-resolver';
const result = resolveItem({ def_index: 7, paint_index: 282 });
// => { name: "AK-47 | Redline", image: "https://...", category: "skin" }Returns null if the item could not be identified.
getAttributeUint32(item, attrDefIndex)
Reads a uint32 value from a GC item's raw attribute[] array.
import { getAttributeUint32 } from 'cs2-inventory-resolver';
const musicIndex = getAttributeUint32(gcItem, 166);
if (musicIndex) {
console.log('Music kit ID:', musicIndex);
}