Modern CS2/CS:GO Game Coordinator integration with the latest GameTracking-CS2 protobuf definitions. This package provides a simple API for interacting with the Counter-Strike 2 and CS:GO Game Coordinator, with full support for all modern CS2 features.
This fork addresses critical issues with the original globaloffensive
package and adds comprehensive support for modern CS2 features:
- All protobuf files updated from the latest GameTracking-CS2 repository
- Future-proof with current CS2 game definitions
- Comprehensive field support for all modern CS2 items
highlight_reel
support in stickers, keychains, and variationsmusicindex
- Music kit supportentindex
- Entity index supportpetindex
- Pet/companion supportstyle
- Style variations supportupgrade_level
- Item upgrade level support
variations
- Complete new array for item variations- Enhanced stickers array with all new fields
- Enhanced keychains array with all new fields
- Updated
handlers.js
to process all new fields - Proper field mapping and null handling
- 100% backward compatible with existing code
Problem: The original package was missing the highlight_reel
field in inspect responses, causing incomplete data for items with highlight reels.
Solution: Updated protobuf definitions and enhanced handlers to properly capture and return highlight_reel
data.
// Before (missing data)
{
keychains: [
{
slot: 0,
sticker_id: 36,
offset_x: 3.445085287094116,
// highlight_reel: MISSING! β
}
]
}
// After (complete data)
{
keychains: [
{
slot: 0,
sticker_id: 36,
offset_x: 3.445085287094116,
highlight_reel: 67890 // β
NOW WORKING!
}
]
}
npm install node-cs2
This package is 100% API compatible with the original globaloffensive
package:
// Old
const GlobalOffensive = require('globaloffensive');
// New - just change the require!
const NodeCS2 = require('node-cs2');
// All your existing code works unchanged!
const cs2 = new NodeCS2(steamUser);
const SteamUser = require('steam-user');
const NodeCS2 = require('node-cs2');
const user = new SteamUser();
const cs2 = new NodeCS2(user);
user.logOn({
accountName: 'username',
password: 'password'
});
user.on('loggedOn', () => {
console.log('Logged into Steam');
user.gamesPlayed([730]); // CS2/CS:GO app ID
});
user.on('appLaunched', (appid) => {
if (appid == 730) {
console.log('CS2/CS:GO launched');
cs2.helloGC();
}
});
cs2.on('connectedToGC', () => {
console.log('Connected to CS2/CS:GO Game Coordinator');
});
// Inspect an item with full modern field support
cs2.on('inspectItemInfo', (item) => {
console.log('Item data with all modern fields:', {
defindex: item.defindex,
paintindex: item.paintindex,
paintwear: item.paintwear,
// NEW FIELDS NOW SUPPORTED!
musicindex: item.musicindex,
petindex: item.petindex,
style: item.style,
upgrade_level: item.upgrade_level,
// ARRAYS WITH FULL FIELD SUPPORT
stickers: item.stickers, // includes highlight_reel
keychains: item.keychains, // includes highlight_reel
variations: item.variations // NEW! includes highlight_reel
});
});
// Inspect an item
cs2.inspectItem('76561198057249394', '2569415699', '7115007497');
Full support for both masked and unmasked inspect URLs:
// Unmasked URL (requires Steam client) - NOW WITH FULL FIELD SUPPORT!
const unmaskedUrl = 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S76561198857794835A45540551473D7523863830991655521';
// Extract parameters and inspect
const match = unmaskedUrl.match(/S(\d+)A(\d+)D(\d+)/);
if (match) {
const [, ownerId, assetId, classId] = match;
cs2.inspectItem(ownerId, assetId, classId);
}
defindex
- Item definition indexpaintindex
- Paint/skin indexpaintseed
- Paint seedpaintwear
- Wear valuerarity
- Item rarityquality
- Item quality
musicindex
- Music kit indexentindex
- Entity indexpetindex
- Pet/companion indexstyle
- Style variation indexupgrade_level
- Item upgrade level
stickers[]
- Sticker applicationskeychains[]
- Keychain attachmentsvariations[]
- Item variations (NEW!)
slot
- Attachment slotsticker_id
- Sticker/item IDwear
- Wear valuescale
- Scale factorrotation
- Rotation angletint_id
- Tint color IDoffset_x
,offset_y
,offset_z
- Position offsetspattern
- Pattern indexhighlight_reel
- Highlight reel ID (FIXED!)
git clone https://github.com/sak0a/node-cs2.git
cd node-globaloffensive
npm install
npm run generate-protos
# Copy latest protobuf files from GameTracking-CS2
# Then regenerate:
npm run generate-protos
MIT License - see LICENSE file for details.
- Original Author: Alex Corn (DoctorMcKay) - Original
globaloffensive
package - Protobuf Definitions: SteamDatabase GameTracking-CS2
- Fork Maintainer: sak0a
If you encounter any issues or need support:
- Check if the issue exists in the original package
- Open an issue on GitHub
- Provide detailed information about your use case
- β Up-to-date with latest CS2 definitions
- β Bug fixes for missing fields
- β Enhanced functionality with new CS2 features
- β 100% compatible with existing code
- β Actively maintained with GameTracking-CS2 updates
- β Community-driven improvements